]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'header-move' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemo...
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 7 Aug 2008 08:55:16 +0000 (09:55 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 7 Aug 2008 08:55:16 +0000 (09:55 +0100)
125 files changed:
arch/avr32/Makefile
arch/avr32/boards/atngw100/flash.c
arch/avr32/boards/atngw100/setup.c
arch/avr32/boards/atstk1000/atstk1002.c
arch/avr32/boards/atstk1000/atstk1003.c
arch/avr32/boards/atstk1000/atstk1004.c
arch/avr32/boards/atstk1000/flash.c
arch/avr32/boards/atstk1000/setup.c
arch/avr32/include/asm/Kbuild [moved from include/asm-avr32/Kbuild with 100% similarity]
arch/avr32/include/asm/a.out.h [moved from include/asm-avr32/a.out.h with 100% similarity]
arch/avr32/include/asm/addrspace.h [moved from include/asm-avr32/addrspace.h with 100% similarity]
arch/avr32/include/asm/asm.h [moved from include/asm-avr32/asm.h with 100% similarity]
arch/avr32/include/asm/atmel-mci.h [moved from include/asm-avr32/atmel-mci.h with 100% similarity]
arch/avr32/include/asm/atomic.h [moved from include/asm-avr32/atomic.h with 100% similarity]
arch/avr32/include/asm/auxvec.h [moved from include/asm-avr32/auxvec.h with 100% similarity]
arch/avr32/include/asm/bitops.h [moved from include/asm-avr32/bitops.h with 100% similarity]
arch/avr32/include/asm/bug.h [moved from include/asm-avr32/bug.h with 100% similarity]
arch/avr32/include/asm/bugs.h [moved from include/asm-avr32/bugs.h with 100% similarity]
arch/avr32/include/asm/byteorder.h [moved from include/asm-avr32/byteorder.h with 100% similarity]
arch/avr32/include/asm/cache.h [moved from include/asm-avr32/cache.h with 100% similarity]
arch/avr32/include/asm/cachectl.h [moved from include/asm-avr32/cachectl.h with 100% similarity]
arch/avr32/include/asm/cacheflush.h [moved from include/asm-avr32/cacheflush.h with 100% similarity]
arch/avr32/include/asm/checksum.h [moved from include/asm-avr32/checksum.h with 100% similarity]
arch/avr32/include/asm/cputime.h [moved from include/asm-avr32/cputime.h with 100% similarity]
arch/avr32/include/asm/current.h [moved from include/asm-avr32/current.h with 100% similarity]
arch/avr32/include/asm/delay.h [moved from include/asm-avr32/delay.h with 100% similarity]
arch/avr32/include/asm/device.h [moved from include/asm-avr32/device.h with 100% similarity]
arch/avr32/include/asm/div64.h [moved from include/asm-avr32/div64.h with 100% similarity]
arch/avr32/include/asm/dma-mapping.h [moved from include/asm-avr32/dma-mapping.h with 100% similarity]
arch/avr32/include/asm/dma.h [moved from include/asm-avr32/dma.h with 100% similarity]
arch/avr32/include/asm/elf.h [moved from include/asm-avr32/elf.h with 100% similarity]
arch/avr32/include/asm/emergency-restart.h [moved from include/asm-avr32/emergency-restart.h with 100% similarity]
arch/avr32/include/asm/errno.h [moved from include/asm-avr32/errno.h with 100% similarity]
arch/avr32/include/asm/fb.h [moved from include/asm-avr32/fb.h with 100% similarity]
arch/avr32/include/asm/fcntl.h [moved from include/asm-avr32/fcntl.h with 100% similarity]
arch/avr32/include/asm/futex.h [moved from include/asm-avr32/futex.h with 100% similarity]
arch/avr32/include/asm/gpio.h [moved from include/asm-avr32/gpio.h with 76% similarity]
arch/avr32/include/asm/hardirq.h [moved from include/asm-avr32/hardirq.h with 100% similarity]
arch/avr32/include/asm/hw_irq.h [moved from include/asm-avr32/hw_irq.h with 100% similarity]
arch/avr32/include/asm/io.h [moved from include/asm-avr32/io.h with 99% similarity]
arch/avr32/include/asm/ioctl.h [moved from include/asm-avr32/ioctl.h with 100% similarity]
arch/avr32/include/asm/ioctls.h [moved from include/asm-avr32/ioctls.h with 100% similarity]
arch/avr32/include/asm/ipcbuf.h [moved from include/asm-avr32/ipcbuf.h with 100% similarity]
arch/avr32/include/asm/irq.h [moved from include/asm-avr32/irq.h with 94% similarity]
arch/avr32/include/asm/irq_regs.h [moved from include/asm-avr32/irq_regs.h with 100% similarity]
arch/avr32/include/asm/irqflags.h [moved from include/asm-avr32/irqflags.h with 100% similarity]
arch/avr32/include/asm/kdebug.h [moved from include/asm-avr32/kdebug.h with 100% similarity]
arch/avr32/include/asm/kmap_types.h [moved from include/asm-avr32/kmap_types.h with 100% similarity]
arch/avr32/include/asm/kprobes.h [moved from include/asm-avr32/kprobes.h with 100% similarity]
arch/avr32/include/asm/linkage.h [moved from include/asm-avr32/linkage.h with 100% similarity]
arch/avr32/include/asm/local.h [moved from include/asm-avr32/local.h with 100% similarity]
arch/avr32/include/asm/mach/serial_at91.h [moved from include/asm-avr32/mach/serial_at91.h with 100% similarity]
arch/avr32/include/asm/mman.h [moved from include/asm-avr32/mman.h with 100% similarity]
arch/avr32/include/asm/mmu.h [moved from include/asm-avr32/mmu.h with 100% similarity]
arch/avr32/include/asm/mmu_context.h [moved from include/asm-avr32/mmu_context.h with 100% similarity]
arch/avr32/include/asm/module.h [moved from include/asm-avr32/module.h with 100% similarity]
arch/avr32/include/asm/msgbuf.h [moved from include/asm-avr32/msgbuf.h with 100% similarity]
arch/avr32/include/asm/mutex.h [moved from include/asm-avr32/mutex.h with 100% similarity]
arch/avr32/include/asm/numnodes.h [moved from include/asm-avr32/numnodes.h with 100% similarity]
arch/avr32/include/asm/ocd.h [moved from include/asm-avr32/ocd.h with 100% similarity]
arch/avr32/include/asm/page.h [moved from include/asm-avr32/page.h with 100% similarity]
arch/avr32/include/asm/param.h [moved from include/asm-avr32/param.h with 100% similarity]
arch/avr32/include/asm/pci.h [moved from include/asm-avr32/pci.h with 100% similarity]
arch/avr32/include/asm/percpu.h [moved from include/asm-avr32/percpu.h with 100% similarity]
arch/avr32/include/asm/pgalloc.h [moved from include/asm-avr32/pgalloc.h with 100% similarity]
arch/avr32/include/asm/pgtable-2level.h [moved from include/asm-avr32/pgtable-2level.h with 100% similarity]
arch/avr32/include/asm/pgtable.h [moved from include/asm-avr32/pgtable.h with 100% similarity]
arch/avr32/include/asm/poll.h [moved from include/asm-avr32/poll.h with 100% similarity]
arch/avr32/include/asm/posix_types.h [moved from include/asm-avr32/posix_types.h with 100% similarity]
arch/avr32/include/asm/processor.h [moved from include/asm-avr32/processor.h with 100% similarity]
arch/avr32/include/asm/ptrace.h [moved from include/asm-avr32/ptrace.h with 100% similarity]
arch/avr32/include/asm/resource.h [moved from include/asm-avr32/resource.h with 100% similarity]
arch/avr32/include/asm/scatterlist.h [moved from include/asm-avr32/scatterlist.h with 100% similarity]
arch/avr32/include/asm/sections.h [moved from include/asm-avr32/sections.h with 100% similarity]
arch/avr32/include/asm/sembuf.h [moved from include/asm-avr32/sembuf.h with 100% similarity]
arch/avr32/include/asm/serial.h [moved from include/asm-avr32/serial.h with 100% similarity]
arch/avr32/include/asm/setup.h [moved from include/asm-avr32/setup.h with 100% similarity]
arch/avr32/include/asm/shmbuf.h [moved from include/asm-avr32/shmbuf.h with 100% similarity]
arch/avr32/include/asm/shmparam.h [moved from include/asm-avr32/shmparam.h with 100% similarity]
arch/avr32/include/asm/sigcontext.h [moved from include/asm-avr32/sigcontext.h with 100% similarity]
arch/avr32/include/asm/siginfo.h [moved from include/asm-avr32/siginfo.h with 100% similarity]
arch/avr32/include/asm/signal.h [moved from include/asm-avr32/signal.h with 100% similarity]
arch/avr32/include/asm/socket.h [moved from include/asm-avr32/socket.h with 100% similarity]
arch/avr32/include/asm/sockios.h [moved from include/asm-avr32/sockios.h with 100% similarity]
arch/avr32/include/asm/stat.h [moved from include/asm-avr32/stat.h with 100% similarity]
arch/avr32/include/asm/statfs.h [moved from include/asm-avr32/statfs.h with 100% similarity]
arch/avr32/include/asm/string.h [moved from include/asm-avr32/string.h with 100% similarity]
arch/avr32/include/asm/sysreg.h [moved from include/asm-avr32/sysreg.h with 100% similarity]
arch/avr32/include/asm/system.h [moved from include/asm-avr32/system.h with 100% similarity]
arch/avr32/include/asm/termbits.h [moved from include/asm-avr32/termbits.h with 100% similarity]
arch/avr32/include/asm/termios.h [moved from include/asm-avr32/termios.h with 100% similarity]
arch/avr32/include/asm/thread_info.h [moved from include/asm-avr32/thread_info.h with 100% similarity]
arch/avr32/include/asm/timex.h [moved from include/asm-avr32/timex.h with 100% similarity]
arch/avr32/include/asm/tlb.h [moved from include/asm-avr32/tlb.h with 100% similarity]
arch/avr32/include/asm/tlbflush.h [moved from include/asm-avr32/tlbflush.h with 100% similarity]
arch/avr32/include/asm/topology.h [moved from include/asm-avr32/topology.h with 100% similarity]
arch/avr32/include/asm/traps.h [moved from include/asm-avr32/traps.h with 100% similarity]
arch/avr32/include/asm/types.h [moved from include/asm-avr32/types.h with 100% similarity]
arch/avr32/include/asm/uaccess.h [moved from include/asm-avr32/uaccess.h with 100% similarity]
arch/avr32/include/asm/ucontext.h [moved from include/asm-avr32/ucontext.h with 100% similarity]
arch/avr32/include/asm/unaligned.h [moved from include/asm-avr32/unaligned.h with 100% similarity]
arch/avr32/include/asm/unistd.h [moved from include/asm-avr32/unistd.h with 100% similarity]
arch/avr32/include/asm/user.h [moved from include/asm-avr32/user.h with 100% similarity]
arch/avr32/include/asm/xor.h [moved from include/asm-avr32/xor.h with 100% similarity]
arch/avr32/kernel/process.c
arch/avr32/kernel/setup.c
arch/avr32/kernel/time.c
arch/avr32/mach-at32ap/at32ap700x.c
arch/avr32/mach-at32ap/hsmc.c
arch/avr32/mach-at32ap/include/mach/at32ap700x.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/board.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/cpu.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/gpio.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/init.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/io.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/irq.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/pm.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/portmux.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/smc.h [new file with mode: 0644]
arch/avr32/mach-at32ap/include/mach/sram.h [new file with mode: 0644]
arch/avr32/mach-at32ap/pio.c
arch/avr32/mach-at32ap/pm-at32ap700x.S
arch/avr32/mach-at32ap/pm.c
drivers/ata/pata_at32.c
drivers/mmc/host/atmel-mci.c

index 17a3529341ddef62eb5c6129a84e25622a280c4a..5b46433d53a5439749045fdda7a23dbb1fd1bd29 100644 (file)
@@ -23,9 +23,14 @@ KBUILD_AFLAGS        += $(cpuflags-y)
 
 CHECKFLAGS     += -D__avr32__ -D__BIG_ENDIAN
 
+machine-$(CONFIG_PLATFORM_AT32AP) := at32ap
+machdirs       := $(patsubst %,arch/avr32/mach-%/, $(machine-y))
+
+KBUILD_CPPFLAGS        += $(patsubst %,-I$(srctree)/%include,$(machdirs))
+
 head-$(CONFIG_LOADER_U_BOOT)           += arch/avr32/boot/u-boot/head.o
 head-y                                 += arch/avr32/kernel/head.o
-core-$(CONFIG_PLATFORM_AT32AP)         += arch/avr32/mach-at32ap/
+core-y                                 += $(machdirs)
 core-$(CONFIG_BOARD_ATSTK1000)         += arch/avr32/boards/atstk1000/
 core-$(CONFIG_BOARD_ATNGW100)          += arch/avr32/boards/atngw100/
 core-$(CONFIG_LOADER_U_BOOT)           += arch/avr32/boot/u-boot/
index b07ae63aa54802eaa47b700c009da90c83f31a9a..55ccc9ce489245cfb1a821d5eaa140ee22765f3a 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 
-#include <asm/arch/smc.h>
+#include <mach/smc.h>
 
 static struct smc_timing flash_timing __initdata = {
        .ncs_read_setup         = 0,
index c7fe94d03a1eb1358a2d77b2a663bc6a81fba757..670c87b2db121b5506901fce7b2c5d94055836f9 100644 (file)
 #include <asm/io.h>
 #include <asm/setup.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/board.h>
-#include <asm/arch/init.h>
-#include <asm/arch/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/board.h>
+#include <mach/init.h>
+#include <mach/portmux.h>
 
 /* Oscillator frequencies. These are board-specific */
 unsigned long at32_board_osc_rates[3] = {
index 8538ba75ef92c8a1def6ee96caea4557618ae061..b33542b97563f3a1d156d6008e9b02b634ad4f81 100644 (file)
 #include <asm/setup.h>
 #include <asm/atmel-mci.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/board.h>
-#include <asm/arch/init.h>
-#include <asm/arch/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/board.h>
+#include <mach/init.h>
+#include <mach/portmux.h>
 
 #include "atstk1000.h"
 
@@ -49,7 +49,7 @@ unsigned long at32_board_osc_rates[3] = {
  */
 #ifdef CONFIG_BOARD_ATSTK1006
 #include <linux/mtd/partitions.h>
-#include <asm/arch/smc.h>
+#include <mach/smc.h>
 
 static struct smc_timing nand_timing __initdata = {
        .ncs_read_setup         = 0,
index 591fc73b554a58dc5c71e56fdd5471030dd32c32..0cf664174c1766f129366aecce8a6321aeb77ce8 100644 (file)
 
 #include <asm/setup.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/board.h>
-#include <asm/arch/init.h>
-#include <asm/arch/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/board.h>
+#include <mach/init.h>
+#include <mach/portmux.h>
 
 #include "atstk1000.h"
 
index d9c5e0a21256cf30cd7c9a031b27753ddd2f67d6..50a5273e5916ddc285d5be2e3604a3b3df6c76d7 100644 (file)
 
 #include <asm/setup.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/board.h>
-#include <asm/arch/init.h>
-#include <asm/arch/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/board.h>
+#include <mach/init.h>
+#include <mach/portmux.h>
 
 #include "atstk1000.h"
 
index 3d0a102ad45ec1e8fd77ad4bd794b4d726a65888..6e4d561977ffc2849d21691e691d40207579984d 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 
-#include <asm/arch/smc.h>
+#include <mach/smc.h>
 
 static struct smc_timing flash_timing __initdata = {
        .ncs_read_setup         = 0,
index 8bedf93876a377050cdb491643edbb9da45114ae..2d6b560115d9fa19c250f52a0a6e7c27bea27e81 100644 (file)
@@ -18,9 +18,9 @@
 
 #include <asm/setup.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/board.h>
-#include <asm/arch/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/board.h>
+#include <mach/portmux.h>
 
 #include "atstk1000.h"
 
similarity index 76%
rename from include/asm-avr32/gpio.h
rename to arch/avr32/include/asm/gpio.h
index 19e8ccc77db38d40eadaea3c1d77e7a005b82388..b771f71059646c2f4ce46048297311566955683f 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef __ASM_AVR32_GPIO_H
 #define __ASM_AVR32_GPIO_H
 
-#include <asm/arch/gpio.h>
+#include <mach/gpio.h>
 
 #endif /* __ASM_AVR32_GPIO_H */
similarity index 99%
rename from include/asm-avr32/io.h
rename to arch/avr32/include/asm/io.h
index 8be7ea9c9047119b3541cd8d7ec860c1dd763d73..a520f77ead96e62d02ee2197d85c2a76fa46c9e2 100644 (file)
@@ -8,7 +8,7 @@
 #include <asm/addrspace.h>
 #include <asm/byteorder.h>
 
-#include <asm/arch/io.h>
+#include <mach/io.h>
 
 /* virt_to_phys will only work when address is in P1 or P2 */
 static __inline__ unsigned long virt_to_phys(volatile void *address)
similarity index 94%
rename from include/asm-avr32/irq.h
rename to arch/avr32/include/asm/irq.h
index c563b7720c1ad7f8034100c64dd223e13e81d079..6fa8913f8548bd25117a0e656ac998695a002857 100644 (file)
@@ -3,7 +3,7 @@
 
 #define NR_INTERNAL_IRQS       64
 
-#include <asm/arch/irq.h>
+#include <mach/irq.h>
 
 #ifndef NR_IRQS
 #define NR_IRQS                        (NR_INTERNAL_IRQS)
index ff820a9e743a01c3d5fdd7bd61649fec474bdad3..2c08ac992ac3d8435c2284224cbbd5a0691ac085 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/sysreg.h>
 #include <asm/ocd.h>
 
-#include <asm/arch/pm.h>
+#include <mach/pm.h>
 
 void (*pm_power_off)(void) = NULL;
 EXPORT_SYMBOL(pm_power_off);
index ce48c14f4349cfd3f18a1544397fd37588c6b888..d8e623c426c1f324c37369eca13cf358e3b85ab1 100644 (file)
@@ -26,8 +26,8 @@
 #include <asm/setup.h>
 #include <asm/sysreg.h>
 
-#include <asm/arch/board.h>
-#include <asm/arch/init.h>
+#include <mach/board.h>
+#include <mach/init.h>
 
 extern int root_mountflags;
 
index 7e7f32771ae1aa9d0a25b38739cebc81352173a4..283481d74a5bf454e2b6966810df4133d70d5cfc 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <asm/sysreg.h>
 
-#include <asm/arch/pm.h>
+#include <mach/pm.h>
 
 
 static cycle_t read_cycle_count(void)
index 1617048c86c5955bb549d84be9d1bf77ca90c6af..92bfb4d8ae455ad82fd4d5cb2e16cc94122eea21 100644 (file)
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/board.h>
-#include <asm/arch/portmux.h>
-#include <asm/arch/sram.h>
+#include <mach/at32ap700x.h>
+#include <mach/board.h>
+#include <mach/portmux.h>
+#include <mach/sram.h>
 
 #include <video/atmel_lcdc.h>
 
index b2d9bc61a35ca1ca55572bf8aa6636ecde50f9cc..2875c11be95d5f232d2970e204695fbc83a526d3 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/platform_device.h>
 
 #include <asm/io.h>
-#include <asm/arch/smc.h>
+#include <mach/smc.h>
 
 #include "hsmc.h"
 
diff --git a/arch/avr32/mach-at32ap/include/mach/at32ap700x.h b/arch/avr32/mach-at32ap/include/mach/at32ap700x.h
new file mode 100644 (file)
index 0000000..d18a305
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Pin definitions for AT32AP7000.
+ *
+ * Copyright (C) 2006 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARCH_AT32AP700X_H__
+#define __ASM_ARCH_AT32AP700X_H__
+
+#define GPIO_PERIPH_A  0
+#define GPIO_PERIPH_B  1
+
+/*
+ * Pin numbers identifying specific GPIO pins on the chip. They can
+ * also be converted to IRQ numbers by passing them through
+ * gpio_to_irq().
+ */
+#define GPIO_PIOA_BASE (0)
+#define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32)
+#define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32)
+#define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32)
+#define GPIO_PIOE_BASE (GPIO_PIOD_BASE + 32)
+
+#define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N))
+#define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N))
+#define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N))
+#define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N))
+#define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N))
+
+
+/*
+ * DMAC peripheral hardware handshaking interfaces, used with dw_dmac
+ */
+#define DMAC_MCI_RX            0
+#define DMAC_MCI_TX            1
+#define DMAC_DAC_TX            2
+#define DMAC_AC97_A_RX         3
+#define DMAC_AC97_A_TX         4
+#define DMAC_AC97_B_RX         5
+#define DMAC_AC97_B_TX         6
+#define DMAC_DMAREQ_0          7
+#define DMAC_DMAREQ_1          8
+#define DMAC_DMAREQ_2          9
+#define DMAC_DMAREQ_3          10
+
+#endif /* __ASM_ARCH_AT32AP700X_H__ */
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
new file mode 100644 (file)
index 0000000..e60e907
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Platform data definitions.
+ */
+#ifndef __ASM_ARCH_BOARD_H
+#define __ASM_ARCH_BOARD_H
+
+#include <linux/types.h>
+
+#define GPIO_PIN_NONE  (-1)
+
+/*
+ * Clock rates for various on-board oscillators. The number of entries
+ * in this array is chip-dependent.
+ */
+extern unsigned long at32_board_osc_rates[];
+  
+/* Add basic devices: system manager, interrupt controller, portmuxes, etc. */
+void at32_add_system_devices(void);
+
+#define ATMEL_MAX_UART 4
+extern struct platform_device *atmel_default_console_device;
+
+struct atmel_uart_data {
+       short           use_dma_tx;     /* use transmit DMA? */
+       short           use_dma_rx;     /* use receive DMA? */
+       void __iomem    *regs;          /* virtual base address, if any */
+};
+void at32_map_usart(unsigned int hw_id, unsigned int line);
+struct platform_device *at32_add_device_usart(unsigned int id);
+
+struct eth_platform_data {
+       u32     phy_mask;
+       u8      is_rmii;
+};
+struct platform_device *
+at32_add_device_eth(unsigned int id, struct eth_platform_data *data);
+
+struct spi_board_info;
+struct platform_device *
+at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
+
+struct atmel_lcdfb_info;
+struct platform_device *
+at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
+                    unsigned long fbmem_start, unsigned long fbmem_len,
+                    unsigned int pin_config);
+
+struct usba_platform_data;
+struct platform_device *
+at32_add_device_usba(unsigned int id, struct usba_platform_data *data);
+
+struct ide_platform_data {
+       u8      cs;
+};
+struct platform_device *
+at32_add_device_ide(unsigned int id, unsigned int extint,
+                   struct ide_platform_data *data);
+
+/* mask says which PWM channels to mux */
+struct platform_device *at32_add_device_pwm(u32 mask);
+
+/* depending on what's hooked up, not all SSC pins will be used */
+#define        ATMEL_SSC_TK            0x01
+#define        ATMEL_SSC_TF            0x02
+#define        ATMEL_SSC_TD            0x04
+#define        ATMEL_SSC_TX            (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD)
+
+#define        ATMEL_SSC_RK            0x10
+#define        ATMEL_SSC_RF            0x20
+#define        ATMEL_SSC_RD            0x40
+#define        ATMEL_SSC_RX            (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD)
+
+struct platform_device *
+at32_add_device_ssc(unsigned int id, unsigned int flags);
+
+struct i2c_board_info;
+struct platform_device *at32_add_device_twi(unsigned int id,
+                                           struct i2c_board_info *b,
+                                           unsigned int n);
+
+struct mci_platform_data;
+struct platform_device *
+at32_add_device_mci(unsigned int id, struct mci_platform_data *data);
+
+struct ac97c_platform_data {
+       unsigned short dma_rx_periph_id;
+       unsigned short dma_tx_periph_id;
+       unsigned short dma_controller_id;
+       int reset_pin;
+};
+struct platform_device *
+at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data);
+
+struct platform_device *at32_add_device_abdac(unsigned int id);
+struct platform_device *at32_add_device_psif(unsigned int id);
+
+struct cf_platform_data {
+       int     detect_pin;
+       int     reset_pin;
+       int     vcc_pin;
+       int     ready_pin;
+       u8      cs;
+};
+struct platform_device *
+at32_add_device_cf(unsigned int id, unsigned int extint,
+               struct cf_platform_data *data);
+
+/* NAND / SmartMedia */
+struct atmel_nand_data {
+       int     enable_pin;     /* chip enable */
+       int     det_pin;        /* card detect */
+       int     rdy_pin;        /* ready/busy */
+       u8      ale;            /* address line number connected to ALE */
+       u8      cle;            /* address line number connected to CLE */
+       u8      bus_width_16;   /* buswidth is 16 bit */
+       struct mtd_partition *(*partition_info)(int size, int *num_partitions);
+};
+struct platform_device *
+at32_add_device_nand(unsigned int id, struct atmel_nand_data *data);
+
+#endif /* __ASM_ARCH_BOARD_H */
diff --git a/arch/avr32/mach-at32ap/include/mach/cpu.h b/arch/avr32/mach-at32ap/include/mach/cpu.h
new file mode 100644 (file)
index 0000000..44d0bfa
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * AVR32 and (fake) AT91 CPU identification
+ *
+ * Copyright (C) 2007 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARCH_CPU_H
+#define __ASM_ARCH_CPU_H
+
+/*
+ * Only AT32AP7000 is defined for now. We can identify the specific
+ * chip at runtime, but I'm not sure if it's really worth it.
+ */
+#ifdef CONFIG_CPU_AT32AP700X
+# define cpu_is_at32ap7000()   (1)
+#else
+# define cpu_is_at32ap7000()   (0)
+#endif
+
+/*
+ * Since this is AVR32, we will never run on any AT91 CPU. But these
+ * definitions may reduce clutter in common drivers.
+ */
+#define cpu_is_at91rm9200()    (0)
+#define cpu_is_at91sam9xe()    (0)
+#define cpu_is_at91sam9260()   (0)
+#define cpu_is_at91sam9261()   (0)
+#define cpu_is_at91sam9263()   (0)
+#define cpu_is_at91sam9rl()    (0)
+#define cpu_is_at91cap9()      (0)
+
+#endif /* __ASM_ARCH_CPU_H */
diff --git a/arch/avr32/mach-at32ap/include/mach/gpio.h b/arch/avr32/mach-at32ap/include/mach/gpio.h
new file mode 100644 (file)
index 0000000..0180f58
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef __ASM_AVR32_ARCH_GPIO_H
+#define __ASM_AVR32_ARCH_GPIO_H
+
+#include <linux/compiler.h>
+#include <asm/irq.h>
+
+
+/* Some GPIO chips can manage IRQs; some can't.  The exact numbers can
+ * be changed if needed, but for the moment they're not configurable.
+ */
+#define ARCH_NR_GPIOS  (NR_GPIO_IRQS + 2 * 32)
+
+
+/* Arch-neutral GPIO API, supporting both "native" and external GPIOs. */
+#include <asm-generic/gpio.h>
+
+static inline int gpio_get_value(unsigned int gpio)
+{
+       return __gpio_get_value(gpio);
+}
+
+static inline void gpio_set_value(unsigned int gpio, int value)
+{
+       __gpio_set_value(gpio, value);
+}
+
+static inline int gpio_cansleep(unsigned int gpio)
+{
+       return __gpio_cansleep(gpio);
+}
+
+
+static inline int gpio_to_irq(unsigned int gpio)
+{
+       if (gpio < NR_GPIO_IRQS)
+               return gpio + GPIO_IRQ_BASE;
+       return -EINVAL;
+}
+
+static inline int irq_to_gpio(unsigned int irq)
+{
+       return irq - GPIO_IRQ_BASE;
+}
+
+#endif /* __ASM_AVR32_ARCH_GPIO_H */
diff --git a/arch/avr32/mach-at32ap/include/mach/init.h b/arch/avr32/mach-at32ap/include/mach/init.h
new file mode 100644 (file)
index 0000000..bc40e3d
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * AT32AP platform initialization calls.
+ *
+ * Copyright (C) 2006 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_AVR32_AT32AP_INIT_H__
+#define __ASM_AVR32_AT32AP_INIT_H__
+
+void setup_platform(void);
+void setup_board(void);
+
+void at32_setup_serial_console(unsigned int usart_id);
+
+#endif /* __ASM_AVR32_AT32AP_INIT_H__ */
diff --git a/arch/avr32/mach-at32ap/include/mach/io.h b/arch/avr32/mach-at32ap/include/mach/io.h
new file mode 100644 (file)
index 0000000..4ec6abc
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef __ASM_AVR32_ARCH_AT32AP_IO_H
+#define __ASM_AVR32_ARCH_AT32AP_IO_H
+
+/* For "bizarre" halfword swapping */
+#include <linux/byteorder/swabb.h>
+
+#if defined(CONFIG_AP700X_32_BIT_SMC)
+# define __swizzle_addr_b(addr)        (addr ^ 3UL)
+# define __swizzle_addr_w(addr)        (addr ^ 2UL)
+# define __swizzle_addr_l(addr)        (addr)
+# define ioswabb(a, x)         (x)
+# define ioswabw(a, x)         (x)
+# define ioswabl(a, x)         (x)
+# define __mem_ioswabb(a, x)   (x)
+# define __mem_ioswabw(a, x)   swab16(x)
+# define __mem_ioswabl(a, x)   swab32(x)
+#elif defined(CONFIG_AP700X_16_BIT_SMC)
+# define __swizzle_addr_b(addr)        (addr ^ 1UL)
+# define __swizzle_addr_w(addr)        (addr)
+# define __swizzle_addr_l(addr)        (addr)
+# define ioswabb(a, x)         (x)
+# define ioswabw(a, x)         (x)
+# define ioswabl(a, x)         swahw32(x)
+# define __mem_ioswabb(a, x)   (x)
+# define __mem_ioswabw(a, x)   swab16(x)
+# define __mem_ioswabl(a, x)   swahb32(x)
+#else
+# define __swizzle_addr_b(addr)        (addr)
+# define __swizzle_addr_w(addr)        (addr)
+# define __swizzle_addr_l(addr)        (addr)
+# define ioswabb(a, x)         (x)
+# define ioswabw(a, x)         swab16(x)
+# define ioswabl(a, x)         swab32(x)
+# define __mem_ioswabb(a, x)   (x)
+# define __mem_ioswabw(a, x)   (x)
+# define __mem_ioswabl(a, x)   (x)
+#endif
+
+#endif /* __ASM_AVR32_ARCH_AT32AP_IO_H */
diff --git a/arch/avr32/mach-at32ap/include/mach/irq.h b/arch/avr32/mach-at32ap/include/mach/irq.h
new file mode 100644 (file)
index 0000000..608e350
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef __ASM_AVR32_ARCH_IRQ_H
+#define __ASM_AVR32_ARCH_IRQ_H
+
+#define EIM_IRQ_BASE   NR_INTERNAL_IRQS
+#define NR_EIM_IRQS    32
+#define AT32_EXTINT(n) (EIM_IRQ_BASE + (n))
+
+#define GPIO_IRQ_BASE  (EIM_IRQ_BASE + NR_EIM_IRQS)
+#define NR_GPIO_CTLR   (5 /*internal*/ + 1 /*external*/)
+#define NR_GPIO_IRQS   (NR_GPIO_CTLR * 32)
+
+#define NR_IRQS                (GPIO_IRQ_BASE + NR_GPIO_IRQS)
+
+#endif /* __ASM_AVR32_ARCH_IRQ_H */
diff --git a/arch/avr32/mach-at32ap/include/mach/pm.h b/arch/avr32/mach-at32ap/include/mach/pm.h
new file mode 100644 (file)
index 0000000..979b355
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * AVR32 AP Power Management.
+ *
+ * Copyright (C) 2008 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_AVR32_ARCH_PM_H
+#define __ASM_AVR32_ARCH_PM_H
+
+/* Possible arguments to the "sleep" instruction */
+#define CPU_SLEEP_IDLE         0
+#define CPU_SLEEP_FROZEN       1
+#define CPU_SLEEP_STANDBY      2
+#define CPU_SLEEP_STOP         3
+#define CPU_SLEEP_STATIC       5
+
+#ifndef __ASSEMBLY__
+extern void cpu_enter_idle(void);
+extern void cpu_enter_standby(unsigned long sdramc_base);
+
+extern bool disable_idle_sleep;
+
+static inline void cpu_disable_idle_sleep(void)
+{
+       disable_idle_sleep = true;
+}
+
+static inline void cpu_enable_idle_sleep(void)
+{
+       disable_idle_sleep = false;
+}
+
+static inline void cpu_idle_sleep(void)
+{
+       /*
+        * If we're using the COUNT and COMPARE registers for
+        * timekeeping, we can't use the IDLE state.
+        */
+       if (disable_idle_sleep)
+               cpu_relax();
+       else
+               cpu_enter_idle();
+}
+
+void intc_set_suspend_handler(unsigned long offset);
+#endif
+
+#endif /* __ASM_AVR32_ARCH_PM_H */
diff --git a/arch/avr32/mach-at32ap/include/mach/portmux.h b/arch/avr32/mach-at32ap/include/mach/portmux.h
new file mode 100644 (file)
index 0000000..b1abe6b
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * AT32 portmux interface.
+ *
+ * Copyright (C) 2006 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_ARCH_PORTMUX_H__
+#define __ASM_ARCH_PORTMUX_H__
+
+/*
+ * Set up pin multiplexing, called from board init only.
+ *
+ * The following flags determine the initial state of the pin.
+ */
+#define AT32_GPIOF_PULLUP      0x00000001      /* (not-OUT) Enable pull-up */
+#define AT32_GPIOF_OUTPUT      0x00000002      /* (OUT) Enable output driver */
+#define AT32_GPIOF_HIGH                0x00000004      /* (OUT) Set output high */
+#define AT32_GPIOF_DEGLITCH    0x00000008      /* (IN) Filter glitches */
+#define AT32_GPIOF_MULTIDRV    0x00000010      /* Enable multidriver option */
+
+void at32_select_periph(unsigned int pin, unsigned int periph,
+                       unsigned long flags);
+void at32_select_gpio(unsigned int pin, unsigned long flags);
+void at32_reserve_pin(unsigned int pin);
+
+#endif /* __ASM_ARCH_PORTMUX_H__ */
diff --git a/arch/avr32/mach-at32ap/include/mach/smc.h b/arch/avr32/mach-at32ap/include/mach/smc.h
new file mode 100644 (file)
index 0000000..c98eea4
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Static Memory Controller for AT32 chips
+ *
+ * Copyright (C) 2006 Atmel Corporation
+ *
+ * Inspired by the OMAP2 General-Purpose Memory Controller interface
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ARCH_AT32AP_SMC_H
+#define __ARCH_AT32AP_SMC_H
+
+/*
+ * All timing parameters are in nanoseconds.
+ */
+struct smc_timing {
+       /* Delay from address valid to assertion of given strobe */
+       int ncs_read_setup;
+       int nrd_setup;
+       int ncs_write_setup;
+       int nwe_setup;
+
+       /* Pulse length of given strobe */
+       int ncs_read_pulse;
+       int nrd_pulse;
+       int ncs_write_pulse;
+       int nwe_pulse;
+
+       /* Total cycle length of given operation */
+       int read_cycle;
+       int write_cycle;
+
+       /* Minimal recovery times, will extend cycle if needed */
+       int ncs_read_recover;
+       int nrd_recover;
+       int ncs_write_recover;
+       int nwe_recover;
+};
+
+/*
+ * All timing parameters are in clock cycles.
+ */
+struct smc_config {
+
+       /* Delay from address valid to assertion of given strobe */
+       u8              ncs_read_setup;
+       u8              nrd_setup;
+       u8              ncs_write_setup;
+       u8              nwe_setup;
+
+       /* Pulse length of given strobe */
+       u8              ncs_read_pulse;
+       u8              nrd_pulse;
+       u8              ncs_write_pulse;
+       u8              nwe_pulse;
+
+       /* Total cycle length of given operation */
+       u8              read_cycle;
+       u8              write_cycle;
+
+       /* Bus width in bytes */
+       u8              bus_width;
+
+       /*
+        * 0: Data is sampled on rising edge of NCS
+        * 1: Data is sampled on rising edge of NRD
+        */
+       unsigned int    nrd_controlled:1;
+
+       /*
+        * 0: Data is driven on falling edge of NCS
+        * 1: Data is driven on falling edge of NWR
+        */
+       unsigned int    nwe_controlled:1;
+
+       /*
+        * 0: NWAIT is disabled
+        * 1: Reserved
+        * 2: NWAIT is frozen mode
+        * 3: NWAIT in ready mode
+        */
+       unsigned int    nwait_mode:2;
+
+       /*
+        * 0: Byte select access type
+        * 1: Byte write access type
+        */
+       unsigned int    byte_write:1;
+
+       /*
+        * Number of clock cycles before data is released after
+        * the rising edge of the read controlling signal
+        *
+        * Total cycles from SMC is tdf_cycles + 1
+        */
+       unsigned int    tdf_cycles:4;
+
+       /*
+        * 0: TDF optimization disabled
+        * 1: TDF optimization enabled
+        */
+       unsigned int    tdf_mode:1;
+};
+
+extern void smc_set_timing(struct smc_config *config,
+                          const struct smc_timing *timing);
+
+extern int smc_set_configuration(int cs, const struct smc_config *config);
+extern struct smc_config *smc_get_configuration(int cs);
+
+#endif /* __ARCH_AT32AP_SMC_H */
diff --git a/arch/avr32/mach-at32ap/include/mach/sram.h b/arch/avr32/mach-at32ap/include/mach/sram.h
new file mode 100644 (file)
index 0000000..4838dae
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Simple SRAM allocator
+ *
+ * Copyright (C) 2008 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_AVR32_ARCH_SRAM_H
+#define __ASM_AVR32_ARCH_SRAM_H
+
+#include <linux/genalloc.h>
+
+extern struct gen_pool *sram_pool;
+
+static inline unsigned long sram_alloc(size_t len)
+{
+       if (!sram_pool)
+               return 0UL;
+
+       return gen_pool_alloc(sram_pool, len);
+}
+
+static inline void sram_free(unsigned long addr, size_t len)
+{
+       return gen_pool_free(sram_pool, addr, len);
+}
+
+#endif /* __ASM_AVR32_ARCH_SRAM_H */
index 296294f8ed81c42a92963c7794f3a39897e9fa81..405ee6bad4ce59dd888448b100daba698cf12b0c 100644 (file)
@@ -17,7 +17,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 
-#include <asm/arch/portmux.h>
+#include <mach/portmux.h>
 
 #include "pio.h"
 
index 0a53ad314ff429a54bfcc16e48898cd523a82b38..5be4de65b209661edbaab3851f7283149c96dba0 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/asm.h>
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
-#include <asm/arch/pm.h>
+#include <mach/pm.h>
 
 #include "pm.h"
 #include "sdramc.h"
index 0b764320135d73aa9319f928a05ffeada237c835..a0cbef54fc2a8e706878dd19777a0239c2c4d898 100644 (file)
@@ -14,8 +14,8 @@
 #include <asm/cacheflush.h>
 #include <asm/sysreg.h>
 
-#include <asm/arch/pm.h>
-#include <asm/arch/sram.h>
+#include <mach/pm.h>
+#include <mach/sram.h>
 
 /* FIXME: This is only valid for AP7000 */
 #define SDRAMC_BASE    0xfff03800
index 82fb6e2731690f11194fd286810c807b14795c3b..ab61095093b9ab09469db263a1a2ba062e198dcf 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
-#include <asm/arch/board.h>
-#include <asm/arch/smc.h>
+#include <mach/board.h>
+#include <mach/smc.h>
 
 #define DRV_NAME "pata_at32"
 #define DRV_VERSION "0.0.3"
index 992b4beb757c6593f4a790a0a749fcac5af8d165..0bd06f5bd62ffa414439dcd3a4c382124832c779 100644 (file)
@@ -28,7 +28,7 @@
 #include <asm/io.h>
 #include <asm/unaligned.h>
 
-#include <asm/arch/board.h>
+#include <mach/board.h>
 
 #include "atmel-mci-regs.h"