aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf533/boards')
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c6
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c34
2 files changed, 18 insertions, 22 deletions
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 9d28415163ea..079389cbd859 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -87,9 +87,6 @@ static struct platform_device smc91x_device = {
87}; 87};
88#endif 88#endif
89 89
90#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
91/* all SPI peripherals info goes here */
92
93#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 90#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
94static struct mtd_partition bfin_spi_flash_partitions[] = { 91static struct mtd_partition bfin_spi_flash_partitions[] = {
95 { 92 {
@@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
189#endif 186#endif
190}; 187};
191 188
189#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
192/* SPI (0) */ 190/* SPI (0) */
193static struct resource bfin_spi0_resource[] = { 191static struct resource bfin_spi0_resource[] = {
194 [0] = { 192 [0] = {
@@ -425,9 +423,7 @@ static int __init ezkit_init(void)
425{ 423{
426 printk(KERN_INFO "%s(): registering device resources\n", __func__); 424 printk(KERN_INFO "%s(): registering device resources\n", __func__);
427 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); 425 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
428#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
429 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 426 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
430#endif
431 427
432#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 428#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
433 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 429 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 7fd35fb32fd5..13ae49515f73 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,
@@ -157,9 +161,6 @@ static struct platform_device stamp_flash_device = {
157}; 161};
158#endif 162#endif
159 163
160#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
161/* all SPI peripherals info goes here */
162
163#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 164#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
164static struct mtd_partition bfin_spi_flash_partitions[] = { 165static struct mtd_partition bfin_spi_flash_partitions[] = {
165 { 166 {
@@ -316,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
316#endif 317#endif
317}; 318};
318 319
320#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
319/* SPI (0) */ 321/* SPI (0) */
320static struct resource bfin_spi0_resource[] = { 322static struct resource bfin_spi0_resource[] = {
321 [0] = { 323 [0] = {
@@ -595,7 +597,7 @@ static struct platform_device *stamp_devices[] __initdata = {
595 597
596 &bfin_gpios_device, 598 &bfin_gpios_device,
597 599
598#if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE) 600#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE)
599 &stamp_flash_device, 601 &stamp_flash_device,
600#endif 602#endif
601}; 603};
@@ -617,15 +619,13 @@ static int __init stamp_init(void)
617 619
618#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 620#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
619 /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ 621 /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
620 bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN)); 622 bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
621 bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN); 623 bfin_write_FIO_FLAG_S(PF0);
622 SSYNC(); 624 SSYNC();
623#endif 625#endif
624 626
625#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 627 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
626 spi_register_board_info(bfin_spi_board_info, 628
627 ARRAY_SIZE(bfin_spi_board_info));
628#endif
629#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 629#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
630 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 630 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
631#endif 631#endif
@@ -636,8 +636,8 @@ arch_initcall(stamp_init);
636 636
637void native_machine_restart(char *cmd) 637void native_machine_restart(char *cmd)
638{ 638{
639#define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN) 639 /* workaround pull up on cpld / flash pin not being strong enough */
640 bfin_write_FIO_INEN(~BIT_TO_SET); 640 bfin_write_FIO_INEN(~PF0);
641 bfin_write_FIO_DIR(BIT_TO_SET); 641 bfin_write_FIO_DIR(PF0);
642 bfin_write_FIO_FLAG_C(BIT_TO_SET); 642 bfin_write_FIO_FLAG_C(PF0);
643} 643}