Hello

You are right! This part of the patch is not necessary and is ignored
if the AT91SAM9G20 is selected in the kernel configuration. I made
this  change  during a test with another kernel configuration. Sadly
this change was still present during the creation of the patch. The
attached patch does not contain this part any more.


On Thu, Jun 4, 2009 at 1:15 PM, Gilles Chanteperdrix
<gilles.chanteperd...@xenomai.org> wrote:
> martin mangard wrote:
>> Hello
>>
>> I made a patch in order to support the Atmel AT91SAM9G20 processor,
>> which has to be applied after the "adeos-ipipe-2.6.27-arm-*" patch.
>> Due to the similarities between the AT91SAM9260 and the AT91SAM9G20
>> processor, only a few changes were necessary. I booted the system on a
>> "AT91SAM9G20-EK" development
>> board and executed "latencytest" and "clocktest". Are there plans to
>> officially support this processor in the future?
>
> Well, now that you sent the patch, this should be included in the next
> adeos patch. However:
> - your mailer mangled the patch, so I can not apply it, please configure
> your mailer to avoid mangling the patch, or if that is not possible,
> send the patch as attachment;
> -  there is one change in your patch that I do not like:
>
>>  #ifdef CONFIG_ARCH_AT91SAM9260
>>  #define cpu_is_at91sam9xe()    (at91_arch_identify() == 
>> ARCH_FAMILY_AT91SAM9XE)
>> -#define cpu_is_at91sam9260()   ((at91_cpu_identify() ==
>> ARCH_ID_AT91SAM9260) || cpu_is_at91sam9xe())
>> +#define cpu_is_at91sam9260()   ((at91_cpu_identify() ==
>> ARCH_ID_AT91SAM9260) || cpu_is_at91sam9xe() ||
>> (at91_cpu_identify()==ARCH_ID_AT91SAM9G20)))
>
> You are touching mailine code here. It this patch is really needed by
> mainline, then post it to the linux arm kernel mailing list.
>
> --
>                                            Gilles.
>
diff -urp a/arch/arm/mach-at91/at91_ipipe_time.c b/arch/arm/mach-at91/at91_ipipe_time.c
--- a/arch/arm/mach-at91/at91_ipipe_time.c	2009-06-03 15:23:30.000000000 +0200
+++ b/arch/arm/mach-at91/at91_ipipe_time.c	2009-06-03 15:24:59.000000000 +0200
@@ -34,7 +34,7 @@
 #define AT91_ID_TC0 AT91RM9200_ID_TC0
 #define AT91_ID_TC1 AT91RM9200_ID_TC1
 #define AT91_ID_TC2 AT91RM9200_ID_TC2
-#elif defined(CONFIG_ARCH_AT91SAM9260)
+#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)
 #define AT91_ID_TC0 AT91SAM9260_ID_TC0
 #define AT91_ID_TC1 AT91SAM9260_ID_TC1
 #define AT91_ID_TC2 AT91SAM9260_ID_TC2
@@ -339,7 +339,7 @@ void __init at91_timer_init(void)
 	at91_sys_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS);
 	(void) at91_sys_read(AT91_ST_SR);	/* Clear any pending interrupts */	
 #elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9261) \
-	|| defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9RL)
+	|| defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9RL) || defined(CONFIG_ARCH_AT91SAM9G20) 
 	at91_sys_write(AT91_PIT_MR, 0);
 
 	/* Clear any pending interrupts */
@@ -399,7 +399,7 @@ void __init at91_timer_init(void)
 #ifdef CONFIG_ARCH_AT91RM9200
 struct sys_timer at91rm9200_timer = {
 #elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9261) \
-	|| defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9RL)
+	|| defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9RL)|| defined(CONFIG_ARCH_AT91SAM9RL) || defined(CONFIG_ARCH_AT91SAM9G20) 
 struct sys_timer at91sam926x_timer = {
 #elif defined(CONFIG_ARCH_AT91X40)
 struct sys_timer at91x40_timer = {
diff -urp a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
--- a/arch/arm/mach-at91/include/mach/hardware.h	2009-06-03 15:23:30.000000000 +0200
+++ b/arch/arm/mach-at91/include/mach/hardware.h	2009-06-03 15:24:59.000000000 +0200
@@ -64,7 +64,7 @@
 #ifdef CONFIG_IPIPE
 #if defined(CONFIG_ARCH_AT91RM9200)
 #define AT91_BASE_TCB0 AT91RM9200_BASE_TCB0
-#elif defined(CONFIG_ARCH_AT91SAM9260)
+#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20) 
 #define AT91_BASE_TCB0 AT91SAM9260_BASE_TCB0
 #elif defined(CONFIG_ARCH_AT91SAM9261)
 #define AT91_BASE_TCB0 AT91SAM9261_BASE_TCB0
diff -urp a/arch/arm/mach-at91/include/mach/irqs.h b/arch/arm/mach-at91/include/mach/irqs.h
--- a/arch/arm/mach-at91/include/mach/irqs.h	2009-06-03 15:23:30.000000000 +0200
+++ b/arch/arm/mach-at91/include/mach/irqs.h	2009-06-03 15:24:59.000000000 +0200
@@ -52,7 +52,7 @@ extern unsigned __ipipe_at91_gpio_banks;
 #define __ipipe_mach_irq_mux_p(irq)					\
 	((unsigned) (irq - AT91RM9200_ID_PIOA) < __ipipe_at91_gpio_banks)
 
-#elif defined(CONFIG_ARCH_AT91SAM9260)
+#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20) 
 #define __ipipe_mach_irq_mux_p(irq)					\
 	((unsigned) (irq - AT91SAM9260_ID_PIOA) < __ipipe_at91_gpio_banks)
 
diff -urp a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
--- a/arch/arm/mach-at91/Makefile	2009-06-03 15:23:30.000000000 +0200
+++ b/arch/arm/mach-at91/Makefile	2009-06-03 15:24:59.000000000 +0200
@@ -82,6 +82,7 @@ ifeq ($(CONFIG_IPIPE),y)
 obj-y := $(filter-out at91rm9200_time.o at91sam926x_time.o at91x40_time.o, $(obj-y))
 obj-$(CONFIG_ARCH_AT91RM9200)   += at91_ipipe_time.o
 obj-$(CONFIG_ARCH_AT91SAM9260)  += at91_ipipe_time.o
+obj-$(CONFIG_ARCH_AT91SAM9G20)  += at91_ipipe_time.o
 obj-$(CONFIG_ARCH_AT91SAM9261)  += at91_ipipe_time.o
 obj-$(CONFIG_ARCH_AT91SAM9263)	+= at91_ipipe_time.o
 obj-$(CONFIG_ARCH_AT91SAM9RL)	+= at91_ipipe_time.o
_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to