aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf518
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/blackfin/mach-bf518
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/blackfin/mach-bf518')
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c51
1 files changed, 51 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,