Skip to contentSkip to conversation

ARMNOMMU - platform patch for atmel

PATCH In review Hyok S. Choi 2 participants 3 messages May 7, 2005 – May 8, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 7/17 ARMNOMMU - platform patch for atmel

nommu/mpu patch set against 2.6.12-rc3-mm3 [7/17]

- platform patch for atmel

 arch/arm/mach-atmel/Kconfig              |   61 +++++++
 arch/arm/mach-atmel/Makefile             |    7
 arch/arm/mach-atmel/Makefile.boot        |    2
 arch/arm/mach-atmel/arch.c               |   56 ++++++
 arch/arm/mach-atmel/head.S               |   83 ++++++++++
 arch/arm/mach-atmel/irq.c                |  215 ++++++++++++++++++++++++++
 arch/arm/mach-atmel/time.c               |  101 ++++++++++++
 include/asm-arm/arch-atmel/at91x40.h     |   57 ++++++
 include/asm-arm/arch-atmel/at91x63.h     |   73 ++++++++
 include/asm-arm/arch-atmel/dma.h         |   26 +++
 include/asm-arm/arch-atmel/entry-macro.S |   39 ++++
 include/asm-arm/arch-atmel/hardware.h    |  255
+++++++++++++++++++++++++++++++
 include/asm-arm/arch-atmel/io.h          |   40 ++++
 include/asm-arm/arch-atmel/irq.h         |   22 ++
 include/asm-arm/arch-atmel/irqs.h        |   65 +++++++
 include/asm-arm/arch-atmel/keyboard.h    |   21 ++
 include/asm-arm/arch-atmel/memory.h      |   30 +++
 include/asm-arm/arch-atmel/param.h       |    6
 include/asm-arm/arch-atmel/sizes.h       |   52 ++++++
 include/asm-arm/arch-atmel/system.h      |   42 +++++
 include/asm-arm/arch-atmel/time.h        |   29 +++
 include/asm-arm/arch-atmel/timex.h       |   10 +
 include/asm-arm/arch-atmel/uncompress.h  |   58 +++++++
 include/asm-arm/arch-atmel/vmalloc.h     |   35 ++++
 24 files changed, 1385 insertions(+)

the patch :
http://opensrc.sec.samsung.com/download/linux-2.6.12-rc3-mm3-hsc0-atmel.patc
h.bz2

---
Hyok S. Choi
[Linux 2.6 for MMU-less ARM Project] http://opensrc.sec.samsung.com/

#1 lore raw

arch/arm/mach-atmel/Makefile

Quoted 8 lines · Hyok S. Choi
arch/arm/mach-atmel/Makefile +4 -0
 
+#
+# Makefile for the linux kernel.
+#
 
+# Object file lists.

Useless comments.

arch/arm/mach-atmel/arch.c

Quoted 4 lines
arch/arm/mach-atmel/Makefile +1 -0
+obj-y		+= arch.o irq.o time.o
arch/arm/mach-atmel/arch.c +0 -0

[21 #include directives snipped]

arch/arm/mach-atmel/arch.c

Quoted 12 lines
arch/arm/mach-atmel/arch.c +12 -0
+extern void atmel_time_init(void);
+extern unsigned long atmel_gettimeoffset(void);
+
+extern void __init atmel_init_irq(void);
+
+extern struct sys_timer atmel_timer;
+
+MACHINE_START(ATMEL, "ATMEL EB01")
+	MAINTAINER("Hyok S. Choi <[email protected]>")
+	INITIRQ(atmel_init_irq)
+	.timer		= &atmel_timer,
+MACHINE_END

So, all you need is:
include/linux/init.h
include/asm-arm/mach/time.h
include/asm-arm/mach/arch.h
And maybe one or two more.

arch/arm/mach-atmel/irq.c

Quoted 4 lines
arch/arm/mach-atmel/irq.c +1 -0
 
+static unsigned char eb01_irq_prtable[32] = {

Should it be ...[NR_IRQS] ?

Quoted 10 lines
arch/arm/mach-atmel/irq.c +10 -0
+        7 << 5, /* FIQ */
+        0 << 5, /* SWIRQ */
+        0 << 5, /* US0IRQ */
+        0 << 5, /* US1IRQ */
+        2 << 5, /* TC0IRQ */
+        2 << 5, /* TC1IRQ */
+        2 << 5, /* TC2IRQ */
+        0 << 5, /* WDIRQ */
+        0 << 5, /* PIOAIRQ */
+        0 << 5, /* reserved */

arch/arm/mach-atmel/irq.c

Quoted 10 lines
arch/arm/mach-atmel/irq.c +10 -0
+        0 << 5, /* reserved */
+        0 << 5, /* reserved */
+        0 << 5, /* reserved */
+        0 << 5, /* reserved */
+        0 << 5, /* reserved */
+        0 << 5, /* reserved */
+        1 << 5, /* IRQ0 */
+	0 << 5, /* IRQ1 */
+        0 << 5, /* IRQ2 */
+};

You are doing "eb01_irq_prtable[irq] >> 5" always.

arch/arm/mach-atmel/irq.c

Quoted 10 lines
arch/arm/mach-atmel/irq.c +9 -0
+        for ( irq = 0 ; irq < 32 ; irq++ )
+        {
+                __raw_writel(irq, AIC_EOICR);
+        }
 
+        for ( irq = 0 ; irq < 32 ; irq++ )
+        {
+            __raw_writel((eb01_irq_prtable[irq] >> 5) | eb01_irq_type[irq],
+		 AIC_SMR(irq));
+        }

Use consistent style for "for" statements and brackets. Like in the next line.

arch/arm/mach-atmel/irq.c

Quoted 1 line
arch/arm/mach-atmel/irq.c +1 -0
+	for (irq = 0; irq < NR_IRQS; irq++) {

Please, remove trailing whitespace from this patch. There is quite a few of it.

#2 lore raw

PATCH 7/17 ARMNOMMU - platform patch for atmel

Here is the refined atmel patch of nommu/mpu patch set against 2.6.12-rc3-mm3 [7/17]
which accepted all the Alexey Dobriyan's comments.

- platform patch for atmel

 arch/arm/mach-atmel/Kconfig              |   61 +++++++
 arch/arm/mach-atmel/Makefile             |    1
 arch/arm/mach-atmel/Makefile.boot        |    2
 arch/arm/mach-atmel/arch.c               |   37 ++++
 arch/arm/mach-atmel/head.S               |   83 ++++++++++
 arch/arm/mach-atmel/irq.c                |  212 +++++++++++++++++++++++++
 arch/arm/mach-atmel/time.c               |  100 ++++++++++++
 include/asm-arm/arch-atmel/at91x40.h     |   57 ++++++
 include/asm-arm/arch-atmel/at91x63.h     |   73 ++++++++
 include/asm-arm/arch-atmel/dma.h         |   26 +++
 include/asm-arm/arch-atmel/entry-macro.S |   39 ++++
 include/asm-arm/arch-atmel/hardware.h    |  255
+++++++++++++++++++++++++++++++
 include/asm-arm/arch-atmel/io.h          |   40 ++++
 include/asm-arm/arch-atmel/irq.h         |   22 ++
 include/asm-arm/arch-atmel/irqs.h        |   65 +++++++
 include/asm-arm/arch-atmel/keyboard.h    |   21 ++
 include/asm-arm/arch-atmel/memory.h      |   30 +++
 include/asm-arm/arch-atmel/param.h       |    6
 include/asm-arm/arch-atmel/sizes.h       |   52 ++++++
 include/asm-arm/arch-atmel/system.h      |   42 +++++
 include/asm-arm/arch-atmel/time.h        |   29 +++
 include/asm-arm/arch-atmel/timex.h       |   10 +
 include/asm-arm/arch-atmel/uncompress.h  |   58 +++++++
 include/asm-arm/arch-atmel/vmalloc.h     |   35 ++++
 24 files changed, 1356 insertions(+)

the patch :
http://opensrc.sec.samsung.com/download/linux-2.6.12-rc3-mm3-hsc0-atmel2.pat
ch.bz2

---
Hyok S. Choi
[Linux 2.6 for MMU-less ARM Project] http://opensrc.sec.samsung.com/