Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65319628 authored by Graf Yang's avatar Graf Yang Committed by Bryan Wu
Browse files

Blackfin arch: add platform device bfin_mii-bus and KSZ8893M switch driver...


Blackfin arch: add platform device bfin_mii-bus and KSZ8893M switch driver platform resources to board files

Signed-off-by: default avatarGraf Yang <graf.yang@analog.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 583947c6
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@
#include <asm/dpmc.h>
#include <asm/bfin_sdh.h>
#include <linux/spi/ad7877.h>
#include <net/dsa.h>

/*
 * Name the Board for the /proc/cpuinfo
@@ -104,8 +105,31 @@ static struct platform_device rtc_device = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
static struct platform_device bfin_mii_bus = {
	.name = "bfin_mii_bus",
};

static struct platform_device bfin_mac_device = {
	.name = "bfin_mac",
	.dev.platform_data = &bfin_mii_bus,
};
#endif

#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
static struct dsa_platform_data ksz8893m_switch_data = {
	.mii_bus = &bfin_mii_bus.dev,
	.netdev = &bfin_mac_device.dev,
	.port_names[0]	= NULL,
	.port_names[1]	= "eth%d",
	.port_names[2]	= "eth%d",
	.port_names[3]	= "cpu",
};

static struct platform_device ksz8893m_switch_device = {
	.name		= "dsa",
	.id		= 0,
	.num_resources	= 0,
	.dev.platform_data = &ksz8893m_switch_data,
};
#endif

@@ -147,6 +171,15 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
};
#endif

#if defined(CONFIG_NET_DSA_KSZ8893M) \
	|| defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
/* SPI SWITCH CHIP */
static struct bfin5xx_spi_chip spi_switch_info = {
	.enable_dma = 0,
	.bits_per_word = 8,
};
#endif

#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
static struct bfin5xx_spi_chip spi_mmc_chip_info = {
	.enable_dma = 1,
@@ -226,6 +259,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
	},
#endif

#if defined(CONFIG_NET_DSA_KSZ8893M) \
	|| defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
	{
		.modalias = "ksz8893m",
		.max_speed_hz = 5000000,
		.bus_num = 0,
		.chip_select = 1,
		.platform_data = NULL,
		.controller_data = &spi_switch_info,
		.mode = SPI_MODE_3,
	},
#endif

#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
	{
		.modalias = "spi_mmc_dummy",
@@ -582,9 +628,14 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
	&bfin_mii_bus,
	&bfin_mac_device,
#endif

#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
	&ksz8893m_switch_device,
#endif

#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
	&bfin_spi0_device,
	&bfin_spi1_device,
+6 −0
Original line number Diff line number Diff line
@@ -403,8 +403,13 @@ static struct platform_device isp1362_hcd_device = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
static struct platform_device bfin_mii_bus = {
	.name = "bfin_mii_bus",
};

static struct platform_device bfin_mac_device = {
	.name = "bfin_mac",
	.dev.platform_data = &bfin_mii_bus,
};
#endif

@@ -918,6 +923,7 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
	&bfin_mii_bus,
	&bfin_mac_device,
#endif

+6 −0
Original line number Diff line number Diff line
@@ -208,8 +208,13 @@ static struct platform_device rtc_device = {


#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
static struct platform_device bfin_mii_bus = {
	.name = "bfin_mii_bus",
};

static struct platform_device bfin_mac_device = {
	.name = "bfin_mac",
	.dev.platform_data = &bfin_mii_bus,
};
#endif

@@ -718,6 +723,7 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
	&bfin_mii_bus,
	&bfin_mac_device,
#endif

+6 −0
Original line number Diff line number Diff line
@@ -425,8 +425,13 @@ static struct platform_device isp1362_hcd_device = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
static struct platform_device bfin_mii_bus = {
	.name = "bfin_mii_bus",
};

static struct platform_device bfin_mac_device = {
	.name = "bfin_mac",
	.dev.platform_data = &bfin_mii_bus,
};
#endif

@@ -986,6 +991,7 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
	&bfin_mii_bus,
	&bfin_mac_device,
#endif

+6 −0
Original line number Diff line number Diff line
@@ -479,8 +479,13 @@ static struct platform_device bfin_sport1_uart_device = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
static struct platform_device bfin_mii_bus = {
	.name = "bfin_mii_bus",
};

static struct platform_device bfin_mac_device = {
	.name = "bfin_mac",
	.dev.platform_data = &bfin_mii_bus,
};
#endif

@@ -591,6 +596,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
#endif

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
	&bfin_mii_bus,
	&bfin_mac_device,
#endif

Loading