Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25287
b: refs/heads/master
c: dee9b2e
h: refs/heads/master
i:
  25285: d55bda1
  25283: a7c7ca2
  25279: dcc88a5
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed Apr 2, 2006
1 parent cbcd097 commit a3da6db
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66ce229fe057e35275a5f5176b29ed70795506a1
refs/heads/master: dee9b2e932ef7c8f19540ad67e425fae30f33421
85 changes: 84 additions & 1 deletion trunk/arch/arm/mach-s3c2410/common-smdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,98 @@
#include <linux/init.h>
#include <linux/platform_device.h>

#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>

#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>

#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach-types.h>

#include <asm/arch/regs-gpio.h>

#include <asm/arch/nand.h>

#include "devs.h"
#include "pm.h"

/* NAND parititon from 2.4.18-swl5 */

static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "Boot Agent",
.size = SZ_16K,
.offset = 0,
},
[1] = {
.name = "S3C2410 flash parition 1",
.offset = 0,
.size = SZ_2M,
},
[2] = {
.name = "S3C2410 flash partition 2",
.offset = SZ_4M,
.size = SZ_4M,
},
[3] = {
.name = "S3C2410 flash partition 3",
.offset = SZ_8M,
.size = SZ_2M,
},
[4] = {
.name = "S3C2410 flash partition 4",
.offset = SZ_1M * 10,
.size = SZ_4M,
},
[5] = {
.name = "S3C2410 flash partition 5",
.offset = SZ_1M * 14,
.size = SZ_1M * 10,
},
[6] = {
.name = "S3C2410 flash partition 6",
.offset = SZ_1M * 24,
.size = SZ_1M * 24,
},
[7] = {
.name = "S3C2410 flash partition 7",
.offset = SZ_1M * 48,
.size = SZ_16M,
}
};

static struct s3c2410_nand_set smdk_nand_sets[] = {
[0] = {
.name = "NAND",
.nr_chips = 1,
.nr_partitions = ARRAY_SIZE(smdk_default_nand_part),
.partitions = smdk_default_nand_part,
},
};

/* choose a set of timings which should suit most 512Mbit
* chips and beyond.
*/

static struct s3c2410_platform_nand smdk_nand_info = {
.tacls = 20,
.twrph0 = 60,
.twrph1 = 20,
.nr_sets = ARRAY_SIZE(smdk_nand_sets),
.sets = smdk_nand_sets,
};

/* devices we initialise */

static struct platform_device __initdata *smdk_devs[] = {
&s3c_device_nand,
};

void __init smdk_machine_init(void)
{
/* Configure the LEDs (even if we have no LED support)*/
Expand All @@ -47,5 +126,9 @@ void __init smdk_machine_init(void)
s3c2410_gpio_setpin(S3C2410_GPF6, 1);
s3c2410_gpio_setpin(S3C2410_GPF7, 1);

s3c_device_nand.dev.platform_data = &smdk_nand_info;

platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));

s3c2410_pm_init();
}

0 comments on commit a3da6db

Please sign in to comment.