[ARM] 3960/1: AT91: Final SAM9 intergration patches.

This patch includes a number of small changes for integrating the
AT91SAM9261 and AT91SAM0260 support.

* Can only select support for one AT91 processor at a time.
* Remove most of the remaining static memory mapping for the
AT91RM9200.
* Reserve 1Mb of memory below the IO for mapping the internal SRAM
and any custom board-specific devices (ie, FPGA).
* The SAM9260 has more serial ports, so increase the maximum to 7.
* Define the standard chipselect addresses, and define other
addresses relative to those.
* CLOCK_TICK_RATE is different on the SAM926x's.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Andrew Victor and committed by
Russell King
05043d08 d481f864

+29 -40
+4 -2
arch/arm/mach-at91rm9200/Kconfig
··· 2 2 3 3 menu "Atmel AT91 System-on-Chip" 4 4 5 - comment "Atmel AT91 Processors" 5 + choice 6 + prompt "Atmel AT91 Processor" 6 7 7 8 config ARCH_AT91RM9200 8 9 bool "AT91RM9200" ··· 13 12 14 13 config ARCH_AT91SAM9261 15 14 bool "AT91SAM9261" 15 + 16 + endchoice 16 17 17 18 # ---------------------------------------------------------- 18 19 ··· 35 32 help 36 33 Select this if you are using Atmel's AT91RM9200-DK Development board. 37 34 (Discontinued) 38 - 39 35 40 36 config MACH_AT91RM9200EK 41 37 bool "Atmel AT91RM9200-EK Evaluation Kit"
+1 -1
arch/arm/mach-at91rm9200/Makefile
··· 10 10 obj-$(CONFIG_PM) += pm.o 11 11 12 12 # CPU-specific support 13 - obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.c 13 + obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o 14 14 obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o 15 15 obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o 16 16
+1 -21
arch/arm/mach-at91rm9200/at91rm9200.c
··· 28 28 .length = SZ_4K, 29 29 .type = MT_DEVICE, 30 30 }, { 31 - .virtual = AT91_VA_BASE_SPI, 32 - .pfn = __phys_to_pfn(AT91RM9200_BASE_SPI), 33 - .length = SZ_16K, 34 - .type = MT_DEVICE, 35 - }, { 36 31 .virtual = AT91_VA_BASE_EMAC, 37 32 .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC), 38 33 .length = SZ_16K, 39 34 .type = MT_DEVICE, 40 35 }, { 41 - .virtual = AT91_VA_BASE_TWI, 42 - .pfn = __phys_to_pfn(AT91RM9200_BASE_TWI), 43 - .length = SZ_16K, 44 - .type = MT_DEVICE, 45 - }, { 46 - .virtual = AT91_VA_BASE_MCI, 47 - .pfn = __phys_to_pfn(AT91RM9200_BASE_MCI), 48 - .length = SZ_16K, 49 - .type = MT_DEVICE, 50 - }, { 51 - .virtual = AT91_VA_BASE_UDP, 52 - .pfn = __phys_to_pfn(AT91RM9200_BASE_UDP), 53 - .length = SZ_16K, 54 - .type = MT_DEVICE, 55 - }, { 56 - .virtual = AT91_SRAM_VIRT_BASE, 36 + .virtual = AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE, 57 37 .pfn = __phys_to_pfn(AT91RM9200_SRAM_BASE), 58 38 .length = AT91RM9200_SRAM_SIZE, 59 39 .type = MT_DEVICE,
+13 -15
include/asm-arm/arch-at91rm9200/hardware.h
··· 42 42 * Virtual to Physical Address mapping for IO devices. 43 43 */ 44 44 #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) 45 - #define AT91_VA_BASE_SPI AT91_IO_P2V(AT91RM9200_BASE_SPI) 46 45 #define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC) 47 - #define AT91_VA_BASE_TWI AT91_IO_P2V(AT91RM9200_BASE_TWI) 48 - #define AT91_VA_BASE_MCI AT91_IO_P2V(AT91RM9200_BASE_MCI) 49 - #define AT91_VA_BASE_UDP AT91_IO_P2V(AT91RM9200_BASE_UDP) 50 46 51 47 /* Internal SRAM is mapped below the IO devices */ 52 - #define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE) 48 + #define AT91_SRAM_MAX SZ_1M 49 + #define AT91_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_MAX) 53 50 54 51 /* Serial ports */ 55 - #define ATMEL_MAX_UART 5 /* 4 USART3's and one DBGU port */ 52 + #define ATMEL_MAX_UART 7 /* 6 USART3's and one DBGU port (SAM9260) */ 56 53 57 - /* FLASH */ 58 - #define AT91_FLASH_BASE 0x10000000 /* NCS0: Flash physical base address */ 54 + /* External Memory Map */ 55 + #define AT91_CHIPSELECT_0 0x10000000 56 + #define AT91_CHIPSELECT_1 0x20000000 57 + #define AT91_CHIPSELECT_2 0x30000000 58 + #define AT91_CHIPSELECT_3 0x40000000 59 + #define AT91_CHIPSELECT_4 0x50000000 60 + #define AT91_CHIPSELECT_5 0x60000000 61 + #define AT91_CHIPSELECT_6 0x70000000 62 + #define AT91_CHIPSELECT_7 0x80000000 59 63 60 64 /* SDRAM */ 61 - #define AT91_SDRAM_BASE 0x20000000 /* NCS1: SDRAM physical base address */ 62 - 63 - /* SmartMedia */ 64 - #define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */ 65 - 66 - /* Compact Flash */ 67 - #define AT91_CF_BASE 0x50000000 /* NCS4-NCS6: Compact Flash physical base address */ 65 + #define AT91_SDRAM_BASE AT91_CHIPSELECT_1 68 66 69 67 /* Clocks */ 70 68 #define AT91_SLOW_CLOCK 32768 /* slow clock */
+9
include/asm-arm/arch-at91rm9200/timex.h
··· 23 23 24 24 #include <asm/hardware.h> 25 25 26 + #if defined(CONFIG_ARCH_AT91RM9200) 27 + 26 28 #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) 29 + 30 + #elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9261) 31 + 32 + #define AT91SAM9_MASTER_CLOCK 99300000 33 + #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) 34 + 35 + #endif 27 36 28 37 #endif
+1 -1
include/asm-arm/arch-at91rm9200/vmalloc.h
··· 21 21 #ifndef __ASM_ARCH_VMALLOC_H 22 22 #define __ASM_ARCH_VMALLOC_H 23 23 24 - #define VMALLOC_END (AT91_SRAM_VIRT_BASE & PGDIR_MASK) 24 + #define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK) 25 25 26 26 #endif