Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96970
b: refs/heads/master
c: 9cd9c61
h: refs/heads/master
v: v3
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed May 13, 2008
1 parent de1eaf5 commit a219c7f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 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: 45b3947c2de5841d691f1d27d30419b9fae2d86c
refs/heads/master: 9cd9c616f5890c9345546e03c99ba392b7a82cdf
10 changes: 0 additions & 10 deletions trunk/arch/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 14 additions & 10 deletions trunk/arch/blackfin/mach-bf533/boards/stamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
};
Expand All @@ -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

Expand All @@ -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);
}

0 comments on commit a219c7f

Please sign in to comment.