New patch for AT91SAM9261 adeos support for 2.6.19 kernel
Hi,
this is the new version of patch support for AT91SAM9261. To use it:
- take a vanilla linux
- apply the I-pipe patch
- apply the AT91 patch, then solve the three rejects by hand
- finaly apply this patch
Comment from Gilles are integrated.
As I have no better idea we keep all the ifdef around AT91_VA_BASE_TCB0 ( in include/asm-arm/arch-at91rm9200/hardware.h) and around __ipipe_mach_irq_mux_p ( in include/asm-arm/arch-at91rm9200/irqs.h )
Latency under load are running on AT91SAM9261-EK board, we will send the histogramm later this afternoon.
Signature · 6 lines
Gregory CLEMENT Adeneo 2, chemin du Ruisseau - BP21 69136 Ecully Cedex France Tel : +33-4 72 18 08 40
arch/arm/mach-at91rm9200/at91sam9261.c +44 -0
@@ -27,6 +27,13 @@ static struct map_desc at91sam9261_io_de .length = SZ_16K, .type = MT_DEVICE, }, { +#ifdef CONFIG_IPIPE + .virtual = AT91_VA_BASE_TCB0, + .pfn = __phys_to_pfn(AT91SAM9261_BASE_TCB0), + .length = SZ_16K, + .type = MT_DEVICE, + }, { +#endif /* CONFIG_IPIPE */ .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE, .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE), .length = AT91SAM9261_SRAM_SIZE,
@@ -242,6 +249,7 @@ void __init at91sam9261_initialize(unsig* The default interrupt priority levels (0 = lowest, 7 = highest). */ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS ]__initdata = { +#ifndef CONFIG_IPIPE7 ,/* Advanced Interrupt Controller */ 7 ,/* System Peripherals */ 0, /* Parallel IO Controller A */
@@ -274,6 +282,42 @@ static unsigned int at91sam9261_default_0 ,/* Advanced Interrupt Controller */ 0 ,/* Advanced Interrupt Controller */ 0 ,/* Advanced Interrupt Controller */ +#else /* CONFIG_IPIPE */ +/* Give the highest priority to TC, since they are used as timer interrupt by +I-pipe. */ +7 ,/* Advanced Interrupt Controller */ +7 ,/* System Peripherals */ +0 ,/* Parallel IO Controller A */ +0 ,/* Parallel IO Controller B */ +0 ,/* Parallel IO Controller C */ +0 , +6 ,/* USART 0 */ +6 ,/* USART 1 */ +6 ,/* USART 2 */ +0 ,/* Multimedia Card Interface */ +4 ,/* USB Device Port */ +0 ,/* Two-Wire Interface */ +6 ,/* Serial Peripheral Interface 0 */ +6 ,/* Serial Peripheral Interface 1 */ +5 ,/* Serial Synchronous Controller 0 */ +5 ,/* Serial Synchronous Controller 1 */ +5 ,/* Serial Synchronous Controller 2 */ +7 ,/* Timer Counter 0 */ +7 ,/* Timer Counter 1 */ +7 ,/* Timer Counter 2 */ +3 ,/* USB Host port */ +3 ,/* LCD Controller */ +0 , +0 , +0 , +0 , +0 , +0 , +0 , +0 ,/* Advanced Interrupt Controller */ +0 ,/* Advanced Interrupt Controller */ + 0, /* Advanced Interrupt Controller */ +#endif /*CONFIG_IPIPE */ };void __init at91sam9261_init_interrupts (unsigned int priority[NR_AIC_IRQS ])
arch/arm/mach-at91rm9200/at91sam926x_time.c +265 -0
278 lines not on this page · raw message
arch/arm/mach-at91rm9200/Kconfig +32 -18
62 lines not on this page · raw message
Seulement dans linux-2.6.19.patched/include/asm-arm: arch
include/asm-arm/arch-at91rm9200/hardware.h +10 -1
@@ -43,8 +43,17 @@*/ #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS)#define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC) +#ifdef CONFIG_IPIPE -#define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91RM9200_BASE_TCB0) +#if defined(CONFIG_ARCH_AT91RM9200 ) +#define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91RM9200_BASE_TCB0) +#elif defined(CONFIG_ARCH_AT91SAM9260 ) +#define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91SAM9260_BASE_TCB0) +#elif defined(CONFIG_ARCH_AT91SAM9261 ) +#define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91SAM9261_BASE_TCB0) +#else +#error "Unsupported AT91 processor" +#endif #endif /* CONFIG_IPIPE */ /* Internal SRAM is mapped below the IO devices */
include/asm-arm/arch-at91rm9200/irqs.h +12 -1
@@ -44,8 +44,19 @@#if defined(CONFIG_IPIPE ) && !defined(__ASSEMBLY__)extern unsigned __ipipe_at91_gpio_banks; -#define __ipipe_mach_irq_mux_p (irq) \ +#if defined(CONFIG_ARCH_AT91RM9200 ) +#define __ipipe_mach_irq_mux_p (irq) \ ((unsigned) (irq - AT91RM9200_ID_PIOA) < __ipipe_at91_gpio_banks) +#elif defined(CONFIG_ARCH_AT91SAM9260 ) +#define __ipipe_mach_irq_mux_p (irq) \ + ((unsigned) (irq - AT91SAM9260_ID_PIOA) < __ipipe_at91_gpio_banks) +#elif defined(CONFIG_ARCH_AT91SAM9261 ) +#define __ipipe_mach_irq_mux_p (irq) \ + ((unsigned) (irq - AT91SAM9261_ID_PIOA) < __ipipe_at91_gpio_banks) +#else +#error "Unsupported AT91 processor" +#endif +#endif /* CONFIG_IPIPE && !__ASSEMBLY__ */
include/asm-arm/arch-at91rm9200/timex.h +9 -5
@@ -23,19 +23,23 @@#include <asm/hardware.h> +#ifndef CONFIG_IPIPE +#if defined(CONFIG_ARCH_AT91RM9200 ) -#ifndef CONFIG_IPIPE #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) -#else /* !CONFIG_IPIPE */ -#define CLOCK_TICK_RATE (CONFIG_IPIPE_AT91_MCK / 32) -#endif /* !CONFIG_IPIPE */ #elif defined(CONFIG_ARCH_AT91SAM9260 ) || defined(CONFIG_ARCH_AT91SAM9261 )#define AT91SAM9_MASTER_CLOCK 99300000#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) -#endif +#endif /* arch specific */ + +#else /* !CONFIG_IPIPE */ + +#define CLOCK_TICK_RATE (CONFIG_IPIPE_AT91_MCK / 32) + +#endif /* !CONFIG_IPIPE */ #endif