[ARM] 3870/1: AT91: Start removing static memory mappings
authorAndrew Victor <andrew@sanpeople.com>
Thu, 28 Sep 2006 15:26:47 +0000 (16:26 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 28 Sep 2006 17:11:22 +0000 (18:11 +0100)
This patch removes the static memory mapping for the currently-unused
peripherals [Synchronous Serial, Timer/Counter unit], and for those
drivers that already ioremap() their registers [UART].

Also, the Ethernet driver now uses the platform_device resources but
doesn't yet use ioremap() so we need to pass it the virtual address
instead of the physical address.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-at91rm9200/at91rm9200.c
arch/arm/mach-at91rm9200/devices.c
include/asm-arm/arch-at91rm9200/hardware.h

index c32d0c996f90cdb7068d9d8ae663007f1630d7c7..dcf6136fedf9deb51f916a190634e0c333d416c1 100644 (file)
@@ -30,41 +30,6 @@ static struct map_desc at91rm9200_io_desc[] __initdata = {
                .pfn            = __phys_to_pfn(AT91RM9200_BASE_SPI),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_SSC2,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_SSC2),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_SSC1,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_SSC1),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_SSC0,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_SSC0),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_US3,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_US3),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_US2,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_US2),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_US1,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_US1),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_US0,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_US0),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
        }, {
                .virtual        = AT91_VA_BASE_EMAC,
                .pfn            = __phys_to_pfn(AT91RM9200_BASE_EMAC),
@@ -85,16 +50,6 @@ static struct map_desc at91rm9200_io_desc[] __initdata = {
                .pfn            = __phys_to_pfn(AT91RM9200_BASE_UDP),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_TCB1,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_TCB1),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = AT91_VA_BASE_TCB0,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_TCB0),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
        }, {
                .virtual        = AT91_SRAM_VIRT_BASE,
                .pfn            = __phys_to_pfn(AT91RM9200_SRAM_BASE),
index db7c684cdb63d417dabfd1bcbc9a5ed82fc3a2c4..01525530c287df93f1686a0985c351da25c495ab 100644 (file)
@@ -131,8 +131,8 @@ static struct at91_eth_data eth_data;
 
 static struct resource at91_eth_resources[] = {
        [0] = {
-               .start  = AT91RM9200_BASE_EMAC,
-               .end    = AT91RM9200_BASE_EMAC + SZ_16K - 1,
+               .start  = AT91_VA_BASE_EMAC,
+               .end    = AT91_VA_BASE_EMAC + SZ_16K - 1,
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
index 878e65f369bfc1b512571c5c2ec21fd16e1191ad..6551b4d1ff7b21ca6e78e9c53a563fc3e50e114a 100644 (file)
  */
 #define AT91_VA_BASE_SYS       AT91_IO_P2V(AT91_BASE_SYS)
 #define AT91_VA_BASE_SPI       AT91_IO_P2V(AT91RM9200_BASE_SPI)
-#define AT91_VA_BASE_SSC2      AT91_IO_P2V(AT91RM9200_BASE_SSC2)
-#define AT91_VA_BASE_SSC1      AT91_IO_P2V(AT91RM9200_BASE_SSC1)
-#define AT91_VA_BASE_SSC0      AT91_IO_P2V(AT91RM9200_BASE_SSC0)
-#define AT91_VA_BASE_US3       AT91_IO_P2V(AT91RM9200_BASE_US3)
-#define AT91_VA_BASE_US2       AT91_IO_P2V(AT91RM9200_BASE_US2)
-#define AT91_VA_BASE_US1       AT91_IO_P2V(AT91RM9200_BASE_US1)
-#define AT91_VA_BASE_US0       AT91_IO_P2V(AT91RM9200_BASE_US0)
 #define AT91_VA_BASE_EMAC      AT91_IO_P2V(AT91RM9200_BASE_EMAC)
 #define AT91_VA_BASE_TWI       AT91_IO_P2V(AT91RM9200_BASE_TWI)
 #define AT91_VA_BASE_MCI       AT91_IO_P2V(AT91RM9200_BASE_MCI)
 #define AT91_VA_BASE_UDP       AT91_IO_P2V(AT91RM9200_BASE_UDP)
-#define AT91_VA_BASE_TCB1      AT91_IO_P2V(AT91RM9200_BASE_TCB1)
-#define AT91_VA_BASE_TCB0      AT91_IO_P2V(AT91RM9200_BASE_TCB0)
 
  /* Internal SRAM is mapped below the IO devices */
 #define AT91_SRAM_VIRT_BASE    (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE)