Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a3a1804 authored by Ben Dooks's avatar Ben Dooks
Browse files

ARM: S3C: Add NAND device platform data set call

parent ff34aaa9
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -247,7 +247,7 @@ static int chip0_map[] = { 1 };
static int chip1_map[] = { 2 };
static int chip1_map[] = { 2 };
static int chip2_map[] = { 3 };
static int chip2_map[] = { 3 };


static struct mtd_partition bast_default_nand_part[] = {
static struct mtd_partition __initdata bast_default_nand_part[] = {
	[0] = {
	[0] = {
		.name	= "Boot Agent",
		.name	= "Boot Agent",
		.size	= SZ_16K,
		.size	= SZ_16K,
@@ -273,7 +273,7 @@ static struct mtd_partition bast_default_nand_part[] = {
 * socket.
 * socket.
*/
*/


static struct s3c2410_nand_set bast_nand_sets[] = {
static struct s3c2410_nand_set __initdata bast_nand_sets[] = {
	[0] = {
	[0] = {
		.name		= "SmartMedia",
		.name		= "SmartMedia",
		.nr_chips	= 1,
		.nr_chips	= 1,
@@ -323,7 +323,7 @@ static void bast_nand_select(struct s3c2410_nand_set *set, int slot)
	__raw_writeb(tmp, BAST_VA_CTRL2);
	__raw_writeb(tmp, BAST_VA_CTRL2);
}
}


static struct s3c2410_platform_nand bast_nand_info = {
static struct s3c2410_platform_nand __initdata bast_nand_info = {
	.tacls		= 30,
	.tacls		= 30,
	.twrph0		= 60,
	.twrph0		= 60,
	.twrph1		= 60,
	.twrph1		= 60,
@@ -625,7 +625,6 @@ static void __init bast_map_io(void)


	s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
	s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));


	s3c_device_nand.dev.platform_data = &bast_nand_info;
	s3c_device_hwmon.dev.platform_data = &bast_hwmon_info;
	s3c_device_hwmon.dev.platform_data = &bast_hwmon_info;


	s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
	s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
@@ -639,6 +638,7 @@ static void __init bast_init(void)
	sysdev_register(&bast_pm_sysdev);
	sysdev_register(&bast_pm_sysdev);


	s3c_i2c0_set_platdata(&bast_i2c_info);
	s3c_i2c0_set_platdata(&bast_i2c_info);
	s3c_nand_set_platdata(&bast_nand_info);
	s3c24xx_fb_set_platdata(&bast_fb_info);
	s3c24xx_fb_set_platdata(&bast_fb_info);
	platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices));
	platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices));


+4 −4
Original line number Original line Diff line number Diff line
@@ -258,7 +258,7 @@ static struct platform_device *qt2410_devices[] __initdata = {
	&qt2410_led,
	&qt2410_led,
};
};


static struct mtd_partition qt2410_nand_part[] = {
static struct mtd_partition __initdata qt2410_nand_part[] = {
	[0] = {
	[0] = {
		.name	= "U-Boot",
		.name	= "U-Boot",
		.size	= 0x30000,
		.size	= 0x30000,
@@ -286,7 +286,7 @@ static struct mtd_partition qt2410_nand_part[] = {
	},
	},
};
};


static struct s3c2410_nand_set qt2410_nand_sets[] = {
static struct s3c2410_nand_set __initdata qt2410_nand_sets[] = {
	[0] = {
	[0] = {
		.name		= "NAND",
		.name		= "NAND",
		.nr_chips	= 1,
		.nr_chips	= 1,
@@ -299,7 +299,7 @@ static struct s3c2410_nand_set qt2410_nand_sets[] = {
 * chips and beyond.
 * chips and beyond.
 */
 */


static struct s3c2410_platform_nand qt2410_nand_info = {
static struct s3c2410_platform_nand __initdata qt2410_nand_info = {
	.tacls		= 20,
	.tacls		= 20,
	.twrph0		= 60,
	.twrph0		= 60,
	.twrph1		= 20,
	.twrph1		= 20,
@@ -331,7 +331,7 @@ static void __init qt2410_map_io(void)


static void __init qt2410_machine_init(void)
static void __init qt2410_machine_init(void)
{
{
	s3c_device_nand.dev.platform_data = &qt2410_nand_info;
	s3c_nand_set_platdata(&qt2410_nand_info);


	switch (tft_type) {
	switch (tft_type) {
	case 'p': /* production */
	case 'p': /* production */
+6 −5
Original line number Original line Diff line number Diff line
@@ -96,7 +96,7 @@ static struct s3c2410_uartcfg jive_uartcfgs[] = {
 * 0x017d0000-0x02bd0000 : cramfs B
 * 0x017d0000-0x02bd0000 : cramfs B
 * 0x02bd0000-0x03fd0000 : yaffs
 * 0x02bd0000-0x03fd0000 : yaffs
 */
 */
static struct mtd_partition jive_imageA_nand_part[] = {
static struct mtd_partition __initdata jive_imageA_nand_part[] = {


#ifdef CONFIG_MACH_JIVE_SHOW_BOOTLOADER
#ifdef CONFIG_MACH_JIVE_SHOW_BOOTLOADER
	/* Don't allow access to the bootloader from linux */
	/* Don't allow access to the bootloader from linux */
@@ -154,7 +154,7 @@ static struct mtd_partition jive_imageA_nand_part[] = {
        },
        },
};
};


static struct mtd_partition jive_imageB_nand_part[] = {
static struct mtd_partition __initdata jive_imageB_nand_part[] = {


#ifdef CONFIG_MACH_JIVE_SHOW_BOOTLOADER
#ifdef CONFIG_MACH_JIVE_SHOW_BOOTLOADER
	/* Don't allow access to the bootloader from linux */
	/* Don't allow access to the bootloader from linux */
@@ -213,7 +213,7 @@ static struct mtd_partition jive_imageB_nand_part[] = {
        },
        },
};
};


static struct s3c2410_nand_set jive_nand_sets[] = {
static struct s3c2410_nand_set __initdata jive_nand_sets[] = {
	[0] = {
	[0] = {
		.name           = "flash",
		.name           = "flash",
		.nr_chips       = 1,
		.nr_chips       = 1,
@@ -222,7 +222,7 @@ static struct s3c2410_nand_set jive_nand_sets[] = {
	},
	},
};
};


static struct s3c2410_platform_nand jive_nand_info = {
static struct s3c2410_platform_nand __initdata jive_nand_info = {
	/* set taken from osiris nand timings, possibly still conservative */
	/* set taken from osiris nand timings, possibly still conservative */
	.tacls		= 30,
	.tacls		= 30,
	.twrph0		= 55,
	.twrph0		= 55,
@@ -631,7 +631,8 @@ static void __init jive_machine_init(void)


	s3c_pm_init();
	s3c_pm_init();


	s3c_device_nand.dev.platform_data = &jive_nand_info;
	/** TODO - check that this is after the cmdline option! */
	s3c_nand_set_platdata(&jive_nand_info);


	/* initialise the spi */
	/* initialise the spi */


+5 −5
Original line number Original line Diff line number Diff line
@@ -76,7 +76,7 @@ static struct s3c2410_uartcfg vstms_uartcfgs[] __initdata = {
	}
	}
};
};


static struct mtd_partition vstms_nand_part[] = {
static struct mtd_partition __initdata vstms_nand_part[] = {
	[0] = {
	[0] = {
		.name	= "Boot Agent",
		.name	= "Boot Agent",
		.size	= 0x7C000,
		.size	= 0x7C000,
@@ -99,7 +99,7 @@ static struct mtd_partition vstms_nand_part[] = {
	},
	},
};
};


static struct s3c2410_nand_set vstms_nand_sets[] = {
static struct s3c2410_nand_set __initdata vstms_nand_sets[] = {
	[0] = {
	[0] = {
		.name		= "NAND",
		.name		= "NAND",
		.nr_chips	= 1,
		.nr_chips	= 1,
@@ -112,7 +112,7 @@ static struct s3c2410_nand_set vstms_nand_sets[] = {
 * chips and beyond.
 * chips and beyond.
*/
*/


static struct s3c2410_platform_nand vstms_nand_info = {
static struct s3c2410_platform_nand __initdata vstms_nand_info = {
	.tacls		= 20,
	.tacls		= 20,
	.twrph0		= 60,
	.twrph0		= 60,
	.twrph1		= 20,
	.twrph1		= 20,
@@ -143,8 +143,6 @@ static void __init vstms_fixup(struct machine_desc *desc,


static void __init vstms_map_io(void)
static void __init vstms_map_io(void)
{
{
	s3c_device_nand.dev.platform_data = &vstms_nand_info;

	s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
	s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
	s3c24xx_init_clocks(12000000);
	s3c24xx_init_clocks(12000000);
	s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs));
	s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs));
@@ -153,6 +151,8 @@ static void __init vstms_map_io(void)
static void __init vstms_init(void)
static void __init vstms_init(void)
{
{
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c0_set_platdata(NULL);
	s3c_nand_set_platdata(&vstms_nand_info);

	platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices));
	platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices));
}
}


+6 −6
Original line number Original line Diff line number Diff line
@@ -138,7 +138,7 @@ static int external_map[] = { 2 };
static int chip0_map[]      = { 0 };
static int chip0_map[]      = { 0 };
static int chip1_map[]      = { 1 };
static int chip1_map[]      = { 1 };


static struct mtd_partition anubis_default_nand_part[] = {
static struct mtd_partition __initdata anubis_default_nand_part[] = {
	[0] = {
	[0] = {
		.name	= "Boot Agent",
		.name	= "Boot Agent",
		.size	= SZ_16K,
		.size	= SZ_16K,
@@ -161,7 +161,7 @@ static struct mtd_partition anubis_default_nand_part[] = {
	}
	}
};
};


static struct mtd_partition anubis_default_nand_part_large[] = {
static struct mtd_partition __initdata anubis_default_nand_part_large[] = {
	[0] = {
	[0] = {
		.name	= "Boot Agent",
		.name	= "Boot Agent",
		.size	= SZ_128K,
		.size	= SZ_128K,
@@ -191,7 +191,7 @@ static struct mtd_partition anubis_default_nand_part_large[] = {
 * socket.
 * socket.
*/
*/


static struct s3c2410_nand_set anubis_nand_sets[] = {
static struct s3c2410_nand_set __initdata anubis_nand_sets[] = {
	[1] = {
	[1] = {
		.name		= "External",
		.name		= "External",
		.nr_chips	= 1,
		.nr_chips	= 1,
@@ -233,7 +233,7 @@ static void anubis_nand_select(struct s3c2410_nand_set *set, int slot)
	__raw_writeb(tmp, ANUBIS_VA_CTRL1);
	__raw_writeb(tmp, ANUBIS_VA_CTRL1);
}
}


static struct s3c2410_platform_nand anubis_nand_info = {
static struct s3c2410_platform_nand __initdata anubis_nand_info = {
	.tacls		= 25,
	.tacls		= 25,
	.twrph0		= 55,
	.twrph0		= 55,
	.twrph1		= 40,
	.twrph1		= 40,
@@ -454,8 +454,6 @@ static void __init anubis_map_io(void)


	s3c24xx_register_clocks(anubis_clocks, ARRAY_SIZE(anubis_clocks));
	s3c24xx_register_clocks(anubis_clocks, ARRAY_SIZE(anubis_clocks));


	s3c_device_nand.dev.platform_data = &anubis_nand_info;

	s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
	s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
	s3c24xx_init_clocks(0);
	s3c24xx_init_clocks(0);
	s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
	s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
@@ -476,6 +474,8 @@ static void __init anubis_map_io(void)
static void __init anubis_init(void)
static void __init anubis_init(void)
{
{
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c0_set_platdata(NULL);
	s3c_nand_set_platdata(&anubis_nand_info);

	platform_add_devices(anubis_devices, ARRAY_SIZE(anubis_devices));
	platform_add_devices(anubis_devices, ARRAY_SIZE(anubis_devices));


	i2c_register_board_info(0, anubis_i2c_devs,
	i2c_register_board_info(0, anubis_i2c_devs,
Loading