aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-02-04 03:49:45 -0500
committerBryan Wu <cooloney@kernel.org>2009-02-04 03:49:45 -0500
commit65319628db2c7a630daadfeec4d371aaca788482 (patch)
treeb783043647e0c3f097ad0d1cbafebc16b2ef83c5 /arch
parent583947c6bc397854a3a57d45539654c9d8223966 (diff)
Blackfin arch: add platform device bfin_mii-bus and KSZ8893M switch driver platform resources to board files
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c51
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c6
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c6
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/generic_board.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c6
10 files changed, 105 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b23108bcbf59..0e175342112e 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -46,6 +46,7 @@
46#include <asm/dpmc.h> 46#include <asm/dpmc.h>
47#include <asm/bfin_sdh.h> 47#include <asm/bfin_sdh.h>
48#include <linux/spi/ad7877.h> 48#include <linux/spi/ad7877.h>
49#include <net/dsa.h>
49 50
50/* 51/*
51 * Name the Board for the /proc/cpuinfo 52 * Name the Board for the /proc/cpuinfo
@@ -104,8 +105,31 @@ static struct platform_device rtc_device = {
104#endif 105#endif
105 106
106#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 107#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
108static struct platform_device bfin_mii_bus = {
109 .name = "bfin_mii_bus",
110};
111
107static struct platform_device bfin_mac_device = { 112static struct platform_device bfin_mac_device = {
108 .name = "bfin_mac", 113 .name = "bfin_mac",
114 .dev.platform_data = &bfin_mii_bus,
115};
116#endif
117
118#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
119static struct dsa_platform_data ksz8893m_switch_data = {
120 .mii_bus = &bfin_mii_bus.dev,
121 .netdev = &bfin_mac_device.dev,
122 .port_names[0] = NULL,
123 .port_names[1] = "eth%d",
124 .port_names[2] = "eth%d",
125 .port_names[3] = "cpu",
126};
127
128static struct platform_device ksz8893m_switch_device = {
129 .name = "dsa",
130 .id = 0,
131 .num_resources = 0,
132 .dev.platform_data = &ksz8893m_switch_data,
109}; 133};
110#endif 134#endif
111 135
@@ -147,6 +171,15 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
147}; 171};
148#endif 172#endif
149 173
174#if defined(CONFIG_NET_DSA_KSZ8893M) \
175 || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
176/* SPI SWITCH CHIP */
177static struct bfin5xx_spi_chip spi_switch_info = {
178 .enable_dma = 0,
179 .bits_per_word = 8,
180};
181#endif
182
150#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) 183#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
151static struct bfin5xx_spi_chip spi_mmc_chip_info = { 184static struct bfin5xx_spi_chip spi_mmc_chip_info = {
152 .enable_dma = 1, 185 .enable_dma = 1,
@@ -226,6 +259,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
226 }, 259 },
227#endif 260#endif
228 261
262#if defined(CONFIG_NET_DSA_KSZ8893M) \
263 || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
264 {
265 .modalias = "ksz8893m",
266 .max_speed_hz = 5000000,
267 .bus_num = 0,
268 .chip_select = 1,
269 .platform_data = NULL,
270 .controller_data = &spi_switch_info,
271 .mode = SPI_MODE_3,
272 },
273#endif
274
229#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) 275#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
230 { 276 {
231 .modalias = "spi_mmc_dummy", 277 .modalias = "spi_mmc_dummy",
@@ -582,9 +628,14 @@ static struct platform_device *stamp_devices[] __initdata = {
582#endif 628#endif
583 629
584#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 630#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
631 &bfin_mii_bus,
585 &bfin_mac_device, 632 &bfin_mac_device,
586#endif 633#endif
587 634
635#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
636 &ksz8893m_switch_device,
637#endif
638
588#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 639#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
589 &bfin_spi0_device, 640 &bfin_spi0_device,
590 &bfin_spi1_device, 641 &bfin_spi1_device,
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 98ab8bc28304..856c097b5317 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -403,8 +403,13 @@ static struct platform_device isp1362_hcd_device = {
403#endif 403#endif
404 404
405#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 405#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
406static struct platform_device bfin_mii_bus = {
407 .name = "bfin_mii_bus",
408};
409
406static struct platform_device bfin_mac_device = { 410static struct platform_device bfin_mac_device = {
407 .name = "bfin_mac", 411 .name = "bfin_mac",
412 .dev.platform_data = &bfin_mii_bus,
408}; 413};
409#endif 414#endif
410 415
@@ -918,6 +923,7 @@ static struct platform_device *stamp_devices[] __initdata = {
918#endif 923#endif
919 924
920#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 925#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
926 &bfin_mii_bus,
921 &bfin_mac_device, 927 &bfin_mac_device,
922#endif 928#endif
923 929
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index d0f29870f1a4..83606fcdde27 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -208,8 +208,13 @@ static struct platform_device rtc_device = {
208 208
209 209
210#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 210#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
211static struct platform_device bfin_mii_bus = {
212 .name = "bfin_mii_bus",
213};
214
211static struct platform_device bfin_mac_device = { 215static struct platform_device bfin_mac_device = {
212 .name = "bfin_mac", 216 .name = "bfin_mac",
217 .dev.platform_data = &bfin_mii_bus,
213}; 218};
214#endif 219#endif
215 220
@@ -718,6 +723,7 @@ static struct platform_device *stamp_devices[] __initdata = {
718#endif 723#endif
719 724
720#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 725#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
726 &bfin_mii_bus,
721 &bfin_mac_device, 727 &bfin_mac_device,
722#endif 728#endif
723 729
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 1f7a249d6926..d0864111ef59 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -425,8 +425,13 @@ static struct platform_device isp1362_hcd_device = {
425#endif 425#endif
426 426
427#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 427#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
428static struct platform_device bfin_mii_bus = {
429 .name = "bfin_mii_bus",
430};
431
428static struct platform_device bfin_mac_device = { 432static struct platform_device bfin_mac_device = {
429 .name = "bfin_mac", 433 .name = "bfin_mac",
434 .dev.platform_data = &bfin_mii_bus,
430}; 435};
431#endif 436#endif
432 437
@@ -986,6 +991,7 @@ static struct platform_device *stamp_devices[] __initdata = {
986#endif 991#endif
987 992
988#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 993#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
994 &bfin_mii_bus,
989 &bfin_mac_device, 995 &bfin_mac_device,
990#endif 996#endif
991 997
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index 6ac8e4d5bd38..9cd8fb2a30d3 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -479,8 +479,13 @@ static struct platform_device bfin_sport1_uart_device = {
479#endif 479#endif
480 480
481#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 481#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
482static struct platform_device bfin_mii_bus = {
483 .name = "bfin_mii_bus",
484};
485
482static struct platform_device bfin_mac_device = { 486static struct platform_device bfin_mac_device = {
483 .name = "bfin_mac", 487 .name = "bfin_mac",
488 .dev.platform_data = &bfin_mii_bus,
484}; 489};
485#endif 490#endif
486 491
@@ -591,6 +596,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
591#endif 596#endif
592 597
593#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 598#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
599 &bfin_mii_bus,
594 &bfin_mac_device, 600 &bfin_mac_device,
595#endif 601#endif
596 602
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index fb0368ec2aff..da710fdc4569 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -262,8 +262,13 @@ static struct platform_device isp1362_hcd_device = {
262#endif 262#endif
263 263
264#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 264#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
265static struct platform_device bfin_mii_bus = {
266 .name = "bfin_mii_bus",
267};
268
265static struct platform_device bfin_mac_device = { 269static struct platform_device bfin_mac_device = {
266 .name = "bfin_mac", 270 .name = "bfin_mac",
271 .dev.platform_data = &bfin_mii_bus,
267}; 272};
268#endif 273#endif
269 274
@@ -662,6 +667,7 @@ static struct platform_device *stamp_devices[] __initdata = {
662#endif 667#endif
663 668
664#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 669#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
670 &bfin_mii_bus,
665 &bfin_mac_device, 671 &bfin_mac_device,
666#endif 672#endif
667 673
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index 8f36d260aee2..db7d3a385e4b 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -61,8 +61,13 @@ static struct platform_device rtc_device = {
61#endif 61#endif
62 62
63#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 63#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
64static struct platform_device bfin_mii_bus = {
65 .name = "bfin_mii_bus",
66};
67
64static struct platform_device bfin_mac_device = { 68static struct platform_device bfin_mac_device = {
65 .name = "bfin_mac", 69 .name = "bfin_mac",
70 .dev.platform_data = &bfin_mii_bus,
66}; 71};
67#endif 72#endif
68 73
@@ -324,6 +329,7 @@ static struct platform_device *minotaur_devices[] __initdata = {
324#endif 329#endif
325 330
326#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 331#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
332 &bfin_mii_bus,
327 &bfin_mac_device, 333 &bfin_mac_device,
328#endif 334#endif
329 335
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 8835c58cfaec..590eb3a139b7 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -198,8 +198,13 @@ static struct platform_device isp1362_hcd_device = {
198#endif 198#endif
199 199
200#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 200#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
201static struct platform_device bfin_mii_bus = {
202 .name = "bfin_mii_bus",
203};
204
201static struct platform_device bfin_mac_device = { 205static struct platform_device bfin_mac_device = {
202 .name = "bfin_mac", 206 .name = "bfin_mac",
207 .dev.platform_data = &bfin_mii_bus,
203}; 208};
204#endif 209#endif
205 210
@@ -529,6 +534,7 @@ static struct platform_device *stamp_devices[] __initdata = {
529#endif 534#endif
530 535
531#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 536#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
537 &bfin_mii_bus,
532 &bfin_mac_device, 538 &bfin_mac_device,
533#endif 539#endif
534 540
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 2300ed4ec601..cd04c5e44878 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -321,8 +321,13 @@ static struct platform_device isp1362_hcd_device = {
321#endif 321#endif
322 322
323#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 323#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
324static struct platform_device bfin_mii_bus = {
325 .name = "bfin_mii_bus",
326};
327
324static struct platform_device bfin_mac_device = { 328static struct platform_device bfin_mac_device = {
325 .name = "bfin_mac", 329 .name = "bfin_mac",
330 .dev.platform_data = &bfin_mii_bus,
326}; 331};
327#endif 332#endif
328 333
@@ -1215,6 +1220,7 @@ static struct platform_device *stamp_devices[] __initdata = {
1215#endif 1220#endif
1216 1221
1217#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 1222#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
1223 &bfin_mii_bus,
1218 &bfin_mac_device, 1224 &bfin_mac_device,
1219#endif 1225#endif
1220 1226
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 2e60bbad73ee..3f4f203a06ec 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -481,8 +481,13 @@ static struct platform_device bfin_sport1_uart_device = {
481#endif 481#endif
482 482
483#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 483#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
484static struct platform_device bfin_mii_bus = {
485 .name = "bfin_mii_bus",
486};
487
484static struct platform_device bfin_mac_device = { 488static struct platform_device bfin_mac_device = {
485 .name = "bfin_mac", 489 .name = "bfin_mac",
490 .dev.platform_data = &bfin_mii_bus,
486}; 491};
487#endif 492#endif
488 493
@@ -593,6 +598,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
593#endif 598#endif
594 599
595#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 600#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
601 &bfin_mii_bus,
596 &bfin_mac_device, 602 &bfin_mac_device,
597#endif 603#endif
598 604