aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-05-13 12:31:32 +0800
committerBryan Wu <cooloney@kernel.org>2008-05-13 12:31:32 +0800
commit9cd9c616f5890c9345546e03c99ba392b7a82cdf (patch)
treeec566e8ce4aa7bc1ce2b9c72d147ad67df2d9b58 /arch/blackfin
parent[Blackfin] arch: Blackfin checksum annotations (diff)
downloadlinux-dev-9cd9c616f5890c9345546e03c99ba392b7a82cdf.tar.xz
linux-dev-9cd9c616f5890c9345546e03c99ba392b7a82cdf.zip
[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')
-rw-r--r--arch/blackfin/Kconfig10
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c24
2 files changed, 14 insertions, 20 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index fd5708523f2e..785d8b4fa0cb 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -479,16 +479,6 @@ comment "Memory Setup"
comment "Misc"
-config ENET_FLASH_PIN
- int "PF port/pin used for flash and ethernet sharing"
- depends on (BFIN533_STAMP)
- default 0
- help
- PF port/pin used for flash and ethernet sharing to allow other PF
- pins to be used on other platforms without having to touch common
- code.
- For example: PF0 --> 0,PF1 --> 1,PF2 --> 2, etc.
-
choice
prompt "Blackfin Exception Scratch Register"
default BFIN_SCRATCH_REG_RETN
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 = {
};
#endif
-#if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE)
+#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
static struct mtd_partition stamp_partitions[] = {
{
.name = "Bootloader",
@@ -141,13 +141,17 @@ static struct resource stamp_flash_resource[] = {
.end = 0x203fffff,
.flags = IORESOURCE_MEM,
}, {
- .start = CONFIG_ENET_FLASH_PIN,
+ .start = 0x7BB07BB0, /* AMBCTL0 setting when accessing flash */
+ .end = 0x7BB07BB0, /* AMBCTL1 setting when accessing flash */
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = GPIO_PF0,
.flags = IORESOURCE_IRQ,
}
};
static struct platform_device stamp_flash_device = {
- .name = "BF5xx-Flash",
+ .name = "bfin-async-flash",
.id = 0,
.dev = {
.platform_data = &stamp_flash_data,
@@ -595,7 +599,7 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_gpios_device,
-#if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE)
+#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
&stamp_flash_device,
#endif
};
@@ -617,8 +621,8 @@ static int __init stamp_init(void)
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
/* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
- bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN));
- bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN);
+ bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
+ bfin_write_FIO_FLAG_S(PF0);
SSYNC();
#endif
@@ -636,8 +640,8 @@ arch_initcall(stamp_init);
void native_machine_restart(char *cmd)
{
-#define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN)
- bfin_write_FIO_INEN(~BIT_TO_SET);
- bfin_write_FIO_DIR(BIT_TO_SET);
- bfin_write_FIO_FLAG_C(BIT_TO_SET);
+ /* workaround pull up on cpld / flash pin not being strong enough */
+ bfin_write_FIO_INEN(~PF0);
+ bfin_write_FIO_DIR(PF0);
+ bfin_write_FIO_FLAG_C(PF0);
}