Commit 4ffd9f9f authored by Bahadir Balban's avatar Bahadir Balban Committed by Catalin Marinas

Add RealView/EB support for the LAN9118 Ethernet chip

RealView/EB revD platform comes with the SMSC LAN9118 Ethernet
chip. This patch allows either the smc91x or the smc911x drivers to be
used with the RealView/EB platform.
Signed-off-by: default avatarBahadir Balban <bahadir.balban@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent a7f3cd04
...@@ -141,6 +141,26 @@ struct platform_device realview_smc91x_device = { ...@@ -141,6 +141,26 @@ struct platform_device realview_smc91x_device = {
.resource = realview_smc91x_resources, .resource = realview_smc91x_resources,
}; };
static struct resource realview_smsc911x_resources[] = {
[0] = {
.start = REALVIEW_ETH_BASE,
.end = REALVIEW_ETH_BASE + SZ_64K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_ETH,
.end = IRQ_ETH,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device realview_smsc911x_device = {
.name = "smsc911x",
.id = 0,
.num_resources = ARRAY_SIZE(realview_smsc911x_resources),
.resource = realview_smsc911x_resources,
};
static struct resource realview_i2c_resource = { static struct resource realview_i2c_resource = {
.start = REALVIEW_I2C_BASE, .start = REALVIEW_I2C_BASE,
.end = REALVIEW_I2C_BASE + SZ_4K - 1, .end = REALVIEW_I2C_BASE + SZ_4K - 1,
......
...@@ -108,6 +108,7 @@ static struct amba_device name##_device = { \ ...@@ -108,6 +108,7 @@ static struct amba_device name##_device = { \
extern struct platform_device realview_flash_device; extern struct platform_device realview_flash_device;
extern struct platform_device realview_smc91x_device; extern struct platform_device realview_smc91x_device;
extern struct platform_device realview_smsc911x_device;
extern struct platform_device realview_i2c_device; extern struct platform_device realview_i2c_device;
extern struct mmc_platform_data realview_mmc0_plat_data; extern struct mmc_platform_data realview_mmc0_plat_data;
extern struct mmc_platform_data realview_mmc1_plat_data; extern struct mmc_platform_data realview_mmc1_plat_data;
......
...@@ -185,6 +185,7 @@ static void __init realview_eb_init(void) ...@@ -185,6 +185,7 @@ static void __init realview_eb_init(void)
platform_device_register(&realview_flash_device); platform_device_register(&realview_flash_device);
platform_device_register(&realview_smc91x_device); platform_device_register(&realview_smc91x_device);
platform_device_register(&realview_smsc911x_device);
platform_device_register(&realview_i2c_device); platform_device_register(&realview_i2c_device);
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment