Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228425
b: refs/heads/master
c: 30e9b95
h: refs/heads/master
i:
  228423: 8de0972
v: v3
  • Loading branch information
Mike Frysinger committed Jan 10, 2011
1 parent d23b72f commit 16d7e7d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 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: 4de2bf8786ec8ec9a45b556e1ddf5c80c807a361
refs/heads/master: 30e9b95a8233c11f53e0763e339621271865a4ec
15 changes: 10 additions & 5 deletions trunk/arch/blackfin/mach-bf533/boards/blackstamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <asm/bfin5xx_spi.h>
#include <asm/portmux.h>
#include <asm/dpmc.h>
#include <mach/fio_flag.h>

/*
* Name the Board for the /proc/cpuinfo
Expand Down Expand Up @@ -476,10 +475,16 @@ static int __init blackstamp_init(void)
return ret;

#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() | PF0);
bfin_write_FIO_FLAG_S(PF0);
SSYNC();
/*
* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
* the bfin-async-map driver takes care of flipping between
* flash and ethernet when necessary.
*/
ret = gpio_request(GPIO_PF0, "enet_cpld");
if (!ret) {
gpio_direction_output(GPIO_PF0, 1);
gpio_free(GPIO_PF0);
}
#endif

spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/blackfin/mach-bf533/boards/ip0x.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <asm/dma.h>
#include <asm/bfin5xx_spi.h>
#include <asm/portmux.h>
#include <mach/fio_flag.h>

/*
* Name the Board for the /proc/cpuinfo
Expand Down Expand Up @@ -295,15 +294,7 @@ static int __init ip0x_init(void)
printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(ip0x_devices, ARRAY_SIZE(ip0x_devices));

#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
for (i = 0; i < ARRAY_SIZE(bfin_spi_board_info); ++i) {
int j = 1 << bfin_spi_board_info[i].chip_select;
/* set spi cs to 1 */
bfin_write_FIO_DIR(bfin_read_FIO_DIR() | j);
bfin_write_FIO_FLAG_S(j);
}
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif

return 0;
}
Expand Down
20 changes: 12 additions & 8 deletions trunk/arch/blackfin/mach-bf533/boards/stamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <asm/reboot.h>
#include <asm/portmux.h>
#include <asm/dpmc.h>
#include <mach/fio_flag.h>

/*
* Name the Board for the /proc/cpuinfo
Expand Down Expand Up @@ -674,10 +673,16 @@ static int __init stamp_init(void)
return ret;

#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() | PF0);
bfin_write_FIO_FLAG_S(PF0);
SSYNC();
/*
* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
* the bfin-async-map driver takes care of flipping between
* flash and ethernet when necessary.
*/
ret = gpio_request(GPIO_PF0, "enet_cpld");
if (!ret) {
gpio_direction_output(GPIO_PF0, 1);
gpio_free(GPIO_PF0);
}
#endif

spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
Expand Down Expand Up @@ -713,7 +718,6 @@ void __init native_machine_early_platform_add_devices(void)
void native_machine_restart(char *cmd)
{
/* 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);
gpio_request(GPIO_PF0, "flash_cpld");
gpio_direction_output(GPIO_PF0, 0);
}

0 comments on commit 16d7e7d

Please sign in to comment.