aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-05-13 00:31:32 -0400
committerBryan Wu <cooloney@kernel.org>2008-05-13 00:31:32 -0400
commit9cd9c616f5890c9345546e03c99ba392b7a82cdf (patch)
treeec566e8ce4aa7bc1ce2b9c72d147ad67df2d9b58 /arch/blackfin/mach-bf533
parent45b3947c2de5841d691f1d27d30419b9fae2d86c (diff)
[Blackfin] arch: rename bf5xx-flash to bfin-async-flash
- move all kconfig board settings into board resources - fixup casting style according to lkml feedback - rewrite driver so that it can handle arbitrary of instances according to the declared platform resources Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Cc: Joern Engel <joern@logfs.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf533')
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 7fd35fb32fd5..ec05b236dc3f 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -111,7 +111,7 @@ static struct platform_device net2272_bfin_device = {
111}; 111};
112#endif 112#endif
113 113
114#if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE) 114#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
115static struct mtd_partition stamp_partitions[] = { 115static struct mtd_partition stamp_partitions[] = {
116 { 116 {
117 .name = "Bootloader", 117 .name = "Bootloader",
@@ -141,13 +141,17 @@ static struct resource stamp_flash_resource[] = {
141 .end = 0x203fffff, 141 .end = 0x203fffff,
142 .flags = IORESOURCE_MEM, 142 .flags = IORESOURCE_MEM,
143 }, { 143 }, {
144 .start = CONFIG_ENET_FLASH_PIN, 144 .start = 0x7BB07BB0, /* AMBCTL0 setting when accessing flash */
145 .end = 0x7BB07BB0, /* AMBCTL1 setting when accessing flash */
146 .flags = IORESOURCE_MEM,
147 }, {
148 .start = GPIO_PF0,
145 .flags = IORESOURCE_IRQ, 149 .flags = IORESOURCE_IRQ,
146 } 150 }
147}; 151};
148 152
149static struct platform_device stamp_flash_device = { 153static struct platform_device stamp_flash_device = {
150 .name = "BF5xx-Flash", 154 .name = "bfin-async-flash",
151 .id = 0, 155 .id = 0,
152 .dev = { 156 .dev = {
153 .platform_data = &stamp_flash_data, 157 .platform_data = &stamp_flash_data,
@@ -595,7 +599,7 @@ static struct platform_device *stamp_devices[] __initdata = {
595 599
596 &bfin_gpios_device, 600 &bfin_gpios_device,
597 601
598#if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE) 602#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
599 &stamp_flash_device, 603 &stamp_flash_device,
600#endif 604#endif
601}; 605};
@@ -617,8 +621,8 @@ static int __init stamp_init(void)
617 621
618#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 622#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
619 /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ 623 /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
620 bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN)); 624 bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
621 bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN); 625 bfin_write_FIO_FLAG_S(PF0);
622 SSYNC(); 626 SSYNC();
623#endif 627#endif
624 628
@@ -636,8 +640,8 @@ arch_initcall(stamp_init);
636 640
637void native_machine_restart(char *cmd) 641void native_machine_restart(char *cmd)
638{ 642{
639#define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN) 643 /* workaround pull up on cpld / flash pin not being strong enough */
640 bfin_write_FIO_INEN(~BIT_TO_SET); 644 bfin_write_FIO_INEN(~PF0);
641 bfin_write_FIO_DIR(BIT_TO_SET); 645 bfin_write_FIO_DIR(PF0);
642 bfin_write_FIO_FLAG_C(BIT_TO_SET); 646 bfin_write_FIO_FLAG_C(PF0);
643} 647}