aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAndrew Victor <avictor.za@gmail.com>2012-04-25 20:30:42 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-28 21:48:37 -0400
commitc5f0f83c3be4c965c40c78d52000db30c0ceab5d (patch)
tree0e3dbeef02ae0b78325ca1da997ee3507255110e /arch/arm
parentcb75a36c8a1ab68e2dbfbe172f12c792b0c6dba8 (diff)
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: Andrew Victor <linux@maxim.org.za> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-at91/at91rm9200.c10
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c4
-rw-r--r--arch/arm/mach-at91/include/mach/hardware.h1
3 files changed, 2 insertions, 13 deletions
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 364c19357e60..89106792d067 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -26,15 +26,6 @@
26#include "clock.h" 26#include "clock.h"
27#include "sam9_smc.h" 27#include "sam9_smc.h"
28 28
29static struct map_desc at91rm9200_io_desc[] __initdata = {
30 {
31 .virtual = AT91_VA_BASE_EMAC,
32 .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC),
33 .length = SZ_16K,
34 .type = MT_DEVICE,
35 },
36};
37
38/* -------------------------------------------------------------------- 29/* --------------------------------------------------------------------
39 * Clocks 30 * Clocks
40 * -------------------------------------------------------------------- */ 31 * -------------------------------------------------------------------- */
@@ -315,7 +306,6 @@ static void __init at91rm9200_map_io(void)
315{ 306{
316 /* Map peripherals */ 307 /* Map peripherals */
317 at91_init_sram(0, AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE); 308 at91_init_sram(0, AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE);
318 iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
319} 309}
320 310
321static void __init at91rm9200_ioremap_registers(void) 311static void __init at91rm9200_ioremap_registers(void)
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 05774e5b1cba..60c472861e5e 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -140,8 +140,8 @@ static struct macb_platform_data eth_data;
140 140
141static struct resource eth_resources[] = { 141static struct resource eth_resources[] = {
142 [0] = { 142 [0] = {
143 .start = AT91_VA_BASE_EMAC, 143 .start = AT91RM9200_BASE_EMAC,
144 .end = AT91_VA_BASE_EMAC + SZ_16K - 1, 144 .end = AT91RM9200_BASE_EMAC + SZ_16K - 1,
145 .flags = IORESOURCE_MEM, 145 .flags = IORESOURCE_MEM,
146 }, 146 },
147 [1] = { 147 [1] = {
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
index e9e29a6c3868..01db372be8e5 100644
--- a/arch/arm/mach-at91/include/mach/hardware.h
+++ b/arch/arm/mach-at91/include/mach/hardware.h
@@ -94,7 +94,6 @@
94 * Virtual to Physical Address mapping for IO devices. 94 * Virtual to Physical Address mapping for IO devices.
95 */ 95 */
96#define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) 96#define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS)
97#define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC)
98 97
99 /* Internal SRAM is mapped below the IO devices */ 98 /* Internal SRAM is mapped below the IO devices */
100#define AT91_SRAM_MAX SZ_1M 99#define AT91_SRAM_MAX SZ_1M