diff options
author | Bryan Wu <bryan.wu@analog.com> | 2007-11-12 10:24:42 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-11-12 10:24:42 -0500 |
commit | 5d448dd50712ae42f8176b5bb8db4703bef6f0f5 (patch) | |
tree | bc0912451dacdb40393516362171da19317800aa /arch/blackfin/mach-bf537 | |
parent | 4a589e1ef67fdb2d5fa783117da8dc7cba576af4 (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-bf537')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537.c | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/generic_board.c | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/pnav10.c | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c index 2915931045e3..18bda5412b50 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/irq.h> | 39 | #include <linux/irq.h> |
40 | #include <asm/dma.h> | 40 | #include <asm/dma.h> |
41 | #include <asm/bfin5xx_spi.h> | 41 | #include <asm/bfin5xx_spi.h> |
42 | #include <asm/portmux.h> | ||
42 | 43 | ||
43 | /* | 44 | /* |
44 | * Name the Board for the /proc/cpuinfo | 45 | * Name the Board for the /proc/cpuinfo |
@@ -194,6 +195,7 @@ static struct resource bfin_spi0_resource[] = { | |||
194 | static struct bfin5xx_spi_master bfin_spi0_info = { | 195 | static struct bfin5xx_spi_master bfin_spi0_info = { |
195 | .num_chipselect = 8, | 196 | .num_chipselect = 8, |
196 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 197 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
198 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
197 | }; | 199 | }; |
198 | 200 | ||
199 | static struct platform_device bfin_spi0_device = { | 201 | static struct platform_device bfin_spi0_device = { |
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c index 255da7a98481..ed0d26aa31ff 100644 --- a/arch/blackfin/mach-bf537/boards/generic_board.c +++ b/arch/blackfin/mach-bf537/boards/generic_board.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/dma.h> | 44 | #include <asm/dma.h> |
45 | #include <asm/bfin5xx_spi.h> | 45 | #include <asm/bfin5xx_spi.h> |
46 | #include <asm/reboot.h> | 46 | #include <asm/reboot.h> |
47 | #include <asm/portmux.h> | ||
47 | #include <linux/spi/ad7877.h> | 48 | #include <linux/spi/ad7877.h> |
48 | 49 | ||
49 | /* | 50 | /* |
@@ -513,6 +514,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
513 | static struct bfin5xx_spi_master bfin_spi0_info = { | 514 | static struct bfin5xx_spi_master bfin_spi0_info = { |
514 | .num_chipselect = 8, | 515 | .num_chipselect = 8, |
515 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 516 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
517 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
516 | }; | 518 | }; |
517 | 519 | ||
518 | /* SPI (0) */ | 520 | /* SPI (0) */ |
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 87b808926789..3c72fc34f142 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/irq.h> | 40 | #include <linux/irq.h> |
41 | #include <asm/dma.h> | 41 | #include <asm/dma.h> |
42 | #include <asm/bfin5xx_spi.h> | 42 | #include <asm/bfin5xx_spi.h> |
43 | #include <asm/portmux.h> | ||
43 | #include <linux/usb/sl811.h> | 44 | #include <linux/usb/sl811.h> |
44 | 45 | ||
45 | #include <linux/spi/ad7877.h> | 46 | #include <linux/spi/ad7877.h> |
@@ -413,6 +414,7 @@ static struct resource bfin_spi0_resource[] = { | |||
413 | static struct bfin5xx_spi_master bfin_spi0_info = { | 414 | static struct bfin5xx_spi_master bfin_spi0_info = { |
414 | .num_chipselect = 8, | 415 | .num_chipselect = 8, |
415 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 416 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
417 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
416 | }; | 418 | }; |
417 | 419 | ||
418 | static struct platform_device bfin_spi0_device = { | 420 | static struct platform_device bfin_spi0_device = { |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 5f7b91fbafe8..3bd0dad14ae3 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/dma.h> | 44 | #include <asm/dma.h> |
45 | #include <asm/bfin5xx_spi.h> | 45 | #include <asm/bfin5xx_spi.h> |
46 | #include <asm/reboot.h> | 46 | #include <asm/reboot.h> |
47 | #include <asm/portmux.h> | ||
47 | #include <linux/spi/ad7877.h> | 48 | #include <linux/spi/ad7877.h> |
48 | 49 | ||
49 | /* | 50 | /* |
@@ -513,6 +514,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
513 | static struct bfin5xx_spi_master bfin_spi0_info = { | 514 | static struct bfin5xx_spi_master bfin_spi0_info = { |
514 | .num_chipselect = 8, | 515 | .num_chipselect = 8, |
515 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 516 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
517 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
516 | }; | 518 | }; |
517 | 519 | ||
518 | /* SPI (0) */ | 520 | /* SPI (0) */ |