Commit 9a55d975 authored by Russell King's avatar Russell King

Merge branch 'devel-stable' into for-linus

Conflicts:
	arch/arm/Kconfig
	arch/arm/mach-ns9xxx/include/mach/uncompress.h
parents ec19628d dc7ad3b3
...@@ -469,7 +469,7 @@ config ARCH_IXP4XX ...@@ -469,7 +469,7 @@ config ARCH_IXP4XX
config ARCH_DOVE config ARCH_DOVE
bool "Marvell Dove" bool "Marvell Dove"
select CPU_V6K select CPU_V7
select PCI select PCI
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
...@@ -850,6 +850,7 @@ config ARCH_DAVINCI ...@@ -850,6 +850,7 @@ config ARCH_DAVINCI
select HAVE_IDE select HAVE_IDE
select CLKDEV_LOOKUP select CLKDEV_LOOKUP
select GENERIC_ALLOCATOR select GENERIC_ALLOCATOR
select GENERIC_IRQ_CHIP
select ARCH_HAS_HOLES_MEMORYMODEL select ARCH_HAS_HOLES_MEMORYMODEL
help help
Support for TI's DaVinci platform. Support for TI's DaVinci platform.
...@@ -1027,6 +1028,7 @@ config PLAT_IOP ...@@ -1027,6 +1028,7 @@ config PLAT_IOP
config PLAT_ORION config PLAT_ORION
bool bool
select CLKSRC_MMIO select CLKSRC_MMIO
select GENERIC_IRQ_CHIP
select HAVE_SCHED_CLOCK select HAVE_SCHED_CLOCK
config PLAT_PXA config PLAT_PXA
......
...@@ -158,9 +158,8 @@ machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 ...@@ -158,9 +158,8 @@ machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
machine-$(CONFIG_ARCH_MX1) := imx machine-$(CONFIG_ARCH_MX1) := imx
machine-$(CONFIG_ARCH_MX2) := imx machine-$(CONFIG_ARCH_MX2) := imx
machine-$(CONFIG_ARCH_MX25) := imx machine-$(CONFIG_ARCH_MX25) := imx
machine-$(CONFIG_ARCH_MX3) := mx3 machine-$(CONFIG_ARCH_MX3) := imx
machine-$(CONFIG_ARCH_MX5) := mx5 machine-$(CONFIG_ARCH_MX5) := mx5
machine-$(CONFIG_ARCH_MXC91231) := mxc91231
machine-$(CONFIG_ARCH_MXS) := mxs machine-$(CONFIG_ARCH_MXS) := mxs
machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_NETX) := netx
machine-$(CONFIG_ARCH_NOMADIK) := nomadik machine-$(CONFIG_ARCH_NOMADIK) := nomadik
......
...@@ -98,8 +98,6 @@ endif ...@@ -98,8 +98,6 @@ endif
ccflags-y := -fpic -fno-builtin ccflags-y := -fpic -fno-builtin
asflags-y := -Wa,-march=all asflags-y := -Wa,-march=all
# Provide size of uncompressed kernel to the decompressor via a linker symbol.
LDFLAGS_vmlinux = --defsym _image_size=$(shell stat -c "%s" $(obj)/../Image)
# Supply ZRELADDR to the decompressor via a linker symbol. # Supply ZRELADDR to the decompressor via a linker symbol.
ifneq ($(CONFIG_AUTO_ZRELADDR),y) ifneq ($(CONFIG_AUTO_ZRELADDR),y)
LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR) LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR)
...@@ -122,10 +120,23 @@ lib1funcs = $(obj)/lib1funcs.o ...@@ -122,10 +120,23 @@ lib1funcs = $(obj)/lib1funcs.o
$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE $(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
$(call cmd,shipped) $(call cmd,shipped)
# We need to prevent any GOTOFF relocs being used with references
# to symbols in the .bss section since we cannot relocate them
# independently from the rest at run time. This can be achieved by
# ensuring that no private .bss symbols exist, as global symbols
# always have a GOT entry which is what we need.
# The .data section is already discarded by the linker script so no need
# to bother about it here.
check_for_bad_syms = \
bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
[ -z "$$bad_syms" ] || \
( echo "following symbols must have non local/private scope:" >&2; \
echo "$$bad_syms" >&2; rm -f $@; false )
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
$(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE
$(call if_changed,ld) $(call if_changed,ld)
@: @$(check_for_bad_syms)
$(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE $(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE
$(call if_changed,$(suffix_y)) $(call if_changed,$(suffix_y))
......
...@@ -44,7 +44,7 @@ extern void error(char *); ...@@ -44,7 +44,7 @@ extern void error(char *);
#include "../../../../lib/decompress_unlzma.c" #include "../../../../lib/decompress_unlzma.c"
#endif #endif
void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
{ {
decompress(input, len, NULL, NULL, output, NULL, error); return decompress(input, len, NULL, NULL, output, NULL, error);
} }
...@@ -179,7 +179,7 @@ not_angel: ...@@ -179,7 +179,7 @@ not_angel:
bl cache_on bl cache_on
restart: adr r0, LC0 restart: adr r0, LC0
ldmia r0, {r1, r2, r3, r6, r9, r11, r12} ldmia r0, {r1, r2, r3, r6, r10, r11, r12}
ldr sp, [r0, #28] ldr sp, [r0, #28]
/* /*
...@@ -188,6 +188,20 @@ restart: adr r0, LC0 ...@@ -188,6 +188,20 @@ restart: adr r0, LC0
*/ */
sub r0, r0, r1 @ calculate the delta offset sub r0, r0, r1 @ calculate the delta offset
add r6, r6, r0 @ _edata add r6, r6, r0 @ _edata
add r10, r10, r0 @ inflated kernel size location
/*
* The kernel build system appends the size of the
* decompressed kernel at the end of the compressed data
* in little-endian form.
*/
ldrb r9, [r10, #0]
ldrb lr, [r10, #1]
orr r9, r9, lr, lsl #8
ldrb lr, [r10, #2]
ldrb r10, [r10, #3]
orr r9, r9, lr, lsl #16
orr r9, r9, r10, lsl #24
#ifndef CONFIG_ZBOOT_ROM #ifndef CONFIG_ZBOOT_ROM
/* malloc space is above the relocated stack (64k max) */ /* malloc space is above the relocated stack (64k max) */
...@@ -347,10 +361,10 @@ LC0: .word LC0 @ r1 ...@@ -347,10 +361,10 @@ LC0: .word LC0 @ r1
.word __bss_start @ r2 .word __bss_start @ r2
.word _end @ r3 .word _end @ r3
.word _edata @ r6 .word _edata @ r6
.word _image_size @ r9 .word input_data_end - 4 @ r10 (inflated size location)
.word _got_start @ r11 .word _got_start @ r11
.word _got_end @ ip .word _got_end @ ip
.word user_stack_end @ sp .word .L_user_stack_end @ sp
.size LC0, . - LC0 .size LC0, . - LC0
#ifdef CONFIG_ARCH_RPC #ifdef CONFIG_ARCH_RPC
...@@ -763,12 +777,6 @@ proc_types: ...@@ -763,12 +777,6 @@ proc_types:
W(b) __armv4_mmu_cache_off W(b) __armv4_mmu_cache_off
W(b) __armv6_mmu_cache_flush W(b) __armv6_mmu_cache_flush
.word 0x560f5810 @ Marvell PJ4 ARMv6
.word 0xff0ffff0
W(b) __armv4_mmu_cache_on
W(b) __armv4_mmu_cache_off
W(b) __armv6_mmu_cache_flush
.word 0x000f0000 @ new CPU Id .word 0x000f0000 @ new CPU Id
.word 0x000f0000 .word 0x000f0000
W(b) __armv7_mmu_cache_on W(b) __armv7_mmu_cache_on
...@@ -1094,5 +1102,5 @@ reloc_code_end: ...@@ -1094,5 +1102,5 @@ reloc_code_end:
.align .align
.section ".stack", "aw", %nobits .section ".stack", "aw", %nobits
user_stack: .space 4096 .L_user_stack: .space 4096
user_stack_end: .L_user_stack_end:
...@@ -26,8 +26,6 @@ unsigned int __machine_arch_type; ...@@ -26,8 +26,6 @@ unsigned int __machine_arch_type;
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/string.h> #include <asm/string.h>
#include <asm/unaligned.h>
static void putstr(const char *ptr); static void putstr(const char *ptr);
extern void error(char *x); extern void error(char *x);
...@@ -139,13 +137,12 @@ void *memcpy(void *__dest, __const void *__src, size_t __n) ...@@ -139,13 +137,12 @@ void *memcpy(void *__dest, __const void *__src, size_t __n)
} }
/* /*
* gzip delarations * gzip declarations
*/ */
extern char input_data[]; extern char input_data[];
extern char input_data_end[]; extern char input_data_end[];
unsigned char *output_data; unsigned char *output_data;
unsigned long output_ptr;
unsigned long free_mem_ptr; unsigned long free_mem_ptr;
unsigned long free_mem_end_ptr; unsigned long free_mem_end_ptr;
...@@ -170,15 +167,15 @@ asmlinkage void __div0(void) ...@@ -170,15 +167,15 @@ asmlinkage void __div0(void)
error("Attempting division by 0!"); error("Attempting division by 0!");
} }
extern void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)); extern int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x));
unsigned long void
decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
unsigned long free_mem_ptr_end_p, unsigned long free_mem_ptr_end_p,
int arch_id) int arch_id)
{ {
unsigned char *tmp; int ret;
output_data = (unsigned char *)output_start; output_data = (unsigned char *)output_start;
free_mem_ptr = free_mem_ptr_p; free_mem_ptr = free_mem_ptr_p;
...@@ -187,12 +184,11 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, ...@@ -187,12 +184,11 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
arch_decomp_setup(); arch_decomp_setup();
tmp = (unsigned char *) (((unsigned long)input_data_end) - 4);
output_ptr = get_unaligned_le32(tmp);
putstr("Uncompressing Linux..."); putstr("Uncompressing Linux...");
do_decompress(input_data, input_data_end - input_data, ret = do_decompress(input_data, input_data_end - input_data,
output_data, error); output_data, error);
if (ret)
error("decompressor returned an error");
else
putstr(" done, booting the kernel.\n"); putstr(" done, booting the kernel.\n");
return output_ptr;
} }
...@@ -49,7 +49,7 @@ struct gic_chip_data { ...@@ -49,7 +49,7 @@ struct gic_chip_data {
* Default make them NULL. * Default make them NULL.
*/ */
struct irq_chip gic_arch_extn = { struct irq_chip gic_arch_extn = {
.irq_ack = NULL, .irq_eoi = NULL,
.irq_mask = NULL, .irq_mask = NULL,
.irq_unmask = NULL, .irq_unmask = NULL,
.irq_retrigger = NULL, .irq_retrigger = NULL,
...@@ -84,21 +84,12 @@ static inline unsigned int gic_irq(struct irq_data *d) ...@@ -84,21 +84,12 @@ static inline unsigned int gic_irq(struct irq_data *d)
/* /*
* Routines to acknowledge, disable and enable interrupts * Routines to acknowledge, disable and enable interrupts
*/ */
static void gic_ack_irq(struct irq_data *d)
{
spin_lock(&irq_controller_lock);
if (gic_arch_extn.irq_ack)
gic_arch_extn.irq_ack(d);
writel(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
spin_unlock(&irq_controller_lock);
}
static void gic_mask_irq(struct irq_data *d) static void gic_mask_irq(struct irq_data *d)
{ {
u32 mask = 1 << (d->irq % 32); u32 mask = 1 << (d->irq % 32);
spin_lock(&irq_controller_lock); spin_lock(&irq_controller_lock);
writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
if (gic_arch_extn.irq_mask) if (gic_arch_extn.irq_mask)
gic_arch_extn.irq_mask(d); gic_arch_extn.irq_mask(d);
spin_unlock(&irq_controller_lock); spin_unlock(&irq_controller_lock);
...@@ -111,10 +102,21 @@ static void gic_unmask_irq(struct irq_data *d) ...@@ -111,10 +102,21 @@ static void gic_unmask_irq(struct irq_data *d)
spin_lock(&irq_controller_lock); spin_lock(&irq_controller_lock);
if (gic_arch_extn.irq_unmask) if (gic_arch_extn.irq_unmask)
gic_arch_extn.irq_unmask(d); gic_arch_extn.irq_unmask(d);
writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4);
spin_unlock(&irq_controller_lock); spin_unlock(&irq_controller_lock);
} }
static void gic_eoi_irq(struct irq_data *d)
{
if (gic_arch_extn.irq_eoi) {
spin_lock(&irq_controller_lock);
gic_arch_extn.irq_eoi(d);
spin_unlock(&irq_controller_lock);
}
writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
}
static int gic_set_type(struct irq_data *d, unsigned int type) static int gic_set_type(struct irq_data *d, unsigned int type)
{ {
void __iomem *base = gic_dist_base(d); void __iomem *base = gic_dist_base(d);
...@@ -138,7 +140,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) ...@@ -138,7 +140,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
if (gic_arch_extn.irq_set_type) if (gic_arch_extn.irq_set_type)
gic_arch_extn.irq_set_type(d, type); gic_arch_extn.irq_set_type(d, type);
val = readl(base + GIC_DIST_CONFIG + confoff); val = readl_relaxed(base + GIC_DIST_CONFIG + confoff);
if (type == IRQ_TYPE_LEVEL_HIGH) if (type == IRQ_TYPE_LEVEL_HIGH)
val &= ~confmask; val &= ~confmask;
else if (type == IRQ_TYPE_EDGE_RISING) else if (type == IRQ_TYPE_EDGE_RISING)
...@@ -148,15 +150,15 @@ static int gic_set_type(struct irq_data *d, unsigned int type) ...@@ -148,15 +150,15 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
* As recommended by the spec, disable the interrupt before changing * As recommended by the spec, disable the interrupt before changing
* the configuration * the configuration
*/ */
if (readl(base + GIC_DIST_ENABLE_SET + enableoff) & enablemask) { if (readl_relaxed(base + GIC_DIST_ENABLE_SET + enableoff) & enablemask) {
writel(enablemask, base + GIC_DIST_ENABLE_CLEAR + enableoff); writel_relaxed(enablemask, base + GIC_DIST_ENABLE_CLEAR + enableoff);
enabled = true; enabled = true;
} }
writel(val, base + GIC_DIST_CONFIG + confoff); writel_relaxed(val, base + GIC_DIST_CONFIG + confoff);
if (enabled) if (enabled)
writel(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff);
spin_unlock(&irq_controller_lock); spin_unlock(&irq_controller_lock);
...@@ -188,8 +190,8 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, ...@@ -188,8 +190,8 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
spin_lock(&irq_controller_lock); spin_lock(&irq_controller_lock);
d->node = cpu; d->node = cpu;
val = readl(reg) & ~mask; val = readl_relaxed(reg) & ~mask;
writel(val | bit, reg); writel_relaxed(val | bit, reg);
spin_unlock(&irq_controller_lock); spin_unlock(&irq_controller_lock);
return 0; return 0;
...@@ -218,11 +220,10 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) ...@@ -218,11 +220,10 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
unsigned int cascade_irq, gic_irq; unsigned int cascade_irq, gic_irq;
unsigned long status; unsigned long status;
/* primary controller ack'ing */ chained_irq_enter(chip, desc);
chip->irq_ack(&desc->irq_data);
spin_lock(&irq_controller_lock); spin_lock(&irq_controller_lock);
status = readl(chip_data->cpu_base + GIC_CPU_INTACK); status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK);
spin_unlock(&irq_controller_lock); spin_unlock(&irq_controller_lock);
gic_irq = (status & 0x3ff); gic_irq = (status & 0x3ff);
...@@ -236,15 +237,14 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) ...@@ -236,15 +237,14 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
out: out:
/* primary controller unmasking */ chained_irq_exit(chip, desc);
chip->irq_unmask(&desc->irq_data);
} }
static struct irq_chip gic_chip = { static struct irq_chip gic_chip = {
.name = "GIC", .name = "GIC",
.irq_ack = gic_ack_irq,
.irq_mask = gic_mask_irq, .irq_mask = gic_mask_irq,
.irq_unmask = gic_unmask_irq, .irq_unmask = gic_unmask_irq,
.irq_eoi = gic_eoi_irq,
.irq_set_type = gic_set_type, .irq_set_type = gic_set_type,
.irq_retrigger = gic_retrigger, .irq_retrigger = gic_retrigger,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
...@@ -272,13 +272,13 @@ static void __init gic_dist_init(struct gic_chip_data *gic, ...@@ -272,13 +272,13 @@ static void __init gic_dist_init(struct gic_chip_data *gic,
cpumask |= cpumask << 8; cpumask |= cpumask << 8;
cpumask |= cpumask << 16; cpumask |= cpumask << 16;
writel(0, base + GIC_DIST_CTRL); writel_relaxed(0, base + GIC_DIST_CTRL);
/* /*
* Find out how many interrupts are supported. * Find out how many interrupts are supported.
* The GIC only supports up to 1020 interrupt sources. * The GIC only supports up to 1020 interrupt sources.
*/ */
gic_irqs = readl(base + GIC_DIST_CTR) & 0x1f; gic_irqs = readl_relaxed(base + GIC_DIST_CTR) & 0x1f;
gic_irqs = (gic_irqs + 1) * 32; gic_irqs = (gic_irqs + 1) * 32;
if (gic_irqs > 1020) if (gic_irqs > 1020)
gic_irqs = 1020; gic_irqs = 1020;
...@@ -287,26 +287,26 @@ static void __init gic_dist_init(struct gic_chip_data *gic, ...@@ -287,26 +287,26 @@ static void __init gic_dist_init(struct gic_chip_data *gic,
* Set all global interrupts to be level triggered, active low. * Set all global interrupts to be level triggered, active low.
*/ */
for (i = 32; i < gic_irqs; i += 16) for (i = 32; i < gic_irqs; i += 16)
writel(0, base + GIC_DIST_CONFIG + i * 4 / 16); writel_relaxed(0, base + GIC_DIST_CONFIG + i * 4 / 16);
/* /*
* Set all global interrupts to this CPU only. * Set all global interrupts to this CPU only.
*/ */
for (i = 32; i < gic_irqs; i += 4) for (i = 32; i < gic_irqs; i += 4)
writel(cpumask, base + GIC_DIST_TARGET + i * 4 / 4); writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4);
/* /*
* Set priority on all global interrupts. * Set priority on all global interrupts.
*/ */
for (i = 32; i < gic_irqs; i += 4) for (i = 32; i < gic_irqs; i += 4)
writel(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4); writel_relaxed(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4);
/* /*
* Disable all interrupts. Leave the PPI and SGIs alone * Disable all interrupts. Leave the PPI and SGIs alone
* as these enables are banked registers. * as these enables are banked registers.
*/ */
for (i = 32; i < gic_irqs; i += 32) for (i = 32; i < gic_irqs; i += 32)
writel(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32); writel_relaxed(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32);
/* /*
* Limit number of interrupts registered to the platform maximum * Limit number of interrupts registered to the platform maximum
...@@ -319,12 +319,12 @@ static void __init gic_dist_init(struct gic_chip_data *gic, ...@@ -319,12 +319,12 @@ static void __init gic_dist_init(struct gic_chip_data *gic,
* Setup the Linux IRQ subsystem. * Setup the Linux IRQ subsystem.
*/ */
for (i = irq_start; i < irq_limit; i++) { for (i = irq_start; i < irq_limit; i++) {
irq_set_chip_and_handler(i, &gic_chip, handle_level_irq); irq_set_chip_and_handler(i, &gic_chip, handle_fasteoi_irq);
irq_set_chip_data(i, gic); irq_set_chip_data(i, gic);
set_irq_flags(i, IRQF_VALID | IRQF_PROBE); set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
} }
writel(1, base + GIC_DIST_CTRL); writel_relaxed(1, base + GIC_DIST_CTRL);
} }
static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
...@@ -337,17 +337,17 @@ static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) ...@@ -337,17 +337,17 @@ static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
* Deal with the banked PPI and SGI interrupts - disable all * Deal with the banked PPI and SGI interrupts - disable all
* PPI interrupts, ensure all SGI interrupts are enabled. * PPI interrupts, ensure all SGI interrupts are enabled.
*/ */
writel(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR); writel_relaxed(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR);
writel(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET); writel_relaxed(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET);
/* /*
* Set priority on PPI and SGI interrupts * Set priority on PPI and SGI interrupts
*/ */
for (i = 0; i < 32; i += 4) for (i = 0; i < 32; i += 4)
writel(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4); writel_relaxed(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4);
writel(0xf0, base + GIC_CPU_PRIMASK); writel_relaxed(0xf0, base + GIC_CPU_PRIMASK);
writel(1, base + GIC_CPU_CTRL); writel_relaxed(1, base + GIC_CPU_CTRL);
} }
void __init gic_init(unsigned int gic_nr, unsigned int irq_start, void __init gic_init(unsigned int gic_nr, unsigned int irq_start,
...@@ -391,7 +391,13 @@ void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) ...@@ -391,7 +391,13 @@ void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
{ {
unsigned long map = *cpus_addr(*mask); unsigned long map = *cpus_addr(*mask);
/*
* Ensure that stores to Normal memory are visible to the
* other CPUs before issuing the IPI.
*/
dsb();
/* this always happens on GIC0 */ /* this always happens on GIC0 */
writel(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT); writel_relaxed(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
} }
#endif #endif
...@@ -8,8 +8,6 @@ CONFIG_MODULE_UNLOAD=y ...@@ -8,8 +8,6 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_DOVE=y CONFIG_ARCH_DOVE=y
CONFIG_MACH_DOVE_DB=y CONFIG_MACH_DOVE_DB=y
CONFIG_CPU_V6=y
CONFIG_CPU_32v6K=y
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
CONFIG_AEABI=y CONFIG_AEABI=y
...@@ -44,7 +42,6 @@ CONFIG_MTD_UBI=y ...@@ -44,7 +42,6 @@ CONFIG_MTD_UBI=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1 CONFIG_BLK_DEV_RAM_COUNT=1
# CONFIG_MISC_DEVICES is not set
# CONFIG_SCSI_PROC_FS is not set # CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SD=y
# CONFIG_SCSI_LOWLEVEL is not set # CONFIG_SCSI_LOWLEVEL is not set
...@@ -59,12 +56,12 @@ CONFIG_INPUT_EVDEV=y ...@@ -59,12 +56,12 @@ CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set # CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_MOUSE_PS2 is not set # CONFIG_MOUSE_PS2 is not set
# CONFIG_SERIO is not set # CONFIG_SERIO is not set
CONFIG_LEGACY_PTY_COUNT=16
# CONFIG_DEVKMEM is not set # CONFIG_DEVKMEM is not set
CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_PCI is not set # CONFIG_SERIAL_8250_PCI is not set
CONFIG_SERIAL_8250_RUNTIME_UARTS=2 CONFIG_SERIAL_8250_RUNTIME_UARTS=2
CONFIG_LEGACY_PTY_COUNT=16
# CONFIG_HW_RANDOM is not set # CONFIG_HW_RANDOM is not set
CONFIG_I2C=y CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y CONFIG_I2C_CHARDEV=y
...@@ -72,12 +69,10 @@ CONFIG_I2C_MV64XXX=y ...@@ -72,12 +69,10 @@ CONFIG_I2C_MV64XXX=y
CONFIG_SPI=y CONFIG_SPI=y
CONFIG_SPI_ORION=y CONFIG_SPI_ORION=y
# CONFIG_HWMON is not set # CONFIG_HWMON is not set
# CONFIG_VGA_CONSOLE is not set
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_DEVICEFS=y CONFIG_USB_DEVICEFS=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_RTC_CLASS=y CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_MV=y CONFIG_RTC_DRV_MV=y
...@@ -86,7 +81,6 @@ CONFIG_MV_XOR=y ...@@ -86,7 +81,6 @@ CONFIG_MV_XOR=y
CONFIG_EXT2_FS=y CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_XATTR is not set # CONFIG_EXT3_FS_XATTR is not set
CONFIG_INOTIFY=y
CONFIG_ISO9660_FS=y CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y CONFIG_JOLIET=y
CONFIG_UDF_FS=m CONFIG_UDF_FS=m
...@@ -110,23 +104,19 @@ CONFIG_DEBUG_KERNEL=y ...@@ -110,23 +104,19 @@ CONFIG_DEBUG_KERNEL=y
CONFIG_TIMER_STATS=y CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_BUGVERBOSE is not set
CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_DEBUG_USER=y CONFIG_DEBUG_USER=y
CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_ERRORS=y
CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_PCBC=m CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_MD4=y CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_BLOWFISH=y CONFIG_CRYPTO_BLOWFISH=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_TEA=y CONFIG_CRYPTO_TEA=y
CONFIG_CRYPTO_TWOFISH=y CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DEFLATE=y
......
...@@ -15,6 +15,7 @@ CONFIG_ARCH_MXC=y ...@@ -15,6 +15,7 @@ CONFIG_ARCH_MXC=y
CONFIG_ARCH_MX1=y CONFIG_ARCH_MX1=y
CONFIG_ARCH_MX1ADS=y CONFIG_ARCH_MX1ADS=y
CONFIG_MACH_SCB9328=y CONFIG_MACH_SCB9328=y
CONFIG_MACH_APF9328=y
CONFIG_MXC_IRQ_PRIOR=y CONFIG_MXC_IRQ_PRIOR=y
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
......
...@@ -13,7 +13,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y ...@@ -13,7 +13,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
# CONFIG_LBDAF is not set # CONFIG_LBDAF is not set
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_MXC=y CONFIG_ARCH_MXC=y
CONFIG_ARCH_MX5=y CONFIG_ARCH_MX51=y
CONFIG_MACH_MX51_BABBAGE=y CONFIG_MACH_MX51_BABBAGE=y
CONFIG_MACH_MX51_3DS=y CONFIG_MACH_MX51_3DS=y
CONFIG_MACH_EUKREA_CPUIMX51=y CONFIG_MACH_EUKREA_CPUIMX51=y
......
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include <mach/serial.h> #include <mach/serial.h>
static u32 *uart; u32 *uart;
static u32 *uart_info = (u32 *)(DAVINCI_UART_INFO);
/* PORT_16C550A, in polled non-fifo mode */ /* PORT_16C550A, in polled non-fifo mode */
static void putc(char c) static void putc(char c)
...@@ -44,6 +43,8 @@ static inline void flush(void) ...@@ -44,6 +43,8 @@ static inline void flush(void)
static inline void set_uart_info(u32 phys, void * __iomem virt) static inline void set_uart_info(u32 phys, void * __iomem virt)
{ {
u32 *uart_info = (u32 *)(DAVINCI_UART_INFO);
uart = (u32 *)phys; uart = (u32 *)phys;
uart_info[0] = phys; uart_info[0] = phys;
uart_info[1] = (u32)virt; uart_info[1] = (u32)virt;
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#include <mach/common.h> #include <mach/common.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#define IRQ_BIT(irq) ((irq) & 0x1f)
#define FIQ_REG0_OFFSET 0x0000 #define FIQ_REG0_OFFSET 0x0000
#define FIQ_REG1_OFFSET 0x0004 #define FIQ_REG1_OFFSET 0x0004
#define IRQ_REG0_OFFSET 0x0008 #define IRQ_REG0_OFFSET 0x0008
...@@ -42,78 +40,33 @@ ...@@ -42,78 +40,33 @@
#define IRQ_INTPRI0_REG_OFFSET 0x0030 #define IRQ_INTPRI0_REG_OFFSET 0x0030
#define IRQ_INTPRI7_REG_OFFSET 0x004C #define IRQ_INTPRI7_REG_OFFSET 0x004C
static inline unsigned int davinci_irq_readl(int offset)
{
return __raw_readl(davinci_intc_base + offset);
}
static inline void davinci_irq_writel(unsigned long value, int offset) static inline void davinci_irq_writel(unsigned long value, int offset)
{ {
__raw_writel(value, davinci_intc_base + offset); __raw_writel(value, davinci_intc_base + offset);
} }
/* Disable interrupt */ static __init void
static void davinci_mask_irq(struct irq_data *d) davinci_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
{ {
unsigned int mask; struct irq_chip_generic *gc;
u32 l; struct irq_chip_type *ct;
mask = 1 << IRQ_BIT(d->irq); gc = irq_alloc_generic_chip("AINTC", 1, irq_start, base, handle_edge_irq);
ct = gc->chip_types;
if (d->irq > 31) { ct->chip.irq_ack = irq_gc_ack;
l = davinci_irq_readl(IRQ_ENT_REG1_OFFSET); ct->chip.irq_mask = irq_gc_mask_clr_bit;
l &= ~mask; ct->chip.irq_unmask = irq_gc_mask_set_bit;
davinci_irq_writel(l, IRQ_ENT_REG1_OFFSET);
} else { ct->regs.ack = IRQ_REG0_OFFSET;
l = davinci_irq_readl(IRQ_ENT_REG0_OFFSET); ct->regs.mask = IRQ_ENT_REG0_OFFSET;
l &= ~mask; irq_setup_generic_chip(gc, IRQ_MSK(num), IRQ_GC_INIT_MASK_CACHE,
davinci_irq_writel(l, IRQ_ENT_REG0_OFFSET); IRQ_NOREQUEST | IRQ_NOPROBE, 0);
}
}
/* Enable interrupt */
static void davinci_unmask_irq(struct irq_data *d)
{
unsigned int mask;
u32 l;
mask = 1 << IRQ_BIT(d->irq);
if (d->irq > 31) {
l = davinci_irq_readl(IRQ_ENT_REG1_OFFSET);
l |= mask;
davinci_irq_writel(l, IRQ_ENT_REG1_OFFSET);
} else {
l = davinci_irq_readl(IRQ_ENT_REG0_OFFSET);
l |= mask;
davinci_irq_writel(l, IRQ_ENT_REG0_OFFSET);
}
} }
/* EOI interrupt */
static void davinci_ack_irq(struct irq_data *d)
{
unsigned int mask;
mask = 1 << IRQ_BIT(d->irq);
if (d->irq > 31)
davinci_irq_writel(mask, IRQ_REG1_OFFSET);
else
davinci_irq_writel(mask, IRQ_REG0_OFFSET);
}
static struct irq_chip davinci_irq_chip_0 = {
.name = "AINTC",
.irq_ack = davinci_ack_irq,
.irq_mask = davinci_mask_irq,
.irq_unmask = davinci_unmask_irq,
};
/* ARM Interrupt Controller Initialization */ /* ARM Interrupt Controller Initialization */
void __init davinci_irq_init(void) void __init davinci_irq_init(void)
{ {
unsigned i; unsigned i, j;
const u8 *davinci_def_priorities = davinci_soc_info.intc_irq_prios; const u8 *davinci_def_priorities = davinci_soc_info.intc_irq_prios;
davinci_intc_type = DAVINCI_INTC_TYPE_AINTC; davinci_intc_type = DAVINCI_INTC_TYPE_AINTC;
...@@ -144,7 +97,6 @@ void __init davinci_irq_init(void) ...@@ -144,7 +97,6 @@ void __init davinci_irq_init(void)
davinci_irq_writel(~0x0, IRQ_REG1_OFFSET); davinci_irq_writel(~0x0, IRQ_REG1_OFFSET);
for (i = IRQ_INTPRI0_REG_OFFSET; i <= IRQ_INTPRI7_REG_OFFSET; i += 4) { for (i = IRQ_INTPRI0_REG_OFFSET; i <= IRQ_INTPRI7_REG_OFFSET; i += 4) {
unsigned j;
u32 pri; u32 pri;
for (j = 0, pri = 0; j < 32; j += 4, davinci_def_priorities++) for (j = 0, pri = 0; j < 32; j += 4, davinci_def_priorities++)
...@@ -152,13 +104,8 @@ void __init davinci_irq_init(void) ...@@ -152,13 +104,8 @@ void __init davinci_irq_init(void)
davinci_irq_writel(pri, i); davinci_irq_writel(pri, i);
} }
/* set up genirq dispatch for ARM INTC */ for (i = 0, j = 0; i < davinci_soc_info.intc_irq_num; i += 32, j += 0x04)
for (i = 0; i < davinci_soc_info.intc_irq_num; i++) { davinci_alloc_gc(davinci_intc_base + j, i, 32);
irq_set_chip(i, &davinci_irq_chip_0);
set_irq_flags(i, IRQF_VALID | IRQF_PROBE); irq_set_handler(IRQ_TINT1_TINT34, handle_level_irq);
if (i != IRQ_TINT1_TINT34)
irq_set_handler(i, handle_edge_irq);
else
irq_set_handler(i, handle_level_irq);
}
} }
This diff is collapsed.
...@@ -11,24 +11,17 @@ ...@@ -11,24 +11,17 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/io.h> #include <linux/io.h>
#include <plat/mpp.h>
#include <mach/dove.h> #include <mach/dove.h>
#include "mpp.h" #include "mpp.h"
#define MPP_NR_REGS 4
#define MPP_CTRL(i) ((i) == 3 ? \
DOVE_MPP_CTRL4_VIRT_BASE : \
DOVE_MPP_VIRT_BASE + (i) * 4)
#define PMU_SIG_REGS 2
#define PMU_SIG_CTRL(i) (DOVE_PMU_SIG_CTRL + (i) * 4)
struct dove_mpp_grp { struct dove_mpp_grp {
int start; int start;
int end; int end;
}; };
static struct dove_mpp_grp dove_mpp_grp[] = { /* Map a group to a range of GPIO pins in that group */
static const struct dove_mpp_grp dove_mpp_grp[] = {
[MPP_24_39] = { [MPP_24_39] = {
.start = 24, .start = 24,
.end = 39, .end = 39,
...@@ -38,8 +31,8 @@ static struct dove_mpp_grp dove_mpp_grp[] = { ...@@ -38,8 +31,8 @@ static struct dove_mpp_grp dove_mpp_grp[] = {
.end = 45, .end = 45,
}, },
[MPP_46_51] = { [MPP_46_51] = {
.start = 40, .start = 46,
.end = 45, .end = 51,
}, },
[MPP_58_61] = { [MPP_58_61] = {
.start = 58, .start = 58,
...@@ -51,6 +44,8 @@ static struct dove_mpp_grp dove_mpp_grp[] = { ...@@ -51,6 +44,8 @@ static struct dove_mpp_grp dove_mpp_grp[] = {
}, },
}; };
/* Enable gpio for a range of pins. mode should be a combination of
GPIO_OUTPUT_OK | GPIO_INPUT_OK */
static void dove_mpp_gpio_mode(int start, int end, int gpio_mode) static void dove_mpp_gpio_mode(int start, int end, int gpio_mode)
{ {
int i; int i;
...@@ -59,24 +54,17 @@ static void dove_mpp_gpio_mode(int start, int end, int gpio_mode) ...@@ -59,24 +54,17 @@ static void dove_mpp_gpio_mode(int start, int end, int gpio_mode)
orion_gpio_set_valid(i, gpio_mode); orion_gpio_set_valid(i, gpio_mode);
} }
/* Dump all the extra MPP registers. The platform code will dump the
registers for pins 0-23. */
static void dove_mpp_dump_regs(void) static void dove_mpp_dump_regs(void)
{ {
#ifdef DEBUG pr_debug("PMU_CTRL4_CTRL: %08x\n",
int i; readl(DOVE_MPP_CTRL4_VIRT_BASE));
pr_debug("MPP_CTRL regs:");
for (i = 0; i < MPP_NR_REGS; i++)
printk(" %08x", readl(MPP_CTRL(i)));
printk("\n");
pr_debug("PMU_SIG_CTRL regs:"); pr_debug("PMU_MPP_GENERAL_CTRL: %08x\n",
for (i = 0; i < PMU_SIG_REGS; i++) readl(DOVE_PMU_MPP_GENERAL_CTRL));
printk(" %08x", readl(PMU_SIG_CTRL(i)));
printk("\n");
pr_debug("PMU_MPP_GENERAL_CTRL: %08x\n", readl(DOVE_PMU_MPP_GENERAL_CTRL));
pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE)); pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE));
#endif
} }
static void dove_mpp_cfg_nfc(int sel) static void dove_mpp_cfg_nfc(int sel)
...@@ -128,82 +116,46 @@ static void dove_mpp_cfg_au1(int sel) ...@@ -128,82 +116,46 @@ static void dove_mpp_cfg_au1(int sel)
writel(global_cfg_2, DOVE_GLOBAL_CONFIG_2); writel(global_cfg_2, DOVE_GLOBAL_CONFIG_2);
} }
static void dove_mpp_conf_grp(int num, int sel, u32 *mpp_ctrl) /* Configure the group registers, enabling GPIO if sel indicates the
pin is to be used for GPIO */
static void dove_mpp_conf_grp(unsigned int *mpp_grp_list)
{ {
int start = dove_mpp_grp[num].start; u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);
int end = dove_mpp_grp[num].end; int gpio_mode;
int gpio_mode = sel ? GPIO_OUTPUT_OK | GPIO_INPUT_OK : 0;
*mpp_ctrl &= ~(0x1 << num);
*mpp_ctrl |= sel << num;
dove_mpp_gpio_mode(start, end, gpio_mode);
}
void __init dove_mpp_conf(unsigned int *mpp_list)
{
u32 mpp_ctrl[MPP_NR_REGS];
u32 pmu_mpp_ctrl = 0;
u32 pmu_sig_ctrl[PMU_SIG_REGS];
int i;
for (i = 0; i < MPP_NR_REGS; i++)
mpp_ctrl[i] = readl(MPP_CTRL(i));
for (i = 0; i < PMU_SIG_REGS; i++)
pmu_sig_ctrl[i] = readl(PMU_SIG_CTRL(i));
pmu_mpp_ctrl = readl(DOVE_PMU_MPP_GENERAL_CTRL);
dove_mpp_dump_regs();
for ( ; *mpp_list != MPP_END; mpp_list++) {
unsigned int num = MPP_NUM(*mpp_list);
unsigned int sel = MPP_SEL(*mpp_list);
int shift, gpio_mode;
if (num > MPP_MAX) {
pr_err("dove: invalid MPP number (%u)\n", num);
continue;
}
if (*mpp_list & MPP_NFC_MASK) {
dove_mpp_cfg_nfc(sel);
continue;
}
if (*mpp_list & MPP_AU1_MASK) { for ( ; *mpp_grp_list; mpp_grp_list++) {
dove_mpp_cfg_au1(sel); unsigned int num = MPP_NUM(*mpp_grp_list);
continue; unsigned int sel = MPP_SEL(*mpp_grp_list);
}
if (*mpp_list & MPP_GRP_MASK) { if (num > MPP_GRP_MAX) {
dove_mpp_conf_grp(num, sel, &mpp_ctrl[3]); pr_err("dove: invalid MPP GRP number (%u)\n", num);
continue; continue;
} }
shift = (num & 7) << 2; mpp_ctrl4 &= ~(0x1 << num);
if (*mpp_list & MPP_PMU_MASK) { mpp_ctrl4 |= sel << num;
pmu_mpp_ctrl |= (0x1 << num);
pmu_sig_ctrl[num / 8] &= ~(0xf << shift);
pmu_sig_ctrl[num / 8] |= 0xf << shift;
gpio_mode = 0;
} else {
mpp_ctrl[num / 8] &= ~(0xf << shift);
mpp_ctrl[num / 8] |= sel << shift;
gpio_mode = GPIO_OUTPUT_OK | GPIO_INPUT_OK;
}
orion_gpio_set_valid(num, gpio_mode); gpio_mode = sel ? GPIO_OUTPUT_OK | GPIO_INPUT_OK : 0;
dove_mpp_gpio_mode(dove_mpp_grp[num].start,
dove_mpp_grp[num].end, gpio_mode);
} }
writel(mpp_ctrl4, DOVE_MPP_CTRL4_VIRT_BASE);
}
for (i = 0; i < MPP_NR_REGS; i++) /* Configure the various MPP pins on Dove */
writel(mpp_ctrl[i], MPP_CTRL(i)); void __init dove_mpp_conf(unsigned int *mpp_list,
unsigned int *mpp_grp_list,
unsigned int grp_au1_52_57,
unsigned int grp_nfc_64_71)
{
dove_mpp_dump_regs();
for (i = 0; i < PMU_SIG_REGS; i++) /* Use platform code for pins 0-23 */
writel(pmu_sig_ctrl[i], PMU_SIG_CTRL(i)); orion_mpp_conf(mpp_list, 0, MPP_MAX, DOVE_MPP_VIRT_BASE);
writel(pmu_mpp_ctrl, DOVE_PMU_MPP_GENERAL_CTRL); dove_mpp_conf_grp(mpp_grp_list);
dove_mpp_cfg_au1(grp_au1_52_57);
dove_mpp_cfg_nfc(grp_nfc_64_71);
dove_mpp_dump_regs(); dove_mpp_dump_regs();
} }
This diff is collapsed.
...@@ -59,8 +59,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) ...@@ -59,8 +59,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
unsigned int cascade_irq, combiner_irq; unsigned int cascade_irq, combiner_irq;
unsigned long status; unsigned long status;
/* primary controller ack'ing */ chained_irq_enter(chip, desc);
chip->irq_ack(&desc->irq_data);
spin_lock(&irq_controller_lock); spin_lock(&irq_controller_lock);
status = __raw_readl(chip_data->base + COMBINER_INT_STATUS); status = __raw_readl(chip_data->base + COMBINER_INT_STATUS);
...@@ -79,8 +78,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) ...@@ -79,8 +78,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
out: out:
/* primary controller unmasking */ chained_irq_exit(chip, desc);
chip->irq_unmask(&desc->irq_data);
} }
static struct irq_chip combiner_chip = { static struct irq_chip combiner_chip = {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <mach/hardware.h> #include <mach/hardware.h>
static volatile unsigned long *UART = (unsigned long *)GEMINI_UART_BASE; static volatile unsigned long * const UART = (unsigned long *)GEMINI_UART_BASE;
/* /*
* The following code assumes the serial port has already been * The following code assumes the serial port has already been
......
config IMX_HAVE_DMA_V1 config IMX_HAVE_DMA_V1
bool bool
#
# ARCH_MX31 and ARCH_MX35 are left for compatibility
# Some usages assume that having one of them implies not having (e.g.) ARCH_MX2.
# To easily distinguish good and reviewed from unreviewed usages new (and IMHO
# more sensible) names are used: SOC_IMX31 and SOC_IMX35
config ARCH_MX31
bool
config ARCH_MX35
bool
config SOC_IMX1 config SOC_IMX1
bool bool
...@@ -31,6 +41,24 @@ config SOC_IMX27 ...@@ -31,6 +41,24 @@ config SOC_IMX27
select IMX_HAVE_IOMUX_V1 select IMX_HAVE_IOMUX_V1
select MXC_AVIC select MXC_AVIC
config SOC_IMX31
bool
select CPU_V6
select IMX_HAVE_PLATFORM_MXC_RNGA
select ARCH_MXC_AUDMUX_V2
select ARCH_MX31
select MXC_AVIC
config SOC_IMX35
bool
select CPU_V6
select ARCH_MXC_IOMUX_V3
select ARCH_MXC_AUDMUX_V2
select HAVE_EPIT
select ARCH_MX35
select MXC_AVIC
if ARCH_MX1 if ARCH_MX1
comment "MX1 platforms:" comment "MX1 platforms:"
...@@ -40,6 +68,7 @@ config MACH_MXLADS ...@@ -40,6 +68,7 @@ config MACH_MXLADS
config ARCH_MX1ADS config ARCH_MX1ADS
bool "MX1ADS platform" bool "MX1ADS platform"
select MACH_MXLADS select MACH_MXLADS
select SOC_IMX1
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
help help
...@@ -51,6 +80,13 @@ config MACH_SCB9328 ...@@ -51,6 +80,13 @@ config MACH_SCB9328
help help
Say Y here if you are using a Synertronixx scb9328 board Say Y here if you are using a Synertronixx scb9328 board
config MACH_APF9328
bool "APF9328"
select SOC_IMX1
select IMX_HAVE_PLATFORM_IMX_UART
help
Say Yes here if you are using the Armadeus APF9328 development board
endif endif
if ARCH_MX2 if ARCH_MX2
...@@ -129,6 +165,7 @@ choice ...@@ -129,6 +165,7 @@ choice
config MACH_EUKREA_MBIMXSD25_BASEBOARD config MACH_EUKREA_MBIMXSD25_BASEBOARD
bool "Eukrea MBIMXSD development board" bool "Eukrea MBIMXSD development board"
select IMX_HAVE_PLATFORM_GPIO_KEYS
select IMX_HAVE_PLATFORM_IMX_SSI select IMX_HAVE_PLATFORM_IMX_SSI
help help
This adds board specific devices that can be found on Eukrea's This adds board specific devices that can be found on Eukrea's
...@@ -254,6 +291,7 @@ config MACH_MX27_3DS ...@@ -254,6 +291,7 @@ config MACH_MX27_3DS
config MACH_IMX27_VISSTRIM_M10 config MACH_IMX27_VISSTRIM_M10
bool "Vista Silicon i.MX27 Visstrim_m10" bool "Vista Silicon i.MX27 Visstrim_m10"
select SOC_IMX27 select SOC_IMX27
select IMX_HAVE_PLATFORM_GPIO_KEYS
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
...@@ -314,3 +352,251 @@ config MACH_IMX27IPCAM ...@@ -314,3 +352,251 @@ config MACH_IMX27IPCAM
configurations for the board and its peripherals. configurations for the board and its peripherals.
endif endif
if ARCH_MX3
comment "MX31 platforms:"
config MACH_MX31ADS
bool "Support MX31ADS platforms"
select SOC_IMX31
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
default y
help
Include support for MX31ADS platform. This includes specific
configurations for the board and its peripherals.
config MACH_MX31ADS_WM1133_EV1
bool "Support Wolfson Microelectronics 1133-EV1 module"
depends on MACH_MX31ADS
depends on MFD_WM8350_I2C
depends on REGULATOR_WM8350
select MFD_WM8350_CONFIG_MODE_0
select MFD_WM8352_CONFIG_MODE_0
help
Include support for the Wolfson Microelectronics 1133-EV1 PMU
and audio module for the MX31ADS platform.
config MACH_MX31LILLY
bool "Support MX31 LILLY-1131 platforms (INCO startec)"
select SOC_IMX31
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IPU_CORE
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_ULPI if USB_ULPI
help
Include support for mx31 based LILLY1131 modules. This includes
specific configurations for the board and its peripherals.
config MACH_MX31LITE
bool "Support MX31 LITEKIT (LogicPD)"
select SOC_IMX31
select MXC_ULPI if USB_ULPI
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_MXC_RTC
select IMX_HAVE_PLATFORM_SPI_IMX
help
Include support for MX31 LITEKIT platform. This includes specific
configurations for the board and its peripherals.
config MACH_PCM037
bool "Support Phytec pcm037 (i.MX31) platforms"
select SOC_IMX31
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IPU_CORE
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_MXC_W1
select MXC_ULPI if USB_ULPI
help
Include support for Phytec pcm037 platform. This includes
specific configurations for the board and its peripherals.
config MACH_PCM037_EET
bool "Support pcm037 EET board extensions"
depends on MACH_PCM037
select IMX_HAVE_PLATFORM_GPIO_KEYS
select IMX_HAVE_PLATFORM_SPI_IMX
help
Add support for PCM037 EET baseboard extensions. If you are using the
OLED display with EET, use "video=mx3fb:CMEL-OLED" kernel
command-line parameter.
config MACH_MX31_3DS
bool "Support MX31PDK (3DS)"
select SOC_IMX31
select MXC_DEBUG_BOARD
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IPU_CORE
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_ULPI if USB_ULPI
help
Include support for MX31PDK (3DS) platform. This includes specific
configurations for the board and its peripherals.
config MACH_MX31_3DS_MXC_NAND_USE_BBT
bool "Make the MXC NAND driver use the in flash Bad Block Table"
depends on MACH_MX31_3DS
depends on MTD_NAND_MXC
help
Enable this if you want that the MXC NAND driver uses the in flash
Bad Block Table to know what blocks are bad instead of scanning the
entire flash looking for bad block markers.
config MACH_MX31MOBOARD
bool "Support mx31moboard platforms (EPFL Mobots group)"
select SOC_IMX31
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IPU_CORE
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_ULPI if USB_ULPI
help
Include support for mx31moboard platform. This includes specific
configurations for the board and its peripherals.
config MACH_QONG
bool "Support Dave/DENX QongEVB-LITE platform"
select SOC_IMX31
select IMX_HAVE_PLATFORM_IMX_UART
help
Include support for Dave/DENX QongEVB-LITE platform. This includes
specific configurations for the board and its peripherals.
config MACH_ARMADILLO5X0
bool "Support Atmark Armadillo-500 Development Base Board"
select SOC_IMX31
select IMX_HAVE_PLATFORM_GPIO_KEYS
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IPU_CORE
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_MXC_NAND
select MXC_ULPI if USB_ULPI
help
Include support for Atmark Armadillo-500 platform. This includes
specific configurations for the board and its peripherals.
config MACH_KZM_ARM11_01
bool "Support KZM-ARM11-01(Kyoto Microcomputer)"
select SOC_IMX31
select IMX_HAVE_PLATFORM_IMX_UART
help
Include support for KZM-ARM11-01. This includes specific
configurations for the board and its peripherals.
config MACH_BUG
bool "Support Buglabs BUGBase platform"
select SOC_IMX31
select IMX_HAVE_PLATFORM_IMX_UART
default y
help
Include support for BUGBase 1.3 platform. This includes specific
configurations for the board and its peripherals.
comment "MX35 platforms:"
config MACH_PCM043
bool "Support Phytec pcm043 (i.MX35) platforms"
select SOC_IMX35
select IMX_HAVE_PLATFORM_FLEXCAN
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IPU_CORE
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select MXC_ULPI if USB_ULPI
help
Include support for Phytec pcm043 platform. This includes
specific configurations for the board and its peripherals.
config MACH_MX35_3DS
bool "Support MX35PDK platform"
select SOC_IMX35
select MXC_DEBUG_BOARD
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
help
Include support for MX35PDK platform. This includes specific
configurations for the board and its peripherals.
config MACH_EUKREA_CPUIMX35
bool "Support Eukrea CPUIMX35 Platform"
select SOC_IMX35
select IMX_HAVE_PLATFORM_FLEXCAN
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select MXC_ULPI if USB_ULPI
help
Include support for Eukrea CPUIMX35 platform. This includes
specific configurations for the board and its peripherals.
choice
prompt "Baseboard"
depends on MACH_EUKREA_CPUIMX35
default MACH_EUKREA_MBIMXSD35_BASEBOARD
config MACH_EUKREA_MBIMXSD35_BASEBOARD
bool "Eukrea MBIMXSD development board"
select IMX_HAVE_PLATFORM_GPIO_KEYS
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IPU_CORE
help
This adds board specific devices that can be found on Eukrea's
MBIMXSD evaluation board.
endchoice
config MACH_VPR200
bool "Support VPR200 platform"
select SOC_IMX35
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_GPIO_KEYS
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IPU_CORE
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
help
Include support for VPR200 platform. This includes specific
configurations for the board and its peripherals.
endif
#
# Makefile for the linux kernel.
#
# Object file lists.
obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o
obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o
...@@ -14,18 +8,27 @@ obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o ...@@ -14,18 +8,27 @@ obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o
obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o
obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
obj-$(CONFIG_SOC_IMX31) += mm-imx31.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o
obj-$(CONFIG_SOC_IMX35) += mm-imx35.o cpu-imx35.o clock-imx35.o ehci-imx35.o
obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
# Support for CMOS sensor interface # Support for CMOS sensor interface
obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
# i.MX1 based machines
obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
obj-$(CONFIG_MACH_APF9328) += mach-apf9328.o
# i.MX21 based machines
obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o
# i.MX25 based machines
obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-eukrea_cpuimx25.o obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-eukrea_cpuimx25.o
obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o
# i.MX27 based machines
obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o
obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o
obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
...@@ -37,3 +40,24 @@ obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o ...@@ -37,3 +40,24 @@ obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o
obj-$(CONFIG_MACH_PCA100) += mach-pca100.o obj-$(CONFIG_MACH_PCA100) += mach-pca100.o
obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o
obj-$(CONFIG_MACH_IMX27IPCAM) += mach-imx27ipcam.o obj-$(CONFIG_MACH_IMX27IPCAM) += mach-imx27ipcam.o
# i.MX31 based machines
obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o
obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o
obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o
obj-$(CONFIG_MACH_PCM037) += mach-pcm037.o
obj-$(CONFIG_MACH_PCM037_EET) += mach-pcm037_eet.o
obj-$(CONFIG_MACH_MX31_3DS) += mach-mx31_3ds.o
obj-$(CONFIG_MACH_MX31MOBOARD) += mach-mx31moboard.o mx31moboard-devboard.o \
mx31moboard-marxbot.o mx31moboard-smartbot.o
obj-$(CONFIG_MACH_QONG) += mach-qong.o
obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o
obj-$(CONFIG_MACH_BUG) += mach-bug.o
# i.MX35 based machines
obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o
obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o
obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o
obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
...@@ -13,3 +13,7 @@ initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000 ...@@ -13,3 +13,7 @@ initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000
zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000 zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000
params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 params_phys-$(CONFIG_MACH_MX27) := 0xA0000100
initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000
zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000
params_phys-$(CONFIG_ARCH_MX3) := 0x80000100
initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000
/*
* Copyright (C) 2009-2010 Pengutronix
* Sascha Hauer <s.hauer@pengutronix.de>
* Juergen Beisert <j.beisert@pengutronix.de>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <asm/hardware/cache-l2x0.h>
#include <mach/hardware.h>
static int mxc_init_l2x0(void)
{
void __iomem *l2x0_base;
void __iomem *clkctl_base;
if (!cpu_is_mx31() && !cpu_is_mx35())
return 0;
/*
* First of all, we must repair broken chip settings. There are some
* i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
* misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
* Workaraound is to setup the correct register setting prior enabling the
* L2 cache. This should not hurt already working CPUs, as they are using the
* same value.
*/
#define L2_MEM_VAL 0x10
clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096);
if (clkctl_base != NULL) {
writel(0x00000515, clkctl_base + L2_MEM_VAL);
iounmap(clkctl_base);
} else {
pr_err("L2 cache: Cannot fix timing. Trying to continue without\n");
}
l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096);
if (IS_ERR(l2x0_base)) {
printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
PTR_ERR(l2x0_base));
return 0;
}
l2x0_init(l2x0_base, 0x00030024, 0x00000000);
return 0;
}
arch_initcall(mxc_init_l2x0);
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <mach/mx31.h> #include <mach/mx31.h>
#include <mach/common.h> #include <mach/common.h>
#include "crm_regs.h" #include "crmregs-imx31.h"
#define PRE_DIV_MIN_FREQ 10000000 /* Minimum Frequency after Predivider */ #define PRE_DIV_MIN_FREQ 10000000 /* Minimum Frequency after Predivider */
...@@ -627,4 +627,3 @@ int __init mx31_clocks_init(unsigned long fref) ...@@ -627,4 +627,3 @@ int __init mx31_clocks_init(unsigned long fref)
return 0; return 0;
} }
...@@ -547,4 +547,3 @@ int __init mx35_clocks_init() ...@@ -547,4 +547,3 @@ int __init mx35_clocks_init()
return 0; return 0;
} }
/* /*
* MX3 CPU type detection * MX31 CPU type detection
* *
* Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
* *
...@@ -17,14 +17,12 @@ ...@@ -17,14 +17,12 @@
unsigned int mx31_cpu_rev; unsigned int mx31_cpu_rev;
EXPORT_SYMBOL(mx31_cpu_rev); EXPORT_SYMBOL(mx31_cpu_rev);
struct mx3_cpu_type { static struct {
u8 srev; u8 srev;
const char *name; const char *name;
const char *v; const char *v;
unsigned int rev; unsigned int rev;
}; } mx31_cpu_type[] __initdata = {
static struct mx3_cpu_type mx31_cpu_type[] __initdata = {
{ .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = IMX_CHIP_REVISION_1_0 }, { .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = IMX_CHIP_REVISION_1_0 },
{ .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, { .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 },
{ .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, { .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 },
...@@ -57,33 +55,3 @@ void __init mx31_read_cpu_rev(void) ...@@ -57,33 +55,3 @@ void __init mx31_read_cpu_rev(void)
printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev);
} }
unsigned int mx35_cpu_rev;
EXPORT_SYMBOL(mx35_cpu_rev);
void __init mx35_read_cpu_rev(void)
{
u32 rev;
char *srev;
rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV));
switch (rev) {
case 0x00:
mx35_cpu_rev = IMX_CHIP_REVISION_1_0;
srev = "1.0";
break;
case 0x10:
mx35_cpu_rev = IMX_CHIP_REVISION_2_0;
srev = "2.0";
break;
case 0x11:
mx35_cpu_rev = IMX_CHIP_REVISION_2_1;
srev = "2.1";
break;
default:
mx35_cpu_rev = IMX_CHIP_REVISION_UNKNOWN;
srev = "unknown";
}
printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev);
}
/*
* MX35 CPU type detection
*
* Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <linux/module.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/iim.h>
unsigned int mx35_cpu_rev;
EXPORT_SYMBOL(mx35_cpu_rev);
void __init mx35_read_cpu_rev(void)
{
u32 rev;
char *srev;
rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV));
switch (rev) {
case 0x00:
mx35_cpu_rev = IMX_CHIP_REVISION_1_0;
srev = "1.0";
break;
case 0x10:
mx35_cpu_rev = IMX_CHIP_REVISION_2_0;
srev = "2.0";
break;
case 0x11:
mx35_cpu_rev = IMX_CHIP_REVISION_2_1;
srev = "2.1";
break;
default:
mx35_cpu_rev = IMX_CHIP_REVISION_UNKNOWN;
srev = "unknown";
}
printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev);
}
...@@ -9,21 +9,21 @@ ...@@ -9,21 +9,21 @@
#include <mach/mx1.h> #include <mach/mx1.h>
#include <mach/devices-common.h> #include <mach/devices-common.h>
extern const struct imx_imx_fb_data imx1_imx_fb_data __initconst; extern const struct imx_imx_fb_data imx1_imx_fb_data;
#define imx1_add_imx_fb(pdata) \ #define imx1_add_imx_fb(pdata) \
imx_add_imx_fb(&imx1_imx_fb_data, pdata) imx_add_imx_fb(&imx1_imx_fb_data, pdata)
extern const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst; extern const struct imx_imx_i2c_data imx1_imx_i2c_data;
#define imx1_add_imx_i2c(pdata) \ #define imx1_add_imx_i2c(pdata) \
imx_add_imx_i2c(&imx1_imx_i2c_data, pdata) imx_add_imx_i2c(&imx1_imx_i2c_data, pdata)
extern const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst; extern const struct imx_imx_uart_3irq_data imx1_imx_uart_data[];
#define imx1_add_imx_uart(id, pdata) \ #define imx1_add_imx_uart(id, pdata) \
imx_add_imx_uart_3irq(&imx1_imx_uart_data[id], pdata) imx_add_imx_uart_3irq(&imx1_imx_uart_data[id], pdata)
#define imx1_add_imx_uart0(pdata) imx1_add_imx_uart(0, pdata) #define imx1_add_imx_uart0(pdata) imx1_add_imx_uart(0, pdata)
#define imx1_add_imx_uart1(pdata) imx1_add_imx_uart(1, pdata) #define imx1_add_imx_uart1(pdata) imx1_add_imx_uart(1, pdata)
extern const struct imx_spi_imx_data imx1_cspi_data[] __initconst; extern const struct imx_spi_imx_data imx1_cspi_data[];
#define imx1_add_cspi(id, pdata) \ #define imx1_add_cspi(id, pdata) \
imx_add_spi_imx(&imx1_cspi_data[id], pdata) imx_add_spi_imx(&imx1_cspi_data[id], pdata)
......
...@@ -9,31 +9,31 @@ ...@@ -9,31 +9,31 @@
#include <mach/mx21.h> #include <mach/mx21.h>
#include <mach/devices-common.h> #include <mach/devices-common.h>
extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data __initconst; extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data;
#define imx21_add_imx21_hcd(pdata) \ #define imx21_add_imx21_hcd(pdata) \
imx_add_imx21_hcd(&imx21_imx21_hcd_data, pdata) imx_add_imx21_hcd(&imx21_imx21_hcd_data, pdata)
extern const struct imx_imx2_wdt_data imx21_imx2_wdt_data __initconst; extern const struct imx_imx2_wdt_data imx21_imx2_wdt_data;
#define imx21_add_imx2_wdt(pdata) \ #define imx21_add_imx2_wdt(pdata) \
imx_add_imx2_wdt(&imx21_imx2_wdt_data) imx_add_imx2_wdt(&imx21_imx2_wdt_data)
extern const struct imx_imx_fb_data imx21_imx_fb_data __initconst; extern const struct imx_imx_fb_data imx21_imx_fb_data;
#define imx21_add_imx_fb(pdata) \ #define imx21_add_imx_fb(pdata) \
imx_add_imx_fb(&imx21_imx_fb_data, pdata) imx_add_imx_fb(&imx21_imx_fb_data, pdata)
extern const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst; extern const struct imx_imx_i2c_data imx21_imx_i2c_data;
#define imx21_add_imx_i2c(pdata) \ #define imx21_add_imx_i2c(pdata) \
imx_add_imx_i2c(&imx21_imx_i2c_data, pdata) imx_add_imx_i2c(&imx21_imx_i2c_data, pdata)
extern const struct imx_imx_keypad_data imx21_imx_keypad_data __initconst; extern const struct imx_imx_keypad_data imx21_imx_keypad_data;
#define imx21_add_imx_keypad(pdata) \ #define imx21_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx21_imx_keypad_data, pdata) imx_add_imx_keypad(&imx21_imx_keypad_data, pdata)
extern const struct imx_imx_ssi_data imx21_imx_ssi_data[] __initconst; extern const struct imx_imx_ssi_data imx21_imx_ssi_data[];
#define imx21_add_imx_ssi(id, pdata) \ #define imx21_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx21_imx_ssi_data[id], pdata) imx_add_imx_ssi(&imx21_imx_ssi_data[id], pdata)
extern const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst; extern const struct imx_imx_uart_1irq_data imx21_imx_uart_data[];
#define imx21_add_imx_uart(id, pdata) \ #define imx21_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx21_imx_uart_data[id], pdata) imx_add_imx_uart_1irq(&imx21_imx_uart_data[id], pdata)
#define imx21_add_imx_uart0(pdata) imx21_add_imx_uart(0, pdata) #define imx21_add_imx_uart0(pdata) imx21_add_imx_uart(0, pdata)
...@@ -41,19 +41,19 @@ extern const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst; ...@@ -41,19 +41,19 @@ extern const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst;
#define imx21_add_imx_uart2(pdata) imx21_add_imx_uart(2, pdata) #define imx21_add_imx_uart2(pdata) imx21_add_imx_uart(2, pdata)
#define imx21_add_imx_uart3(pdata) imx21_add_imx_uart(3, pdata) #define imx21_add_imx_uart3(pdata) imx21_add_imx_uart(3, pdata)
extern const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst; extern const struct imx_mxc_mmc_data imx21_mxc_mmc_data[];
#define imx21_add_mxc_mmc(id, pdata) \ #define imx21_add_mxc_mmc(id, pdata) \
imx_add_mxc_mmc(&imx21_mxc_mmc_data[id], pdata) imx_add_mxc_mmc(&imx21_mxc_mmc_data[id], pdata)
extern const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst; extern const struct imx_mxc_nand_data imx21_mxc_nand_data;
#define imx21_add_mxc_nand(pdata) \ #define imx21_add_mxc_nand(pdata) \
imx_add_mxc_nand(&imx21_mxc_nand_data, pdata) imx_add_mxc_nand(&imx21_mxc_nand_data, pdata)
extern const struct imx_mxc_w1_data imx21_mxc_w1_data __initconst; extern const struct imx_mxc_w1_data imx21_mxc_w1_data;
#define imx21_add_mxc_w1(pdata) \ #define imx21_add_mxc_w1(pdata) \
imx_add_mxc_w1(&imx21_mxc_w1_data) imx_add_mxc_w1(&imx21_mxc_w1_data)
extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst; extern const struct imx_spi_imx_data imx21_cspi_data[];
#define imx21_add_cspi(id, pdata) \ #define imx21_add_cspi(id, pdata) \
imx_add_spi_imx(&imx21_cspi_data[id], pdata) imx_add_spi_imx(&imx21_cspi_data[id], pdata)
#define imx21_add_spi_imx0(pdata) imx21_add_cspi(0, pdata) #define imx21_add_spi_imx0(pdata) imx21_add_cspi(0, pdata)
......
...@@ -9,48 +9,48 @@ ...@@ -9,48 +9,48 @@
#include <mach/mx25.h> #include <mach/mx25.h>
#include <mach/devices-common.h> #include <mach/devices-common.h>
extern const struct imx_fec_data imx25_fec_data __initconst; extern const struct imx_fec_data imx25_fec_data;
#define imx25_add_fec(pdata) \ #define imx25_add_fec(pdata) \
imx_add_fec(&imx25_fec_data, pdata) imx_add_fec(&imx25_fec_data, pdata)
extern const struct imx_flexcan_data imx25_flexcan_data[] __initconst; extern const struct imx_flexcan_data imx25_flexcan_data[];
#define imx25_add_flexcan(id, pdata) \ #define imx25_add_flexcan(id, pdata) \
imx_add_flexcan(&imx25_flexcan_data[id], pdata) imx_add_flexcan(&imx25_flexcan_data[id], pdata)
#define imx25_add_flexcan0(pdata) imx25_add_flexcan(0, pdata) #define imx25_add_flexcan0(pdata) imx25_add_flexcan(0, pdata)
#define imx25_add_flexcan1(pdata) imx25_add_flexcan(1, pdata) #define imx25_add_flexcan1(pdata) imx25_add_flexcan(1, pdata)
extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst; extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data;
#define imx25_add_fsl_usb2_udc(pdata) \ #define imx25_add_fsl_usb2_udc(pdata) \
imx_add_fsl_usb2_udc(&imx25_fsl_usb2_udc_data, pdata) imx_add_fsl_usb2_udc(&imx25_fsl_usb2_udc_data, pdata)
extern struct imx_imxdi_rtc_data imx25_imxdi_rtc_data __initconst; extern struct imx_imxdi_rtc_data imx25_imxdi_rtc_data;
#define imx25_add_imxdi_rtc(pdata) \ #define imx25_add_imxdi_rtc(pdata) \
imx_add_imxdi_rtc(&imx25_imxdi_rtc_data) imx_add_imxdi_rtc(&imx25_imxdi_rtc_data)
extern const struct imx_imx2_wdt_data imx25_imx2_wdt_data __initconst; extern const struct imx_imx2_wdt_data imx25_imx2_wdt_data;
#define imx25_add_imx2_wdt(pdata) \ #define imx25_add_imx2_wdt(pdata) \
imx_add_imx2_wdt(&imx25_imx2_wdt_data) imx_add_imx2_wdt(&imx25_imx2_wdt_data)
extern const struct imx_imx_fb_data imx25_imx_fb_data __initconst; extern const struct imx_imx_fb_data imx25_imx_fb_data;
#define imx25_add_imx_fb(pdata) \ #define imx25_add_imx_fb(pdata) \
imx_add_imx_fb(&imx25_imx_fb_data, pdata) imx_add_imx_fb(&imx25_imx_fb_data, pdata)
extern const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst; extern const struct imx_imx_i2c_data imx25_imx_i2c_data[];
#define imx25_add_imx_i2c(id, pdata) \ #define imx25_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx25_imx_i2c_data[id], pdata) imx_add_imx_i2c(&imx25_imx_i2c_data[id], pdata)
#define imx25_add_imx_i2c0(pdata) imx25_add_imx_i2c(0, pdata) #define imx25_add_imx_i2c0(pdata) imx25_add_imx_i2c(0, pdata)
#define imx25_add_imx_i2c1(pdata) imx25_add_imx_i2c(1, pdata) #define imx25_add_imx_i2c1(pdata) imx25_add_imx_i2c(1, pdata)
#define imx25_add_imx_i2c2(pdata) imx25_add_imx_i2c(2, pdata) #define imx25_add_imx_i2c2(pdata) imx25_add_imx_i2c(2, pdata)
extern const struct imx_imx_keypad_data imx25_imx_keypad_data __initconst; extern const struct imx_imx_keypad_data imx25_imx_keypad_data;
#define imx25_add_imx_keypad(pdata) \ #define imx25_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx25_imx_keypad_data, pdata) imx_add_imx_keypad(&imx25_imx_keypad_data, pdata)
extern const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst; extern const struct imx_imx_ssi_data imx25_imx_ssi_data[];
#define imx25_add_imx_ssi(id, pdata) \ #define imx25_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx25_imx_ssi_data[id], pdata) imx_add_imx_ssi(&imx25_imx_ssi_data[id], pdata)
extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst; extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[];
#define imx25_add_imx_uart(id, pdata) \ #define imx25_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx25_imx_uart_data[id], pdata) imx_add_imx_uart_1irq(&imx25_imx_uart_data[id], pdata)
#define imx25_add_imx_uart0(pdata) imx25_add_imx_uart(0, pdata) #define imx25_add_imx_uart0(pdata) imx25_add_imx_uart(0, pdata)
...@@ -59,33 +59,32 @@ extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst; ...@@ -59,33 +59,32 @@ extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst;
#define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata) #define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata)
#define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata) #define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata)
extern const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst; extern const struct imx_mx2_camera_data imx25_mx2_camera_data;
#define imx25_add_mx2_camera(pdata) \ #define imx25_add_mx2_camera(pdata) \
imx_add_mx2_camera(&imx25_mx2_camera_data, pdata) imx_add_mx2_camera(&imx25_mx2_camera_data, pdata)
extern const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst; extern const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data;
#define imx25_add_mxc_ehci_otg(pdata) \ #define imx25_add_mxc_ehci_otg(pdata) \
imx_add_mxc_ehci(&imx25_mxc_ehci_otg_data, pdata) imx_add_mxc_ehci(&imx25_mxc_ehci_otg_data, pdata)
extern const struct imx_mxc_ehci_data imx25_mxc_ehci_hs_data __initconst; extern const struct imx_mxc_ehci_data imx25_mxc_ehci_hs_data;
#define imx25_add_mxc_ehci_hs(pdata) \ #define imx25_add_mxc_ehci_hs(pdata) \
imx_add_mxc_ehci(&imx25_mxc_ehci_hs_data, pdata) imx_add_mxc_ehci(&imx25_mxc_ehci_hs_data, pdata)
extern const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst; extern const struct imx_mxc_nand_data imx25_mxc_nand_data;
#define imx25_add_mxc_nand(pdata) \ #define imx25_add_mxc_nand(pdata) \
imx_add_mxc_nand(&imx25_mxc_nand_data, pdata) imx_add_mxc_nand(&imx25_mxc_nand_data, pdata)
extern const struct imx_sdhci_esdhc_imx_data extern const struct imx_sdhci_esdhc_imx_data imx25_sdhci_esdhc_imx_data[];
imx25_sdhci_esdhc_imx_data[] __initconst;
#define imx25_add_sdhci_esdhc_imx(id, pdata) \ #define imx25_add_sdhci_esdhc_imx(id, pdata) \
imx_add_sdhci_esdhc_imx(&imx25_sdhci_esdhc_imx_data[id], pdata) imx_add_sdhci_esdhc_imx(&imx25_sdhci_esdhc_imx_data[id], pdata)
extern const struct imx_spi_imx_data imx25_cspi_data[] __initconst; extern const struct imx_spi_imx_data imx25_cspi_data[];
#define imx25_add_spi_imx(id, pdata) \ #define imx25_add_spi_imx(id, pdata) \
imx_add_spi_imx(&imx25_cspi_data[id], pdata) imx_add_spi_imx(&imx25_cspi_data[id], pdata)
#define imx25_add_spi_imx0(pdata) imx25_add_spi_imx(0, pdata) #define imx25_add_spi_imx0(pdata) imx25_add_spi_imx(0, pdata)
#define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata) #define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata)
#define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata) #define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata)
extern struct imx_mxc_pwm_data imx25_mxc_pwm_data[] __initconst; extern struct imx_mxc_pwm_data imx25_mxc_pwm_data[];
#define imx25_add_mxc_pwm(id) \ #define imx25_add_mxc_pwm(id) \
imx_add_mxc_pwm(&imx25_mxc_pwm_data[id]) imx_add_mxc_pwm(&imx25_mxc_pwm_data[id])
...@@ -9,35 +9,35 @@ ...@@ -9,35 +9,35 @@
#include <mach/mx27.h> #include <mach/mx27.h>
#include <mach/devices-common.h> #include <mach/devices-common.h>
extern const struct imx_fec_data imx27_fec_data __initconst; extern const struct imx_fec_data imx27_fec_data;
#define imx27_add_fec(pdata) \ #define imx27_add_fec(pdata) \
imx_add_fec(&imx27_fec_data, pdata) imx_add_fec(&imx27_fec_data, pdata)
extern const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst; extern const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data;
#define imx27_add_fsl_usb2_udc(pdata) \ #define imx27_add_fsl_usb2_udc(pdata) \
imx_add_fsl_usb2_udc(&imx27_fsl_usb2_udc_data, pdata) imx_add_fsl_usb2_udc(&imx27_fsl_usb2_udc_data, pdata)
extern const struct imx_imx2_wdt_data imx27_imx2_wdt_data __initconst; extern const struct imx_imx2_wdt_data imx27_imx2_wdt_data;
#define imx27_add_imx2_wdt(pdata) \ #define imx27_add_imx2_wdt(pdata) \
imx_add_imx2_wdt(&imx27_imx2_wdt_data) imx_add_imx2_wdt(&imx27_imx2_wdt_data)
extern const struct imx_imx_fb_data imx27_imx_fb_data __initconst; extern const struct imx_imx_fb_data imx27_imx_fb_data;
#define imx27_add_imx_fb(pdata) \ #define imx27_add_imx_fb(pdata) \
imx_add_imx_fb(&imx27_imx_fb_data, pdata) imx_add_imx_fb(&imx27_imx_fb_data, pdata)
extern const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst; extern const struct imx_imx_i2c_data imx27_imx_i2c_data[];
#define imx27_add_imx_i2c(id, pdata) \ #define imx27_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx27_imx_i2c_data[id], pdata) imx_add_imx_i2c(&imx27_imx_i2c_data[id], pdata)
extern const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst; extern const struct imx_imx_keypad_data imx27_imx_keypad_data;
#define imx27_add_imx_keypad(pdata) \ #define imx27_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx27_imx_keypad_data, pdata) imx_add_imx_keypad(&imx27_imx_keypad_data, pdata)
extern const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst; extern const struct imx_imx_ssi_data imx27_imx_ssi_data[];
#define imx27_add_imx_ssi(id, pdata) \ #define imx27_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx27_imx_ssi_data[id], pdata) imx_add_imx_ssi(&imx27_imx_ssi_data[id], pdata)
extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst; extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[];
#define imx27_add_imx_uart(id, pdata) \ #define imx27_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx27_imx_uart_data[id], pdata) imx_add_imx_uart_1irq(&imx27_imx_uart_data[id], pdata)
#define imx27_add_imx_uart0(pdata) imx27_add_imx_uart(0, pdata) #define imx27_add_imx_uart0(pdata) imx27_add_imx_uart(0, pdata)
...@@ -47,30 +47,30 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst; ...@@ -47,30 +47,30 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst;
#define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata) #define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata)
#define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata) #define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata)
extern const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst; extern const struct imx_mx2_camera_data imx27_mx2_camera_data;
#define imx27_add_mx2_camera(pdata) \ #define imx27_add_mx2_camera(pdata) \
imx_add_mx2_camera(&imx27_mx2_camera_data, pdata) imx_add_mx2_camera(&imx27_mx2_camera_data, pdata)
extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst; extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data;
#define imx27_add_mxc_ehci_otg(pdata) \ #define imx27_add_mxc_ehci_otg(pdata) \
imx_add_mxc_ehci(&imx27_mxc_ehci_otg_data, pdata) imx_add_mxc_ehci(&imx27_mxc_ehci_otg_data, pdata)
extern const struct imx_mxc_ehci_data imx27_mxc_ehci_hs_data[] __initconst; extern const struct imx_mxc_ehci_data imx27_mxc_ehci_hs_data[];
#define imx27_add_mxc_ehci_hs(id, pdata) \ #define imx27_add_mxc_ehci_hs(id, pdata) \
imx_add_mxc_ehci(&imx27_mxc_ehci_hs_data[id - 1], pdata) imx_add_mxc_ehci(&imx27_mxc_ehci_hs_data[id - 1], pdata)
extern const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst; extern const struct imx_mxc_mmc_data imx27_mxc_mmc_data[];
#define imx27_add_mxc_mmc(id, pdata) \ #define imx27_add_mxc_mmc(id, pdata) \
imx_add_mxc_mmc(&imx27_mxc_mmc_data[id], pdata) imx_add_mxc_mmc(&imx27_mxc_mmc_data[id], pdata)
extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst; extern const struct imx_mxc_nand_data imx27_mxc_nand_data;
#define imx27_add_mxc_nand(pdata) \ #define imx27_add_mxc_nand(pdata) \
imx_add_mxc_nand(&imx27_mxc_nand_data, pdata) imx_add_mxc_nand(&imx27_mxc_nand_data, pdata)
extern const struct imx_mxc_w1_data imx27_mxc_w1_data __initconst; extern const struct imx_mxc_w1_data imx27_mxc_w1_data;
#define imx27_add_mxc_w1(pdata) \ #define imx27_add_mxc_w1(pdata) \
imx_add_mxc_w1(&imx27_mxc_w1_data) imx_add_mxc_w1(&imx27_mxc_w1_data)
extern const struct imx_spi_imx_data imx27_cspi_data[] __initconst; extern const struct imx_spi_imx_data imx27_cspi_data[];
#define imx27_add_cspi(id, pdata) \ #define imx27_add_cspi(id, pdata) \
imx_add_spi_imx(&imx27_cspi_data[id], pdata) imx_add_spi_imx(&imx27_cspi_data[id], pdata)
#define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata) #define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata)
......
...@@ -9,30 +9,30 @@ ...@@ -9,30 +9,30 @@
#include <mach/mx31.h> #include <mach/mx31.h>
#include <mach/devices-common.h> #include <mach/devices-common.h>
extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst; extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data;
#define imx31_add_fsl_usb2_udc(pdata) \ #define imx31_add_fsl_usb2_udc(pdata) \
imx_add_fsl_usb2_udc(&imx31_fsl_usb2_udc_data, pdata) imx_add_fsl_usb2_udc(&imx31_fsl_usb2_udc_data, pdata)
extern const struct imx_imx2_wdt_data imx31_imx2_wdt_data __initconst; extern const struct imx_imx2_wdt_data imx31_imx2_wdt_data;
#define imx31_add_imx2_wdt(pdata) \ #define imx31_add_imx2_wdt(pdata) \
imx_add_imx2_wdt(&imx31_imx2_wdt_data) imx_add_imx2_wdt(&imx31_imx2_wdt_data)
extern const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst; extern const struct imx_imx_i2c_data imx31_imx_i2c_data[];
#define imx31_add_imx_i2c(id, pdata) \ #define imx31_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx31_imx_i2c_data[id], pdata) imx_add_imx_i2c(&imx31_imx_i2c_data[id], pdata)
#define imx31_add_imx_i2c0(pdata) imx31_add_imx_i2c(0, pdata) #define imx31_add_imx_i2c0(pdata) imx31_add_imx_i2c(0, pdata)
#define imx31_add_imx_i2c1(pdata) imx31_add_imx_i2c(1, pdata) #define imx31_add_imx_i2c1(pdata) imx31_add_imx_i2c(1, pdata)
#define imx31_add_imx_i2c2(pdata) imx31_add_imx_i2c(2, pdata) #define imx31_add_imx_i2c2(pdata) imx31_add_imx_i2c(2, pdata)
extern const struct imx_imx_keypad_data imx31_imx_keypad_data __initconst; extern const struct imx_imx_keypad_data imx31_imx_keypad_data;
#define imx31_add_imx_keypad(pdata) \ #define imx31_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx31_imx_keypad_data, pdata) imx_add_imx_keypad(&imx31_imx_keypad_data, pdata)
extern const struct imx_imx_ssi_data imx31_imx_ssi_data[] __initconst; extern const struct imx_imx_ssi_data imx31_imx_ssi_data[];
#define imx31_add_imx_ssi(id, pdata) \ #define imx31_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx31_imx_ssi_data[id], pdata) imx_add_imx_ssi(&imx31_imx_ssi_data[id], pdata)
extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst; extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[];
#define imx31_add_imx_uart(id, pdata) \ #define imx31_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx31_imx_uart_data[id], pdata) imx_add_imx_uart_1irq(&imx31_imx_uart_data[id], pdata)
#define imx31_add_imx_uart0(pdata) imx31_add_imx_uart(0, pdata) #define imx31_add_imx_uart0(pdata) imx31_add_imx_uart(0, pdata)
...@@ -41,26 +41,38 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst; ...@@ -41,26 +41,38 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst;
#define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata) #define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata)
#define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) #define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata)
extern const struct imx_mxc_ehci_data imx31_mxc_ehci_otg_data __initconst; extern const struct imx_ipu_core_data imx31_ipu_core_data;
#define imx31_add_ipu_core(pdata) \
imx_add_ipu_core(&imx31_ipu_core_data, pdata)
#define imx31_alloc_mx3_camera(pdata) \
imx_alloc_mx3_camera(&imx31_ipu_core_data, pdata)
#define imx31_add_mx3_sdc_fb(pdata) \
imx_add_mx3_sdc_fb(&imx31_ipu_core_data, pdata)
extern const struct imx_mxc_ehci_data imx31_mxc_ehci_otg_data;
#define imx31_add_mxc_ehci_otg(pdata) \ #define imx31_add_mxc_ehci_otg(pdata) \
imx_add_mxc_ehci(&imx31_mxc_ehci_otg_data, pdata) imx_add_mxc_ehci(&imx31_mxc_ehci_otg_data, pdata)
extern const struct imx_mxc_ehci_data imx31_mxc_ehci_hs_data[] __initconst; extern const struct imx_mxc_ehci_data imx31_mxc_ehci_hs_data[];
#define imx31_add_mxc_ehci_hs(id, pdata) \ #define imx31_add_mxc_ehci_hs(id, pdata) \
imx_add_mxc_ehci(&imx31_mxc_ehci_hs_data[id - 1], pdata) imx_add_mxc_ehci(&imx31_mxc_ehci_hs_data[id - 1], pdata)
extern const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst; extern const struct imx_mxc_mmc_data imx31_mxc_mmc_data[];
#define imx31_add_mxc_mmc(id, pdata) \ #define imx31_add_mxc_mmc(id, pdata) \
imx_add_mxc_mmc(&imx31_mxc_mmc_data[id], pdata) imx_add_mxc_mmc(&imx31_mxc_mmc_data[id], pdata)
extern const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst; extern const struct imx_mxc_nand_data imx31_mxc_nand_data;
#define imx31_add_mxc_nand(pdata) \ #define imx31_add_mxc_nand(pdata) \
imx_add_mxc_nand(&imx31_mxc_nand_data, pdata) imx_add_mxc_nand(&imx31_mxc_nand_data, pdata)
extern const struct imx_mxc_w1_data imx31_mxc_w1_data __initconst; extern const struct imx_mxc_rtc_data imx31_mxc_rtc_data;
#define imx31_add_mxc_rtc(pdata) \
imx_add_mxc_rtc(&imx31_mxc_rtc_data)
extern const struct imx_mxc_w1_data imx31_mxc_w1_data;
#define imx31_add_mxc_w1(pdata) \ #define imx31_add_mxc_w1(pdata) \
imx_add_mxc_w1(&imx31_mxc_w1_data) imx_add_mxc_w1(&imx31_mxc_w1_data)
extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst; extern const struct imx_spi_imx_data imx31_cspi_data[];
#define imx31_add_cspi(id, pdata) \ #define imx31_add_cspi(id, pdata) \
imx_add_spi_imx(&imx31_cspi_data[id], pdata) imx_add_spi_imx(&imx31_cspi_data[id], pdata)
#define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata) #define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata)
......
...@@ -9,67 +9,74 @@ ...@@ -9,67 +9,74 @@
#include <mach/mx35.h> #include <mach/mx35.h>
#include <mach/devices-common.h> #include <mach/devices-common.h>
extern const struct imx_fec_data imx35_fec_data __initconst; extern const struct imx_fec_data imx35_fec_data;
#define imx35_add_fec(pdata) \ #define imx35_add_fec(pdata) \
imx_add_fec(&imx35_fec_data, pdata) imx_add_fec(&imx35_fec_data, pdata)
extern const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst; extern const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data;
#define imx35_add_fsl_usb2_udc(pdata) \ #define imx35_add_fsl_usb2_udc(pdata) \
imx_add_fsl_usb2_udc(&imx35_fsl_usb2_udc_data, pdata) imx_add_fsl_usb2_udc(&imx35_fsl_usb2_udc_data, pdata)
extern const struct imx_flexcan_data imx35_flexcan_data[] __initconst; extern const struct imx_flexcan_data imx35_flexcan_data[];
#define imx35_add_flexcan(id, pdata) \ #define imx35_add_flexcan(id, pdata) \
imx_add_flexcan(&imx35_flexcan_data[id], pdata) imx_add_flexcan(&imx35_flexcan_data[id], pdata)
#define imx35_add_flexcan0(pdata) imx35_add_flexcan(0, pdata) #define imx35_add_flexcan0(pdata) imx35_add_flexcan(0, pdata)
#define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata) #define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata)
extern const struct imx_imx2_wdt_data imx35_imx2_wdt_data __initconst; extern const struct imx_imx2_wdt_data imx35_imx2_wdt_data;
#define imx35_add_imx2_wdt(pdata) \ #define imx35_add_imx2_wdt(pdata) \
imx_add_imx2_wdt(&imx35_imx2_wdt_data) imx_add_imx2_wdt(&imx35_imx2_wdt_data)
extern const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst; extern const struct imx_imx_i2c_data imx35_imx_i2c_data[];
#define imx35_add_imx_i2c(id, pdata) \ #define imx35_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx35_imx_i2c_data[id], pdata) imx_add_imx_i2c(&imx35_imx_i2c_data[id], pdata)
#define imx35_add_imx_i2c0(pdata) imx35_add_imx_i2c(0, pdata) #define imx35_add_imx_i2c0(pdata) imx35_add_imx_i2c(0, pdata)
#define imx35_add_imx_i2c1(pdata) imx35_add_imx_i2c(1, pdata) #define imx35_add_imx_i2c1(pdata) imx35_add_imx_i2c(1, pdata)
#define imx35_add_imx_i2c2(pdata) imx35_add_imx_i2c(2, pdata) #define imx35_add_imx_i2c2(pdata) imx35_add_imx_i2c(2, pdata)
extern const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst; extern const struct imx_imx_keypad_data imx35_imx_keypad_data;
#define imx35_add_imx_keypad(pdata) \ #define imx35_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx35_imx_keypad_data, pdata) imx_add_imx_keypad(&imx35_imx_keypad_data, pdata)
extern const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst; extern const struct imx_imx_ssi_data imx35_imx_ssi_data[];
#define imx35_add_imx_ssi(id, pdata) \ #define imx35_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx35_imx_ssi_data[id], pdata) imx_add_imx_ssi(&imx35_imx_ssi_data[id], pdata)
extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst; extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[];
#define imx35_add_imx_uart(id, pdata) \ #define imx35_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx35_imx_uart_data[id], pdata) imx_add_imx_uart_1irq(&imx35_imx_uart_data[id], pdata)
#define imx35_add_imx_uart0(pdata) imx35_add_imx_uart(0, pdata) #define imx35_add_imx_uart0(pdata) imx35_add_imx_uart(0, pdata)
#define imx35_add_imx_uart1(pdata) imx35_add_imx_uart(1, pdata) #define imx35_add_imx_uart1(pdata) imx35_add_imx_uart(1, pdata)
#define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) #define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata)
extern const struct imx_mxc_ehci_data imx35_mxc_ehci_otg_data __initconst; extern const struct imx_ipu_core_data imx35_ipu_core_data;
#define imx35_add_ipu_core(pdata) \
imx_add_ipu_core(&imx35_ipu_core_data, pdata)
#define imx35_alloc_mx3_camera(pdata) \
imx_alloc_mx3_camera(&imx35_ipu_core_data, pdata)
#define imx35_add_mx3_sdc_fb(pdata) \
imx_add_mx3_sdc_fb(&imx35_ipu_core_data, pdata)
extern const struct imx_mxc_ehci_data imx35_mxc_ehci_otg_data;
#define imx35_add_mxc_ehci_otg(pdata) \ #define imx35_add_mxc_ehci_otg(pdata) \
imx_add_mxc_ehci(&imx35_mxc_ehci_otg_data, pdata) imx_add_mxc_ehci(&imx35_mxc_ehci_otg_data, pdata)
extern const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data __initconst; extern const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data;
#define imx35_add_mxc_ehci_hs(pdata) \ #define imx35_add_mxc_ehci_hs(pdata) \
imx_add_mxc_ehci(&imx35_mxc_ehci_hs_data, pdata) imx_add_mxc_ehci(&imx35_mxc_ehci_hs_data, pdata)
extern const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst; extern const struct imx_mxc_nand_data imx35_mxc_nand_data;
#define imx35_add_mxc_nand(pdata) \ #define imx35_add_mxc_nand(pdata) \
imx_add_mxc_nand(&imx35_mxc_nand_data, pdata) imx_add_mxc_nand(&imx35_mxc_nand_data, pdata)
extern const struct imx_mxc_w1_data imx35_mxc_w1_data __initconst; extern const struct imx_mxc_w1_data imx35_mxc_w1_data;
#define imx35_add_mxc_w1(pdata) \ #define imx35_add_mxc_w1(pdata) \
imx_add_mxc_w1(&imx35_mxc_w1_data) imx_add_mxc_w1(&imx35_mxc_w1_data)
extern const struct imx_sdhci_esdhc_imx_data extern const struct imx_sdhci_esdhc_imx_data imx35_sdhci_esdhc_imx_data[];
imx35_sdhci_esdhc_imx_data[] __initconst;
#define imx35_add_sdhci_esdhc_imx(id, pdata) \ #define imx35_add_sdhci_esdhc_imx(id, pdata) \
imx_add_sdhci_esdhc_imx(&imx35_sdhci_esdhc_imx_data[id], pdata) imx_add_sdhci_esdhc_imx(&imx35_sdhci_esdhc_imx_data[id], pdata)
extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst; extern const struct imx_spi_imx_data imx35_cspi_data[];
#define imx35_add_cspi(id, pdata) \ #define imx35_add_cspi(id, pdata) \
imx_add_spi_imx(&imx35_cspi_data[id], pdata) imx_add_spi_imx(&imx35_cspi_data[id], pdata)
#define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata) #define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata)
......
...@@ -80,4 +80,3 @@ int mx31_initialize_usb_hw(int port, unsigned int flags) ...@@ -80,4 +80,3 @@ int mx31_initialize_usb_hw(int port, unsigned int flags)
return 0; return 0;
} }
...@@ -77,4 +77,3 @@ int mx35_initialize_usb_hw(int port, unsigned int flags) ...@@ -77,4 +77,3 @@ int mx35_initialize_usb_hw(int port, unsigned int flags)
return 0; return 0;
} }
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux-mx27.h> #include <mach/iomux-mx27.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/spi.h>
#include <mach/audmux.h> #include <mach/audmux.h>
#include "devices-imx27.h" #include "devices-imx27.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
...@@ -32,9 +31,7 @@ ...@@ -32,9 +31,7 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/mx25.h> #include <mach/mx25.h>
#include <mach/imx-uart.h>
#include <mach/audmux.h> #include <mach/audmux.h>
#include <mach/esdhc.h>
#include "devices-imx25.h" #include "devices-imx25.h"
...@@ -208,23 +205,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { ...@@ -208,23 +205,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
}, },
}; };
static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { static const struct gpio_keys_platform_data
eukrea_mbimxsd_button_data __initconst = {
.buttons = eukrea_mbimxsd_gpio_buttons, .buttons = eukrea_mbimxsd_gpio_buttons,
.nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
}; };
static struct platform_device eukrea_mbimxsd_button_device = {
.name = "gpio-keys",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &eukrea_mbimxsd_button_data,
}
};
static struct platform_device *platform_devices[] __initdata = { static struct platform_device *platform_devices[] __initdata = {
&eukrea_mbimxsd_leds_gpio, &eukrea_mbimxsd_leds_gpio,
&eukrea_mbimxsd_button_device,
&eukrea_mbimxsd_lcd_powerdev, &eukrea_mbimxsd_lcd_powerdev,
}; };
...@@ -299,4 +287,5 @@ void __init eukrea_mbimxsd25_baseboard_init(void) ...@@ -299,4 +287,5 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
} }
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
#include <linux/i2c.h> #include <linux/i2c.h>
...@@ -38,15 +37,10 @@ ...@@ -38,15 +37,10 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx35.h> #include <mach/iomux-mx35.h>
#include <mach/ipu.h>
#include <mach/mx3fb.h>
#include <mach/audmux.h> #include <mach/audmux.h>
#include <mach/esdhc.h>
#include "devices-imx35.h" #include "devices-imx35.h"
#include "devices.h"
static const struct fb_videomode fb_modedb[] = { static const struct fb_videomode fb_modedb[] = {
{ {
...@@ -101,12 +95,11 @@ static const struct fb_videomode fb_modedb[] = { ...@@ -101,12 +95,11 @@ static const struct fb_videomode fb_modedb[] = {
}, },
}; };
static struct ipu_platform_data mx3_ipu_data = { static const struct ipu_platform_data mx3_ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START, .irq_base = MXC_IPU_IRQ_START,
}; };
static struct mx3fb_platform_data mx3fb_pdata = { static struct mx3fb_platform_data mx3fb_pdata __initdata = {
.dma_dev = &mx3_ipu.dev,
.name = "CMO-QVGA", .name = "CMO-QVGA",
.mode = fb_modedb, .mode = fb_modedb,
.num_modes = ARRAY_SIZE(fb_modedb), .num_modes = ARRAY_SIZE(fb_modedb),
...@@ -223,23 +216,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { ...@@ -223,23 +216,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
}, },
}; };
static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { static const struct gpio_keys_platform_data
eukrea_mbimxsd_button_data __initconst = {
.buttons = eukrea_mbimxsd_gpio_buttons, .buttons = eukrea_mbimxsd_gpio_buttons,
.nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
}; };
static struct platform_device eukrea_mbimxsd_button_device = {
.name = "gpio-keys",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &eukrea_mbimxsd_button_data,
}
};
static struct platform_device *platform_devices[] __initdata = { static struct platform_device *platform_devices[] __initdata = {
&eukrea_mbimxsd_leds_gpio, &eukrea_mbimxsd_leds_gpio,
&eukrea_mbimxsd_button_device,
&eukrea_mbimxsd_lcd_powerdev, &eukrea_mbimxsd_lcd_powerdev,
}; };
...@@ -292,8 +276,8 @@ void __init eukrea_mbimxsd35_baseboard_init(void) ...@@ -292,8 +276,8 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
#endif #endif
imx35_add_imx_uart1(&uart_pdata); imx35_add_imx_uart1(&uart_pdata);
mxc_register_device(&mx3_ipu, &mx3_ipu_data); imx35_add_ipu_core(&mx3_ipu_data);
mxc_register_device(&mx3_fb, &mx3fb_pdata); imx35_add_mx3_sdc_fb(&mx3fb_pdata);
imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);
...@@ -315,4 +299,5 @@ void __init eukrea_mbimxsd35_baseboard_init(void) ...@@ -315,4 +299,5 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
} }
/*
* linux/arch/arm/mach-imx/mach-apf9328.c
*
* Copyright (c) 2005-2011 ARMadeus systems <support@armadeus.com>
*
* This work is based on mach-scb9328.c which is:
* Copyright (c) 2004 Sascha Hauer <saschahauer@web.de>
* Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/dm9000.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/iomux-mx1.h>
#include "devices-imx1.h"
static const int apf9328_pins[] __initconst = {
/* UART1 */
PC9_PF_UART1_CTS,
PC10_PF_UART1_RTS,
PC11_PF_UART1_TXD,
PC12_PF_UART1_RXD,
/* UART2 */
PB28_PF_UART2_CTS,
PB29_PF_UART2_RTS,
PB30_PF_UART2_TXD,
PB31_PF_UART2_RXD,
};
/*
* The APF9328 can have up to 32MB NOR Flash
*/
static struct resource flash_resource = {
.start = MX1_CS0_PHYS,
.end = MX1_CS0_PHYS + SZ_32M - 1,
.flags = IORESOURCE_MEM,
};
static struct physmap_flash_data apf9328_flash_data = {
.width = 2,
};
static struct platform_device apf9328_flash_device = {
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &apf9328_flash_data,
},
.resource = &flash_resource,
.num_resources = 1,
};
/*
* APF9328 has a DM9000 Ethernet controller
*/
static struct dm9000_plat_data dm9000_setup = {
.flags = DM9000_PLATF_16BITONLY
};
static struct resource dm9000_resources[] = {
{
.start = MX1_CS4_PHYS + 0x00C00000,
.end = MX1_CS4_PHYS + 0x00C00001,
.flags = IORESOURCE_MEM,
}, {
.start = MX1_CS4_PHYS + 0x00C00002,
.end = MX1_CS4_PHYS + 0x00C00003,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_GPIOB(14),
.end = IRQ_GPIOB(14),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},
};
static struct platform_device dm9000x_device = {
.name = "dm9000",
.id = 0,
.num_resources = ARRAY_SIZE(dm9000_resources),
.resource = dm9000_resources,
.dev = {
.platform_data = &dm9000_setup,
}
};
/* --- SERIAL RESSOURCE --- */
static const struct imxuart_platform_data uart0_pdata __initconst = {
.flags = 0,
};
static const struct imxuart_platform_data uart1_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
static struct platform_device *devices[] __initdata = {
&apf9328_flash_device,
&dm9000x_device,
};
static void __init apf9328_init(void)
{
mxc_gpio_setup_multiple_pins(apf9328_pins,
ARRAY_SIZE(apf9328_pins),
"APF9328");
imx1_add_imx_uart0(&uart0_pdata);
imx1_add_imx_uart1(&uart1_pdata);
platform_add_devices(devices, ARRAY_SIZE(devices));
}
static void __init apf9328_timer_init(void)
{
mx1_clocks_init(32768);
}
static struct sys_timer apf9328_timer = {
.init = apf9328_timer_init,
};
MACHINE_START(APF9328, "Armadeus APF9328")
/* Maintainer: Gwenhael Goavec-Merou, ARMadeus Systems */
.map_io = mx1_map_io,
.init_early = imx1_init_early,
.init_irq = mx1_init_irq,
.timer = &apf9328_timer,
.init_machine = apf9328_init,
MACHINE_END
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/ulpi.h> #include <linux/usb/ulpi.h>
...@@ -49,13 +48,10 @@ ...@@ -49,13 +48,10 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include <mach/ipu.h>
#include <mach/mx3fb.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h" #include "crmregs-imx31.h"
#include "crm_regs.h"
static int armadillo5x0_pins[] = { static int armadillo5x0_pins[] = {
/* UART1 */ /* UART1 */
...@@ -280,20 +276,12 @@ static struct gpio_keys_button armadillo5x0_buttons[] = { ...@@ -280,20 +276,12 @@ static struct gpio_keys_button armadillo5x0_buttons[] = {
} }
}; };
static struct gpio_keys_platform_data armadillo5x0_button_data = { static const struct gpio_keys_platform_data
armadillo5x0_button_data __initconst = {
.buttons = armadillo5x0_buttons, .buttons = armadillo5x0_buttons,
.nbuttons = ARRAY_SIZE(armadillo5x0_buttons), .nbuttons = ARRAY_SIZE(armadillo5x0_buttons),
}; };
static struct platform_device armadillo5x0_button_device = {
.name = "gpio-keys",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &armadillo5x0_button_data,
}
};
/* /*
* NAND Flash * NAND Flash
*/ */
...@@ -383,12 +371,11 @@ static const struct fb_videomode fb_modedb[] = { ...@@ -383,12 +371,11 @@ static const struct fb_videomode fb_modedb[] = {
}, },
}; };
static struct ipu_platform_data mx3_ipu_data = { static const struct ipu_platform_data mx3_ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START, .irq_base = MXC_IPU_IRQ_START,
}; };
static struct mx3fb_platform_data mx3fb_pdata = { static struct mx3fb_platform_data mx3fb_pdata __initdata = {
.dma_dev = &mx3_ipu.dev,
.name = "CRT-VGA", .name = "CRT-VGA",
.mode = fb_modedb, .mode = fb_modedb,
.num_modes = ARRAY_SIZE(fb_modedb), .num_modes = ARRAY_SIZE(fb_modedb),
...@@ -496,7 +483,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = { ...@@ -496,7 +483,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&armadillo5x0_smc911x_device, &armadillo5x0_smc911x_device,
&armadillo5x0_button_device,
}; };
/* /*
...@@ -508,6 +494,7 @@ static void __init armadillo5x0_init(void) ...@@ -508,6 +494,7 @@ static void __init armadillo5x0_init(void)
ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0");
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
imx_add_gpio_keys(&armadillo5x0_button_data);
imx31_add_imx_i2c1(NULL); imx31_add_imx_i2c1(NULL);
/* Register UART */ /* Register UART */
...@@ -521,8 +508,8 @@ static void __init armadillo5x0_init(void) ...@@ -521,8 +508,8 @@ static void __init armadillo5x0_init(void)
imx31_add_mxc_mmc(0, &sdhc_pdata); imx31_add_mxc_mmc(0, &sdhc_pdata);
/* Register FB */ /* Register FB */
mxc_register_device(&mx3_ipu, &mx3_ipu_data); imx31_add_ipu_core(&mx3_ipu_data);
mxc_register_device(&mx3_fb, &mx3fb_pdata); imx31_add_mx3_sdc_fb(&mx3fb_pdata);
/* Register NOR Flash */ /* Register NOR Flash */
mxc_register_device(&armadillo5x0_nor_flash, mxc_register_device(&armadillo5x0_nor_flash,
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include <mach/imx-uart.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h> #include <mach/common.h>
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx27.h> #include <mach/iomux-mx27.h>
#include <mach/mxc_nand.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include "devices-imx27.h" #include "devices-imx27.h"
......
...@@ -41,10 +41,8 @@ ...@@ -41,10 +41,8 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux-mx35.h> #include <mach/iomux-mx35.h>
#include <mach/mxc_nand.h>
#include "devices-imx35.h" #include "devices-imx35.h"
#include "devices.h"
static const struct imxuart_platform_data uart_pdata __initconst = { static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/mx25.h> #include <mach/mx25.h>
#include <mach/mxc_nand.h>
#include <mach/imxfb.h>
#include <mach/iomux-mx25.h> #include <mach/iomux-mx25.h>
#include "devices-imx25.h" #include "devices-imx25.h"
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c/pca953x.h> #include <linux/i2c/pca953x.h>
#include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -130,19 +129,12 @@ static struct gpio_keys_button visstrim_gpio_keys[] = { ...@@ -130,19 +129,12 @@ static struct gpio_keys_button visstrim_gpio_keys[] = {
} }
}; };
static struct gpio_keys_platform_data visstrim_gpio_keys_platform_data = { static const struct gpio_keys_platform_data
visstrim_gpio_keys_platform_data __initconst = {
.buttons = visstrim_gpio_keys, .buttons = visstrim_gpio_keys,
.nbuttons = ARRAY_SIZE(visstrim_gpio_keys), .nbuttons = ARRAY_SIZE(visstrim_gpio_keys),
}; };
static struct platform_device visstrim_gpio_keys_device = {
.name = "gpio-keys",
.id = -1,
.dev = {
.platform_data = &visstrim_gpio_keys_platform_data,
},
};
/* Visstrim_SM10 has a microSD slot connected to sdhc1 */ /* Visstrim_SM10 has a microSD slot connected to sdhc1 */
static int visstrim_m10_sdhc1_init(struct device *dev, static int visstrim_m10_sdhc1_init(struct device *dev,
irq_handler_t detect_irq, void *data) irq_handler_t detect_irq, void *data)
...@@ -186,7 +178,6 @@ static struct platform_device visstrim_m10_nor_mtd_device = { ...@@ -186,7 +178,6 @@ static struct platform_device visstrim_m10_nor_mtd_device = {
}; };
static struct platform_device *platform_devices[] __initdata = { static struct platform_device *platform_devices[] __initdata = {
&visstrim_gpio_keys_device,
&visstrim_m10_nor_mtd_device, &visstrim_m10_nor_mtd_device,
}; };
...@@ -255,6 +246,7 @@ static void __init visstrim_m10_board_init(void) ...@@ -255,6 +246,7 @@ static void __init visstrim_m10_board_init(void)
imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata); imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata);
imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata); imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata);
imx27_add_fec(NULL); imx27_add_fec(NULL);
imx_add_gpio_keys(&visstrim_gpio_keys_platform_data);
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
} }
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
#define KZM_ARM11_IO_ADDRESS(x) (IOMEM( \ #define KZM_ARM11_IO_ADDRESS(x) (IOMEM( \
IMX_IO_P2V_MODULE(x, MX31_CS4) ?: \ IMX_IO_P2V_MODULE(x, MX31_CS4) ?: \
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/i2c.h>
#include <mach/iomux-mx1.h> #include <mach/iomux-mx1.h>
#include <mach/irqs.h> #include <mach/irqs.h>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/iomux-mx21.h> #include <mach/iomux-mx21.h>
#include <mach/mxc_nand.h>
#include "devices-imx21.h" #include "devices-imx21.h"
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/input/matrix_keypad.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <mach/hardware.h> #include <mach/hardware.h>
...@@ -103,6 +102,8 @@ static iomux_v3_cfg_t mx25pdk_pads[] = { ...@@ -103,6 +102,8 @@ static iomux_v3_cfg_t mx25pdk_pads[] = {
MX25_PAD_SD1_DATA1__SD1_DATA1, MX25_PAD_SD1_DATA1__SD1_DATA1,
MX25_PAD_SD1_DATA2__SD1_DATA2, MX25_PAD_SD1_DATA2__SD1_DATA2,
MX25_PAD_SD1_DATA3__SD1_DATA3, MX25_PAD_SD1_DATA3__SD1_DATA3,
MX25_PAD_A14__GPIO_2_0, /* WriteProtect */
MX25_PAD_A15__GPIO_2_1, /* CardDetect */
/* I2C1 */ /* I2C1 */
MX25_PAD_I2C1_CLK__I2C1_CLK, MX25_PAD_I2C1_CLK__I2C1_CLK,
...@@ -208,6 +209,14 @@ static const struct imxi2c_platform_data mx25_3ds_i2c0_data __initconst = { ...@@ -208,6 +209,14 @@ static const struct imxi2c_platform_data mx25_3ds_i2c0_data __initconst = {
.bitrate = 100000, .bitrate = 100000,
}; };
#define SD1_GPIO_WP IMX_GPIO_NR(2, 0)
#define SD1_GPIO_CD IMX_GPIO_NR(2, 1)
static const struct esdhc_platform_data mx25pdk_esdhc_pdata __initconst = {
.wp_gpio = SD1_GPIO_WP,
.cd_gpio = SD1_GPIO_CD,
};
static void __init mx25pdk_init(void) static void __init mx25pdk_init(void)
{ {
mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
...@@ -225,7 +234,7 @@ static void __init mx25pdk_init(void) ...@@ -225,7 +234,7 @@ static void __init mx25pdk_init(void)
imx25_add_fec(&mx25_fec_pdata); imx25_add_fec(&mx25_fec_pdata);
imx25_add_imx_keypad(&mx25pdk_keymap_data); imx25_add_imx_keypad(&mx25pdk_keymap_data);
imx25_add_sdhci_esdhc_imx(0, NULL); imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata);
imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
} }
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/iomux-mx27.h> #include <mach/iomux-mx27.h>
#include <mach/mxc_nand.h>
#include "devices-imx27.h" #include "devices-imx27.h"
......
...@@ -39,13 +39,8 @@ ...@@ -39,13 +39,8 @@
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include <mach/3ds_debugboard.h> #include <mach/3ds_debugboard.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include <mach/mmc.h>
#include <mach/ipu.h>
#include <mach/mx3fb.h>
#include <mach/mx3_camera.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
/* CPLD IRQ line for external uart, external ethernet etc */ /* CPLD IRQ line for external uart, external ethernet etc */
#define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
...@@ -178,22 +173,37 @@ static struct gpio mx31_3ds_camera_gpios[] = { ...@@ -178,22 +173,37 @@ static struct gpio mx31_3ds_camera_gpios[] = {
{ MX31_3DS_GPIO_CAMERA_RST, GPIOF_OUT_INIT_HIGH, "camera-reset" }, { MX31_3DS_GPIO_CAMERA_RST, GPIOF_OUT_INIT_HIGH, "camera-reset" },
}; };
static int __init mx31_3ds_camera_alloc_dma(void) static const struct mx3_camera_pdata mx31_3ds_camera_pdata __initconst = {
.flags = MX3_CAMERA_DATAWIDTH_10,
.mclk_10khz = 2600,
};
static int __init mx31_3ds_init_camera(void)
{ {
int dma; int dma, ret = -ENOMEM;
struct platform_device *pdev =
imx31_alloc_mx3_camera(&mx31_3ds_camera_pdata);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
if (!mx3_camera_base) if (!mx3_camera_base)
return -ENOMEM; goto err;
dma = dma_declare_coherent_memory(&mx3_camera.dev, dma = dma_declare_coherent_memory(&pdev->dev,
mx3_camera_base, mx3_camera_base, mx3_camera_base, mx3_camera_base,
MX31_3DS_CAMERA_BUF_SIZE, MX31_3DS_CAMERA_BUF_SIZE,
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
if (!(dma & DMA_MEMORY_MAP)) if (!(dma & DMA_MEMORY_MAP))
return -ENOMEM; goto err;
return 0; ret = platform_device_add(pdev);
if (ret)
err:
platform_device_put(pdev);
return ret;
} }
static int mx31_3ds_camera_power(struct device *dev, int on) static int mx31_3ds_camera_power(struct device *dev, int on)
...@@ -241,12 +251,6 @@ static struct platform_device mx31_3ds_ov2640 = { ...@@ -241,12 +251,6 @@ static struct platform_device mx31_3ds_ov2640 = {
}, },
}; };
struct mx3_camera_pdata mx31_3ds_camera_pdata = {
.dma_dev = &mx3_ipu.dev,
.flags = MX3_CAMERA_DATAWIDTH_10,
.mclk_10khz = 2600,
};
/* /*
* FB support * FB support
*/ */
...@@ -273,8 +277,7 @@ static struct ipu_platform_data mx3_ipu_data = { ...@@ -273,8 +277,7 @@ static struct ipu_platform_data mx3_ipu_data = {
.irq_base = MXC_IPU_IRQ_START, .irq_base = MXC_IPU_IRQ_START,
}; };
static struct mx3fb_platform_data mx3fb_pdata = { static struct mx3fb_platform_data mx3fb_pdata __initdata = {
.dma_dev = &mx3_ipu.dev,
.name = "Epson-VGA", .name = "Epson-VGA",
.mode = fb_modedb, .mode = fb_modedb,
.num_modes = ARRAY_SIZE(fb_modedb), .num_modes = ARRAY_SIZE(fb_modedb),
...@@ -723,8 +726,8 @@ static void __init mx31_3ds_init(void) ...@@ -723,8 +726,8 @@ static void __init mx31_3ds_init(void)
imx31_add_mxc_mmc(0, &sdhc1_pdata); imx31_add_mxc_mmc(0, &sdhc1_pdata);
imx31_add_spi_imx0(&spi0_pdata); imx31_add_spi_imx0(&spi0_pdata);
mxc_register_device(&mx3_ipu, &mx3_ipu_data); imx31_add_ipu_core(&mx3_ipu_data);
mxc_register_device(&mx3_fb, &mx3fb_pdata); imx31_add_mx3_sdc_fb(&mx3fb_pdata);
/* CSI */ /* CSI */
/* Camera power: default - off */ /* Camera power: default - off */
...@@ -735,10 +738,7 @@ static void __init mx31_3ds_init(void) ...@@ -735,10 +738,7 @@ static void __init mx31_3ds_init(void)
iclink_ov2640.power = NULL; iclink_ov2640.power = NULL;
} }
if (!mx31_3ds_camera_alloc_dma()) mx31_3ds_init_camera();
mxc_register_device(&mx3_camera, &mx31_3ds_camera_pdata);
else
pr_err("Failed to allocate dma memory for camera");
} }
static void __init mx31_3ds_timer_init(void) static void __init mx31_3ds_timer_init(void)
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#endif #endif
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
/* PBC Board interrupt status register */ /* PBC Board interrupt status register */
#define PBC_INTSTATUS 0x000016 #define PBC_INTSTATUS 0x000016
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
/* /*
* This file contains module-specific initialization routines for LILLY-1131. * This file contains module-specific initialization routines for LILLY-1131.
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
/* /*
* This file contains the module-specific initialization routines. * This file contains the module-specific initialization routines.
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/mfd/mc13783.h> #include <linux/mfd/mc13783.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/memblock.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/ulpi.h> #include <linux/usb/ulpi.h>
...@@ -39,13 +40,9 @@ ...@@ -39,13 +40,9 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include <mach/ipu.h>
#include <mach/mx3_camera.h>
#include <mach/spi.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
static unsigned int moboard_pins[] = { static unsigned int moboard_pins[] = {
/* UART0 */ /* UART0 */
...@@ -194,7 +191,7 @@ static struct regulator_init_data sdhc_vreg_data = { ...@@ -194,7 +191,7 @@ static struct regulator_init_data sdhc_vreg_data = {
static struct regulator_consumer_supply cam_consumers[] = { static struct regulator_consumer_supply cam_consumers[] = {
{ {
.dev = &mx3_camera.dev, .dev_name = "mx3_camera.0",
.supply = "cam_vcc", .supply = "cam_vcc",
}, },
}; };
...@@ -458,7 +455,7 @@ static struct platform_device mx31moboard_leds_device = { ...@@ -458,7 +455,7 @@ static struct platform_device mx31moboard_leds_device = {
}, },
}; };
static struct ipu_platform_data mx3_ipu_data = { static const struct ipu_platform_data mx3_ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START, .irq_base = MXC_IPU_IRQ_START,
}; };
...@@ -467,37 +464,39 @@ static struct platform_device *devices[] __initdata = { ...@@ -467,37 +464,39 @@ static struct platform_device *devices[] __initdata = {
&mx31moboard_leds_device, &mx31moboard_leds_device,
}; };
static struct mx3_camera_pdata camera_pdata = { static struct mx3_camera_pdata camera_pdata __initdata = {
.dma_dev = &mx3_ipu.dev,
.flags = MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10, .flags = MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10,
.mclk_10khz = 4800, .mclk_10khz = 4800,
}; };
#define CAMERA_BUF_SIZE (4*1024*1024) static phys_addr_t mx3_camera_base __initdata;
#define MX3_CAMERA_BUF_SIZE SZ_4M
static int __init mx31moboard_cam_alloc_dma(const size_t buf_size) static int __init mx31moboard_init_cam(void)
{ {
dma_addr_t dma_handle; int dma, ret = -ENOMEM;
void *buf; struct platform_device *pdev;
int dma;
if (buf_size < 2 * 1024 * 1024)
return -EINVAL;
buf = dma_alloc_coherent(NULL, buf_size, &dma_handle, GFP_KERNEL); imx31_add_ipu_core(&mx3_ipu_data);
if (!buf) {
pr_err("%s: cannot allocate camera buffer-memory\n", __func__);
return -ENOMEM;
}
memset(buf, 0, buf_size); pdev = imx31_alloc_mx3_camera(&camera_pdata);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
dma = dma_declare_coherent_memory(&mx3_camera.dev, dma = dma_declare_coherent_memory(&pdev->dev,
dma_handle, dma_handle, buf_size, mx3_camera_base, mx3_camera_base,
MX3_CAMERA_BUF_SIZE,
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
if (!(dma & DMA_MEMORY_MAP))
goto err;
ret = platform_device_add(pdev);
if (ret)
err:
platform_device_put(pdev);
return ret;
/* The way we call dma_declare_coherent_memory only a malloc can fail */
return dma & DMA_MEMORY_MAP ? 0 : -ENOMEM;
} }
static int mx31moboard_baseboard; static int mx31moboard_baseboard;
...@@ -529,9 +528,7 @@ static void __init mx31moboard_init(void) ...@@ -529,9 +528,7 @@ static void __init mx31moboard_init(void)
imx31_add_mxc_mmc(0, &sdhc1_pdata); imx31_add_mxc_mmc(0, &sdhc1_pdata);
mxc_register_device(&mx3_ipu, &mx3_ipu_data); mx31moboard_init_cam();
if (!mx31moboard_cam_alloc_dma(CAMERA_BUF_SIZE))
mxc_register_device(&mx3_camera, &camera_pdata);
usb_xcvr_reset(); usb_xcvr_reset();
...@@ -565,9 +562,19 @@ struct sys_timer mx31moboard_timer = { ...@@ -565,9 +562,19 @@ struct sys_timer mx31moboard_timer = {
.init = mx31moboard_timer_init, .init = mx31moboard_timer_init,
}; };
static void __init mx31moboard_reserve(void)
{
/* reserve 4 MiB for mx3-camera */
mx3_camera_base = memblock_alloc(MX3_CAMERA_BUF_SIZE,
MX3_CAMERA_BUF_SIZE);
memblock_free(mx3_camera_base, MX3_CAMERA_BUF_SIZE);
memblock_remove(mx3_camera_base, MX3_CAMERA_BUF_SIZE);
}
MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
/* Maintainer: Valentin Longchamp, EPFL Mobots group */ /* Maintainer: Valentin Longchamp, EPFL Mobots group */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.reserve = mx31moboard_reserve,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <mach/3ds_debugboard.h> #include <mach/3ds_debugboard.h>
#include "devices-imx35.h" #include "devices-imx35.h"
#include "devices.h"
#define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 1) #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 1)
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <mach/iomux-mx27.h> #include <mach/iomux-mx27.h>
#include <mach/mxc_nand.h>
#include <linux/i2c/pca953x.h> #include <linux/i2c/pca953x.h>
#include "devices-imx27.h" #include "devices-imx27.h"
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <mach/iomux-mx27.h> #include <mach/iomux-mx27.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <mach/audmux.h> #include <mach/audmux.h>
#include <mach/mxc_nand.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/ulpi.h> #include <linux/usb/ulpi.h>
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/memblock.h>
#include <media/soc_camera.h> #include <media/soc_camera.h>
...@@ -41,13 +42,9 @@ ...@@ -41,13 +42,9 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include <mach/ipu.h>
#include <mach/mx3_camera.h>
#include <mach/mx3fb.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
#include "pcm037.h" #include "pcm037.h"
static enum pcm037_board_variant pcm037_instance = PCM037_PCM970; static enum pcm037_board_variant pcm037_instance = PCM037_PCM970;
...@@ -404,35 +401,35 @@ static const struct imxmmc_platform_data sdhc_pdata __initconst = { ...@@ -404,35 +401,35 @@ static const struct imxmmc_platform_data sdhc_pdata __initconst = {
.exit = pcm970_sdhc1_exit, .exit = pcm970_sdhc1_exit,
}; };
struct mx3_camera_pdata camera_pdata = { struct mx3_camera_pdata camera_pdata __initdata = {
.dma_dev = &mx3_ipu.dev,
.flags = MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10, .flags = MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10,
.mclk_10khz = 2000, .mclk_10khz = 2000,
}; };
static int __init pcm037_camera_alloc_dma(const size_t buf_size) static phys_addr_t mx3_camera_base __initdata;
{ #define MX3_CAMERA_BUF_SIZE SZ_4M
dma_addr_t dma_handle;
void *buf;
int dma;
if (buf_size < 2 * 1024 * 1024)
return -EINVAL;
buf = dma_alloc_coherent(NULL, buf_size, &dma_handle, GFP_KERNEL); static int __init pcm037_init_camera(void)
if (!buf) { {
pr_err("%s: cannot allocate camera buffer-memory\n", __func__); int dma, ret = -ENOMEM;
return -ENOMEM; struct platform_device *pdev = imx31_alloc_mx3_camera(&camera_pdata);
}
memset(buf, 0, buf_size); if (IS_ERR(pdev))
return PTR_ERR(pdev);
dma = dma_declare_coherent_memory(&mx3_camera.dev, dma = dma_declare_coherent_memory(&pdev->dev,
dma_handle, dma_handle, buf_size, mx3_camera_base, mx3_camera_base,
MX3_CAMERA_BUF_SIZE,
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
if (!(dma & DMA_MEMORY_MAP))
goto err;
ret = platform_device_add(pdev);
if (ret)
err:
platform_device_put(pdev);
/* The way we call dma_declare_coherent_memory only a malloc can fail */ return ret;
return dma & DMA_MEMORY_MAP ? 0 : -ENOMEM;
} }
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
...@@ -442,7 +439,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -442,7 +439,7 @@ static struct platform_device *devices[] __initdata = {
&pcm037_mt9v022, &pcm037_mt9v022,
}; };
static struct ipu_platform_data mx3_ipu_data = { static const struct ipu_platform_data mx3_ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START, .irq_base = MXC_IPU_IRQ_START,
}; };
...@@ -500,7 +497,6 @@ static const struct fb_videomode fb_modedb[] = { ...@@ -500,7 +497,6 @@ static const struct fb_videomode fb_modedb[] = {
}; };
static struct mx3fb_platform_data mx3fb_pdata = { static struct mx3fb_platform_data mx3fb_pdata = {
.dma_dev = &mx3_ipu.dev,
.name = "Sharp-LQ035Q7DH06-QVGA", .name = "Sharp-LQ035Q7DH06-QVGA",
.mode = fb_modedb, .mode = fb_modedb,
.num_modes = ARRAY_SIZE(fb_modedb), .num_modes = ARRAY_SIZE(fb_modedb),
...@@ -638,8 +634,8 @@ static void __init pcm037_init(void) ...@@ -638,8 +634,8 @@ static void __init pcm037_init(void)
imx31_add_mxc_nand(&pcm037_nand_board_info); imx31_add_mxc_nand(&pcm037_nand_board_info);
imx31_add_mxc_mmc(0, &sdhc_pdata); imx31_add_mxc_mmc(0, &sdhc_pdata);
mxc_register_device(&mx3_ipu, &mx3_ipu_data); imx31_add_ipu_core(&mx3_ipu_data);
mxc_register_device(&mx3_fb, &mx3fb_pdata); imx31_add_mx3_sdc_fb(&mx3fb_pdata);
/* CSI */ /* CSI */
/* Camera power: default - off */ /* Camera power: default - off */
...@@ -649,8 +645,7 @@ static void __init pcm037_init(void) ...@@ -649,8 +645,7 @@ static void __init pcm037_init(void)
else else
iclink_mt9t031.power = NULL; iclink_mt9t031.power = NULL;
if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) pcm037_init_camera();
mxc_register_device(&mx3_camera, &camera_pdata);
platform_device_register(&pcm970_sja1000); platform_device_register(&pcm970_sja1000);
...@@ -680,9 +675,19 @@ struct sys_timer pcm037_timer = { ...@@ -680,9 +675,19 @@ struct sys_timer pcm037_timer = {
.init = pcm037_timer_init, .init = pcm037_timer_init,
}; };
static void __init pcm037_reserve(void)
{
/* reserve 4 MiB for mx3-camera */
mx3_camera_base = memblock_alloc(MX3_CAMERA_BUF_SIZE,
MX3_CAMERA_BUF_SIZE);
memblock_free(mx3_camera_base, MX3_CAMERA_BUF_SIZE);
memblock_remove(mx3_camera_base, MX3_CAMERA_BUF_SIZE);
}
MACHINE_START(PCM037, "Phytec Phycore pcm037") MACHINE_START(PCM037, "Phytec Phycore pcm037")
/* Maintainer: Pengutronix */ /* Maintainer: Pengutronix */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.reserve = pcm037_reserve,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -7,19 +7,16 @@ ...@@ -7,19 +7,16 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include <mach/spi.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include "pcm037.h" #include "pcm037.h"
#include "devices.h"
#include "devices-imx31.h" #include "devices-imx31.h"
static unsigned int pcm037_eet_pins[] = { static unsigned int pcm037_eet_pins[] = {
...@@ -156,20 +153,13 @@ static struct gpio_keys_button pcm037_gpio_keys[] = { ...@@ -156,20 +153,13 @@ static struct gpio_keys_button pcm037_gpio_keys[] = {
}, },
}; };
static struct gpio_keys_platform_data pcm037_gpio_keys_platform_data = { static const struct gpio_keys_platform_data
pcm037_gpio_keys_platform_data __initconst = {
.buttons = pcm037_gpio_keys, .buttons = pcm037_gpio_keys,
.nbuttons = ARRAY_SIZE(pcm037_gpio_keys), .nbuttons = ARRAY_SIZE(pcm037_gpio_keys),
.rep = 0, /* No auto-repeat */ .rep = 0, /* No auto-repeat */
}; };
static struct platform_device pcm037_gpio_keys_device = {
.name = "gpio-keys",
.id = -1,
.dev = {
.platform_data = &pcm037_gpio_keys_platform_data,
},
};
static int __init eet_init_devices(void) static int __init eet_init_devices(void)
{ {
if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET) if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET)
...@@ -182,9 +172,8 @@ static int __init eet_init_devices(void) ...@@ -182,9 +172,8 @@ static int __init eet_init_devices(void)
spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev));
imx31_add_spi_imx0(&pcm037_spi1_pdata); imx31_add_spi_imx0(&pcm037_spi1_pdata);
platform_device_register(&pcm037_gpio_keys_device); imx_add_gpio_keys(&pcm037_gpio_keys_platform_data);
return 0; return 0;
} }
late_initcall(eet_init_devices); late_initcall(eet_init_devices);
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx27.h> #include <mach/iomux-mx27.h>
#include <mach/mxc_nand.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include "devices-imx27.h" #include "devices-imx27.h"
......
...@@ -36,14 +36,10 @@ ...@@ -36,14 +36,10 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux-mx35.h> #include <mach/iomux-mx35.h>
#include <mach/ipu.h>
#include <mach/mx3fb.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include <mach/audmux.h> #include <mach/audmux.h>
#include <mach/esdhc.h>
#include "devices-imx35.h" #include "devices-imx35.h"
#include "devices.h"
static const struct fb_videomode fb_modedb[] = { static const struct fb_videomode fb_modedb[] = {
{ {
...@@ -81,12 +77,11 @@ static const struct fb_videomode fb_modedb[] = { ...@@ -81,12 +77,11 @@ static const struct fb_videomode fb_modedb[] = {
}, },
}; };
static struct ipu_platform_data mx3_ipu_data = { static const struct ipu_platform_data mx3_ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START, .irq_base = MXC_IPU_IRQ_START,
}; };
static struct mx3fb_platform_data mx3fb_pdata = { static struct mx3fb_platform_data mx3fb_pdata __initdata = {
.dma_dev = &mx3_ipu.dev,
.name = "Sharp-LQ035Q7", .name = "Sharp-LQ035Q7",
.mode = fb_modedb, .mode = fb_modedb,
.num_modes = ARRAY_SIZE(fb_modedb), .num_modes = ARRAY_SIZE(fb_modedb),
...@@ -132,7 +127,7 @@ static struct i2c_board_info pcm043_i2c_devices[] = { ...@@ -132,7 +127,7 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
.platform_data = &board_eeprom, .platform_data = &board_eeprom,
}, { }, {
I2C_BOARD_INFO("pcf8563", 0x51), I2C_BOARD_INFO("pcf8563", 0x51),
} },
}; };
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
...@@ -390,8 +385,8 @@ static void __init pcm043_init(void) ...@@ -390,8 +385,8 @@ static void __init pcm043_init(void)
imx35_add_imx_i2c0(&pcm043_i2c0_data); imx35_add_imx_i2c0(&pcm043_i2c0_data);
mxc_register_device(&mx3_ipu, &mx3_ipu_data); imx35_add_ipu_core(&mx3_ipu_data);
mxc_register_device(&mx3_fb, &mx3fb_pdata); imx35_add_mx3_sdc_fb(&mx3fb_pdata);
if (otg_mode_host) { if (otg_mode_host) {
otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
/* FPGA defines */ /* FPGA defines */
#define QONG_FPGA_VERSION(major, minor, rev) \ #define QONG_FPGA_VERSION(major, minor, rev) \
......
...@@ -32,16 +32,12 @@ ...@@ -32,16 +32,12 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux-mx35.h> #include <mach/iomux-mx35.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/ipu.h>
#include <mach/mx3fb.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c/at24.h> #include <linux/i2c/at24.h>
#include <linux/mfd/mc13xxx.h> #include <linux/mfd/mc13xxx.h>
#include <linux/gpio_keys.h>
#include "devices-imx35.h" #include "devices-imx35.h"
#include "devices.h"
#define GPIO_LCDPWR IMX_GPIO_NR(1, 2) #define GPIO_LCDPWR IMX_GPIO_NR(1, 2)
#define GPIO_PMIC_INT IMX_GPIO_NR(2, 0) #define GPIO_PMIC_INT IMX_GPIO_NR(2, 0)
...@@ -91,12 +87,11 @@ static const struct fb_videomode fb_modedb[] = { ...@@ -91,12 +87,11 @@ static const struct fb_videomode fb_modedb[] = {
} }
}; };
static struct ipu_platform_data mx3_ipu_data = { static const struct ipu_platform_data mx3_ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START, .irq_base = MXC_IPU_IRQ_START,
}; };
static struct mx3fb_platform_data mx3fb_pdata = { static struct mx3fb_platform_data mx3fb_pdata __initdata = {
.dma_dev = &mx3_ipu.dev,
.name = "PT0708048", .name = "PT0708048",
.mode = fb_modedb, .mode = fb_modedb,
.num_modes = ARRAY_SIZE(fb_modedb), .num_modes = ARRAY_SIZE(fb_modedb),
...@@ -141,18 +136,12 @@ static struct gpio_keys_button vpr200_gpio_keys_table[] = { ...@@ -141,18 +136,12 @@ static struct gpio_keys_button vpr200_gpio_keys_table[] = {
{KEY_F9, GPIO_BUTTON8, 1, "vpr-keys: F9", 1, VPR_KEY_DEBOUNCE}, {KEY_F9, GPIO_BUTTON8, 1, "vpr-keys: F9", 1, VPR_KEY_DEBOUNCE},
}; };
static struct gpio_keys_platform_data vpr200_gpio_keys_data = { static const struct gpio_keys_platform_data
vpr200_gpio_keys_data __initconst = {
.buttons = vpr200_gpio_keys_table, .buttons = vpr200_gpio_keys_table,
.nbuttons = ARRAY_SIZE(vpr200_gpio_keys_table), .nbuttons = ARRAY_SIZE(vpr200_gpio_keys_table),
}; };
static struct platform_device vpr200_device_gpiokeys = {
.name = "gpio-keys",
.dev = {
.platform_data = &vpr200_gpio_keys_data,
}
};
static struct mc13xxx_platform_data vpr200_pmic = { static struct mc13xxx_platform_data vpr200_pmic = {
.flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN, .flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN,
}; };
...@@ -271,7 +260,6 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { ...@@ -271,7 +260,6 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = {
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&vpr200_flash, &vpr200_flash,
&vpr200_device_gpiokeys,
}; };
/* /*
...@@ -283,6 +271,7 @@ static void __init vpr200_board_init(void) ...@@ -283,6 +271,7 @@ static void __init vpr200_board_init(void)
imx35_add_fec(NULL); imx35_add_fec(NULL);
imx35_add_imx2_wdt(NULL); imx35_add_imx2_wdt(NULL);
imx_add_gpio_keys(&vpr200_gpio_keys_data);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
...@@ -299,8 +288,8 @@ static void __init vpr200_board_init(void) ...@@ -299,8 +288,8 @@ static void __init vpr200_board_init(void)
imx35_add_imx_uart0(NULL); imx35_add_imx_uart0(NULL);
imx35_add_imx_uart2(NULL); imx35_add_imx_uart2(NULL);
mxc_register_device(&mx3_ipu, &mx3_ipu_data); imx35_add_ipu_core(&mx3_ipu_data);
mxc_register_device(&mx3_fb, &mx3fb_pdata); imx35_add_mx3_sdc_fb(&mx3fb_pdata);
imx35_add_fsl_usb2_udc(&otg_device_pdata); imx35_add_fsl_usb2_udc(&otg_device_pdata);
imx35_add_mxc_ehci_hs(&usb_host_pdata); imx35_add_mxc_ehci_hs(&usb_host_pdata);
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/hardware/cache-l2x0.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
...@@ -30,7 +29,6 @@ ...@@ -30,7 +29,6 @@
#include <mach/gpio.h> #include <mach/gpio.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#ifdef CONFIG_SOC_IMX31
static struct map_desc mx31_io_desc[] __initdata = { static struct map_desc mx31_io_desc[] __initdata = {
imx_map_entry(MX31, X_MEMC, MT_DEVICE), imx_map_entry(MX31, X_MEMC, MT_DEVICE),
imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED), imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED),
...@@ -66,76 +64,3 @@ void __init mx31_init_irq(void) ...@@ -66,76 +64,3 @@ void __init mx31_init_irq(void)
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
mxc_gpio_init(imx31_gpio_ports, ARRAY_SIZE(imx31_gpio_ports)); mxc_gpio_init(imx31_gpio_ports, ARRAY_SIZE(imx31_gpio_ports));
} }
#endif /* ifdef CONFIG_SOC_IMX31 */
#ifdef CONFIG_SOC_IMX35
static struct map_desc mx35_io_desc[] __initdata = {
imx_map_entry(MX35, X_MEMC, MT_DEVICE),
imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED),
};
void __init mx35_map_io(void)
{
iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
}
void __init imx35_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
}
static struct mxc_gpio_port imx35_gpio_ports[] = {
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 0, 1, MX35_INT_GPIO1),
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 1, 2, MX35_INT_GPIO2),
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 2, 3, MX35_INT_GPIO3),
};
void __init mx35_init_irq(void)
{
mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
mxc_gpio_init(imx35_gpio_ports, ARRAY_SIZE(imx35_gpio_ports));
}
#endif /* ifdef CONFIG_SOC_IMX35 */
#ifdef CONFIG_CACHE_L2X0
static int mxc_init_l2x0(void)
{
void __iomem *l2x0_base;
void __iomem *clkctl_base;
/*
* First of all, we must repair broken chip settings. There are some
* i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
* misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
* Workaraound is to setup the correct register setting prior enabling the
* L2 cache. This should not hurt already working CPUs, as they are using the
* same value
*/
#define L2_MEM_VAL 0x10
clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096);
if (clkctl_base != NULL) {
writel(0x00000515, clkctl_base + L2_MEM_VAL);
iounmap(clkctl_base);
} else {
pr_err("L2 cache: Cannot fix timing. Trying to continue without\n");
}
l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096);
if (IS_ERR(l2x0_base)) {
printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
PTR_ERR(l2x0_base));
return 0;
}
l2x0_init(l2x0_base, 0x00030024, 0x00000000);
return 0;
}
arch_initcall(mxc_init_l2x0);
#endif
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
* Copyright (C) 1999,2000 Arm Limited * Copyright (C) 1999,2000 Arm Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd * Copyright (C) 2000 Deep Blue Solutions Ltd
* Copyright (C) 2002 Shane Nay (shane@minirl.com) * Copyright (C) 2002 Shane Nay (shane@minirl.com)
* Copyright 2004-2005 Freescale Semiconductor, Inc. All Rights Reserved. * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
* - add MXC specific definitions * - add MX31 specific definitions
* Copyright 2006 Motorola, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -19,44 +18,46 @@ ...@@ -19,44 +18,46 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/init.h> #include <linux/init.h>
#include <mach/hardware.h> #include <linux/err.h>
#include <mach/common.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/hardware/cache-l2x0.h>
/* #include <mach/common.h>
* This structure defines the MXC memory map. #include <mach/hardware.h>
*/ #include <mach/iomux-v3.h>
static struct map_desc mxc91231_io_desc[] __initdata = { #include <mach/gpio.h>
imx_map_entry(MXC91231, L2CC, MT_DEVICE), #include <mach/irqs.h>
imx_map_entry(MXC91231, X_MEMC, MT_DEVICE),
imx_map_entry(MXC91231, ROMP, MT_DEVICE), static struct map_desc mx35_io_desc[] __initdata = {
imx_map_entry(MXC91231, AVIC, MT_DEVICE), imx_map_entry(MX35, X_MEMC, MT_DEVICE),
imx_map_entry(MXC91231, AIPS1, MT_DEVICE), imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
imx_map_entry(MXC91231, SPBA0, MT_DEVICE), imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED),
imx_map_entry(MXC91231, SPBA1, MT_DEVICE), imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED),
imx_map_entry(MXC91231, AIPS2, MT_DEVICE), imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED),
}; };
/* void __init mx35_map_io(void)
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory map for
* the IO modules.
*/
void __init mxc91231_map_io(void)
{ {
iotable_init(mxc91231_io_desc, ARRAY_SIZE(mxc91231_io_desc)); iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
} }
void __init mxc91231_init_early(void) void __init imx35_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MXC91231); mxc_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
} }
int mxc91231_register_gpios(void); static struct mxc_gpio_port imx35_gpio_ports[] = {
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 0, 1, MX35_INT_GPIO1),
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 1, 2, MX35_INT_GPIO2),
DEFINE_IMX_GPIO_PORT_IRQ(MX35, 2, 3, MX35_INT_GPIO3),
};
void __init mxc91231_init_irq(void) void __init mx35_init_irq(void)
{ {
mxc91231_register_gpios(); mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
mxc_init_irq(MXC91231_IO_ADDRESS(MXC91231_AVIC_BASE_ADDR)); mxc_gpio_init(imx35_gpio_ports, ARRAY_SIZE(imx35_gpio_ports));
} }
...@@ -34,11 +34,8 @@ ...@@ -34,11 +34,8 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include <mach/board-mx31lilly.h> #include <mach/board-mx31lilly.h>
#include <mach/mx3fb.h>
#include <mach/ipu.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
/* /*
* This file contains board-specific initialization routines for the * This file contains board-specific initialization routines for the
...@@ -164,7 +161,7 @@ static const struct imxmmc_platform_data mmc_pdata __initconst = { ...@@ -164,7 +161,7 @@ static const struct imxmmc_platform_data mmc_pdata __initconst = {
}; };
/* Framebuffer support */ /* Framebuffer support */
static struct ipu_platform_data ipu_data __initdata = { static const struct ipu_platform_data ipu_data __initconst = {
.irq_base = MXC_IPU_IRQ_START, .irq_base = MXC_IPU_IRQ_START,
}; };
...@@ -187,7 +184,6 @@ static const struct fb_videomode fb_modedb = { ...@@ -187,7 +184,6 @@ static const struct fb_videomode fb_modedb = {
}; };
static struct mx3fb_platform_data fb_pdata __initdata = { static struct mx3fb_platform_data fb_pdata __initdata = {
.dma_dev = &mx3_ipu.dev,
.name = "CRT-VGA", .name = "CRT-VGA",
.mode = &fb_modedb, .mode = &fb_modedb,
.num_modes = 1, .num_modes = 1,
...@@ -202,8 +198,8 @@ static void __init mx31lilly_init_fb(void) ...@@ -202,8 +198,8 @@ static void __init mx31lilly_init_fb(void)
return; return;
} }
mxc_register_device(&mx3_ipu, &ipu_data); imx31_add_ipu_core(&ipu_data);
mxc_register_device(&mx3_fb, &fb_pdata); imx31_add_mx3_sdc_fb(&fb_pdata);
gpio_direction_output(LCD_VCC_EN_GPIO, 1); gpio_direction_output(LCD_VCC_EN_GPIO, 1);
} }
...@@ -218,4 +214,3 @@ void __init mx31lilly_db_init(void) ...@@ -218,4 +214,3 @@ void __init mx31lilly_db_init(void)
imx31_add_mxc_mmc(0, &mmc_pdata); imx31_add_mxc_mmc(0, &mmc_pdata);
mx31lilly_init_fb(); mx31lilly_init_fb();
} }
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <mach/board-mx31lite.h> #include <mach/board-mx31lite.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
/* /*
* This file contains board-specific initialization routines for the * This file contains board-specific initialization routines for the
...@@ -200,5 +199,5 @@ void __init mx31lite_db_init(void) ...@@ -200,5 +199,5 @@ void __init mx31lite_db_init(void)
imx31_add_spi_imx0(&spi0_pdata); imx31_add_spi_imx0(&spi0_pdata);
platform_device_register(&litekit_led_device); platform_device_register(&litekit_led_device);
imx31_add_imx2_wdt(NULL); imx31_add_imx2_wdt(NULL);
mxc_register_device(&imx_rtc_device0, NULL); imx31_add_mxc_rtc(NULL);
} }
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
static unsigned int devboard_pins[] = { static unsigned int devboard_pins[] = {
/* UART1 */ /* UART1 */
......
...@@ -26,14 +26,12 @@ ...@@ -26,14 +26,12 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include <media/soc_camera.h> #include <media/soc_camera.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
static unsigned int marxbot_pins[] = { static unsigned int marxbot_pins[] = {
/* SDHC2 */ /* SDHC2 */
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <media/soc_camera.h> #include <media/soc_camera.h>
#include "devices-imx31.h" #include "devices-imx31.h"
#include "devices.h"
static unsigned int smartbot_pins[] = { static unsigned int smartbot_pins[] = {
/* UART1 */ /* UART1 */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <mach/hardware.h> #include <mach/hardware.h>
static volatile u8 *uart_base; volatile u8 *uart_base;
#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <mach/hardware.h> #include <mach/hardware.h>
static volatile u32 *uart_base; volatile u32 *uart_base;
#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE) #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
static volatile u32* uart_base; volatile u32* uart_base;
static inline void putc(int c) static inline void putc(int c)
{ {
......
This diff is collapsed.
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41 #define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41
#define IRQ_KIRKWOOD_GE00_ERR 46 #define IRQ_KIRKWOOD_GE00_ERR 46
#define IRQ_KIRKWOOD_GE01_ERR 47 #define IRQ_KIRKWOOD_GE01_ERR 47
#define IRQ_KIRKWOOD_RTC 53
/* /*
* KIRKWOOD General Purpose Pins * KIRKWOOD General Purpose Pins
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <asm/gpio.h> #include <asm/gpio.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <plat/mpp.h>
#include "common.h" #include "common.h"
#include "mpp.h" #include "mpp.h"
...@@ -36,61 +37,8 @@ static unsigned int __init kirkwood_variant(void) ...@@ -36,61 +37,8 @@ static unsigned int __init kirkwood_variant(void)
return 0; return 0;
} }
#define MPP_CTRL(i) (DEV_BUS_VIRT_BASE + (i) * 4)
#define MPP_NR_REGS (1 + MPP_MAX/8)
void __init kirkwood_mpp_conf(unsigned int *mpp_list) void __init kirkwood_mpp_conf(unsigned int *mpp_list)
{ {
u32 mpp_ctrl[MPP_NR_REGS]; orion_mpp_conf(mpp_list, kirkwood_variant(),
unsigned int variant_mask; MPP_MAX, DEV_BUS_VIRT_BASE);
int i;
variant_mask = kirkwood_variant();
if (!variant_mask)
return;
printk(KERN_DEBUG "initial MPP regs:");
for (i = 0; i < MPP_NR_REGS; i++) {
mpp_ctrl[i] = readl(MPP_CTRL(i));
printk(" %08x", mpp_ctrl[i]);
}
printk("\n");
for ( ; *mpp_list; mpp_list++) {
unsigned int num = MPP_NUM(*mpp_list);
unsigned int sel = MPP_SEL(*mpp_list);
int shift, gpio_mode;
if (num > MPP_MAX) {
printk(KERN_ERR "kirkwood_mpp_conf: invalid MPP "
"number (%u)\n", num);
continue;
}
if (!(*mpp_list & variant_mask)) {
printk(KERN_WARNING
"kirkwood_mpp_conf: requested MPP%u config "
"unavailable on this hardware\n", num);
continue;
}
shift = (num & 7) << 2;
mpp_ctrl[num / 8] &= ~(0xf << shift);
mpp_ctrl[num / 8] |= sel << shift;
gpio_mode = 0;
if (*mpp_list & MPP_INPUT_MASK)
gpio_mode |= GPIO_INPUT_OK;
if (*mpp_list & MPP_OUTPUT_MASK)
gpio_mode |= GPIO_OUTPUT_OK;
if (sel != 0)
gpio_mode = 0;
orion_gpio_set_valid(num, gpio_mode);
}
printk(KERN_DEBUG " final MPP regs:");
for (i = 0; i < MPP_NR_REGS; i++) {
writel(mpp_ctrl[i], MPP_CTRL(i));
printk(" %08x", mpp_ctrl[i]);
}
printk("\n");
} }
...@@ -22,14 +22,8 @@ ...@@ -22,14 +22,8 @@
/* available on F6281 */ ((!!(_F6281)) << 17) | \ /* available on F6281 */ ((!!(_F6281)) << 17) | \
/* available on F6282 */ ((!!(_F6282)) << 18)) /* available on F6282 */ ((!!(_F6282)) << 18))
#define MPP_NUM(x) ((x) & 0xff)
#define MPP_SEL(x) (((x) >> 8) & 0xf)
/* num sel i o 6180 6190 6192 6281 6282 */ /* num sel i o 6180 6190 6192 6281 6282 */
#define MPP_INPUT_MASK MPP( 0, 0x0, 1, 0, 0, 0, 0, 0, 0 )
#define MPP_OUTPUT_MASK MPP( 0, 0x0, 0, 1, 0, 0, 0, 0, 0 )
#define MPP_F6180_MASK MPP( 0, 0x0, 0, 0, 1, 0, 0, 0, 0 ) #define MPP_F6180_MASK MPP( 0, 0x0, 0, 0, 1, 0, 0, 0, 0 )
#define MPP_F6190_MASK MPP( 0, 0x0, 0, 0, 0, 1, 0, 0, 0 ) #define MPP_F6190_MASK MPP( 0, 0x0, 0, 0, 0, 1, 0, 0, 0 )
#define MPP_F6192_MASK MPP( 0, 0x0, 0, 0, 0, 0, 1, 0, 0 ) #define MPP_F6192_MASK MPP( 0, 0x0, 0, 0, 0, 0, 1, 0, 0 )
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/mbus.h> #include <linux/mbus.h>
#include <linux/mv643xx_eth.h> #include <linux/dma-mapping.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/timex.h> #include <asm/timex.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <mach/loki.h> #include <mach/loki.h>
#include <plat/orion_nand.h> #include <plat/orion_nand.h>
#include <plat/time.h> #include <plat/time.h>
#include <plat/common.h>
#include "common.h" #include "common.h"
/***************************************************************************** /*****************************************************************************
...@@ -43,116 +44,28 @@ void __init loki_map_io(void) ...@@ -43,116 +44,28 @@ void __init loki_map_io(void)
/***************************************************************************** /*****************************************************************************
* GE0 * GE00
****************************************************************************/ ****************************************************************************/
struct mv643xx_eth_shared_platform_data loki_ge0_shared_data = {
.t_clk = LOKI_TCLK,
.dram = &loki_mbus_dram_info,
};
static struct resource loki_ge0_shared_resources[] = {
{
.name = "ge0 base",
.start = GE0_PHYS_BASE + 0x2000,
.end = GE0_PHYS_BASE + 0x3fff,
.flags = IORESOURCE_MEM,
},
};
static struct platform_device loki_ge0_shared = {
.name = MV643XX_ETH_SHARED_NAME,
.id = 0,
.dev = {
.platform_data = &loki_ge0_shared_data,
},
.num_resources = 1,
.resource = loki_ge0_shared_resources,
};
static struct resource loki_ge0_resources[] = {
{
.name = "ge0 irq",
.start = IRQ_LOKI_GBE_A_INT,
.end = IRQ_LOKI_GBE_A_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device loki_ge0 = {
.name = MV643XX_ETH_NAME,
.id = 0,
.num_resources = 1,
.resource = loki_ge0_resources,
.dev = {
.coherent_dma_mask = 0xffffffff,
},
};
void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data) void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data)
{ {
eth_data->shared = &loki_ge0_shared;
loki_ge0.dev.platform_data = eth_data;
writel(0x00079220, GE0_VIRT_BASE + 0x20b0); writel(0x00079220, GE0_VIRT_BASE + 0x20b0);
platform_device_register(&loki_ge0_shared);
platform_device_register(&loki_ge0); orion_ge00_init(eth_data, &loki_mbus_dram_info,
GE0_PHYS_BASE, IRQ_LOKI_GBE_A_INT,
0, LOKI_TCLK);
} }
/***************************************************************************** /*****************************************************************************
* GE1 * GE01
****************************************************************************/ ****************************************************************************/
struct mv643xx_eth_shared_platform_data loki_ge1_shared_data = {
.t_clk = LOKI_TCLK,
.dram = &loki_mbus_dram_info,
};
static struct resource loki_ge1_shared_resources[] = {
{
.name = "ge1 base",
.start = GE1_PHYS_BASE + 0x2000,
.end = GE1_PHYS_BASE + 0x3fff,
.flags = IORESOURCE_MEM,
},
};
static struct platform_device loki_ge1_shared = {
.name = MV643XX_ETH_SHARED_NAME,
.id = 1,
.dev = {
.platform_data = &loki_ge1_shared_data,
},
.num_resources = 1,
.resource = loki_ge1_shared_resources,
};
static struct resource loki_ge1_resources[] = {
{
.name = "ge1 irq",
.start = IRQ_LOKI_GBE_B_INT,
.end = IRQ_LOKI_GBE_B_INT,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device loki_ge1 = {
.name = MV643XX_ETH_NAME,
.id = 1,
.num_resources = 1,
.resource = loki_ge1_resources,
.dev = {
.coherent_dma_mask = 0xffffffff,
},
};
void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data) void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data)
{ {
eth_data->shared = &loki_ge1_shared;
loki_ge1.dev.platform_data = eth_data;
writel(0x00079220, GE1_VIRT_BASE + 0x20b0); writel(0x00079220, GE1_VIRT_BASE + 0x20b0);
platform_device_register(&loki_ge1_shared);
platform_device_register(&loki_ge1); orion_ge01_init(eth_data, &loki_mbus_dram_info,
GE1_PHYS_BASE, IRQ_LOKI_GBE_B_INT,
0, LOKI_TCLK);
} }
...@@ -187,7 +100,7 @@ static struct platform_device loki_sas = { ...@@ -187,7 +100,7 @@ static struct platform_device loki_sas = {
.name = "mvsas", .name = "mvsas",
.id = 0, .id = 0,
.dev = { .dev = {
.coherent_dma_mask = 0xffffffff, .coherent_dma_mask = DMA_BIT_MASK(32),
}, },
.num_resources = ARRAY_SIZE(loki_sas_resources), .num_resources = ARRAY_SIZE(loki_sas_resources),
.resource = loki_sas_resources, .resource = loki_sas_resources,
...@@ -203,88 +116,19 @@ void __init loki_sas_init(void) ...@@ -203,88 +116,19 @@ void __init loki_sas_init(void)
/***************************************************************************** /*****************************************************************************
* UART0 * UART0
****************************************************************************/ ****************************************************************************/
static struct plat_serial8250_port loki_uart0_data[] = {
{
.mapbase = UART0_PHYS_BASE,
.membase = (char *)UART0_VIRT_BASE,
.irq = IRQ_LOKI_UART0,
.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = LOKI_TCLK,
}, {
},
};
static struct resource loki_uart0_resources[] = {
{
.start = UART0_PHYS_BASE,
.end = UART0_PHYS_BASE + 0xff,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_LOKI_UART0,
.end = IRQ_LOKI_UART0,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device loki_uart0 = {
.name = "serial8250",
.id = 0,
.dev = {
.platform_data = loki_uart0_data,
},
.resource = loki_uart0_resources,
.num_resources = ARRAY_SIZE(loki_uart0_resources),
};
void __init loki_uart0_init(void) void __init loki_uart0_init(void)
{ {
platform_device_register(&loki_uart0); orion_uart0_init(UART0_VIRT_BASE, UART0_PHYS_BASE,
IRQ_LOKI_UART0, LOKI_TCLK);
} }
/***************************************************************************** /*****************************************************************************
* UART1 * UART1
****************************************************************************/ ****************************************************************************/
static struct plat_serial8250_port loki_uart1_data[] = {
{
.mapbase = UART1_PHYS_BASE,
.membase = (char *)UART1_VIRT_BASE,
.irq = IRQ_LOKI_UART1,
.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = LOKI_TCLK,
}, {
},
};
static struct resource loki_uart1_resources[] = {
{
.start = UART1_PHYS_BASE,
.end = UART1_PHYS_BASE + 0xff,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_LOKI_UART1,
.end = IRQ_LOKI_UART1,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device loki_uart1 = {
.name = "serial8250",
.id = 1,
.dev = {
.platform_data = loki_uart1_data,
},
.resource = loki_uart1_resources,
.num_resources = ARRAY_SIZE(loki_uart1_resources),
};
void __init loki_uart1_init(void) void __init loki_uart1_init(void)
{ {
platform_device_register(&loki_uart1); orion_uart1_init(UART1_VIRT_BASE, UART1_PHYS_BASE,
IRQ_LOKI_UART1, LOKI_TCLK);
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define UART2_BASE (APB_PHYS_BASE + 0x17000) #define UART2_BASE (APB_PHYS_BASE + 0x17000)
#define UART3_BASE (APB_PHYS_BASE + 0x18000) #define UART3_BASE (APB_PHYS_BASE + 0x18000)
static volatile unsigned long *UART; volatile unsigned long *UART;
static inline void putc(char c) static inline void putc(char c)
{ {
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/mach/irq.h>
#include <mach/msm_iomap.h> #include <mach/msm_iomap.h>
#include "gpiomux.h" #include "gpiomux.h"
...@@ -309,8 +312,10 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int flow_type) ...@@ -309,8 +312,10 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int flow_type)
*/ */
static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc) static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_data *data = irq_desc_get_irq_data(desc);
unsigned long i; unsigned long i;
struct irq_chip *chip = irq_desc_get_chip(desc);
chained_irq_enter(chip, desc);
for (i = find_first_bit(msm_gpio.enabled_irqs, NR_GPIO_IRQS); for (i = find_first_bit(msm_gpio.enabled_irqs, NR_GPIO_IRQS);
i < NR_GPIO_IRQS; i < NR_GPIO_IRQS;
...@@ -319,7 +324,8 @@ static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -319,7 +324,8 @@ static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc)
generic_handle_irq(msm_gpio_to_irq(&msm_gpio.gpio_chip, generic_handle_irq(msm_gpio_to_irq(&msm_gpio.gpio_chip,
i)); i));
} }
data->chip->irq_ack(data);
chained_irq_exit(chip, desc);
} }
static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on) static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
......
This diff is collapsed.
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/mbus.h> #include <linux/mbus.h>
#include <linux/io.h> #include <linux/io.h>
#include <plat/mpp.h>
#include <asm/gpio.h> #include <asm/gpio.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include "common.h" #include "common.h"
...@@ -31,61 +32,8 @@ static unsigned int __init mv78xx0_variant(void) ...@@ -31,61 +32,8 @@ static unsigned int __init mv78xx0_variant(void)
return 0; return 0;
} }
#define MPP_CTRL(i) (DEV_BUS_VIRT_BASE + (i) * 4)
#define MPP_NR_REGS (1 + MPP_MAX/8)
void __init mv78xx0_mpp_conf(unsigned int *mpp_list) void __init mv78xx0_mpp_conf(unsigned int *mpp_list)
{ {
u32 mpp_ctrl[MPP_NR_REGS]; orion_mpp_conf(mpp_list, mv78xx0_variant(),
unsigned int variant_mask; MPP_MAX, DEV_BUS_VIRT_BASE);
int i;
variant_mask = mv78xx0_variant();
if (!variant_mask)
return;
printk(KERN_DEBUG "initial MPP regs:");
for (i = 0; i < MPP_NR_REGS; i++) {
mpp_ctrl[i] = readl(MPP_CTRL(i));
printk(" %08x", mpp_ctrl[i]);
}
printk("\n");
for ( ; *mpp_list; mpp_list++) {
unsigned int num = MPP_NUM(*mpp_list);
unsigned int sel = MPP_SEL(*mpp_list);
int shift, gpio_mode;
if (num > MPP_MAX) {
printk(KERN_ERR "mv78xx0_mpp_conf: invalid MPP "
"number (%u)\n", num);
continue;
}
if (!(*mpp_list & variant_mask)) {
printk(KERN_WARNING
"mv78xx0_mpp_conf: requested MPP%u config "
"unavailable on this hardware\n", num);
continue;
}
shift = (num & 7) << 2;
mpp_ctrl[num / 8] &= ~(0xf << shift);
mpp_ctrl[num / 8] |= sel << shift;
gpio_mode = 0;
if (*mpp_list & MPP_INPUT_MASK)
gpio_mode |= GPIO_INPUT_OK;
if (*mpp_list & MPP_OUTPUT_MASK)
gpio_mode |= GPIO_OUTPUT_OK;
if (sel != 0)
gpio_mode = 0;
orion_gpio_set_valid(num, gpio_mode);
}
printk(KERN_DEBUG " final MPP regs:");
for (i = 0; i < MPP_NR_REGS; i++) {
writel(mpp_ctrl[i], MPP_CTRL(i));
printk(" %08x", mpp_ctrl[i]);
}
printk("\n");
} }
...@@ -19,14 +19,8 @@ ...@@ -19,14 +19,8 @@
/* may be output signal */ ((!!(_out)) << 13) | \ /* may be output signal */ ((!!(_out)) << 13) | \
/* available on A0 */ ((!!(_78100_A0)) << 14)) /* available on A0 */ ((!!(_78100_A0)) << 14))
#define MPP_NUM(x) ((x) & 0xff)
#define MPP_SEL(x) (((x) >> 8) & 0xf)
/* num sel i o 78100_A0 */ /* num sel i o 78100_A0 */
#define MPP_INPUT_MASK MPP(0, 0x0, 1, 0, 0)
#define MPP_OUTPUT_MASK MPP(0, 0x0, 0, 1, 0)
#define MPP_78100_A0_MASK MPP(0, 0x0, 0, 0, 1) #define MPP_78100_A0_MASK MPP(0, 0x0, 0, 0, 1)
#define MPP0_GPIO MPP(0, 0x0, 1, 1, 1) #define MPP0_GPIO MPP(0, 0x0, 1, 1, 1)
......
This diff is collapsed.
#
# Makefile for the linux kernel.
#
# Object file lists.
obj-y := mm.o devices.o cpu.o
obj-$(CONFIG_SOC_IMX31) += clock-imx31.o iomux-imx31.o ehci-imx31.o
obj-$(CONFIG_SOC_IMX35) += clock-imx35.o ehci-imx35.o
obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o
obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o
obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o
obj-$(CONFIG_MACH_PCM037) += mach-pcm037.o
obj-$(CONFIG_MACH_PCM037_EET) += mach-pcm037_eet.o
obj-$(CONFIG_MACH_MX31_3DS) += mach-mx31_3ds.o
obj-$(CONFIG_MACH_MX31MOBOARD) += mach-mx31moboard.o mx31moboard-devboard.o \
mx31moboard-marxbot.o mx31moboard-smartbot.o
obj-$(CONFIG_MACH_QONG) += mach-qong.o
obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o
obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o
obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o
obj-$(CONFIG_MACH_BUG) += mach-bug.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o
obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd-baseboard.o
obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
zreladdr-y := 0x80008000
params_phys-y := 0x80000100
initrd_phys-y := 0x80800000
/*
* Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright 2008 Sascha Hauer, kernel@pengutronix.de
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/serial.h>
#include <linux/gpio.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/common.h>
#include <mach/mx3_camera.h>
#include "devices.h"
/* i.MX31 Image Processing Unit */
/* The resource order is important! */
static struct resource mx3_ipu_rsrc[] = {
{
.start = MX3x_IPU_CTRL_BASE_ADDR,
.end = MX3x_IPU_CTRL_BASE_ADDR + 0x5F,
.flags = IORESOURCE_MEM,
}, {
.start = MX3x_IPU_CTRL_BASE_ADDR + 0x88,
.end = MX3x_IPU_CTRL_BASE_ADDR + 0xB3,
.flags = IORESOURCE_MEM,
}, {
.start = MX3x_INT_IPU_SYN,
.end = MX3x_INT_IPU_SYN,
.flags = IORESOURCE_IRQ,
}, {
.start = MX3x_INT_IPU_ERR,
.end = MX3x_INT_IPU_ERR,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mx3_ipu = {
.name = "ipu-core",
.id = -1,
.num_resources = ARRAY_SIZE(mx3_ipu_rsrc),
.resource = mx3_ipu_rsrc,
};
static struct resource fb_resources[] = {
{
.start = MX3x_IPU_CTRL_BASE_ADDR + 0xB4,
.end = MX3x_IPU_CTRL_BASE_ADDR + 0x1BF,
.flags = IORESOURCE_MEM,
},
};
struct platform_device mx3_fb = {
.name = "mx3_sdc_fb",
.id = -1,
.num_resources = ARRAY_SIZE(fb_resources),
.resource = fb_resources,
.dev = {
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
static struct resource camera_resources[] = {
{
.start = MX3x_IPU_CTRL_BASE_ADDR + 0x60,
.end = MX3x_IPU_CTRL_BASE_ADDR + 0x87,
.flags = IORESOURCE_MEM,
},
};
struct platform_device mx3_camera = {
.name = "mx3-camera",
.id = 0,
.num_resources = ARRAY_SIZE(camera_resources),
.resource = camera_resources,
.dev = {
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
static struct resource imx_rtc_resources[] = {
{
.start = MX31_RTC_BASE_ADDR,
.end = MX31_RTC_BASE_ADDR + 0x3fff,
.flags = IORESOURCE_MEM,
},
{
.start = MX31_INT_RTC,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device imx_rtc_device0 = {
.name = "mxc_rtc",
.id = -1,
.num_resources = ARRAY_SIZE(imx_rtc_resources),
.resource = imx_rtc_resources,
};
extern struct platform_device mx3_ipu;
extern struct platform_device mx3_fb;
extern struct platform_device mx3_camera;
extern struct platform_device imx_rtc_device0;
This diff is collapsed.
...@@ -23,13 +23,11 @@ ...@@ -23,13 +23,11 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/fsl_devices.h>
#include <mach/eukrea-baseboards.h> #include <mach/eukrea-baseboards.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <mach/mxc_ehci.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/fsl_devices.h>
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/can/platform/mcp251x.h> #include <linux/can/platform/mcp251x.h>
...@@ -32,7 +31,6 @@ ...@@ -32,7 +31,6 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <mach/mxc_ehci.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/fsl_devices.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
......
This diff is collapsed.
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/fsl_devices.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/mfd/mc13892.h> #include <linux/mfd/mc13892.h>
...@@ -32,8 +31,6 @@ ...@@ -32,8 +31,6 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <mach/i2c.h>
#include <mach/mxc_ehci.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -252,7 +249,7 @@ static void __init mx51_efikamx_init(void) ...@@ -252,7 +249,7 @@ static void __init mx51_efikamx_init(void)
} }
platform_device_register(&mx51_efikamx_leds_device); platform_device_register(&mx51_efikamx_leds_device);
imx51_add_gpio_keys(&mx51_efikamx_powerkey_data); imx_add_gpio_keys(&mx51_efikamx_powerkey_data);
if (system_rev == 0x11) { if (system_rev == 0x11) {
gpio_request(EFIKAMX_RESET1_1, "reset"); gpio_request(EFIKAMX_RESET1_1, "reset");
......
This diff is collapsed.
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/fec.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
...@@ -31,7 +30,6 @@ ...@@ -31,7 +30,6 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx53.h> #include <mach/iomux-mx53.h>
#define MX53_EVK_FEC_PHY_RST IMX_GPIO_NR(7, 6) #define MX53_EVK_FEC_PHY_RST IMX_GPIO_NR(7, 6)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment