aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf548/boards
diff options
context:
space:
mode:
authorBryan Wu <bryan.wu@analog.com>2007-11-12 10:24:42 -0500
committerBryan Wu <bryan.wu@analog.com>2007-11-12 10:24:42 -0500
commit5d448dd50712ae42f8176b5bb8db4703bef6f0f5 (patch)
treebc0912451dacdb40393516362171da19317800aa /arch/blackfin/mach-bf548/boards
parent4a589e1ef67fdb2d5fa783117da8dc7cba576af4 (diff)
Blackfin arch: move hard coded pin_req to board file
Remove some sort of bloaty code, try to get these pin_req arrays built at compile-time - move this static things to the blackfin board file - add pin_req array to struct bfin5xx_spi_master - tested on BF537/BF548 with SPI flash Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf548/boards')
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 6b6490e66b30..2d30906626f9 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -42,6 +42,7 @@
42#include <asm/dma.h> 42#include <asm/dma.h>
43#include <asm/gpio.h> 43#include <asm/gpio.h>
44#include <asm/nand.h> 44#include <asm/nand.h>
45#include <asm/portmux.h>
45#include <asm/mach/bf54x_keys.h> 46#include <asm/mach/bf54x_keys.h>
46#include <linux/input.h> 47#include <linux/input.h>
47#include <linux/spi/ad7877.h> 48#include <linux/spi/ad7877.h>
@@ -453,9 +454,10 @@ static struct resource bfin_spi1_resource[] = {
453}; 454};
454 455
455/* SPI controller data */ 456/* SPI controller data */
456static struct bfin5xx_spi_master bf54x_spi_master_info = { 457static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
457 .num_chipselect = 8, 458 .num_chipselect = 8,
458 .enable_dma = 1, /* master has the ability to do dma transfer */ 459 .enable_dma = 1, /* master has the ability to do dma transfer */
460 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
459}; 461};
460 462
461static struct platform_device bf54x_spi_master0 = { 463static struct platform_device bf54x_spi_master0 = {
@@ -464,17 +466,23 @@ static struct platform_device bf54x_spi_master0 = {
464 .num_resources = ARRAY_SIZE(bfin_spi0_resource), 466 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
465 .resource = bfin_spi0_resource, 467 .resource = bfin_spi0_resource,
466 .dev = { 468 .dev = {
467 .platform_data = &bf54x_spi_master_info, /* Passed to driver */ 469 .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
468 }, 470 },
469}; 471};
470 472
473static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
474 .num_chipselect = 8,
475 .enable_dma = 1, /* master has the ability to do dma transfer */
476 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
477};
478
471static struct platform_device bf54x_spi_master1 = { 479static struct platform_device bf54x_spi_master1 = {
472 .name = "bfin-spi", 480 .name = "bfin-spi",
473 .id = 1, /* Bus number */ 481 .id = 1, /* Bus number */
474 .num_resources = ARRAY_SIZE(bfin_spi1_resource), 482 .num_resources = ARRAY_SIZE(bfin_spi1_resource),
475 .resource = bfin_spi1_resource, 483 .resource = bfin_spi1_resource,
476 .dev = { 484 .dev = {
477 .platform_data = &bf54x_spi_master_info, /* Passed to driver */ 485 .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
478 }, 486 },
479}; 487};
480#endif /* spi master and devices */ 488#endif /* spi master and devices */