Commit 30e9b95a authored by Mike Frysinger's avatar Mike Frysinger

Blackfin: bf533: convert boards to gpio framework

We don't want people banging on MMRs directly.  As for the ip0x board,
it shouldn't need to muck with the CS pin directly as the Blackfin SPI
bus master driver takes care of driving this.
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 4de2bf87
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
#include <asm/portmux.h> #include <asm/portmux.h>
#include <asm/dpmc.h> #include <asm/dpmc.h>
#include <mach/fio_flag.h>
/* /*
* Name the Board for the /proc/cpuinfo * Name the Board for the /proc/cpuinfo
...@@ -476,10 +475,16 @@ static int __init blackstamp_init(void) ...@@ -476,10 +475,16 @@ static int __init blackstamp_init(void)
return ret; return ret;
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #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); * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
bfin_write_FIO_FLAG_S(PF0); * the bfin-async-map driver takes care of flipping between
SSYNC(); * 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 #endif
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
#include <asm/portmux.h> #include <asm/portmux.h>
#include <mach/fio_flag.h>
/* /*
* Name the Board for the /proc/cpuinfo * Name the Board for the /proc/cpuinfo
...@@ -295,15 +294,7 @@ static int __init ip0x_init(void) ...@@ -295,15 +294,7 @@ static int __init ip0x_init(void)
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(ip0x_devices, ARRAY_SIZE(ip0x_devices)); 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)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif
return 0; return 0;
} }
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/portmux.h> #include <asm/portmux.h>
#include <asm/dpmc.h> #include <asm/dpmc.h>
#include <mach/fio_flag.h>
/* /*
* Name the Board for the /proc/cpuinfo * Name the Board for the /proc/cpuinfo
...@@ -674,10 +673,16 @@ static int __init stamp_init(void) ...@@ -674,10 +673,16 @@ static int __init stamp_init(void)
return ret; return ret;
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #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); * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
bfin_write_FIO_FLAG_S(PF0); * the bfin-async-map driver takes care of flipping between
SSYNC(); * 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 #endif
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
...@@ -713,7 +718,6 @@ void __init native_machine_early_platform_add_devices(void) ...@@ -713,7 +718,6 @@ void __init native_machine_early_platform_add_devices(void)
void native_machine_restart(char *cmd) void native_machine_restart(char *cmd)
{ {
/* workaround pull up on cpld / flash pin not being strong enough */ /* workaround pull up on cpld / flash pin not being strong enough */
bfin_write_FIO_INEN(~PF0); gpio_request(GPIO_PF0, "flash_cpld");
bfin_write_FIO_DIR(PF0); gpio_direction_output(GPIO_PF0, 0);
bfin_write_FIO_FLAG_C(PF0);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment