diff options
Diffstat (limited to 'arch/arm')
139 files changed, 3082 insertions, 1813 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 36c8b5e12590..4047f5724da3 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -25,6 +25,7 @@ config ARM | |||
25 | select HAVE_KERNEL_LZMA | 25 | select HAVE_KERNEL_LZMA |
26 | select HAVE_PERF_EVENTS | 26 | select HAVE_PERF_EVENTS |
27 | select PERF_USE_VMALLOC | 27 | select PERF_USE_VMALLOC |
28 | select HAVE_REGS_AND_STACK_ACCESS_API | ||
28 | help | 29 | help |
29 | The ARM series is a line of low-power-consumption RISC chip designs | 30 | The ARM series is a line of low-power-consumption RISC chip designs |
30 | licensed by ARM Ltd and targeted at embedded applications and | 31 | licensed by ARM Ltd and targeted at embedded applications and |
@@ -440,21 +441,6 @@ config ARCH_IXP4XX | |||
440 | help | 441 | help |
441 | Support for Intel's IXP4XX (XScale) family of processors. | 442 | Support for Intel's IXP4XX (XScale) family of processors. |
442 | 443 | ||
443 | config ARCH_L7200 | ||
444 | bool "LinkUp-L7200" | ||
445 | select CPU_ARM720T | ||
446 | select FIQ | ||
447 | select ARCH_USES_GETTIMEOFFSET | ||
448 | help | ||
449 | Say Y here if you intend to run this kernel on a LinkUp Systems | ||
450 | L7200 Software Development Board which uses an ARM720T processor. | ||
451 | Information on this board can be obtained at: | ||
452 | |||
453 | <http://www.linkupsys.com/> | ||
454 | |||
455 | If you have any questions or comments about the Linux kernel port | ||
456 | to this board, send e-mail to <sjhill@cotw.com>. | ||
457 | |||
458 | config ARCH_DOVE | 444 | config ARCH_DOVE |
459 | bool "Marvell Dove" | 445 | bool "Marvell Dove" |
460 | select PCI | 446 | select PCI |
@@ -1031,11 +1017,6 @@ endmenu | |||
1031 | 1017 | ||
1032 | source "arch/arm/common/Kconfig" | 1018 | source "arch/arm/common/Kconfig" |
1033 | 1019 | ||
1034 | config FORCE_MAX_ZONEORDER | ||
1035 | int | ||
1036 | depends on SA1111 | ||
1037 | default "9" | ||
1038 | |||
1039 | menu "Bus support" | 1020 | menu "Bus support" |
1040 | 1021 | ||
1041 | config ARM_AMBA | 1022 | config ARM_AMBA |
@@ -1172,9 +1153,10 @@ config HOTPLUG_CPU | |||
1172 | config LOCAL_TIMERS | 1153 | config LOCAL_TIMERS |
1173 | bool "Use local timer interrupts" | 1154 | bool "Use local timer interrupts" |
1174 | depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \ | 1155 | depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \ |
1175 | REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500) | 1156 | REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ |
1157 | ARCH_U8500 || ARCH_VEXPRESS_CA9X4) | ||
1176 | default y | 1158 | default y |
1177 | select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500) | 1159 | select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_VEXPRESS || ARCH_OMAP4 || ARCH_U8500) |
1178 | help | 1160 | help |
1179 | Enable support for local timers on SMP platforms, rather then the | 1161 | Enable support for local timers on SMP platforms, rather then the |
1180 | legacy IPI broadcast method. Local timers allows the system | 1162 | legacy IPI broadcast method. Local timers allows the system |
@@ -1185,10 +1167,10 @@ source kernel/Kconfig.preempt | |||
1185 | 1167 | ||
1186 | config HZ | 1168 | config HZ |
1187 | int | 1169 | int |
1188 | default 128 if ARCH_L7200 | ||
1189 | default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210 | 1170 | default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210 |
1190 | default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER | 1171 | default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER |
1191 | default AT91_TIMER_HZ if ARCH_AT91 | 1172 | default AT91_TIMER_HZ if ARCH_AT91 |
1173 | default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE | ||
1192 | default 100 | 1174 | default 100 |
1193 | 1175 | ||
1194 | config THUMB2_KERNEL | 1176 | config THUMB2_KERNEL |
@@ -1280,8 +1262,36 @@ config HW_PERF_EVENTS | |||
1280 | Enable hardware performance counter support for perf events. If | 1262 | Enable hardware performance counter support for perf events. If |
1281 | disabled, perf events will use software events only. | 1263 | disabled, perf events will use software events only. |
1282 | 1264 | ||
1265 | config SPARSE_IRQ | ||
1266 | bool "Support sparse irq numbering" | ||
1267 | depends on EXPERIMENTAL | ||
1268 | help | ||
1269 | This enables support for sparse irqs. This is useful in general | ||
1270 | as most CPUs have a fairly sparse array of IRQ vectors, which | ||
1271 | the irq_desc then maps directly on to. Systems with a high | ||
1272 | number of off-chip IRQs will want to treat this as | ||
1273 | experimental until they have been independently verified. | ||
1274 | |||
1275 | If you don't know what to do here, say N. | ||
1276 | |||
1283 | source "mm/Kconfig" | 1277 | source "mm/Kconfig" |
1284 | 1278 | ||
1279 | config FORCE_MAX_ZONEORDER | ||
1280 | int "Maximum zone order" if ARCH_SHMOBILE | ||
1281 | range 11 64 if ARCH_SHMOBILE | ||
1282 | default "9" if SA1111 | ||
1283 | default "11" | ||
1284 | help | ||
1285 | The kernel memory allocator divides physically contiguous memory | ||
1286 | blocks into "zones", where each zone is a power of two number of | ||
1287 | pages. This option selects the largest power of two that the kernel | ||
1288 | keeps in the memory allocator. If you need to allocate very large | ||
1289 | blocks of physically contiguous memory, then you may need to | ||
1290 | increase this value. | ||
1291 | |||
1292 | This config option is actually maximum order plus one. For example, | ||
1293 | a value of 11 means that the largest free memory block is 2^10 pages. | ||
1294 | |||
1285 | config LEDS | 1295 | config LEDS |
1286 | bool "Timer and CPU usage LEDs" | 1296 | bool "Timer and CPU usage LEDs" |
1287 | depends on ARCH_CDB89712 || ARCH_EBSA110 || \ | 1297 | depends on ARCH_CDB89712 || ARCH_EBSA110 || \ |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 64ba313724d2..bea37a2512e7 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -139,7 +139,6 @@ machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx | |||
139 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx | 139 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx |
140 | machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood | 140 | machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood |
141 | machine-$(CONFIG_ARCH_KS8695) := ks8695 | 141 | machine-$(CONFIG_ARCH_KS8695) := ks8695 |
142 | machine-$(CONFIG_ARCH_L7200) := l7200 | ||
143 | machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x | 142 | machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x |
144 | machine-$(CONFIG_ARCH_LOKI) := loki | 143 | machine-$(CONFIG_ARCH_LOKI) := loki |
145 | machine-$(CONFIG_ARCH_MMP) := mmp | 144 | machine-$(CONFIG_ARCH_MMP) := mmp |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 53faa9063a03..7a29301d516b 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -19,10 +19,6 @@ ifeq ($(CONFIG_ARCH_SHARK),y) | |||
19 | OBJS += head-shark.o ofw-shark.o | 19 | OBJS += head-shark.o ofw-shark.o |
20 | endif | 20 | endif |
21 | 21 | ||
22 | ifeq ($(CONFIG_ARCH_L7200),y) | ||
23 | OBJS += head-l7200.o | ||
24 | endif | ||
25 | |||
26 | ifeq ($(CONFIG_ARCH_P720T),y) | 22 | ifeq ($(CONFIG_ARCH_P720T),y) |
27 | # Borrow this code from SA1100 | 23 | # Borrow this code from SA1100 |
28 | OBJS += head-sa1100.o | 24 | OBJS += head-sa1100.o |
diff --git a/arch/arm/boot/compressed/head-l7200.S b/arch/arm/boot/compressed/head-l7200.S deleted file mode 100644 index d0e3b20856cd..000000000000 --- a/arch/arm/boot/compressed/head-l7200.S +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/boot/compressed/head-l7200.S | ||
3 | * | ||
4 | * Copyright (C) 2000 Steve Hill <sjhill@cotw.com> | ||
5 | * | ||
6 | * Some code borrowed from Nicolas Pitre's 'head-sa1100.S' file. This | ||
7 | * is merged with head.S by the linker. | ||
8 | */ | ||
9 | |||
10 | #include <asm/mach-types.h> | ||
11 | |||
12 | #ifndef CONFIG_ARCH_L7200 | ||
13 | #error What am I doing here... | ||
14 | #endif | ||
15 | |||
16 | .section ".start", "ax" | ||
17 | |||
18 | __L7200_start: | ||
19 | mov r0, #0x00100000 @ FLASH address of initrd | ||
20 | mov r2, #0xf1000000 @ RAM address of initrd | ||
21 | add r3, r2, #0x00700000 @ Size of initrd | ||
22 | 1: | ||
23 | ldmia r0!, {r4, r5, r6, r7} | ||
24 | stmia r2!, {r4, r5, r6, r7} | ||
25 | cmp r2, r3 | ||
26 | ble 1b | ||
27 | |||
28 | mov r8, #0 @ Zero it out | ||
29 | mov r7, #MACH_TYPE_L7200 @ Set architecture ID | ||
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 337741f734ac..7dfa9a85bc0c 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -108,6 +108,51 @@ static void gic_unmask_irq(unsigned int irq) | |||
108 | spin_unlock(&irq_controller_lock); | 108 | spin_unlock(&irq_controller_lock); |
109 | } | 109 | } |
110 | 110 | ||
111 | static int gic_set_type(unsigned int irq, unsigned int type) | ||
112 | { | ||
113 | void __iomem *base = gic_dist_base(irq); | ||
114 | unsigned int gicirq = gic_irq(irq); | ||
115 | u32 enablemask = 1 << (gicirq % 32); | ||
116 | u32 enableoff = (gicirq / 32) * 4; | ||
117 | u32 confmask = 0x2 << ((gicirq % 16) * 2); | ||
118 | u32 confoff = (gicirq / 16) * 4; | ||
119 | bool enabled = false; | ||
120 | u32 val; | ||
121 | |||
122 | /* Interrupt configuration for SGIs can't be changed */ | ||
123 | if (gicirq < 16) | ||
124 | return -EINVAL; | ||
125 | |||
126 | if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) | ||
127 | return -EINVAL; | ||
128 | |||
129 | spin_lock(&irq_controller_lock); | ||
130 | |||
131 | val = readl(base + GIC_DIST_CONFIG + confoff); | ||
132 | if (type == IRQ_TYPE_LEVEL_HIGH) | ||
133 | val &= ~confmask; | ||
134 | else if (type == IRQ_TYPE_EDGE_RISING) | ||
135 | val |= confmask; | ||
136 | |||
137 | /* | ||
138 | * As recommended by the spec, disable the interrupt before changing | ||
139 | * the configuration | ||
140 | */ | ||
141 | if (readl(base + GIC_DIST_ENABLE_SET + enableoff) & enablemask) { | ||
142 | writel(enablemask, base + GIC_DIST_ENABLE_CLEAR + enableoff); | ||
143 | enabled = true; | ||
144 | } | ||
145 | |||
146 | writel(val, base + GIC_DIST_CONFIG + confoff); | ||
147 | |||
148 | if (enabled) | ||
149 | writel(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); | ||
150 | |||
151 | spin_unlock(&irq_controller_lock); | ||
152 | |||
153 | return 0; | ||
154 | } | ||
155 | |||
111 | #ifdef CONFIG_SMP | 156 | #ifdef CONFIG_SMP |
112 | static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val) | 157 | static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val) |
113 | { | 158 | { |
@@ -161,6 +206,7 @@ static struct irq_chip gic_chip = { | |||
161 | .ack = gic_ack_irq, | 206 | .ack = gic_ack_irq, |
162 | .mask = gic_mask_irq, | 207 | .mask = gic_mask_irq, |
163 | .unmask = gic_unmask_irq, | 208 | .unmask = gic_unmask_irq, |
209 | .set_type = gic_set_type, | ||
164 | #ifdef CONFIG_SMP | 210 | #ifdef CONFIG_SMP |
165 | .set_affinity = gic_set_cpu, | 211 | .set_affinity = gic_set_cpu, |
166 | #endif | 212 | #endif |
diff --git a/arch/arm/configs/lusl7200_defconfig b/arch/arm/configs/lusl7200_defconfig deleted file mode 100644 index 816fc42884c9..000000000000 --- a/arch/arm/configs/lusl7200_defconfig +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_BSD_PROCESS_ACCT=y | ||
4 | CONFIG_LOG_BUF_SHIFT=14 | ||
5 | CONFIG_BLK_DEV_INITRD=y | ||
6 | CONFIG_EMBEDDED=y | ||
7 | # CONFIG_HOTPLUG is not set | ||
8 | CONFIG_MODULES=y | ||
9 | CONFIG_ARCH_L7200=y | ||
10 | # CONFIG_ARM_THUMB is not set | ||
11 | CONFIG_ZBOOT_ROM_TEXT=0x00010000 | ||
12 | CONFIG_ZBOOT_ROM_BSS=0xf03e0000 | ||
13 | CONFIG_ZBOOT_ROM=y | ||
14 | CONFIG_CMDLINE="console=tty0 console=ttyLU1,115200 root=/dev/ram initrd=0xf1000000,0x005dac7b mem=32M" | ||
15 | CONFIG_BINFMT_AOUT=y | ||
16 | CONFIG_BLK_DEV_RAM=y | ||
17 | # CONFIG_INPUT is not set | ||
18 | # CONFIG_SERIO_SERPORT is not set | ||
19 | # CONFIG_VT is not set | ||
20 | CONFIG_SERIAL_NONSTANDARD=y | ||
21 | CONFIG_EXT2_FS=y | ||
22 | CONFIG_DEBUG_USER=y | ||
23 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index f7bd52b1c365..c1062c317103 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define HWCAP_NEON 4096 | 19 | #define HWCAP_NEON 4096 |
20 | #define HWCAP_VFPv3 8192 | 20 | #define HWCAP_VFPv3 8192 |
21 | #define HWCAP_VFPv3D16 16384 | 21 | #define HWCAP_VFPv3D16 16384 |
22 | #define HWCAP_TLS 32768 | ||
22 | 23 | ||
23 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 24 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) |
24 | /* | 25 | /* |
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index 237282f7c762..2721a5814cb9 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #define irq_canonicalize(i) (i) | 7 | #define irq_canonicalize(i) (i) |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #define NR_IRQS_LEGACY 16 | ||
11 | |||
10 | /* | 12 | /* |
11 | * Use this value to indicate lack of interrupt | 13 | * Use this value to indicate lack of interrupt |
12 | * capability | 14 | * capability |
diff --git a/arch/arm/include/asm/kexec.h b/arch/arm/include/asm/kexec.h index df15a0dc228e..8ec9ef5c3c7b 100644 --- a/arch/arm/include/asm/kexec.h +++ b/arch/arm/include/asm/kexec.h | |||
@@ -19,10 +19,26 @@ | |||
19 | 19 | ||
20 | #ifndef __ASSEMBLY__ | 20 | #ifndef __ASSEMBLY__ |
21 | 21 | ||
22 | struct kimage; | 22 | /** |
23 | /* Provide a dummy definition to avoid build failures. */ | 23 | * crash_setup_regs() - save registers for the panic kernel |
24 | * @newregs: registers are saved here | ||
25 | * @oldregs: registers to be saved (may be %NULL) | ||
26 | * | ||
27 | * Function copies machine registers from @oldregs to @newregs. If @oldregs is | ||
28 | * %NULL then current registers are stored there. | ||
29 | */ | ||
24 | static inline void crash_setup_regs(struct pt_regs *newregs, | 30 | static inline void crash_setup_regs(struct pt_regs *newregs, |
25 | struct pt_regs *oldregs) { } | 31 | struct pt_regs *oldregs) |
32 | { | ||
33 | if (oldregs) { | ||
34 | memcpy(newregs, oldregs, sizeof(*newregs)); | ||
35 | } else { | ||
36 | __asm__ __volatile__ ("stmia %0, {r0 - r15}" | ||
37 | : : "r" (&newregs->ARM_r0)); | ||
38 | __asm__ __volatile__ ("mrs %0, cpsr" | ||
39 | : "=r" (newregs->ARM_cpsr)); | ||
40 | } | ||
41 | } | ||
26 | 42 | ||
27 | #endif /* __ASSEMBLY__ */ | 43 | #endif /* __ASSEMBLY__ */ |
28 | 44 | ||
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index d425f2b6efeb..8a0dd18ba642 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -20,6 +20,7 @@ struct machine_desc { | |||
20 | * by assembler code in head.S, head-common.S | 20 | * by assembler code in head.S, head-common.S |
21 | */ | 21 | */ |
22 | unsigned int nr; /* architecture number */ | 22 | unsigned int nr; /* architecture number */ |
23 | unsigned int nr_irqs; /* number of IRQs */ | ||
23 | unsigned int phys_io; /* start of physical io */ | 24 | unsigned int phys_io; /* start of physical io */ |
24 | unsigned int io_pg_offst; /* byte offset for io | 25 | unsigned int io_pg_offst; /* byte offset for io |
25 | * page tabe entry */ | 26 | * page tabe entry */ |
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index 8920b2d6e3b8..ce3eee9fe26c 100644 --- a/arch/arm/include/asm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h | |||
@@ -17,6 +17,7 @@ struct seq_file; | |||
17 | /* | 17 | /* |
18 | * This is internal. Do not use it. | 18 | * This is internal. Do not use it. |
19 | */ | 19 | */ |
20 | extern unsigned int arch_nr_irqs; | ||
20 | extern void (*init_arch_irq)(void); | 21 | extern void (*init_arch_irq)(void); |
21 | extern void init_FIQ(void); | 22 | extern void init_FIQ(void); |
22 | extern int show_fiq_list(struct seq_file *, void *); | 23 | extern int show_fiq_list(struct seq_file *, void *); |
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 9dcb11e59026..c974be8913a7 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -184,6 +184,42 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
184 | #define predicate(x) ((x) & 0xf0000000) | 184 | #define predicate(x) ((x) & 0xf0000000) |
185 | #define PREDICATE_ALWAYS 0xe0000000 | 185 | #define PREDICATE_ALWAYS 0xe0000000 |
186 | 186 | ||
187 | /* | ||
188 | * kprobe-based event tracer support | ||
189 | */ | ||
190 | #include <linux/stddef.h> | ||
191 | #include <linux/types.h> | ||
192 | #define MAX_REG_OFFSET (offsetof(struct pt_regs, ARM_ORIG_r0)) | ||
193 | |||
194 | extern int regs_query_register_offset(const char *name); | ||
195 | extern const char *regs_query_register_name(unsigned int offset); | ||
196 | extern bool regs_within_kernel_stack(struct pt_regs *regs, unsigned long addr); | ||
197 | extern unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, | ||
198 | unsigned int n); | ||
199 | |||
200 | /** | ||
201 | * regs_get_register() - get register value from its offset | ||
202 | * @regs: pt_regs from which register value is gotten | ||
203 | * @offset: offset number of the register. | ||
204 | * | ||
205 | * regs_get_register returns the value of a register whose offset from @regs. | ||
206 | * The @offset is the offset of the register in struct pt_regs. | ||
207 | * If @offset is bigger than MAX_REG_OFFSET, this returns 0. | ||
208 | */ | ||
209 | static inline unsigned long regs_get_register(struct pt_regs *regs, | ||
210 | unsigned int offset) | ||
211 | { | ||
212 | if (unlikely(offset > MAX_REG_OFFSET)) | ||
213 | return 0; | ||
214 | return *(unsigned long *)((unsigned long)regs + offset); | ||
215 | } | ||
216 | |||
217 | /* Valid only for Kernel mode traps. */ | ||
218 | static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) | ||
219 | { | ||
220 | return regs->ARM_sp; | ||
221 | } | ||
222 | |||
187 | #endif /* __KERNEL__ */ | 223 | #endif /* __KERNEL__ */ |
188 | 224 | ||
189 | #endif /* __ASSEMBLY__ */ | 225 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h new file mode 100644 index 000000000000..e71d6ff8d104 --- /dev/null +++ b/arch/arm/include/asm/tls.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __ASMARM_TLS_H | ||
2 | #define __ASMARM_TLS_H | ||
3 | |||
4 | #ifdef __ASSEMBLY__ | ||
5 | .macro set_tls_none, tp, tmp1, tmp2 | ||
6 | .endm | ||
7 | |||
8 | .macro set_tls_v6k, tp, tmp1, tmp2 | ||
9 | mcr p15, 0, \tp, c13, c0, 3 @ set TLS register | ||
10 | .endm | ||
11 | |||
12 | .macro set_tls_v6, tp, tmp1, tmp2 | ||
13 | ldr \tmp1, =elf_hwcap | ||
14 | ldr \tmp1, [\tmp1, #0] | ||
15 | mov \tmp2, #0xffff0fff | ||
16 | tst \tmp1, #HWCAP_TLS @ hardware TLS available? | ||
17 | mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register | ||
18 | streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 | ||
19 | .endm | ||
20 | |||
21 | .macro set_tls_software, tp, tmp1, tmp2 | ||
22 | mov \tmp1, #0xffff0fff | ||
23 | str \tp, [\tmp1, #-15] @ set TLS value at 0xffff0ff0 | ||
24 | .endm | ||
25 | #endif | ||
26 | |||
27 | #ifdef CONFIG_TLS_REG_EMUL | ||
28 | #define tls_emu 1 | ||
29 | #define has_tls_reg 1 | ||
30 | #define set_tls set_tls_none | ||
31 | #elif __LINUX_ARM_ARCH__ >= 7 || \ | ||
32 | (__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) | ||
33 | #define tls_emu 0 | ||
34 | #define has_tls_reg 1 | ||
35 | #define set_tls set_tls_v6k | ||
36 | #elif __LINUX_ARM_ARCH__ == 6 | ||
37 | #define tls_emu 0 | ||
38 | #define has_tls_reg (elf_hwcap & HWCAP_TLS) | ||
39 | #define set_tls set_tls_v6 | ||
40 | #else | ||
41 | #define tls_emu 0 | ||
42 | #define has_tls_reg 0 | ||
43 | #define set_tls set_tls_software | ||
44 | #endif | ||
45 | |||
46 | #endif /* __ASMARM_TLS_H */ | ||
diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h index 422f3cc204a2..3d5fc41ae8d3 100644 --- a/arch/arm/include/asm/vfpmacros.h +++ b/arch/arm/include/asm/vfpmacros.h | |||
@@ -3,6 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Assembler-only file containing VFP macros and register definitions. | 4 | * Assembler-only file containing VFP macros and register definitions. |
5 | */ | 5 | */ |
6 | #include <asm/hwcap.h> | ||
7 | |||
6 | #include "vfp.h" | 8 | #include "vfp.h" |
7 | 9 | ||
8 | @ Macros to allow building with old toolkits (with no VFP support) | 10 | @ Macros to allow building with old toolkits (with no VFP support) |
@@ -22,12 +24,20 @@ | |||
22 | LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15} | 24 | LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15} |
23 | #endif | 25 | #endif |
24 | #ifdef CONFIG_VFPv3 | 26 | #ifdef CONFIG_VFPv3 |
27 | #if __LINUX_ARM_ARCH__ <= 6 | ||
28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | ||
29 | ldr \tmp, [\tmp, #0] | ||
30 | tst \tmp, #HWCAP_VFPv3D16 | ||
31 | ldceq p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | ||
32 | addne \base, \base, #32*4 @ step over unused register space | ||
33 | #else | ||
25 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
26 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | 35 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field |
27 | cmp \tmp, #2 @ 32 x 64bit registers? | 36 | cmp \tmp, #2 @ 32 x 64bit registers? |
28 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | 37 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} |
29 | addne \base, \base, #32*4 @ step over unused register space | 38 | addne \base, \base, #32*4 @ step over unused register space |
30 | #endif | 39 | #endif |
40 | #endif | ||
31 | .endm | 41 | .endm |
32 | 42 | ||
33 | @ write all the working registers out of the VFP | 43 | @ write all the working registers out of the VFP |
@@ -38,10 +48,18 @@ | |||
38 | STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15} | 48 | STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15} |
39 | #endif | 49 | #endif |
40 | #ifdef CONFIG_VFPv3 | 50 | #ifdef CONFIG_VFPv3 |
51 | #if __LINUX_ARM_ARCH__ <= 6 | ||
52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | ||
53 | ldr \tmp, [\tmp, #0] | ||
54 | tst \tmp, #HWCAP_VFPv3D16 | ||
55 | stceq p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | ||
56 | addne \base, \base, #32*4 @ step over unused register space | ||
57 | #else | ||
41 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
42 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | 59 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field |
43 | cmp \tmp, #2 @ 32 x 64bit registers? | 60 | cmp \tmp, #2 @ 32 x 64bit registers? |
44 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | 61 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} |
45 | addne \base, \base, #32*4 @ step over unused register space | 62 | addne \base, \base, #32*4 @ step over unused register space |
46 | #endif | 63 | #endif |
64 | #endif | ||
47 | .endm | 65 | .endm |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 26d302c28e13..ea023c6aa31e 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -39,6 +39,7 @@ obj-$(CONFIG_ARM_THUMBEE) += thumbee.o | |||
39 | obj-$(CONFIG_KGDB) += kgdb.o | 39 | obj-$(CONFIG_KGDB) += kgdb.o |
40 | obj-$(CONFIG_ARM_UNWIND) += unwind.o | 40 | obj-$(CONFIG_ARM_UNWIND) += unwind.o |
41 | obj-$(CONFIG_HAVE_TCM) += tcm.o | 41 | obj-$(CONFIG_HAVE_TCM) += tcm.o |
42 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | ||
42 | 43 | ||
43 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o | 44 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o |
44 | AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 | 45 | AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 |
diff --git a/arch/arm/kernel/crash_dump.c b/arch/arm/kernel/crash_dump.c new file mode 100644 index 000000000000..cd3b853a8a6d --- /dev/null +++ b/arch/arm/kernel/crash_dump.c | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * arch/arm/kernel/crash_dump.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia Corporation. | ||
5 | * Author: Mika Westerberg | ||
6 | * | ||
7 | * This code is taken from arch/x86/kernel/crash_dump_64.c | ||
8 | * Created by: Hariprasad Nellitheertha (hari@in.ibm.com) | ||
9 | * Copyright (C) IBM Corporation, 2004. All rights reserved | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/errno.h> | ||
17 | #include <linux/crash_dump.h> | ||
18 | #include <linux/uaccess.h> | ||
19 | #include <linux/io.h> | ||
20 | |||
21 | /* stores the physical address of elf header of crash image */ | ||
22 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; | ||
23 | |||
24 | /** | ||
25 | * copy_oldmem_page() - copy one page from old kernel memory | ||
26 | * @pfn: page frame number to be copied | ||
27 | * @buf: buffer where the copied page is placed | ||
28 | * @csize: number of bytes to copy | ||
29 | * @offset: offset in bytes into the page | ||
30 | * @userbuf: if set, @buf is int he user address space | ||
31 | * | ||
32 | * This function copies one page from old kernel memory into buffer pointed by | ||
33 | * @buf. If @buf is in userspace, set @userbuf to %1. Returns number of bytes | ||
34 | * copied or negative error in case of failure. | ||
35 | */ | ||
36 | ssize_t copy_oldmem_page(unsigned long pfn, char *buf, | ||
37 | size_t csize, unsigned long offset, | ||
38 | int userbuf) | ||
39 | { | ||
40 | void *vaddr; | ||
41 | |||
42 | if (!csize) | ||
43 | return 0; | ||
44 | |||
45 | vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE); | ||
46 | if (!vaddr) | ||
47 | return -ENOMEM; | ||
48 | |||
49 | if (userbuf) { | ||
50 | if (copy_to_user(buf, vaddr + offset, csize)) { | ||
51 | iounmap(vaddr); | ||
52 | return -EFAULT; | ||
53 | } | ||
54 | } else { | ||
55 | memcpy(buf, vaddr + offset, csize); | ||
56 | } | ||
57 | |||
58 | iounmap(vaddr); | ||
59 | return csize; | ||
60 | } | ||
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 3fd7861de4d1..e864e482118a 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/thread_notify.h> | 22 | #include <asm/thread_notify.h> |
23 | #include <asm/unwind.h> | 23 | #include <asm/unwind.h> |
24 | #include <asm/unistd.h> | 24 | #include <asm/unistd.h> |
25 | #include <asm/tls.h> | ||
25 | 26 | ||
26 | #include "entry-header.S" | 27 | #include "entry-header.S" |
27 | 28 | ||
@@ -735,12 +736,7 @@ ENTRY(__switch_to) | |||
735 | #ifdef CONFIG_MMU | 736 | #ifdef CONFIG_MMU |
736 | ldr r6, [r2, #TI_CPU_DOMAIN] | 737 | ldr r6, [r2, #TI_CPU_DOMAIN] |
737 | #endif | 738 | #endif |
738 | #if defined(CONFIG_HAS_TLS_REG) | 739 | set_tls r3, r4, r5 |
739 | mcr p15, 0, r3, c13, c0, 3 @ set TLS register | ||
740 | #elif !defined(CONFIG_TLS_REG_EMUL) | ||
741 | mov r4, #0xffff0fff | ||
742 | str r3, [r4, #-15] @ TLS val at 0xffff0ff0 | ||
743 | #endif | ||
744 | #ifdef CONFIG_MMU | 740 | #ifdef CONFIG_MMU |
745 | mcr p15, 0, r6, c3, c0, 0 @ Set domain register | 741 | mcr p15, 0, r6, c3, c0, 0 @ Set domain register |
746 | #endif | 742 | #endif |
@@ -1005,17 +1001,12 @@ kuser_cmpxchg_fixup: | |||
1005 | */ | 1001 | */ |
1006 | 1002 | ||
1007 | __kuser_get_tls: @ 0xffff0fe0 | 1003 | __kuser_get_tls: @ 0xffff0fe0 |
1008 | 1004 | ldr r0, [pc, #(16 - 8)] @ read TLS, set in kuser_get_tls_init | |
1009 | #if !defined(CONFIG_HAS_TLS_REG) && !defined(CONFIG_TLS_REG_EMUL) | ||
1010 | ldr r0, [pc, #(16 - 8)] @ TLS stored at 0xffff0ff0 | ||
1011 | #else | ||
1012 | mrc p15, 0, r0, c13, c0, 3 @ read TLS register | ||
1013 | #endif | ||
1014 | usr_ret lr | 1005 | usr_ret lr |
1015 | 1006 | mrc p15, 0, r0, c13, c0, 3 @ 0xffff0fe8 hardware TLS code | |
1016 | .rep 5 | 1007 | .rep 4 |
1017 | .word 0 @ pad up to __kuser_helper_version | 1008 | .word 0 @ 0xffff0ff0 software TLS value, then |
1018 | .endr | 1009 | .endr @ pad up to __kuser_helper_version |
1019 | 1010 | ||
1020 | /* | 1011 | /* |
1021 | * Reference declaration: | 1012 | * Reference declaration: |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 3b3d2c80509c..c0d5c3b3a760 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -47,12 +47,14 @@ | |||
47 | #define irq_finish(irq) do { } while (0) | 47 | #define irq_finish(irq) do { } while (0) |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | unsigned int arch_nr_irqs; | ||
50 | void (*init_arch_irq)(void) __initdata = NULL; | 51 | void (*init_arch_irq)(void) __initdata = NULL; |
51 | unsigned long irq_err_count; | 52 | unsigned long irq_err_count; |
52 | 53 | ||
53 | int show_interrupts(struct seq_file *p, void *v) | 54 | int show_interrupts(struct seq_file *p, void *v) |
54 | { | 55 | { |
55 | int i = *(loff_t *) v, cpu; | 56 | int i = *(loff_t *) v, cpu; |
57 | struct irq_desc *desc; | ||
56 | struct irqaction * action; | 58 | struct irqaction * action; |
57 | unsigned long flags; | 59 | unsigned long flags; |
58 | 60 | ||
@@ -67,24 +69,25 @@ int show_interrupts(struct seq_file *p, void *v) | |||
67 | seq_putc(p, '\n'); | 69 | seq_putc(p, '\n'); |
68 | } | 70 | } |
69 | 71 | ||
70 | if (i < NR_IRQS) { | 72 | if (i < nr_irqs) { |
71 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); | 73 | desc = irq_to_desc(i); |
72 | action = irq_desc[i].action; | 74 | raw_spin_lock_irqsave(&desc->lock, flags); |
75 | action = desc->action; | ||
73 | if (!action) | 76 | if (!action) |
74 | goto unlock; | 77 | goto unlock; |
75 | 78 | ||
76 | seq_printf(p, "%3d: ", i); | 79 | seq_printf(p, "%3d: ", i); |
77 | for_each_present_cpu(cpu) | 80 | for_each_present_cpu(cpu) |
78 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); | 81 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); |
79 | seq_printf(p, " %10s", irq_desc[i].chip->name ? : "-"); | 82 | seq_printf(p, " %10s", desc->chip->name ? : "-"); |
80 | seq_printf(p, " %s", action->name); | 83 | seq_printf(p, " %s", action->name); |
81 | for (action = action->next; action; action = action->next) | 84 | for (action = action->next; action; action = action->next) |
82 | seq_printf(p, ", %s", action->name); | 85 | seq_printf(p, ", %s", action->name); |
83 | 86 | ||
84 | seq_putc(p, '\n'); | 87 | seq_putc(p, '\n'); |
85 | unlock: | 88 | unlock: |
86 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 89 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
87 | } else if (i == NR_IRQS) { | 90 | } else if (i == nr_irqs) { |
88 | #ifdef CONFIG_FIQ | 91 | #ifdef CONFIG_FIQ |
89 | show_fiq_list(p, v); | 92 | show_fiq_list(p, v); |
90 | #endif | 93 | #endif |
@@ -112,7 +115,7 @@ asmlinkage void __exception asm_do_IRQ(unsigned int irq, struct pt_regs *regs) | |||
112 | * Some hardware gives randomly wrong interrupts. Rather | 115 | * Some hardware gives randomly wrong interrupts. Rather |
113 | * than crashing, do something sensible. | 116 | * than crashing, do something sensible. |
114 | */ | 117 | */ |
115 | if (unlikely(irq >= NR_IRQS)) { | 118 | if (unlikely(irq >= nr_irqs)) { |
116 | if (printk_ratelimit()) | 119 | if (printk_ratelimit()) |
117 | printk(KERN_WARNING "Bad IRQ%u\n", irq); | 120 | printk(KERN_WARNING "Bad IRQ%u\n", irq); |
118 | ack_bad_irq(irq); | 121 | ack_bad_irq(irq); |
@@ -132,12 +135,12 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
132 | struct irq_desc *desc; | 135 | struct irq_desc *desc; |
133 | unsigned long flags; | 136 | unsigned long flags; |
134 | 137 | ||
135 | if (irq >= NR_IRQS) { | 138 | if (irq >= nr_irqs) { |
136 | printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq); | 139 | printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq); |
137 | return; | 140 | return; |
138 | } | 141 | } |
139 | 142 | ||
140 | desc = irq_desc + irq; | 143 | desc = irq_to_desc(irq); |
141 | raw_spin_lock_irqsave(&desc->lock, flags); | 144 | raw_spin_lock_irqsave(&desc->lock, flags); |
142 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; | 145 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; |
143 | if (iflags & IRQF_VALID) | 146 | if (iflags & IRQF_VALID) |
@@ -151,14 +154,25 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
151 | 154 | ||
152 | void __init init_IRQ(void) | 155 | void __init init_IRQ(void) |
153 | { | 156 | { |
157 | struct irq_desc *desc; | ||
154 | int irq; | 158 | int irq; |
155 | 159 | ||
156 | for (irq = 0; irq < NR_IRQS; irq++) | 160 | for (irq = 0; irq < nr_irqs; irq++) { |
157 | irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE; | 161 | desc = irq_to_desc_alloc_node(irq, 0); |
162 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE; | ||
163 | } | ||
158 | 164 | ||
159 | init_arch_irq(); | 165 | init_arch_irq(); |
160 | } | 166 | } |
161 | 167 | ||
168 | #ifdef CONFIG_SPARSE_IRQ | ||
169 | int __init arch_probe_nr_irqs(void) | ||
170 | { | ||
171 | nr_irqs = arch_nr_irqs ? arch_nr_irqs : NR_IRQS; | ||
172 | return 0; | ||
173 | } | ||
174 | #endif | ||
175 | |||
162 | #ifdef CONFIG_HOTPLUG_CPU | 176 | #ifdef CONFIG_HOTPLUG_CPU |
163 | 177 | ||
164 | static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) | 178 | static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) |
@@ -178,10 +192,9 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) | |||
178 | void migrate_irqs(void) | 192 | void migrate_irqs(void) |
179 | { | 193 | { |
180 | unsigned int i, cpu = smp_processor_id(); | 194 | unsigned int i, cpu = smp_processor_id(); |
195 | struct irq_desc *desc; | ||
181 | 196 | ||
182 | for (i = 0; i < NR_IRQS; i++) { | 197 | for_each_irq_desc(i, desc) { |
183 | struct irq_desc *desc = irq_desc + i; | ||
184 | |||
185 | if (desc->node == cpu) { | 198 | if (desc->node == cpu) { |
186 | unsigned int newcpu = cpumask_any_and(desc->affinity, | 199 | unsigned int newcpu = cpumask_any_and(desc->affinity, |
187 | cpu_online_mask); | 200 | cpu_online_mask); |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 598ca61e7bca..81e989858d42 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -43,6 +43,10 @@ void machine_shutdown(void) | |||
43 | 43 | ||
44 | void machine_crash_shutdown(struct pt_regs *regs) | 44 | void machine_crash_shutdown(struct pt_regs *regs) |
45 | { | 45 | { |
46 | local_irq_disable(); | ||
47 | crash_save_cpu(regs, smp_processor_id()); | ||
48 | |||
49 | printk(KERN_INFO "Loading crashdump kernel...\n"); | ||
46 | } | 50 | } |
47 | 51 | ||
48 | void machine_kexec(struct kimage *image) | 52 | void machine_kexec(struct kimage *image) |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 3f562a7c0a99..f99d489822d5 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -52,6 +52,102 @@ | |||
52 | #define BREAKINST_THUMB 0xde01 | 52 | #define BREAKINST_THUMB 0xde01 |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | struct pt_regs_offset { | ||
56 | const char *name; | ||
57 | int offset; | ||
58 | }; | ||
59 | |||
60 | #define REG_OFFSET_NAME(r) \ | ||
61 | {.name = #r, .offset = offsetof(struct pt_regs, ARM_##r)} | ||
62 | #define REG_OFFSET_END {.name = NULL, .offset = 0} | ||
63 | |||
64 | static const struct pt_regs_offset regoffset_table[] = { | ||
65 | REG_OFFSET_NAME(r0), | ||
66 | REG_OFFSET_NAME(r1), | ||
67 | REG_OFFSET_NAME(r2), | ||
68 | REG_OFFSET_NAME(r3), | ||
69 | REG_OFFSET_NAME(r4), | ||
70 | REG_OFFSET_NAME(r5), | ||
71 | REG_OFFSET_NAME(r6), | ||
72 | REG_OFFSET_NAME(r7), | ||
73 | REG_OFFSET_NAME(r8), | ||
74 | REG_OFFSET_NAME(r9), | ||
75 | REG_OFFSET_NAME(r10), | ||
76 | REG_OFFSET_NAME(fp), | ||
77 | REG_OFFSET_NAME(ip), | ||
78 | REG_OFFSET_NAME(sp), | ||
79 | REG_OFFSET_NAME(lr), | ||
80 | REG_OFFSET_NAME(pc), | ||
81 | REG_OFFSET_NAME(cpsr), | ||
82 | REG_OFFSET_NAME(ORIG_r0), | ||
83 | REG_OFFSET_END, | ||
84 | }; | ||
85 | |||
86 | /** | ||
87 | * regs_query_register_offset() - query register offset from its name | ||
88 | * @name: the name of a register | ||
89 | * | ||
90 | * regs_query_register_offset() returns the offset of a register in struct | ||
91 | * pt_regs from its name. If the name is invalid, this returns -EINVAL; | ||
92 | */ | ||
93 | int regs_query_register_offset(const char *name) | ||
94 | { | ||
95 | const struct pt_regs_offset *roff; | ||
96 | for (roff = regoffset_table; roff->name != NULL; roff++) | ||
97 | if (!strcmp(roff->name, name)) | ||
98 | return roff->offset; | ||
99 | return -EINVAL; | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * regs_query_register_name() - query register name from its offset | ||
104 | * @offset: the offset of a register in struct pt_regs. | ||
105 | * | ||
106 | * regs_query_register_name() returns the name of a register from its | ||
107 | * offset in struct pt_regs. If the @offset is invalid, this returns NULL; | ||
108 | */ | ||
109 | const char *regs_query_register_name(unsigned int offset) | ||
110 | { | ||
111 | const struct pt_regs_offset *roff; | ||
112 | for (roff = regoffset_table; roff->name != NULL; roff++) | ||
113 | if (roff->offset == offset) | ||
114 | return roff->name; | ||
115 | return NULL; | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * regs_within_kernel_stack() - check the address in the stack | ||
120 | * @regs: pt_regs which contains kernel stack pointer. | ||
121 | * @addr: address which is checked. | ||
122 | * | ||
123 | * regs_within_kernel_stack() checks @addr is within the kernel stack page(s). | ||
124 | * If @addr is within the kernel stack, it returns true. If not, returns false. | ||
125 | */ | ||
126 | bool regs_within_kernel_stack(struct pt_regs *regs, unsigned long addr) | ||
127 | { | ||
128 | return ((addr & ~(THREAD_SIZE - 1)) == | ||
129 | (kernel_stack_pointer(regs) & ~(THREAD_SIZE - 1))); | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * regs_get_kernel_stack_nth() - get Nth entry of the stack | ||
134 | * @regs: pt_regs which contains kernel stack pointer. | ||
135 | * @n: stack entry number. | ||
136 | * | ||
137 | * regs_get_kernel_stack_nth() returns @n th entry of the kernel stack which | ||
138 | * is specified by @regs. If the @n th entry is NOT in the kernel stack, | ||
139 | * this returns 0. | ||
140 | */ | ||
141 | unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n) | ||
142 | { | ||
143 | unsigned long *addr = (unsigned long *)kernel_stack_pointer(regs); | ||
144 | addr += n; | ||
145 | if (regs_within_kernel_stack(regs, (unsigned long)addr)) | ||
146 | return *addr; | ||
147 | else | ||
148 | return 0; | ||
149 | } | ||
150 | |||
55 | /* | 151 | /* |
56 | * this routine will get a word off of the processes privileged stack. | 152 | * this routine will get a word off of the processes privileged stack. |
57 | * the offset is how far from the base addr as stored in the THREAD. | 153 | * the offset is how far from the base addr as stored in the THREAD. |
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index 61930eb09029..fd26f8d65151 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S | |||
@@ -10,6 +10,12 @@ relocate_new_kernel: | |||
10 | ldr r0,kexec_indirection_page | 10 | ldr r0,kexec_indirection_page |
11 | ldr r1,kexec_start_address | 11 | ldr r1,kexec_start_address |
12 | 12 | ||
13 | /* | ||
14 | * If there is no indirection page (we are doing crashdumps) | ||
15 | * skip any relocation. | ||
16 | */ | ||
17 | cmp r0, #0 | ||
18 | beq 2f | ||
13 | 19 | ||
14 | 0: /* top, read another word for the indirection page */ | 20 | 0: /* top, read another word for the indirection page */ |
15 | ldr r3, [r0],#4 | 21 | ldr r3, [r0],#4 |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 31b2643bb0c6..776ea1aa974b 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | #include <linux/screen_info.h> | 20 | #include <linux/screen_info.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kexec.h> | ||
23 | #include <linux/crash_dump.h> | ||
22 | #include <linux/root_dev.h> | 24 | #include <linux/root_dev.h> |
23 | #include <linux/cpu.h> | 25 | #include <linux/cpu.h> |
24 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
@@ -270,6 +272,21 @@ static void __init cacheid_init(void) | |||
270 | extern struct proc_info_list *lookup_processor_type(unsigned int); | 272 | extern struct proc_info_list *lookup_processor_type(unsigned int); |
271 | extern struct machine_desc *lookup_machine_type(unsigned int); | 273 | extern struct machine_desc *lookup_machine_type(unsigned int); |
272 | 274 | ||
275 | static void __init feat_v6_fixup(void) | ||
276 | { | ||
277 | int id = read_cpuid_id(); | ||
278 | |||
279 | if ((id & 0xff0f0000) != 0x41070000) | ||
280 | return; | ||
281 | |||
282 | /* | ||
283 | * HWCAP_TLS is available only on 1136 r1p0 and later, | ||
284 | * see also kuser_get_tls_init. | ||
285 | */ | ||
286 | if ((((id >> 4) & 0xfff) == 0xb36) && (((id >> 20) & 3) == 0)) | ||
287 | elf_hwcap &= ~HWCAP_TLS; | ||
288 | } | ||
289 | |||
273 | static void __init setup_processor(void) | 290 | static void __init setup_processor(void) |
274 | { | 291 | { |
275 | struct proc_info_list *list; | 292 | struct proc_info_list *list; |
@@ -312,6 +329,8 @@ static void __init setup_processor(void) | |||
312 | elf_hwcap &= ~HWCAP_THUMB; | 329 | elf_hwcap &= ~HWCAP_THUMB; |
313 | #endif | 330 | #endif |
314 | 331 | ||
332 | feat_v6_fixup(); | ||
333 | |||
315 | cacheid_init(); | 334 | cacheid_init(); |
316 | cpu_proc_init(); | 335 | cpu_proc_init(); |
317 | } | 336 | } |
@@ -663,6 +682,79 @@ static int __init customize_machine(void) | |||
663 | } | 682 | } |
664 | arch_initcall(customize_machine); | 683 | arch_initcall(customize_machine); |
665 | 684 | ||
685 | #ifdef CONFIG_KEXEC | ||
686 | static inline unsigned long long get_total_mem(void) | ||
687 | { | ||
688 | unsigned long total; | ||
689 | |||
690 | total = max_low_pfn - min_low_pfn; | ||
691 | return total << PAGE_SHIFT; | ||
692 | } | ||
693 | |||
694 | /** | ||
695 | * reserve_crashkernel() - reserves memory are for crash kernel | ||
696 | * | ||
697 | * This function reserves memory area given in "crashkernel=" kernel command | ||
698 | * line parameter. The memory reserved is used by a dump capture kernel when | ||
699 | * primary kernel is crashing. | ||
700 | */ | ||
701 | static void __init reserve_crashkernel(void) | ||
702 | { | ||
703 | unsigned long long crash_size, crash_base; | ||
704 | unsigned long long total_mem; | ||
705 | int ret; | ||
706 | |||
707 | total_mem = get_total_mem(); | ||
708 | ret = parse_crashkernel(boot_command_line, total_mem, | ||
709 | &crash_size, &crash_base); | ||
710 | if (ret) | ||
711 | return; | ||
712 | |||
713 | ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE); | ||
714 | if (ret < 0) { | ||
715 | printk(KERN_WARNING "crashkernel reservation failed - " | ||
716 | "memory is in use (0x%lx)\n", (unsigned long)crash_base); | ||
717 | return; | ||
718 | } | ||
719 | |||
720 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
721 | "for crashkernel (System RAM: %ldMB)\n", | ||
722 | (unsigned long)(crash_size >> 20), | ||
723 | (unsigned long)(crash_base >> 20), | ||
724 | (unsigned long)(total_mem >> 20)); | ||
725 | |||
726 | crashk_res.start = crash_base; | ||
727 | crashk_res.end = crash_base + crash_size - 1; | ||
728 | insert_resource(&iomem_resource, &crashk_res); | ||
729 | } | ||
730 | #else | ||
731 | static inline void reserve_crashkernel(void) {} | ||
732 | #endif /* CONFIG_KEXEC */ | ||
733 | |||
734 | /* | ||
735 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by | ||
736 | * is_kdump_kernel() to determine if we are booting after a panic. Hence | ||
737 | * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. | ||
738 | */ | ||
739 | |||
740 | #ifdef CONFIG_CRASH_DUMP | ||
741 | /* | ||
742 | * elfcorehdr= specifies the location of elf core header stored by the crashed | ||
743 | * kernel. This option will be passed by kexec loader to the capture kernel. | ||
744 | */ | ||
745 | static int __init setup_elfcorehdr(char *arg) | ||
746 | { | ||
747 | char *end; | ||
748 | |||
749 | if (!arg) | ||
750 | return -EINVAL; | ||
751 | |||
752 | elfcorehdr_addr = memparse(arg, &end); | ||
753 | return end > arg ? 0 : -EINVAL; | ||
754 | } | ||
755 | early_param("elfcorehdr", setup_elfcorehdr); | ||
756 | #endif /* CONFIG_CRASH_DUMP */ | ||
757 | |||
666 | void __init setup_arch(char **cmdline_p) | 758 | void __init setup_arch(char **cmdline_p) |
667 | { | 759 | { |
668 | struct tag *tags = (struct tag *)&init_tags; | 760 | struct tag *tags = (struct tag *)&init_tags; |
@@ -724,6 +816,7 @@ void __init setup_arch(char **cmdline_p) | |||
724 | #ifdef CONFIG_SMP | 816 | #ifdef CONFIG_SMP |
725 | smp_init_cpus(); | 817 | smp_init_cpus(); |
726 | #endif | 818 | #endif |
819 | reserve_crashkernel(); | ||
727 | 820 | ||
728 | cpu_init(); | 821 | cpu_init(); |
729 | tcm_init(); | 822 | tcm_init(); |
@@ -731,6 +824,7 @@ void __init setup_arch(char **cmdline_p) | |||
731 | /* | 824 | /* |
732 | * Set up various architecture-specific pointers | 825 | * Set up various architecture-specific pointers |
733 | */ | 826 | */ |
827 | arch_nr_irqs = mdesc->nr_irqs; | ||
734 | init_arch_irq = mdesc->init_irq; | 828 | init_arch_irq = mdesc->init_irq; |
735 | system_timer = mdesc->timer; | 829 | system_timer = mdesc->timer; |
736 | init_machine = mdesc->init_machine; | 830 | init_machine = mdesc->init_machine; |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 1621e5327b2a..cda78d59aa31 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/unistd.h> | 30 | #include <asm/unistd.h> |
31 | #include <asm/traps.h> | 31 | #include <asm/traps.h> |
32 | #include <asm/unwind.h> | 32 | #include <asm/unwind.h> |
33 | #include <asm/tls.h> | ||
33 | 34 | ||
34 | #include "ptrace.h" | 35 | #include "ptrace.h" |
35 | #include "signal.h" | 36 | #include "signal.h" |
@@ -518,17 +519,20 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
518 | 519 | ||
519 | case NR(set_tls): | 520 | case NR(set_tls): |
520 | thread->tp_value = regs->ARM_r0; | 521 | thread->tp_value = regs->ARM_r0; |
521 | #if defined(CONFIG_HAS_TLS_REG) | 522 | if (tls_emu) |
522 | asm ("mcr p15, 0, %0, c13, c0, 3" : : "r" (regs->ARM_r0) ); | 523 | return 0; |
523 | #elif !defined(CONFIG_TLS_REG_EMUL) | 524 | if (has_tls_reg) { |
524 | /* | 525 | asm ("mcr p15, 0, %0, c13, c0, 3" |
525 | * User space must never try to access this directly. | 526 | : : "r" (regs->ARM_r0)); |
526 | * Expect your app to break eventually if you do so. | 527 | } else { |
527 | * The user helper at 0xffff0fe0 must be used instead. | 528 | /* |
528 | * (see entry-armv.S for details) | 529 | * User space must never try to access this directly. |
529 | */ | 530 | * Expect your app to break eventually if you do so. |
530 | *((unsigned int *)0xffff0ff0) = regs->ARM_r0; | 531 | * The user helper at 0xffff0fe0 must be used instead. |
531 | #endif | 532 | * (see entry-armv.S for details) |
533 | */ | ||
534 | *((unsigned int *)0xffff0ff0) = regs->ARM_r0; | ||
535 | } | ||
532 | return 0; | 536 | return 0; |
533 | 537 | ||
534 | #ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG | 538 | #ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG |
@@ -743,6 +747,16 @@ void __init trap_init(void) | |||
743 | return; | 747 | return; |
744 | } | 748 | } |
745 | 749 | ||
750 | static void __init kuser_get_tls_init(unsigned long vectors) | ||
751 | { | ||
752 | /* | ||
753 | * vectors + 0xfe0 = __kuser_get_tls | ||
754 | * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8 | ||
755 | */ | ||
756 | if (tls_emu || has_tls_reg) | ||
757 | memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4); | ||
758 | } | ||
759 | |||
746 | void __init early_trap_init(void) | 760 | void __init early_trap_init(void) |
747 | { | 761 | { |
748 | unsigned long vectors = CONFIG_VECTORS_BASE; | 762 | unsigned long vectors = CONFIG_VECTORS_BASE; |
@@ -761,6 +775,11 @@ void __init early_trap_init(void) | |||
761 | memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); | 775 | memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); |
762 | 776 | ||
763 | /* | 777 | /* |
778 | * Do processor specific fixups for the kuser helpers | ||
779 | */ | ||
780 | kuser_get_tls_init(vectors); | ||
781 | |||
782 | /* | ||
764 | * Copy signal return handlers into the vector page, and | 783 | * Copy signal return handlers into the vector page, and |
765 | * set sigreturn to be a pointer to these. | 784 | * set sigreturn to be a pointer to these. |
766 | */ | 785 | */ |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 030ba7219f48..59ff42ddf0ae 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -41,7 +41,6 @@ else | |||
41 | endif | 41 | endif |
42 | 42 | ||
43 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o | 43 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o |
44 | lib-$(CONFIG_ARCH_L7200) += io-acorn.o | ||
45 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o | 44 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o |
46 | 45 | ||
47 | $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S | 46 | $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 841eaf8f27e2..939bccd70569 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -366,6 +366,17 @@ config MACH_STAMP9G20 | |||
366 | 366 | ||
367 | endif | 367 | endif |
368 | 368 | ||
369 | if (ARCH_AT91SAM9260 || ARCH_AT91SAM9G20) | ||
370 | comment "AT91SAM9260/AT91SAM9G20 boards" | ||
371 | |||
372 | config MACH_SNAPPER_9260 | ||
373 | bool "Bluewater Systems Snapper 9260/9G20 module" | ||
374 | help | ||
375 | Select this if you are using the Bluewater Systems Snapper 9260 or | ||
376 | Snapper 9G20 modules. | ||
377 | <http://www.bluewatersys.com/> | ||
378 | endif | ||
379 | |||
369 | # ---------------------------------------------------------- | 380 | # ---------------------------------------------------------- |
370 | 381 | ||
371 | if ARCH_AT91SAM9G45 | 382 | if ARCH_AT91SAM9G45 |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index c1f821e58222..ca2ac003f41f 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -66,6 +66,9 @@ obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o | |||
66 | obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o | 66 | obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o |
67 | obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o | 67 | obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o |
68 | 68 | ||
69 | # AT91SAM9260/AT91SAM9G20 board-specific support | ||
70 | obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o | ||
71 | |||
69 | # AT91SAM9G45 board-specific support | 72 | # AT91SAM9G45 board-specific support |
70 | obj-$(CONFIG_MACH_AT91SAM9G45EKES) += board-sam9m10g45ek.o | 73 | obj-$(CONFIG_MACH_AT91SAM9G45EKES) += board-sam9m10g45ek.o |
71 | 74 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 85166b7e69a1..753c0d31a3d3 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <mach/at91_pmc.h> | 20 | #include <mach/at91_pmc.h> |
21 | #include <mach/at91_rstc.h> | 21 | #include <mach/at91_rstc.h> |
22 | #include <mach/at91_shdwc.h> | 22 | #include <mach/at91_shdwc.h> |
23 | #include <mach/cpu.h> | ||
23 | 24 | ||
24 | #include "generic.h" | 25 | #include "generic.h" |
25 | #include "clock.h" | 26 | #include "clock.h" |
@@ -176,6 +177,13 @@ static struct clk mmc1_clk = { | |||
176 | .type = CLK_TYPE_PERIPHERAL, | 177 | .type = CLK_TYPE_PERIPHERAL, |
177 | }; | 178 | }; |
178 | 179 | ||
180 | /* Video decoder clock - Only for sam9m10/sam9m11 */ | ||
181 | static struct clk vdec_clk = { | ||
182 | .name = "vdec_clk", | ||
183 | .pmc_mask = 1 << AT91SAM9G45_ID_VDEC, | ||
184 | .type = CLK_TYPE_PERIPHERAL, | ||
185 | }; | ||
186 | |||
179 | /* One additional fake clock for ohci */ | 187 | /* One additional fake clock for ohci */ |
180 | static struct clk ohci_clk = { | 188 | static struct clk ohci_clk = { |
181 | .name = "ohci_clk", | 189 | .name = "ohci_clk", |
@@ -239,6 +247,9 @@ static void __init at91sam9g45_register_clocks(void) | |||
239 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 247 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
240 | clk_register(periph_clocks[i]); | 248 | clk_register(periph_clocks[i]); |
241 | 249 | ||
250 | if (cpu_is_at91sam9m10() || cpu_is_at91sam9m11()) | ||
251 | clk_register(&vdec_clk); | ||
252 | |||
242 | clk_register(&pck0); | 253 | clk_register(&pck0); |
243 | clk_register(&pck1); | 254 | clk_register(&pck1); |
244 | } | 255 | } |
diff --git a/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c b/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c index a4102d72cc9b..c49f5c003ee1 100644 --- a/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c +++ b/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c | |||
@@ -26,6 +26,9 @@ | |||
26 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
27 | #include <linux/spi/at73c213.h> | 27 | #include <linux/spi/at73c213.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/regulator/machine.h> | ||
30 | #include <linux/regulator/fixed.h> | ||
31 | #include <linux/regulator/consumer.h> | ||
29 | 32 | ||
30 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
31 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
@@ -235,6 +238,46 @@ static struct gpio_led ek_leds[] = { | |||
235 | } | 238 | } |
236 | }; | 239 | }; |
237 | 240 | ||
241 | #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) | ||
242 | static struct regulator_consumer_supply ek_audio_consumer_supplies[] = { | ||
243 | REGULATOR_SUPPLY("AVDD", "0-001b"), | ||
244 | REGULATOR_SUPPLY("HPVDD", "0-001b"), | ||
245 | REGULATOR_SUPPLY("DBVDD", "0-001b"), | ||
246 | REGULATOR_SUPPLY("DCVDD", "0-001b"), | ||
247 | }; | ||
248 | |||
249 | static struct regulator_init_data ek_avdd_reg_init_data = { | ||
250 | .constraints = { | ||
251 | .name = "3V3", | ||
252 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
253 | }, | ||
254 | .consumer_supplies = ek_audio_consumer_supplies, | ||
255 | .num_consumer_supplies = ARRAY_SIZE(ek_audio_consumer_supplies), | ||
256 | }; | ||
257 | |||
258 | static struct fixed_voltage_config ek_vdd_pdata = { | ||
259 | .supply_name = "board-3V3", | ||
260 | .microvolts = 3300000, | ||
261 | .gpio = -EINVAL, | ||
262 | .enabled_at_boot = 0, | ||
263 | .init_data = &ek_avdd_reg_init_data, | ||
264 | }; | ||
265 | static struct platform_device ek_voltage_regulator = { | ||
266 | .name = "reg-fixed-voltage", | ||
267 | .id = -1, | ||
268 | .num_resources = 0, | ||
269 | .dev = { | ||
270 | .platform_data = &ek_vdd_pdata, | ||
271 | }, | ||
272 | }; | ||
273 | static void __init ek_add_regulators(void) | ||
274 | { | ||
275 | platform_device_register(&ek_voltage_regulator); | ||
276 | } | ||
277 | #else | ||
278 | static void __init ek_add_regulators(void) {} | ||
279 | #endif | ||
280 | |||
238 | static struct i2c_board_info __initdata ek_i2c_devices[] = { | 281 | static struct i2c_board_info __initdata ek_i2c_devices[] = { |
239 | { | 282 | { |
240 | I2C_BOARD_INFO("24c512", 0x50), | 283 | I2C_BOARD_INFO("24c512", 0x50), |
@@ -256,6 +299,8 @@ static void __init ek_board_init(void) | |||
256 | ek_add_device_nand(); | 299 | ek_add_device_nand(); |
257 | /* Ethernet */ | 300 | /* Ethernet */ |
258 | at91_add_device_eth(&ek_macb_data); | 301 | at91_add_device_eth(&ek_macb_data); |
302 | /* Regulators */ | ||
303 | ek_add_regulators(); | ||
259 | /* MMC */ | 304 | /* MMC */ |
260 | #if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) | 305 | #if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) |
261 | at91_add_device_mci(0, &ek_mmc_data); | 306 | at91_add_device_mci(0, &ek_mmc_data); |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index c11fd47aec5d..6ea9808b8868 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -27,6 +27,9 @@ | |||
27 | #include <linux/gpio_keys.h> | 27 | #include <linux/gpio_keys.h> |
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/clk.h> | 29 | #include <linux/clk.h> |
30 | #include <linux/regulator/machine.h> | ||
31 | #include <linux/regulator/fixed.h> | ||
32 | #include <linux/regulator/consumer.h> | ||
30 | 33 | ||
31 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
32 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
@@ -269,6 +272,46 @@ static void __init ek_add_device_buttons(void) | |||
269 | static void __init ek_add_device_buttons(void) {} | 272 | static void __init ek_add_device_buttons(void) {} |
270 | #endif | 273 | #endif |
271 | 274 | ||
275 | #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) | ||
276 | static struct regulator_consumer_supply ek_audio_consumer_supplies[] = { | ||
277 | REGULATOR_SUPPLY("AVDD", "0-001b"), | ||
278 | REGULATOR_SUPPLY("HPVDD", "0-001b"), | ||
279 | REGULATOR_SUPPLY("DBVDD", "0-001b"), | ||
280 | REGULATOR_SUPPLY("DCVDD", "0-001b"), | ||
281 | }; | ||
282 | |||
283 | static struct regulator_init_data ek_avdd_reg_init_data = { | ||
284 | .constraints = { | ||
285 | .name = "3V3", | ||
286 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
287 | }, | ||
288 | .consumer_supplies = ek_audio_consumer_supplies, | ||
289 | .num_consumer_supplies = ARRAY_SIZE(ek_audio_consumer_supplies), | ||
290 | }; | ||
291 | |||
292 | static struct fixed_voltage_config ek_vdd_pdata = { | ||
293 | .supply_name = "board-3V3", | ||
294 | .microvolts = 3300000, | ||
295 | .gpio = -EINVAL, | ||
296 | .enabled_at_boot = 0, | ||
297 | .init_data = &ek_avdd_reg_init_data, | ||
298 | }; | ||
299 | static struct platform_device ek_voltage_regulator = { | ||
300 | .name = "reg-fixed-voltage", | ||
301 | .id = -1, | ||
302 | .num_resources = 0, | ||
303 | .dev = { | ||
304 | .platform_data = &ek_vdd_pdata, | ||
305 | }, | ||
306 | }; | ||
307 | static void __init ek_add_regulators(void) | ||
308 | { | ||
309 | platform_device_register(&ek_voltage_regulator); | ||
310 | } | ||
311 | #else | ||
312 | static void __init ek_add_regulators(void) {} | ||
313 | #endif | ||
314 | |||
272 | 315 | ||
273 | static struct i2c_board_info __initdata ek_i2c_devices[] = { | 316 | static struct i2c_board_info __initdata ek_i2c_devices[] = { |
274 | { | 317 | { |
@@ -294,6 +337,8 @@ static void __init ek_board_init(void) | |||
294 | ek_add_device_nand(); | 337 | ek_add_device_nand(); |
295 | /* Ethernet */ | 338 | /* Ethernet */ |
296 | at91_add_device_eth(&ek_macb_data); | 339 | at91_add_device_eth(&ek_macb_data); |
340 | /* Regulators */ | ||
341 | ek_add_regulators(); | ||
297 | /* MMC */ | 342 | /* MMC */ |
298 | at91_add_device_mmc(0, &ek_mmc_data); | 343 | at91_add_device_mmc(0, &ek_mmc_data); |
299 | /* I2C */ | 344 | /* I2C */ |
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c new file mode 100644 index 000000000000..2c08ae4ad3a1 --- /dev/null +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -0,0 +1,189 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91/board-snapper9260.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Bluewater System Ltd | ||
5 | * | ||
6 | * Author: Andre Renaud <andre@bluewatersys.com> | ||
7 | * Author: Ryan Mallon <ryan@bluewatersys.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include <linux/init.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/spi/spi.h> | ||
29 | #include <linux/i2c/pca953x.h> | ||
30 | |||
31 | #include <asm/mach-types.h> | ||
32 | #include <asm/mach/arch.h> | ||
33 | |||
34 | #include <mach/hardware.h> | ||
35 | #include <mach/board.h> | ||
36 | #include <mach/at91sam9_smc.h> | ||
37 | |||
38 | #include "sam9_smc.h" | ||
39 | #include "generic.h" | ||
40 | |||
41 | #define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x)) | ||
42 | |||
43 | static void __init snapper9260_map_io(void) | ||
44 | { | ||
45 | at91sam9260_initialize(18432000); | ||
46 | |||
47 | /* Debug on ttyS0 */ | ||
48 | at91_register_uart(0, 0, 0); | ||
49 | at91_set_serial_console(0); | ||
50 | |||
51 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
52 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
53 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
54 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
55 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
56 | } | ||
57 | |||
58 | static void __init snapper9260_init_irq(void) | ||
59 | { | ||
60 | at91sam9260_init_interrupts(NULL); | ||
61 | } | ||
62 | |||
63 | static struct at91_usbh_data __initdata snapper9260_usbh_data = { | ||
64 | .ports = 2, | ||
65 | }; | ||
66 | |||
67 | static struct at91_udc_data __initdata snapper9260_udc_data = { | ||
68 | .vbus_pin = SNAPPER9260_IO_EXP_GPIO(5), | ||
69 | .vbus_active_low = 1, | ||
70 | .vbus_polled = 1, | ||
71 | }; | ||
72 | |||
73 | static struct at91_eth_data snapper9260_macb_data = { | ||
74 | .is_rmii = 1, | ||
75 | }; | ||
76 | |||
77 | static struct mtd_partition __initdata snapper9260_nand_partitions[] = { | ||
78 | { | ||
79 | .name = "Preboot", | ||
80 | .offset = 0, | ||
81 | .size = SZ_128K, | ||
82 | }, | ||
83 | { | ||
84 | .name = "Bootloader", | ||
85 | .offset = MTDPART_OFS_APPEND, | ||
86 | .size = SZ_256K, | ||
87 | }, | ||
88 | { | ||
89 | .name = "Environment", | ||
90 | .offset = MTDPART_OFS_APPEND, | ||
91 | .size = SZ_128K, | ||
92 | }, | ||
93 | { | ||
94 | .name = "Kernel", | ||
95 | .offset = MTDPART_OFS_APPEND, | ||
96 | .size = SZ_4M, | ||
97 | }, | ||
98 | { | ||
99 | .name = "Filesystem", | ||
100 | .offset = MTDPART_OFS_APPEND, | ||
101 | .size = MTDPART_SIZ_FULL, | ||
102 | }, | ||
103 | }; | ||
104 | |||
105 | static struct mtd_partition * __init | ||
106 | snapper9260_nand_partition_info(int size, int *num_partitions) | ||
107 | { | ||
108 | *num_partitions = ARRAY_SIZE(snapper9260_nand_partitions); | ||
109 | return snapper9260_nand_partitions; | ||
110 | } | ||
111 | |||
112 | static struct atmel_nand_data __initdata snapper9260_nand_data = { | ||
113 | .ale = 21, | ||
114 | .cle = 22, | ||
115 | .rdy_pin = AT91_PIN_PC13, | ||
116 | .partition_info = snapper9260_nand_partition_info, | ||
117 | .bus_width_16 = 0, | ||
118 | }; | ||
119 | |||
120 | static struct sam9_smc_config __initdata snapper9260_nand_smc_config = { | ||
121 | .ncs_read_setup = 0, | ||
122 | .nrd_setup = 0, | ||
123 | .ncs_write_setup = 0, | ||
124 | .nwe_setup = 0, | ||
125 | |||
126 | .ncs_read_pulse = 5, | ||
127 | .nrd_pulse = 2, | ||
128 | .ncs_write_pulse = 5, | ||
129 | .nwe_pulse = 2, | ||
130 | |||
131 | .read_cycle = 7, | ||
132 | .write_cycle = 7, | ||
133 | |||
134 | .mode = (AT91_SMC_READMODE | AT91_SMC_WRITEMODE | | ||
135 | AT91_SMC_EXNWMODE_DISABLE), | ||
136 | .tdf_cycles = 1, | ||
137 | }; | ||
138 | |||
139 | static struct pca953x_platform_data snapper9260_io_expander_data = { | ||
140 | .gpio_base = SNAPPER9260_IO_EXP_GPIO(0), | ||
141 | }; | ||
142 | |||
143 | static struct i2c_board_info __initdata snapper9260_i2c_devices[] = { | ||
144 | { | ||
145 | /* IO expander */ | ||
146 | I2C_BOARD_INFO("max7312", 0x28), | ||
147 | .platform_data = &snapper9260_io_expander_data, | ||
148 | }, | ||
149 | { | ||
150 | /* Audio codec */ | ||
151 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | ||
152 | }, | ||
153 | { | ||
154 | /* RTC */ | ||
155 | I2C_BOARD_INFO("isl1208", 0x6f), | ||
156 | }, | ||
157 | }; | ||
158 | |||
159 | static void __init snapper9260_add_device_nand(void) | ||
160 | { | ||
161 | at91_set_A_periph(AT91_PIN_PC14, 0); | ||
162 | sam9_smc_configure(3, &snapper9260_nand_smc_config); | ||
163 | at91_add_device_nand(&snapper9260_nand_data); | ||
164 | } | ||
165 | |||
166 | static void __init snapper9260_board_init(void) | ||
167 | { | ||
168 | at91_add_device_i2c(snapper9260_i2c_devices, | ||
169 | ARRAY_SIZE(snapper9260_i2c_devices)); | ||
170 | at91_add_device_serial(); | ||
171 | at91_add_device_usbh(&snapper9260_usbh_data); | ||
172 | at91_add_device_udc(&snapper9260_udc_data); | ||
173 | at91_add_device_eth(&snapper9260_macb_data); | ||
174 | at91_add_device_ssc(AT91SAM9260_ID_SSC, (ATMEL_SSC_TF | ATMEL_SSC_TK | | ||
175 | ATMEL_SSC_TD | ATMEL_SSC_RD)); | ||
176 | snapper9260_add_device_nand(); | ||
177 | } | ||
178 | |||
179 | MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module") | ||
180 | .phys_io = AT91_BASE_SYS, | ||
181 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, | ||
182 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
183 | .timer = &at91sam926x_timer, | ||
184 | .map_io = snapper9260_map_io, | ||
185 | .init_irq = snapper9260_init_irq, | ||
186 | .init_machine = snapper9260_board_init, | ||
187 | MACHINE_END | ||
188 | |||
189 | |||
diff --git a/arch/arm/mach-at91/include/mach/at91cap9.h b/arch/arm/mach-at91/include/mach/at91cap9.h index d8c1ededaa75..9c6af9737485 100644 --- a/arch/arm/mach-at91/include/mach/at91cap9.h +++ b/arch/arm/mach-at91/include/mach/at91cap9.h | |||
@@ -84,7 +84,7 @@ | |||
84 | */ | 84 | */ |
85 | #define AT91_ECC (0xffffe200 - AT91_BASE_SYS) | 85 | #define AT91_ECC (0xffffe200 - AT91_BASE_SYS) |
86 | #define AT91_BCRAMC (0xffffe400 - AT91_BASE_SYS) | 86 | #define AT91_BCRAMC (0xffffe400 - AT91_BASE_SYS) |
87 | #define AT91_DDRSDRC (0xffffe600 - AT91_BASE_SYS) | 87 | #define AT91_DDRSDRC0 (0xffffe600 - AT91_BASE_SYS) |
88 | #define AT91_SMC (0xffffe800 - AT91_BASE_SYS) | 88 | #define AT91_SMC (0xffffe800 - AT91_BASE_SYS) |
89 | #define AT91_MATRIX (0xffffea00 - AT91_BASE_SYS) | 89 | #define AT91_MATRIX (0xffffea00 - AT91_BASE_SYS) |
90 | #define AT91_CCFG (0xffffeb10 - AT91_BASE_SYS) | 90 | #define AT91_CCFG (0xffffeb10 - AT91_BASE_SYS) |
diff --git a/arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h b/arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h index 1499b1cbffdd..976f4a6c3353 100644 --- a/arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h +++ b/arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #ifndef AT91CAP9_DDRSDR_H | 15 | #ifndef AT91CAP9_DDRSDR_H |
16 | #define AT91CAP9_DDRSDR_H | 16 | #define AT91CAP9_DDRSDR_H |
17 | 17 | ||
18 | #define AT91_DDRSDRC_MR (AT91_DDRSDRC + 0x00) /* Mode Register */ | 18 | #define AT91_DDRSDRC_MR 0x00 /* Mode Register */ |
19 | #define AT91_DDRSDRC_MODE (0xf << 0) /* Command Mode */ | 19 | #define AT91_DDRSDRC_MODE (0xf << 0) /* Command Mode */ |
20 | #define AT91_DDRSDRC_MODE_NORMAL 0 | 20 | #define AT91_DDRSDRC_MODE_NORMAL 0 |
21 | #define AT91_DDRSDRC_MODE_NOP 1 | 21 | #define AT91_DDRSDRC_MODE_NOP 1 |
@@ -25,10 +25,10 @@ | |||
25 | #define AT91_DDRSDRC_MODE_EXT_LMR 5 | 25 | #define AT91_DDRSDRC_MODE_EXT_LMR 5 |
26 | #define AT91_DDRSDRC_MODE_DEEP 6 | 26 | #define AT91_DDRSDRC_MODE_DEEP 6 |
27 | 27 | ||
28 | #define AT91_DDRSDRC_RTR (AT91_DDRSDRC + 0x04) /* Refresh Timer Register */ | 28 | #define AT91_DDRSDRC_RTR 0x04 /* Refresh Timer Register */ |
29 | #define AT91_DDRSDRC_COUNT (0xfff << 0) /* Refresh Timer Counter */ | 29 | #define AT91_DDRSDRC_COUNT (0xfff << 0) /* Refresh Timer Counter */ |
30 | 30 | ||
31 | #define AT91_DDRSDRC_CR (AT91_DDRSDRC + 0x08) /* Configuration Register */ | 31 | #define AT91_DDRSDRC_CR 0x08 /* Configuration Register */ |
32 | #define AT91_DDRSDRC_NC (3 << 0) /* Number of Column Bits */ | 32 | #define AT91_DDRSDRC_NC (3 << 0) /* Number of Column Bits */ |
33 | #define AT91_DDRSDRC_NC_SDR8 (0 << 0) | 33 | #define AT91_DDRSDRC_NC_SDR8 (0 << 0) |
34 | #define AT91_DDRSDRC_NC_SDR9 (1 << 0) | 34 | #define AT91_DDRSDRC_NC_SDR9 (1 << 0) |
@@ -49,7 +49,7 @@ | |||
49 | #define AT91_DDRSDRC_DLL (1 << 7) /* Reset DLL */ | 49 | #define AT91_DDRSDRC_DLL (1 << 7) /* Reset DLL */ |
50 | #define AT91_DDRSDRC_DICDS (1 << 8) /* Output impedance control */ | 50 | #define AT91_DDRSDRC_DICDS (1 << 8) /* Output impedance control */ |
51 | 51 | ||
52 | #define AT91_DDRSDRC_T0PR (AT91_DDRSDRC + 0x0C) /* Timing 0 Register */ | 52 | #define AT91_DDRSDRC_T0PR 0x0C /* Timing 0 Register */ |
53 | #define AT91_DDRSDRC_TRAS (0xf << 0) /* Active to Precharge delay */ | 53 | #define AT91_DDRSDRC_TRAS (0xf << 0) /* Active to Precharge delay */ |
54 | #define AT91_DDRSDRC_TRCD (0xf << 4) /* Row to Column delay */ | 54 | #define AT91_DDRSDRC_TRCD (0xf << 4) /* Row to Column delay */ |
55 | #define AT91_DDRSDRC_TWR (0xf << 8) /* Write recovery delay */ | 55 | #define AT91_DDRSDRC_TWR (0xf << 8) /* Write recovery delay */ |
@@ -59,13 +59,13 @@ | |||
59 | #define AT91_DDRSDRC_TWTR (1 << 24) /* Internal Write to Read delay */ | 59 | #define AT91_DDRSDRC_TWTR (1 << 24) /* Internal Write to Read delay */ |
60 | #define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */ | 60 | #define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */ |
61 | 61 | ||
62 | #define AT91_DDRSDRC_T1PR (AT91_DDRSDRC + 0x10) /* Timing 1 Register */ | 62 | #define AT91_DDRSDRC_T1PR 0x10 /* Timing 1 Register */ |
63 | #define AT91_DDRSDRC_TRFC (0x1f << 0) /* Row Cycle Delay */ | 63 | #define AT91_DDRSDRC_TRFC (0x1f << 0) /* Row Cycle Delay */ |
64 | #define AT91_DDRSDRC_TXSNR (0xff << 8) /* Exit self-refresh to non-read */ | 64 | #define AT91_DDRSDRC_TXSNR (0xff << 8) /* Exit self-refresh to non-read */ |
65 | #define AT91_DDRSDRC_TXSRD (0xff << 16) /* Exit self-refresh to read */ | 65 | #define AT91_DDRSDRC_TXSRD (0xff << 16) /* Exit self-refresh to read */ |
66 | #define AT91_DDRSDRC_TXP (0xf << 24) /* Exit power-down delay */ | 66 | #define AT91_DDRSDRC_TXP (0xf << 24) /* Exit power-down delay */ |
67 | 67 | ||
68 | #define AT91_DDRSDRC_LPR (AT91_DDRSDRC + 0x18) /* Low Power Register */ | 68 | #define AT91_DDRSDRC_LPR 0x18 /* Low Power Register */ |
69 | #define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */ | 69 | #define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */ |
70 | #define AT91_DDRSDRC_LPCB_DISABLE 0 | 70 | #define AT91_DDRSDRC_LPCB_DISABLE 0 |
71 | #define AT91_DDRSDRC_LPCB_SELF_REFRESH 1 | 71 | #define AT91_DDRSDRC_LPCB_SELF_REFRESH 1 |
@@ -80,14 +80,14 @@ | |||
80 | #define AT91_DDRSDRC_TIMEOUT_64_CLK_CYCLES (1 << 12) | 80 | #define AT91_DDRSDRC_TIMEOUT_64_CLK_CYCLES (1 << 12) |
81 | #define AT91_DDRSDRC_TIMEOUT_128_CLK_CYCLES (2 << 12) | 81 | #define AT91_DDRSDRC_TIMEOUT_128_CLK_CYCLES (2 << 12) |
82 | 82 | ||
83 | #define AT91_DDRSDRC_MDR (AT91_DDRSDRC + 0x1C) /* Memory Device Register */ | 83 | #define AT91_DDRSDRC_MDR 0x1C /* Memory Device Register */ |
84 | #define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */ | 84 | #define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */ |
85 | #define AT91_DDRSDRC_MD_SDR 0 | 85 | #define AT91_DDRSDRC_MD_SDR 0 |
86 | #define AT91_DDRSDRC_MD_LOW_POWER_SDR 1 | 86 | #define AT91_DDRSDRC_MD_LOW_POWER_SDR 1 |
87 | #define AT91_DDRSDRC_MD_DDR 2 | 87 | #define AT91_DDRSDRC_MD_DDR 2 |
88 | #define AT91_DDRSDRC_MD_LOW_POWER_DDR 3 | 88 | #define AT91_DDRSDRC_MD_LOW_POWER_DDR 3 |
89 | 89 | ||
90 | #define AT91_DDRSDRC_DLLR (AT91_DDRSDRC + 0x20) /* DLL Information Register */ | 90 | #define AT91_DDRSDRC_DLLR 0x20 /* DLL Information Register */ |
91 | #define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */ | 91 | #define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */ |
92 | #define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */ | 92 | #define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */ |
93 | #define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */ | 93 | #define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */ |
@@ -98,5 +98,11 @@ | |||
98 | #define AT91_DDRSDRC_SDVAL (0xff << 16) /* Slave Delay value */ | 98 | #define AT91_DDRSDRC_SDVAL (0xff << 16) /* Slave Delay value */ |
99 | #define AT91_DDRSDRC_SDCVAL (0xff << 24) /* Slave Delay Correction value */ | 99 | #define AT91_DDRSDRC_SDCVAL (0xff << 24) /* Slave Delay Correction value */ |
100 | 100 | ||
101 | /* Register access macros */ | ||
102 | #define at91_ramc_read(num, reg) \ | ||
103 | at91_sys_read(AT91_DDRSDRC##num + reg) | ||
104 | #define at91_ramc_write(num, reg, value) \ | ||
105 | at91_sys_write(AT91_DDRSDRC##num + reg, value) | ||
106 | |||
101 | 107 | ||
102 | #endif | 108 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h index 43c396b9b4cb..4e79036d3b80 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9260.h +++ b/arch/arm/mach-at91/include/mach/at91sam9260.h | |||
@@ -84,7 +84,7 @@ | |||
84 | * System Peripherals (offset from AT91_BASE_SYS) | 84 | * System Peripherals (offset from AT91_BASE_SYS) |
85 | */ | 85 | */ |
86 | #define AT91_ECC (0xffffe800 - AT91_BASE_SYS) | 86 | #define AT91_ECC (0xffffe800 - AT91_BASE_SYS) |
87 | #define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS) | 87 | #define AT91_SDRAMC0 (0xffffea00 - AT91_BASE_SYS) |
88 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) | 88 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) |
89 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) | 89 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) |
90 | #define AT91_CCFG (0xffffef10 - AT91_BASE_SYS) | 90 | #define AT91_CCFG (0xffffef10 - AT91_BASE_SYS) |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h index 87de8be17484..2b5618518129 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9261.h +++ b/arch/arm/mach-at91/include/mach/at91sam9261.h | |||
@@ -68,7 +68,7 @@ | |||
68 | /* | 68 | /* |
69 | * System Peripherals (offset from AT91_BASE_SYS) | 69 | * System Peripherals (offset from AT91_BASE_SYS) |
70 | */ | 70 | */ |
71 | #define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS) | 71 | #define AT91_SDRAMC0 (0xffffea00 - AT91_BASE_SYS) |
72 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) | 72 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) |
73 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) | 73 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) |
74 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) | 74 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h new file mode 100644 index 000000000000..d27b15ba8ebf --- /dev/null +++ b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h | |||
@@ -0,0 +1,130 @@ | |||
1 | /* | ||
2 | * Header file for the Atmel DDR/SDR SDRAM Controller | ||
3 | * | ||
4 | * Copyright (C) 2010 Atmel Corporation | ||
5 | * Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | #ifndef AT91SAM9_DDRSDR_H | ||
13 | #define AT91SAM9_DDRSDR_H | ||
14 | |||
15 | #define AT91_DDRSDRC_MR 0x00 /* Mode Register */ | ||
16 | #define AT91_DDRSDRC_MODE (0x7 << 0) /* Command Mode */ | ||
17 | #define AT91_DDRSDRC_MODE_NORMAL 0 | ||
18 | #define AT91_DDRSDRC_MODE_NOP 1 | ||
19 | #define AT91_DDRSDRC_MODE_PRECHARGE 2 | ||
20 | #define AT91_DDRSDRC_MODE_LMR 3 | ||
21 | #define AT91_DDRSDRC_MODE_REFRESH 4 | ||
22 | #define AT91_DDRSDRC_MODE_EXT_LMR 5 | ||
23 | #define AT91_DDRSDRC_MODE_DEEP 6 | ||
24 | |||
25 | #define AT91_DDRSDRC_RTR 0x04 /* Refresh Timer Register */ | ||
26 | #define AT91_DDRSDRC_COUNT (0xfff << 0) /* Refresh Timer Counter */ | ||
27 | |||
28 | #define AT91_DDRSDRC_CR 0x08 /* Configuration Register */ | ||
29 | #define AT91_DDRSDRC_NC (3 << 0) /* Number of Column Bits */ | ||
30 | #define AT91_DDRSDRC_NC_SDR8 (0 << 0) | ||
31 | #define AT91_DDRSDRC_NC_SDR9 (1 << 0) | ||
32 | #define AT91_DDRSDRC_NC_SDR10 (2 << 0) | ||
33 | #define AT91_DDRSDRC_NC_SDR11 (3 << 0) | ||
34 | #define AT91_DDRSDRC_NC_DDR9 (0 << 0) | ||
35 | #define AT91_DDRSDRC_NC_DDR10 (1 << 0) | ||
36 | #define AT91_DDRSDRC_NC_DDR11 (2 << 0) | ||
37 | #define AT91_DDRSDRC_NC_DDR12 (3 << 0) | ||
38 | #define AT91_DDRSDRC_NR (3 << 2) /* Number of Row Bits */ | ||
39 | #define AT91_DDRSDRC_NR_11 (0 << 2) | ||
40 | #define AT91_DDRSDRC_NR_12 (1 << 2) | ||
41 | #define AT91_DDRSDRC_NR_13 (2 << 2) | ||
42 | #define AT91_DDRSDRC_NR_14 (3 << 2) | ||
43 | #define AT91_DDRSDRC_CAS (7 << 4) /* CAS Latency */ | ||
44 | #define AT91_DDRSDRC_CAS_2 (2 << 4) | ||
45 | #define AT91_DDRSDRC_CAS_3 (3 << 4) | ||
46 | #define AT91_DDRSDRC_CAS_25 (6 << 4) | ||
47 | #define AT91_DDRSDRC_RST_DLL (1 << 7) /* Reset DLL */ | ||
48 | #define AT91_DDRSDRC_DICDS (1 << 8) /* Output impedance control */ | ||
49 | #define AT91_DDRSDRC_DIS_DLL (1 << 9) /* Disable DLL */ | ||
50 | #define AT91_DDRSDRC_OCD (1 << 12) /* Off-Chip Driver */ | ||
51 | #define AT91_DDRSDRC_DQMS (1 << 16) /* Mask Data is Shared */ | ||
52 | #define AT91_DDRSDRC_ACTBST (1 << 18) /* Active Bank X to Burst Stop Read Access Bank Y */ | ||
53 | |||
54 | #define AT91_DDRSDRC_T0PR 0x0C /* Timing 0 Register */ | ||
55 | #define AT91_DDRSDRC_TRAS (0xf << 0) /* Active to Precharge delay */ | ||
56 | #define AT91_DDRSDRC_TRCD (0xf << 4) /* Row to Column delay */ | ||
57 | #define AT91_DDRSDRC_TWR (0xf << 8) /* Write recovery delay */ | ||
58 | #define AT91_DDRSDRC_TRC (0xf << 12) /* Row cycle delay */ | ||
59 | #define AT91_DDRSDRC_TRP (0xf << 16) /* Row precharge delay */ | ||
60 | #define AT91_DDRSDRC_TRRD (0xf << 20) /* Active BankA to BankB */ | ||
61 | #define AT91_DDRSDRC_TWTR (0x7 << 24) /* Internal Write to Read delay */ | ||
62 | #define AT91_DDRSDRC_RED_WRRD (0x1 << 27) /* Reduce Write to Read Delay */ | ||
63 | #define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */ | ||
64 | |||
65 | #define AT91_DDRSDRC_T1PR 0x10 /* Timing 1 Register */ | ||
66 | #define AT91_DDRSDRC_TRFC (0x1f << 0) /* Row Cycle Delay */ | ||
67 | #define AT91_DDRSDRC_TXSNR (0xff << 8) /* Exit self-refresh to non-read */ | ||
68 | #define AT91_DDRSDRC_TXSRD (0xff << 16) /* Exit self-refresh to read */ | ||
69 | #define AT91_DDRSDRC_TXP (0xf << 24) /* Exit power-down delay */ | ||
70 | |||
71 | #define AT91_DDRSDRC_T2PR 0x14 /* Timing 2 Register */ | ||
72 | #define AT91_DDRSDRC_TXARD (0xf << 0) /* Exit active power down delay to read command in mode "Fast Exit" */ | ||
73 | #define AT91_DDRSDRC_TXARDS (0xf << 4) /* Exit active power down delay to read command in mode "Slow Exit" */ | ||
74 | #define AT91_DDRSDRC_TRPA (0xf << 8) /* Row Precharge All delay */ | ||
75 | #define AT91_DDRSDRC_TRTP (0x7 << 12) /* Read to Precharge delay */ | ||
76 | |||
77 | #define AT91_DDRSDRC_LPR 0x1C /* Low Power Register */ | ||
78 | #define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */ | ||
79 | #define AT91_DDRSDRC_LPCB_DISABLE 0 | ||
80 | #define AT91_DDRSDRC_LPCB_SELF_REFRESH 1 | ||
81 | #define AT91_DDRSDRC_LPCB_POWER_DOWN 2 | ||
82 | #define AT91_DDRSDRC_LPCB_DEEP_POWER_DOWN 3 | ||
83 | #define AT91_DDRSDRC_CLKFR (1 << 2) /* Clock Frozen */ | ||
84 | #define AT91_DDRSDRC_PASR (7 << 4) /* Partial Array Self Refresh */ | ||
85 | #define AT91_DDRSDRC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */ | ||
86 | #define AT91_DDRSDRC_DS (3 << 10) /* Drive Strength */ | ||
87 | #define AT91_DDRSDRC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */ | ||
88 | #define AT91_DDRSDRC_TIMEOUT_0_CLK_CYCLES (0 << 12) | ||
89 | #define AT91_DDRSDRC_TIMEOUT_64_CLK_CYCLES (1 << 12) | ||
90 | #define AT91_DDRSDRC_TIMEOUT_128_CLK_CYCLES (2 << 12) | ||
91 | #define AT91_DDRSDRC_APDE (1 << 16) /* Active power down exit time */ | ||
92 | #define AT91_DDRSDRC_UPD_MR (3 << 20) /* Update load mode register and extended mode register */ | ||
93 | |||
94 | #define AT91_DDRSDRC_MDR 0x20 /* Memory Device Register */ | ||
95 | #define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */ | ||
96 | #define AT91_DDRSDRC_MD_SDR 0 | ||
97 | #define AT91_DDRSDRC_MD_LOW_POWER_SDR 1 | ||
98 | #define AT91_DDRSDRC_MD_LOW_POWER_DDR 3 | ||
99 | #define AT91_DDRSDRC_MD_DDR2 6 | ||
100 | #define AT91_DDRSDRC_DBW (1 << 4) /* Data Bus Width */ | ||
101 | #define AT91_DDRSDRC_DBW_32BITS (0 << 4) | ||
102 | #define AT91_DDRSDRC_DBW_16BITS (1 << 4) | ||
103 | |||
104 | #define AT91_DDRSDRC_DLL 0x24 /* DLL Information Register */ | ||
105 | #define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */ | ||
106 | #define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */ | ||
107 | #define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */ | ||
108 | #define AT91_DDRSDRC_MDVAL (0xff << 8) /* Master Delay value */ | ||
109 | |||
110 | #define AT91_DDRSDRC_HS 0x2C /* High Speed Register */ | ||
111 | #define AT91_DDRSDRC_DIS_ATCP_RD (1 << 2) /* Anticip read access is disabled */ | ||
112 | |||
113 | #define AT91_DDRSDRC_DELAY(n) (0x30 + (0x4 * (n))) /* Delay I/O Register n */ | ||
114 | |||
115 | #define AT91_DDRSDRC_WPMR 0xE4 /* Write Protect Mode Register */ | ||
116 | #define AT91_DDRSDRC_WP (1 << 0) /* Write protect enable */ | ||
117 | #define AT91_DDRSDRC_WPKEY (0xffffff << 8) /* Write protect key */ | ||
118 | #define AT91_DDRSDRC_KEY (0x444452 << 8) /* Write protect key = "DDR" */ | ||
119 | |||
120 | #define AT91_DDRSDRC_WPSR 0xE8 /* Write Protect Status Register */ | ||
121 | #define AT91_DDRSDRC_WPVS (1 << 0) /* Write protect violation status */ | ||
122 | #define AT91_DDRSDRC_WPVSRC (0xffff << 8) /* Write protect violation source */ | ||
123 | |||
124 | /* Register access macros */ | ||
125 | #define at91_ramc_read(num, reg) \ | ||
126 | at91_sys_read(AT91_DDRSDRC##num + reg) | ||
127 | #define at91_ramc_write(num, reg, value) \ | ||
128 | at91_sys_write(AT91_DDRSDRC##num + reg, value) | ||
129 | |||
130 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h index b7260389f7ca..100f5a592926 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h +++ b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define AT91SAM9_SDRAMC_H | 17 | #define AT91SAM9_SDRAMC_H |
18 | 18 | ||
19 | /* SDRAM Controller (SDRAMC) registers */ | 19 | /* SDRAM Controller (SDRAMC) registers */ |
20 | #define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */ | 20 | #define AT91_SDRAMC_MR 0x00 /* SDRAM Controller Mode Register */ |
21 | #define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */ | 21 | #define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */ |
22 | #define AT91_SDRAMC_MODE_NORMAL 0 | 22 | #define AT91_SDRAMC_MODE_NORMAL 0 |
23 | #define AT91_SDRAMC_MODE_NOP 1 | 23 | #define AT91_SDRAMC_MODE_NOP 1 |
@@ -27,10 +27,10 @@ | |||
27 | #define AT91_SDRAMC_MODE_EXT_LMR 5 | 27 | #define AT91_SDRAMC_MODE_EXT_LMR 5 |
28 | #define AT91_SDRAMC_MODE_DEEP 6 | 28 | #define AT91_SDRAMC_MODE_DEEP 6 |
29 | 29 | ||
30 | #define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */ | 30 | #define AT91_SDRAMC_TR 0x04 /* SDRAM Controller Refresh Timer Register */ |
31 | #define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */ | 31 | #define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */ |
32 | 32 | ||
33 | #define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */ | 33 | #define AT91_SDRAMC_CR 0x08 /* SDRAM Controller Configuration Register */ |
34 | #define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */ | 34 | #define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */ |
35 | #define AT91_SDRAMC_NC_8 (0 << 0) | 35 | #define AT91_SDRAMC_NC_8 (0 << 0) |
36 | #define AT91_SDRAMC_NC_9 (1 << 0) | 36 | #define AT91_SDRAMC_NC_9 (1 << 0) |
@@ -57,7 +57,7 @@ | |||
57 | #define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */ | 57 | #define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */ |
58 | #define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */ | 58 | #define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */ |
59 | 59 | ||
60 | #define AT91_SDRAMC_LPR (AT91_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */ | 60 | #define AT91_SDRAMC_LPR 0x10 /* SDRAM Controller Low Power Register */ |
61 | #define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */ | 61 | #define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */ |
62 | #define AT91_SDRAMC_LPCB_DISABLE 0 | 62 | #define AT91_SDRAMC_LPCB_DISABLE 0 |
63 | #define AT91_SDRAMC_LPCB_SELF_REFRESH 1 | 63 | #define AT91_SDRAMC_LPCB_SELF_REFRESH 1 |
@@ -71,16 +71,21 @@ | |||
71 | #define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12) | 71 | #define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12) |
72 | #define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12) | 72 | #define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12) |
73 | 73 | ||
74 | #define AT91_SDRAMC_IER (AT91_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */ | 74 | #define AT91_SDRAMC_IER 0x14 /* SDRAM Controller Interrupt Enable Register */ |
75 | #define AT91_SDRAMC_IDR (AT91_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */ | 75 | #define AT91_SDRAMC_IDR 0x18 /* SDRAM Controller Interrupt Disable Register */ |
76 | #define AT91_SDRAMC_IMR (AT91_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */ | 76 | #define AT91_SDRAMC_IMR 0x1C /* SDRAM Controller Interrupt Mask Register */ |
77 | #define AT91_SDRAMC_ISR (AT91_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */ | 77 | #define AT91_SDRAMC_ISR 0x20 /* SDRAM Controller Interrupt Status Register */ |
78 | #define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */ | 78 | #define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */ |
79 | 79 | ||
80 | #define AT91_SDRAMC_MDR (AT91_SDRAMC + 0x24) /* SDRAM Memory Device Register */ | 80 | #define AT91_SDRAMC_MDR 0x24 /* SDRAM Memory Device Register */ |
81 | #define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */ | 81 | #define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */ |
82 | #define AT91_SDRAMC_MD_SDRAM 0 | 82 | #define AT91_SDRAMC_MD_SDRAM 0 |
83 | #define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1 | 83 | #define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1 |
84 | 84 | ||
85 | /* Register access macros */ | ||
86 | #define at91_ramc_read(num, reg) \ | ||
87 | at91_sys_read(AT91_SDRAMC##num + reg) | ||
88 | #define at91_ramc_write(num, reg, value) \ | ||
89 | at91_sys_write(AT91_SDRAMC##num + reg, value) | ||
85 | 90 | ||
86 | #endif | 91 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl.h b/arch/arm/mach-at91/include/mach/at91sam9rl.h index fc2de6c09c86..87ba8517ad98 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9rl.h +++ b/arch/arm/mach-at91/include/mach/at91sam9rl.h | |||
@@ -74,7 +74,7 @@ | |||
74 | */ | 74 | */ |
75 | #define AT91_DMA (0xffffe600 - AT91_BASE_SYS) | 75 | #define AT91_DMA (0xffffe600 - AT91_BASE_SYS) |
76 | #define AT91_ECC (0xffffe800 - AT91_BASE_SYS) | 76 | #define AT91_ECC (0xffffe800 - AT91_BASE_SYS) |
77 | #define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS) | 77 | #define AT91_SDRAMC0 (0xffffea00 - AT91_BASE_SYS) |
78 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) | 78 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) |
79 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) | 79 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) |
80 | #define AT91_CCFG (0xffffef10 - AT91_BASE_SYS) | 80 | #define AT91_CCFG (0xffffef10 - AT91_BASE_SYS) |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index df2ed848c9f8..58528aa9c8a8 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -44,6 +44,8 @@ | |||
44 | /* USB Device */ | 44 | /* USB Device */ |
45 | struct at91_udc_data { | 45 | struct at91_udc_data { |
46 | u8 vbus_pin; /* high == host powering us */ | 46 | u8 vbus_pin; /* high == host powering us */ |
47 | u8 vbus_active_low; /* vbus polarity */ | ||
48 | u8 vbus_polled; /* Use polling, not interrupt */ | ||
47 | u8 pullup_pin; /* active == D+ pulled up */ | 49 | u8 pullup_pin; /* active == D+ pulled up */ |
48 | u8 pullup_active_low; /* true == pullup_pin is active low */ | 50 | u8 pullup_active_low; /* true == pullup_pin is active low */ |
49 | }; | 51 | }; |
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 833659d1200a..3bef931d0b1c 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -52,6 +52,7 @@ static inline unsigned long at91_cpu_fully_identify(void) | |||
52 | 52 | ||
53 | #define ARCH_EXID_AT91SAM9M11 0x00000001 | 53 | #define ARCH_EXID_AT91SAM9M11 0x00000001 |
54 | #define ARCH_EXID_AT91SAM9M10 0x00000002 | 54 | #define ARCH_EXID_AT91SAM9M10 0x00000002 |
55 | #define ARCH_EXID_AT91SAM9G46 0x00000003 | ||
55 | #define ARCH_EXID_AT91SAM9G45 0x00000004 | 56 | #define ARCH_EXID_AT91SAM9G45 0x00000004 |
56 | 57 | ||
57 | static inline unsigned long at91_exid_identify(void) | 58 | static inline unsigned long at91_exid_identify(void) |
@@ -128,9 +129,18 @@ static inline unsigned long at91cap9_rev_identify(void) | |||
128 | #ifdef CONFIG_ARCH_AT91SAM9G45 | 129 | #ifdef CONFIG_ARCH_AT91SAM9G45 |
129 | #define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45) | 130 | #define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45) |
130 | #define cpu_is_at91sam9g45es() (at91_cpu_fully_identify() == ARCH_ID_AT91SAM9G45ES) | 131 | #define cpu_is_at91sam9g45es() (at91_cpu_fully_identify() == ARCH_ID_AT91SAM9G45ES) |
132 | #define cpu_is_at91sam9m10() (cpu_is_at91sam9g45() && \ | ||
133 | (at91_exid_identify() == ARCH_EXID_AT91SAM9M10)) | ||
134 | #define cpu_is_at91sam9m46() (cpu_is_at91sam9g45() && \ | ||
135 | (at91_exid_identify() == ARCH_EXID_AT91SAM9G46)) | ||
136 | #define cpu_is_at91sam9m11() (cpu_is_at91sam9g45() && \ | ||
137 | (at91_exid_identify() == ARCH_EXID_AT91SAM9M11)) | ||
131 | #else | 138 | #else |
132 | #define cpu_is_at91sam9g45() (0) | 139 | #define cpu_is_at91sam9g45() (0) |
133 | #define cpu_is_at91sam9g45es() (0) | 140 | #define cpu_is_at91sam9g45es() (0) |
141 | #define cpu_is_at91sam9m10() (0) | ||
142 | #define cpu_is_at91sam9g46() (0) | ||
143 | #define cpu_is_at91sam9m11() (0) | ||
134 | #endif | 144 | #endif |
135 | 145 | ||
136 | #ifdef CONFIG_ARCH_AT91CAP9 | 146 | #ifdef CONFIG_ARCH_AT91CAP9 |
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h index 04c91e31c9c5..bfdd8ab26dc8 100644 --- a/arch/arm/mach-at91/include/mach/gpio.h +++ b/arch/arm/mach-at91/include/mach/gpio.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define PIN_BASE NR_AIC_IRQS | 19 | #define PIN_BASE NR_AIC_IRQS |
20 | 20 | ||
21 | #define MAX_GPIO_BANKS 5 | 21 | #define MAX_GPIO_BANKS 5 |
22 | #define NR_BUILTIN_GPIO (PIN_BASE + (MAX_GPIO_BANKS * 32)) | ||
22 | 23 | ||
23 | /* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */ | 24 | /* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */ |
24 | 25 | ||
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index 08322c44df1a..8c87d0c1b8f8 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h | |||
@@ -30,14 +30,50 @@ static inline u32 sdram_selfrefresh_enable(void) | |||
30 | { | 30 | { |
31 | u32 saved_lpr, lpr; | 31 | u32 saved_lpr, lpr; |
32 | 32 | ||
33 | saved_lpr = at91_sys_read(AT91_DDRSDRC_LPR); | 33 | saved_lpr = at91_ramc_read(0, AT91_DDRSDRC_LPR); |
34 | 34 | ||
35 | lpr = saved_lpr & ~AT91_DDRSDRC_LPCB; | 35 | lpr = saved_lpr & ~AT91_DDRSDRC_LPCB; |
36 | at91_sys_write(AT91_DDRSDRC_LPR, lpr | AT91_DDRSDRC_LPCB_SELF_REFRESH); | 36 | at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr | AT91_DDRSDRC_LPCB_SELF_REFRESH); |
37 | return saved_lpr; | 37 | return saved_lpr; |
38 | } | 38 | } |
39 | 39 | ||
40 | #define sdram_selfrefresh_disable(saved_lpr) at91_sys_write(AT91_DDRSDRC_LPR, saved_lpr) | 40 | #define sdram_selfrefresh_disable(saved_lpr) at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr) |
41 | |||
42 | #elif defined(CONFIG_ARCH_AT91SAM9G45) | ||
43 | #include <mach/at91sam9_ddrsdr.h> | ||
44 | |||
45 | /* We manage both DDRAM/SDRAM controllers, we need more than one value to | ||
46 | * remember. | ||
47 | */ | ||
48 | static u32 saved_lpr1; | ||
49 | |||
50 | static inline u32 sdram_selfrefresh_enable(void) | ||
51 | { | ||
52 | /* Those tow values allow us to delay self-refresh activation | ||
53 | * to the maximum. */ | ||
54 | u32 lpr0, lpr1; | ||
55 | u32 saved_lpr0; | ||
56 | |||
57 | saved_lpr1 = at91_ramc_read(1, AT91_DDRSDRC_LPR); | ||
58 | lpr1 = saved_lpr1 & ~AT91_DDRSDRC_LPCB; | ||
59 | lpr1 |= AT91_DDRSDRC_LPCB_SELF_REFRESH; | ||
60 | |||
61 | saved_lpr0 = at91_ramc_read(0, AT91_DDRSDRC_LPR); | ||
62 | lpr0 = saved_lpr0 & ~AT91_DDRSDRC_LPCB; | ||
63 | lpr0 |= AT91_DDRSDRC_LPCB_SELF_REFRESH; | ||
64 | |||
65 | /* self-refresh mode now */ | ||
66 | at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr0); | ||
67 | at91_ramc_write(1, AT91_DDRSDRC_LPR, lpr1); | ||
68 | |||
69 | return saved_lpr0; | ||
70 | } | ||
71 | |||
72 | #define sdram_selfrefresh_disable(saved_lpr0) \ | ||
73 | do { \ | ||
74 | at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr0); \ | ||
75 | at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); \ | ||
76 | } while (0) | ||
41 | 77 | ||
42 | #else | 78 | #else |
43 | #include <mach/at91sam9_sdramc.h> | 79 | #include <mach/at91sam9_sdramc.h> |
@@ -47,7 +83,6 @@ static inline u32 sdram_selfrefresh_enable(void) | |||
47 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; | 83 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; |
48 | * handle those cases both here and in the Suspend-To-RAM support. | 84 | * handle those cases both here and in the Suspend-To-RAM support. |
49 | */ | 85 | */ |
50 | #define AT91_SDRAMC AT91_SDRAMC0 | ||
51 | #warning Assuming EB1 SDRAM controller is *NOT* used | 86 | #warning Assuming EB1 SDRAM controller is *NOT* used |
52 | #endif | 87 | #endif |
53 | 88 | ||
@@ -55,13 +90,13 @@ static inline u32 sdram_selfrefresh_enable(void) | |||
55 | { | 90 | { |
56 | u32 saved_lpr, lpr; | 91 | u32 saved_lpr, lpr; |
57 | 92 | ||
58 | saved_lpr = at91_sys_read(AT91_SDRAMC_LPR); | 93 | saved_lpr = at91_ramc_read(0, AT91_SDRAMC_LPR); |
59 | 94 | ||
60 | lpr = saved_lpr & ~AT91_SDRAMC_LPCB; | 95 | lpr = saved_lpr & ~AT91_SDRAMC_LPCB; |
61 | at91_sys_write(AT91_SDRAMC_LPR, lpr | AT91_SDRAMC_LPCB_SELF_REFRESH); | 96 | at91_ramc_write(0, AT91_SDRAMC_LPR, lpr | AT91_SDRAMC_LPCB_SELF_REFRESH); |
62 | return saved_lpr; | 97 | return saved_lpr; |
63 | } | 98 | } |
64 | 99 | ||
65 | #define sdram_selfrefresh_disable(saved_lpr) at91_sys_write(AT91_SDRAMC_LPR, saved_lpr) | 100 | #define sdram_selfrefresh_disable(saved_lpr) at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr) |
66 | 101 | ||
67 | #endif | 102 | #endif |
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 9c5b48e68a71..b6b00a1f6125 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -16,10 +16,12 @@ | |||
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | #include <mach/at91_pmc.h> | 17 | #include <mach/at91_pmc.h> |
18 | 18 | ||
19 | #ifdef CONFIG_ARCH_AT91RM9200 | 19 | #if defined(CONFIG_ARCH_AT91RM9200) |
20 | #include <mach/at91rm9200_mc.h> | 20 | #include <mach/at91rm9200_mc.h> |
21 | #elif defined(CONFIG_ARCH_AT91CAP9) | 21 | #elif defined(CONFIG_ARCH_AT91CAP9) |
22 | #include <mach/at91cap9_ddrsdr.h> | 22 | #include <mach/at91cap9_ddrsdr.h> |
23 | #elif defined(CONFIG_ARCH_AT91SAM9G45) | ||
24 | #include <mach/at91sam9_ddrsdr.h> | ||
23 | #else | 25 | #else |
24 | #include <mach/at91sam9_sdramc.h> | 26 | #include <mach/at91sam9_sdramc.h> |
25 | #endif | 27 | #endif |
@@ -30,7 +32,6 @@ | |||
30 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; | 32 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; |
31 | * handle those cases both here and in the Suspend-To-RAM support. | 33 | * handle those cases both here and in the Suspend-To-RAM support. |
32 | */ | 34 | */ |
33 | #define AT91_SDRAMC AT91_SDRAMC0 | ||
34 | #warning Assuming EB1 SDRAM controller is *NOT* used | 35 | #warning Assuming EB1 SDRAM controller is *NOT* used |
35 | #endif | 36 | #endif |
36 | 37 | ||
@@ -113,12 +114,14 @@ ENTRY(at91_slow_clock) | |||
113 | /* | 114 | /* |
114 | * Register usage: | 115 | * Register usage: |
115 | * R1 = Base address of AT91_PMC | 116 | * R1 = Base address of AT91_PMC |
116 | * R2 = Base address of AT91_SDRAMC (or AT91_SYS on AT91RM9200) | 117 | * R2 = Base address of RAM Controller (SDRAM, DDRSDR, or AT91_SYS) |
117 | * R3 = temporary register | 118 | * R3 = temporary register |
118 | * R4 = temporary register | 119 | * R4 = temporary register |
120 | * R5 = Base address of second RAM Controller or 0 if not present | ||
119 | */ | 121 | */ |
120 | ldr r1, .at91_va_base_pmc | 122 | ldr r1, .at91_va_base_pmc |
121 | ldr r2, .at91_va_base_sdramc | 123 | ldr r2, .at91_va_base_sdramc |
124 | ldr r5, .at91_va_base_ramc1 | ||
122 | 125 | ||
123 | /* Drain write buffer */ | 126 | /* Drain write buffer */ |
124 | mcr p15, 0, r0, c7, c10, 4 | 127 | mcr p15, 0, r0, c7, c10, 4 |
@@ -127,20 +130,33 @@ ENTRY(at91_slow_clock) | |||
127 | /* Put SDRAM in self-refresh mode */ | 130 | /* Put SDRAM in self-refresh mode */ |
128 | mov r3, #1 | 131 | mov r3, #1 |
129 | str r3, [r2, #AT91_SDRAMC_SRR] | 132 | str r3, [r2, #AT91_SDRAMC_SRR] |
130 | #elif defined(CONFIG_ARCH_AT91CAP9) | 133 | #elif defined(CONFIG_ARCH_AT91CAP9) \ |
131 | /* Enable SDRAM self-refresh mode */ | 134 | || defined(CONFIG_ARCH_AT91SAM9G45) |
132 | ldr r3, [r2, #AT91_DDRSDRC_LPR - AT91_DDRSDRC] | ||
133 | str r3, .saved_sam9_lpr | ||
134 | 135 | ||
135 | mov r3, #AT91_DDRSDRC_LPCB_SELF_REFRESH | 136 | /* prepare for DDRAM self-refresh mode */ |
136 | str r3, [r2, #AT91_DDRSDRC_LPR - AT91_DDRSDRC] | 137 | ldr r3, [r2, #AT91_DDRSDRC_LPR] |
138 | str r3, .saved_sam9_lpr | ||
139 | bic r3, #AT91_DDRSDRC_LPCB | ||
140 | orr r3, #AT91_DDRSDRC_LPCB_SELF_REFRESH | ||
141 | |||
142 | /* figure out if we use the second ram controller */ | ||
143 | cmp r5, #0 | ||
144 | ldrne r4, [r5, #AT91_DDRSDRC_LPR] | ||
145 | strne r4, .saved_sam9_lpr1 | ||
146 | bicne r4, #AT91_DDRSDRC_LPCB | ||
147 | orrne r4, #AT91_DDRSDRC_LPCB_SELF_REFRESH | ||
148 | |||
149 | /* Enable DDRAM self-refresh mode */ | ||
150 | str r3, [r2, #AT91_DDRSDRC_LPR] | ||
151 | strne r4, [r5, #AT91_DDRSDRC_LPR] | ||
137 | #else | 152 | #else |
138 | /* Enable SDRAM self-refresh mode */ | 153 | /* Enable SDRAM self-refresh mode */ |
139 | ldr r3, [r2, #AT91_SDRAMC_LPR - AT91_SDRAMC] | 154 | ldr r3, [r2, #AT91_SDRAMC_LPR] |
140 | str r3, .saved_sam9_lpr | 155 | str r3, .saved_sam9_lpr |
141 | 156 | ||
142 | mov r3, #AT91_SDRAMC_LPCB_SELF_REFRESH | 157 | bic r3, #AT91_SDRAMC_LPCB |
143 | str r3, [r2, #AT91_SDRAMC_LPR - AT91_SDRAMC] | 158 | orr r3, #AT91_SDRAMC_LPCB_SELF_REFRESH |
159 | str r3, [r2, #AT91_SDRAMC_LPR] | ||
144 | #endif | 160 | #endif |
145 | 161 | ||
146 | /* Save Master clock setting */ | 162 | /* Save Master clock setting */ |
@@ -247,14 +263,21 @@ ENTRY(at91_slow_clock) | |||
247 | 263 | ||
248 | #ifdef CONFIG_ARCH_AT91RM9200 | 264 | #ifdef CONFIG_ARCH_AT91RM9200 |
249 | /* Do nothing - self-refresh is automatically disabled. */ | 265 | /* Do nothing - self-refresh is automatically disabled. */ |
250 | #elif defined(CONFIG_ARCH_AT91CAP9) | 266 | #elif defined(CONFIG_ARCH_AT91CAP9) \ |
251 | /* Restore LPR on AT91CAP9 */ | 267 | || defined(CONFIG_ARCH_AT91SAM9G45) |
268 | /* Restore LPR on AT91 with DDRAM */ | ||
252 | ldr r3, .saved_sam9_lpr | 269 | ldr r3, .saved_sam9_lpr |
253 | str r3, [r2, #AT91_DDRSDRC_LPR - AT91_DDRSDRC] | 270 | str r3, [r2, #AT91_DDRSDRC_LPR] |
271 | |||
272 | /* if we use the second ram controller */ | ||
273 | cmp r5, #0 | ||
274 | ldrne r4, .saved_sam9_lpr1 | ||
275 | strne r4, [r5, #AT91_DDRSDRC_LPR] | ||
276 | |||
254 | #else | 277 | #else |
255 | /* Restore LPR on AT91SAM9 */ | 278 | /* Restore LPR on AT91 with SDRAM */ |
256 | ldr r3, .saved_sam9_lpr | 279 | ldr r3, .saved_sam9_lpr |
257 | str r3, [r2, #AT91_SDRAMC_LPR - AT91_SDRAMC] | 280 | str r3, [r2, #AT91_SDRAMC_LPR] |
258 | #endif | 281 | #endif |
259 | 282 | ||
260 | /* Restore registers, and return */ | 283 | /* Restore registers, and return */ |
@@ -273,18 +296,29 @@ ENTRY(at91_slow_clock) | |||
273 | .saved_sam9_lpr: | 296 | .saved_sam9_lpr: |
274 | .word 0 | 297 | .word 0 |
275 | 298 | ||
299 | .saved_sam9_lpr1: | ||
300 | .word 0 | ||
301 | |||
276 | .at91_va_base_pmc: | 302 | .at91_va_base_pmc: |
277 | .word AT91_VA_BASE_SYS + AT91_PMC | 303 | .word AT91_VA_BASE_SYS + AT91_PMC |
278 | 304 | ||
279 | #ifdef CONFIG_ARCH_AT91RM9200 | 305 | #ifdef CONFIG_ARCH_AT91RM9200 |
280 | .at91_va_base_sdramc: | 306 | .at91_va_base_sdramc: |
281 | .word AT91_VA_BASE_SYS | 307 | .word AT91_VA_BASE_SYS |
282 | #elif defined(CONFIG_ARCH_AT91CAP9) | 308 | #elif defined(CONFIG_ARCH_AT91CAP9) \ |
309 | || defined(CONFIG_ARCH_AT91SAM9G45) | ||
283 | .at91_va_base_sdramc: | 310 | .at91_va_base_sdramc: |
284 | .word AT91_VA_BASE_SYS + AT91_DDRSDRC | 311 | .word AT91_VA_BASE_SYS + AT91_DDRSDRC0 |
285 | #else | 312 | #else |
286 | .at91_va_base_sdramc: | 313 | .at91_va_base_sdramc: |
287 | .word AT91_VA_BASE_SYS + AT91_SDRAMC | 314 | .word AT91_VA_BASE_SYS + AT91_SDRAMC0 |
315 | #endif | ||
316 | |||
317 | .at91_va_base_ramc1: | ||
318 | #if defined(CONFIG_ARCH_AT91SAM9G45) | ||
319 | .word AT91_VA_BASE_SYS + AT91_DDRSDRC1 | ||
320 | #else | ||
321 | .word 0 | ||
288 | #endif | 322 | #endif |
289 | 323 | ||
290 | ENTRY(at91_slow_clock_sz) | 324 | ENTRY(at91_slow_clock_sz) |
diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-bcmring/core.c index 72e405df0fb0..d3f959e92b2d 100644 --- a/arch/arm/mach-bcmring/core.c +++ b/arch/arm/mach-bcmring/core.c | |||
@@ -91,14 +91,23 @@ static struct clk uart_clk = { | |||
91 | .parent = &pll1_clk, | 91 | .parent = &pll1_clk, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static struct clk dummy_apb_pclk = { | ||
95 | .name = "BUSCLK", | ||
96 | .type = CLK_TYPE_PRIMARY, | ||
97 | .mode = CLK_MODE_XTAL, | ||
98 | }; | ||
99 | |||
94 | static struct clk_lookup lookups[] = { | 100 | static struct clk_lookup lookups[] = { |
95 | { /* UART0 */ | 101 | { /* Bus clock */ |
96 | .dev_id = "uarta", | 102 | .con_id = "apb_pclk", |
97 | .clk = &uart_clk, | 103 | .clk = &dummy_apb_pclk, |
98 | }, { /* UART1 */ | 104 | }, { /* UART0 */ |
99 | .dev_id = "uartb", | 105 | .dev_id = "uarta", |
100 | .clk = &uart_clk, | 106 | .clk = &uart_clk, |
101 | } | 107 | }, { /* UART1 */ |
108 | .dev_id = "uartb", | ||
109 | .clk = &uart_clk, | ||
110 | } | ||
102 | }; | 111 | }; |
103 | 112 | ||
104 | static struct amba_device *amba_devs[] __initdata = { | 113 | static struct amba_device *amba_devs[] __initdata = { |
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S index fedd8076a689..072cc6b61ba3 100644 --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S | |||
@@ -11,6 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <mach/hardware.h> | ||
14 | #include <asm/hardware/clps7111.h> | 15 | #include <asm/hardware/clps7111.h> |
15 | 16 | ||
16 | .macro addruart, rx, tmp | 17 | .macro addruart, rx, tmp |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 2ec3095ffb7b..b280efb1fa12 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
26 | #include <linux/mtd/physmap.h> | 26 | #include <linux/mtd/physmap.h> |
27 | #include <linux/regulator/machine.h> | 27 | #include <linux/regulator/machine.h> |
28 | #include <linux/regulator/tps6507x.h> | ||
28 | #include <linux/mfd/tps6507x.h> | 29 | #include <linux/mfd/tps6507x.h> |
29 | #include <linux/input/tps6507x-ts.h> | 30 | #include <linux/input/tps6507x-ts.h> |
30 | 31 | ||
@@ -469,6 +470,11 @@ struct regulator_consumer_supply tps65070_ldo2_consumers[] = { | |||
469 | }, | 470 | }, |
470 | }; | 471 | }; |
471 | 472 | ||
473 | /* We take advantage of the fact that both defdcdc{2,3} are tied high */ | ||
474 | static struct tps6507x_reg_platform_data tps6507x_platform_data = { | ||
475 | .defdcdc_default = true, | ||
476 | }; | ||
477 | |||
472 | struct regulator_init_data tps65070_regulator_data[] = { | 478 | struct regulator_init_data tps65070_regulator_data[] = { |
473 | /* dcdc1 */ | 479 | /* dcdc1 */ |
474 | { | 480 | { |
@@ -494,6 +500,7 @@ struct regulator_init_data tps65070_regulator_data[] = { | |||
494 | }, | 500 | }, |
495 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers), | 501 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers), |
496 | .consumer_supplies = tps65070_dcdc2_consumers, | 502 | .consumer_supplies = tps65070_dcdc2_consumers, |
503 | .driver_data = &tps6507x_platform_data, | ||
497 | }, | 504 | }, |
498 | 505 | ||
499 | /* dcdc3 */ | 506 | /* dcdc3 */ |
@@ -507,6 +514,7 @@ struct regulator_init_data tps65070_regulator_data[] = { | |||
507 | }, | 514 | }, |
508 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers), | 515 | .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers), |
509 | .consumer_supplies = tps65070_dcdc3_consumers, | 516 | .consumer_supplies = tps65070_dcdc3_consumers, |
517 | .driver_data = &tps6507x_platform_data, | ||
510 | }, | 518 | }, |
511 | 519 | ||
512 | /* ldo1 */ | 520 | /* ldo1 */ |
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index 3a1a855bfdca..f744f676783f 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/mtd/physmap.h> | ||
17 | 16 | ||
18 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
19 | 18 | ||
@@ -21,26 +20,6 @@ | |||
21 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
22 | 21 | ||
23 | 22 | ||
24 | static struct physmap_flash_data adssphere_flash_data = { | ||
25 | .width = 4, | ||
26 | }; | ||
27 | |||
28 | static struct resource adssphere_flash_resource = { | ||
29 | .start = EP93XX_CS6_PHYS_BASE, | ||
30 | .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1, | ||
31 | .flags = IORESOURCE_MEM, | ||
32 | }; | ||
33 | |||
34 | static struct platform_device adssphere_flash = { | ||
35 | .name = "physmap-flash", | ||
36 | .id = 0, | ||
37 | .dev = { | ||
38 | .platform_data = &adssphere_flash_data, | ||
39 | }, | ||
40 | .num_resources = 1, | ||
41 | .resource = &adssphere_flash_resource, | ||
42 | }; | ||
43 | |||
44 | static struct ep93xx_eth_data __initdata adssphere_eth_data = { | 23 | static struct ep93xx_eth_data __initdata adssphere_eth_data = { |
45 | .phy_id = 1, | 24 | .phy_id = 1, |
46 | }; | 25 | }; |
@@ -48,8 +27,7 @@ static struct ep93xx_eth_data __initdata adssphere_eth_data = { | |||
48 | static void __init adssphere_init_machine(void) | 27 | static void __init adssphere_init_machine(void) |
49 | { | 28 | { |
50 | ep93xx_init_devices(); | 29 | ep93xx_init_devices(); |
51 | platform_device_register(&adssphere_flash); | 30 | ep93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_32M); |
52 | |||
53 | ep93xx_register_eth(&adssphere_eth_data, 1); | 31 | ep93xx_register_eth(&adssphere_eth_data, 1); |
54 | } | 32 | } |
55 | 33 | ||
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index e29bdef9b2e2..7f3039761d91 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -185,7 +185,7 @@ static struct clk_lookup clocks[] = { | |||
185 | INIT_CK(NULL, "pll1", &clk_pll1), | 185 | INIT_CK(NULL, "pll1", &clk_pll1), |
186 | INIT_CK(NULL, "fclk", &clk_f), | 186 | INIT_CK(NULL, "fclk", &clk_f), |
187 | INIT_CK(NULL, "hclk", &clk_h), | 187 | INIT_CK(NULL, "hclk", &clk_h), |
188 | INIT_CK(NULL, "pclk", &clk_p), | 188 | INIT_CK(NULL, "apb_pclk", &clk_p), |
189 | INIT_CK(NULL, "pll2", &clk_pll2), | 189 | INIT_CK(NULL, "pll2", &clk_pll2), |
190 | INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), | 190 | INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), |
191 | INIT_CK("ep93xx-keypad", NULL, &clk_keypad), | 191 | INIT_CK("ep93xx-keypad", NULL, &clk_keypad), |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 9092677f63eb..8e37a045188c 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/termios.h> | 29 | #include <linux/termios.h> |
30 | #include <linux/amba/bus.h> | 30 | #include <linux/amba/bus.h> |
31 | #include <linux/amba/serial.h> | 31 | #include <linux/amba/serial.h> |
32 | #include <linux/mtd/physmap.h> | ||
32 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
33 | #include <linux/i2c-gpio.h> | 34 | #include <linux/i2c-gpio.h> |
34 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
@@ -215,8 +216,8 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) | |||
215 | spin_lock_irqsave(&syscon_swlock, flags); | 216 | spin_lock_irqsave(&syscon_swlock, flags); |
216 | 217 | ||
217 | val = __raw_readl(EP93XX_SYSCON_DEVCFG); | 218 | val = __raw_readl(EP93XX_SYSCON_DEVCFG); |
218 | val |= set_bits; | ||
219 | val &= ~clear_bits; | 219 | val &= ~clear_bits; |
220 | val |= set_bits; | ||
220 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | 221 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); |
221 | __raw_writel(val, EP93XX_SYSCON_DEVCFG); | 222 | __raw_writel(val, EP93XX_SYSCON_DEVCFG); |
222 | 223 | ||
@@ -348,6 +349,43 @@ static struct platform_device ep93xx_ohci_device = { | |||
348 | 349 | ||
349 | 350 | ||
350 | /************************************************************************* | 351 | /************************************************************************* |
352 | * EP93xx physmap'ed flash | ||
353 | *************************************************************************/ | ||
354 | static struct physmap_flash_data ep93xx_flash_data; | ||
355 | |||
356 | static struct resource ep93xx_flash_resource = { | ||
357 | .flags = IORESOURCE_MEM, | ||
358 | }; | ||
359 | |||
360 | static struct platform_device ep93xx_flash = { | ||
361 | .name = "physmap-flash", | ||
362 | .id = 0, | ||
363 | .dev = { | ||
364 | .platform_data = &ep93xx_flash_data, | ||
365 | }, | ||
366 | .num_resources = 1, | ||
367 | .resource = &ep93xx_flash_resource, | ||
368 | }; | ||
369 | |||
370 | /** | ||
371 | * ep93xx_register_flash() - Register the external flash device. | ||
372 | * @width: bank width in octets | ||
373 | * @start: resource start address | ||
374 | * @size: resource size | ||
375 | */ | ||
376 | void __init ep93xx_register_flash(unsigned int width, | ||
377 | resource_size_t start, resource_size_t size) | ||
378 | { | ||
379 | ep93xx_flash_data.width = width; | ||
380 | |||
381 | ep93xx_flash_resource.start = start; | ||
382 | ep93xx_flash_resource.end = start + size - 1; | ||
383 | |||
384 | platform_device_register(&ep93xx_flash); | ||
385 | } | ||
386 | |||
387 | |||
388 | /************************************************************************* | ||
351 | * EP93xx ethernet peripheral handling | 389 | * EP93xx ethernet peripheral handling |
352 | *************************************************************************/ | 390 | *************************************************************************/ |
353 | static struct ep93xx_eth_data ep93xx_eth_data; | 391 | static struct ep93xx_eth_data ep93xx_eth_data; |
@@ -620,6 +658,11 @@ static struct platform_device ep93xx_fb_device = { | |||
620 | .resource = ep93xx_fb_resource, | 658 | .resource = ep93xx_fb_resource, |
621 | }; | 659 | }; |
622 | 660 | ||
661 | static struct platform_device ep93xx_bl_device = { | ||
662 | .name = "ep93xx-bl", | ||
663 | .id = -1, | ||
664 | }; | ||
665 | |||
623 | /** | 666 | /** |
624 | * ep93xx_register_fb - Register the framebuffer platform device. | 667 | * ep93xx_register_fb - Register the framebuffer platform device. |
625 | * @data: platform specific framebuffer configuration (__initdata) | 668 | * @data: platform specific framebuffer configuration (__initdata) |
@@ -628,6 +671,7 @@ void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data) | |||
628 | { | 671 | { |
629 | ep93xxfb_data = *data; | 672 | ep93xxfb_data = *data; |
630 | platform_device_register(&ep93xx_fb_device); | 673 | platform_device_register(&ep93xx_fb_device); |
674 | platform_device_register(&ep93xx_bl_device); | ||
631 | } | 675 | } |
632 | 676 | ||
633 | 677 | ||
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 3884182cd362..c2ce9034ba87 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include <linux/mtd/physmap.h> | ||
31 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
32 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
33 | #include <linux/i2c-gpio.h> | 32 | #include <linux/i2c-gpio.h> |
@@ -38,39 +37,13 @@ | |||
38 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
39 | 38 | ||
40 | 39 | ||
41 | static struct physmap_flash_data edb93xx_flash_data; | ||
42 | |||
43 | static struct resource edb93xx_flash_resource = { | ||
44 | .flags = IORESOURCE_MEM, | ||
45 | }; | ||
46 | |||
47 | static struct platform_device edb93xx_flash = { | ||
48 | .name = "physmap-flash", | ||
49 | .id = 0, | ||
50 | .dev = { | ||
51 | .platform_data = &edb93xx_flash_data, | ||
52 | }, | ||
53 | .num_resources = 1, | ||
54 | .resource = &edb93xx_flash_resource, | ||
55 | }; | ||
56 | |||
57 | static void __init __edb93xx_register_flash(unsigned int width, | ||
58 | resource_size_t start, resource_size_t size) | ||
59 | { | ||
60 | edb93xx_flash_data.width = width; | ||
61 | edb93xx_flash_resource.start = start; | ||
62 | edb93xx_flash_resource.end = start + size - 1; | ||
63 | |||
64 | platform_device_register(&edb93xx_flash); | ||
65 | } | ||
66 | |||
67 | static void __init edb93xx_register_flash(void) | 40 | static void __init edb93xx_register_flash(void) |
68 | { | 41 | { |
69 | if (machine_is_edb9307() || machine_is_edb9312() || | 42 | if (machine_is_edb9307() || machine_is_edb9312() || |
70 | machine_is_edb9315()) { | 43 | machine_is_edb9315()) { |
71 | __edb93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_32M); | 44 | ep93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_32M); |
72 | } else { | 45 | } else { |
73 | __edb93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M); | 46 | ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M); |
74 | } | 47 | } |
75 | } | 48 | } |
76 | 49 | ||
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index a809618e9f05..d97168c0ba33 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/mtd/physmap.h> | ||
17 | 16 | ||
18 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
19 | 18 | ||
@@ -21,26 +20,6 @@ | |||
21 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
22 | 21 | ||
23 | 22 | ||
24 | static struct physmap_flash_data gesbc9312_flash_data = { | ||
25 | .width = 4, | ||
26 | }; | ||
27 | |||
28 | static struct resource gesbc9312_flash_resource = { | ||
29 | .start = EP93XX_CS6_PHYS_BASE, | ||
30 | .end = EP93XX_CS6_PHYS_BASE + SZ_8M - 1, | ||
31 | .flags = IORESOURCE_MEM, | ||
32 | }; | ||
33 | |||
34 | static struct platform_device gesbc9312_flash = { | ||
35 | .name = "physmap-flash", | ||
36 | .id = 0, | ||
37 | .dev = { | ||
38 | .platform_data = &gesbc9312_flash_data, | ||
39 | }, | ||
40 | .num_resources = 1, | ||
41 | .resource = &gesbc9312_flash_resource, | ||
42 | }; | ||
43 | |||
44 | static struct ep93xx_eth_data __initdata gesbc9312_eth_data = { | 23 | static struct ep93xx_eth_data __initdata gesbc9312_eth_data = { |
45 | .phy_id = 1, | 24 | .phy_id = 1, |
46 | }; | 25 | }; |
@@ -48,8 +27,7 @@ static struct ep93xx_eth_data __initdata gesbc9312_eth_data = { | |||
48 | static void __init gesbc9312_init_machine(void) | 27 | static void __init gesbc9312_init_machine(void) |
49 | { | 28 | { |
50 | ep93xx_init_devices(); | 29 | ep93xx_init_devices(); |
51 | platform_device_register(&gesbc9312_flash); | 30 | ep93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_8M); |
52 | |||
53 | ep93xx_register_eth(&gesbc9312_eth_data, 0); | 31 | ep93xx_register_eth(&gesbc9312_eth_data, 0); |
54 | } | 32 | } |
55 | 33 | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 9a4413dd44bb..a6c09176334c 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -43,6 +43,9 @@ static inline void ep93xx_devcfg_clear_bits(unsigned int bits) | |||
43 | 43 | ||
44 | unsigned int ep93xx_chip_revision(void); | 44 | unsigned int ep93xx_chip_revision(void); |
45 | 45 | ||
46 | void ep93xx_register_flash(unsigned int width, | ||
47 | resource_size_t start, resource_size_t size); | ||
48 | |||
46 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); | 49 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); |
47 | void ep93xx_register_i2c(struct i2c_gpio_platform_data *data, | 50 | void ep93xx_register_i2c(struct i2c_gpio_platform_data *data, |
48 | struct i2c_board_info *devices, int num); | 51 | struct i2c_board_info *devices, int num); |
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c index 1cc911b4efa6..2ba776320a82 100644 --- a/arch/arm/mach-ep93xx/micro9.c +++ b/arch/arm/mach-ep93xx/micro9.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/mtd/physmap.h> | ||
18 | #include <linux/io.h> | 17 | #include <linux/io.h> |
19 | 18 | ||
20 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
@@ -31,31 +30,6 @@ | |||
31 | * Micro9-Lite uses a separate MTD map driver for flash support | 30 | * Micro9-Lite uses a separate MTD map driver for flash support |
32 | * Micro9-Slim has up to 64MB of either 32-bit or 16-bit flash on CS1 | 31 | * Micro9-Slim has up to 64MB of either 32-bit or 16-bit flash on CS1 |
33 | *************************************************************************/ | 32 | *************************************************************************/ |
34 | static struct physmap_flash_data micro9_flash_data; | ||
35 | |||
36 | static struct resource micro9_flash_resource = { | ||
37 | .start = EP93XX_CS1_PHYS_BASE, | ||
38 | .end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1, | ||
39 | .flags = IORESOURCE_MEM, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device micro9_flash = { | ||
43 | .name = "physmap-flash", | ||
44 | .id = 0, | ||
45 | .dev = { | ||
46 | .platform_data = µ9_flash_data, | ||
47 | }, | ||
48 | .num_resources = 1, | ||
49 | .resource = µ9_flash_resource, | ||
50 | }; | ||
51 | |||
52 | static void __init __micro9_register_flash(unsigned int width) | ||
53 | { | ||
54 | micro9_flash_data.width = width; | ||
55 | |||
56 | platform_device_register(µ9_flash); | ||
57 | } | ||
58 | |||
59 | static unsigned int __init micro9_detect_bootwidth(void) | 33 | static unsigned int __init micro9_detect_bootwidth(void) |
60 | { | 34 | { |
61 | u32 v; | 35 | u32 v; |
@@ -70,10 +44,17 @@ static unsigned int __init micro9_detect_bootwidth(void) | |||
70 | 44 | ||
71 | static void __init micro9_register_flash(void) | 45 | static void __init micro9_register_flash(void) |
72 | { | 46 | { |
47 | unsigned int width; | ||
48 | |||
73 | if (machine_is_micro9()) | 49 | if (machine_is_micro9()) |
74 | __micro9_register_flash(4); | 50 | width = 4; |
75 | else if (machine_is_micro9m() || machine_is_micro9s()) | 51 | else if (machine_is_micro9m() || machine_is_micro9s()) |
76 | __micro9_register_flash(micro9_detect_bootwidth()); | 52 | width = micro9_detect_bootwidth(); |
53 | else | ||
54 | width = 0; | ||
55 | |||
56 | if (width) | ||
57 | ep93xx_register_flash(width, EP93XX_CS1_PHYS_BASE, SZ_64M); | ||
77 | } | 58 | } |
78 | 59 | ||
79 | 60 | ||
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index 388aec95f60e..5dded5884133 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/mtd/physmap.h> | ||
22 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
23 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
24 | #include <linux/i2c-gpio.h> | 23 | #include <linux/i2c-gpio.h> |
@@ -29,26 +28,6 @@ | |||
29 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
31 | 30 | ||
32 | static struct physmap_flash_data simone_flash_data = { | ||
33 | .width = 2, | ||
34 | }; | ||
35 | |||
36 | static struct resource simone_flash_resource = { | ||
37 | .start = EP93XX_CS6_PHYS_BASE, | ||
38 | .end = EP93XX_CS6_PHYS_BASE + SZ_8M - 1, | ||
39 | .flags = IORESOURCE_MEM, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device simone_flash = { | ||
43 | .name = "physmap-flash", | ||
44 | .id = 0, | ||
45 | .num_resources = 1, | ||
46 | .resource = &simone_flash_resource, | ||
47 | .dev = { | ||
48 | .platform_data = &simone_flash_data, | ||
49 | }, | ||
50 | }; | ||
51 | |||
52 | static struct ep93xx_eth_data __initdata simone_eth_data = { | 31 | static struct ep93xx_eth_data __initdata simone_eth_data = { |
53 | .phy_id = 1, | 32 | .phy_id = 1, |
54 | }; | 33 | }; |
@@ -77,8 +56,7 @@ static struct i2c_board_info __initdata simone_i2c_board_info[] = { | |||
77 | static void __init simone_init_machine(void) | 56 | static void __init simone_init_machine(void) |
78 | { | 57 | { |
79 | ep93xx_init_devices(); | 58 | ep93xx_init_devices(); |
80 | 59 | ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_8M); | |
81 | platform_device_register(&simone_flash); | ||
82 | ep93xx_register_eth(&simone_eth_data, 1); | 60 | ep93xx_register_eth(&simone_eth_data, 1); |
83 | ep93xx_register_fb(&simone_fb_info); | 61 | ep93xx_register_fb(&simone_fb_info); |
84 | ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, | 62 | ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, |
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index ae7319e588c7..93aeab8af705 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/m48t86.h> | 19 | #include <linux/m48t86.h> |
20 | #include <linux/mtd/physmap.h> | ||
21 | #include <linux/mtd/nand.h> | 20 | #include <linux/mtd/nand.h> |
22 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
23 | 22 | ||
@@ -173,31 +172,13 @@ static struct platform_device ts72xx_nand_flash = { | |||
173 | }; | 172 | }; |
174 | 173 | ||
175 | 174 | ||
176 | /************************************************************************* | ||
177 | * NOR flash (TS-7200 only) | ||
178 | *************************************************************************/ | ||
179 | static struct physmap_flash_data ts72xx_nor_data = { | ||
180 | .width = 2, | ||
181 | }; | ||
182 | |||
183 | static struct resource ts72xx_nor_resource = { | ||
184 | .start = EP93XX_CS6_PHYS_BASE, | ||
185 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, | ||
186 | .flags = IORESOURCE_MEM, | ||
187 | }; | ||
188 | |||
189 | static struct platform_device ts72xx_nor_flash = { | ||
190 | .name = "physmap-flash", | ||
191 | .id = 0, | ||
192 | .dev.platform_data = &ts72xx_nor_data, | ||
193 | .resource = &ts72xx_nor_resource, | ||
194 | .num_resources = 1, | ||
195 | }; | ||
196 | |||
197 | static void __init ts72xx_register_flash(void) | 175 | static void __init ts72xx_register_flash(void) |
198 | { | 176 | { |
177 | /* | ||
178 | * TS7200 has NOR flash all other TS72xx board have NAND flash. | ||
179 | */ | ||
199 | if (board_is_ts7200()) { | 180 | if (board_is_ts7200()) { |
200 | platform_device_register(&ts72xx_nor_flash); | 181 | ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M); |
201 | } else { | 182 | } else { |
202 | resource_size_t start; | 183 | resource_size_t start; |
203 | 184 | ||
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index e3bc3f6f6b10..88b3dd89be89 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
@@ -232,7 +232,7 @@ EXPORT_SYMBOL(__bus_to_virt); | |||
232 | 232 | ||
233 | unsigned long __pfn_to_bus(unsigned long pfn) | 233 | unsigned long __pfn_to_bus(unsigned long pfn) |
234 | { | 234 | { |
235 | return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET)); | 235 | return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET); |
236 | } | 236 | } |
237 | EXPORT_SYMBOL(__pfn_to_bus); | 237 | EXPORT_SYMBOL(__pfn_to_bus); |
238 | 238 | ||
diff --git a/arch/arm/mach-h720x/include/mach/debug-macro.S b/arch/arm/mach-h720x/include/mach/debug-macro.S index a9ee8f0d48b7..27cafd12f033 100644 --- a/arch/arm/mach-h720x/include/mach/debug-macro.S +++ b/arch/arm/mach-h720x/include/mach/debug-macro.S | |||
@@ -11,8 +11,10 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | .equ io_virt, IO_BASE | 14 | #include <mach/hardware.h> |
15 | .equ io_phys, IO_START | 15 | |
16 | .equ io_virt, IO_VIRT | ||
17 | .equ io_phys, IO_PHYS | ||
16 | 18 | ||
17 | .macro addruart, rx, tmp | 19 | .macro addruart, rx, tmp |
18 | mrc p15, 0, \rx, c1, c0 | 20 | mrc p15, 0, \rx, c1, c0 |
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index bcb26f01b26c..8f4fb6d638f7 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -121,8 +121,13 @@ static struct clk uartclk = { | |||
121 | .rate = 14745600, | 121 | .rate = 14745600, |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static struct clk dummy_apb_pclk; | ||
125 | |||
124 | static struct clk_lookup lookups[] = { | 126 | static struct clk_lookup lookups[] = { |
125 | { /* UART0 */ | 127 | { /* Bus clock */ |
128 | .con_id = "apb_pclk", | ||
129 | .clk = &dummy_apb_pclk, | ||
130 | }, { /* UART0 */ | ||
126 | .dev_id = "mb:16", | 131 | .dev_id = "mb:16", |
127 | .clk = &uartclk, | 132 | .clk = &uartclk, |
128 | }, { /* UART1 */ | 133 | }, { /* UART1 */ |
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c index 7221c20b2afa..f781164e623f 100644 --- a/arch/arm/mach-kirkwood/tsx1x-common.c +++ b/arch/arm/mach-kirkwood/tsx1x-common.c | |||
@@ -77,7 +77,7 @@ struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = { | |||
77 | }, | 77 | }, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | void qnap_tsx1x_register_flash(void) | 80 | void __init qnap_tsx1x_register_flash(void) |
81 | { | 81 | { |
82 | spi_register_board_info(qnap_tsx1x_spi_slave_info, | 82 | spi_register_board_info(qnap_tsx1x_spi_slave_info, |
83 | ARRAY_SIZE(qnap_tsx1x_spi_slave_info)); | 83 | ARRAY_SIZE(qnap_tsx1x_spi_slave_info)); |
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.h b/arch/arm/mach-kirkwood/tsx1x-common.h index 9a592962a6ea..7fa037361b55 100644 --- a/arch/arm/mach-kirkwood/tsx1x-common.h +++ b/arch/arm/mach-kirkwood/tsx1x-common.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ARCH_KIRKWOOD_TSX1X_COMMON_H | 1 | #ifndef __ARCH_KIRKWOOD_TSX1X_COMMON_H |
2 | #define __ARCH_KIRKWOOD_TSX1X_COMMON_H | 2 | #define __ARCH_KIRKWOOD_TSX1X_COMMON_H |
3 | 3 | ||
4 | extern void qnap_tsx1x_register_flash(void); | 4 | extern void __init qnap_tsx1x_register_flash(void); |
5 | extern void qnap_tsx1x_power_off(void); | 5 | extern void qnap_tsx1x_power_off(void); |
6 | 6 | ||
7 | #endif | 7 | #endif |
diff --git a/arch/arm/mach-l7200/Makefile b/arch/arm/mach-l7200/Makefile deleted file mode 100644 index 4bd8ebd70e7b..000000000000 --- a/arch/arm/mach-l7200/Makefile +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y := core.o | ||
8 | obj-m := | ||
9 | obj-n := | ||
10 | obj- := | ||
11 | |||
diff --git a/arch/arm/mach-l7200/Makefile.boot b/arch/arm/mach-l7200/Makefile.boot deleted file mode 100644 index 6c72ecbe6b64..000000000000 --- a/arch/arm/mach-l7200/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y := 0xf0008000 | ||
2 | |||
diff --git a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c deleted file mode 100644 index 50d23246d4f0..000000000000 --- a/arch/arm/mach-l7200/core.c +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/mm-lusl7200.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Steve Hill (sjhill@cotw.com) | ||
5 | * | ||
6 | * Extra MM routines for L7200 architecture | ||
7 | */ | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/init.h> | ||
10 | #include <linux/irq.h> | ||
11 | #include <linux/device.h> | ||
12 | |||
13 | #include <asm/types.h> | ||
14 | #include <asm/irq.h> | ||
15 | #include <asm/mach-types.h> | ||
16 | #include <mach/hardware.h> | ||
17 | #include <asm/page.h> | ||
18 | |||
19 | #include <asm/mach/arch.h> | ||
20 | #include <asm/mach/map.h> | ||
21 | #include <asm/mach/irq.h> | ||
22 | |||
23 | /* | ||
24 | * IRQ base register | ||
25 | */ | ||
26 | #define IRQ_BASE (IO_BASE_2 + 0x1000) | ||
27 | |||
28 | /* | ||
29 | * Normal IRQ registers | ||
30 | */ | ||
31 | #define IRQ_STATUS (*(volatile unsigned long *) (IRQ_BASE + 0x000)) | ||
32 | #define IRQ_RAWSTATUS (*(volatile unsigned long *) (IRQ_BASE + 0x004)) | ||
33 | #define IRQ_ENABLE (*(volatile unsigned long *) (IRQ_BASE + 0x008)) | ||
34 | #define IRQ_ENABLECLEAR (*(volatile unsigned long *) (IRQ_BASE + 0x00c)) | ||
35 | #define IRQ_SOFT (*(volatile unsigned long *) (IRQ_BASE + 0x010)) | ||
36 | #define IRQ_SOURCESEL (*(volatile unsigned long *) (IRQ_BASE + 0x018)) | ||
37 | |||
38 | /* | ||
39 | * Fast IRQ registers | ||
40 | */ | ||
41 | #define FIQ_STATUS (*(volatile unsigned long *) (IRQ_BASE + 0x100)) | ||
42 | #define FIQ_RAWSTATUS (*(volatile unsigned long *) (IRQ_BASE + 0x104)) | ||
43 | #define FIQ_ENABLE (*(volatile unsigned long *) (IRQ_BASE + 0x108)) | ||
44 | #define FIQ_ENABLECLEAR (*(volatile unsigned long *) (IRQ_BASE + 0x10c)) | ||
45 | #define FIQ_SOFT (*(volatile unsigned long *) (IRQ_BASE + 0x110)) | ||
46 | #define FIQ_SOURCESEL (*(volatile unsigned long *) (IRQ_BASE + 0x118)) | ||
47 | |||
48 | static void l7200_mask_irq(unsigned int irq) | ||
49 | { | ||
50 | IRQ_ENABLECLEAR = 1 << irq; | ||
51 | } | ||
52 | |||
53 | static void l7200_unmask_irq(unsigned int irq) | ||
54 | { | ||
55 | IRQ_ENABLE = 1 << irq; | ||
56 | } | ||
57 | |||
58 | static struct irq_chip l7200_irq_chip = { | ||
59 | .ack = l7200_mask_irq, | ||
60 | .mask = l7200_mask_irq, | ||
61 | .unmask = l7200_unmask_irq | ||
62 | }; | ||
63 | |||
64 | static void __init l7200_init_irq(void) | ||
65 | { | ||
66 | int irq; | ||
67 | |||
68 | IRQ_ENABLECLEAR = 0xffffffff; /* clear all interrupt enables */ | ||
69 | FIQ_ENABLECLEAR = 0xffffffff; /* clear all fast interrupt enables */ | ||
70 | |||
71 | for (irq = 0; irq < NR_IRQS; irq++) { | ||
72 | set_irq_chip(irq, &l7200_irq_chip); | ||
73 | set_irq_flags(irq, IRQF_VALID); | ||
74 | set_irq_handler(irq, handle_level_irq); | ||
75 | } | ||
76 | |||
77 | init_FIQ(); | ||
78 | } | ||
79 | |||
80 | static struct map_desc l7200_io_desc[] __initdata = { | ||
81 | { IO_BASE, IO_START, IO_SIZE, MT_DEVICE }, | ||
82 | { IO_BASE_2, IO_START_2, IO_SIZE_2, MT_DEVICE }, | ||
83 | { AUX_BASE, AUX_START, AUX_SIZE, MT_DEVICE }, | ||
84 | { FLASH1_BASE, FLASH1_START, FLASH1_SIZE, MT_DEVICE }, | ||
85 | { FLASH2_BASE, FLASH2_START, FLASH2_SIZE, MT_DEVICE } | ||
86 | }; | ||
87 | |||
88 | static void __init l7200_map_io(void) | ||
89 | { | ||
90 | iotable_init(l7200_io_desc, ARRAY_SIZE(l7200_io_desc)); | ||
91 | } | ||
92 | |||
93 | MACHINE_START(L7200, "LinkUp Systems L7200") | ||
94 | /* Maintainer: Steve Hill / Scott McConnell */ | ||
95 | .phys_io = 0x80040000, | ||
96 | .io_pg_offst = ((0xd0000000) >> 18) & 0xfffc, | ||
97 | .map_io = l7200_map_io, | ||
98 | .init_irq = l7200_init_irq, | ||
99 | MACHINE_END | ||
100 | |||
diff --git a/arch/arm/mach-l7200/include/mach/aux_reg.h b/arch/arm/mach-l7200/include/mach/aux_reg.h deleted file mode 100644 index 4671558cdd51..000000000000 --- a/arch/arm/mach-l7200/include/mach/aux_reg.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/aux_reg.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Steve Hill (sjhill@cotw.com) | ||
5 | * | ||
6 | * Changelog: | ||
7 | * 08-02-2000 SJH Created file | ||
8 | */ | ||
9 | #ifndef _ASM_ARCH_AUXREG_H | ||
10 | #define _ASM_ARCH_AUXREG_H | ||
11 | |||
12 | #include <mach/hardware.h> | ||
13 | |||
14 | #define l7200aux_reg *((volatile unsigned int *) (AUX_BASE)) | ||
15 | |||
16 | /* | ||
17 | * Auxillary register values | ||
18 | */ | ||
19 | #define AUX_CLEAR 0x00000000 | ||
20 | #define AUX_DIAG_LED_ON 0x00000002 | ||
21 | #define AUX_RTS_UART1 0x00000004 | ||
22 | #define AUX_DTR_UART1 0x00000008 | ||
23 | #define AUX_KBD_COLUMN_12_HIGH 0x00000010 | ||
24 | #define AUX_KBD_COLUMN_12_OFF 0x00000020 | ||
25 | #define AUX_KBD_COLUMN_13_HIGH 0x00000040 | ||
26 | #define AUX_KBD_COLUMN_13_OFF 0x00000080 | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/debug-macro.S b/arch/arm/mach-l7200/include/mach/debug-macro.S deleted file mode 100644 index b69ed344c7c9..000000000000 --- a/arch/arm/mach-l7200/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* arch/arm/mach-l7200/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .equ io_virt, IO_BASE | ||
15 | .equ io_phys, IO_START | ||
16 | |||
17 | .macro addruart, rx, tmp | ||
18 | mrc p15, 0, \rx, c1, c0 | ||
19 | tst \rx, #1 @ MMU enabled? | ||
20 | moveq \rx, #io_phys @ physical base address | ||
21 | movne \rx, #io_virt @ virtual address | ||
22 | add \rx, \rx, #0x00044000 @ UART1 | ||
23 | @ add \rx, \rx, #0x00045000 @ UART2 | ||
24 | .endm | ||
25 | |||
26 | .macro senduart,rd,rx | ||
27 | str \rd, [\rx, #0x0] @ UARTDR | ||
28 | .endm | ||
29 | |||
30 | .macro waituart,rd,rx | ||
31 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
32 | tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full | ||
33 | bne 1001b | ||
34 | .endm | ||
35 | |||
36 | .macro busyuart,rd,rx | ||
37 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
38 | tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy | ||
39 | bne 1001b | ||
40 | .endm | ||
diff --git a/arch/arm/mach-l7200/include/mach/entry-macro.S b/arch/arm/mach-l7200/include/mach/entry-macro.S deleted file mode 100644 index 1726d91fc1d3..000000000000 --- a/arch/arm/mach-l7200/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for L7200-based platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <mach/hardware.h> | ||
11 | |||
12 | .equ irq_base_addr, IO_BASE_2 | ||
13 | |||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | mov \irqstat, #irq_base_addr @ Virt addr IRQ regs | ||
25 | add \irqstat, \irqstat, #0x00001000 @ Status reg | ||
26 | ldr \irqstat, [\irqstat, #0] @ get interrupts | ||
27 | mov \irqnr, #0 | ||
28 | 1001: tst \irqstat, #1 | ||
29 | addeq \irqnr, \irqnr, #1 | ||
30 | moveq \irqstat, \irqstat, lsr #1 | ||
31 | tsteq \irqnr, #32 | ||
32 | beq 1001b | ||
33 | teq \irqnr, #32 | ||
34 | .endm | ||
35 | |||
diff --git a/arch/arm/mach-l7200/include/mach/gp_timers.h b/arch/arm/mach-l7200/include/mach/gp_timers.h deleted file mode 100644 index 2b7086a26b81..000000000000 --- a/arch/arm/mach-l7200/include/mach/gp_timers.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/gp_timers.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Steve Hill (sjhill@cotw.com) | ||
5 | * | ||
6 | * Changelog: | ||
7 | * 07-28-2000 SJH Created file | ||
8 | * 08-02-2000 SJH Used structure for registers | ||
9 | */ | ||
10 | #ifndef _ASM_ARCH_GPTIMERS_H | ||
11 | #define _ASM_ARCH_GPTIMERS_H | ||
12 | |||
13 | #include <mach/hardware.h> | ||
14 | |||
15 | /* | ||
16 | * Layout of L7200 general purpose timer registers | ||
17 | */ | ||
18 | struct GPT_Regs { | ||
19 | unsigned int TIMERLOAD; | ||
20 | unsigned int TIMERVALUE; | ||
21 | unsigned int TIMERCONTROL; | ||
22 | unsigned int TIMERCLEAR; | ||
23 | }; | ||
24 | |||
25 | #define GPT_BASE (IO_BASE_2 + 0x3000) | ||
26 | #define l7200_timer1_regs ((volatile struct GPT_Regs *) (GPT_BASE)) | ||
27 | #define l7200_timer2_regs ((volatile struct GPT_Regs *) (GPT_BASE + 0x20)) | ||
28 | |||
29 | /* | ||
30 | * General register values | ||
31 | */ | ||
32 | #define GPT_PRESCALE_1 0x00000000 | ||
33 | #define GPT_PRESCALE_16 0x00000004 | ||
34 | #define GPT_PRESCALE_256 0x00000008 | ||
35 | #define GPT_MODE_FREERUN 0x00000000 | ||
36 | #define GPT_MODE_PERIODIC 0x00000040 | ||
37 | #define GPT_ENABLE 0x00000080 | ||
38 | #define GPT_BZTOG 0x00000100 | ||
39 | #define GPT_BZMOD 0x00000200 | ||
40 | #define GPT_LOAD_MASK 0x0000ffff | ||
41 | |||
42 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/gpio.h b/arch/arm/mach-l7200/include/mach/gpio.h deleted file mode 100644 index c7b0a5d7b8bb..000000000000 --- a/arch/arm/mach-l7200/include/mach/gpio.h +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | /****************************************************************************/ | ||
2 | /* | ||
3 | * arch/arm/mach-l7200/include/mach/gpio.h | ||
4 | * | ||
5 | * Registers and helper functions for the L7200 Link-Up Systems | ||
6 | * GPIO. | ||
7 | * | ||
8 | * (C) Copyright 2000, S A McConnell (samcconn@cotw.com) | ||
9 | * | ||
10 | * This file is subject to the terms and conditions of the GNU General Public | ||
11 | * License. See the file COPYING in the main directory of this archive for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | /****************************************************************************/ | ||
16 | |||
17 | #define GPIO_OFF 0x00005000 /* Offset from IO_START to the GPIO reg's. */ | ||
18 | |||
19 | /* IO_START and IO_BASE are defined in hardware.h */ | ||
20 | |||
21 | #define GPIO_START (IO_START_2 + GPIO_OFF) /* Physical addr of the GPIO reg. */ | ||
22 | #define GPIO_BASE (IO_BASE_2 + GPIO_OFF) /* Virtual addr of the GPIO reg. */ | ||
23 | |||
24 | /* Offsets from the start of the GPIO for all the registers. */ | ||
25 | #define PADR_OFF 0x000 | ||
26 | #define PADDR_OFF 0x004 | ||
27 | #define PASBSR_OFF 0x008 | ||
28 | #define PAEENR_OFF 0x00c | ||
29 | #define PAESNR_OFF 0x010 | ||
30 | #define PAESTR_OFF 0x014 | ||
31 | #define PAIMR_OFF 0x018 | ||
32 | #define PAINT_OFF 0x01c | ||
33 | |||
34 | #define PBDR_OFF 0x020 | ||
35 | #define PBDDR_OFF 0x024 | ||
36 | #define PBSBSR_OFF 0x028 | ||
37 | #define PBIMR_OFF 0x038 | ||
38 | #define PBINT_OFF 0x03c | ||
39 | |||
40 | #define PCDR_OFF 0x040 | ||
41 | #define PCDDR_OFF 0x044 | ||
42 | #define PCSBSR_OFF 0x048 | ||
43 | #define PCIMR_OFF 0x058 | ||
44 | #define PCINT_OFF 0x05c | ||
45 | |||
46 | #define PDDR_OFF 0x060 | ||
47 | #define PDDDR_OFF 0x064 | ||
48 | #define PDSBSR_OFF 0x068 | ||
49 | #define PDEENR_OFF 0x06c | ||
50 | #define PDESNR_OFF 0x070 | ||
51 | #define PDESTR_OFF 0x074 | ||
52 | #define PDIMR_OFF 0x078 | ||
53 | #define PDINT_OFF 0x07c | ||
54 | |||
55 | #define PEDR_OFF 0x080 | ||
56 | #define PEDDR_OFF 0x084 | ||
57 | #define PESBSR_OFF 0x088 | ||
58 | #define PEEENR_OFF 0x08c | ||
59 | #define PEESNR_OFF 0x090 | ||
60 | #define PEESTR_OFF 0x094 | ||
61 | #define PEIMR_OFF 0x098 | ||
62 | #define PEINT_OFF 0x09c | ||
63 | |||
64 | /* Define the GPIO registers for use by device drivers and the kernel. */ | ||
65 | #define PADR (*(volatile unsigned long *)(GPIO_BASE+PADR_OFF)) | ||
66 | #define PADDR (*(volatile unsigned long *)(GPIO_BASE+PADDR_OFF)) | ||
67 | #define PASBSR (*(volatile unsigned long *)(GPIO_BASE+PASBSR_OFF)) | ||
68 | #define PAEENR (*(volatile unsigned long *)(GPIO_BASE+PAEENR_OFF)) | ||
69 | #define PAESNR (*(volatile unsigned long *)(GPIO_BASE+PAESNR_OFF)) | ||
70 | #define PAESTR (*(volatile unsigned long *)(GPIO_BASE+PAESTR_OFF)) | ||
71 | #define PAIMR (*(volatile unsigned long *)(GPIO_BASE+PAIMR_OFF)) | ||
72 | #define PAINT (*(volatile unsigned long *)(GPIO_BASE+PAINT_OFF)) | ||
73 | |||
74 | #define PBDR (*(volatile unsigned long *)(GPIO_BASE+PBDR_OFF)) | ||
75 | #define PBDDR (*(volatile unsigned long *)(GPIO_BASE+PBDDR_OFF)) | ||
76 | #define PBSBSR (*(volatile unsigned long *)(GPIO_BASE+PBSBSR_OFF)) | ||
77 | #define PBIMR (*(volatile unsigned long *)(GPIO_BASE+PBIMR_OFF)) | ||
78 | #define PBINT (*(volatile unsigned long *)(GPIO_BASE+PBINT_OFF)) | ||
79 | |||
80 | #define PCDR (*(volatile unsigned long *)(GPIO_BASE+PCDR_OFF)) | ||
81 | #define PCDDR (*(volatile unsigned long *)(GPIO_BASE+PCDDR_OFF)) | ||
82 | #define PCSBSR (*(volatile unsigned long *)(GPIO_BASE+PCSBSR_OFF)) | ||
83 | #define PCIMR (*(volatile unsigned long *)(GPIO_BASE+PCIMR_OFF)) | ||
84 | #define PCINT (*(volatile unsigned long *)(GPIO_BASE+PCINT_OFF)) | ||
85 | |||
86 | #define PDDR (*(volatile unsigned long *)(GPIO_BASE+PDDR_OFF)) | ||
87 | #define PDDDR (*(volatile unsigned long *)(GPIO_BASE+PDDDR_OFF)) | ||
88 | #define PDSBSR (*(volatile unsigned long *)(GPIO_BASE+PDSBSR_OFF)) | ||
89 | #define PDEENR (*(volatile unsigned long *)(GPIO_BASE+PDEENR_OFF)) | ||
90 | #define PDESNR (*(volatile unsigned long *)(GPIO_BASE+PDESNR_OFF)) | ||
91 | #define PDESTR (*(volatile unsigned long *)(GPIO_BASE+PDESTR_OFF)) | ||
92 | #define PDIMR (*(volatile unsigned long *)(GPIO_BASE+PDIMR_OFF)) | ||
93 | #define PDINT (*(volatile unsigned long *)(GPIO_BASE+PDINT_OFF)) | ||
94 | |||
95 | #define PEDR (*(volatile unsigned long *)(GPIO_BASE+PEDR_OFF)) | ||
96 | #define PEDDR (*(volatile unsigned long *)(GPIO_BASE+PEDDR_OFF)) | ||
97 | #define PESBSR (*(volatile unsigned long *)(GPIO_BASE+PESBSR_OFF)) | ||
98 | #define PEEENR (*(volatile unsigned long *)(GPIO_BASE+PEEENR_OFF)) | ||
99 | #define PEESNR (*(volatile unsigned long *)(GPIO_BASE+PEESNR_OFF)) | ||
100 | #define PEESTR (*(volatile unsigned long *)(GPIO_BASE+PEESTR_OFF)) | ||
101 | #define PEIMR (*(volatile unsigned long *)(GPIO_BASE+PEIMR_OFF)) | ||
102 | #define PEINT (*(volatile unsigned long *)(GPIO_BASE+PEINT_OFF)) | ||
103 | |||
104 | #define VEE_EN 0x02 | ||
105 | #define BACKLIGHT_EN 0x04 | ||
diff --git a/arch/arm/mach-l7200/include/mach/hardware.h b/arch/arm/mach-l7200/include/mach/hardware.h deleted file mode 100644 index c31909cfc254..000000000000 --- a/arch/arm/mach-l7200/include/mach/hardware.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net) | ||
5 | * Steve Hill (sjhill@cotw.com) | ||
6 | * | ||
7 | * This file contains the hardware definitions for the | ||
8 | * LinkUp Systems L7200 SOC development board. | ||
9 | * | ||
10 | * Changelog: | ||
11 | * 02-01-2000 RS Created L7200 version, derived from rpc code | ||
12 | * 03-21-2000 SJH Cleaned up file | ||
13 | * 04-21-2000 RS Changed mapping of I/O in virtual space | ||
14 | * 04-25-2000 SJH Removed unused symbols and such | ||
15 | * 05-05-2000 SJH Complete rewrite | ||
16 | * 07-31-2000 SJH Added undocumented debug auxillary port to | ||
17 | * get at last two columns for keyboard driver | ||
18 | */ | ||
19 | #ifndef __ASM_ARCH_HARDWARE_H | ||
20 | #define __ASM_ARCH_HARDWARE_H | ||
21 | |||
22 | /* Hardware addresses of major areas. | ||
23 | * *_START is the physical address | ||
24 | * *_SIZE is the size of the region | ||
25 | * *_BASE is the virtual address | ||
26 | */ | ||
27 | #define RAM_START 0xf0000000 | ||
28 | #define RAM_SIZE 0x02000000 | ||
29 | #define RAM_BASE 0xc0000000 | ||
30 | |||
31 | #define IO_START 0x80000000 /* I/O */ | ||
32 | #define IO_SIZE 0x01000000 | ||
33 | #define IO_BASE 0xd0000000 | ||
34 | |||
35 | #define IO_START_2 0x90000000 /* I/O */ | ||
36 | #define IO_SIZE_2 0x01000000 | ||
37 | #define IO_BASE_2 0xd1000000 | ||
38 | |||
39 | #define AUX_START 0x1a000000 /* AUX PORT */ | ||
40 | #define AUX_SIZE 0x01000000 | ||
41 | #define AUX_BASE 0xd2000000 | ||
42 | |||
43 | #define FLASH1_START 0x00000000 /* FLASH BANK 1 */ | ||
44 | #define FLASH1_SIZE 0x01000000 | ||
45 | #define FLASH1_BASE 0xd3000000 | ||
46 | |||
47 | #define FLASH2_START 0x10000000 /* FLASH BANK 2 */ | ||
48 | #define FLASH2_SIZE 0x01000000 | ||
49 | #define FLASH2_BASE 0xd4000000 | ||
50 | |||
51 | #define ISA_START 0x20000000 /* ISA */ | ||
52 | #define ISA_SIZE 0x20000000 | ||
53 | #define ISA_BASE 0xe0000000 | ||
54 | |||
55 | #define PCIO_BASE IO_BASE | ||
56 | |||
57 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/io.h b/arch/arm/mach-l7200/include/mach/io.h deleted file mode 100644 index a770a89fb708..000000000000 --- a/arch/arm/mach-l7200/include/mach/io.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/io.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Steve Hill (sjhill@cotw.com) | ||
5 | * | ||
6 | * Changelog: | ||
7 | * 03-21-2000 SJH Created from arch/arm/mach-nexuspci/include/mach/io.h | ||
8 | * 08-31-2000 SJH Added in IO functions necessary for new drivers | ||
9 | */ | ||
10 | #ifndef __ASM_ARM_ARCH_IO_H | ||
11 | #define __ASM_ARM_ARCH_IO_H | ||
12 | |||
13 | #define IO_SPACE_LIMIT 0xffffffff | ||
14 | |||
15 | /* | ||
16 | * There are not real ISA nor PCI buses, so we fake it. | ||
17 | */ | ||
18 | #define __io(a) __typesafe_io(a) | ||
19 | #define __mem_pci(a) (a) | ||
20 | |||
21 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/irqs.h b/arch/arm/mach-l7200/include/mach/irqs.h deleted file mode 100644 index 7edffd713c5b..000000000000 --- a/arch/arm/mach-l7200/include/mach/irqs.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net) | ||
5 | * Steve Hill (sjhill@cotw.com) | ||
6 | * | ||
7 | * Changelog: | ||
8 | * 01-02-2000 RS Create l7200 version | ||
9 | * 03-28-2000 SJH Removed unused interrupt | ||
10 | * 07-28-2000 SJH Added pseudo-keyboard interrupt | ||
11 | */ | ||
12 | |||
13 | /* | ||
14 | * NOTE: The second timer (Timer 2) is used as the keyboard | ||
15 | * interrupt when the keyboard driver is enabled. | ||
16 | */ | ||
17 | |||
18 | #define NR_IRQS 32 | ||
19 | |||
20 | #define IRQ_STWDOG 0 /* Watchdog timer */ | ||
21 | #define IRQ_PROG 1 /* Programmable interrupt */ | ||
22 | #define IRQ_DEBUG_RX 2 /* Comm Rx debug */ | ||
23 | #define IRQ_DEBUG_TX 3 /* Comm Tx debug */ | ||
24 | #define IRQ_GCTC1 4 /* Timer 1 */ | ||
25 | #define IRQ_GCTC2 5 /* Timer 2 / Keyboard */ | ||
26 | #define IRQ_DMA 6 /* DMA controller */ | ||
27 | #define IRQ_CLCD 7 /* Color LCD controller */ | ||
28 | #define IRQ_SM_RX 8 /* Smart card */ | ||
29 | #define IRQ_SM_TX 9 /* Smart cart */ | ||
30 | #define IRQ_SM_RST 10 /* Smart card */ | ||
31 | #define IRQ_SIB 11 /* Serial Interface Bus */ | ||
32 | #define IRQ_MMC 12 /* MultiMediaCard */ | ||
33 | #define IRQ_SSP1 13 /* Synchronous Serial Port 1 */ | ||
34 | #define IRQ_SSP2 14 /* Synchronous Serial Port 1 */ | ||
35 | #define IRQ_SPI 15 /* SPI slave */ | ||
36 | #define IRQ_UART_1 16 /* UART 1 */ | ||
37 | #define IRQ_UART_2 17 /* UART 2 */ | ||
38 | #define IRQ_IRDA 18 /* IRDA */ | ||
39 | #define IRQ_RTC_TICK 19 /* Real Time Clock tick */ | ||
40 | #define IRQ_RTC_ALARM 20 /* Real Time Clock alarm */ | ||
41 | #define IRQ_GPIO 21 /* General Purpose IO */ | ||
42 | #define IRQ_GPIO_DMA 22 /* General Purpose IO, DMA */ | ||
43 | #define IRQ_M2M 23 /* Memory to memory DMA */ | ||
44 | #define IRQ_RESERVED 24 /* RESERVED, don't use */ | ||
45 | #define IRQ_INTF 25 /* External active low interrupt */ | ||
46 | #define IRQ_INT0 26 /* External active low interrupt */ | ||
47 | #define IRQ_INT1 27 /* External active low interrupt */ | ||
48 | #define IRQ_INT2 28 /* External active low interrupt */ | ||
49 | #define IRQ_UCB1200 29 /* Interrupt generated by UCB1200*/ | ||
50 | #define IRQ_BAT_LO 30 /* Low batery or external power */ | ||
51 | #define IRQ_MEDIA_CHG 31 /* Media change interrupt */ | ||
52 | |||
53 | /* | ||
54 | * This is the offset of the FIQ "IRQ" numbers | ||
55 | */ | ||
56 | #define FIQ_START 64 | ||
diff --git a/arch/arm/mach-l7200/include/mach/memory.h b/arch/arm/mach-l7200/include/mach/memory.h deleted file mode 100644 index 9fb40ed2f03b..000000000000 --- a/arch/arm/mach-l7200/include/mach/memory.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2000 Steve Hill (sjhill@cotw.com) | ||
5 | * Copyright (c) 2000 Rob Scott (rscott@mtrob.fdns.net) | ||
6 | * | ||
7 | * Changelog: | ||
8 | * 03-13-2000 SJH Created | ||
9 | * 04-13-2000 RS Changed bus macros for new addr | ||
10 | * 05-03-2000 SJH Removed bus macros and fixed virt_to_phys macro | ||
11 | */ | ||
12 | #ifndef __ASM_ARCH_MEMORY_H | ||
13 | #define __ASM_ARCH_MEMORY_H | ||
14 | |||
15 | /* | ||
16 | * Physical DRAM offset on the L7200 SDB. | ||
17 | */ | ||
18 | #define PHYS_OFFSET UL(0xf0000000) | ||
19 | |||
20 | /* | ||
21 | * Cache flushing area - ROM | ||
22 | */ | ||
23 | #define FLUSH_BASE_PHYS 0x40000000 | ||
24 | #define FLUSH_BASE 0xdf000000 | ||
25 | |||
26 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/pmpcon.h b/arch/arm/mach-l7200/include/mach/pmpcon.h deleted file mode 100644 index 3959871e8361..000000000000 --- a/arch/arm/mach-l7200/include/mach/pmpcon.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /****************************************************************************/ | ||
2 | /* | ||
3 | * arch/arm/mach-l7200/include/mach/pmpcon.h | ||
4 | * | ||
5 | * Registers and helper functions for the L7200 Link-Up Systems | ||
6 | * DC/DC converter register. | ||
7 | * | ||
8 | * (C) Copyright 2000, S A McConnell (samcconn@cotw.com) | ||
9 | * | ||
10 | * This file is subject to the terms and conditions of the GNU General Public | ||
11 | * License. See the file COPYING in the main directory of this archive for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | /****************************************************************************/ | ||
16 | |||
17 | #define PMPCON_OFF 0x00006000 /* Offset from IO_START_2. */ | ||
18 | |||
19 | /* IO_START_2 and IO_BASE_2 are defined in hardware.h */ | ||
20 | |||
21 | #define PMPCON_START (IO_START_2 + PMPCON_OFF) /* Physical address of reg. */ | ||
22 | #define PMPCON_BASE (IO_BASE_2 + PMPCON_OFF) /* Virtual address of reg. */ | ||
23 | |||
24 | |||
25 | #define PMPCON (*(volatile unsigned int *)(PMPCON_BASE)) | ||
26 | |||
27 | #define PWM2_50CYCLE 0x800 | ||
28 | #define CONTRAST 0x9 | ||
29 | |||
30 | #define PWM1H (CONTRAST) | ||
31 | #define PWM1L (CONTRAST << 4) | ||
32 | |||
33 | #define PMPCON_VALUE (PWM2_50CYCLE | PWM1L | PWM1H) | ||
34 | |||
35 | /* PMPCON = 0x811; // too light and fuzzy | ||
36 | * PMPCON = 0x844; | ||
37 | * PMPCON = 0x866; // better color poor depth | ||
38 | * PMPCON = 0x888; // Darker but better depth | ||
39 | * PMPCON = 0x899; // Darker even better depth | ||
40 | * PMPCON = 0x8aa; // too dark even better depth | ||
41 | * PMPCON = 0X8cc; // Way too dark | ||
42 | */ | ||
43 | |||
44 | /* As CONTRAST value increases the greater the depth perception and | ||
45 | * the darker the colors. | ||
46 | */ | ||
diff --git a/arch/arm/mach-l7200/include/mach/pmu.h b/arch/arm/mach-l7200/include/mach/pmu.h deleted file mode 100644 index a2da7aedf208..000000000000 --- a/arch/arm/mach-l7200/include/mach/pmu.h +++ /dev/null | |||
@@ -1,125 +0,0 @@ | |||
1 | /****************************************************************************/ | ||
2 | /* | ||
3 | * arch/arm/mach-l7200/include/mach/pmu.h | ||
4 | * | ||
5 | * Registers and helper functions for the L7200 Link-Up Systems | ||
6 | * Power Management Unit (PMU). | ||
7 | * | ||
8 | * (C) Copyright 2000, S A McConnell (samcconn@cotw.com) | ||
9 | * | ||
10 | * This file is subject to the terms and conditions of the GNU General Public | ||
11 | * License. See the file COPYING in the main directory of this archive for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | /****************************************************************************/ | ||
16 | |||
17 | #define PMU_OFF 0x00050000 /* Offset from IO_START to the PMU registers. */ | ||
18 | |||
19 | /* IO_START and IO_BASE are defined in hardware.h */ | ||
20 | |||
21 | #define PMU_START (IO_START + PMU_OFF) /* Physical addr. of the PMU reg. */ | ||
22 | #define PMU_BASE (IO_BASE + PMU_OFF) /* Virtual addr. of the PMU reg. */ | ||
23 | |||
24 | |||
25 | /* Define the PMU registers for use by device drivers and the kernel. */ | ||
26 | |||
27 | typedef struct { | ||
28 | unsigned int CURRENT; /* Current configuration register */ | ||
29 | unsigned int NEXT; /* Next configuration register */ | ||
30 | unsigned int reserved; | ||
31 | unsigned int RUN; /* Run configuration register */ | ||
32 | unsigned int COMM; /* Configuration command register */ | ||
33 | unsigned int SDRAM; /* SDRAM configuration bypass register */ | ||
34 | } pmu_interface; | ||
35 | |||
36 | #define PMU ((volatile pmu_interface *)(PMU_BASE)) | ||
37 | |||
38 | |||
39 | /* Macro's for reading the common register fields. */ | ||
40 | |||
41 | #define GET_TRANSOP(reg) ((reg >> 25) & 0x03) /* Bits 26-25 */ | ||
42 | #define GET_OSCEN(reg) ((reg >> 16) & 0x01) | ||
43 | #define GET_OSCMUX(reg) ((reg >> 15) & 0x01) | ||
44 | #define GET_PLLMUL(reg) ((reg >> 9) & 0x3f) /* Bits 14-9 */ | ||
45 | #define GET_PLLEN(reg) ((reg >> 8) & 0x01) | ||
46 | #define GET_PLLMUX(reg) ((reg >> 7) & 0x01) | ||
47 | #define GET_BCLK_DIV(reg) ((reg >> 3) & 0x03) /* Bits 4-3 */ | ||
48 | #define GET_SDRB_SEL(reg) ((reg >> 2) & 0x01) | ||
49 | #define GET_SDRF_SEL(reg) ((reg >> 1) & 0x01) | ||
50 | #define GET_FASTBUS(reg) (reg & 0x1) | ||
51 | |||
52 | /* CFG_NEXT register */ | ||
53 | |||
54 | #define CFG_NEXT_CLOCKRECOVERY ((PMU->NEXT >> 18) & 0x7f) /* Bits 24-18 */ | ||
55 | #define CFG_NEXT_INTRET ((PMU->NEXT >> 17) & 0x01) | ||
56 | #define CFG_NEXT_SDR_STOP ((PMU->NEXT >> 6) & 0x01) | ||
57 | #define CFG_NEXT_SYSCLKEN ((PMU->NEXT >> 5) & 0x01) | ||
58 | |||
59 | /* Useful field values that can be used to construct the | ||
60 | * CFG_NEXT and CFG_RUN registers. | ||
61 | */ | ||
62 | |||
63 | #define TRANSOP_NOP 0<<25 /* NOCHANGE_NOSTALL */ | ||
64 | #define NOCHANGE_STALL 1<<25 | ||
65 | #define CHANGE_NOSTALL 2<<25 | ||
66 | #define CHANGE_STALL 3<<25 | ||
67 | |||
68 | #define INTRET 1<<17 | ||
69 | #define OSCEN 1<<16 | ||
70 | #define OSCMUX 1<<15 | ||
71 | |||
72 | /* PLL frequencies */ | ||
73 | |||
74 | #define PLLMUL_0 0<<9 /* 3.6864 MHz */ | ||
75 | #define PLLMUL_1 1<<9 /* ?????? MHz */ | ||
76 | #define PLLMUL_5 5<<9 /* 18.432 MHz */ | ||
77 | #define PLLMUL_10 10<<9 /* 36.864 MHz */ | ||
78 | #define PLLMUL_18 18<<9 /* ?????? MHz */ | ||
79 | #define PLLMUL_20 20<<9 /* 73.728 MHz */ | ||
80 | #define PLLMUL_32 32<<9 /* ?????? MHz */ | ||
81 | #define PLLMUL_35 35<<9 /* 129.024 MHz */ | ||
82 | #define PLLMUL_36 36<<9 /* ?????? MHz */ | ||
83 | #define PLLMUL_39 39<<9 /* ?????? MHz */ | ||
84 | #define PLLMUL_40 40<<9 /* 147.456 MHz */ | ||
85 | |||
86 | /* Clock recovery times */ | ||
87 | |||
88 | #define CRCLOCK_1 1<<18 | ||
89 | #define CRCLOCK_2 2<<18 | ||
90 | #define CRCLOCK_4 4<<18 | ||
91 | #define CRCLOCK_8 8<<18 | ||
92 | #define CRCLOCK_16 16<<18 | ||
93 | #define CRCLOCK_32 32<<18 | ||
94 | #define CRCLOCK_63 63<<18 | ||
95 | #define CRCLOCK_127 127<<18 | ||
96 | |||
97 | #define PLLEN 1<<8 | ||
98 | #define PLLMUX 1<<7 | ||
99 | #define SDR_STOP 1<<6 | ||
100 | #define SYSCLKEN 1<<5 | ||
101 | |||
102 | #define BCLK_DIV_4 2<<3 | ||
103 | #define BCLK_DIV_2 1<<3 | ||
104 | #define BCLK_DIV_1 0<<3 | ||
105 | |||
106 | #define SDRB_SEL 1<<2 | ||
107 | #define SDRF_SEL 1<<1 | ||
108 | #define FASTBUS 1<<0 | ||
109 | |||
110 | |||
111 | /* CFG_SDRAM */ | ||
112 | |||
113 | #define SDRREFFQ 1<<0 /* Only if SDRSTOPRQ is not set. */ | ||
114 | #define SDRREFACK 1<<1 /* Read-only */ | ||
115 | #define SDRSTOPRQ 1<<2 /* Only if SDRREFFQ is not set. */ | ||
116 | #define SDRSTOPACK 1<<3 /* Read-only */ | ||
117 | #define PICEN 1<<4 /* Enable Co-procesor */ | ||
118 | #define PICTEST 1<<5 | ||
119 | |||
120 | #define GET_SDRREFFQ ((PMU->SDRAM >> 0) & 0x01) | ||
121 | #define GET_SDRREFACK ((PMU->SDRAM >> 1) & 0x01) /* Read-only */ | ||
122 | #define GET_SDRSTOPRQ ((PMU->SDRAM >> 2) & 0x01) | ||
123 | #define GET_SDRSTOPACK ((PMU->SDRAM >> 3) & 0x01) /* Read-only */ | ||
124 | #define GET_PICEN ((PMU->SDRAM >> 4) & 0x01) | ||
125 | #define GET_PICTEST ((PMU->SDRAM >> 5) & 0x01) | ||
diff --git a/arch/arm/mach-l7200/include/mach/serial.h b/arch/arm/mach-l7200/include/mach/serial.h deleted file mode 100644 index adc05e5f8378..000000000000 --- a/arch/arm/mach-l7200/include/mach/serial.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/serial.h | ||
3 | * | ||
4 | * Copyright (c) 2000 Rob Scott (rscott@mtrob.fdns.net) | ||
5 | * Steve Hill (sjhill@cotw.com) | ||
6 | * | ||
7 | * Changelog: | ||
8 | * 03-20-2000 SJH Created | ||
9 | * 03-26-2000 SJH Added flags for serial ports | ||
10 | * 03-27-2000 SJH Corrected BASE_BAUD value | ||
11 | * 04-14-2000 RS Made register addr dependent on IO_BASE | ||
12 | * 05-03-2000 SJH Complete rewrite | ||
13 | * 05-09-2000 SJH Stripped out architecture specific serial stuff | ||
14 | * and placed it in a separate file | ||
15 | * 07-28-2000 SJH Moved base baud rate variable | ||
16 | */ | ||
17 | #ifndef __ASM_ARCH_SERIAL_H | ||
18 | #define __ASM_ARCH_SERIAL_H | ||
19 | |||
20 | /* | ||
21 | * This assumes you have a 3.6864 MHz clock for your UART. | ||
22 | */ | ||
23 | #define BASE_BAUD 3686400 | ||
24 | |||
25 | /* | ||
26 | * Standard COM flags | ||
27 | */ | ||
28 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
29 | |||
30 | #define STD_SERIAL_PORT_DEFNS \ | ||
31 | /* MAGIC UART CLK PORT IRQ FLAGS */ \ | ||
32 | { 0, BASE_BAUD, UART1_BASE, IRQ_UART_1, STD_COM_FLAGS }, /* ttyLU0 */ \ | ||
33 | { 0, BASE_BAUD, UART2_BASE, IRQ_UART_2, STD_COM_FLAGS }, /* ttyLU1 */ \ | ||
34 | |||
35 | #define EXTRA_SERIAL_PORT_DEFNS | ||
36 | |||
37 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/serial_l7200.h b/arch/arm/mach-l7200/include/mach/serial_l7200.h deleted file mode 100644 index 645f1c5e568d..000000000000 --- a/arch/arm/mach-l7200/include/mach/serial_l7200.h +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/serial_l7200.h | ||
3 | * | ||
4 | * Copyright (c) 2000 Steven Hill (sjhill@cotw.com) | ||
5 | * | ||
6 | * Changelog: | ||
7 | * 05-09-2000 SJH Created | ||
8 | */ | ||
9 | #ifndef __ASM_ARCH_SERIAL_L7200_H | ||
10 | #define __ASM_ARCH_SERIAL_L7200_H | ||
11 | |||
12 | #include <mach/memory.h> | ||
13 | |||
14 | /* | ||
15 | * This assumes you have a 3.6864 MHz clock for your UART. | ||
16 | */ | ||
17 | #define BASE_BAUD 3686400 | ||
18 | |||
19 | /* | ||
20 | * UART base register addresses | ||
21 | */ | ||
22 | #define UART1_BASE (IO_BASE + 0x00044000) | ||
23 | #define UART2_BASE (IO_BASE + 0x00045000) | ||
24 | |||
25 | /* | ||
26 | * UART register offsets | ||
27 | */ | ||
28 | #define UARTDR 0x00 /* Tx/Rx data */ | ||
29 | #define RXSTAT 0x04 /* Rx status */ | ||
30 | #define H_UBRLCR 0x08 /* mode register high */ | ||
31 | #define M_UBRLCR 0x0C /* mode reg mid (MSB of baud)*/ | ||
32 | #define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/ | ||
33 | #define UARTCON 0x14 /* control register */ | ||
34 | #define UARTFLG 0x18 /* flag register */ | ||
35 | #define UARTINTSTAT 0x1C /* FIFO IRQ status register */ | ||
36 | #define UARTINTMASK 0x20 /* FIFO IRQ mask register */ | ||
37 | |||
38 | /* | ||
39 | * UART baud rate register values | ||
40 | */ | ||
41 | #define BR_110 0x827 | ||
42 | #define BR_1200 0x06e | ||
43 | #define BR_2400 0x05f | ||
44 | #define BR_4800 0x02f | ||
45 | #define BR_9600 0x017 | ||
46 | #define BR_14400 0x00f | ||
47 | #define BR_19200 0x00b | ||
48 | #define BR_38400 0x005 | ||
49 | #define BR_57600 0x003 | ||
50 | #define BR_76800 0x002 | ||
51 | #define BR_115200 0x001 | ||
52 | |||
53 | /* | ||
54 | * Receiver status register (RXSTAT) mask values | ||
55 | */ | ||
56 | #define RXSTAT_NO_ERR 0x00 /* No error */ | ||
57 | #define RXSTAT_FRM_ERR 0x01 /* Framing error */ | ||
58 | #define RXSTAT_PAR_ERR 0x02 /* Parity error */ | ||
59 | #define RXSTAT_OVR_ERR 0x04 /* Overrun error */ | ||
60 | |||
61 | /* | ||
62 | * High byte of UART bit rate and line control register (H_UBRLCR) values | ||
63 | */ | ||
64 | #define UBRLCR_BRK 0x01 /* generate break on tx */ | ||
65 | #define UBRLCR_PEN 0x02 /* enable parity */ | ||
66 | #define UBRLCR_PDIS 0x00 /* disable parity */ | ||
67 | #define UBRLCR_EVEN 0x04 /* 1= even parity,0 = odd parity */ | ||
68 | #define UBRLCR_STP2 0x08 /* transmit 2 stop bits */ | ||
69 | #define UBRLCR_FIFO 0x10 /* enable FIFO */ | ||
70 | #define UBRLCR_LEN5 0x60 /* word length5 */ | ||
71 | #define UBRLCR_LEN6 0x40 /* word length6 */ | ||
72 | #define UBRLCR_LEN7 0x20 /* word length7 */ | ||
73 | #define UBRLCR_LEN8 0x00 /* word length8 */ | ||
74 | |||
75 | /* | ||
76 | * UART control register (UARTCON) values | ||
77 | */ | ||
78 | #define UARTCON_UARTEN 0x01 /* Enable UART */ | ||
79 | #define UARTCON_DMAONERR 0x08 /* Mask RxDmaRq when errors occur */ | ||
80 | |||
81 | /* | ||
82 | * UART flag register (UARTFLG) mask values | ||
83 | */ | ||
84 | #define UARTFLG_UTXFF 0x20 /* Transmit FIFO full */ | ||
85 | #define UARTFLG_URXFE 0x10 /* Receiver FIFO empty */ | ||
86 | #define UARTFLG_UBUSY 0x08 /* Transmitter busy */ | ||
87 | #define UARTFLG_DCD 0x04 /* Data carrier detect */ | ||
88 | #define UARTFLG_DSR 0x02 /* Data set ready */ | ||
89 | #define UARTFLG_CTS 0x01 /* Clear to send */ | ||
90 | |||
91 | /* | ||
92 | * UART interrupt status/clear registers (UARTINTSTAT/CLR) values | ||
93 | */ | ||
94 | #define UART_TXINT 0x01 /* TX interrupt */ | ||
95 | #define UART_RXINT 0x02 /* RX interrupt */ | ||
96 | #define UART_RXERRINT 0x04 /* RX error interrupt */ | ||
97 | #define UART_MSINT 0x08 /* Modem Status interrupt */ | ||
98 | #define UART_UDINT 0x10 /* UART Disabled interrupt */ | ||
99 | #define UART_ALLIRQS 0x1f /* All interrupts */ | ||
100 | |||
101 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/sib.h b/arch/arm/mach-l7200/include/mach/sib.h deleted file mode 100644 index 965728712cf3..000000000000 --- a/arch/arm/mach-l7200/include/mach/sib.h +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | /****************************************************************************/ | ||
2 | /* | ||
3 | * arch/arm/mach-l7200/include/mach/sib.h | ||
4 | * | ||
5 | * Registers and helper functions for the Serial Interface Bus. | ||
6 | * | ||
7 | * (C) Copyright 2000, S A McConnell (samcconn@cotw.com) | ||
8 | * | ||
9 | * This file is subject to the terms and conditions of the GNU General Public | ||
10 | * License. See the file COPYING in the main directory of this archive for | ||
11 | * more details. | ||
12 | */ | ||
13 | |||
14 | /****************************************************************************/ | ||
15 | |||
16 | #define SIB_OFF 0x00040000 /* Offset from IO_START to the SIB reg's. */ | ||
17 | |||
18 | /* IO_START and IO_BASE are defined in hardware.h */ | ||
19 | |||
20 | #define SIB_START (IO_START + SIB_OFF) /* Physical addr of the SIB reg. */ | ||
21 | #define SIB_BASE (IO_BASE + SIB_OFF) /* Virtual addr of the SIB reg. */ | ||
22 | |||
23 | /* Offsets from the start of the SIB for all the registers. */ | ||
24 | |||
25 | /* Define the SIB registers for use by device drivers and the kernel. */ | ||
26 | |||
27 | typedef struct | ||
28 | { | ||
29 | unsigned int MCCR; /* SIB Control Register Offset: 0x00 */ | ||
30 | unsigned int RES1; /* Reserved Offset: 0x04 */ | ||
31 | unsigned int MCDR0; /* SIB Data Register 0 Offset: 0x08 */ | ||
32 | unsigned int MCDR1; /* SIB Data Register 1 Offset: 0x0c */ | ||
33 | unsigned int MCDR2; /* SIB Data Register 2 (UCB1x00) Offset: 0x10 */ | ||
34 | unsigned int RES2; /* Reserved Offset: 0x14 */ | ||
35 | unsigned int MCSR; /* SIB Status Register Offset: 0x18 */ | ||
36 | } SIB_Interface; | ||
37 | |||
38 | #define SIB ((volatile SIB_Interface *) (SIB_BASE)) | ||
39 | |||
40 | /* MCCR */ | ||
41 | |||
42 | #define INTERNAL_FREQ 9216000 /* Hertz */ | ||
43 | #define AUDIO_FREQ 5000 /* Hertz */ | ||
44 | #define TELECOM_FREQ 5000 /* Hertz */ | ||
45 | |||
46 | #define AUDIO_DIVIDE (INTERNAL_FREQ / (32 * AUDIO_FREQ)) | ||
47 | #define TELECOM_DIVIDE (INTERNAL_FREQ / (32 * TELECOM_FREQ)) | ||
48 | |||
49 | #define MCCR_ASD57 AUDIO_DIVIDE | ||
50 | #define MCCR_TSD57 (TELECOM_DIVIDE << 8) | ||
51 | #define MCCR_MCE (1 << 16) /* SIB enable */ | ||
52 | #define MCCR_ECS (1 << 17) /* External Clock Select */ | ||
53 | #define MCCR_ADM (1 << 18) /* A/D Data Sampling */ | ||
54 | #define MCCR_PMC (1 << 26) /* PIN Multiplexer Control */ | ||
55 | |||
56 | |||
57 | #define GET_ASD ((SIB->MCCR >> 0) & 0x3f) /* Audio Sample Rate Div. */ | ||
58 | #define GET_TSD ((SIB->MCCR >> 8) & 0x3f) /* Telcom Sample Rate Div. */ | ||
59 | #define GET_MCE ((SIB->MCCR >> 16) & 0x01) /* SIB Enable */ | ||
60 | #define GET_ECS ((SIB->MCCR >> 17) & 0x01) /* External Clock Select */ | ||
61 | #define GET_ADM ((SIB->MCCR >> 18) & 0x01) /* A/D Data Sampling Mode */ | ||
62 | #define GET_TTM ((SIB->MCCR >> 19) & 0x01) /* Telco Trans. FIFO I mask */ | ||
63 | #define GET_TRM ((SIB->MCCR >> 20) & 0x01) /* Telco Recv. FIFO I mask */ | ||
64 | #define GET_ATM ((SIB->MCCR >> 21) & 0x01) /* Audio Trans. FIFO I mask */ | ||
65 | #define GET_ARM ((SIB->MCCR >> 22) & 0x01) /* Audio Recv. FIFO I mask */ | ||
66 | #define GET_LBM ((SIB->MCCR >> 23) & 0x01) /* Loop Back Mode */ | ||
67 | #define GET_ECP ((SIB->MCCR >> 24) & 0x03) /* Extern. Clck Prescale sel */ | ||
68 | #define GET_PMC ((SIB->MCCR >> 26) & 0x01) /* PIN Multiplexer Control */ | ||
69 | #define GET_ERI ((SIB->MCCR >> 27) & 0x01) /* External Read Interrupt */ | ||
70 | #define GET_EWI ((SIB->MCCR >> 28) & 0x01) /* External Write Interrupt */ | ||
71 | |||
72 | /* MCDR0 */ | ||
73 | |||
74 | #define AUDIO_RECV ((SIB->MCDR0 >> 4) & 0xfff) | ||
75 | #define AUDIO_WRITE(v) ((SIB->MCDR0 = (v & 0xfff) << 4)) | ||
76 | |||
77 | /* MCDR1 */ | ||
78 | |||
79 | #define TELECOM_RECV ((SIB->MCDR1 >> 2) & 032fff) | ||
80 | #define TELECOM_WRITE(v) ((SIB->MCDR1 = (v & 0x3fff) << 2)) | ||
81 | |||
82 | |||
83 | /* MCSR */ | ||
84 | |||
85 | #define MCSR_ATU (1 << 4) /* Audio Transmit FIFO Underrun */ | ||
86 | #define MCSR_ARO (1 << 5) /* Audio Receive FIFO Underrun */ | ||
87 | #define MCSR_TTU (1 << 6) /* TELECOM Transmit FIFO Underrun */ | ||
88 | #define MCSR_TRO (1 << 7) /* TELECOM Receive FIFO Underrun */ | ||
89 | |||
90 | #define MCSR_CLEAR_UNDERUN_BITS (MCSR_ATU | MCSR_ARO | MCSR_TTU | MCSR_TRO) | ||
91 | |||
92 | |||
93 | #define GET_ATS ((SIB->MCSR >> 0) & 0x01) /* Audio Transmit FIFO Service Req*/ | ||
94 | #define GET_ARS ((SIB->MCSR >> 1) & 0x01) /* Audio Recv FIFO Service Request*/ | ||
95 | #define GET_TTS ((SIB->MCSR >> 2) & 0x01) /* TELECOM Transmit FIFO Flag */ | ||
96 | #define GET_TRS ((SIB->MCSR >> 3) & 0x01) /* TELECOM Recv FIFO Service Req. */ | ||
97 | #define GET_ATU ((SIB->MCSR >> 4) & 0x01) /* Audio Transmit FIFO Underrun */ | ||
98 | #define GET_ARO ((SIB->MCSR >> 5) & 0x01) /* Audio Receive FIFO Underrun */ | ||
99 | #define GET_TTU ((SIB->MCSR >> 6) & 0x01) /* TELECOM Transmit FIFO Underrun */ | ||
100 | #define GET_TRO ((SIB->MCSR >> 7) & 0x01) /* TELECOM Receive FIFO Underrun */ | ||
101 | #define GET_ANF ((SIB->MCSR >> 8) & 0x01) /* Audio Transmit FIFO not full */ | ||
102 | #define GET_ANE ((SIB->MCSR >> 9) & 0x01) /* Audio Receive FIFO not empty */ | ||
103 | #define GET_TNF ((SIB->MCSR >> 10) & 0x01) /* Telecom Transmit FIFO not full */ | ||
104 | #define GET_TNE ((SIB->MCSR >> 11) & 0x01) /* Telecom Receive FIFO not empty */ | ||
105 | #define GET_CWC ((SIB->MCSR >> 12) & 0x01) /* Codec Write Complete */ | ||
106 | #define GET_CRC ((SIB->MCSR >> 13) & 0x01) /* Codec Read Complete */ | ||
107 | #define GET_ACE ((SIB->MCSR >> 14) & 0x01) /* Audio Codec Enabled */ | ||
108 | #define GET_TCE ((SIB->MCSR >> 15) & 0x01) /* Telecom Codec Enabled */ | ||
109 | |||
110 | /* MCDR2 */ | ||
111 | |||
112 | #define MCDR2_rW (1 << 16) | ||
113 | |||
114 | #define WRITE_MCDR2(reg, data) (SIB->MCDR2 =((reg<<17)|MCDR2_rW|(data&0xffff))) | ||
115 | #define MCDR2_WRITE_COMPLETE GET_CWC | ||
116 | |||
117 | #define INITIATE_MCDR2_READ(reg) (SIB->MCDR2 = (reg << 17)) | ||
118 | #define MCDR2_READ_COMPLETE GET_CRC | ||
119 | #define MCDR2_READ (SIB->MCDR2 & 0xffff) | ||
diff --git a/arch/arm/mach-l7200/include/mach/sys-clock.h b/arch/arm/mach-l7200/include/mach/sys-clock.h deleted file mode 100644 index e9729a35751d..000000000000 --- a/arch/arm/mach-l7200/include/mach/sys-clock.h +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /****************************************************************************/ | ||
2 | /* | ||
3 | * arch/arm/mach-l7200/include/mach/sys-clock.h | ||
4 | * | ||
5 | * Registers and helper functions for the L7200 Link-Up Systems | ||
6 | * System clocks. | ||
7 | * | ||
8 | * (C) Copyright 2000, S A McConnell (samcconn@cotw.com) | ||
9 | * | ||
10 | * This file is subject to the terms and conditions of the GNU General Public | ||
11 | * License. See the file COPYING in the main directory of this archive for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | /****************************************************************************/ | ||
16 | |||
17 | #define SYS_CLOCK_OFF 0x00050030 /* Offset from IO_START. */ | ||
18 | |||
19 | /* IO_START and IO_BASE are defined in hardware.h */ | ||
20 | |||
21 | #define SYS_CLOCK_START (IO_START + SYS_CLOCK_OFF) /* Physical address */ | ||
22 | #define SYS_CLOCK_BASE (IO_BASE + SYS_CLOCK_OFF) /* Virtual address */ | ||
23 | |||
24 | /* Define the interface to the SYS_CLOCK */ | ||
25 | |||
26 | typedef struct | ||
27 | { | ||
28 | unsigned int ENABLE; | ||
29 | unsigned int ESYNC; | ||
30 | unsigned int SELECT; | ||
31 | } sys_clock_interface; | ||
32 | |||
33 | #define SYS_CLOCK ((volatile sys_clock_interface *)(SYS_CLOCK_BASE)) | ||
34 | |||
35 | //#define CLOCK_EN (*(volatile unsigned long *)(PMU_BASE+CLOCK_EN_OFF)) | ||
36 | //#define CLOCK_ESYNC (*(volatile unsigned long *)(PMU_BASE+CLOCK_ESYNC_OFF)) | ||
37 | //#define CLOCK_SEL (*(volatile unsigned long *)(PMU_BASE+CLOCK_SEL_OFF)) | ||
38 | |||
39 | /* SYS_CLOCK -> ENABLE */ | ||
40 | |||
41 | #define SYN_EN 1<<0 | ||
42 | #define B18M_EN 1<<1 | ||
43 | #define CLK3M6_EN 1<<2 | ||
44 | #define BUART_EN 1<<3 | ||
45 | #define CLK18MU_EN 1<<4 | ||
46 | #define FIR_EN 1<<5 | ||
47 | #define MIRN_EN 1<<6 | ||
48 | #define UARTM_EN 1<<7 | ||
49 | #define SIBADC_EN 1<<8 | ||
50 | #define ALTD_EN 1<<9 | ||
51 | #define CLCLK_EN 1<<10 | ||
52 | |||
53 | /* SYS_CLOCK -> SELECT */ | ||
54 | |||
55 | #define CLK18M_DIV 1<<0 | ||
56 | #define MIR_SEL 1<<1 | ||
57 | #define SSP_SEL 1<<4 | ||
58 | #define MM_DIV 1<<5 | ||
59 | #define MM_SEL 1<<6 | ||
60 | #define ADC_SEL_2 0<<7 | ||
61 | #define ADC_SEL_4 1<<7 | ||
62 | #define ADC_SEL_8 3<<7 | ||
63 | #define ADC_SEL_16 7<<7 | ||
64 | #define ADC_SEL_32 0x0f<<7 | ||
65 | #define ADC_SEL_64 0x1f<<7 | ||
66 | #define ADC_SEL_128 0x3f<<7 | ||
67 | #define ALTD_SEL 1<<13 | ||
diff --git a/arch/arm/mach-l7200/include/mach/system.h b/arch/arm/mach-l7200/include/mach/system.h deleted file mode 100644 index e0dd3b6ae4aa..000000000000 --- a/arch/arm/mach-l7200/include/mach/system.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (c) 2000 Steve Hill (sjhill@cotw.com) | ||
5 | * | ||
6 | * Changelog | ||
7 | * 03-21-2000 SJH Created | ||
8 | * 04-26-2000 SJH Fixed functions | ||
9 | * 05-03-2000 SJH Removed usage of obsolete 'iomd.h' | ||
10 | * 05-31-2000 SJH Properly implemented 'arch_idle' | ||
11 | */ | ||
12 | #ifndef __ASM_ARCH_SYSTEM_H | ||
13 | #define __ASM_ARCH_SYSTEM_H | ||
14 | |||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | static inline void arch_idle(void) | ||
18 | { | ||
19 | *(unsigned long *)(IO_BASE + 0x50004) = 1; /* idle mode */ | ||
20 | } | ||
21 | |||
22 | static inline void arch_reset(char mode, const char *cmd) | ||
23 | { | ||
24 | if (mode == 's') { | ||
25 | cpu_reset(0); | ||
26 | } | ||
27 | } | ||
28 | |||
29 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/time.h b/arch/arm/mach-l7200/include/mach/time.h deleted file mode 100644 index 061771c2c2bd..000000000000 --- a/arch/arm/mach-l7200/include/mach/time.h +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/time.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net) | ||
5 | * Steve Hill (sjhill@cotw.com) | ||
6 | * | ||
7 | * Changelog: | ||
8 | * 01-02-2000 RS Created l7200 version, derived from rpc code | ||
9 | * 05-03-2000 SJH Complete rewrite | ||
10 | */ | ||
11 | #ifndef _ASM_ARCH_TIME_H | ||
12 | #define _ASM_ARCH_TIME_H | ||
13 | |||
14 | #include <mach/irqs.h> | ||
15 | |||
16 | /* | ||
17 | * RTC base register address | ||
18 | */ | ||
19 | #define RTC_BASE (IO_BASE_2 + 0x2000) | ||
20 | |||
21 | /* | ||
22 | * RTC registers | ||
23 | */ | ||
24 | #define RTC_RTCDR (*(volatile unsigned char *) (RTC_BASE + 0x000)) | ||
25 | #define RTC_RTCMR (*(volatile unsigned char *) (RTC_BASE + 0x004)) | ||
26 | #define RTC_RTCS (*(volatile unsigned char *) (RTC_BASE + 0x008)) | ||
27 | #define RTC_RTCC (*(volatile unsigned char *) (RTC_BASE + 0x008)) | ||
28 | #define RTC_RTCDV (*(volatile unsigned char *) (RTC_BASE + 0x00c)) | ||
29 | #define RTC_RTCCR (*(volatile unsigned char *) (RTC_BASE + 0x010)) | ||
30 | |||
31 | /* | ||
32 | * RTCCR register values | ||
33 | */ | ||
34 | #define RTC_RATE_32 0x00 /* 32 Hz tick */ | ||
35 | #define RTC_RATE_64 0x10 /* 64 Hz tick */ | ||
36 | #define RTC_RATE_128 0x20 /* 128 Hz tick */ | ||
37 | #define RTC_RATE_256 0x30 /* 256 Hz tick */ | ||
38 | #define RTC_EN_ALARM 0x01 /* Enable alarm */ | ||
39 | #define RTC_EN_TIC 0x04 /* Enable counter */ | ||
40 | #define RTC_EN_STWDOG 0x08 /* Enable watchdog */ | ||
41 | |||
42 | /* | ||
43 | * Handler for RTC timer interrupt | ||
44 | */ | ||
45 | static irqreturn_t | ||
46 | timer_interrupt(int irq, void *dev_id) | ||
47 | { | ||
48 | struct pt_regs *regs = get_irq_regs(); | ||
49 | do_timer(1); | ||
50 | #ifndef CONFIG_SMP | ||
51 | update_process_times(user_mode(regs)); | ||
52 | #endif | ||
53 | do_profile(regs); | ||
54 | RTC_RTCC = 0; /* Clear interrupt */ | ||
55 | |||
56 | return IRQ_HANDLED; | ||
57 | } | ||
58 | |||
59 | /* | ||
60 | * Set up RTC timer interrupt, and return the current time in seconds. | ||
61 | */ | ||
62 | void __init time_init(void) | ||
63 | { | ||
64 | RTC_RTCC = 0; /* Clear interrupt */ | ||
65 | |||
66 | timer_irq.handler = timer_interrupt; | ||
67 | |||
68 | setup_irq(IRQ_RTC_TICK, &timer_irq); | ||
69 | |||
70 | RTC_RTCCR = RTC_RATE_128 | RTC_EN_TIC; /* Set rate and enable timer */ | ||
71 | } | ||
72 | |||
73 | #endif | ||
diff --git a/arch/arm/mach-l7200/include/mach/timex.h b/arch/arm/mach-l7200/include/mach/timex.h deleted file mode 100644 index ffc96a63b5a2..000000000000 --- a/arch/arm/mach-l7200/include/mach/timex.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/timex.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net) | ||
5 | * Steve Hill (sjhill@cotw.com) | ||
6 | * | ||
7 | * 04-21-2000 RS Created file | ||
8 | * 05-03-2000 SJH Tick rate was wrong | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * On the ARM720T, clock ticks are set to 128 Hz. | ||
14 | * | ||
15 | * NOTE: The actual RTC value is set in 'time.h' which | ||
16 | * must be changed when choosing a different tick | ||
17 | * rate. The value of HZ in 'param.h' must also | ||
18 | * be changed to match below. | ||
19 | */ | ||
20 | #define CLOCK_TICK_RATE 128 | ||
diff --git a/arch/arm/mach-l7200/include/mach/uncompress.h b/arch/arm/mach-l7200/include/mach/uncompress.h deleted file mode 100644 index 591c962bb315..000000000000 --- a/arch/arm/mach-l7200/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Steve Hill (sjhill@cotw.com) | ||
5 | * | ||
6 | * Changelog: | ||
7 | * 05-01-2000 SJH Created | ||
8 | * 05-13-2000 SJH Filled in function bodies | ||
9 | * 07-26-2000 SJH Removed hard coded baud rate | ||
10 | */ | ||
11 | |||
12 | #include <mach/hardware.h> | ||
13 | |||
14 | #define IO_UART IO_START + 0x00044000 | ||
15 | |||
16 | #define __raw_writeb(v,p) (*(volatile unsigned char *)(p) = (v)) | ||
17 | #define __raw_readb(p) (*(volatile unsigned char *)(p)) | ||
18 | |||
19 | static inline void putc(int c) | ||
20 | { | ||
21 | while(__raw_readb(IO_UART + 0x18) & 0x20 || | ||
22 | __raw_readb(IO_UART + 0x18) & 0x08) | ||
23 | barrier(); | ||
24 | |||
25 | __raw_writeb(c, IO_UART + 0x00); | ||
26 | } | ||
27 | |||
28 | static inline void flush(void) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | static __inline__ void arch_decomp_setup(void) | ||
33 | { | ||
34 | __raw_writeb(0x00, IO_UART + 0x08); /* Set HSB */ | ||
35 | __raw_writeb(0x00, IO_UART + 0x20); /* Disable IRQs */ | ||
36 | __raw_writeb(0x01, IO_UART + 0x14); /* Enable UART */ | ||
37 | } | ||
38 | |||
39 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-l7200/include/mach/vmalloc.h b/arch/arm/mach-l7200/include/mach/vmalloc.h deleted file mode 100644 index 85f0abbf15f1..000000000000 --- a/arch/arm/mach-l7200/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/vmalloc.h | ||
3 | */ | ||
4 | #define VMALLOC_END (PAGE_OFFSET + 0x10000000) | ||
diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c index f035f4185274..89f793adf776 100644 --- a/arch/arm/mach-nomadik/clock.c +++ b/arch/arm/mach-nomadik/clock.c | |||
@@ -53,6 +53,10 @@ static struct clk clk_default; | |||
53 | } | 53 | } |
54 | 54 | ||
55 | static struct clk_lookup lookups[] = { | 55 | static struct clk_lookup lookups[] = { |
56 | { | ||
57 | .con_id = "apb_pclk", | ||
58 | .clk = &clk_default, | ||
59 | }, | ||
56 | CLK(&clk_24, "mtu0"), | 60 | CLK(&clk_24, "mtu0"), |
57 | CLK(&clk_24, "mtu1"), | 61 | CLK(&clk_24, "mtu1"), |
58 | CLK(&clk_48, "uart0"), | 62 | CLK(&clk_48, "uart0"), |
diff --git a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S index 0859336a8e6d..5c934bdb7158 100644 --- a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S +++ b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S | |||
@@ -8,6 +8,7 @@ | |||
8 | * the Free Software Foundation. | 8 | * the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include <asm/memory.h> | ||
11 | 12 | ||
12 | #include <mach/regs-board-a9m9750dev.h> | 13 | #include <mach/regs-board-a9m9750dev.h> |
13 | 14 | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/uncompress.h b/arch/arm/mach-ns9xxx/include/mach/uncompress.h index 1b12d324b087..770a68c46e81 100644 --- a/arch/arm/mach-ns9xxx/include/mach/uncompress.h +++ b/arch/arm/mach-ns9xxx/include/mach/uncompress.h | |||
@@ -20,50 +20,49 @@ static void putc_dummy(char c, void __iomem *base) | |||
20 | /* nothing */ | 20 | /* nothing */ |
21 | } | 21 | } |
22 | 22 | ||
23 | static int timeout; | ||
24 | |||
23 | static void putc_ns9360(char c, void __iomem *base) | 25 | static void putc_ns9360(char c, void __iomem *base) |
24 | { | 26 | { |
25 | static int t = 0x10000; | ||
26 | do { | 27 | do { |
27 | if (t) | 28 | if (timeout) |
28 | --t; | 29 | --timeout; |
29 | 30 | ||
30 | if (__raw_readl(base + 8) & (1 << 3)) { | 31 | if (__raw_readl(base + 8) & (1 << 3)) { |
31 | __raw_writeb(c, base + 16); | 32 | __raw_writeb(c, base + 16); |
32 | t = 0x10000; | 33 | timeout = 0x10000; |
33 | break; | 34 | break; |
34 | } | 35 | } |
35 | } while (t); | 36 | } while (timeout); |
36 | } | 37 | } |
37 | 38 | ||
38 | static void putc_a9m9750dev(char c, void __iomem *base) | 39 | static void putc_a9m9750dev(char c, void __iomem *base) |
39 | { | 40 | { |
40 | static int t = 0x10000; | ||
41 | do { | 41 | do { |
42 | if (t) | 42 | if (timeout) |
43 | --t; | 43 | --timeout; |
44 | 44 | ||
45 | if (__raw_readb(base + 5) & (1 << 5)) { | 45 | if (__raw_readb(base + 5) & (1 << 5)) { |
46 | __raw_writeb(c, base); | 46 | __raw_writeb(c, base); |
47 | t = 0x10000; | 47 | timeout = 0x10000; |
48 | break; | 48 | break; |
49 | } | 49 | } |
50 | } while (t); | 50 | } while (timeout); |
51 | 51 | ||
52 | } | 52 | } |
53 | 53 | ||
54 | static void putc_ns921x(char c, void __iomem *base) | 54 | static void putc_ns921x(char c, void __iomem *base) |
55 | { | 55 | { |
56 | static int t = 0x10000; | ||
57 | do { | 56 | do { |
58 | if (t) | 57 | if (timeout) |
59 | --t; | 58 | --timeout; |
60 | 59 | ||
61 | if (!(__raw_readl(base) & (1 << 11))) { | 60 | if (!(__raw_readl(base) & (1 << 11))) { |
62 | __raw_writeb(c, base + 0x0028); | 61 | __raw_writeb(c, base + 0x0028); |
63 | t = 0x10000; | 62 | timeout = 0x10000; |
64 | break; | 63 | break; |
65 | } | 64 | } |
66 | } while (t); | 65 | } while (timeout); |
67 | } | 66 | } |
68 | 67 | ||
69 | #define MSCS __REG(0xA0900184) | 68 | #define MSCS __REG(0xA0900184) |
@@ -89,6 +88,7 @@ static void putc_ns921x(char c, void __iomem *base) | |||
89 | 88 | ||
90 | static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base) | 89 | static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base) |
91 | { | 90 | { |
91 | timeout = 0x10000; | ||
92 | if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) { | 92 | if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) { |
93 | /* ns9360 or ns9750 */ | 93 | /* ns9360 or ns9750 */ |
94 | if (NS9360_UART_ENABLED(NS9360_UARTA)) { | 94 | if (NS9360_UART_ENABLED(NS9360_UARTA)) { |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index abdf321c2d41..03483920ed6e 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -175,6 +175,10 @@ static void __init rx51_add_gpio_keys(void) | |||
175 | #endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */ | 175 | #endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */ |
176 | 176 | ||
177 | static int board_keymap[] = { | 177 | static int board_keymap[] = { |
178 | /* | ||
179 | * Note that KEY(x, 8, KEY_XXX) entries represent "entrire row | ||
180 | * connected to the ground" matrix state. | ||
181 | */ | ||
178 | KEY(0, 0, KEY_Q), | 182 | KEY(0, 0, KEY_Q), |
179 | KEY(0, 1, KEY_O), | 183 | KEY(0, 1, KEY_O), |
180 | KEY(0, 2, KEY_P), | 184 | KEY(0, 2, KEY_P), |
@@ -182,6 +186,7 @@ static int board_keymap[] = { | |||
182 | KEY(0, 4, KEY_BACKSPACE), | 186 | KEY(0, 4, KEY_BACKSPACE), |
183 | KEY(0, 6, KEY_A), | 187 | KEY(0, 6, KEY_A), |
184 | KEY(0, 7, KEY_S), | 188 | KEY(0, 7, KEY_S), |
189 | |||
185 | KEY(1, 0, KEY_W), | 190 | KEY(1, 0, KEY_W), |
186 | KEY(1, 1, KEY_D), | 191 | KEY(1, 1, KEY_D), |
187 | KEY(1, 2, KEY_F), | 192 | KEY(1, 2, KEY_F), |
@@ -190,6 +195,7 @@ static int board_keymap[] = { | |||
190 | KEY(1, 5, KEY_J), | 195 | KEY(1, 5, KEY_J), |
191 | KEY(1, 6, KEY_K), | 196 | KEY(1, 6, KEY_K), |
192 | KEY(1, 7, KEY_L), | 197 | KEY(1, 7, KEY_L), |
198 | |||
193 | KEY(2, 0, KEY_E), | 199 | KEY(2, 0, KEY_E), |
194 | KEY(2, 1, KEY_DOT), | 200 | KEY(2, 1, KEY_DOT), |
195 | KEY(2, 2, KEY_UP), | 201 | KEY(2, 2, KEY_UP), |
@@ -197,6 +203,8 @@ static int board_keymap[] = { | |||
197 | KEY(2, 5, KEY_Z), | 203 | KEY(2, 5, KEY_Z), |
198 | KEY(2, 6, KEY_X), | 204 | KEY(2, 6, KEY_X), |
199 | KEY(2, 7, KEY_C), | 205 | KEY(2, 7, KEY_C), |
206 | KEY(2, 8, KEY_F9), | ||
207 | |||
200 | KEY(3, 0, KEY_R), | 208 | KEY(3, 0, KEY_R), |
201 | KEY(3, 1, KEY_V), | 209 | KEY(3, 1, KEY_V), |
202 | KEY(3, 2, KEY_B), | 210 | KEY(3, 2, KEY_B), |
@@ -205,20 +213,23 @@ static int board_keymap[] = { | |||
205 | KEY(3, 5, KEY_SPACE), | 213 | KEY(3, 5, KEY_SPACE), |
206 | KEY(3, 6, KEY_SPACE), | 214 | KEY(3, 6, KEY_SPACE), |
207 | KEY(3, 7, KEY_LEFT), | 215 | KEY(3, 7, KEY_LEFT), |
216 | |||
208 | KEY(4, 0, KEY_T), | 217 | KEY(4, 0, KEY_T), |
209 | KEY(4, 1, KEY_DOWN), | 218 | KEY(4, 1, KEY_DOWN), |
210 | KEY(4, 2, KEY_RIGHT), | 219 | KEY(4, 2, KEY_RIGHT), |
211 | KEY(4, 4, KEY_LEFTCTRL), | 220 | KEY(4, 4, KEY_LEFTCTRL), |
212 | KEY(4, 5, KEY_RIGHTALT), | 221 | KEY(4, 5, KEY_RIGHTALT), |
213 | KEY(4, 6, KEY_LEFTSHIFT), | 222 | KEY(4, 6, KEY_LEFTSHIFT), |
223 | KEY(4, 8, KEY_F10), | ||
224 | |||
214 | KEY(5, 0, KEY_Y), | 225 | KEY(5, 0, KEY_Y), |
226 | KEY(5, 8, KEY_F11), | ||
227 | |||
215 | KEY(6, 0, KEY_U), | 228 | KEY(6, 0, KEY_U), |
229 | |||
216 | KEY(7, 0, KEY_I), | 230 | KEY(7, 0, KEY_I), |
217 | KEY(7, 1, KEY_F7), | 231 | KEY(7, 1, KEY_F7), |
218 | KEY(7, 2, KEY_F8), | 232 | KEY(7, 2, KEY_F8), |
219 | KEY(0xff, 2, KEY_F9), | ||
220 | KEY(0xff, 4, KEY_F10), | ||
221 | KEY(0xff, 5, KEY_F11), | ||
222 | }; | 233 | }; |
223 | 234 | ||
224 | static struct matrix_keymap_data board_map_data = { | 235 | static struct matrix_keymap_data board_map_data = { |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 41b155acfca7..d33744117ce2 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3166,6 +3166,10 @@ static struct clk uart4_ick_am35xx = { | |||
3166 | .recalc = &followparent_recalc, | 3166 | .recalc = &followparent_recalc, |
3167 | }; | 3167 | }; |
3168 | 3168 | ||
3169 | static struct clk dummy_apb_pclk = { | ||
3170 | .name = "apb_pclk", | ||
3171 | .ops = &clkops_null, | ||
3172 | }; | ||
3169 | 3173 | ||
3170 | /* | 3174 | /* |
3171 | * clkdev | 3175 | * clkdev |
@@ -3173,6 +3177,7 @@ static struct clk uart4_ick_am35xx = { | |||
3173 | 3177 | ||
3174 | /* XXX At some point we should rename this file to clock3xxx_data.c */ | 3178 | /* XXX At some point we should rename this file to clock3xxx_data.c */ |
3175 | static struct omap_clk omap3xxx_clks[] = { | 3179 | static struct omap_clk omap3xxx_clks[] = { |
3180 | CLK(NULL, "apb_pclk", &dummy_apb_pclk, CK_3XXX), | ||
3176 | CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_3XXX), | 3181 | CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_3XXX), |
3177 | CLK(NULL, "virt_12m_ck", &virt_12m_ck, CK_3XXX), | 3182 | CLK(NULL, "virt_12m_ck", &virt_12m_ck, CK_3XXX), |
3178 | CLK(NULL, "virt_13m_ck", &virt_13m_ck, CK_3XXX), | 3183 | CLK(NULL, "virt_13m_ck", &virt_13m_ck, CK_3XXX), |
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c index 45c23fd6df31..40b6ac2de876 100644 --- a/arch/arm/mach-pxa/colibri-pxa300.c +++ b/arch/arm/mach-pxa/colibri-pxa300.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <mach/colibri.h> | 26 | #include <mach/colibri.h> |
27 | #include <mach/ohci.h> | 27 | #include <mach/ohci.h> |
28 | #include <mach/pxafb.h> | 28 | #include <mach/pxafb.h> |
29 | #include <mach/audio.h> | ||
29 | 30 | ||
30 | #include "generic.h" | 31 | #include "generic.h" |
31 | #include "devices.h" | 32 | #include "devices.h" |
@@ -145,7 +146,7 @@ static void __init colibri_pxa300_init_lcd(void) | |||
145 | static inline void colibri_pxa300_init_lcd(void) {} | 146 | static inline void colibri_pxa300_init_lcd(void) {} |
146 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ | 147 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ |
147 | 148 | ||
148 | #if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE) | 149 | #if defined(CONFIG_SND_AC97_CODEC) || defined(CONFIG_SND_AC97_CODEC_MODULE) |
149 | static mfp_cfg_t colibri_pxa310_ac97_pin_config[] __initdata = { | 150 | static mfp_cfg_t colibri_pxa310_ac97_pin_config[] __initdata = { |
150 | GPIO24_AC97_SYSCLK, | 151 | GPIO24_AC97_SYSCLK, |
151 | GPIO23_AC97_nACRESET, | 152 | GPIO23_AC97_nACRESET, |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 95234fb4fcf8..461ba4080155 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -446,7 +446,7 @@ static struct platform_device corgiled_device = { | |||
446 | static struct pxamci_platform_data corgi_mci_platform_data = { | 446 | static struct pxamci_platform_data corgi_mci_platform_data = { |
447 | .detect_delay_ms = 250, | 447 | .detect_delay_ms = 250, |
448 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 448 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
449 | .gpio_card_detect = -1, | 449 | .gpio_card_detect = CORGI_GPIO_nSD_DETECT, |
450 | .gpio_card_ro = CORGI_GPIO_nSD_WP, | 450 | .gpio_card_ro = CORGI_GPIO_nSD_WP, |
451 | .gpio_power = CORGI_GPIO_SD_PWR, | 451 | .gpio_power = CORGI_GPIO_SD_PWR, |
452 | }; | 452 | }; |
diff --git a/arch/arm/mach-pxa/cpufreq-pxa2xx.c b/arch/arm/mach-pxa/cpufreq-pxa2xx.c index 9e4d9816726a..268a9bc6be8a 100644 --- a/arch/arm/mach-pxa/cpufreq-pxa2xx.c +++ b/arch/arm/mach-pxa/cpufreq-pxa2xx.c | |||
@@ -256,13 +256,9 @@ static void init_sdram_rows(void) | |||
256 | 256 | ||
257 | static u32 mdrefr_dri(unsigned int freq) | 257 | static u32 mdrefr_dri(unsigned int freq) |
258 | { | 258 | { |
259 | u32 dri = 0; | 259 | u32 interval = freq * SDRAM_TREF / sdram_rows; |
260 | 260 | ||
261 | if (cpu_is_pxa25x()) | 261 | return (interval - (cpu_is_pxa27x() ? 31 : 0)) / 32; |
262 | dri = ((freq * SDRAM_TREF) / (sdram_rows * 32)); | ||
263 | if (cpu_is_pxa27x()) | ||
264 | dri = ((freq * SDRAM_TREF) / (sdram_rows - 31)) / 32; | ||
265 | return dri; | ||
266 | } | 262 | } |
267 | 263 | ||
268 | /* find a valid frequency point */ | 264 | /* find a valid frequency point */ |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 0af36177ff08..c059dac02b61 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -41,10 +41,10 @@ void pxa27x_clear_otgph(void) | |||
41 | EXPORT_SYMBOL(pxa27x_clear_otgph); | 41 | EXPORT_SYMBOL(pxa27x_clear_otgph); |
42 | 42 | ||
43 | static unsigned long ac97_reset_config[] = { | 43 | static unsigned long ac97_reset_config[] = { |
44 | GPIO95_AC97_nRESET, | ||
45 | GPIO95_GPIO, | ||
46 | GPIO113_AC97_nRESET, | ||
47 | GPIO113_GPIO, | 44 | GPIO113_GPIO, |
45 | GPIO113_AC97_nRESET, | ||
46 | GPIO95_GPIO, | ||
47 | GPIO95_AC97_nRESET, | ||
48 | }; | 48 | }; |
49 | 49 | ||
50 | void pxa27x_assert_ac97reset(int reset_gpio, int on) | 50 | void pxa27x_assert_ac97reset(int reset_gpio, int on) |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 1195e07c5483..a54fbda77e45 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -231,6 +231,21 @@ static unsigned int realview_mmc_status(struct device *dev) | |||
231 | struct amba_device *adev = container_of(dev, struct amba_device, dev); | 231 | struct amba_device *adev = container_of(dev, struct amba_device, dev); |
232 | u32 mask; | 232 | u32 mask; |
233 | 233 | ||
234 | if (machine_is_realview_pb1176()) { | ||
235 | static bool inserted = false; | ||
236 | |||
237 | /* | ||
238 | * The PB1176 does not have the status register, | ||
239 | * assume it is inserted at startup, then invert | ||
240 | * for each call so card insertion/removal will | ||
241 | * be detected anyway. This will not be called if | ||
242 | * GPIO on PL061 is active, which is the proper | ||
243 | * way to do this on the PB1176. | ||
244 | */ | ||
245 | inserted = !inserted; | ||
246 | return inserted ? 0 : 1; | ||
247 | } | ||
248 | |||
234 | if (adev->res.start == REALVIEW_MMCI0_BASE) | 249 | if (adev->res.start == REALVIEW_MMCI0_BASE) |
235 | mask = 1; | 250 | mask = 1; |
236 | else | 251 | else |
@@ -299,8 +314,13 @@ static struct clk ref24_clk = { | |||
299 | .rate = 24000000, | 314 | .rate = 24000000, |
300 | }; | 315 | }; |
301 | 316 | ||
317 | static struct clk dummy_apb_pclk; | ||
318 | |||
302 | static struct clk_lookup lookups[] = { | 319 | static struct clk_lookup lookups[] = { |
303 | { /* UART0 */ | 320 | { /* Bus clock */ |
321 | .con_id = "apb_pclk", | ||
322 | .clk = &dummy_apb_pclk, | ||
323 | }, { /* UART0 */ | ||
304 | .dev_id = "dev:uart0", | 324 | .dev_id = "dev:uart0", |
305 | .clk = &ref24_clk, | 325 | .clk = &ref24_clk, |
306 | }, { /* UART1 */ | 326 | }, { /* UART1 */ |
@@ -312,6 +332,12 @@ static struct clk_lookup lookups[] = { | |||
312 | }, { /* UART3 */ | 332 | }, { /* UART3 */ |
313 | .dev_id = "fpga:uart3", | 333 | .dev_id = "fpga:uart3", |
314 | .clk = &ref24_clk, | 334 | .clk = &ref24_clk, |
335 | }, { /* UART3 is on the dev chip in PB1176 */ | ||
336 | .dev_id = "dev:uart3", | ||
337 | .clk = &ref24_clk, | ||
338 | }, { /* UART4 only exists in PB1176 */ | ||
339 | .dev_id = "fpga:uart4", | ||
340 | .clk = &ref24_clk, | ||
315 | }, { /* KMI0 */ | 341 | }, { /* KMI0 */ |
316 | .dev_id = "fpga:kmi0", | 342 | .dev_id = "fpga:kmi0", |
317 | .clk = &ref24_clk, | 343 | .clk = &ref24_clk, |
@@ -321,12 +347,15 @@ static struct clk_lookup lookups[] = { | |||
321 | }, { /* MMC0 */ | 347 | }, { /* MMC0 */ |
322 | .dev_id = "fpga:mmc0", | 348 | .dev_id = "fpga:mmc0", |
323 | .clk = &ref24_clk, | 349 | .clk = &ref24_clk, |
324 | }, { /* EB:CLCD */ | 350 | }, { /* CLCD is in the PB1176 and EB DevChip */ |
325 | .dev_id = "dev:clcd", | 351 | .dev_id = "dev:clcd", |
326 | .clk = &oscvco_clk, | 352 | .clk = &oscvco_clk, |
327 | }, { /* PB:CLCD */ | 353 | }, { /* PB:CLCD */ |
328 | .dev_id = "issp:clcd", | 354 | .dev_id = "issp:clcd", |
329 | .clk = &oscvco_clk, | 355 | .clk = &oscvco_clk, |
356 | }, { /* SSP */ | ||
357 | .dev_id = "dev:ssp0", | ||
358 | .clk = &ref24_clk, | ||
330 | } | 359 | } |
331 | }; | 360 | }; |
332 | 361 | ||
@@ -341,7 +370,7 @@ static int __init clk_init(void) | |||
341 | 370 | ||
342 | return 0; | 371 | return 0; |
343 | } | 372 | } |
344 | arch_initcall(clk_init); | 373 | core_initcall(clk_init); |
345 | 374 | ||
346 | /* | 375 | /* |
347 | * CLCD support. | 376 | * CLCD support. |
diff --git a/arch/arm/mach-realview/include/mach/board-pb1176.h b/arch/arm/mach-realview/include/mach/board-pb1176.h index 2f5ccb298858..002ab5d8c11c 100644 --- a/arch/arm/mach-realview/include/mach/board-pb1176.h +++ b/arch/arm/mach-realview/include/mach/board-pb1176.h | |||
@@ -26,6 +26,7 @@ | |||
26 | /* | 26 | /* |
27 | * Peripheral addresses | 27 | * Peripheral addresses |
28 | */ | 28 | */ |
29 | #define REALVIEW_PB1176_UART4_BASE 0x10009000 /* UART 4 */ | ||
29 | #define REALVIEW_PB1176_SCTL_BASE 0x10100000 /* System controller */ | 30 | #define REALVIEW_PB1176_SCTL_BASE 0x10100000 /* System controller */ |
30 | #define REALVIEW_PB1176_SMC_BASE 0x10111000 /* SMC */ | 31 | #define REALVIEW_PB1176_SMC_BASE 0x10111000 /* SMC */ |
31 | #define REALVIEW_PB1176_DMC_BASE 0x10109000 /* DMC configuration */ | 32 | #define REALVIEW_PB1176_DMC_BASE 0x10109000 /* DMC configuration */ |
diff --git a/arch/arm/mach-realview/include/mach/irqs-pb1176.h b/arch/arm/mach-realview/include/mach/irqs-pb1176.h index 830055bb8628..5c3c625e3e04 100644 --- a/arch/arm/mach-realview/include/mach/irqs-pb1176.h +++ b/arch/arm/mach-realview/include/mach/irqs-pb1176.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #define IRQ_DC1176_L2CC (IRQ_DC1176_GIC_START + 13) | 40 | #define IRQ_DC1176_L2CC (IRQ_DC1176_GIC_START + 13) |
41 | #define IRQ_DC1176_RTC (IRQ_DC1176_GIC_START + 14) | 41 | #define IRQ_DC1176_RTC (IRQ_DC1176_GIC_START + 14) |
42 | #define IRQ_DC1176_CLCD (IRQ_DC1176_GIC_START + 15) /* CLCD controller */ | 42 | #define IRQ_DC1176_CLCD (IRQ_DC1176_GIC_START + 15) /* CLCD controller */ |
43 | #define IRQ_DC1176_SSP (IRQ_DC1176_GIC_START + 17) /* SSP port */ | ||
43 | #define IRQ_DC1176_UART0 (IRQ_DC1176_GIC_START + 18) /* UART 0 on development chip */ | 44 | #define IRQ_DC1176_UART0 (IRQ_DC1176_GIC_START + 18) /* UART 0 on development chip */ |
44 | #define IRQ_DC1176_UART1 (IRQ_DC1176_GIC_START + 19) /* UART 1 on development chip */ | 45 | #define IRQ_DC1176_UART1 (IRQ_DC1176_GIC_START + 19) /* UART 1 on development chip */ |
45 | #define IRQ_DC1176_UART2 (IRQ_DC1176_GIC_START + 20) /* UART 2 on development chip */ | 46 | #define IRQ_DC1176_UART2 (IRQ_DC1176_GIC_START + 20) /* UART 2 on development chip */ |
@@ -73,7 +74,6 @@ | |||
73 | #define IRQ_PB1176_RTC (IRQ_PB1176_GIC_START + 25) /* Real Time Clock */ | 74 | #define IRQ_PB1176_RTC (IRQ_PB1176_GIC_START + 25) /* Real Time Clock */ |
74 | 75 | ||
75 | #define IRQ_PB1176_GPIO0 -1 | 76 | #define IRQ_PB1176_GPIO0 -1 |
76 | #define IRQ_PB1176_SSP -1 | ||
77 | #define IRQ_PB1176_SCTL -1 | 77 | #define IRQ_PB1176_SCTL -1 |
78 | 78 | ||
79 | #define NR_GIC_PB1176 2 | 79 | #define NR_GIC_PB1176 2 |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 4425018fab82..991c1f8390e2 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
28 | #include <linux/amba/pl022.h> | ||
28 | #include <linux/io.h> | 29 | #include <linux/io.h> |
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
@@ -129,6 +130,12 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
129 | .irq_base = -1, | 130 | .irq_base = -1, |
130 | }; | 131 | }; |
131 | 132 | ||
133 | static struct pl022_ssp_controller ssp0_plat_data = { | ||
134 | .bus_id = 0, | ||
135 | .enable_dma = 0, | ||
136 | .num_chipselect = 1, | ||
137 | }; | ||
138 | |||
132 | /* | 139 | /* |
133 | * RealView EB AMBA devices | 140 | * RealView EB AMBA devices |
134 | */ | 141 | */ |
@@ -213,7 +220,7 @@ AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); | |||
213 | AMBA_DEVICE(uart0, "dev:uart0", EB_UART0, NULL); | 220 | AMBA_DEVICE(uart0, "dev:uart0", EB_UART0, NULL); |
214 | AMBA_DEVICE(uart1, "dev:uart1", EB_UART1, NULL); | 221 | AMBA_DEVICE(uart1, "dev:uart1", EB_UART1, NULL); |
215 | AMBA_DEVICE(uart2, "dev:uart2", EB_UART2, NULL); | 222 | AMBA_DEVICE(uart2, "dev:uart2", EB_UART2, NULL); |
216 | AMBA_DEVICE(ssp0, "dev:ssp0", EB_SSP, NULL); | 223 | AMBA_DEVICE(ssp0, "dev:ssp0", EB_SSP, &ssp0_plat_data); |
217 | 224 | ||
218 | static struct amba_device *amba_devs[] __initdata = { | 225 | static struct amba_device *amba_devs[] __initdata = { |
219 | &dmac_device, | 226 | &dmac_device, |
@@ -324,6 +331,26 @@ static struct platform_device pmu_device = { | |||
324 | .resource = pmu_resources, | 331 | .resource = pmu_resources, |
325 | }; | 332 | }; |
326 | 333 | ||
334 | static struct resource char_lcd_resources[] = { | ||
335 | { | ||
336 | .start = REALVIEW_CHAR_LCD_BASE, | ||
337 | .end = (REALVIEW_CHAR_LCD_BASE + SZ_4K - 1), | ||
338 | .flags = IORESOURCE_MEM, | ||
339 | }, | ||
340 | { | ||
341 | .start = IRQ_EB_CHARLCD, | ||
342 | .end = IRQ_EB_CHARLCD, | ||
343 | .flags = IORESOURCE_IRQ, | ||
344 | }, | ||
345 | }; | ||
346 | |||
347 | static struct platform_device char_lcd_device = { | ||
348 | .name = "arm-charlcd", | ||
349 | .id = -1, | ||
350 | .num_resources = ARRAY_SIZE(char_lcd_resources), | ||
351 | .resource = char_lcd_resources, | ||
352 | }; | ||
353 | |||
327 | static void __init gic_init_irq(void) | 354 | static void __init gic_init_irq(void) |
328 | { | 355 | { |
329 | if (core_tile_eb11mp() || core_tile_a9mp()) { | 356 | if (core_tile_eb11mp() || core_tile_a9mp()) { |
@@ -442,6 +469,7 @@ static void __init realview_eb_init(void) | |||
442 | 469 | ||
443 | realview_flash_register(&realview_eb_flash_resource, 1); | 470 | realview_flash_register(&realview_eb_flash_resource, 1); |
444 | platform_device_register(&realview_i2c_device); | 471 | platform_device_register(&realview_i2c_device); |
472 | platform_device_register(&char_lcd_device); | ||
445 | eth_device_register(); | 473 | eth_device_register(); |
446 | realview_usb_register(realview_eb_isp1761_resources); | 474 | realview_usb_register(realview_eb_isp1761_resources); |
447 | 475 | ||
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 099a1f125cf8..d2be12eb829e 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
28 | #include <linux/amba/pl022.h> | ||
28 | #include <linux/io.h> | 29 | #include <linux/io.h> |
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
@@ -123,6 +124,12 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
123 | .irq_base = -1, | 124 | .irq_base = -1, |
124 | }; | 125 | }; |
125 | 126 | ||
127 | static struct pl022_ssp_controller ssp0_plat_data = { | ||
128 | .bus_id = 0, | ||
129 | .enable_dma = 0, | ||
130 | .num_chipselect = 1, | ||
131 | }; | ||
132 | |||
126 | /* | 133 | /* |
127 | * RealView PB1176 AMBA devices | 134 | * RealView PB1176 AMBA devices |
128 | */ | 135 | */ |
@@ -144,8 +151,6 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
144 | #define MPMC_DMA { 0, 0 } | 151 | #define MPMC_DMA { 0, 0 } |
145 | #define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ } | 152 | #define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ } |
146 | #define PB1176_CLCD_DMA { 0, 0 } | 153 | #define PB1176_CLCD_DMA { 0, 0 } |
147 | #define DMAC_IRQ { IRQ_PB1176_DMAC, NO_IRQ } | ||
148 | #define DMAC_DMA { 0, 0 } | ||
149 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } | 154 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } |
150 | #define SCTL_DMA { 0, 0 } | 155 | #define SCTL_DMA { 0, 0 } |
151 | #define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ } | 156 | #define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ } |
@@ -166,7 +171,9 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
166 | #define PB1176_UART2_DMA { 11, 10 } | 171 | #define PB1176_UART2_DMA { 11, 10 } |
167 | #define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ } | 172 | #define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ } |
168 | #define PB1176_UART3_DMA { 0x86, 0x87 } | 173 | #define PB1176_UART3_DMA { 0x86, 0x87 } |
169 | #define PB1176_SSP_IRQ { IRQ_PB1176_SSP, NO_IRQ } | 174 | #define PB1176_UART4_IRQ { IRQ_PB1176_UART4, NO_IRQ } |
175 | #define PB1176_UART4_DMA { 0, 0 } | ||
176 | #define PB1176_SSP_IRQ { IRQ_DC1176_SSP, NO_IRQ } | ||
170 | #define PB1176_SSP_DMA { 9, 8 } | 177 | #define PB1176_SSP_DMA { 9, 8 } |
171 | 178 | ||
172 | /* FPGA Primecells */ | 179 | /* FPGA Primecells */ |
@@ -174,7 +181,7 @@ AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); | |||
174 | AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); | 181 | AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); |
175 | AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); | 182 | AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); |
176 | AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); | 183 | AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); |
177 | AMBA_DEVICE(uart3, "fpga:uart3", PB1176_UART3, NULL); | 184 | AMBA_DEVICE(uart4, "fpga:uart4", PB1176_UART4, NULL); |
178 | 185 | ||
179 | /* DevChip Primecells */ | 186 | /* DevChip Primecells */ |
180 | AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL); | 187 | AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL); |
@@ -188,18 +195,16 @@ AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); | |||
188 | AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL); | 195 | AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL); |
189 | AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL); | 196 | AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL); |
190 | AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL); | 197 | AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL); |
191 | AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, NULL); | 198 | AMBA_DEVICE(uart3, "dev:uart3", PB1176_UART3, NULL); |
192 | 199 | AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, &ssp0_plat_data); | |
193 | /* Primecells on the NEC ISSP chip */ | 200 | AMBA_DEVICE(clcd, "dev:clcd", PB1176_CLCD, &clcd_plat_data); |
194 | AMBA_DEVICE(clcd, "issp:clcd", PB1176_CLCD, &clcd_plat_data); | ||
195 | //AMBA_DEVICE(dmac, "issp:dmac", PB1176_DMAC, NULL); | ||
196 | 201 | ||
197 | static struct amba_device *amba_devs[] __initdata = { | 202 | static struct amba_device *amba_devs[] __initdata = { |
198 | // &dmac_device, | ||
199 | &uart0_device, | 203 | &uart0_device, |
200 | &uart1_device, | 204 | &uart1_device, |
201 | &uart2_device, | 205 | &uart2_device, |
202 | &uart3_device, | 206 | &uart3_device, |
207 | &uart4_device, | ||
203 | &smc_device, | 208 | &smc_device, |
204 | &clcd_device, | 209 | &clcd_device, |
205 | &sctl_device, | 210 | &sctl_device, |
@@ -276,6 +281,26 @@ static struct platform_device pmu_device = { | |||
276 | .resource = &pmu_resource, | 281 | .resource = &pmu_resource, |
277 | }; | 282 | }; |
278 | 283 | ||
284 | static struct resource char_lcd_resources[] = { | ||
285 | { | ||
286 | .start = REALVIEW_CHAR_LCD_BASE, | ||
287 | .end = (REALVIEW_CHAR_LCD_BASE + SZ_4K - 1), | ||
288 | .flags = IORESOURCE_MEM, | ||
289 | }, | ||
290 | { | ||
291 | .start = IRQ_PB1176_CHARLCD, | ||
292 | .end = IRQ_PB1176_CHARLCD, | ||
293 | .flags = IORESOURCE_IRQ, | ||
294 | }, | ||
295 | }; | ||
296 | |||
297 | static struct platform_device char_lcd_device = { | ||
298 | .name = "arm-charlcd", | ||
299 | .id = -1, | ||
300 | .num_resources = ARRAY_SIZE(char_lcd_resources), | ||
301 | .resource = char_lcd_resources, | ||
302 | }; | ||
303 | |||
279 | static void __init gic_init_irq(void) | 304 | static void __init gic_init_irq(void) |
280 | { | 305 | { |
281 | /* ARM1176 DevChip GIC, primary */ | 306 | /* ARM1176 DevChip GIC, primary */ |
@@ -338,6 +363,7 @@ static void __init realview_pb1176_init(void) | |||
338 | platform_device_register(&realview_i2c_device); | 363 | platform_device_register(&realview_i2c_device); |
339 | realview_usb_register(realview_pb1176_isp1761_resources); | 364 | realview_usb_register(realview_pb1176_isp1761_resources); |
340 | platform_device_register(&pmu_device); | 365 | platform_device_register(&pmu_device); |
366 | platform_device_register(&char_lcd_device); | ||
341 | 367 | ||
342 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 368 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
343 | struct amba_device *d = amba_devs[i]; | 369 | struct amba_device *d = amba_devs[i]; |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 0e07a5ccb75f..d591bc00b86e 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
28 | #include <linux/amba/pl022.h> | ||
28 | #include <linux/io.h> | 29 | #include <linux/io.h> |
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
@@ -124,6 +125,12 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
124 | .irq_base = -1, | 125 | .irq_base = -1, |
125 | }; | 126 | }; |
126 | 127 | ||
128 | static struct pl022_ssp_controller ssp0_plat_data = { | ||
129 | .bus_id = 0, | ||
130 | .enable_dma = 0, | ||
131 | .num_chipselect = 1, | ||
132 | }; | ||
133 | |||
127 | /* | 134 | /* |
128 | * RealView PB11MPCore AMBA devices | 135 | * RealView PB11MPCore AMBA devices |
129 | */ | 136 | */ |
@@ -190,7 +197,7 @@ AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); | |||
190 | AMBA_DEVICE(uart0, "dev:uart0", PB11MP_UART0, NULL); | 197 | AMBA_DEVICE(uart0, "dev:uart0", PB11MP_UART0, NULL); |
191 | AMBA_DEVICE(uart1, "dev:uart1", PB11MP_UART1, NULL); | 198 | AMBA_DEVICE(uart1, "dev:uart1", PB11MP_UART1, NULL); |
192 | AMBA_DEVICE(uart2, "dev:uart2", PB11MP_UART2, NULL); | 199 | AMBA_DEVICE(uart2, "dev:uart2", PB11MP_UART2, NULL); |
193 | AMBA_DEVICE(ssp0, "dev:ssp0", PB11MP_SSP, NULL); | 200 | AMBA_DEVICE(ssp0, "dev:ssp0", PB11MP_SSP, &ssp0_plat_data); |
194 | 201 | ||
195 | /* Primecells on the NEC ISSP chip */ | 202 | /* Primecells on the NEC ISSP chip */ |
196 | AMBA_DEVICE(clcd, "issp:clcd", PB11MP_CLCD, &clcd_plat_data); | 203 | AMBA_DEVICE(clcd, "issp:clcd", PB11MP_CLCD, &clcd_plat_data); |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index ac2f06f1ca50..6c37621217bc 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
28 | #include <linux/amba/pl022.h> | ||
28 | #include <linux/io.h> | 29 | #include <linux/io.h> |
29 | 30 | ||
30 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
@@ -114,6 +115,12 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
114 | .irq_base = -1, | 115 | .irq_base = -1, |
115 | }; | 116 | }; |
116 | 117 | ||
118 | static struct pl022_ssp_controller ssp0_plat_data = { | ||
119 | .bus_id = 0, | ||
120 | .enable_dma = 0, | ||
121 | .num_chipselect = 1, | ||
122 | }; | ||
123 | |||
117 | /* | 124 | /* |
118 | * RealView PBA8Core AMBA devices | 125 | * RealView PBA8Core AMBA devices |
119 | */ | 126 | */ |
@@ -180,7 +187,7 @@ AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); | |||
180 | AMBA_DEVICE(uart0, "dev:uart0", PBA8_UART0, NULL); | 187 | AMBA_DEVICE(uart0, "dev:uart0", PBA8_UART0, NULL); |
181 | AMBA_DEVICE(uart1, "dev:uart1", PBA8_UART1, NULL); | 188 | AMBA_DEVICE(uart1, "dev:uart1", PBA8_UART1, NULL); |
182 | AMBA_DEVICE(uart2, "dev:uart2", PBA8_UART2, NULL); | 189 | AMBA_DEVICE(uart2, "dev:uart2", PBA8_UART2, NULL); |
183 | AMBA_DEVICE(ssp0, "dev:ssp0", PBA8_SSP, NULL); | 190 | AMBA_DEVICE(ssp0, "dev:ssp0", PBA8_SSP, &ssp0_plat_data); |
184 | 191 | ||
185 | /* Primecells on the NEC ISSP chip */ | 192 | /* Primecells on the NEC ISSP chip */ |
186 | AMBA_DEVICE(clcd, "issp:clcd", PBA8_CLCD, &clcd_plat_data); | 193 | AMBA_DEVICE(clcd, "issp:clcd", PBA8_CLCD, &clcd_plat_data); |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 08fd683adc4c..9428eff0b116 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/amba/bus.h> | 24 | #include <linux/amba/bus.h> |
25 | #include <linux/amba/pl061.h> | 25 | #include <linux/amba/pl061.h> |
26 | #include <linux/amba/mmci.h> | 26 | #include <linux/amba/mmci.h> |
27 | #include <linux/amba/pl022.h> | ||
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
28 | 29 | ||
29 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
@@ -136,6 +137,12 @@ static struct pl061_platform_data gpio2_plat_data = { | |||
136 | .irq_base = -1, | 137 | .irq_base = -1, |
137 | }; | 138 | }; |
138 | 139 | ||
140 | static struct pl022_ssp_controller ssp0_plat_data = { | ||
141 | .bus_id = 0, | ||
142 | .enable_dma = 0, | ||
143 | .num_chipselect = 1, | ||
144 | }; | ||
145 | |||
139 | /* | 146 | /* |
140 | * RealView PBXCore AMBA devices | 147 | * RealView PBXCore AMBA devices |
141 | */ | 148 | */ |
@@ -202,7 +209,7 @@ AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); | |||
202 | AMBA_DEVICE(uart0, "dev:uart0", PBX_UART0, NULL); | 209 | AMBA_DEVICE(uart0, "dev:uart0", PBX_UART0, NULL); |
203 | AMBA_DEVICE(uart1, "dev:uart1", PBX_UART1, NULL); | 210 | AMBA_DEVICE(uart1, "dev:uart1", PBX_UART1, NULL); |
204 | AMBA_DEVICE(uart2, "dev:uart2", PBX_UART2, NULL); | 211 | AMBA_DEVICE(uart2, "dev:uart2", PBX_UART2, NULL); |
205 | AMBA_DEVICE(ssp0, "dev:ssp0", PBX_SSP, NULL); | 212 | AMBA_DEVICE(ssp0, "dev:ssp0", PBX_SSP, &ssp0_plat_data); |
206 | 213 | ||
207 | /* Primecells on the NEC ISSP chip */ | 214 | /* Primecells on the NEC ISSP chip */ |
208 | AMBA_DEVICE(clcd, "issp:clcd", PBX_CLCD, &clcd_plat_data); | 215 | AMBA_DEVICE(clcd, "issp:clcd", PBX_CLCD, &clcd_plat_data); |
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S index 50f071c5bf4d..5ea24d4d1ba6 100644 --- a/arch/arm/mach-shark/include/mach/debug-macro.S +++ b/arch/arm/mach-shark/include/mach/debug-macro.S | |||
@@ -20,6 +20,9 @@ | |||
20 | strb \rd, [\rx] | 20 | strb \rd, [\rx] |
21 | .endm | 21 | .endm |
22 | 22 | ||
23 | .macro waituart,rd,rx | ||
24 | .endm | ||
25 | |||
23 | .macro busyuart,rd,rx | 26 | .macro busyuart,rd,rx |
24 | mov \rd, #0 | 27 | mov \rd, #0 |
25 | 1001: add \rd, \rd, #1 | 28 | 1001: add \rd, \rd, #1 |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index f2b88c5fe142..4c704b4e8b34 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -70,6 +70,18 @@ endmenu | |||
70 | 70 | ||
71 | menu "Timer and clock configuration" | 71 | menu "Timer and clock configuration" |
72 | 72 | ||
73 | config SHMOBILE_TIMER_HZ | ||
74 | int "Kernel HZ (jiffies per second)" | ||
75 | range 32 1024 | ||
76 | default "128" | ||
77 | help | ||
78 | Allows the configuration of the timer frequency. It is customary | ||
79 | to have the timer interrupt run at 1000 Hz or 100 Hz, but in the | ||
80 | case of low timer frequencies other values may be more suitable. | ||
81 | SH-Mobile systems using a 32768 Hz RCLK for clock events may want | ||
82 | to select a HZ value such as 128 that can evenly divide RCLK. | ||
83 | A HZ value that does not divide evenly may cause timer drift. | ||
84 | |||
73 | config SH_TIMER_CMT | 85 | config SH_TIMER_CMT |
74 | bool "CMT timer driver" | 86 | bool "CMT timer driver" |
75 | default y | 87 | default y |
diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h index 5179b72e1ee3..132256bb8c81 100644 --- a/arch/arm/mach-shmobile/include/mach/irqs.h +++ b/arch/arm/mach-shmobile/include/mach/irqs.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __ASM_MACH_IRQS_H | 2 | #define __ASM_MACH_IRQS_H |
3 | 3 | ||
4 | #define NR_IRQS 512 | 4 | #define NR_IRQS 512 |
5 | #define NR_IRQS_LEGACY 8 | ||
6 | 5 | ||
7 | #define evt2irq(evt) (((evt) >> 5) - 16) | 6 | #define evt2irq(evt) (((evt) >> 5) - 16) |
8 | #define irq2evt(irq) (((irq) + 16) << 5) | 7 | #define irq2evt(irq) (((irq) + 16) << 5) |
diff --git a/arch/arm/mach-spear3xx/clock.c b/arch/arm/mach-spear3xx/clock.c index 39f6ccf22294..18febf92f20a 100644 --- a/arch/arm/mach-spear3xx/clock.c +++ b/arch/arm/mach-spear3xx/clock.c | |||
@@ -341,8 +341,11 @@ static struct clk gpio_clk = { | |||
341 | .recalc = &follow_parent, | 341 | .recalc = &follow_parent, |
342 | }; | 342 | }; |
343 | 343 | ||
344 | static struct clk dummy_apb_pclk; | ||
345 | |||
344 | /* array of all spear 3xx clock lookups */ | 346 | /* array of all spear 3xx clock lookups */ |
345 | static struct clk_lookup spear_clk_lookups[] = { | 347 | static struct clk_lookup spear_clk_lookups[] = { |
348 | { .con_id = "apb_pclk", .clk = &dummy_apb_pclk}, | ||
346 | /* root clks */ | 349 | /* root clks */ |
347 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, | 350 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, |
348 | { .con_id = "osc_24m_clk", .clk = &osc_24m_clk}, | 351 | { .con_id = "osc_24m_clk", .clk = &osc_24m_clk}, |
diff --git a/arch/arm/mach-spear6xx/clock.c b/arch/arm/mach-spear6xx/clock.c index 13e27c769685..36ff056b7321 100644 --- a/arch/arm/mach-spear6xx/clock.c +++ b/arch/arm/mach-spear6xx/clock.c | |||
@@ -428,8 +428,11 @@ static struct clk gpio2_clk = { | |||
428 | .recalc = &follow_parent, | 428 | .recalc = &follow_parent, |
429 | }; | 429 | }; |
430 | 430 | ||
431 | static struct clk dummy_apb_pclk; | ||
432 | |||
431 | /* array of all spear 6xx clock lookups */ | 433 | /* array of all spear 6xx clock lookups */ |
432 | static struct clk_lookup spear_clk_lookups[] = { | 434 | static struct clk_lookup spear_clk_lookups[] = { |
435 | { .con_id = "apb_pclk", .clk = &dummy_apb_pclk}, | ||
433 | /* root clks */ | 436 | /* root clks */ |
434 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, | 437 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, |
435 | { .con_id = "osc_30m_clk", .clk = &osc_30m_clk}, | 438 | { .con_id = "osc_30m_clk", .clk = &osc_30m_clk}, |
diff --git a/arch/arm/mach-u300/clock.c b/arch/arm/mach-u300/clock.c index 5af71d5ba665..5d12d547789e 100644 --- a/arch/arm/mach-u300/clock.c +++ b/arch/arm/mach-u300/clock.c | |||
@@ -1212,6 +1212,8 @@ static struct clk ppm_clk = { | |||
1212 | }; | 1212 | }; |
1213 | #endif | 1213 | #endif |
1214 | 1214 | ||
1215 | static struct clk dummy_apb_pclk; | ||
1216 | |||
1215 | #define DEF_LOOKUP(devid, clkref) \ | 1217 | #define DEF_LOOKUP(devid, clkref) \ |
1216 | { \ | 1218 | { \ |
1217 | .dev_id = devid, \ | 1219 | .dev_id = devid, \ |
@@ -1223,6 +1225,10 @@ static struct clk ppm_clk = { | |||
1223 | * look up through clockdevice. | 1225 | * look up through clockdevice. |
1224 | */ | 1226 | */ |
1225 | static struct clk_lookup lookups[] = { | 1227 | static struct clk_lookup lookups[] = { |
1228 | { | ||
1229 | .con_id = "apb_pclk", | ||
1230 | .clk = &dummy_apb_pclk, | ||
1231 | }, | ||
1226 | /* Connected directly to the AMBA bus */ | 1232 | /* Connected directly to the AMBA bus */ |
1227 | DEF_LOOKUP("amba", &amba_clk), | 1233 | DEF_LOOKUP("amba", &amba_clk), |
1228 | DEF_LOOKUP("cpu", &cpu_clk), | 1234 | DEF_LOOKUP("cpu", &cpu_clk), |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index bb8d7b771817..0e8fd135a57d 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -13,19 +13,42 @@ | |||
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <linux/amba/bus.h> | 17 | #include <linux/amba/bus.h> |
17 | #include <linux/amba/pl022.h> | 18 | #include <linux/amba/pl022.h> |
18 | #include <linux/spi/spi.h> | 19 | #include <linux/spi/spi.h> |
20 | #include <linux/mfd/ab8500.h> | ||
19 | 21 | ||
20 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
22 | 24 | ||
25 | #include <plat/pincfg.h> | ||
23 | #include <plat/i2c.h> | 26 | #include <plat/i2c.h> |
24 | 27 | ||
25 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
26 | #include <mach/setup.h> | 29 | #include <mach/setup.h> |
27 | #include <mach/devices.h> | 30 | #include <mach/devices.h> |
28 | 31 | ||
32 | #include "pins-db8500.h" | ||
33 | |||
34 | static pin_cfg_t mop500_pins[] = { | ||
35 | /* SSP0 */ | ||
36 | GPIO143_SSP0_CLK, | ||
37 | GPIO144_SSP0_FRM, | ||
38 | GPIO145_SSP0_RXD, | ||
39 | GPIO146_SSP0_TXD, | ||
40 | |||
41 | /* I2C */ | ||
42 | GPIO147_I2C0_SCL, | ||
43 | GPIO148_I2C0_SDA, | ||
44 | GPIO16_I2C1_SCL, | ||
45 | GPIO17_I2C1_SDA, | ||
46 | GPIO10_I2C2_SDA, | ||
47 | GPIO11_I2C2_SCL, | ||
48 | GPIO229_I2C3_SDA, | ||
49 | GPIO230_I2C3_SCL, | ||
50 | }; | ||
51 | |||
29 | static void ab4500_spi_cs_control(u32 command) | 52 | static void ab4500_spi_cs_control(u32 command) |
30 | { | 53 | { |
31 | /* set the FRM signal, which is CS - TODO */ | 54 | /* set the FRM signal, which is CS - TODO */ |
@@ -48,15 +71,20 @@ struct pl022_config_chip ab4500_chip_info = { | |||
48 | .cs_control = ab4500_spi_cs_control, | 71 | .cs_control = ab4500_spi_cs_control, |
49 | }; | 72 | }; |
50 | 73 | ||
74 | static struct ab8500_platform_data ab8500_platdata = { | ||
75 | .irq_base = MOP500_AB8500_IRQ_BASE, | ||
76 | }; | ||
77 | |||
51 | static struct spi_board_info u8500_spi_devices[] = { | 78 | static struct spi_board_info u8500_spi_devices[] = { |
52 | { | 79 | { |
53 | .modalias = "ab8500", | 80 | .modalias = "ab8500", |
54 | .controller_data = &ab4500_chip_info, | 81 | .controller_data = &ab4500_chip_info, |
82 | .platform_data = &ab8500_platdata, | ||
55 | .max_speed_hz = 12000000, | 83 | .max_speed_hz = 12000000, |
56 | .bus_num = 0, | 84 | .bus_num = 0, |
57 | .chip_select = 0, | 85 | .chip_select = 0, |
58 | .mode = SPI_MODE_0, | 86 | .mode = SPI_MODE_0, |
59 | .irq = IRQ_AB4500, | 87 | .irq = IRQ_DB8500_AB8500, |
60 | }, | 88 | }, |
61 | }; | 89 | }; |
62 | 90 | ||
@@ -118,6 +146,10 @@ static void __init u8500_init_machine(void) | |||
118 | { | 146 | { |
119 | int i; | 147 | int i; |
120 | 148 | ||
149 | u8500_init_devices(); | ||
150 | |||
151 | nmk_config_pins(mop500_pins, ARRAY_SIZE(mop500_pins)); | ||
152 | |||
121 | u8500_i2c0_device.dev.platform_data = &u8500_i2c0_data; | 153 | u8500_i2c0_device.dev.platform_data = &u8500_i2c0_data; |
122 | ux500_i2c1_device.dev.platform_data = &u8500_i2c1_data; | 154 | ux500_i2c1_device.dev.platform_data = &u8500_i2c1_data; |
123 | ux500_i2c2_device.dev.platform_data = &u8500_i2c2_data; | 155 | ux500_i2c2_device.dev.platform_data = &u8500_i2c2_data; |
@@ -133,8 +165,6 @@ static void __init u8500_init_machine(void) | |||
133 | 165 | ||
134 | spi_register_board_info(u8500_spi_devices, | 166 | spi_register_board_info(u8500_spi_devices, |
135 | ARRAY_SIZE(u8500_spi_devices)); | 167 | ARRAY_SIZE(u8500_spi_devices)); |
136 | |||
137 | u8500_init_devices(); | ||
138 | } | 168 | } |
139 | 169 | ||
140 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | 170 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") |
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 0a1318fc8e2b..d8ab7f184fe4 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -453,7 +453,11 @@ static DEFINE_PRCC_CLK_CUSTOM(7, mtu0_ed, 2, -1, NULL, clk_mtu_get_rate, 0); | |||
453 | static DEFINE_PRCC_CLK(7, wdg_ed, 1, -1, NULL); | 453 | static DEFINE_PRCC_CLK(7, wdg_ed, 1, -1, NULL); |
454 | static DEFINE_PRCC_CLK(7, cfgreg_ed, 0, -1, NULL); | 454 | static DEFINE_PRCC_CLK(7, cfgreg_ed, 0, -1, NULL); |
455 | 455 | ||
456 | static struct clk clk_dummy_apb_pclk; | ||
457 | |||
456 | static struct clk_lookup u8500_common_clks[] = { | 458 | static struct clk_lookup u8500_common_clks[] = { |
459 | CLK(dummy_apb_pclk, NULL, "apb_pclk"), | ||
460 | |||
457 | /* Peripheral Cluster #1 */ | 461 | /* Peripheral Cluster #1 */ |
458 | CLK(gpio0, "gpio.0", NULL), | 462 | CLK(gpio0, "gpio.0", NULL), |
459 | CLK(gpio0, "gpio.1", NULL), | 463 | CLK(gpio0, "gpio.1", NULL), |
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c index 822903421943..654fca944e65 100644 --- a/arch/arm/mach-ux500/devices-db8500.c +++ b/arch/arm/mach-ux500/devices-db8500.c | |||
@@ -65,7 +65,7 @@ struct amba_device u8500_ssp0_device = { | |||
65 | .end = U8500_SSP0_BASE + SZ_4K - 1, | 65 | .end = U8500_SSP0_BASE + SZ_4K - 1, |
66 | .flags = IORESOURCE_MEM, | 66 | .flags = IORESOURCE_MEM, |
67 | }, | 67 | }, |
68 | .irq = {IRQ_SSP0, NO_IRQ }, | 68 | .irq = {IRQ_DB8500_SSP0, NO_IRQ }, |
69 | /* ST-Ericsson modified id */ | 69 | /* ST-Ericsson modified id */ |
70 | .periphid = SSP_PER_ID, | 70 | .periphid = SSP_PER_ID, |
71 | }; | 71 | }; |
@@ -77,8 +77,8 @@ static struct resource u8500_i2c0_resources[] = { | |||
77 | .flags = IORESOURCE_MEM, | 77 | .flags = IORESOURCE_MEM, |
78 | }, | 78 | }, |
79 | [1] = { | 79 | [1] = { |
80 | .start = IRQ_I2C0, | 80 | .start = IRQ_DB8500_I2C0, |
81 | .end = IRQ_I2C0, | 81 | .end = IRQ_DB8500_I2C0, |
82 | .flags = IORESOURCE_IRQ, | 82 | .flags = IORESOURCE_IRQ, |
83 | } | 83 | } |
84 | }; | 84 | }; |
@@ -97,8 +97,8 @@ static struct resource u8500_i2c4_resources[] = { | |||
97 | .flags = IORESOURCE_MEM, | 97 | .flags = IORESOURCE_MEM, |
98 | }, | 98 | }, |
99 | [1] = { | 99 | [1] = { |
100 | .start = IRQ_I2C4, | 100 | .start = IRQ_DB8500_I2C4, |
101 | .end = IRQ_I2C4, | 101 | .end = IRQ_DB8500_I2C4, |
102 | .flags = IORESOURCE_IRQ, | 102 | .flags = IORESOURCE_IRQ, |
103 | } | 103 | } |
104 | }; | 104 | }; |
@@ -130,8 +130,8 @@ static struct resource dma40_resources[] = { | |||
130 | .name = "lcla", | 130 | .name = "lcla", |
131 | }, | 131 | }, |
132 | [3] = { | 132 | [3] = { |
133 | .start = IRQ_DMA, | 133 | .start = IRQ_DB8500_DMA, |
134 | .end = IRQ_DMA, | 134 | .end = IRQ_DB8500_DMA, |
135 | .flags = IORESOURCE_IRQ} | 135 | .flags = IORESOURCE_IRQ} |
136 | }; | 136 | }; |
137 | 137 | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h new file mode 100644 index 000000000000..cca4f705601e --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #ifndef __MACH_IRQS_BOARD_MOP500_H | ||
9 | #define __MACH_IRQS_BOARD_MOP500_H | ||
10 | |||
11 | #define AB8500_NR_IRQS 104 | ||
12 | |||
13 | #define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START | ||
14 | #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \ | ||
15 | + AB8500_NR_IRQS) | ||
16 | #define MOP500_IRQ_END MOP500_AB8500_IRQ_END | ||
17 | |||
18 | #if MOP500_IRQ_END > IRQ_BOARD_END | ||
19 | #undef IRQ_BOARD_END | ||
20 | #define IRQ_BOARD_END MOP500_IRQ_END | ||
21 | #endif | ||
22 | |||
23 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db5500.h b/arch/arm/mach-ux500/include/mach/irqs-db5500.h new file mode 100644 index 000000000000..6fbfe5e2065a --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/irqs-db5500.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #ifndef __MACH_IRQS_DB5500_H | ||
9 | #define __MACH_IRQS_DB5500_H | ||
10 | |||
11 | #define IRQ_DB5500_MTU0 (IRQ_SHPI_START + 4) | ||
12 | #define IRQ_DB5500_SPI2 (IRQ_SHPI_START + 6) | ||
13 | #define IRQ_DB5500_PMU0 (IRQ_SHPI_START + 7) | ||
14 | #define IRQ_DB5500_SPI0 (IRQ_SHPI_START + 8) | ||
15 | #define IRQ_DB5500_RTT (IRQ_SHPI_START + 9) | ||
16 | #define IRQ_DB5500_PKA (IRQ_SHPI_START + 10) | ||
17 | #define IRQ_DB5500_UART0 (IRQ_SHPI_START + 11) | ||
18 | #define IRQ_DB5500_I2C3 (IRQ_SHPI_START + 12) | ||
19 | #define IRQ_DB5500_L2CC (IRQ_SHPI_START + 13) | ||
20 | #define IRQ_DB5500_MSP0 (IRQ_SHPI_START + 14) | ||
21 | #define IRQ_DB5500_CRYP1 (IRQ_SHPI_START + 15) | ||
22 | #define IRQ_DB5500_PMU1 (IRQ_SHPI_START + 16) | ||
23 | #define IRQ_DB5500_MTU1 (IRQ_SHPI_START + 17) | ||
24 | #define IRQ_DB5500_RTC (IRQ_SHPI_START + 18) | ||
25 | #define IRQ_DB5500_UART1 (IRQ_SHPI_START + 19) | ||
26 | #define IRQ_DB5500_USB_WAKEUP (IRQ_SHPI_START + 20) | ||
27 | #define IRQ_DB5500_I2C0 (IRQ_SHPI_START + 21) | ||
28 | #define IRQ_DB5500_I2C1 (IRQ_SHPI_START + 22) | ||
29 | #define IRQ_DB5500_USBOTG (IRQ_SHPI_START + 23) | ||
30 | #define IRQ_DB5500_DMA_SECURE (IRQ_SHPI_START + 24) | ||
31 | #define IRQ_DB5500_DMA (IRQ_SHPI_START + 25) | ||
32 | #define IRQ_DB5500_UART2 (IRQ_SHPI_START + 26) | ||
33 | #define IRQ_DB5500_ICN_PMU1 (IRQ_SHPI_START + 27) | ||
34 | #define IRQ_DB5500_ICN_PMU2 (IRQ_SHPI_START + 28) | ||
35 | #define IRQ_DB5500_UART3 (IRQ_SHPI_START + 29) | ||
36 | #define IRQ_DB5500_SPI3 (IRQ_SHPI_START + 30) | ||
37 | #define IRQ_DB5500_SDMMC4 (IRQ_SHPI_START + 31) | ||
38 | #define IRQ_DB5500_IRRC (IRQ_SHPI_START + 33) | ||
39 | #define IRQ_DB5500_IRDA_FT (IRQ_SHPI_START + 34) | ||
40 | #define IRQ_DB5500_IRDA_SD (IRQ_SHPI_START + 35) | ||
41 | #define IRQ_DB5500_IRDA_FI (IRQ_SHPI_START + 36) | ||
42 | #define IRQ_DB5500_IRDA_FD (IRQ_SHPI_START + 37) | ||
43 | #define IRQ_DB5500_FSMC_CODEREADY (IRQ_SHPI_START + 38) | ||
44 | #define IRQ_DB5500_FSMC_NANDWAIT (IRQ_SHPI_START + 39) | ||
45 | #define IRQ_DB5500_AB5500 (IRQ_SHPI_START + 40) | ||
46 | #define IRQ_DB5500_SDMMC2 (IRQ_SHPI_START + 41) | ||
47 | #define IRQ_DB5500_SIA (IRQ_SHPI_START + 42) | ||
48 | #define IRQ_DB5500_SIA2 (IRQ_SHPI_START + 43) | ||
49 | #define IRQ_DB5500_HVA (IRQ_SHPI_START + 44) | ||
50 | #define IRQ_DB5500_HVA2 (IRQ_SHPI_START + 45) | ||
51 | #define IRQ_DB5500_PRCMU0 (IRQ_SHPI_START + 46) | ||
52 | #define IRQ_DB5500_PRCMU1 (IRQ_SHPI_START + 47) | ||
53 | #define IRQ_DB5500_DISP (IRQ_SHPI_START + 48) | ||
54 | #define IRQ_DB5500_SDMMC1 (IRQ_SHPI_START + 50) | ||
55 | #define IRQ_DB5500_MSP1 (IRQ_SHPI_START + 52) | ||
56 | #define IRQ_DB5500_KBD (IRQ_SHPI_START + 53) | ||
57 | #define IRQ_DB5500_I2C2 (IRQ_SHPI_START + 55) | ||
58 | #define IRQ_DB5500_B2R2 (IRQ_SHPI_START + 56) | ||
59 | #define IRQ_DB5500_CRYP0 (IRQ_SHPI_START + 57) | ||
60 | #define IRQ_DB5500_SDMMC3 (IRQ_SHPI_START + 59) | ||
61 | #define IRQ_DB5500_SDMMC0 (IRQ_SHPI_START + 60) | ||
62 | #define IRQ_DB5500_HSEM (IRQ_SHPI_START + 61) | ||
63 | #define IRQ_DB5500_SBAG (IRQ_SHPI_START + 63) | ||
64 | #define IRQ_DB5500_SPI1 (IRQ_SHPI_START + 96) | ||
65 | #define IRQ_DB5500_MSP2 (IRQ_SHPI_START + 98) | ||
66 | #define IRQ_DB5500_SRPTIMER (IRQ_SHPI_START + 101) | ||
67 | #define IRQ_DB5500_CTI0 (IRQ_SHPI_START + 108) | ||
68 | #define IRQ_DB5500_CTI1 (IRQ_SHPI_START + 109) | ||
69 | #define IRQ_DB5500_ICN_ERR (IRQ_SHPI_START + 110) | ||
70 | #define IRQ_DB5500_MALI_PPMMU (IRQ_SHPI_START + 112) | ||
71 | #define IRQ_DB5500_MALI_PP (IRQ_SHPI_START + 113) | ||
72 | #define IRQ_DB5500_MALI_GPMMU (IRQ_SHPI_START + 114) | ||
73 | #define IRQ_DB5500_MALI_GP (IRQ_SHPI_START + 115) | ||
74 | #define IRQ_DB5500_MALI (IRQ_SHPI_START + 116) | ||
75 | #define IRQ_DB5500_PRCMU_SEM (IRQ_SHPI_START + 118) | ||
76 | #define IRQ_DB5500_GPIO0 (IRQ_SHPI_START + 119) | ||
77 | #define IRQ_DB5500_GPIO1 (IRQ_SHPI_START + 120) | ||
78 | #define IRQ_DB5500_GPIO2 (IRQ_SHPI_START + 121) | ||
79 | #define IRQ_DB5500_GPIO3 (IRQ_SHPI_START + 122) | ||
80 | #define IRQ_DB5500_GPIO4 (IRQ_SHPI_START + 123) | ||
81 | #define IRQ_DB5500_GPIO5 (IRQ_SHPI_START + 124) | ||
82 | #define IRQ_DB5500_GPIO6 (IRQ_SHPI_START + 125) | ||
83 | #define IRQ_DB5500_GPIO7 (IRQ_SHPI_START + 126) | ||
84 | |||
85 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db8500.h b/arch/arm/mach-ux500/include/mach/irqs-db8500.h new file mode 100644 index 000000000000..8b5d9f0a1633 --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/irqs-db8500.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #ifndef __MACH_IRQS_DB8500_H | ||
9 | #define __MACH_IRQS_DB8500_H | ||
10 | |||
11 | #define IRQ_DB8500_MTU0 (IRQ_SHPI_START + 4) | ||
12 | #define IRQ_DB8500_SPI2 (IRQ_SHPI_START + 6) | ||
13 | #define IRQ_DB8500_PMU (IRQ_SHPI_START + 7) | ||
14 | #define IRQ_DB8500_SPI0 (IRQ_SHPI_START + 8) | ||
15 | #define IRQ_DB8500_RTT (IRQ_SHPI_START + 9) | ||
16 | #define IRQ_DB8500_PKA (IRQ_SHPI_START + 10) | ||
17 | #define IRQ_DB8500_UART0 (IRQ_SHPI_START + 11) | ||
18 | #define IRQ_DB8500_I2C3 (IRQ_SHPI_START + 12) | ||
19 | #define IRQ_DB8500_L2CC (IRQ_SHPI_START + 13) | ||
20 | #define IRQ_DB8500_SSP0 (IRQ_SHPI_START + 14) | ||
21 | #define IRQ_DB8500_CRYP1 (IRQ_SHPI_START + 15) | ||
22 | #define IRQ_DB8500_MSP1_RX (IRQ_SHPI_START + 16) | ||
23 | #define IRQ_DB8500_MTU1 (IRQ_SHPI_START + 17) | ||
24 | #define IRQ_DB8500_RTC (IRQ_SHPI_START + 18) | ||
25 | #define IRQ_DB8500_UART1 (IRQ_SHPI_START + 19) | ||
26 | #define IRQ_DB8500_USB_WAKEUP (IRQ_SHPI_START + 20) | ||
27 | #define IRQ_DB8500_I2C0 (IRQ_SHPI_START + 21) | ||
28 | #define IRQ_DB8500_I2C1 (IRQ_SHPI_START + 22) | ||
29 | #define IRQ_DB8500_USBOTG (IRQ_SHPI_START + 23) | ||
30 | #define IRQ_DB8500_DMA_SECURE (IRQ_SHPI_START + 24) | ||
31 | #define IRQ_DB8500_DMA (IRQ_SHPI_START + 25) | ||
32 | #define IRQ_DB8500_UART2 (IRQ_SHPI_START + 26) | ||
33 | #define IRQ_DB8500_ICN_PMU1 (IRQ_SHPI_START + 27) | ||
34 | #define IRQ_DB8500_ICN_PMU2 (IRQ_SHPI_START + 28) | ||
35 | #define IRQ_DB8500_HSIR_EXCEP (IRQ_SHPI_START + 29) | ||
36 | #define IRQ_DB8500_MSP0 (IRQ_SHPI_START + 31) | ||
37 | #define IRQ_DB8500_HSIR_CH0_OVRRUN (IRQ_SHPI_START + 32) | ||
38 | #define IRQ_DB8500_HSIR_CH1_OVRRUN (IRQ_SHPI_START + 33) | ||
39 | #define IRQ_DB8500_HSIR_CH2_OVRRUN (IRQ_SHPI_START + 34) | ||
40 | #define IRQ_DB8500_HSIR_CH3_OVRRUN (IRQ_SHPI_START + 35) | ||
41 | #define IRQ_DB8500_HSIR_CH4_OVRRUN (IRQ_SHPI_START + 36) | ||
42 | #define IRQ_DB8500_HSIR_CH5_OVRRUN (IRQ_SHPI_START + 37) | ||
43 | #define IRQ_DB8500_HSIR_CH6_OVRRUN (IRQ_SHPI_START + 38) | ||
44 | #define IRQ_DB8500_HSIR_CH7_OVRRUN (IRQ_SHPI_START + 39) | ||
45 | #define IRQ_DB8500_AB8500 (IRQ_SHPI_START + 40) | ||
46 | #define IRQ_DB8500_SDMMC2 (IRQ_SHPI_START + 41) | ||
47 | #define IRQ_DB8500_SIA (IRQ_SHPI_START + 42) | ||
48 | #define IRQ_DB8500_SIA2 (IRQ_SHPI_START + 43) | ||
49 | #define IRQ_DB8500_SVA (IRQ_SHPI_START + 44) | ||
50 | #define IRQ_DB8500_SVA2 (IRQ_SHPI_START + 45) | ||
51 | #define IRQ_DB8500_PRCMU0 (IRQ_SHPI_START + 46) | ||
52 | #define IRQ_DB8500_PRCMU1 (IRQ_SHPI_START + 47) | ||
53 | #define IRQ_DB8500_DISP (IRQ_SHPI_START + 48) | ||
54 | #define IRQ_DB8500_SPI3 (IRQ_SHPI_START + 49) | ||
55 | #define IRQ_DB8500_SDMMC1 (IRQ_SHPI_START + 50) | ||
56 | #define IRQ_DB8500_I2C4 (IRQ_SHPI_START + 51) | ||
57 | #define IRQ_DB8500_SSP1 (IRQ_SHPI_START + 52) | ||
58 | #define IRQ_DB8500_SKE (IRQ_SHPI_START + 53) | ||
59 | #define IRQ_DB8500_KB (IRQ_SHPI_START + 54) | ||
60 | #define IRQ_DB8500_I2C2 (IRQ_SHPI_START + 55) | ||
61 | #define IRQ_DB8500_B2R2 (IRQ_SHPI_START + 56) | ||
62 | #define IRQ_DB8500_CRYP0 (IRQ_SHPI_START + 57) | ||
63 | #define IRQ_DB8500_SDMMC3 (IRQ_SHPI_START + 59) | ||
64 | #define IRQ_DB8500_SDMMC0 (IRQ_SHPI_START + 60) | ||
65 | #define IRQ_DB8500_HSEM (IRQ_SHPI_START + 61) | ||
66 | #define IRQ_DB8500_MSP1 (IRQ_SHPI_START + 62) | ||
67 | #define IRQ_DB8500_SBAG (IRQ_SHPI_START + 63) | ||
68 | #define IRQ_DB8500_SPI1 (IRQ_SHPI_START + 96) | ||
69 | #define IRQ_DB8500_SRPTIMER (IRQ_SHPI_START + 97) | ||
70 | #define IRQ_DB8500_MSP2 (IRQ_SHPI_START + 98) | ||
71 | #define IRQ_DB8500_SDMMC4 (IRQ_SHPI_START + 99) | ||
72 | #define IRQ_DB8500_SDMMC5 (IRQ_SHPI_START + 100) | ||
73 | #define IRQ_DB8500_HSIRD0 (IRQ_SHPI_START + 104) | ||
74 | #define IRQ_DB8500_HSIRD1 (IRQ_SHPI_START + 105) | ||
75 | #define IRQ_DB8500_HSITD0 (IRQ_SHPI_START + 106) | ||
76 | #define IRQ_DB8500_HSITD1 (IRQ_SHPI_START + 107) | ||
77 | #define IRQ_DB8500_CTI0 (IRQ_SHPI_START + 108) | ||
78 | #define IRQ_DB8500_CTI1 (IRQ_SHPI_START + 109) | ||
79 | #define IRQ_DB8500_ICN_ERR (IRQ_SHPI_START + 110) | ||
80 | #define IRQ_DB8500_MALI_PPMMU (IRQ_SHPI_START + 112) | ||
81 | #define IRQ_DB8500_MALI_PP (IRQ_SHPI_START + 113) | ||
82 | #define IRQ_DB8500_MALI_GPMMU (IRQ_SHPI_START + 114) | ||
83 | #define IRQ_DB8500_MALI_GP (IRQ_SHPI_START + 115) | ||
84 | #define IRQ_DB8500_MALI (IRQ_SHPI_START + 116) | ||
85 | #define IRQ_DB8500_PRCMU_SEM (IRQ_SHPI_START + 118) | ||
86 | #define IRQ_DB8500_GPIO0 (IRQ_SHPI_START + 119) | ||
87 | #define IRQ_DB8500_GPIO1 (IRQ_SHPI_START + 120) | ||
88 | #define IRQ_DB8500_GPIO2 (IRQ_SHPI_START + 121) | ||
89 | #define IRQ_DB8500_GPIO3 (IRQ_SHPI_START + 122) | ||
90 | #define IRQ_DB8500_GPIO4 (IRQ_SHPI_START + 123) | ||
91 | #define IRQ_DB8500_GPIO5 (IRQ_SHPI_START + 124) | ||
92 | #define IRQ_DB8500_GPIO6 (IRQ_SHPI_START + 125) | ||
93 | #define IRQ_DB8500_GPIO7 (IRQ_SHPI_START + 126) | ||
94 | #define IRQ_DB8500_GPIO8 (IRQ_SHPI_START + 127) | ||
95 | |||
96 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/include/mach/irqs.h index 7970684b1d09..10385bdc2b77 100644 --- a/arch/arm/mach-ux500/include/mach/irqs.h +++ b/arch/arm/mach-ux500/include/mach/irqs.h | |||
@@ -10,7 +10,8 @@ | |||
10 | #ifndef ASM_ARCH_IRQS_H | 10 | #ifndef ASM_ARCH_IRQS_H |
11 | #define ASM_ARCH_IRQS_H | 11 | #define ASM_ARCH_IRQS_H |
12 | 12 | ||
13 | #include <mach/hardware.h> | 13 | #include <mach/irqs-db5500.h> |
14 | #include <mach/irqs-db8500.h> | ||
14 | 15 | ||
15 | #define IRQ_LOCALTIMER 29 | 16 | #define IRQ_LOCALTIMER 29 |
16 | #define IRQ_LOCALWDOG 30 | 17 | #define IRQ_LOCALWDOG 30 |
@@ -67,12 +68,21 @@ | |||
67 | /* There are 128 shared peripheral interrupts assigned to | 68 | /* There are 128 shared peripheral interrupts assigned to |
68 | * INTID[160:32]. The first 32 interrupts are reserved. | 69 | * INTID[160:32]. The first 32 interrupts are reserved. |
69 | */ | 70 | */ |
70 | #define U8500_SOC_NR_IRQS 161 | 71 | #define DBX500_NR_INTERNAL_IRQS 161 |
71 | 72 | ||
72 | /* After chip-specific IRQ numbers we have the GPIO ones */ | 73 | /* After chip-specific IRQ numbers we have the GPIO ones */ |
73 | #define NOMADIK_NR_GPIO 288 | 74 | #define NOMADIK_NR_GPIO 288 |
74 | #define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + U8500_SOC_NR_IRQS) | 75 | #define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + DBX500_NR_INTERNAL_IRQS) |
75 | #define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - U8500_SOC_NR_IRQS) | 76 | #define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - DBX500_NR_INTERNAL_IRQS) |
76 | #define NR_IRQS NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) | 77 | #define IRQ_BOARD_START NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) |
77 | 78 | ||
78 | #endif /*ASM_ARCH_IRQS_H*/ | 79 | /* This will be overridden by board-specific irq headers */ |
80 | #define IRQ_BOARD_END IRQ_BOARD_START | ||
81 | |||
82 | #ifdef CONFIG_MACH_U8500_MOP | ||
83 | #include <mach/irqs-board-mop500.h> | ||
84 | #endif | ||
85 | |||
86 | #define NR_IRQS IRQ_BOARD_END | ||
87 | |||
88 | #endif /* ASM_ARCH_IRQS_H */ | ||
diff --git a/arch/arm/mach-ux500/pins-db8500.h b/arch/arm/mach-ux500/pins-db8500.h new file mode 100644 index 000000000000..9055d5d3233c --- /dev/null +++ b/arch/arm/mach-ux500/pins-db8500.h | |||
@@ -0,0 +1,742 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License, version 2 | ||
5 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> | ||
6 | */ | ||
7 | |||
8 | #ifndef __MACH_PINS_DB8500_H | ||
9 | #define __MACH_PINS_DB8500_H | ||
10 | |||
11 | /* | ||
12 | * TODO: Eventually encode all non-board specific pull up/down configuration | ||
13 | * here. | ||
14 | */ | ||
15 | |||
16 | #define GPIO0_GPIO PIN_CFG(0, GPIO) | ||
17 | #define GPIO0_U0_CTSn PIN_CFG(0, ALT_A) | ||
18 | #define GPIO0_TRIG_OUT PIN_CFG(0, ALT_B) | ||
19 | #define GPIO0_IP_TDO PIN_CFG(0, ALT_C) | ||
20 | |||
21 | #define GPIO1_GPIO PIN_CFG(1, GPIO) | ||
22 | #define GPIO1_U0_RTSn PIN_CFG(1, ALT_A) | ||
23 | #define GPIO1_TRIG_IN PIN_CFG(1, ALT_B) | ||
24 | #define GPIO1_IP_TDI PIN_CFG(1, ALT_C) | ||
25 | |||
26 | #define GPIO2_GPIO PIN_CFG(2, GPIO) | ||
27 | #define GPIO2_U0_RXD PIN_CFG(2, ALT_A) | ||
28 | #define GPIO2_NONE PIN_CFG(2, ALT_B) | ||
29 | #define GPIO2_IP_TMS PIN_CFG(2, ALT_C) | ||
30 | |||
31 | #define GPIO3_GPIO PIN_CFG(3, GPIO) | ||
32 | #define GPIO3_U0_TXD PIN_CFG(3, ALT_A) | ||
33 | #define GPIO3_NONE PIN_CFG(3, ALT_B) | ||
34 | #define GPIO3_IP_TCK PIN_CFG(3, ALT_C) | ||
35 | |||
36 | #define GPIO4_GPIO PIN_CFG(4, GPIO) | ||
37 | #define GPIO4_U1_RXD PIN_CFG(4, ALT_A) | ||
38 | #define GPIO4_I2C4_SCL PIN_CFG_PULL(4, ALT_B, UP) | ||
39 | #define GPIO4_IP_TRSTn PIN_CFG(4, ALT_C) | ||
40 | |||
41 | #define GPIO5_GPIO PIN_CFG(5, GPIO) | ||
42 | #define GPIO5_U1_TXD PIN_CFG(5, ALT_A) | ||
43 | #define GPIO5_I2C4_SDA PIN_CFG_PULL(5, ALT_B, UP) | ||
44 | #define GPIO5_IP_GPIO6 PIN_CFG(5, ALT_C) | ||
45 | |||
46 | #define GPIO6_GPIO PIN_CFG(6, GPIO) | ||
47 | #define GPIO6_U1_CTSn PIN_CFG(6, ALT_A) | ||
48 | #define GPIO6_I2C1_SCL PIN_CFG_PULL(6, ALT_B, UP) | ||
49 | #define GPIO6_IP_GPIO0 PIN_CFG(6, ALT_C) | ||
50 | |||
51 | #define GPIO7_GPIO PIN_CFG(7, GPIO) | ||
52 | #define GPIO7_U1_RTSn PIN_CFG(7, ALT_A) | ||
53 | #define GPIO7_I2C1_SDA PIN_CFG_PULL(7, ALT_B, UP) | ||
54 | #define GPIO7_IP_GPIO1 PIN_CFG(7, ALT_C) | ||
55 | |||
56 | #define GPIO8_GPIO PIN_CFG(8, GPIO) | ||
57 | #define GPIO8_IPI2C_SDA PIN_CFG_PULL(8, ALT_A, UP) | ||
58 | #define GPIO8_I2C2_SDA PIN_CFG_PULL(8, ALT_B, UP) | ||
59 | |||
60 | #define GPIO9_GPIO PIN_CFG(9, GPIO) | ||
61 | #define GPIO9_IPI2C_SCL PIN_CFG_PULL(9, ALT_A, UP) | ||
62 | #define GPIO9_I2C2_SCL PIN_CFG_PULL(9, ALT_B, UP) | ||
63 | |||
64 | #define GPIO10_GPIO PIN_CFG(10, GPIO) | ||
65 | #define GPIO10_IPI2C_SDA PIN_CFG_PULL(10, ALT_A, UP) | ||
66 | #define GPIO10_I2C2_SDA PIN_CFG_PULL(10, ALT_B, UP) | ||
67 | #define GPIO10_IP_GPIO3 PIN_CFG(10, ALT_C) | ||
68 | |||
69 | #define GPIO11_GPIO PIN_CFG(11, GPIO) | ||
70 | #define GPIO11_IPI2C_SCL PIN_CFG_PULL(11, ALT_A, UP) | ||
71 | #define GPIO11_I2C2_SCL PIN_CFG_PULL(11, ALT_B, UP) | ||
72 | #define GPIO11_IP_GPIO2 PIN_CFG(11, ALT_C) | ||
73 | |||
74 | #define GPIO12_GPIO PIN_CFG(12, GPIO) | ||
75 | #define GPIO12_MSP0_TXD PIN_CFG(12, ALT_A) | ||
76 | #define GPIO12_MSP0_RXD PIN_CFG(12, ALT_B) | ||
77 | |||
78 | #define GPIO13_GPIO PIN_CFG(13, GPIO) | ||
79 | #define GPIO13_MSP0_TFS PIN_CFG(13, ALT_A) | ||
80 | |||
81 | #define GPIO14_GPIO PIN_CFG(14, GPIO) | ||
82 | #define GPIO14_MSP0_TCK PIN_CFG(14, ALT_A) | ||
83 | |||
84 | #define GPIO15_GPIO PIN_CFG(15, GPIO) | ||
85 | #define GPIO15_MSP0_RXD PIN_CFG(15, ALT_A) | ||
86 | #define GPIO15_MSP0_TXD PIN_CFG(15, ALT_B) | ||
87 | |||
88 | #define GPIO16_GPIO PIN_CFG(16, GPIO) | ||
89 | #define GPIO16_MSP0_RFS PIN_CFG(16, ALT_A) | ||
90 | #define GPIO16_I2C1_SCL PIN_CFG_PULL(16, ALT_B, UP) | ||
91 | #define GPIO16_SLIM0_DAT PIN_CFG(16, ALT_C) | ||
92 | |||
93 | #define GPIO17_GPIO PIN_CFG(17, GPIO) | ||
94 | #define GPIO17_MSP0_RCK PIN_CFG(17, ALT_A) | ||
95 | #define GPIO17_I2C1_SDA PIN_CFG_PULL(17, ALT_B, UP) | ||
96 | #define GPIO17_SLIM0_CLK PIN_CFG(17, ALT_C) | ||
97 | |||
98 | #define GPIO18_GPIO PIN_CFG(18, GPIO) | ||
99 | #define GPIO18_MC0_CMDDIR PIN_CFG(18, ALT_A) | ||
100 | #define GPIO18_U2_RXD PIN_CFG(18, ALT_B) | ||
101 | #define GPIO18_MS_IEP PIN_CFG(18, ALT_C) | ||
102 | |||
103 | #define GPIO19_GPIO PIN_CFG(19, GPIO) | ||
104 | #define GPIO19_MC0_DAT0DIR PIN_CFG(19, ALT_A) | ||
105 | #define GPIO19_U2_TXD PIN_CFG(19, ALT_B) | ||
106 | #define GPIO19_MS_DAT0DIR PIN_CFG(19, ALT_C) | ||
107 | |||
108 | #define GPIO20_GPIO PIN_CFG(20, GPIO) | ||
109 | #define GPIO20_MC0_DAT2DIR PIN_CFG(20, ALT_A) | ||
110 | #define GPIO20_UARTMOD_TXD PIN_CFG(20, ALT_B) | ||
111 | #define GPIO20_IP_TRIGOUT PIN_CFG(20, ALT_C) | ||
112 | |||
113 | #define GPIO21_GPIO PIN_CFG(21, GPIO) | ||
114 | #define GPIO21_MC0_DAT31DIR PIN_CFG(21, ALT_A) | ||
115 | #define GPIO21_MSP0_SCK PIN_CFG(21, ALT_B) | ||
116 | #define GPIO21_MS_DAT31DIR PIN_CFG(21, ALT_C) | ||
117 | |||
118 | #define GPIO22_GPIO PIN_CFG(22, GPIO) | ||
119 | #define GPIO22_MC0_FBCLK PIN_CFG(22, ALT_A) | ||
120 | #define GPIO22_UARTMOD_RXD PIN_CFG(22, ALT_B) | ||
121 | #define GPIO22_MS_FBCLK PIN_CFG(22, ALT_C) | ||
122 | |||
123 | #define GPIO23_GPIO PIN_CFG(23, GPIO) | ||
124 | #define GPIO23_MC0_CLK PIN_CFG(23, ALT_A) | ||
125 | #define GPIO23_STMMOD_CLK PIN_CFG(23, ALT_B) | ||
126 | #define GPIO23_MS_CLK PIN_CFG(23, ALT_C) | ||
127 | |||
128 | #define GPIO24_GPIO PIN_CFG(24, GPIO) | ||
129 | #define GPIO24_MC0_CMD PIN_CFG(24, ALT_A) | ||
130 | #define GPIO24_UARTMOD_RXD PIN_CFG(24, ALT_B) | ||
131 | #define GPIO24_MS_BS PIN_CFG(24, ALT_C) | ||
132 | |||
133 | #define GPIO25_GPIO PIN_CFG(25, GPIO) | ||
134 | #define GPIO25_MC0_DAT0 PIN_CFG(25, ALT_A) | ||
135 | #define GPIO25_STMMOD_DAT0 PIN_CFG(25, ALT_B) | ||
136 | #define GPIO25_MS_DAT0 PIN_CFG(25, ALT_C) | ||
137 | |||
138 | #define GPIO26_GPIO PIN_CFG(26, GPIO) | ||
139 | #define GPIO26_MC0_DAT1 PIN_CFG(26, ALT_A) | ||
140 | #define GPIO26_STMMOD_DAT1 PIN_CFG(26, ALT_B) | ||
141 | #define GPIO26_MS_DAT1 PIN_CFG(26, ALT_C) | ||
142 | |||
143 | #define GPIO27_GPIO PIN_CFG(27, GPIO) | ||
144 | #define GPIO27_MC0_DAT2 PIN_CFG(27, ALT_A) | ||
145 | #define GPIO27_STMMOD_DAT2 PIN_CFG(27, ALT_B) | ||
146 | #define GPIO27_MS_DAT2 PIN_CFG(27, ALT_C) | ||
147 | |||
148 | #define GPIO28_GPIO PIN_CFG(28, GPIO) | ||
149 | #define GPIO28_MC0_DAT3 PIN_CFG(28, ALT_A) | ||
150 | #define GPIO28_STMMOD_DAT3 PIN_CFG(28, ALT_B) | ||
151 | #define GPIO28_MS_DAT3 PIN_CFG(28, ALT_C) | ||
152 | |||
153 | #define GPIO29_GPIO PIN_CFG(29, GPIO) | ||
154 | #define GPIO29_MC0_DAT4 PIN_CFG(29, ALT_A) | ||
155 | #define GPIO29_SPI3_CLK PIN_CFG(29, ALT_B) | ||
156 | #define GPIO29_U2_RXD PIN_CFG(29, ALT_C) | ||
157 | |||
158 | #define GPIO30_GPIO PIN_CFG(30, GPIO) | ||
159 | #define GPIO30_MC0_DAT5 PIN_CFG(30, ALT_A) | ||
160 | #define GPIO30_SPI3_RXD PIN_CFG(30, ALT_B) | ||
161 | #define GPIO30_U2_TXD PIN_CFG(30, ALT_C) | ||
162 | |||
163 | #define GPIO31_GPIO PIN_CFG(31, GPIO) | ||
164 | #define GPIO31_MC0_DAT6 PIN_CFG(31, ALT_A) | ||
165 | #define GPIO31_SPI3_FRM PIN_CFG(31, ALT_B) | ||
166 | #define GPIO31_U2_CTSn PIN_CFG(31, ALT_C) | ||
167 | |||
168 | #define GPIO32_GPIO PIN_CFG(32, GPIO) | ||
169 | #define GPIO32_MC0_DAT7 PIN_CFG(32, ALT_A) | ||
170 | #define GPIO32_SPI3_TXD PIN_CFG(32, ALT_B) | ||
171 | #define GPIO32_U2_RTSn PIN_CFG(32, ALT_C) | ||
172 | |||
173 | #define GPIO33_GPIO PIN_CFG(33, GPIO) | ||
174 | #define GPIO33_MSP1_TXD PIN_CFG(33, ALT_A) | ||
175 | #define GPIO33_MSP1_RXD PIN_CFG(33, ALT_B) | ||
176 | #define GPIO33_U0_DTRn PIN_CFG(33, ALT_C) | ||
177 | |||
178 | #define GPIO34_GPIO PIN_CFG(34, GPIO) | ||
179 | #define GPIO34_MSP1_TFS PIN_CFG(34, ALT_A) | ||
180 | #define GPIO34_NONE PIN_CFG(34, ALT_B) | ||
181 | #define GPIO34_U0_DCDn PIN_CFG(34, ALT_C) | ||
182 | |||
183 | #define GPIO35_GPIO PIN_CFG(35, GPIO) | ||
184 | #define GPIO35_MSP1_TCK PIN_CFG(35, ALT_A) | ||
185 | #define GPIO35_NONE PIN_CFG(35, ALT_B) | ||
186 | #define GPIO35_U0_DSRn PIN_CFG(35, ALT_C) | ||
187 | |||
188 | #define GPIO36_GPIO PIN_CFG(36, GPIO) | ||
189 | #define GPIO36_MSP1_RXD PIN_CFG(36, ALT_A) | ||
190 | #define GPIO36_MSP1_TXD PIN_CFG(36, ALT_B) | ||
191 | #define GPIO36_U0_RIn PIN_CFG(36, ALT_C) | ||
192 | |||
193 | #define GPIO64_GPIO PIN_CFG(64, GPIO) | ||
194 | #define GPIO64_LCDB_DE PIN_CFG(64, ALT_A) | ||
195 | #define GPIO64_KP_O1 PIN_CFG(64, ALT_B) | ||
196 | #define GPIO64_IP_GPIO4 PIN_CFG(64, ALT_C) | ||
197 | |||
198 | #define GPIO65_GPIO PIN_CFG(65, GPIO) | ||
199 | #define GPIO65_LCDB_HSO PIN_CFG(65, ALT_A) | ||
200 | #define GPIO65_KP_O0 PIN_CFG(65, ALT_B) | ||
201 | #define GPIO65_IP_GPIO5 PIN_CFG(65, ALT_C) | ||
202 | |||
203 | #define GPIO66_GPIO PIN_CFG(66, GPIO) | ||
204 | #define GPIO66_LCDB_VSO PIN_CFG(66, ALT_A) | ||
205 | #define GPIO66_KP_I1 PIN_CFG(66, ALT_B) | ||
206 | #define GPIO66_IP_GPIO6 PIN_CFG(66, ALT_C) | ||
207 | |||
208 | #define GPIO67_GPIO PIN_CFG(67, GPIO) | ||
209 | #define GPIO67_LCDB_CLK PIN_CFG(67, ALT_A) | ||
210 | #define GPIO67_KP_I0 PIN_CFG(67, ALT_B) | ||
211 | #define GPIO67_IP_GPIO7 PIN_CFG(67, ALT_C) | ||
212 | |||
213 | #define GPIO68_GPIO PIN_CFG(68, GPIO) | ||
214 | #define GPIO68_LCD_VSI0 PIN_CFG(68, ALT_A) | ||
215 | #define GPIO68_KP_O7 PIN_CFG(68, ALT_B) | ||
216 | #define GPIO68_SM_CLE PIN_CFG(68, ALT_C) | ||
217 | |||
218 | #define GPIO69_GPIO PIN_CFG(69, GPIO) | ||
219 | #define GPIO69_LCD_VSI1 PIN_CFG(69, ALT_A) | ||
220 | #define GPIO69_KP_I7 PIN_CFG(69, ALT_B) | ||
221 | #define GPIO69_SM_ALE PIN_CFG(69, ALT_C) | ||
222 | |||
223 | #define GPIO70_GPIO PIN_CFG(70, GPIO) | ||
224 | #define GPIO70_LCD_D0 PIN_CFG(70, ALT_A) | ||
225 | #define GPIO70_KP_O5 PIN_CFG(70, ALT_B) | ||
226 | #define GPIO70_STMAPE_CLK PIN_CFG(70, ALT_C) | ||
227 | |||
228 | #define GPIO71_GPIO PIN_CFG(71, GPIO) | ||
229 | #define GPIO71_LCD_D1 PIN_CFG(71, ALT_A) | ||
230 | #define GPIO71_KP_O4 PIN_CFG(71, ALT_B) | ||
231 | #define GPIO71_STMAPE_DAT3 PIN_CFG(71, ALT_C) | ||
232 | |||
233 | #define GPIO72_GPIO PIN_CFG(72, GPIO) | ||
234 | #define GPIO72_LCD_D2 PIN_CFG(72, ALT_A) | ||
235 | #define GPIO72_KP_O3 PIN_CFG(72, ALT_B) | ||
236 | #define GPIO72_STMAPE_DAT2 PIN_CFG(72, ALT_C) | ||
237 | |||
238 | #define GPIO73_GPIO PIN_CFG(73, GPIO) | ||
239 | #define GPIO73_LCD_D3 PIN_CFG(73, ALT_A) | ||
240 | #define GPIO73_KP_O2 PIN_CFG(73, ALT_B) | ||
241 | #define GPIO73_STMAPE_DAT1 PIN_CFG(73, ALT_C) | ||
242 | |||
243 | #define GPIO74_GPIO PIN_CFG(74, GPIO) | ||
244 | #define GPIO74_LCD_D4 PIN_CFG(74, ALT_A) | ||
245 | #define GPIO74_KP_I5 PIN_CFG(74, ALT_B) | ||
246 | #define GPIO74_STMAPE_DAT0 PIN_CFG(74, ALT_C) | ||
247 | |||
248 | #define GPIO75_GPIO PIN_CFG(75, GPIO) | ||
249 | #define GPIO75_LCD_D5 PIN_CFG(75, ALT_A) | ||
250 | #define GPIO75_KP_I4 PIN_CFG(75, ALT_B) | ||
251 | #define GPIO75_U2_RXD PIN_CFG(75, ALT_C) | ||
252 | |||
253 | #define GPIO76_GPIO PIN_CFG(76, GPIO) | ||
254 | #define GPIO76_LCD_D6 PIN_CFG(76, ALT_A) | ||
255 | #define GPIO76_KP_I3 PIN_CFG(76, ALT_B) | ||
256 | #define GPIO76_U2_TXD PIN_CFG(76, ALT_C) | ||
257 | |||
258 | #define GPIO77_GPIO PIN_CFG(77, GPIO) | ||
259 | #define GPIO77_LCD_D7 PIN_CFG(77, ALT_A) | ||
260 | #define GPIO77_KP_I2 PIN_CFG(77, ALT_B) | ||
261 | #define GPIO77_NONE PIN_CFG(77, ALT_C) | ||
262 | |||
263 | #define GPIO78_GPIO PIN_CFG(78, GPIO) | ||
264 | #define GPIO78_LCD_D8 PIN_CFG(78, ALT_A) | ||
265 | #define GPIO78_KP_O6 PIN_CFG(78, ALT_B) | ||
266 | #define GPIO78_IP_GPIO2 PIN_CFG(78, ALT_C) | ||
267 | |||
268 | #define GPIO79_GPIO PIN_CFG(79, GPIO) | ||
269 | #define GPIO79_LCD_D9 PIN_CFG(79, ALT_A) | ||
270 | #define GPIO79_KP_I6 PIN_CFG(79, ALT_B) | ||
271 | #define GPIO79_IP_GPIO3 PIN_CFG(79, ALT_C) | ||
272 | |||
273 | #define GPIO80_GPIO PIN_CFG(80, GPIO) | ||
274 | #define GPIO80_LCD_D10 PIN_CFG(80, ALT_A) | ||
275 | #define GPIO80_KP_SKA0 PIN_CFG(80, ALT_B) | ||
276 | #define GPIO80_IP_GPIO4 PIN_CFG(80, ALT_C) | ||
277 | |||
278 | #define GPIO81_GPIO PIN_CFG(81, GPIO) | ||
279 | #define GPIO81_LCD_D11 PIN_CFG(81, ALT_A) | ||
280 | #define GPIO81_KP_SKB0 PIN_CFG(81, ALT_B) | ||
281 | #define GPIO81_IP_GPIO5 PIN_CFG(81, ALT_C) | ||
282 | |||
283 | #define GPIO82_GPIO PIN_CFG(82, GPIO) | ||
284 | #define GPIO82_LCD_D12 PIN_CFG(82, ALT_A) | ||
285 | #define GPIO82_KP_O5 PIN_CFG(82, ALT_B) | ||
286 | |||
287 | #define GPIO83_GPIO PIN_CFG(83, GPIO) | ||
288 | #define GPIO83_LCD_D13 PIN_CFG(83, ALT_A) | ||
289 | #define GPIO83_KP_O4 PIN_CFG(83, ALT_B) | ||
290 | |||
291 | #define GPIO84_GPIO PIN_CFG(84, GPIO) | ||
292 | #define GPIO84_LCD_D14 PIN_CFG(84, ALT_A) | ||
293 | #define GPIO84_KP_I5 PIN_CFG(84, ALT_B) | ||
294 | |||
295 | #define GPIO85_GPIO PIN_CFG(85, GPIO) | ||
296 | #define GPIO85_LCD_D15 PIN_CFG(85, ALT_A) | ||
297 | #define GPIO85_KP_I4 PIN_CFG(85, ALT_B) | ||
298 | |||
299 | #define GPIO86_GPIO PIN_CFG(86, GPIO) | ||
300 | #define GPIO86_LCD_D16 PIN_CFG(86, ALT_A) | ||
301 | #define GPIO86_SM_ADQ0 PIN_CFG(86, ALT_B) | ||
302 | #define GPIO86_MC5_DAT0 PIN_CFG(86, ALT_C) | ||
303 | |||
304 | #define GPIO87_GPIO PIN_CFG(87, GPIO) | ||
305 | #define GPIO87_LCD_D17 PIN_CFG(87, ALT_A) | ||
306 | #define GPIO87_SM_ADQ1 PIN_CFG(87, ALT_B) | ||
307 | #define GPIO87_MC5_DAT1 PIN_CFG(87, ALT_C) | ||
308 | |||
309 | #define GPIO88_GPIO PIN_CFG(88, GPIO) | ||
310 | #define GPIO88_LCD_D18 PIN_CFG(88, ALT_A) | ||
311 | #define GPIO88_SM_ADQ2 PIN_CFG(88, ALT_B) | ||
312 | #define GPIO88_MC5_DAT2 PIN_CFG(88, ALT_C) | ||
313 | |||
314 | #define GPIO89_GPIO PIN_CFG(89, GPIO) | ||
315 | #define GPIO89_LCD_D19 PIN_CFG(89, ALT_A) | ||
316 | #define GPIO89_SM_ADQ3 PIN_CFG(89, ALT_B) | ||
317 | #define GPIO89_MC5_DAT3 PIN_CFG(89, ALT_C) | ||
318 | |||
319 | #define GPIO90_GPIO PIN_CFG(90, GPIO) | ||
320 | #define GPIO90_LCD_D20 PIN_CFG(90, ALT_A) | ||
321 | #define GPIO90_SM_ADQ4 PIN_CFG(90, ALT_B) | ||
322 | #define GPIO90_MC5_CMD PIN_CFG(90, ALT_C) | ||
323 | |||
324 | #define GPIO91_GPIO PIN_CFG(91, GPIO) | ||
325 | #define GPIO91_LCD_D21 PIN_CFG(91, ALT_A) | ||
326 | #define GPIO91_SM_ADQ5 PIN_CFG(91, ALT_B) | ||
327 | #define GPIO91_MC5_FBCLK PIN_CFG(91, ALT_C) | ||
328 | |||
329 | #define GPIO92_GPIO PIN_CFG(92, GPIO) | ||
330 | #define GPIO92_LCD_D22 PIN_CFG(92, ALT_A) | ||
331 | #define GPIO92_SM_ADQ6 PIN_CFG(92, ALT_B) | ||
332 | #define GPIO92_MC5_CLK PIN_CFG(92, ALT_C) | ||
333 | |||
334 | #define GPIO93_GPIO PIN_CFG(93, GPIO) | ||
335 | #define GPIO93_LCD_D23 PIN_CFG(93, ALT_A) | ||
336 | #define GPIO93_SM_ADQ7 PIN_CFG(93, ALT_B) | ||
337 | #define GPIO93_MC5_DAT4 PIN_CFG(93, ALT_C) | ||
338 | |||
339 | #define GPIO94_GPIO PIN_CFG(94, GPIO) | ||
340 | #define GPIO94_KP_O7 PIN_CFG(94, ALT_A) | ||
341 | #define GPIO94_SM_ADVn PIN_CFG(94, ALT_B) | ||
342 | #define GPIO94_MC5_DAT5 PIN_CFG(94, ALT_C) | ||
343 | |||
344 | #define GPIO95_GPIO PIN_CFG(95, GPIO) | ||
345 | #define GPIO95_KP_I7 PIN_CFG(95, ALT_A) | ||
346 | #define GPIO95_SM_CS0n PIN_CFG(95, ALT_B) | ||
347 | #define GPIO95_SM_PS0n PIN_CFG(95, ALT_C) | ||
348 | |||
349 | #define GPIO96_GPIO PIN_CFG(96, GPIO) | ||
350 | #define GPIO96_KP_O6 PIN_CFG(96, ALT_A) | ||
351 | #define GPIO96_SM_OEn PIN_CFG(96, ALT_B) | ||
352 | #define GPIO96_MC5_DAT6 PIN_CFG(96, ALT_C) | ||
353 | |||
354 | #define GPIO97_GPIO PIN_CFG(97, GPIO) | ||
355 | #define GPIO97_KP_I6 PIN_CFG(97, ALT_A) | ||
356 | #define GPIO97_SM_WEn PIN_CFG(97, ALT_B) | ||
357 | #define GPIO97_MC5_DAT7 PIN_CFG(97, ALT_C) | ||
358 | |||
359 | #define GPIO128_GPIO PIN_CFG(128, GPIO) | ||
360 | #define GPIO128_MC2_CLK PIN_CFG(128, ALT_A) | ||
361 | #define GPIO128_SM_CKO PIN_CFG(128, ALT_B) | ||
362 | |||
363 | #define GPIO129_GPIO PIN_CFG(129, GPIO) | ||
364 | #define GPIO129_MC2_CMD PIN_CFG(129, ALT_A) | ||
365 | #define GPIO129_SM_WAIT0n PIN_CFG(129, ALT_B) | ||
366 | |||
367 | #define GPIO130_GPIO PIN_CFG(130, GPIO) | ||
368 | #define GPIO130_MC2_FBCLK PIN_CFG(130, ALT_A) | ||
369 | #define GPIO130_SM_FBCLK PIN_CFG(130, ALT_B) | ||
370 | #define GPIO130_MC2_RSTN PIN_CFG(130, ALT_C) | ||
371 | |||
372 | #define GPIO131_GPIO PIN_CFG(131, GPIO) | ||
373 | #define GPIO131_MC2_DAT0 PIN_CFG(131, ALT_A) | ||
374 | #define GPIO131_SM_ADQ8 PIN_CFG(131, ALT_B) | ||
375 | |||
376 | #define GPIO132_GPIO PIN_CFG(132, GPIO) | ||
377 | #define GPIO132_MC2_DAT1 PIN_CFG(132, ALT_A) | ||
378 | #define GPIO132_SM_ADQ9 PIN_CFG(132, ALT_B) | ||
379 | |||
380 | #define GPIO133_GPIO PIN_CFG(133, GPIO) | ||
381 | #define GPIO133_MC2_DAT2 PIN_CFG(133, ALT_A) | ||
382 | #define GPIO133_SM_ADQ10 PIN_CFG(133, ALT_B) | ||
383 | |||
384 | #define GPIO134_GPIO PIN_CFG(134, GPIO) | ||
385 | #define GPIO134_MC2_DAT3 PIN_CFG(134, ALT_A) | ||
386 | #define GPIO134_SM_ADQ11 PIN_CFG(134, ALT_B) | ||
387 | |||
388 | #define GPIO135_GPIO PIN_CFG(135, GPIO) | ||
389 | #define GPIO135_MC2_DAT4 PIN_CFG(135, ALT_A) | ||
390 | #define GPIO135_SM_ADQ12 PIN_CFG(135, ALT_B) | ||
391 | |||
392 | #define GPIO136_GPIO PIN_CFG(136, GPIO) | ||
393 | #define GPIO136_MC2_DAT5 PIN_CFG(136, ALT_A) | ||
394 | #define GPIO136_SM_ADQ13 PIN_CFG(136, ALT_B) | ||
395 | |||
396 | #define GPIO137_GPIO PIN_CFG(137, GPIO) | ||
397 | #define GPIO137_MC2_DAT6 PIN_CFG(137, ALT_A) | ||
398 | #define GPIO137_SM_ADQ14 PIN_CFG(137, ALT_B) | ||
399 | |||
400 | #define GPIO138_GPIO PIN_CFG(138, GPIO) | ||
401 | #define GPIO138_MC2_DAT7 PIN_CFG(138, ALT_A) | ||
402 | #define GPIO138_SM_ADQ15 PIN_CFG(138, ALT_B) | ||
403 | |||
404 | #define GPIO139_GPIO PIN_CFG(139, GPIO) | ||
405 | #define GPIO139_SSP1_RXD PIN_CFG(139, ALT_A) | ||
406 | #define GPIO139_SM_WAIT1n PIN_CFG(139, ALT_B) | ||
407 | #define GPIO139_KP_O8 PIN_CFG(139, ALT_C) | ||
408 | |||
409 | #define GPIO140_GPIO PIN_CFG(140, GPIO) | ||
410 | #define GPIO140_SSP1_TXD PIN_CFG(140, ALT_A) | ||
411 | #define GPIO140_IP_GPIO7 PIN_CFG(140, ALT_B) | ||
412 | #define GPIO140_KP_SKA1 PIN_CFG(140, ALT_C) | ||
413 | |||
414 | #define GPIO141_GPIO PIN_CFG(141, GPIO) | ||
415 | #define GPIO141_SSP1_CLK PIN_CFG(141, ALT_A) | ||
416 | #define GPIO141_IP_GPIO2 PIN_CFG(141, ALT_B) | ||
417 | #define GPIO141_KP_O9 PIN_CFG(141, ALT_C) | ||
418 | |||
419 | #define GPIO142_GPIO PIN_CFG(142, GPIO) | ||
420 | #define GPIO142_SSP1_FRM PIN_CFG(142, ALT_A) | ||
421 | #define GPIO142_IP_GPIO3 PIN_CFG(142, ALT_B) | ||
422 | #define GPIO142_KP_SKB1 PIN_CFG(142, ALT_C) | ||
423 | |||
424 | #define GPIO143_GPIO PIN_CFG(143, GPIO) | ||
425 | #define GPIO143_SSP0_CLK PIN_CFG(143, ALT_A) | ||
426 | |||
427 | #define GPIO144_GPIO PIN_CFG(144, GPIO) | ||
428 | #define GPIO144_SSP0_FRM PIN_CFG(144, ALT_A) | ||
429 | |||
430 | #define GPIO145_GPIO PIN_CFG(145, GPIO) | ||
431 | #define GPIO145_SSP0_RXD PIN_CFG(145, ALT_A) | ||
432 | |||
433 | #define GPIO146_GPIO PIN_CFG(146, GPIO) | ||
434 | #define GPIO146_SSP0_TXD PIN_CFG(146, ALT_A) | ||
435 | |||
436 | #define GPIO147_GPIO PIN_CFG(147, GPIO) | ||
437 | #define GPIO147_I2C0_SCL PIN_CFG_PULL(147, ALT_A, UP) | ||
438 | |||
439 | #define GPIO148_GPIO PIN_CFG(148, GPIO) | ||
440 | #define GPIO148_I2C0_SDA PIN_CFG_PULL(148, ALT_A, UP) | ||
441 | |||
442 | #define GPIO149_GPIO PIN_CFG(149, GPIO) | ||
443 | #define GPIO149_IP_GPIO0 PIN_CFG(149, ALT_A) | ||
444 | #define GPIO149_SM_CS1n PIN_CFG(149, ALT_B) | ||
445 | #define GPIO149_SM_PS1n PIN_CFG(149, ALT_C) | ||
446 | |||
447 | #define GPIO150_GPIO PIN_CFG(150, GPIO) | ||
448 | #define GPIO150_IP_GPIO1 PIN_CFG(150, ALT_A) | ||
449 | #define GPIO150_LCDA_CLK PIN_CFG(150, ALT_B) | ||
450 | |||
451 | #define GPIO151_GPIO PIN_CFG(151, GPIO) | ||
452 | #define GPIO151_KP_SKA0 PIN_CFG(151, ALT_A) | ||
453 | #define GPIO151_LCD_VSI0 PIN_CFG(151, ALT_B) | ||
454 | #define GPIO151_KP_O8 PIN_CFG(151, ALT_C) | ||
455 | |||
456 | #define GPIO152_GPIO PIN_CFG(152, GPIO) | ||
457 | #define GPIO152_KP_SKB0 PIN_CFG(152, ALT_A) | ||
458 | #define GPIO152_LCD_VSI1 PIN_CFG(152, ALT_B) | ||
459 | #define GPIO152_KP_O9 PIN_CFG(152, ALT_C) | ||
460 | |||
461 | #define GPIO153_GPIO PIN_CFG(153, GPIO) | ||
462 | #define GPIO153_KP_I7 PIN_CFG(153, ALT_A) | ||
463 | #define GPIO153_LCD_D24 PIN_CFG(153, ALT_B) | ||
464 | #define GPIO153_U2_RXD PIN_CFG(153, ALT_C) | ||
465 | |||
466 | #define GPIO154_GPIO PIN_CFG(154, GPIO) | ||
467 | #define GPIO154_KP_I6 PIN_CFG(154, ALT_A) | ||
468 | #define GPIO154_LCD_D25 PIN_CFG(154, ALT_B) | ||
469 | #define GPIO154_U2_TXD PIN_CFG(154, ALT_C) | ||
470 | |||
471 | #define GPIO155_GPIO PIN_CFG(155, GPIO) | ||
472 | #define GPIO155_KP_I5 PIN_CFG(155, ALT_A) | ||
473 | #define GPIO155_LCD_D26 PIN_CFG(155, ALT_B) | ||
474 | #define GPIO155_STMAPE_CLK PIN_CFG(155, ALT_C) | ||
475 | |||
476 | #define GPIO156_GPIO PIN_CFG(156, GPIO) | ||
477 | #define GPIO156_KP_I4 PIN_CFG(156, ALT_A) | ||
478 | #define GPIO156_LCD_D27 PIN_CFG(156, ALT_B) | ||
479 | #define GPIO156_STMAPE_DAT3 PIN_CFG(156, ALT_C) | ||
480 | |||
481 | #define GPIO157_GPIO PIN_CFG(157, GPIO) | ||
482 | #define GPIO157_KP_O7 PIN_CFG(157, ALT_A) | ||
483 | #define GPIO157_LCD_D28 PIN_CFG(157, ALT_B) | ||
484 | #define GPIO157_STMAPE_DAT2 PIN_CFG(157, ALT_C) | ||
485 | |||
486 | #define GPIO158_GPIO PIN_CFG(158, GPIO) | ||
487 | #define GPIO158_KP_O6 PIN_CFG(158, ALT_A) | ||
488 | #define GPIO158_LCD_D29 PIN_CFG(158, ALT_B) | ||
489 | #define GPIO158_STMAPE_DAT1 PIN_CFG(158, ALT_C) | ||
490 | |||
491 | #define GPIO159_GPIO PIN_CFG(159, GPIO) | ||
492 | #define GPIO159_KP_O5 PIN_CFG(159, ALT_A) | ||
493 | #define GPIO159_LCD_D30 PIN_CFG(159, ALT_B) | ||
494 | #define GPIO159_STMAPE_DAT0 PIN_CFG(159, ALT_C) | ||
495 | |||
496 | #define GPIO160_GPIO PIN_CFG(160, GPIO) | ||
497 | #define GPIO160_KP_O4 PIN_CFG(160, ALT_A) | ||
498 | #define GPIO160_LCD_D31 PIN_CFG(160, ALT_B) | ||
499 | #define GPIO160_NONE PIN_CFG(160, ALT_C) | ||
500 | |||
501 | #define GPIO161_GPIO PIN_CFG(161, GPIO) | ||
502 | #define GPIO161_KP_I3 PIN_CFG(161, ALT_A) | ||
503 | #define GPIO161_LCD_D32 PIN_CFG(161, ALT_B) | ||
504 | #define GPIO161_UARTMOD_RXD PIN_CFG(161, ALT_C) | ||
505 | |||
506 | #define GPIO162_GPIO PIN_CFG(162, GPIO) | ||
507 | #define GPIO162_KP_I2 PIN_CFG(162, ALT_A) | ||
508 | #define GPIO162_LCD_D33 PIN_CFG(162, ALT_B) | ||
509 | #define GPIO162_UARTMOD_TXD PIN_CFG(162, ALT_C) | ||
510 | |||
511 | #define GPIO163_GPIO PIN_CFG(163, GPIO) | ||
512 | #define GPIO163_KP_I1 PIN_CFG(163, ALT_A) | ||
513 | #define GPIO163_LCD_D34 PIN_CFG(163, ALT_B) | ||
514 | #define GPIO163_STMMOD_CLK PIN_CFG(163, ALT_C) | ||
515 | |||
516 | #define GPIO164_GPIO PIN_CFG(164, GPIO) | ||
517 | #define GPIO164_KP_I0 PIN_CFG(164, ALT_A) | ||
518 | #define GPIO164_LCD_D35 PIN_CFG(164, ALT_B) | ||
519 | #define GPIO164_STMMOD_DAT3 PIN_CFG(164, ALT_C) | ||
520 | |||
521 | #define GPIO165_GPIO PIN_CFG(165, GPIO) | ||
522 | #define GPIO165_KP_O3 PIN_CFG(165, ALT_A) | ||
523 | #define GPIO165_LCD_D36 PIN_CFG(165, ALT_B) | ||
524 | #define GPIO165_STMMOD_DAT2 PIN_CFG(165, ALT_C) | ||
525 | |||
526 | #define GPIO166_GPIO PIN_CFG(166, GPIO) | ||
527 | #define GPIO166_KP_O2 PIN_CFG(166, ALT_A) | ||
528 | #define GPIO166_LCD_D37 PIN_CFG(166, ALT_B) | ||
529 | #define GPIO166_STMMOD_DAT1 PIN_CFG(166, ALT_C) | ||
530 | |||
531 | #define GPIO167_GPIO PIN_CFG(167, GPIO) | ||
532 | #define GPIO167_KP_O1 PIN_CFG(167, ALT_A) | ||
533 | #define GPIO167_LCD_D38 PIN_CFG(167, ALT_B) | ||
534 | #define GPIO167_STMMOD_DAT0 PIN_CFG(167, ALT_C) | ||
535 | |||
536 | #define GPIO168_GPIO PIN_CFG(168, GPIO) | ||
537 | #define GPIO168_KP_O0 PIN_CFG(168, ALT_A) | ||
538 | #define GPIO168_LCD_D39 PIN_CFG(168, ALT_B) | ||
539 | #define GPIO168_NONE PIN_CFG(168, ALT_C) | ||
540 | |||
541 | #define GPIO169_GPIO PIN_CFG(169, GPIO) | ||
542 | #define GPIO169_RF_PURn PIN_CFG(169, ALT_A) | ||
543 | #define GPIO169_LCDA_DE PIN_CFG(169, ALT_B) | ||
544 | #define GPIO169_USBSIM_PDC PIN_CFG(169, ALT_C) | ||
545 | |||
546 | #define GPIO170_GPIO PIN_CFG(170, GPIO) | ||
547 | #define GPIO170_MODEM_STATE PIN_CFG(170, ALT_A) | ||
548 | #define GPIO170_LCDA_VSO PIN_CFG(170, ALT_B) | ||
549 | #define GPIO170_KP_SKA1 PIN_CFG(170, ALT_C) | ||
550 | |||
551 | #define GPIO171_GPIO PIN_CFG(171, GPIO) | ||
552 | #define GPIO171_MODEM_PWREN PIN_CFG(171, ALT_A) | ||
553 | #define GPIO171_LCDA_HSO PIN_CFG(171, ALT_B) | ||
554 | #define GPIO171_KP_SKB1 PIN_CFG(171, ALT_C) | ||
555 | |||
556 | #define GPIO192_GPIO PIN_CFG(192, GPIO) | ||
557 | #define GPIO192_MSP2_SCK PIN_CFG(192, ALT_A) | ||
558 | |||
559 | #define GPIO193_GPIO PIN_CFG(193, GPIO) | ||
560 | #define GPIO193_MSP2_TXD PIN_CFG(193, ALT_A) | ||
561 | |||
562 | #define GPIO194_GPIO PIN_CFG(194, GPIO) | ||
563 | #define GPIO194_MSP2_TCK PIN_CFG(194, ALT_A) | ||
564 | |||
565 | #define GPIO195_GPIO PIN_CFG(195, GPIO) | ||
566 | #define GPIO195_MSP2_TFS PIN_CFG(195, ALT_A) | ||
567 | |||
568 | #define GPIO196_GPIO PIN_CFG(196, GPIO) | ||
569 | #define GPIO196_MSP2_RXD PIN_CFG(196, ALT_A) | ||
570 | |||
571 | #define GPIO197_GPIO PIN_CFG(197, GPIO) | ||
572 | #define GPIO197_MC4_DAT3 PIN_CFG(197, ALT_A) | ||
573 | |||
574 | #define GPIO198_GPIO PIN_CFG(198, GPIO) | ||
575 | #define GPIO198_MC4_DAT2 PIN_CFG(198, ALT_A) | ||
576 | |||
577 | #define GPIO199_GPIO PIN_CFG(199, GPIO) | ||
578 | #define GPIO199_MC4_DAT1 PIN_CFG(199, ALT_A) | ||
579 | |||
580 | #define GPIO200_GPIO PIN_CFG(200, GPIO) | ||
581 | #define GPIO200_MC4_DAT0 PIN_CFG(200, ALT_A) | ||
582 | |||
583 | #define GPIO201_GPIO PIN_CFG(201, GPIO) | ||
584 | #define GPIO201_MC4_CMD PIN_CFG(201, ALT_A) | ||
585 | |||
586 | #define GPIO202_GPIO PIN_CFG(202, GPIO) | ||
587 | #define GPIO202_MC4_FBCLK PIN_CFG(202, ALT_A) | ||
588 | #define GPIO202_PWL PIN_CFG(202, ALT_B) | ||
589 | #define GPIO202_MC4_RSTN PIN_CFG(202, ALT_C) | ||
590 | |||
591 | #define GPIO203_GPIO PIN_CFG(203, GPIO) | ||
592 | #define GPIO203_MC4_CLK PIN_CFG(203, ALT_A) | ||
593 | |||
594 | #define GPIO204_GPIO PIN_CFG(204, GPIO) | ||
595 | #define GPIO204_MC4_DAT7 PIN_CFG(204, ALT_A) | ||
596 | |||
597 | #define GPIO205_GPIO PIN_CFG(205, GPIO) | ||
598 | #define GPIO205_MC4_DAT6 PIN_CFG(205, ALT_A) | ||
599 | |||
600 | #define GPIO206_GPIO PIN_CFG(206, GPIO) | ||
601 | #define GPIO206_MC4_DAT5 PIN_CFG(206, ALT_A) | ||
602 | |||
603 | #define GPIO207_GPIO PIN_CFG(207, GPIO) | ||
604 | #define GPIO207_MC4_DAT4 PIN_CFG(207, ALT_A) | ||
605 | |||
606 | #define GPIO208_GPIO PIN_CFG(208, GPIO) | ||
607 | #define GPIO208_MC1_CLK PIN_CFG(208, ALT_A) | ||
608 | |||
609 | #define GPIO209_GPIO PIN_CFG(209, GPIO) | ||
610 | #define GPIO209_MC1_FBCLK PIN_CFG(209, ALT_A) | ||
611 | #define GPIO209_SPI1_CLK PIN_CFG(209, ALT_B) | ||
612 | |||
613 | #define GPIO210_GPIO PIN_CFG(210, GPIO) | ||
614 | #define GPIO210_MC1_CMD PIN_CFG(210, ALT_A) | ||
615 | |||
616 | #define GPIO211_GPIO PIN_CFG(211, GPIO) | ||
617 | #define GPIO211_MC1_DAT0 PIN_CFG(211, ALT_A) | ||
618 | |||
619 | #define GPIO212_GPIO PIN_CFG(212, GPIO) | ||
620 | #define GPIO212_MC1_DAT1 PIN_CFG(212, ALT_A) | ||
621 | #define GPIO212_SPI1_FRM PIN_CFG(212, ALT_B) | ||
622 | |||
623 | #define GPIO213_GPIO PIN_CFG(213, GPIO) | ||
624 | #define GPIO213_MC1_DAT2 PIN_CFG(213, ALT_A) | ||
625 | #define GPIO213_SPI1_TXD PIN_CFG(213, ALT_B) | ||
626 | |||
627 | #define GPIO214_GPIO PIN_CFG(214, GPIO) | ||
628 | #define GPIO214_MC1_DAT3 PIN_CFG(214, ALT_A) | ||
629 | #define GPIO214_SPI1_RXD PIN_CFG(214, ALT_B) | ||
630 | |||
631 | #define GPIO215_GPIO PIN_CFG(215, GPIO) | ||
632 | #define GPIO215_MC1_CMDDIR PIN_CFG(215, ALT_A) | ||
633 | #define GPIO215_MC3_DAT2DIR PIN_CFG(215, ALT_B) | ||
634 | #define GPIO215_CLKOUT1 PIN_CFG(215, ALT_C) | ||
635 | |||
636 | #define GPIO216_GPIO PIN_CFG(216, GPIO) | ||
637 | #define GPIO216_MC1_DAT2DIR PIN_CFG(216, ALT_A) | ||
638 | #define GPIO216_MC3_CMDDIR PIN_CFG(216, ALT_B) | ||
639 | #define GPIO216_I2C3_SDA PIN_CFG_PULL(216, ALT_C, UP) | ||
640 | |||
641 | #define GPIO217_GPIO PIN_CFG(217, GPIO) | ||
642 | #define GPIO217_MC1_DAT0DIR PIN_CFG(217, ALT_A) | ||
643 | #define GPIO217_MC3_DAT31DIR PIN_CFG(217, ALT_B) | ||
644 | #define GPIO217_CLKOUT2 PIN_CFG(217, ALT_C) | ||
645 | |||
646 | #define GPIO218_GPIO PIN_CFG(218, GPIO) | ||
647 | #define GPIO218_MC1_DAT31DIR PIN_CFG(218, ALT_A) | ||
648 | #define GPIO218_MC3_DAT0DIR PIN_CFG(218, ALT_B) | ||
649 | #define GPIO218_I2C3_SCL PIN_CFG_PULL(218, ALT_C, UP) | ||
650 | |||
651 | #define GPIO219_GPIO PIN_CFG(219, GPIO) | ||
652 | #define GPIO219_HSIR_FLA0 PIN_CFG(219, ALT_A) | ||
653 | #define GPIO219_MC3_CLK PIN_CFG(219, ALT_B) | ||
654 | |||
655 | #define GPIO220_GPIO PIN_CFG(220, GPIO) | ||
656 | #define GPIO220_HSIR_DAT0 PIN_CFG(220, ALT_A) | ||
657 | #define GPIO220_MC3_FBCLK PIN_CFG(220, ALT_B) | ||
658 | #define GPIO220_SPI0_CLK PIN_CFG(220, ALT_C) | ||
659 | |||
660 | #define GPIO221_GPIO PIN_CFG(221, GPIO) | ||
661 | #define GPIO221_HSIR_RDY0 PIN_CFG(221, ALT_A) | ||
662 | #define GPIO221_MC3_CMD PIN_CFG(221, ALT_B) | ||
663 | |||
664 | #define GPIO222_GPIO PIN_CFG(222, GPIO) | ||
665 | #define GPIO222_HSIT_FLA0 PIN_CFG(222, ALT_A) | ||
666 | #define GPIO222_MC3_DAT0 PIN_CFG(222, ALT_B) | ||
667 | |||
668 | #define GPIO223_GPIO PIN_CFG(223, GPIO) | ||
669 | #define GPIO223_HSIT_DAT0 PIN_CFG(223, ALT_A) | ||
670 | #define GPIO223_MC3_DAT1 PIN_CFG(223, ALT_B) | ||
671 | #define GPIO223_SPI0_FRM PIN_CFG(223, ALT_C) | ||
672 | |||
673 | #define GPIO224_GPIO PIN_CFG(224, GPIO) | ||
674 | #define GPIO224_HSIT_RDY0 PIN_CFG(224, ALT_A) | ||
675 | #define GPIO224_MC3_DAT2 PIN_CFG(224, ALT_B) | ||
676 | #define GPIO224_SPI0_TXD PIN_CFG(224, ALT_C) | ||
677 | |||
678 | #define GPIO225_GPIO PIN_CFG(225, GPIO) | ||
679 | #define GPIO225_HSIT_CAWAKE0 PIN_CFG(225, ALT_A) | ||
680 | #define GPIO225_MC3_DAT3 PIN_CFG(225, ALT_B) | ||
681 | #define GPIO225_SPI0_RXD PIN_CFG(225, ALT_C) | ||
682 | |||
683 | #define GPIO226_GPIO PIN_CFG(226, GPIO) | ||
684 | #define GPIO226_HSIT_ACWAKE0 PIN_CFG(226, ALT_A) | ||
685 | #define GPIO226_PWL PIN_CFG(226, ALT_B) | ||
686 | #define GPIO226_USBSIM_PDC PIN_CFG(226, ALT_C) | ||
687 | |||
688 | #define GPIO227_GPIO PIN_CFG(227, GPIO) | ||
689 | #define GPIO227_CLKOUT1 PIN_CFG(227, ALT_A) | ||
690 | |||
691 | #define GPIO228_GPIO PIN_CFG(228, GPIO) | ||
692 | #define GPIO228_CLKOUT2 PIN_CFG(228, ALT_A) | ||
693 | |||
694 | #define GPIO229_GPIO PIN_CFG(229, GPIO) | ||
695 | #define GPIO229_CLKOUT1 PIN_CFG(229, ALT_A) | ||
696 | #define GPIO229_PWL PIN_CFG(229, ALT_B) | ||
697 | #define GPIO229_I2C3_SDA PIN_CFG_PULL(229, ALT_C, UP) | ||
698 | |||
699 | #define GPIO230_GPIO PIN_CFG(230, GPIO) | ||
700 | #define GPIO230_CLKOUT2 PIN_CFG(230, ALT_A) | ||
701 | #define GPIO230_PWL PIN_CFG(230, ALT_B) | ||
702 | #define GPIO230_I2C3_SCL PIN_CFG_PULL(230, ALT_C, UP) | ||
703 | |||
704 | #define GPIO256_GPIO PIN_CFG(256, GPIO) | ||
705 | #define GPIO256_USB_NXT PIN_CFG(256, ALT_A) | ||
706 | |||
707 | #define GPIO257_GPIO PIN_CFG(257, GPIO) | ||
708 | #define GPIO257_USB_STP PIN_CFG(257, ALT_A) | ||
709 | |||
710 | #define GPIO258_GPIO PIN_CFG(258, GPIO) | ||
711 | #define GPIO258_USB_XCLK PIN_CFG(258, ALT_A) | ||
712 | #define GPIO258_NONE PIN_CFG(258, ALT_B) | ||
713 | #define GPIO258_DDR_TRIG PIN_CFG(258, ALT_C) | ||
714 | |||
715 | #define GPIO259_GPIO PIN_CFG(259, GPIO) | ||
716 | #define GPIO259_USB_DIR PIN_CFG(259, ALT_A) | ||
717 | |||
718 | #define GPIO260_GPIO PIN_CFG(260, GPIO) | ||
719 | #define GPIO260_USB_DAT7 PIN_CFG(260, ALT_A) | ||
720 | |||
721 | #define GPIO261_GPIO PIN_CFG(261, GPIO) | ||
722 | #define GPIO261_USB_DAT6 PIN_CFG(261, ALT_A) | ||
723 | |||
724 | #define GPIO262_GPIO PIN_CFG(262, GPIO) | ||
725 | #define GPIO262_USB_DAT5 PIN_CFG(262, ALT_A) | ||
726 | |||
727 | #define GPIO263_GPIO PIN_CFG(263, GPIO) | ||
728 | #define GPIO263_USB_DAT4 PIN_CFG(263, ALT_A) | ||
729 | |||
730 | #define GPIO264_GPIO PIN_CFG(264, GPIO) | ||
731 | #define GPIO264_USB_DAT3 PIN_CFG(264, ALT_A) | ||
732 | |||
733 | #define GPIO265_GPIO PIN_CFG(265, GPIO) | ||
734 | #define GPIO265_USB_DAT2 PIN_CFG(265, ALT_A) | ||
735 | |||
736 | #define GPIO266_GPIO PIN_CFG(266, GPIO) | ||
737 | #define GPIO266_USB_DAT1 PIN_CFG(266, ALT_A) | ||
738 | |||
739 | #define GPIO267_GPIO PIN_CFG(267, GPIO) | ||
740 | #define GPIO267_USB_DAT0 PIN_CFG(267, ALT_A) | ||
741 | |||
742 | #endif | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 3dff8641b03f..e38acb0f89c8 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/amba/clcd.h> | 28 | #include <linux/amba/clcd.h> |
29 | #include <linux/amba/pl061.h> | 29 | #include <linux/amba/pl061.h> |
30 | #include <linux/amba/mmci.h> | 30 | #include <linux/amba/mmci.h> |
31 | #include <linux/amba/pl022.h> | ||
31 | #include <linux/io.h> | 32 | #include <linux/io.h> |
32 | #include <linux/gfp.h> | 33 | #include <linux/gfp.h> |
33 | 34 | ||
@@ -354,6 +355,21 @@ static struct mmci_platform_data mmc0_plat_data = { | |||
354 | .gpio_cd = -1, | 355 | .gpio_cd = -1, |
355 | }; | 356 | }; |
356 | 357 | ||
358 | static struct resource char_lcd_resources[] = { | ||
359 | { | ||
360 | .start = VERSATILE_CHAR_LCD_BASE, | ||
361 | .end = (VERSATILE_CHAR_LCD_BASE + SZ_4K - 1), | ||
362 | .flags = IORESOURCE_MEM, | ||
363 | }, | ||
364 | }; | ||
365 | |||
366 | static struct platform_device char_lcd_device = { | ||
367 | .name = "arm-charlcd", | ||
368 | .id = -1, | ||
369 | .num_resources = ARRAY_SIZE(char_lcd_resources), | ||
370 | .resource = char_lcd_resources, | ||
371 | }; | ||
372 | |||
357 | /* | 373 | /* |
358 | * Clock handling | 374 | * Clock handling |
359 | */ | 375 | */ |
@@ -400,8 +416,13 @@ static struct clk ref24_clk = { | |||
400 | .rate = 24000000, | 416 | .rate = 24000000, |
401 | }; | 417 | }; |
402 | 418 | ||
419 | static struct clk dummy_apb_pclk; | ||
420 | |||
403 | static struct clk_lookup lookups[] = { | 421 | static struct clk_lookup lookups[] = { |
404 | { /* UART0 */ | 422 | { /* AMBA bus clock */ |
423 | .con_id = "apb_pclk", | ||
424 | .clk = &dummy_apb_pclk, | ||
425 | }, { /* UART0 */ | ||
405 | .dev_id = "dev:f1", | 426 | .dev_id = "dev:f1", |
406 | .clk = &ref24_clk, | 427 | .clk = &ref24_clk, |
407 | }, { /* UART1 */ | 428 | }, { /* UART1 */ |
@@ -425,6 +446,9 @@ static struct clk_lookup lookups[] = { | |||
425 | }, { /* MMC1 */ | 446 | }, { /* MMC1 */ |
426 | .dev_id = "fpga:0b", | 447 | .dev_id = "fpga:0b", |
427 | .clk = &ref24_clk, | 448 | .clk = &ref24_clk, |
449 | }, { /* SSP */ | ||
450 | .dev_id = "dev:f4", | ||
451 | .clk = &ref24_clk, | ||
428 | }, { /* CLCD */ | 452 | }, { /* CLCD */ |
429 | .dev_id = "dev:20", | 453 | .dev_id = "dev:20", |
430 | .clk = &osc4_clk, | 454 | .clk = &osc4_clk, |
@@ -703,6 +727,12 @@ static struct pl061_platform_data gpio1_plat_data = { | |||
703 | .irq_base = IRQ_GPIO1_START, | 727 | .irq_base = IRQ_GPIO1_START, |
704 | }; | 728 | }; |
705 | 729 | ||
730 | static struct pl022_ssp_controller ssp0_plat_data = { | ||
731 | .bus_id = 0, | ||
732 | .enable_dma = 0, | ||
733 | .num_chipselect = 1, | ||
734 | }; | ||
735 | |||
706 | #define AACI_IRQ { IRQ_AACI, NO_IRQ } | 736 | #define AACI_IRQ { IRQ_AACI, NO_IRQ } |
707 | #define AACI_DMA { 0x80, 0x81 } | 737 | #define AACI_DMA { 0x80, 0x81 } |
708 | #define MMCI0_IRQ { IRQ_MMCI0A,IRQ_SIC_MMCI0B } | 738 | #define MMCI0_IRQ { IRQ_MMCI0A,IRQ_SIC_MMCI0B } |
@@ -772,7 +802,7 @@ AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); | |||
772 | AMBA_DEVICE(uart0, "dev:f1", UART0, NULL); | 802 | AMBA_DEVICE(uart0, "dev:f1", UART0, NULL); |
773 | AMBA_DEVICE(uart1, "dev:f2", UART1, NULL); | 803 | AMBA_DEVICE(uart1, "dev:f2", UART1, NULL); |
774 | AMBA_DEVICE(uart2, "dev:f3", UART2, NULL); | 804 | AMBA_DEVICE(uart2, "dev:f3", UART2, NULL); |
775 | AMBA_DEVICE(ssp0, "dev:f4", SSP, NULL); | 805 | AMBA_DEVICE(ssp0, "dev:f4", SSP, &ssp0_plat_data); |
776 | 806 | ||
777 | static struct amba_device *amba_devs[] __initdata = { | 807 | static struct amba_device *amba_devs[] __initdata = { |
778 | &dmac_device, | 808 | &dmac_device, |
@@ -843,6 +873,7 @@ void __init versatile_init(void) | |||
843 | platform_device_register(&versatile_flash_device); | 873 | platform_device_register(&versatile_flash_device); |
844 | platform_device_register(&versatile_i2c_device); | 874 | platform_device_register(&versatile_i2c_device); |
845 | platform_device_register(&smc91x_device); | 875 | platform_device_register(&smc91x_device); |
876 | platform_device_register(&char_lcd_device); | ||
846 | 877 | ||
847 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 878 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
848 | struct amba_device *d = amba_devs[i]; | 879 | struct amba_device *d = amba_devs[i]; |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 334f0df4e948..13c7e5f90a82 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -304,7 +304,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
304 | } | 304 | } |
305 | 305 | ||
306 | 306 | ||
307 | struct pci_bus *pci_versatile_scan_bus(int nr, struct pci_sys_data *sys) | 307 | struct pci_bus * __init pci_versatile_scan_bus(int nr, struct pci_sys_data *sys) |
308 | { | 308 | { |
309 | return pci_scan_bus(sys->busnr, &pci_versatile_ops, sys); | 309 | return pci_scan_bus(sys->busnr, &pci_versatile_ops, sys); |
310 | } | 310 | } |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 6353459bb567..577df6cccb08 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/hardware/gic.h> | 16 | #include <asm/hardware/gic.h> |
17 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
18 | #include <asm/pmu.h> | 18 | #include <asm/pmu.h> |
19 | #include <asm/smp_twd.h> | ||
19 | 20 | ||
20 | #include <mach/clkdev.h> | 21 | #include <mach/clkdev.h> |
21 | #include <mach/ct-ca9x4.h> | 22 | #include <mach/ct-ca9x4.h> |
@@ -53,6 +54,7 @@ static struct map_desc ct_ca9x4_io_desc[] __initdata = { | |||
53 | 54 | ||
54 | static void __init ct_ca9x4_map_io(void) | 55 | static void __init ct_ca9x4_map_io(void) |
55 | { | 56 | { |
57 | twd_base = MMIO_P2V(A9_MPCORE_TWD); | ||
56 | v2m_map_io(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); | 58 | v2m_map_io(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); |
57 | } | 59 | } |
58 | 60 | ||
diff --git a/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h b/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h index 8650f04136ef..f9e2f8d22962 100644 --- a/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h +++ b/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define A9_MPCORE_SCU (CT_CA9X4_MPIC + 0x0000) | 28 | #define A9_MPCORE_SCU (CT_CA9X4_MPIC + 0x0000) |
29 | #define A9_MPCORE_GIC_CPU (CT_CA9X4_MPIC + 0x0100) | 29 | #define A9_MPCORE_GIC_CPU (CT_CA9X4_MPIC + 0x0100) |
30 | #define A9_MPCORE_GIT (CT_CA9X4_MPIC + 0x0200) | 30 | #define A9_MPCORE_GIT (CT_CA9X4_MPIC + 0x0200) |
31 | #define A9_MPCORE_TWD (CT_CA9X4_MPIC + 0x0600) | ||
31 | #define A9_MPCORE_GIC_DIST (CT_CA9X4_MPIC + 0x1000) | 32 | #define A9_MPCORE_GIC_DIST (CT_CA9X4_MPIC + 0x1000) |
32 | 33 | ||
33 | /* | 34 | /* |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index d250711b8c7a..d6db3453908b 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -298,8 +298,13 @@ static struct clk osc2_clk = { | |||
298 | .rate = 24000000, | 298 | .rate = 24000000, |
299 | }; | 299 | }; |
300 | 300 | ||
301 | static struct clk dummy_apb_pclk; | ||
302 | |||
301 | static struct clk_lookup v2m_lookups[] = { | 303 | static struct clk_lookup v2m_lookups[] = { |
302 | { /* UART0 */ | 304 | { /* AMBA bus clock */ |
305 | .con_id = "apb_pclk", | ||
306 | .clk = &dummy_apb_pclk, | ||
307 | }, { /* UART0 */ | ||
303 | .dev_id = "mb:uart0", | 308 | .dev_id = "mb:uart0", |
304 | .clk = &osc2_clk, | 309 | .clk = &osc2_clk, |
305 | }, { /* UART1 */ | 310 | }, { /* UART1 */ |
diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 642207e18198..83c56324a472 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c | |||
@@ -93,7 +93,7 @@ static struct clk_lookup nuc900_clkregs[] = { | |||
93 | DEF_CLKLOOK(&clk_kpi, "nuc900-kpi", NULL), | 93 | DEF_CLKLOOK(&clk_kpi, "nuc900-kpi", NULL), |
94 | DEF_CLKLOOK(&clk_wdt, "nuc900-wdt", NULL), | 94 | DEF_CLKLOOK(&clk_wdt, "nuc900-wdt", NULL), |
95 | DEF_CLKLOOK(&clk_gdma, "nuc900-gdma", NULL), | 95 | DEF_CLKLOOK(&clk_gdma, "nuc900-gdma", NULL), |
96 | DEF_CLKLOOK(&clk_adc, "nuc900-adc", NULL), | 96 | DEF_CLKLOOK(&clk_adc, "nuc900-ts", NULL), |
97 | DEF_CLKLOOK(&clk_usi, "nuc900-spi", NULL), | 97 | DEF_CLKLOOK(&clk_usi, "nuc900-spi", NULL), |
98 | DEF_CLKLOOK(&clk_ext, NULL, "ext"), | 98 | DEF_CLKLOOK(&clk_ext, NULL, "ext"), |
99 | DEF_CLKLOOK(&clk_timer0, NULL, "timer0"), | 99 | DEF_CLKLOOK(&clk_timer0, NULL, "timer0"), |
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index b2eda4dc1c34..7a1fa6adb7c3 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <mach/nuc900_spi.h> | 36 | #include <mach/nuc900_spi.h> |
37 | #include <mach/map.h> | 37 | #include <mach/map.h> |
38 | #include <mach/fb.h> | 38 | #include <mach/fb.h> |
39 | #include <mach/regs-ldm.h> | ||
40 | #include <mach/w90p910_keypad.h> | ||
39 | 41 | ||
40 | #include "cpu.h" | 42 | #include "cpu.h" |
41 | 43 | ||
@@ -207,7 +209,7 @@ static struct nuc900_spi_info nuc900_spiflash_data = { | |||
207 | .divider = 24, | 209 | .divider = 24, |
208 | .sleep = 0, | 210 | .sleep = 0, |
209 | .txnum = 0, | 211 | .txnum = 0, |
210 | .txbitlen = 1, | 212 | .txbitlen = 8, |
211 | .bus_num = 0, | 213 | .bus_num = 0, |
212 | }; | 214 | }; |
213 | 215 | ||
@@ -256,7 +258,7 @@ static struct spi_board_info nuc900_spi_board_info[] __initdata = { | |||
256 | .modalias = "m25p80", | 258 | .modalias = "m25p80", |
257 | .max_speed_hz = 20000000, | 259 | .max_speed_hz = 20000000, |
258 | .bus_num = 0, | 260 | .bus_num = 0, |
259 | .chip_select = 1, | 261 | .chip_select = 0, |
260 | .platform_data = &nuc900_spi_flash_data, | 262 | .platform_data = &nuc900_spi_flash_data, |
261 | .mode = SPI_MODE_0, | 263 | .mode = SPI_MODE_0, |
262 | }, | 264 | }, |
@@ -361,6 +363,39 @@ struct platform_device nuc900_device_fmi = { | |||
361 | 363 | ||
362 | /* KPI controller*/ | 364 | /* KPI controller*/ |
363 | 365 | ||
366 | static int nuc900_keymap[] = { | ||
367 | KEY(0, 0, KEY_A), | ||
368 | KEY(0, 1, KEY_B), | ||
369 | KEY(0, 2, KEY_C), | ||
370 | KEY(0, 3, KEY_D), | ||
371 | |||
372 | KEY(1, 0, KEY_E), | ||
373 | KEY(1, 1, KEY_F), | ||
374 | KEY(1, 2, KEY_G), | ||
375 | KEY(1, 3, KEY_H), | ||
376 | |||
377 | KEY(2, 0, KEY_I), | ||
378 | KEY(2, 1, KEY_J), | ||
379 | KEY(2, 2, KEY_K), | ||
380 | KEY(2, 3, KEY_L), | ||
381 | |||
382 | KEY(3, 0, KEY_M), | ||
383 | KEY(3, 1, KEY_N), | ||
384 | KEY(3, 2, KEY_O), | ||
385 | KEY(3, 3, KEY_P), | ||
386 | }; | ||
387 | |||
388 | static struct matrix_keymap_data nuc900_map_data = { | ||
389 | .keymap = nuc900_keymap, | ||
390 | .keymap_size = ARRAY_SIZE(nuc900_keymap), | ||
391 | }; | ||
392 | |||
393 | struct w90p910_keypad_platform_data nuc900_keypad_info = { | ||
394 | .keymap_data = &nuc900_map_data, | ||
395 | .prescale = 0xfa, | ||
396 | .debounce = 0x50, | ||
397 | }; | ||
398 | |||
364 | static struct resource nuc900_kpi_resource[] = { | 399 | static struct resource nuc900_kpi_resource[] = { |
365 | [0] = { | 400 | [0] = { |
366 | .start = W90X900_PA_KPI, | 401 | .start = W90X900_PA_KPI, |
@@ -380,9 +415,49 @@ struct platform_device nuc900_device_kpi = { | |||
380 | .id = -1, | 415 | .id = -1, |
381 | .num_resources = ARRAY_SIZE(nuc900_kpi_resource), | 416 | .num_resources = ARRAY_SIZE(nuc900_kpi_resource), |
382 | .resource = nuc900_kpi_resource, | 417 | .resource = nuc900_kpi_resource, |
418 | .dev = { | ||
419 | .platform_data = &nuc900_keypad_info, | ||
420 | } | ||
383 | }; | 421 | }; |
384 | 422 | ||
385 | #ifdef CONFIG_FB_NUC900 | 423 | /* LCD controller*/ |
424 | |||
425 | static struct nuc900fb_display __initdata nuc900_lcd_info[] = { | ||
426 | /* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */ | ||
427 | [0] = { | ||
428 | .type = LCM_DCCS_VA_SRC_RGB565, | ||
429 | .width = 320, | ||
430 | .height = 240, | ||
431 | .xres = 320, | ||
432 | .yres = 240, | ||
433 | .bpp = 16, | ||
434 | .pixclock = 200000, | ||
435 | .left_margin = 34, | ||
436 | .right_margin = 54, | ||
437 | .hsync_len = 10, | ||
438 | .upper_margin = 18, | ||
439 | .lower_margin = 4, | ||
440 | .vsync_len = 1, | ||
441 | .dccs = 0x8e00041a, | ||
442 | .devctl = 0x060800c0, | ||
443 | .fbctrl = 0x00a000a0, | ||
444 | .scale = 0x04000400, | ||
445 | }, | ||
446 | }; | ||
447 | |||
448 | static struct nuc900fb_mach_info nuc900_fb_info __initdata = { | ||
449 | #if defined(CONFIG_GPM1040A0_320X240) | ||
450 | .displays = &nuc900_lcd_info[0], | ||
451 | #else | ||
452 | .displays = nuc900_lcd_info, | ||
453 | #endif | ||
454 | .num_displays = ARRAY_SIZE(nuc900_lcd_info), | ||
455 | .default_display = 0, | ||
456 | .gpio_dir = 0x00000004, | ||
457 | .gpio_dir_mask = 0xFFFFFFFD, | ||
458 | .gpio_data = 0x00000004, | ||
459 | .gpio_data_mask = 0xFFFFFFFD, | ||
460 | }; | ||
386 | 461 | ||
387 | static struct resource nuc900_lcd_resource[] = { | 462 | static struct resource nuc900_lcd_resource[] = { |
388 | [0] = { | 463 | [0] = { |
@@ -406,23 +481,10 @@ struct platform_device nuc900_device_lcd = { | |||
406 | .dev = { | 481 | .dev = { |
407 | .dma_mask = &nuc900_device_lcd_dmamask, | 482 | .dma_mask = &nuc900_device_lcd_dmamask, |
408 | .coherent_dma_mask = -1, | 483 | .coherent_dma_mask = -1, |
484 | .platform_data = &nuc900_fb_info, | ||
409 | } | 485 | } |
410 | }; | 486 | }; |
411 | 487 | ||
412 | void nuc900_fb_set_platdata(struct nuc900fb_mach_info *pd) | ||
413 | { | ||
414 | struct nuc900fb_mach_info *npd; | ||
415 | |||
416 | npd = kmalloc(sizeof(*npd), GFP_KERNEL); | ||
417 | if (npd) { | ||
418 | memcpy(npd, pd, sizeof(*npd)); | ||
419 | nuc900_device_lcd.dev.platform_data = npd; | ||
420 | } else { | ||
421 | printk(KERN_ERR "no memory for LCD platform data\n"); | ||
422 | } | ||
423 | } | ||
424 | #endif | ||
425 | |||
426 | /* AUDIO controller*/ | 488 | /* AUDIO controller*/ |
427 | static u64 nuc900_device_audio_dmamask = -1; | 489 | static u64 nuc900_device_audio_dmamask = -1; |
428 | static struct resource nuc900_ac97_resource[] = { | 490 | static struct resource nuc900_ac97_resource[] = { |
diff --git a/arch/arm/mach-w90x900/include/mach/regs-gcr.h b/arch/arm/mach-w90x900/include/mach/regs-gcr.h new file mode 100644 index 000000000000..6087abd93ef5 --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/regs-gcr.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/regs-gcr.h | ||
3 | * | ||
4 | * Copyright (c) 2010 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_REGS_GCR_H | ||
17 | #define __ASM_ARCH_REGS_GCR_H | ||
18 | |||
19 | /* Global control registers */ | ||
20 | |||
21 | #define GCR_BA W90X900_VA_GCR | ||
22 | #define REG_PDID (GCR_BA+0x000) | ||
23 | #define REG_PWRON (GCR_BA+0x004) | ||
24 | #define REG_ARBCON (GCR_BA+0x008) | ||
25 | #define REG_MFSEL (GCR_BA+0x00C) | ||
26 | #define REG_EBIDPE (GCR_BA+0x010) | ||
27 | #define REG_LCDDPE (GCR_BA+0x014) | ||
28 | #define REG_GPIOCPE (GCR_BA+0x018) | ||
29 | #define REG_GPIODPE (GCR_BA+0x01C) | ||
30 | #define REG_GPIOEPE (GCR_BA+0x020) | ||
31 | #define REG_GPIOFPE (GCR_BA+0x024) | ||
32 | #define REG_GPIOGPE (GCR_BA+0x028) | ||
33 | #define REG_GPIOHPE (GCR_BA+0x02C) | ||
34 | #define REG_GPIOIPE (GCR_BA+0x030) | ||
35 | #define REG_GTMP1 (GCR_BA+0x034) | ||
36 | #define REG_GTMP2 (GCR_BA+0x038) | ||
37 | #define REG_GTMP3 (GCR_BA+0x03C) | ||
38 | |||
39 | #endif /* __ASM_ARCH_REGS_GCR_H */ | ||
diff --git a/arch/arm/mach-w90x900/mach-nuc950evb.c b/arch/arm/mach-w90x900/mach-nuc950evb.c index b3edc3cccf52..04d295f89eb0 100644 --- a/arch/arm/mach-w90x900/mach-nuc950evb.c +++ b/arch/arm/mach-w90x900/mach-nuc950evb.c | |||
@@ -20,51 +20,10 @@ | |||
20 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
21 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
22 | #include <mach/map.h> | 22 | #include <mach/map.h> |
23 | #include <mach/regs-ldm.h> | ||
24 | #include <mach/fb.h> | 23 | #include <mach/fb.h> |
25 | 24 | ||
26 | #include "nuc950.h" | 25 | #include "nuc950.h" |
27 | 26 | ||
28 | #ifdef CONFIG_FB_NUC900 | ||
29 | /* LCD Controller */ | ||
30 | static struct nuc900fb_display __initdata nuc950_lcd_info[] = { | ||
31 | /* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */ | ||
32 | [0] = { | ||
33 | .type = LCM_DCCS_VA_SRC_RGB565, | ||
34 | .width = 320, | ||
35 | .height = 240, | ||
36 | .xres = 320, | ||
37 | .yres = 240, | ||
38 | .bpp = 16, | ||
39 | .pixclock = 200000, | ||
40 | .left_margin = 34, | ||
41 | .right_margin = 54, | ||
42 | .hsync_len = 10, | ||
43 | .upper_margin = 18, | ||
44 | .lower_margin = 4, | ||
45 | .vsync_len = 1, | ||
46 | .dccs = 0x8e00041a, | ||
47 | .devctl = 0x060800c0, | ||
48 | .fbctrl = 0x00a000a0, | ||
49 | .scale = 0x04000400, | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | static struct nuc900fb_mach_info nuc950_fb_info __initdata = { | ||
54 | #if defined(CONFIG_GPM1040A0_320X240) | ||
55 | .displays = &nuc950_lcd_info[0], | ||
56 | #else | ||
57 | .displays = nuc950_lcd_info, | ||
58 | #endif | ||
59 | .num_displays = ARRAY_SIZE(nuc950_lcd_info), | ||
60 | .default_display = 0, | ||
61 | .gpio_dir = 0x00000004, | ||
62 | .gpio_dir_mask = 0xFFFFFFFD, | ||
63 | .gpio_data = 0x00000004, | ||
64 | .gpio_data_mask = 0xFFFFFFFD, | ||
65 | }; | ||
66 | #endif | ||
67 | |||
68 | static void __init nuc950evb_map_io(void) | 27 | static void __init nuc950evb_map_io(void) |
69 | { | 28 | { |
70 | nuc950_map_io(); | 29 | nuc950_map_io(); |
@@ -74,9 +33,6 @@ static void __init nuc950evb_map_io(void) | |||
74 | static void __init nuc950evb_init(void) | 33 | static void __init nuc950evb_init(void) |
75 | { | 34 | { |
76 | nuc950_board_init(); | 35 | nuc950_board_init(); |
77 | #ifdef CONFIG_FB_NUC900 | ||
78 | nuc900_fb_set_platdata(&nuc950_fb_info); | ||
79 | #endif | ||
80 | } | 36 | } |
81 | 37 | ||
82 | MACHINE_START(W90P950EVB, "W90P950EVB") | 38 | MACHINE_START(W90P950EVB, "W90P950EVB") |
diff --git a/arch/arm/mach-w90x900/nuc910.c b/arch/arm/mach-w90x900/nuc910.c index 656f03b3b629..1523f4136985 100644 --- a/arch/arm/mach-w90x900/nuc910.c +++ b/arch/arm/mach-w90x900/nuc910.c | |||
@@ -26,6 +26,8 @@ | |||
26 | static struct platform_device *nuc910_dev[] __initdata = { | 26 | static struct platform_device *nuc910_dev[] __initdata = { |
27 | &nuc900_device_ts, | 27 | &nuc900_device_ts, |
28 | &nuc900_device_rtc, | 28 | &nuc900_device_rtc, |
29 | &nuc900_device_lcd, | ||
30 | &nuc900_device_kpi, | ||
29 | }; | 31 | }; |
30 | 32 | ||
31 | /* define specific CPU platform io map */ | 33 | /* define specific CPU platform io map */ |
diff --git a/arch/arm/mach-w90x900/nuc950.c b/arch/arm/mach-w90x900/nuc950.c index 4d1f1ab044c4..5704f74a50ee 100644 --- a/arch/arm/mach-w90x900/nuc950.c +++ b/arch/arm/mach-w90x900/nuc950.c | |||
@@ -26,9 +26,7 @@ | |||
26 | static struct platform_device *nuc950_dev[] __initdata = { | 26 | static struct platform_device *nuc950_dev[] __initdata = { |
27 | &nuc900_device_kpi, | 27 | &nuc900_device_kpi, |
28 | &nuc900_device_fmi, | 28 | &nuc900_device_fmi, |
29 | #ifdef CONFIG_FB_NUC900 | ||
30 | &nuc900_device_lcd, | 29 | &nuc900_device_lcd, |
31 | #endif | ||
32 | }; | 30 | }; |
33 | 31 | ||
34 | /* define specific CPU platform io map */ | 32 | /* define specific CPU platform io map */ |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 101105e52610..87ec141fcaa6 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -717,17 +717,6 @@ config TLS_REG_EMUL | |||
717 | a few prototypes like that in existence) and therefore access to | 717 | a few prototypes like that in existence) and therefore access to |
718 | that required register must be emulated. | 718 | that required register must be emulated. |
719 | 719 | ||
720 | config HAS_TLS_REG | ||
721 | bool | ||
722 | depends on !TLS_REG_EMUL | ||
723 | default y if SMP || CPU_32v7 | ||
724 | help | ||
725 | This selects support for the CP15 thread register. | ||
726 | It is defined to be available on some ARMv6 processors (including | ||
727 | all SMP capable ARMv6's) or later processors. User space may | ||
728 | assume directly accessing that register and always obtain the | ||
729 | expected value only on ARMv7 and above. | ||
730 | |||
731 | config NEEDS_SYSCALL_FOR_CMPXCHG | 720 | config NEEDS_SYSCALL_FOR_CMPXCHG |
732 | bool | 721 | bool |
733 | help | 722 | help |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 28c8b950ef04..03f11935ed08 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -268,6 +268,12 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, | |||
268 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) | 268 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) |
269 | return NULL; | 269 | return NULL; |
270 | 270 | ||
271 | /* | ||
272 | * Don't allow RAM to be mapped - this causes problems with ARMv6+ | ||
273 | */ | ||
274 | if (WARN_ON(pfn_valid(pfn))) | ||
275 | return NULL; | ||
276 | |||
271 | type = get_mem_type(mtype); | 277 | type = get_mem_type(mtype); |
272 | if (!type) | 278 | if (!type) |
273 | return NULL; | 279 | return NULL; |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 7a5337ed7d68..2f5a3c23a0fe 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -239,7 +239,8 @@ __v6_proc_info: | |||
239 | b __v6_setup | 239 | b __v6_setup |
240 | .long cpu_arch_name | 240 | .long cpu_arch_name |
241 | .long cpu_elf_name | 241 | .long cpu_elf_name |
242 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA | 242 | /* See also feat_v6_fixup() for HWCAP_TLS */ |
243 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA|HWCAP_TLS | ||
243 | .long cpu_v6_name | 244 | .long cpu_v6_name |
244 | .long v6_processor_functions | 245 | .long v6_processor_functions |
245 | .long v6wbi_tlb_fns | 246 | .long v6wbi_tlb_fns |
@@ -262,7 +263,7 @@ __pj4_v6_proc_info: | |||
262 | b __v6_setup | 263 | b __v6_setup |
263 | .long cpu_arch_name | 264 | .long cpu_arch_name |
264 | .long cpu_elf_name | 265 | .long cpu_elf_name |
265 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | 266 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_TLS |
266 | .long cpu_pj4_name | 267 | .long cpu_pj4_name |
267 | .long v6_processor_functions | 268 | .long v6_processor_functions |
268 | .long v6wbi_tlb_fns | 269 | .long v6wbi_tlb_fns |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 7aaf88a3b7aa..8071bcd4c995 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -344,7 +344,7 @@ __v7_proc_info: | |||
344 | b __v7_setup | 344 | b __v7_setup |
345 | .long cpu_arch_name | 345 | .long cpu_arch_name |
346 | .long cpu_elf_name | 346 | .long cpu_elf_name |
347 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | 347 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_TLS |
348 | .long cpu_v7_name | 348 | .long cpu_v7_name |
349 | .long v7_processor_functions | 349 | .long v7_processor_functions |
350 | .long v7wbi_tlb_fns | 350 | .long v7wbi_tlb_fns |
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 6c8a02ad98e3..85d3e55ca4a9 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c | |||
@@ -29,6 +29,11 @@ | |||
29 | #include <mach/time.h> | 29 | #include <mach/time.h> |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Minimum clocksource/clockevent timer range in seconds | ||
33 | */ | ||
34 | #define IOP_MIN_RANGE 4 | ||
35 | |||
36 | /* | ||
32 | * IOP clocksource (free-running timer 1). | 37 | * IOP clocksource (free-running timer 1). |
33 | */ | 38 | */ |
34 | static cycle_t iop_clocksource_read(struct clocksource *unused) | 39 | static cycle_t iop_clocksource_read(struct clocksource *unused) |
@@ -44,27 +49,6 @@ static struct clocksource iop_clocksource = { | |||
44 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 49 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
45 | }; | 50 | }; |
46 | 51 | ||
47 | static void __init iop_clocksource_set_hz(struct clocksource *cs, unsigned int hz) | ||
48 | { | ||
49 | u64 temp; | ||
50 | u32 shift; | ||
51 | |||
52 | /* Find shift and mult values for hz. */ | ||
53 | shift = 32; | ||
54 | do { | ||
55 | temp = (u64) NSEC_PER_SEC << shift; | ||
56 | do_div(temp, hz); | ||
57 | if ((temp >> 32) == 0) | ||
58 | break; | ||
59 | } while (--shift != 0); | ||
60 | |||
61 | cs->shift = shift; | ||
62 | cs->mult = (u32) temp; | ||
63 | |||
64 | printk(KERN_INFO "clocksource: %s uses shift %u mult %#x\n", | ||
65 | cs->name, cs->shift, cs->mult); | ||
66 | } | ||
67 | |||
68 | /* | 52 | /* |
69 | * IOP sched_clock() implementation via its clocksource. | 53 | * IOP sched_clock() implementation via its clocksource. |
70 | */ | 54 | */ |
@@ -130,27 +114,6 @@ static struct clock_event_device iop_clockevent = { | |||
130 | .set_mode = iop_set_mode, | 114 | .set_mode = iop_set_mode, |
131 | }; | 115 | }; |
132 | 116 | ||
133 | static void __init iop_clockevent_set_hz(struct clock_event_device *ce, unsigned int hz) | ||
134 | { | ||
135 | u64 temp; | ||
136 | u32 shift; | ||
137 | |||
138 | /* Find shift and mult values for hz. */ | ||
139 | shift = 32; | ||
140 | do { | ||
141 | temp = (u64) hz << shift; | ||
142 | do_div(temp, NSEC_PER_SEC); | ||
143 | if ((temp >> 32) == 0) | ||
144 | break; | ||
145 | } while (--shift != 0); | ||
146 | |||
147 | ce->shift = shift; | ||
148 | ce->mult = (u32) temp; | ||
149 | |||
150 | printk(KERN_INFO "clockevent: %s uses shift %u mult %#lx\n", | ||
151 | ce->name, ce->shift, ce->mult); | ||
152 | } | ||
153 | |||
154 | static irqreturn_t | 117 | static irqreturn_t |
155 | iop_timer_interrupt(int irq, void *dev_id) | 118 | iop_timer_interrupt(int irq, void *dev_id) |
156 | { | 119 | { |
@@ -190,7 +153,8 @@ void __init iop_init_time(unsigned long tick_rate) | |||
190 | */ | 153 | */ |
191 | write_tmr0(timer_ctl & ~IOP_TMR_EN); | 154 | write_tmr0(timer_ctl & ~IOP_TMR_EN); |
192 | setup_irq(IRQ_IOP_TIMER0, &iop_timer_irq); | 155 | setup_irq(IRQ_IOP_TIMER0, &iop_timer_irq); |
193 | iop_clockevent_set_hz(&iop_clockevent, tick_rate); | 156 | clockevents_calc_mult_shift(&iop_clockevent, |
157 | tick_rate, IOP_MIN_RANGE); | ||
194 | iop_clockevent.max_delta_ns = | 158 | iop_clockevent.max_delta_ns = |
195 | clockevent_delta2ns(0xfffffffe, &iop_clockevent); | 159 | clockevent_delta2ns(0xfffffffe, &iop_clockevent); |
196 | iop_clockevent.min_delta_ns = | 160 | iop_clockevent.min_delta_ns = |
@@ -207,6 +171,7 @@ void __init iop_init_time(unsigned long tick_rate) | |||
207 | write_trr1(0xffffffff); | 171 | write_trr1(0xffffffff); |
208 | write_tcr1(0xffffffff); | 172 | write_tcr1(0xffffffff); |
209 | write_tmr1(timer_ctl); | 173 | write_tmr1(timer_ctl); |
210 | iop_clocksource_set_hz(&iop_clocksource, tick_rate); | 174 | clocksource_calc_mult_shift(&iop_clocksource, tick_rate, |
175 | IOP_MIN_RANGE); | ||
211 | clocksource_register(&iop_clocksource); | 176 | clocksource_register(&iop_clocksource); |
212 | } | 177 | } |
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c index 5a6ef252c38b..977c8f9a07a2 100644 --- a/arch/arm/plat-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | 25 | ||
26 | #include <plat/pincfg.h> | ||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <mach/gpio.h> | 28 | #include <mach/gpio.h> |
28 | 29 | ||
@@ -46,28 +47,217 @@ struct nmk_gpio_chip { | |||
46 | u32 edge_falling; | 47 | u32 edge_falling; |
47 | }; | 48 | }; |
48 | 49 | ||
50 | static void __nmk_gpio_set_mode(struct nmk_gpio_chip *nmk_chip, | ||
51 | unsigned offset, int gpio_mode) | ||
52 | { | ||
53 | u32 bit = 1 << offset; | ||
54 | u32 afunc, bfunc; | ||
55 | |||
56 | afunc = readl(nmk_chip->addr + NMK_GPIO_AFSLA) & ~bit; | ||
57 | bfunc = readl(nmk_chip->addr + NMK_GPIO_AFSLB) & ~bit; | ||
58 | if (gpio_mode & NMK_GPIO_ALT_A) | ||
59 | afunc |= bit; | ||
60 | if (gpio_mode & NMK_GPIO_ALT_B) | ||
61 | bfunc |= bit; | ||
62 | writel(afunc, nmk_chip->addr + NMK_GPIO_AFSLA); | ||
63 | writel(bfunc, nmk_chip->addr + NMK_GPIO_AFSLB); | ||
64 | } | ||
65 | |||
66 | static void __nmk_gpio_set_slpm(struct nmk_gpio_chip *nmk_chip, | ||
67 | unsigned offset, enum nmk_gpio_slpm mode) | ||
68 | { | ||
69 | u32 bit = 1 << offset; | ||
70 | u32 slpm; | ||
71 | |||
72 | slpm = readl(nmk_chip->addr + NMK_GPIO_SLPC); | ||
73 | if (mode == NMK_GPIO_SLPM_NOCHANGE) | ||
74 | slpm |= bit; | ||
75 | else | ||
76 | slpm &= ~bit; | ||
77 | writel(slpm, nmk_chip->addr + NMK_GPIO_SLPC); | ||
78 | } | ||
79 | |||
80 | static void __nmk_gpio_set_pull(struct nmk_gpio_chip *nmk_chip, | ||
81 | unsigned offset, enum nmk_gpio_pull pull) | ||
82 | { | ||
83 | u32 bit = 1 << offset; | ||
84 | u32 pdis; | ||
85 | |||
86 | pdis = readl(nmk_chip->addr + NMK_GPIO_PDIS); | ||
87 | if (pull == NMK_GPIO_PULL_NONE) | ||
88 | pdis |= bit; | ||
89 | else | ||
90 | pdis &= ~bit; | ||
91 | writel(pdis, nmk_chip->addr + NMK_GPIO_PDIS); | ||
92 | |||
93 | if (pull == NMK_GPIO_PULL_UP) | ||
94 | writel(bit, nmk_chip->addr + NMK_GPIO_DATS); | ||
95 | else if (pull == NMK_GPIO_PULL_DOWN) | ||
96 | writel(bit, nmk_chip->addr + NMK_GPIO_DATC); | ||
97 | } | ||
98 | |||
99 | static void __nmk_gpio_make_input(struct nmk_gpio_chip *nmk_chip, | ||
100 | unsigned offset) | ||
101 | { | ||
102 | writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRC); | ||
103 | } | ||
104 | |||
105 | static void __nmk_config_pin(struct nmk_gpio_chip *nmk_chip, unsigned offset, | ||
106 | pin_cfg_t cfg) | ||
107 | { | ||
108 | static const char *afnames[] = { | ||
109 | [NMK_GPIO_ALT_GPIO] = "GPIO", | ||
110 | [NMK_GPIO_ALT_A] = "A", | ||
111 | [NMK_GPIO_ALT_B] = "B", | ||
112 | [NMK_GPIO_ALT_C] = "C" | ||
113 | }; | ||
114 | static const char *pullnames[] = { | ||
115 | [NMK_GPIO_PULL_NONE] = "none", | ||
116 | [NMK_GPIO_PULL_UP] = "up", | ||
117 | [NMK_GPIO_PULL_DOWN] = "down", | ||
118 | [3] /* illegal */ = "??" | ||
119 | }; | ||
120 | static const char *slpmnames[] = { | ||
121 | [NMK_GPIO_SLPM_INPUT] = "input", | ||
122 | [NMK_GPIO_SLPM_NOCHANGE] = "no-change", | ||
123 | }; | ||
124 | |||
125 | int pin = PIN_NUM(cfg); | ||
126 | int pull = PIN_PULL(cfg); | ||
127 | int af = PIN_ALT(cfg); | ||
128 | int slpm = PIN_SLPM(cfg); | ||
129 | |||
130 | dev_dbg(nmk_chip->chip.dev, "pin %d: af %s, pull %s, slpm %s\n", | ||
131 | pin, afnames[af], pullnames[pull], slpmnames[slpm]); | ||
132 | |||
133 | __nmk_gpio_make_input(nmk_chip, offset); | ||
134 | __nmk_gpio_set_pull(nmk_chip, offset, pull); | ||
135 | __nmk_gpio_set_slpm(nmk_chip, offset, slpm); | ||
136 | __nmk_gpio_set_mode(nmk_chip, offset, af); | ||
137 | } | ||
138 | |||
139 | /** | ||
140 | * nmk_config_pin - configure a pin's mux attributes | ||
141 | * @cfg: pin confguration | ||
142 | * | ||
143 | * Configures a pin's mode (alternate function or GPIO), its pull up status, | ||
144 | * and its sleep mode based on the specified configuration. The @cfg is | ||
145 | * usually one of the SoC specific macros defined in mach/<soc>-pins.h. These | ||
146 | * are constructed using, and can be further enhanced with, the macros in | ||
147 | * plat/pincfg.h. | ||
148 | * | ||
149 | * If a pin's mode is set to GPIO, it is configured as an input to avoid | ||
150 | * side-effects. The gpio can be manipulated later using standard GPIO API | ||
151 | * calls. | ||
152 | */ | ||
153 | int nmk_config_pin(pin_cfg_t cfg) | ||
154 | { | ||
155 | struct nmk_gpio_chip *nmk_chip; | ||
156 | int gpio = PIN_NUM(cfg); | ||
157 | unsigned long flags; | ||
158 | |||
159 | nmk_chip = get_irq_chip_data(NOMADIK_GPIO_TO_IRQ(gpio)); | ||
160 | if (!nmk_chip) | ||
161 | return -EINVAL; | ||
162 | |||
163 | spin_lock_irqsave(&nmk_chip->lock, flags); | ||
164 | __nmk_config_pin(nmk_chip, gpio - nmk_chip->chip.base, cfg); | ||
165 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | ||
166 | |||
167 | return 0; | ||
168 | } | ||
169 | EXPORT_SYMBOL(nmk_config_pin); | ||
170 | |||
171 | /** | ||
172 | * nmk_config_pins - configure several pins at once | ||
173 | * @cfgs: array of pin configurations | ||
174 | * @num: number of elments in the array | ||
175 | * | ||
176 | * Configures several pins using nmk_config_pin(). Refer to that function for | ||
177 | * further information. | ||
178 | */ | ||
179 | int nmk_config_pins(pin_cfg_t *cfgs, int num) | ||
180 | { | ||
181 | int ret = 0; | ||
182 | int i; | ||
183 | |||
184 | for (i = 0; i < num; i++) { | ||
185 | int ret = nmk_config_pin(cfgs[i]); | ||
186 | if (ret) | ||
187 | break; | ||
188 | } | ||
189 | |||
190 | return ret; | ||
191 | } | ||
192 | EXPORT_SYMBOL(nmk_config_pins); | ||
193 | |||
194 | /** | ||
195 | * nmk_gpio_set_slpm() - configure the sleep mode of a pin | ||
196 | * @gpio: pin number | ||
197 | * @mode: NMK_GPIO_SLPM_INPUT or NMK_GPIO_SLPM_NOCHANGE, | ||
198 | * | ||
199 | * Sets the sleep mode of a pin. If @mode is NMK_GPIO_SLPM_INPUT, the pin is | ||
200 | * changed to an input (with pullup/down enabled) in sleep and deep sleep. If | ||
201 | * @mode is NMK_GPIO_SLPM_NOCHANGE, the pin remains in the state it was | ||
202 | * configured even when in sleep and deep sleep. | ||
203 | */ | ||
204 | int nmk_gpio_set_slpm(int gpio, enum nmk_gpio_slpm mode) | ||
205 | { | ||
206 | struct nmk_gpio_chip *nmk_chip; | ||
207 | unsigned long flags; | ||
208 | |||
209 | nmk_chip = get_irq_chip_data(NOMADIK_GPIO_TO_IRQ(gpio)); | ||
210 | if (!nmk_chip) | ||
211 | return -EINVAL; | ||
212 | |||
213 | spin_lock_irqsave(&nmk_chip->lock, flags); | ||
214 | __nmk_gpio_set_slpm(nmk_chip, gpio - nmk_chip->chip.base, mode); | ||
215 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | ||
216 | |||
217 | return 0; | ||
218 | } | ||
219 | |||
220 | /** | ||
221 | * nmk_gpio_set_pull() - enable/disable pull up/down on a gpio | ||
222 | * @gpio: pin number | ||
223 | * @pull: one of NMK_GPIO_PULL_DOWN, NMK_GPIO_PULL_UP, and NMK_GPIO_PULL_NONE | ||
224 | * | ||
225 | * Enables/disables pull up/down on a specified pin. This only takes effect if | ||
226 | * the pin is configured as an input (either explicitly or by the alternate | ||
227 | * function). | ||
228 | * | ||
229 | * NOTE: If enabling the pull up/down, the caller must ensure that the GPIO is | ||
230 | * configured as an input. Otherwise, due to the way the controller registers | ||
231 | * work, this function will change the value output on the pin. | ||
232 | */ | ||
233 | int nmk_gpio_set_pull(int gpio, enum nmk_gpio_pull pull) | ||
234 | { | ||
235 | struct nmk_gpio_chip *nmk_chip; | ||
236 | unsigned long flags; | ||
237 | |||
238 | nmk_chip = get_irq_chip_data(NOMADIK_GPIO_TO_IRQ(gpio)); | ||
239 | if (!nmk_chip) | ||
240 | return -EINVAL; | ||
241 | |||
242 | spin_lock_irqsave(&nmk_chip->lock, flags); | ||
243 | __nmk_gpio_set_pull(nmk_chip, gpio - nmk_chip->chip.base, pull); | ||
244 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | ||
245 | |||
246 | return 0; | ||
247 | } | ||
248 | |||
49 | /* Mode functions */ | 249 | /* Mode functions */ |
50 | int nmk_gpio_set_mode(int gpio, int gpio_mode) | 250 | int nmk_gpio_set_mode(int gpio, int gpio_mode) |
51 | { | 251 | { |
52 | struct nmk_gpio_chip *nmk_chip; | 252 | struct nmk_gpio_chip *nmk_chip; |
53 | unsigned long flags; | 253 | unsigned long flags; |
54 | u32 afunc, bfunc, bit; | ||
55 | 254 | ||
56 | nmk_chip = get_irq_chip_data(NOMADIK_GPIO_TO_IRQ(gpio)); | 255 | nmk_chip = get_irq_chip_data(NOMADIK_GPIO_TO_IRQ(gpio)); |
57 | if (!nmk_chip) | 256 | if (!nmk_chip) |
58 | return -EINVAL; | 257 | return -EINVAL; |
59 | 258 | ||
60 | bit = 1 << (gpio - nmk_chip->chip.base); | ||
61 | |||
62 | spin_lock_irqsave(&nmk_chip->lock, flags); | 259 | spin_lock_irqsave(&nmk_chip->lock, flags); |
63 | afunc = readl(nmk_chip->addr + NMK_GPIO_AFSLA) & ~bit; | 260 | __nmk_gpio_set_mode(nmk_chip, gpio - nmk_chip->chip.base, gpio_mode); |
64 | bfunc = readl(nmk_chip->addr + NMK_GPIO_AFSLB) & ~bit; | ||
65 | if (gpio_mode & NMK_GPIO_ALT_A) | ||
66 | afunc |= bit; | ||
67 | if (gpio_mode & NMK_GPIO_ALT_B) | ||
68 | bfunc |= bit; | ||
69 | writel(afunc, nmk_chip->addr + NMK_GPIO_AFSLA); | ||
70 | writel(bfunc, nmk_chip->addr + NMK_GPIO_AFSLB); | ||
71 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | 261 | spin_unlock_irqrestore(&nmk_chip->lock, flags); |
72 | 262 | ||
73 | return 0; | 263 | return 0; |
@@ -111,32 +301,41 @@ static void nmk_gpio_irq_ack(unsigned int irq) | |||
111 | writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC); | 301 | writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC); |
112 | } | 302 | } |
113 | 303 | ||
304 | enum nmk_gpio_irq_type { | ||
305 | NORMAL, | ||
306 | WAKE, | ||
307 | }; | ||
308 | |||
114 | static void __nmk_gpio_irq_modify(struct nmk_gpio_chip *nmk_chip, | 309 | static void __nmk_gpio_irq_modify(struct nmk_gpio_chip *nmk_chip, |
115 | int gpio, bool enable) | 310 | int gpio, enum nmk_gpio_irq_type which, |
311 | bool enable) | ||
116 | { | 312 | { |
313 | u32 rimsc = which == WAKE ? NMK_GPIO_RWIMSC : NMK_GPIO_RIMSC; | ||
314 | u32 fimsc = which == WAKE ? NMK_GPIO_FWIMSC : NMK_GPIO_FIMSC; | ||
117 | u32 bitmask = nmk_gpio_get_bitmask(gpio); | 315 | u32 bitmask = nmk_gpio_get_bitmask(gpio); |
118 | u32 reg; | 316 | u32 reg; |
119 | 317 | ||
120 | /* we must individually set/clear the two edges */ | 318 | /* we must individually set/clear the two edges */ |
121 | if (nmk_chip->edge_rising & bitmask) { | 319 | if (nmk_chip->edge_rising & bitmask) { |
122 | reg = readl(nmk_chip->addr + NMK_GPIO_RIMSC); | 320 | reg = readl(nmk_chip->addr + rimsc); |
123 | if (enable) | 321 | if (enable) |
124 | reg |= bitmask; | 322 | reg |= bitmask; |
125 | else | 323 | else |
126 | reg &= ~bitmask; | 324 | reg &= ~bitmask; |
127 | writel(reg, nmk_chip->addr + NMK_GPIO_RIMSC); | 325 | writel(reg, nmk_chip->addr + rimsc); |
128 | } | 326 | } |
129 | if (nmk_chip->edge_falling & bitmask) { | 327 | if (nmk_chip->edge_falling & bitmask) { |
130 | reg = readl(nmk_chip->addr + NMK_GPIO_FIMSC); | 328 | reg = readl(nmk_chip->addr + fimsc); |
131 | if (enable) | 329 | if (enable) |
132 | reg |= bitmask; | 330 | reg |= bitmask; |
133 | else | 331 | else |
134 | reg &= ~bitmask; | 332 | reg &= ~bitmask; |
135 | writel(reg, nmk_chip->addr + NMK_GPIO_FIMSC); | 333 | writel(reg, nmk_chip->addr + fimsc); |
136 | } | 334 | } |
137 | } | 335 | } |
138 | 336 | ||
139 | static void nmk_gpio_irq_modify(unsigned int irq, bool enable) | 337 | static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which, |
338 | bool enable) | ||
140 | { | 339 | { |
141 | int gpio; | 340 | int gpio; |
142 | struct nmk_gpio_chip *nmk_chip; | 341 | struct nmk_gpio_chip *nmk_chip; |
@@ -147,26 +346,35 @@ static void nmk_gpio_irq_modify(unsigned int irq, bool enable) | |||
147 | nmk_chip = get_irq_chip_data(irq); | 346 | nmk_chip = get_irq_chip_data(irq); |
148 | bitmask = nmk_gpio_get_bitmask(gpio); | 347 | bitmask = nmk_gpio_get_bitmask(gpio); |
149 | if (!nmk_chip) | 348 | if (!nmk_chip) |
150 | return; | 349 | return -EINVAL; |
151 | 350 | ||
152 | spin_lock_irqsave(&nmk_chip->lock, flags); | 351 | spin_lock_irqsave(&nmk_chip->lock, flags); |
153 | __nmk_gpio_irq_modify(nmk_chip, gpio, enable); | 352 | __nmk_gpio_irq_modify(nmk_chip, gpio, which, enable); |
154 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | 353 | spin_unlock_irqrestore(&nmk_chip->lock, flags); |
354 | |||
355 | return 0; | ||
155 | } | 356 | } |
156 | 357 | ||
157 | static void nmk_gpio_irq_mask(unsigned int irq) | 358 | static void nmk_gpio_irq_mask(unsigned int irq) |
158 | { | 359 | { |
159 | nmk_gpio_irq_modify(irq, false); | 360 | nmk_gpio_irq_modify(irq, NORMAL, false); |
160 | }; | 361 | } |
161 | 362 | ||
162 | static void nmk_gpio_irq_unmask(unsigned int irq) | 363 | static void nmk_gpio_irq_unmask(unsigned int irq) |
163 | { | 364 | { |
164 | nmk_gpio_irq_modify(irq, true); | 365 | nmk_gpio_irq_modify(irq, NORMAL, true); |
366 | } | ||
367 | |||
368 | static int nmk_gpio_irq_set_wake(unsigned int irq, unsigned int on) | ||
369 | { | ||
370 | return nmk_gpio_irq_modify(irq, WAKE, on); | ||
165 | } | 371 | } |
166 | 372 | ||
167 | static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) | 373 | static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) |
168 | { | 374 | { |
169 | bool enabled = !(irq_to_desc(irq)->status & IRQ_DISABLED); | 375 | struct irq_desc *desc = irq_to_desc(irq); |
376 | bool enabled = !(desc->status & IRQ_DISABLED); | ||
377 | bool wake = desc->wake_depth; | ||
170 | int gpio; | 378 | int gpio; |
171 | struct nmk_gpio_chip *nmk_chip; | 379 | struct nmk_gpio_chip *nmk_chip; |
172 | unsigned long flags; | 380 | unsigned long flags; |
@@ -186,7 +394,10 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) | |||
186 | spin_lock_irqsave(&nmk_chip->lock, flags); | 394 | spin_lock_irqsave(&nmk_chip->lock, flags); |
187 | 395 | ||
188 | if (enabled) | 396 | if (enabled) |
189 | __nmk_gpio_irq_modify(nmk_chip, gpio, false); | 397 | __nmk_gpio_irq_modify(nmk_chip, gpio, NORMAL, false); |
398 | |||
399 | if (wake) | ||
400 | __nmk_gpio_irq_modify(nmk_chip, gpio, WAKE, false); | ||
190 | 401 | ||
191 | nmk_chip->edge_rising &= ~bitmask; | 402 | nmk_chip->edge_rising &= ~bitmask; |
192 | if (type & IRQ_TYPE_EDGE_RISING) | 403 | if (type & IRQ_TYPE_EDGE_RISING) |
@@ -197,7 +408,10 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) | |||
197 | nmk_chip->edge_falling |= bitmask; | 408 | nmk_chip->edge_falling |= bitmask; |
198 | 409 | ||
199 | if (enabled) | 410 | if (enabled) |
200 | __nmk_gpio_irq_modify(nmk_chip, gpio, true); | 411 | __nmk_gpio_irq_modify(nmk_chip, gpio, NORMAL, true); |
412 | |||
413 | if (wake) | ||
414 | __nmk_gpio_irq_modify(nmk_chip, gpio, WAKE, true); | ||
201 | 415 | ||
202 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | 416 | spin_unlock_irqrestore(&nmk_chip->lock, flags); |
203 | 417 | ||
@@ -210,6 +424,7 @@ static struct irq_chip nmk_gpio_irq_chip = { | |||
210 | .mask = nmk_gpio_irq_mask, | 424 | .mask = nmk_gpio_irq_mask, |
211 | .unmask = nmk_gpio_irq_unmask, | 425 | .unmask = nmk_gpio_irq_unmask, |
212 | .set_type = nmk_gpio_irq_set_type, | 426 | .set_type = nmk_gpio_irq_set_type, |
427 | .set_wake = nmk_gpio_irq_set_wake, | ||
213 | }; | 428 | }; |
214 | 429 | ||
215 | static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | 430 | static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) |
@@ -266,16 +481,6 @@ static int nmk_gpio_make_input(struct gpio_chip *chip, unsigned offset) | |||
266 | return 0; | 481 | return 0; |
267 | } | 482 | } |
268 | 483 | ||
269 | static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset, | ||
270 | int val) | ||
271 | { | ||
272 | struct nmk_gpio_chip *nmk_chip = | ||
273 | container_of(chip, struct nmk_gpio_chip, chip); | ||
274 | |||
275 | writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS); | ||
276 | return 0; | ||
277 | } | ||
278 | |||
279 | static int nmk_gpio_get_input(struct gpio_chip *chip, unsigned offset) | 484 | static int nmk_gpio_get_input(struct gpio_chip *chip, unsigned offset) |
280 | { | 485 | { |
281 | struct nmk_gpio_chip *nmk_chip = | 486 | struct nmk_gpio_chip *nmk_chip = |
@@ -298,12 +503,33 @@ static void nmk_gpio_set_output(struct gpio_chip *chip, unsigned offset, | |||
298 | writel(bit, nmk_chip->addr + NMK_GPIO_DATC); | 503 | writel(bit, nmk_chip->addr + NMK_GPIO_DATC); |
299 | } | 504 | } |
300 | 505 | ||
506 | static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset, | ||
507 | int val) | ||
508 | { | ||
509 | struct nmk_gpio_chip *nmk_chip = | ||
510 | container_of(chip, struct nmk_gpio_chip, chip); | ||
511 | |||
512 | writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS); | ||
513 | nmk_gpio_set_output(chip, offset, val); | ||
514 | |||
515 | return 0; | ||
516 | } | ||
517 | |||
518 | static int nmk_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | ||
519 | { | ||
520 | struct nmk_gpio_chip *nmk_chip = | ||
521 | container_of(chip, struct nmk_gpio_chip, chip); | ||
522 | |||
523 | return NOMADIK_GPIO_TO_IRQ(nmk_chip->chip.base) + offset; | ||
524 | } | ||
525 | |||
301 | /* This structure is replicated for each GPIO block allocated at probe time */ | 526 | /* This structure is replicated for each GPIO block allocated at probe time */ |
302 | static struct gpio_chip nmk_gpio_template = { | 527 | static struct gpio_chip nmk_gpio_template = { |
303 | .direction_input = nmk_gpio_make_input, | 528 | .direction_input = nmk_gpio_make_input, |
304 | .get = nmk_gpio_get_input, | 529 | .get = nmk_gpio_get_input, |
305 | .direction_output = nmk_gpio_make_output, | 530 | .direction_output = nmk_gpio_make_output, |
306 | .set = nmk_gpio_set_output, | 531 | .set = nmk_gpio_set_output, |
532 | .to_irq = nmk_gpio_to_irq, | ||
307 | .ngpio = NMK_GPIO_PER_CHIP, | 533 | .ngpio = NMK_GPIO_PER_CHIP, |
308 | .can_sleep = 0, | 534 | .can_sleep = 0, |
309 | }; | 535 | }; |
@@ -393,30 +619,12 @@ out: | |||
393 | return ret; | 619 | return ret; |
394 | } | 620 | } |
395 | 621 | ||
396 | static int __exit nmk_gpio_remove(struct platform_device *dev) | ||
397 | { | ||
398 | struct nmk_gpio_chip *nmk_chip; | ||
399 | struct resource *res; | ||
400 | |||
401 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); | ||
402 | |||
403 | nmk_chip = platform_get_drvdata(dev); | ||
404 | gpiochip_remove(&nmk_chip->chip); | ||
405 | clk_disable(nmk_chip->clk); | ||
406 | clk_put(nmk_chip->clk); | ||
407 | kfree(nmk_chip); | ||
408 | release_mem_region(res->start, resource_size(res)); | ||
409 | return 0; | ||
410 | } | ||
411 | |||
412 | |||
413 | static struct platform_driver nmk_gpio_driver = { | 622 | static struct platform_driver nmk_gpio_driver = { |
414 | .driver = { | 623 | .driver = { |
415 | .owner = THIS_MODULE, | 624 | .owner = THIS_MODULE, |
416 | .name = "gpio", | 625 | .name = "gpio", |
417 | }, | 626 | }, |
418 | .probe = nmk_gpio_probe, | 627 | .probe = nmk_gpio_probe, |
419 | .remove = __exit_p(nmk_gpio_remove), | ||
420 | .suspend = NULL, /* to be done */ | 628 | .suspend = NULL, /* to be done */ |
421 | .resume = NULL, | 629 | .resume = NULL, |
422 | }; | 630 | }; |
@@ -426,7 +634,7 @@ static int __init nmk_gpio_init(void) | |||
426 | return platform_driver_register(&nmk_gpio_driver); | 634 | return platform_driver_register(&nmk_gpio_driver); |
427 | } | 635 | } |
428 | 636 | ||
429 | arch_initcall(nmk_gpio_init); | 637 | core_initcall(nmk_gpio_init); |
430 | 638 | ||
431 | MODULE_AUTHOR("Prafulla WADASKAR and Alessandro Rubini"); | 639 | MODULE_AUTHOR("Prafulla WADASKAR and Alessandro Rubini"); |
432 | MODULE_DESCRIPTION("Nomadik GPIO Driver"); | 640 | MODULE_DESCRIPTION("Nomadik GPIO Driver"); |
diff --git a/arch/arm/plat-nomadik/include/plat/gpio.h b/arch/arm/plat-nomadik/include/plat/gpio.h index 4200811249ca..aba355101f49 100644 --- a/arch/arm/plat-nomadik/include/plat/gpio.h +++ b/arch/arm/plat-nomadik/include/plat/gpio.h | |||
@@ -55,6 +55,21 @@ | |||
55 | #define NMK_GPIO_ALT_B 2 | 55 | #define NMK_GPIO_ALT_B 2 |
56 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) | 56 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) |
57 | 57 | ||
58 | /* Pull up/down values */ | ||
59 | enum nmk_gpio_pull { | ||
60 | NMK_GPIO_PULL_NONE, | ||
61 | NMK_GPIO_PULL_UP, | ||
62 | NMK_GPIO_PULL_DOWN, | ||
63 | }; | ||
64 | |||
65 | /* Sleep mode */ | ||
66 | enum nmk_gpio_slpm { | ||
67 | NMK_GPIO_SLPM_INPUT, | ||
68 | NMK_GPIO_SLPM_NOCHANGE, | ||
69 | }; | ||
70 | |||
71 | extern int nmk_gpio_set_slpm(int gpio, enum nmk_gpio_slpm mode); | ||
72 | extern int nmk_gpio_set_pull(int gpio, enum nmk_gpio_pull pull); | ||
58 | extern int nmk_gpio_set_mode(int gpio, int gpio_mode); | 73 | extern int nmk_gpio_set_mode(int gpio, int gpio_mode); |
59 | extern int nmk_gpio_get_mode(int gpio); | 74 | extern int nmk_gpio_get_mode(int gpio); |
60 | 75 | ||
diff --git a/arch/arm/plat-nomadik/include/plat/mtu.h b/arch/arm/plat-nomadik/include/plat/mtu.h index 42c907258b14..65704a3d4241 100644 --- a/arch/arm/plat-nomadik/include/plat/mtu.h +++ b/arch/arm/plat-nomadik/include/plat/mtu.h | |||
@@ -1,6 +1,12 @@ | |||
1 | #ifndef __PLAT_MTU_H | 1 | #ifndef __PLAT_MTU_H |
2 | #define __PLAT_MTU_H | 2 | #define __PLAT_MTU_H |
3 | 3 | ||
4 | /* | ||
5 | * Guaranteed runtime conversion range in seconds for | ||
6 | * the clocksource and clockevent. | ||
7 | */ | ||
8 | #define MTU_MIN_RANGE 4 | ||
9 | |||
4 | /* should be set by the platform code */ | 10 | /* should be set by the platform code */ |
5 | extern void __iomem *mtu_base; | 11 | extern void __iomem *mtu_base; |
6 | 12 | ||
diff --git a/arch/arm/plat-nomadik/include/plat/pincfg.h b/arch/arm/plat-nomadik/include/plat/pincfg.h new file mode 100644 index 000000000000..7eed11c1038d --- /dev/null +++ b/arch/arm/plat-nomadik/include/plat/pincfg.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License, version 2 | ||
5 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
6 | * | ||
7 | * Based on arch/arm/mach-pxa/include/mach/mfp.h: | ||
8 | * Copyright (C) 2007 Marvell International Ltd. | ||
9 | * eric miao <eric.miao@marvell.com> | ||
10 | */ | ||
11 | |||
12 | #ifndef __PLAT_PINCFG_H | ||
13 | #define __PLAT_PINCFG_H | ||
14 | |||
15 | /* | ||
16 | * pin configurations are represented by 32-bit integers: | ||
17 | * | ||
18 | * bit 0.. 8 - Pin Number (512 Pins Maximum) | ||
19 | * bit 9..10 - Alternate Function Selection | ||
20 | * bit 11..12 - Pull up/down state | ||
21 | * bit 13 - Sleep mode behaviour | ||
22 | * | ||
23 | * to facilitate the definition, the following macros are provided | ||
24 | * | ||
25 | * PIN_CFG_DEFAULT - default config (0): | ||
26 | * pull up/down = disabled | ||
27 | * sleep mode = input | ||
28 | * | ||
29 | * PIN_CFG - default config with alternate function | ||
30 | * PIN_CFG_PULL - default config with alternate function and pull up/down | ||
31 | */ | ||
32 | |||
33 | typedef unsigned long pin_cfg_t; | ||
34 | |||
35 | #define PIN_NUM_MASK 0x1ff | ||
36 | #define PIN_NUM(x) ((x) & PIN_NUM_MASK) | ||
37 | |||
38 | #define PIN_ALT_SHIFT 9 | ||
39 | #define PIN_ALT_MASK (0x3 << PIN_ALT_SHIFT) | ||
40 | #define PIN_ALT(x) (((x) & PIN_ALT_MASK) >> PIN_ALT_SHIFT) | ||
41 | #define PIN_GPIO (NMK_GPIO_ALT_GPIO << PIN_ALT_SHIFT) | ||
42 | #define PIN_ALT_A (NMK_GPIO_ALT_A << PIN_ALT_SHIFT) | ||
43 | #define PIN_ALT_B (NMK_GPIO_ALT_B << PIN_ALT_SHIFT) | ||
44 | #define PIN_ALT_C (NMK_GPIO_ALT_C << PIN_ALT_SHIFT) | ||
45 | |||
46 | #define PIN_PULL_SHIFT 11 | ||
47 | #define PIN_PULL_MASK (0x3 << PIN_PULL_SHIFT) | ||
48 | #define PIN_PULL(x) (((x) & PIN_PULL_MASK) >> PIN_PULL_SHIFT) | ||
49 | #define PIN_PULL_NONE (NMK_GPIO_PULL_NONE << PIN_PULL_SHIFT) | ||
50 | #define PIN_PULL_UP (NMK_GPIO_PULL_UP << PIN_PULL_SHIFT) | ||
51 | #define PIN_PULL_DOWN (NMK_GPIO_PULL_DOWN << PIN_PULL_SHIFT) | ||
52 | |||
53 | #define PIN_SLPM_SHIFT 13 | ||
54 | #define PIN_SLPM_MASK (0x1 << PIN_SLPM_SHIFT) | ||
55 | #define PIN_SLPM(x) (((x) & PIN_SLPM_MASK) >> PIN_SLPM_SHIFT) | ||
56 | #define PIN_SLPM_INPUT (NMK_GPIO_SLPM_INPUT << PIN_SLPM_SHIFT) | ||
57 | #define PIN_SLPM_NOCHANGE (NMK_GPIO_SLPM_NOCHANGE << PIN_SLPM_SHIFT) | ||
58 | |||
59 | #define PIN_CFG_DEFAULT (PIN_PULL_NONE | PIN_SLPM_INPUT) | ||
60 | |||
61 | #define PIN_CFG(num, alt) \ | ||
62 | (PIN_CFG_DEFAULT |\ | ||
63 | (PIN_NUM(num) | PIN_##alt)) | ||
64 | |||
65 | #define PIN_CFG_PULL(num, alt, pull) \ | ||
66 | ((PIN_CFG_DEFAULT & ~PIN_PULL_MASK) |\ | ||
67 | (PIN_NUM(num) | PIN_##alt | PIN_PULL_##pull)) | ||
68 | |||
69 | extern int nmk_config_pin(pin_cfg_t cfg); | ||
70 | extern int nmk_config_pins(pin_cfg_t *cfgs, int num); | ||
71 | |||
72 | #endif | ||
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c index 08aaa4a7f65f..ea3ca86c5283 100644 --- a/arch/arm/plat-nomadik/timer.c +++ b/arch/arm/plat-nomadik/timer.c | |||
@@ -42,7 +42,6 @@ static struct clocksource nmdk_clksrc = { | |||
42 | .rating = 200, | 42 | .rating = 200, |
43 | .read = nmdk_read_timer_dummy, | 43 | .read = nmdk_read_timer_dummy, |
44 | .mask = CLOCKSOURCE_MASK(32), | 44 | .mask = CLOCKSOURCE_MASK(32), |
45 | .shift = 20, | ||
46 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 45 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
47 | }; | 46 | }; |
48 | 47 | ||
@@ -82,6 +81,12 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode, | |||
82 | case CLOCK_EVT_MODE_UNUSED: | 81 | case CLOCK_EVT_MODE_UNUSED: |
83 | /* disable irq */ | 82 | /* disable irq */ |
84 | writel(0, mtu_base + MTU_IMSC); | 83 | writel(0, mtu_base + MTU_IMSC); |
84 | /* disable timer */ | ||
85 | cr = readl(mtu_base + MTU_CR(1)); | ||
86 | cr &= ~MTU_CRn_ENA; | ||
87 | writel(cr, mtu_base + MTU_CR(1)); | ||
88 | /* load some high default value */ | ||
89 | writel(0xffffffff, mtu_base + MTU_LR(1)); | ||
85 | break; | 90 | break; |
86 | case CLOCK_EVT_MODE_RESUME: | 91 | case CLOCK_EVT_MODE_RESUME: |
87 | break; | 92 | break; |
@@ -98,7 +103,6 @@ static int nmdk_clkevt_next(unsigned long evt, struct clock_event_device *ev) | |||
98 | static struct clock_event_device nmdk_clkevt = { | 103 | static struct clock_event_device nmdk_clkevt = { |
99 | .name = "mtu_1", | 104 | .name = "mtu_1", |
100 | .features = CLOCK_EVT_FEAT_ONESHOT, | 105 | .features = CLOCK_EVT_FEAT_ONESHOT, |
101 | .shift = 32, | ||
102 | .rating = 200, | 106 | .rating = 200, |
103 | .set_mode = nmdk_clkevt_mode, | 107 | .set_mode = nmdk_clkevt_mode, |
104 | .set_next_event = nmdk_clkevt_next, | 108 | .set_next_event = nmdk_clkevt_next, |
@@ -151,6 +155,7 @@ void __init nmdk_timer_init(void) | |||
151 | } else { | 155 | } else { |
152 | cr |= MTU_CRn_PRESCALE_1; | 156 | cr |= MTU_CRn_PRESCALE_1; |
153 | } | 157 | } |
158 | clocksource_calc_mult_shift(&nmdk_clksrc, rate, MTU_MIN_RANGE); | ||
154 | 159 | ||
155 | /* Timer 0 is the free running clocksource */ | 160 | /* Timer 0 is the free running clocksource */ |
156 | writel(cr, mtu_base + MTU_CR(0)); | 161 | writel(cr, mtu_base + MTU_CR(0)); |
@@ -158,7 +163,6 @@ void __init nmdk_timer_init(void) | |||
158 | writel(0, mtu_base + MTU_BGLR(0)); | 163 | writel(0, mtu_base + MTU_BGLR(0)); |
159 | writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0)); | 164 | writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0)); |
160 | 165 | ||
161 | nmdk_clksrc.mult = clocksource_hz2mult(rate, nmdk_clksrc.shift); | ||
162 | /* Now the scheduling clock is ready */ | 166 | /* Now the scheduling clock is ready */ |
163 | nmdk_clksrc.read = nmdk_read_timer; | 167 | nmdk_clksrc.read = nmdk_read_timer; |
164 | 168 | ||
@@ -175,8 +179,10 @@ void __init nmdk_timer_init(void) | |||
175 | } else { | 179 | } else { |
176 | cr |= MTU_CRn_PRESCALE_1; | 180 | cr |= MTU_CRn_PRESCALE_1; |
177 | } | 181 | } |
182 | clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE); | ||
183 | |||
178 | writel(cr | MTU_CRn_ONESHOT, mtu_base + MTU_CR(1)); /* off, currently */ | 184 | writel(cr | MTU_CRn_ONESHOT, mtu_base + MTU_CR(1)); /* off, currently */ |
179 | nmdk_clkevt.mult = div_sc(rate, NSEC_PER_SEC, nmdk_clkevt.shift); | 185 | |
180 | nmdk_clkevt.max_delta_ns = | 186 | nmdk_clkevt.max_delta_ns = |
181 | clockevent_delta2ns(0xffffffff, &nmdk_clkevt); | 187 | clockevent_delta2ns(0xffffffff, &nmdk_clkevt); |
182 | nmdk_clkevt.min_delta_ns = | 188 | nmdk_clkevt.min_delta_ns = |
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S index 1670734b7e51..37fa593884ee 100644 --- a/arch/arm/plat-spear/include/plat/debug-macro.S +++ b/arch/arm/plat-spear/include/plat/debug-macro.S | |||
@@ -17,8 +17,8 @@ | |||
17 | .macro addruart, rx | 17 | .macro addruart, rx |
18 | mrc p15, 0, \rx, c1, c0 | 18 | mrc p15, 0, \rx, c1, c0 |
19 | tst \rx, #1 @ MMU enabled? | 19 | tst \rx, #1 @ MMU enabled? |
20 | moveq \rx, =SPEAR_DBG_UART_BASE @ Physical base | 20 | moveq \rx, #SPEAR_DBG_UART_BASE @ Physical base |
21 | movne \rx, =VA_SPEAR_DBG_UART_BASE @ Virtual base | 21 | movne \rx, #VA_SPEAR_DBG_UART_BASE @ Virtual base |
22 | .endm | 22 | .endm |
23 | 23 | ||
24 | .macro senduart, rd, rx | 24 | .macro senduart, rd, rx |
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c index a1025d38f383..ab211652e4ca 100644 --- a/arch/arm/plat-spear/time.c +++ b/arch/arm/plat-spear/time.c | |||
@@ -58,6 +58,11 @@ | |||
58 | 58 | ||
59 | #define INT_STATUS 0x1 | 59 | #define INT_STATUS 0x1 |
60 | 60 | ||
61 | /* | ||
62 | * Minimum clocksource/clockevent timer range in seconds | ||
63 | */ | ||
64 | #define SPEAR_MIN_RANGE 4 | ||
65 | |||
61 | static __iomem void *gpt_base; | 66 | static __iomem void *gpt_base; |
62 | static struct clk *gpt_clk; | 67 | static struct clk *gpt_clk; |
63 | 68 | ||
@@ -66,44 +71,6 @@ static void clockevent_set_mode(enum clock_event_mode mode, | |||
66 | static int clockevent_next_event(unsigned long evt, | 71 | static int clockevent_next_event(unsigned long evt, |
67 | struct clock_event_device *clk_event_dev); | 72 | struct clock_event_device *clk_event_dev); |
68 | 73 | ||
69 | /* | ||
70 | * Following clocksource_set_clock and clockevent_set_clock picked | ||
71 | * from arch/mips/kernel/time.c | ||
72 | */ | ||
73 | |||
74 | void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) | ||
75 | { | ||
76 | u64 temp; | ||
77 | u32 shift; | ||
78 | |||
79 | /* Find a shift value */ | ||
80 | for (shift = 32; shift > 0; shift--) { | ||
81 | temp = (u64) NSEC_PER_SEC << shift; | ||
82 | do_div(temp, clock); | ||
83 | if ((temp >> 32) == 0) | ||
84 | break; | ||
85 | } | ||
86 | cs->shift = shift; | ||
87 | cs->mult = (u32) temp; | ||
88 | } | ||
89 | |||
90 | void __init clockevent_set_clock(struct clock_event_device *cd, | ||
91 | unsigned int clock) | ||
92 | { | ||
93 | u64 temp; | ||
94 | u32 shift; | ||
95 | |||
96 | /* Find a shift value */ | ||
97 | for (shift = 32; shift > 0; shift--) { | ||
98 | temp = (u64) clock << shift; | ||
99 | do_div(temp, NSEC_PER_SEC); | ||
100 | if ((temp >> 32) == 0) | ||
101 | break; | ||
102 | } | ||
103 | cd->shift = shift; | ||
104 | cd->mult = (u32) temp; | ||
105 | } | ||
106 | |||
107 | static cycle_t clocksource_read_cycles(struct clocksource *cs) | 74 | static cycle_t clocksource_read_cycles(struct clocksource *cs) |
108 | { | 75 | { |
109 | return (cycle_t) readw(gpt_base + COUNT(CLKSRC)); | 76 | return (cycle_t) readw(gpt_base + COUNT(CLKSRC)); |
@@ -138,7 +105,7 @@ static void spear_clocksource_init(void) | |||
138 | val |= CTRL_ENABLE ; | 105 | val |= CTRL_ENABLE ; |
139 | writew(val, gpt_base + CR(CLKSRC)); | 106 | writew(val, gpt_base + CR(CLKSRC)); |
140 | 107 | ||
141 | clocksource_set_clock(&clksrc, tick_rate); | 108 | clocksource_calc_mult_shift(&clksrc, tick_rate, SPEAR_MIN_RANGE); |
142 | 109 | ||
143 | /* register the clocksource */ | 110 | /* register the clocksource */ |
144 | clocksource_register(&clksrc); | 111 | clocksource_register(&clksrc); |
@@ -233,7 +200,7 @@ static void __init spear_clockevent_init(void) | |||
233 | tick_rate = clk_get_rate(gpt_clk); | 200 | tick_rate = clk_get_rate(gpt_clk); |
234 | tick_rate >>= CTRL_PRESCALER16; | 201 | tick_rate >>= CTRL_PRESCALER16; |
235 | 202 | ||
236 | clockevent_set_clock(&clkevt, tick_rate); | 203 | clockevents_calc_mult_shift(&clkevt, tick_rate, SPEAR_MIN_RANGE); |
237 | 204 | ||
238 | clkevt.max_delta_ns = clockevent_delta2ns(0xfff0, | 205 | clkevt.max_delta_ns = clockevent_delta2ns(0xfff0, |
239 | &clkevt); | 206 | &clkevt); |
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile index 9b1a66816aa6..5cf88e8427b1 100644 --- a/arch/arm/plat-versatile/Makefile +++ b/arch/arm/plat-versatile/Makefile | |||
@@ -2,3 +2,7 @@ obj-y := clock.o | |||
2 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o | 2 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o |
3 | obj-$(CONFIG_ARCH_REALVIEW) += sched-clock.o | 3 | obj-$(CONFIG_ARCH_REALVIEW) += sched-clock.o |
4 | obj-$(CONFIG_ARCH_VERSATILE) += sched-clock.o | 4 | obj-$(CONFIG_ARCH_VERSATILE) += sched-clock.o |
5 | ifeq ($(CONFIG_LEDS_CLASS),y) | ||
6 | obj-$(CONFIG_ARCH_REALVIEW) += leds.o | ||
7 | obj-$(CONFIG_ARCH_VERSATILE) += leds.o | ||
8 | endif | ||
diff --git a/arch/arm/plat-versatile/leds.c b/arch/arm/plat-versatile/leds.c new file mode 100644 index 000000000000..3169fa555ea6 --- /dev/null +++ b/arch/arm/plat-versatile/leds.c | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * Driver for the 8 user LEDs found on the RealViews and Versatiles | ||
3 | * Based on DaVinci's DM365 board code | ||
4 | * | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | * Author: Linus Walleij <triad@df.lth.se> | ||
7 | */ | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/init.h> | ||
10 | #include <linux/io.h> | ||
11 | #include <linux/slab.h> | ||
12 | #include <linux/leds.h> | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/platform.h> | ||
16 | |||
17 | #ifdef VERSATILE_SYS_BASE | ||
18 | #define LEDREG (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET) | ||
19 | #endif | ||
20 | |||
21 | #ifdef REALVIEW_SYS_BASE | ||
22 | #define LEDREG (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LED_OFFSET) | ||
23 | #endif | ||
24 | |||
25 | struct versatile_led { | ||
26 | struct led_classdev cdev; | ||
27 | u8 mask; | ||
28 | }; | ||
29 | |||
30 | /* | ||
31 | * The triggers lines up below will only be used if the | ||
32 | * LED triggers are compiled in. | ||
33 | */ | ||
34 | static const struct { | ||
35 | const char *name; | ||
36 | const char *trigger; | ||
37 | } versatile_leds[] = { | ||
38 | { "versatile:0", "heartbeat", }, | ||
39 | { "versatile:1", "mmc0", }, | ||
40 | { "versatile:2", }, | ||
41 | { "versatile:3", }, | ||
42 | { "versatile:4", }, | ||
43 | { "versatile:5", }, | ||
44 | { "versatile:6", }, | ||
45 | { "versatile:7", }, | ||
46 | }; | ||
47 | |||
48 | static void versatile_led_set(struct led_classdev *cdev, | ||
49 | enum led_brightness b) | ||
50 | { | ||
51 | struct versatile_led *led = container_of(cdev, | ||
52 | struct versatile_led, cdev); | ||
53 | u32 reg = readl(LEDREG); | ||
54 | |||
55 | if (b != LED_OFF) | ||
56 | reg |= led->mask; | ||
57 | else | ||
58 | reg &= ~led->mask; | ||
59 | writel(reg, LEDREG); | ||
60 | } | ||
61 | |||
62 | static enum led_brightness versatile_led_get(struct led_classdev *cdev) | ||
63 | { | ||
64 | struct versatile_led *led = container_of(cdev, | ||
65 | struct versatile_led, cdev); | ||
66 | u32 reg = readl(LEDREG); | ||
67 | |||
68 | return (reg & led->mask) ? LED_FULL : LED_OFF; | ||
69 | } | ||
70 | |||
71 | static int __init versatile_leds_init(void) | ||
72 | { | ||
73 | int i; | ||
74 | |||
75 | /* All ON */ | ||
76 | writel(0xff, LEDREG); | ||
77 | for (i = 0; i < ARRAY_SIZE(versatile_leds); i++) { | ||
78 | struct versatile_led *led; | ||
79 | |||
80 | led = kzalloc(sizeof(*led), GFP_KERNEL); | ||
81 | if (!led) | ||
82 | break; | ||
83 | |||
84 | led->cdev.name = versatile_leds[i].name; | ||
85 | led->cdev.brightness_set = versatile_led_set; | ||
86 | led->cdev.brightness_get = versatile_led_get; | ||
87 | led->cdev.default_trigger = versatile_leds[i].trigger; | ||
88 | led->mask = BIT(i); | ||
89 | |||
90 | if (led_classdev_register(NULL, &led->cdev) < 0) { | ||
91 | kfree(led); | ||
92 | break; | ||
93 | } | ||
94 | } | ||
95 | |||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | /* | ||
100 | * Since we may have triggers on any subsystem, defer registration | ||
101 | * until after subsystem_init. | ||
102 | */ | ||
103 | fs_initcall(versatile_leds_init); | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 315a540c7ce5..8063a322c790 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | 17 | ||
18 | #include <asm/cputype.h> | ||
18 | #include <asm/thread_notify.h> | 19 | #include <asm/thread_notify.h> |
19 | #include <asm/vfp.h> | 20 | #include <asm/vfp.h> |
20 | 21 | ||
@@ -549,10 +550,13 @@ static int __init vfp_init(void) | |||
549 | /* | 550 | /* |
550 | * Check for the presence of the Advanced SIMD | 551 | * Check for the presence of the Advanced SIMD |
551 | * load/store instructions, integer and single | 552 | * load/store instructions, integer and single |
552 | * precision floating point operations. | 553 | * precision floating point operations. Only check |
554 | * for NEON if the hardware has the MVFR registers. | ||
553 | */ | 555 | */ |
554 | if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) | 556 | if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) { |
555 | elf_hwcap |= HWCAP_NEON; | 557 | if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) |
558 | elf_hwcap |= HWCAP_NEON; | ||
559 | } | ||
556 | #endif | 560 | #endif |
557 | } | 561 | } |
558 | return 0; | 562 | return 0; |