提交 c5f0f83c 编写于 作者: A Andrew Victor 提交者: David S. Miller

AT91: Remove fixed mapping for AT91RM9200 ethernet

The AT91RM9200 Ethernet controller still has a fixed IO mapping.
So:
* Remove the fixed IO mapping and AT91_VA_BASE_EMAC definition.
* Pass the physical base-address via platform-resources to the driver.
* Convert at91_ether.c driver to perform an ioremap().
* Ethernet PHY detection needs to be performed during the driver
initialization process, it can no longer be done first.
Signed-off-by: NAndrew Victor <linux@maxim.org.za>
Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cb75a36c
...@@ -26,15 +26,6 @@ ...@@ -26,15 +26,6 @@
#include "clock.h" #include "clock.h"
#include "sam9_smc.h" #include "sam9_smc.h"
static struct map_desc at91rm9200_io_desc[] __initdata = {
{
.virtual = AT91_VA_BASE_EMAC,
.pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC),
.length = SZ_16K,
.type = MT_DEVICE,
},
};
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
* Clocks * Clocks
* -------------------------------------------------------------------- */ * -------------------------------------------------------------------- */
...@@ -315,7 +306,6 @@ static void __init at91rm9200_map_io(void) ...@@ -315,7 +306,6 @@ static void __init at91rm9200_map_io(void)
{ {
/* Map peripherals */ /* Map peripherals */
at91_init_sram(0, AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE); at91_init_sram(0, AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE);
iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
} }
static void __init at91rm9200_ioremap_registers(void) static void __init at91rm9200_ioremap_registers(void)
......
...@@ -140,8 +140,8 @@ static struct macb_platform_data eth_data; ...@@ -140,8 +140,8 @@ static struct macb_platform_data eth_data;
static struct resource eth_resources[] = { static struct resource eth_resources[] = {
[0] = { [0] = {
.start = AT91_VA_BASE_EMAC, .start = AT91RM9200_BASE_EMAC,
.end = AT91_VA_BASE_EMAC + SZ_16K - 1, .end = AT91RM9200_BASE_EMAC + SZ_16K - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
[1] = { [1] = {
......
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
* Virtual to Physical Address mapping for IO devices. * Virtual to Physical Address mapping for IO devices.
*/ */
#define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS)
#define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC)
/* Internal SRAM is mapped below the IO devices */ /* Internal SRAM is mapped below the IO devices */
#define AT91_SRAM_MAX SZ_1M #define AT91_SRAM_MAX SZ_1M
......
...@@ -88,6 +88,7 @@ struct at91_private ...@@ -88,6 +88,7 @@ struct at91_private
struct macb_platform_data board_data; /* board-specific struct macb_platform_data board_data; /* board-specific
* configuration (shared with * configuration (shared with
* macb for common data */ * macb for common data */
void __iomem *emac_base; /* base register address */
struct clk *ether_clk; /* clock */ struct clk *ether_clk; /* clock */
/* PHY */ /* PHY */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册