Merge branches 'cache-l2x0', 'fixes', 'hdrs', 'misc', 'mmci', 'vic' and 'warnings...
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 11 Dec 2012 00:20:18 +0000 (00:20 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 11 Dec 2012 00:20:18 +0000 (00:20 +0000)
50 files changed:
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/common/vic.c
arch/arm/include/asm/hardware/cache-l2x0.h
arch/arm/include/asm/hardware/vic.h
arch/arm/include/asm/mach/serial_at91.h [deleted file]
arch/arm/include/asm/mach/serial_sa1100.h [deleted file]
arch/arm/include/asm/mach/udc_pxa2xx.h [deleted file]
arch/arm/include/asm/smp.h
arch/arm/include/asm/syscall.h
arch/arm/include/asm/thread_info.h
arch/arm/kernel/entry-common.S
arch/arm/kernel/head-nommu.S
arch/arm/kernel/process.c
arch/arm/kernel/ptrace.c
arch/arm/kernel/smp.c
arch/arm/kernel/smp_twd.c
arch/arm/kernel/vmlinux.lds.S
arch/arm/mach-integrator/impd1.c
arch/arm/mach-ixp4xx/include/mach/udc.h
arch/arm/mach-pxa/include/mach/udc.h
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/badge4.c
arch/arm/mach-sa1100/cerf.c
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/h3xxx.c
arch/arm/mach-sa1100/hackkit.c
arch/arm/mach-sa1100/jornada720.c
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/nanoengine.c
arch/arm/mach-sa1100/neponset.c
arch/arm/mach-sa1100/pleb.c
arch/arm/mach-sa1100/shannon.c
arch/arm/mach-sa1100/simpad.c
arch/arm/mm/cache-aurora-l2.h [new file with mode: 0644]
arch/arm/mm/cache-l2x0.c
arch/arm/mm/idmap.c
arch/arm/mm/proc-v7.S
arch/avr32/include/asm/mach/serial_at91.h [deleted file]
drivers/amba/bus.c
drivers/mmc/host/mmci.c
drivers/mmc/host/mmci.h
drivers/tty/serial/atmel_serial.c
drivers/tty/serial/sa1100.c
drivers/usb/gadget/pxa25x_udc.c
drivers/watchdog/sp805_wdt.c
include/linux/amba/bus.h
include/linux/platform_data/pxa2xx_udc.h [new file with mode: 0644]
include/linux/platform_data/sa11x0-serial.h [new file with mode: 0644]
scripts/sortextable.c

index ade7e924bef5faaf00de76c0354e025ed4371b35..bbd48cc1ad2089ea059d56534c1b4edf23577d41 100644 (file)
@@ -5,8 +5,9 @@ config ARM
        select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
        select ARCH_HAVE_CUSTOM_GPIO_H
        select ARCH_WANT_IPC_PARSE_VERSION
+       select BUILDTIME_EXTABLE_SORT if MMU
        select CPU_PM if (SUSPEND || CPU_IDLE)
-       select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN
+       select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN && MMU
        select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI)
        select GENERIC_CLOCKEVENTS_BROADCAST if SMP
        select GENERIC_IRQ_PROBE
@@ -21,6 +22,7 @@ config ARM
        select HAVE_AOUT
        select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
        select HAVE_ARCH_KGDB
+       select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
        select HAVE_BPF_JIT
        select HAVE_C_RECORDMCOUNT
index 5f914fca911b77b747dd43569b84a76883abcef7..03363e202a5b7964ffbbefe13c0b2db23a47cb56 100644 (file)
@@ -32,6 +32,7 @@ KBUILD_DEFCONFIG := versatile_defconfig
 # defines filename extension depending memory management type.
 ifeq ($(CONFIG_MMU),)
 MMUEXT         := -nommu
+KBUILD_CFLAGS  += $(call cc-option,-mno-unaligned-access)
 endif
 
 ifeq ($(CONFIG_FRAME_POINTER),y)
index e0d538803cc338a171d71cff38393a96a0b25600..e4df17ca90c7114efaca806977d153a87b7ad5ba 100644 (file)
@@ -218,7 +218,7 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
        v->resume_sources = resume_sources;
        v->irq = irq;
        vic_id++;
-       v->domain = irq_domain_add_legacy(node, fls(valid_sources), irq, 0,
+       v->domain = irq_domain_add_simple(node, fls(valid_sources), irq,
                                          &vic_irqdomain_ops, v);
 }
 
@@ -350,7 +350,7 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start,
        vic_register(base, irq_start, vic_sources, 0, node);
 }
 
-void __init __vic_init(void __iomem *base, unsigned int irq_start,
+void __init __vic_init(void __iomem *base, int irq_start,
                              u32 vic_sources, u32 resume_sources,
                              struct device_node *node)
 {
@@ -407,7 +407,6 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
 int __init vic_of_init(struct device_node *node, struct device_node *parent)
 {
        void __iomem *regs;
-       int irq_base;
 
        if (WARN(parent, "non-root VICs are not supported"))
                return -EINVAL;
@@ -416,18 +415,12 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
        if (WARN_ON(!regs))
                return -EIO;
 
-       irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id());
-       if (WARN_ON(irq_base < 0))
-               goto out_unmap;
-
-       __vic_init(regs, irq_base, ~0, ~0, node);
+       /*
+        * Passing -1 as first IRQ makes the simple domain allocate descriptors
+        */
+       __vic_init(regs, -1, ~0, ~0, node);
 
        return 0;
-
- out_unmap:
-       iounmap(regs);
-
-       return -EIO;
 }
 #endif /* CONFIG OF */
 
index c4c87bc1223195478a76547d0e756ddec961eb70..3b2c40b5bfa22de982fce4e79afc8ced0326dce1 100644 (file)
 
 #define L2X0_ADDR_FILTER_EN            1
 
+#define L2X0_CTRL_EN                   1
+
+#define L2X0_WAY_SIZE_SHIFT            3
+
 #ifndef __ASSEMBLY__
 extern void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask);
 #if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF)
@@ -126,6 +130,7 @@ struct l2x0_regs {
        unsigned long filter_end;
        unsigned long prefetch_ctrl;
        unsigned long pwr_ctrl;
+       unsigned long ctrl;
 };
 
 extern struct l2x0_regs l2x0_saved_regs;
index e14af1a1a320c5305c129b91130e34b5e8b48a3a..2bebad36fc8382383429122623cbad7154acfc2e 100644 (file)
@@ -47,7 +47,7 @@
 struct device_node;
 struct pt_regs;
 
-void __vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources,
+void __vic_init(void __iomem *base, int irq_start, u32 vic_sources,
                u32 resume_sources, struct device_node *node);
 void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources);
 int vic_of_init(struct device_node *node, struct device_node *parent);
diff --git a/arch/arm/include/asm/mach/serial_at91.h b/arch/arm/include/asm/mach/serial_at91.h
deleted file mode 100644 (file)
index ea6d063..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  arch/arm/include/asm/mach/serial_at91.h
- *
- *  Based on serial_sa1100.h  by Nicolas Pitre
- *
- *  Copyright (C) 2002 ATMEL Rousset
- *
- *  Low level machine dependent UART functions.
- */
-
-struct uart_port;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct atmel_port_fns {
-       void    (*set_mctrl)(struct uart_port *, u_int);
-       u_int   (*get_mctrl)(struct uart_port *);
-       void    (*enable_ms)(struct uart_port *);
-       void    (*pm)(struct uart_port *, u_int, u_int);
-       int     (*set_wake)(struct uart_port *, u_int);
-       int     (*open)(struct uart_port *);
-       void    (*close)(struct uart_port *);
-};
-
-#if defined(CONFIG_SERIAL_ATMEL)
-void atmel_register_uart_fns(struct atmel_port_fns *fns);
-#else
-#define atmel_register_uart_fns(fns) do { } while (0)
-#endif
-
-
diff --git a/arch/arm/include/asm/mach/serial_sa1100.h b/arch/arm/include/asm/mach/serial_sa1100.h
deleted file mode 100644 (file)
index d09064b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *  arch/arm/include/asm/mach/serial_sa1100.h
- *
- *  Author: Nicolas Pitre
- *
- * Moved and changed lots, Russell King
- *
- * Low level machine dependent UART functions.
- */
-
-struct uart_port;
-struct uart_info;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct sa1100_port_fns {
-       void    (*set_mctrl)(struct uart_port *, u_int);
-       u_int   (*get_mctrl)(struct uart_port *);
-       void    (*pm)(struct uart_port *, u_int, u_int);
-       int     (*set_wake)(struct uart_port *, u_int);
-};
-
-#ifdef CONFIG_SERIAL_SA1100
-void sa1100_register_uart_fns(struct sa1100_port_fns *fns);
-void sa1100_register_uart(int idx, int port);
-#else
-#define sa1100_register_uart_fns(fns) do { } while (0)
-#define sa1100_register_uart(idx,port) do { } while (0)
-#endif
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
deleted file mode 100644 (file)
index ea297ac..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * arch/arm/include/asm/mach/udc_pxa2xx.h
- *
- * This supports machine-specific differences in how the PXA2xx
- * USB Device Controller (UDC) is wired.
- *
- * It is set in linux/arch/arm/mach-pxa/<machine>.c or in
- * linux/arch/mach-ixp4xx/<machine>.c and used in
- * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
- */
-
-struct pxa2xx_udc_mach_info {
-        int  (*udc_is_connected)(void);                /* do we see host? */
-        void (*udc_command)(int cmd);
-#define        PXA2XX_UDC_CMD_CONNECT          0       /* let host see us */
-#define        PXA2XX_UDC_CMD_DISCONNECT       1       /* so host won't see us */
-
-       /* Boards following the design guidelines in the developer's manual,
-        * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
-        * VBUS IRQ and omit the methods above.  Store the GPIO number
-        * here.  Note that sometimes the signals go through inverters...
-        */
-       bool    gpio_pullup_inverted;
-       int     gpio_pullup;                    /* high == pullup activated */
-};
-
index 2e3be16c676687bec85e10f62f159f5a61c69194..d3a22bebe6ce415c952cbb631929aa1a37157ea6 100644 (file)
@@ -79,6 +79,7 @@ extern void cpu_die(void);
 
 extern void arch_send_call_function_single_ipi(int cpu);
 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
+extern void arch_send_wakeup_ipi_mask(const struct cpumask *mask);
 
 struct smp_operations {
 #ifdef CONFIG_SMP
index 9fdded6b108971412c3f92a13be48724313b3512..f1d96d4e8092a652aeb84f5825082a8f9064cd20 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef _ASM_ARM_SYSCALL_H
 #define _ASM_ARM_SYSCALL_H
 
+#include <linux/audit.h> /* for AUDIT_ARCH_* */
+#include <linux/elf.h> /* for ELF_EM */
 #include <linux/err.h>
 #include <linux/sched.h>
 
@@ -95,4 +97,11 @@ static inline void syscall_set_arguments(struct task_struct *task,
        memcpy(&regs->ARM_r0 + i, args, n * sizeof(args[0]));
 }
 
+static inline int syscall_get_arch(struct task_struct *task,
+                                  struct pt_regs *regs)
+{
+       /* ARM tasks don't change audit architectures on the fly. */
+       return AUDIT_ARCH_ARM;
+}
+
 #endif /* _ASM_ARM_SYSCALL_H */
index 8477b4c1d39fb3fe43c21691d1ad46846a947e89..cddda1f41f0f5fcfefe6d438937f5afcff2e9cf8 100644 (file)
@@ -151,10 +151,10 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
 #define TIF_SYSCALL_TRACE      8
 #define TIF_SYSCALL_AUDIT      9
 #define TIF_SYSCALL_TRACEPOINT 10
+#define TIF_SECCOMP            11      /* seccomp syscall filtering active */
 #define TIF_USING_IWMMXT       17
 #define TIF_MEMDIE             18      /* is terminating due to OOM killer */
 #define TIF_RESTORE_SIGMASK    20
-#define TIF_SECCOMP            21
 #define TIF_SWITCH_MM          22      /* deferred switch_mm */
 
 #define _TIF_SIGPENDING                (1 << TIF_SIGPENDING)
@@ -163,11 +163,12 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
 #define _TIF_SYSCALL_TRACE     (1 << TIF_SYSCALL_TRACE)
 #define _TIF_SYSCALL_AUDIT     (1 << TIF_SYSCALL_AUDIT)
 #define _TIF_SYSCALL_TRACEPOINT        (1 << TIF_SYSCALL_TRACEPOINT)
-#define _TIF_USING_IWMMXT      (1 << TIF_USING_IWMMXT)
 #define _TIF_SECCOMP           (1 << TIF_SECCOMP)
+#define _TIF_USING_IWMMXT      (1 << TIF_USING_IWMMXT)
 
 /* Checks for any syscall work in entry-common.S */
-#define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SYSCALL_TRACEPOINT)
+#define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
+                          _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP)
 
 /*
  * Change these and you break ASM code in entry-common.S
index 34711757ba59a958592d31ea527170c1356c282c..804153c0a9cf2050aadcf21007198100184b831d 100644 (file)
@@ -417,16 +417,6 @@ local_restart:
        ldr     r10, [tsk, #TI_FLAGS]           @ check for syscall tracing
        stmdb   sp!, {r4, r5}                   @ push fifth and sixth args
 
-#ifdef CONFIG_SECCOMP
-       tst     r10, #_TIF_SECCOMP
-       beq     1f
-       mov     r0, scno
-       bl      __secure_computing      
-       add     r0, sp, #S_R0 + S_OFF           @ pointer to regs
-       ldmia   r0, {r0 - r3}                   @ have to reload r0 - r3
-1:
-#endif
-
        tst     r10, #_TIF_SYSCALL_WORK         @ are we tracing syscalls?
        bne     __sys_trace
 
@@ -458,11 +448,13 @@ __sys_trace:
        ldmccia r1, {r0 - r6}                   @ have to reload r0 - r6
        stmccia sp, {r4, r5}                    @ and update the stack args
        ldrcc   pc, [tbl, scno, lsl #2]         @ call sys_* routine
-       b       2b
+       cmp     scno, #-1                       @ skip the syscall?
+       bne     2b
+       add     sp, sp, #S_OFF                  @ restore stack
+       b       ret_slow_syscall
 
 __sys_trace_return:
        str     r0, [sp, #S_R0 + S_OFF]!        @ save returned r0
-       mov     r1, scno
        mov     r0, sp
        bl      syscall_trace_exit
        b       ret_slow_syscall
index 278cfc144f448012100d594c0f81041cdfbf474c..2c228a07e58c7f023a5df0828e6ceacc52793be9 100644 (file)
@@ -68,7 +68,7 @@ __after_proc_init:
         * CP15 system control register value returned in r0 from
         * the CPU init function.
         */
-#ifdef CONFIG_ALIGNMENT_TRAP
+#if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 6
        orr     r0, r0, #CR_A
 #else
        bic     r0, r0, #CR_A
index 90084a6de35a75ede68e451a4f521e3a4174fc92..44bc0b327e2b62a2e13acf1713cf18a57b715e46 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/leds.h>
 
 #include <asm/cacheflush.h>
+#include <asm/idmap.h>
 #include <asm/processor.h>
 #include <asm/thread_notify.h>
 #include <asm/stacktrace.h>
@@ -56,8 +57,6 @@ static const char *isa_modes[] = {
   "ARM" , "Thumb" , "Jazelle", "ThumbEE"
 };
 
-extern void setup_mm_for_reboot(void);
-
 static volatile int hlt_counter;
 
 void disable_hlt(void)
@@ -70,6 +69,7 @@ EXPORT_SYMBOL(disable_hlt);
 void enable_hlt(void)
 {
        hlt_counter--;
+       BUG_ON(hlt_counter < 0);
 }
 
 EXPORT_SYMBOL(enable_hlt);
index 739db3a1b2d279216336025d88586d3ffd07a0e0..03deeffd9f6d06e6ff380126592e10dbf7bf1a25 100644 (file)
@@ -916,16 +916,11 @@ enum ptrace_syscall_dir {
        PTRACE_SYSCALL_EXIT,
 };
 
-static int ptrace_syscall_trace(struct pt_regs *regs, int scno,
-                               enum ptrace_syscall_dir dir)
+static int tracehook_report_syscall(struct pt_regs *regs,
+                                   enum ptrace_syscall_dir dir)
 {
        unsigned long ip;
 
-       current_thread_info()->syscall = scno;
-
-       if (!test_thread_flag(TIF_SYSCALL_TRACE))
-               return scno;
-
        /*
         * IP is used to denote syscall entry/exit:
         * IP = 0 -> entry, =1 -> exit
@@ -944,19 +939,41 @@ static int ptrace_syscall_trace(struct pt_regs *regs, int scno,
 
 asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
 {
-       scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_ENTER);
+       current_thread_info()->syscall = scno;
+
+       /* Do the secure computing check first; failures should be fast. */
+       if (secure_computing(scno) == -1)
+               return -1;
+
+       if (test_thread_flag(TIF_SYSCALL_TRACE))
+               scno = tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);
+
        if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
                trace_sys_enter(regs, scno);
+
        audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1,
                            regs->ARM_r2, regs->ARM_r3);
+
        return scno;
 }
 
-asmlinkage int syscall_trace_exit(struct pt_regs *regs, int scno)
+asmlinkage void syscall_trace_exit(struct pt_regs *regs)
 {
-       scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_EXIT);
-       if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
-               trace_sys_exit(regs, scno);
+       /*
+        * Audit the syscall before anything else, as a debugger may
+        * come in and change the current registers.
+        */
        audit_syscall_exit(regs);
-       return scno;
+
+       /*
+        * Note that we haven't updated the ->syscall field for the
+        * current thread. This isn't a problem because it will have
+        * been set on syscall entry and there hasn't been an opportunity
+        * for a PTRACE_SET_SYSCALL since then.
+        */
+       if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
+               trace_sys_exit(regs, regs_return_value(regs));
+
+       if (test_thread_flag(TIF_SYSCALL_TRACE))
+               tracehook_report_syscall(regs, PTRACE_SYSCALL_EXIT);
 }
index fc4d526e2906ba63c1ab190cf7ff47714359b732..57f537731979e93f92c8962cd46a1490dd3162a2 100644 (file)
@@ -421,6 +421,11 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask)
        smp_cross_call(mask, IPI_CALL_FUNC);
 }
 
+void arch_send_wakeup_ipi_mask(const struct cpumask *mask)
+{
+       smp_cross_call(mask, IPI_WAKEUP);
+}
+
 void arch_send_call_function_single_ipi(int cpu)
 {
        smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
index b22d700fea2751c60b5dbad689ee0b18305108b3..ff07879ad95d467f5a2ac7ab4439a9c898c36bbb 100644 (file)
@@ -31,6 +31,8 @@ static void __iomem *twd_base;
 
 static struct clk *twd_clk;
 static unsigned long twd_timer_rate;
+static bool common_setup_called;
+static DEFINE_PER_CPU(bool, percpu_setup_called);
 
 static struct clock_event_device __percpu **twd_evt;
 static int twd_ppi;
@@ -248,17 +250,9 @@ static struct clk *twd_get_clock(void)
                return clk;
        }
 
-       err = clk_prepare(clk);
+       err = clk_prepare_enable(clk);
        if (err) {
-               pr_err("smp_twd: clock failed to prepare: %d\n", err);
-               clk_put(clk);
-               return ERR_PTR(err);
-       }
-
-       err = clk_enable(clk);
-       if (err) {
-               pr_err("smp_twd: clock failed to enable: %d\n", err);
-               clk_unprepare(clk);
+               pr_err("smp_twd: clock failed to prepare+enable: %d\n", err);
                clk_put(clk);
                return ERR_PTR(err);
        }
@@ -272,15 +266,45 @@ static struct clk *twd_get_clock(void)
 static int __cpuinit twd_timer_setup(struct clock_event_device *clk)
 {
        struct clock_event_device **this_cpu_clk;
+       int cpu = smp_processor_id();
+
+       /*
+        * If the basic setup for this CPU has been done before don't
+        * bother with the below.
+        */
+       if (per_cpu(percpu_setup_called, cpu)) {
+               __raw_writel(0, twd_base + TWD_TIMER_CONTROL);
+               clockevents_register_device(*__this_cpu_ptr(twd_evt));
+               enable_percpu_irq(clk->irq, 0);
+               return 0;
+       }
+       per_cpu(percpu_setup_called, cpu) = true;
 
-       if (!twd_clk)
+       /*
+        * This stuff only need to be done once for the entire TWD cluster
+        * during the runtime of the system.
+        */
+       if (!common_setup_called) {
                twd_clk = twd_get_clock();
 
-       if (!IS_ERR_OR_NULL(twd_clk))
-               twd_timer_rate = clk_get_rate(twd_clk);
-       else
-               twd_calibrate_rate();
+               /*
+                * We use IS_ERR_OR_NULL() here, because if the clock stubs
+                * are active we will get a valid clk reference which is
+                * however NULL and will return the rate 0. In that case we
+                * need to calibrate the rate instead.
+                */
+               if (!IS_ERR_OR_NULL(twd_clk))
+                       twd_timer_rate = clk_get_rate(twd_clk);
+               else
+                       twd_calibrate_rate();
+
+               common_setup_called = true;
+       }
 
+       /*
+        * The following is done once per CPU the first time .setup() is
+        * called.
+        */
        __raw_writel(0, twd_base + TWD_TIMER_CONTROL);
 
        clk->name = "local_timer";
index 36ff15bbfdd4961afecfef9ea292c6445e9b3836..b9f38e388b43ed968cda7b16d2efe081faefc0c0 100644 (file)
@@ -114,6 +114,15 @@ SECTIONS
 
        RO_DATA(PAGE_SIZE)
 
+       . = ALIGN(4);
+       __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
+               __start___ex_table = .;
+#ifdef CONFIG_MMU
+               *(__ex_table)
+#endif
+               __stop___ex_table = .;
+       }
+
 #ifdef CONFIG_ARM_UNWIND
        /*
         * Stack unwinding tables
@@ -219,16 +228,6 @@ SECTIONS
                CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
                READ_MOSTLY_DATA(L1_CACHE_BYTES)
 
-               /*
-                * The exception fixup table (might need resorting at runtime)
-                */
-               . = ALIGN(4);
-               __start___ex_table = .;
-#ifdef CONFIG_MMU
-               *(__ex_table)
-#endif
-               __stop___ex_table = .;
-
                /*
                 * and the usual data section
                 */
index e428f3ab15c75519e3aa7a3ceda3728228d1831e..5973109fb874b8680c1921fad148bfba89674d3c 100644 (file)
@@ -402,9 +402,10 @@ static int impd1_probe(struct lm_device *dev)
 
                pc_base = dev->resource.start + idev->offset;
                snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12);
-               d = amba_ahb_device_add(&dev->dev, devname, pc_base, SZ_4K,
-                                       dev->irq, dev->irq,
-                                       idev->platform_data, idev->id);
+               d = amba_ahb_device_add_res(&dev->dev, devname, pc_base, SZ_4K,
+                                           dev->irq, dev->irq,
+                                           idev->platform_data, idev->id,
+                                           &dev->resource);
                if (IS_ERR(d)) {
                        dev_err(&dev->dev, "unable to register device: %ld\n", PTR_ERR(d));
                        continue;
index 80d6da2eaface5f61e5a10ce77790a6b15333ee2..7bd8b96c8843f63fb50500e28692e65a1db89694 100644 (file)
@@ -2,7 +2,7 @@
  * arch/arm/mach-ixp4xx/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 
 extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info);
 
index 2f82332e81a00f03aed9a9db2290bf6f422efe34..9a827e32db98b6626e16ba5a59234175e1cb1c5f 100644 (file)
@@ -2,7 +2,7 @@
  * arch/arm/mach-pxa/include/mach/udc.h
  *
  */
-#include <asm/mach/udc_pxa2xx.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 
 extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
 
index 6a7ad3c2a3fcd17d771f38dc4716c9f54af3185f..9a23739f702625a1b949cfa4feeca8c1447e03b7 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/serial_core.h>
 #include <linux/mfd/ucb1x00.h>
 #include <linux/mtd/mtd.h>
@@ -37,7 +38,6 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/irda.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <mach/assabet.h>
 #include <linux/platform_data/mfd-mcp-sa11x0.h>
 #include <mach/irqs.h>
index 038df4894b0fb84ad33befb082cbdd5ee0e2ae3d..b2dadf3ea3df10ca3afdc46bdf70e2862d9a3498 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/tty.h>
@@ -34,7 +35,6 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 #include <asm/hardware/sa1111.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/badge4.h>
 
index ad0eb08ea07783f4ea4ec68bb871144425e8cf80..304bca4a07c049cb14b82075dfa8a684e8b97608 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/tty.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
 #include <linux/mtd/mtd.h>
@@ -27,7 +28,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/cerf.h>
 #include <linux/platform_data/mfd-mcp-sa11x0.h>
index 170cb6107f686c88f55b70accc9ebcf987281e58..45f424f5fca6a1528f3ea64f623facfd35ae999a 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/delay.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/ucb1x00.h>
 #include <linux/mtd/mtd.h>
@@ -40,7 +41,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <asm/hardware/scoop.h>
 #include <asm/mach/sharpsl_param.h>
index 63150e1ffe9ecee4f45355ba41d92d3f02119216..f17e7382242a1a8fc851996ca1b59f296299a1f1 100644 (file)
 #include <linux/mfd/htc-egpio.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/h3xxx.h>
 
index fc106aab7c7e4a9e4b175c5a74fc7902f254a53b..d005939c41fc85ad9e922bb109a5df38200a518f 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/cpufreq.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/serial_core.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
@@ -35,7 +36,6 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
index e3084f47027d8bf32c90af399825617cc4b62fa3..35cfc428b4d48b1ac710e9ede26209595167a37e 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/delay.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/ioport.h>
 #include <linux/mtd/mtd.h>
@@ -30,7 +31,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
index 3048b17e84c5e6895f96216a2755d9cb5a257f64..f69f78fc3ddd2b15ee681c6f5670a383f9a322f8 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/tty.h>
 #include <linux/gpio.h>
 #include <linux/leds.h>
@@ -18,7 +19,6 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <linux/platform_data/mfd-mcp-sa11x0.h>
 #include <mach/irqs.h>
 
index 41f69d97066f5c0a5e1783d42b6be9dfaf3bbd9d..102e08f7b10962ba08c9f549b1eba478ccc744ff 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/root_dev.h>
@@ -24,7 +25,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 
 #include <mach/hardware.h>
 #include <mach/nanoengine.h>
index 266db873a4e4c6c328a19b038eea18d29cab8997..88be0474f3d720a0ba2384536bd01516c2f451de 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/serial_core.h>
@@ -14,7 +15,6 @@
 
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <asm/hardware/sa1111.h>
 #include <asm/sizes.h>
 
index 37fe0a0a53692951db7335c05eb5249419e1d010..c51bb63f90fb9953bb9c8663a1e4c502c3fb0210 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/ioport.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
 #include <linux/io.h>
@@ -18,7 +19,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/flash.h>
-#include <asm/mach/serial_sa1100.h>
 #include <mach/irqs.h>
 
 #include "generic.h"
index ff6b7b35bca99d5a763d19f443952ba5d82db98f..6460d25fbb88cd2fc47dc7c35d0f4f45e81c610b 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/kernel.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/tty.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
@@ -18,7 +19,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <linux/platform_data/mfd-mcp-sa11x0.h>
 #include <mach/shannon.h>
 #include <mach/irqs.h>
index 71790e581d93abb567a5759253d33a949971a43b..6d65f65fcb230c9e06e46946affe300909cdec93 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/proc_fs.h>
 #include <linux/string.h>
 #include <linux/pm.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/ucb1x00.h>
 #include <linux/mtd/mtd.h>
@@ -23,7 +24,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
-#include <asm/mach/serial_sa1100.h>
 #include <linux/platform_data/mfd-mcp-sa11x0.h>
 #include <mach/simpad.h>
 #include <mach/irqs.h>
diff --git a/arch/arm/mm/cache-aurora-l2.h b/arch/arm/mm/cache-aurora-l2.h
new file mode 100644 (file)
index 0000000..c861247
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * AURORA shared L2 cache controller support
+ *
+ * Copyright (C) 2012 Marvell
+ *
+ * Yehuda Yitschak <yehuday@marvell.com>
+ * Gregory CLEMENT <gregory.clement@free-electrons.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __ASM_ARM_HARDWARE_AURORA_L2_H
+#define __ASM_ARM_HARDWARE_AURORA_L2_H
+
+#define AURORA_SYNC_REG                    0x700
+#define AURORA_RANGE_BASE_ADDR_REG  0x720
+#define AURORA_FLUSH_PHY_ADDR_REG   0x7f0
+#define AURORA_INVAL_RANGE_REG     0x774
+#define AURORA_CLEAN_RANGE_REG     0x7b4
+#define AURORA_FLUSH_RANGE_REG     0x7f4
+
+#define AURORA_ACR_REPLACEMENT_OFFSET      27
+#define AURORA_ACR_REPLACEMENT_MASK         \
+       (0x3 << AURORA_ACR_REPLACEMENT_OFFSET)
+#define AURORA_ACR_REPLACEMENT_TYPE_WAYRR    \
+       (0 << AURORA_ACR_REPLACEMENT_OFFSET)
+#define AURORA_ACR_REPLACEMENT_TYPE_LFSR     \
+       (1 << AURORA_ACR_REPLACEMENT_OFFSET)
+#define AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU \
+       (3 << AURORA_ACR_REPLACEMENT_OFFSET)
+
+#define AURORA_ACR_FORCE_WRITE_POLICY_OFFSET   0
+#define AURORA_ACR_FORCE_WRITE_POLICY_MASK     \
+       (0x3 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
+#define AURORA_ACR_FORCE_WRITE_POLICY_DIS      \
+       (0 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
+#define AURORA_ACR_FORCE_WRITE_BACK_POLICY     \
+       (1 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
+#define AURORA_ACR_FORCE_WRITE_THRO_POLICY     \
+       (2 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
+
+#define MAX_RANGE_SIZE         1024
+
+#define AURORA_WAY_SIZE_SHIFT  2
+
+#define AURORA_CTRL_FW         0x100
+
+/* chose a number outside L2X0_CACHE_ID_PART_MASK to be sure to make
+ * the distinction between a number coming from hardware and a number
+ * coming from the device tree */
+#define AURORA_CACHE_ID               0x100
+
+#endif /* __ASM_ARM_HARDWARE_AURORA_L2_H */
index 8a97e6443c62935f3083a950590cd13ce6b4de90..6911b8b2745c5345ca2a5f4498c702ddd1bc6aad 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <asm/cacheflush.h>
 #include <asm/hardware/cache-l2x0.h>
+#include "cache-aurora-l2.h"
 
 #define CACHE_LINE_SIZE                32
 
@@ -34,14 +35,20 @@ static u32 l2x0_way_mask;   /* Bitmask of active ways */
 static u32 l2x0_size;
 static unsigned long sync_reg_offset = L2X0_CACHE_SYNC;
 
+/* Aurora don't have the cache ID register available, so we have to
+ * pass it though the device tree */
+static u32  cache_id_part_number_from_dt;
+
 struct l2x0_regs l2x0_saved_regs;
 
 struct l2x0_of_data {
        void (*setup)(const struct device_node *, u32 *, u32 *);
        void (*save)(void);
-       void (*resume)(void);
+       struct outer_cache_fns outer_cache;
 };
 
+static bool of_init = false;
+
 static inline void cache_wait_way(void __iomem *reg, unsigned long mask)
 {
        /* wait for cache operation by line or way to complete */
@@ -168,7 +175,7 @@ static void l2x0_inv_all(void)
        /* invalidate all ways */
        raw_spin_lock_irqsave(&l2x0_lock, flags);
        /* Invalidating when L2 is enabled is a nono */
-       BUG_ON(readl(l2x0_base + L2X0_CTRL) & 1);
+       BUG_ON(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN);
        writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY);
        cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask);
        cache_sync();
@@ -292,11 +299,18 @@ static void l2x0_unlock(u32 cache_id)
        int lockregs;
        int i;
 
-       if (cache_id == L2X0_CACHE_ID_PART_L310)
+       switch (cache_id) {
+       case L2X0_CACHE_ID_PART_L310:
                lockregs = 8;
-       else
+               break;
+       case AURORA_CACHE_ID:
+               lockregs = 4;
+               break;
+       default:
                /* L210 and unknown types */
                lockregs = 1;
+               break;
+       }
 
        for (i = 0; i < lockregs; i++) {
                writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE +
@@ -312,18 +326,22 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
        u32 cache_id;
        u32 way_size = 0;
        int ways;
+       int way_size_shift = L2X0_WAY_SIZE_SHIFT;
        const char *type;
 
        l2x0_base = base;
-
-       cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID);
+       if (cache_id_part_number_from_dt)
+               cache_id = cache_id_part_number_from_dt;
+       else
+               cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID)
+                       & L2X0_CACHE_ID_PART_MASK;
        aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
 
        aux &= aux_mask;
        aux |= aux_val;
 
        /* Determine the number of ways */
-       switch (cache_id & L2X0_CACHE_ID_PART_MASK) {
+       switch (cache_id) {
        case L2X0_CACHE_ID_PART_L310:
                if (aux & (1 << 16))
                        ways = 16;
@@ -340,6 +358,14 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
                ways = (aux >> 13) & 0xf;
                type = "L210";
                break;
+
+       case AURORA_CACHE_ID:
+               sync_reg_offset = AURORA_SYNC_REG;
+               ways = (aux >> 13) & 0xf;
+               ways = 2 << ((ways + 1) >> 2);
+               way_size_shift = AURORA_WAY_SIZE_SHIFT;
+               type = "Aurora";
+               break;
        default:
                /* Assume unknown chips have 8 ways */
                ways = 8;
@@ -353,7 +379,8 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
         * L2 cache Size =  Way size * Number of ways
         */
        way_size = (aux & L2X0_AUX_CTRL_WAY_SIZE_MASK) >> 17;
-       way_size = 1 << (way_size + 3);
+       way_size = 1 << (way_size + way_size_shift);
+
        l2x0_size = ways * way_size * SZ_1K;
 
        /*
@@ -361,7 +388,7 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
         * If you are booting from non-secure mode
         * accessing the below registers will fault.
         */
-       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) {
+       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
                /* Make sure that I&D is not locked down when starting */
                l2x0_unlock(cache_id);
 
@@ -371,7 +398,7 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
                l2x0_inv_all();
 
                /* enable L2X0 */
-               writel_relaxed(1, l2x0_base + L2X0_CTRL);
+               writel_relaxed(L2X0_CTRL_EN, l2x0_base + L2X0_CTRL);
        }
 
        /* Re-read it in case some bits are reserved. */
@@ -380,13 +407,15 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
        /* Save the value for resuming. */
        l2x0_saved_regs.aux_ctrl = aux;
 
-       outer_cache.inv_range = l2x0_inv_range;
-       outer_cache.clean_range = l2x0_clean_range;
-       outer_cache.flush_range = l2x0_flush_range;
-       outer_cache.sync = l2x0_cache_sync;
-       outer_cache.flush_all = l2x0_flush_all;
-       outer_cache.inv_all = l2x0_inv_all;
-       outer_cache.disable = l2x0_disable;
+       if (!of_init) {
+               outer_cache.inv_range = l2x0_inv_range;
+               outer_cache.clean_range = l2x0_clean_range;
+               outer_cache.flush_range = l2x0_flush_range;
+               outer_cache.sync = l2x0_cache_sync;
+               outer_cache.flush_all = l2x0_flush_all;
+               outer_cache.inv_all = l2x0_inv_all;
+               outer_cache.disable = l2x0_disable;
+       }
 
        printk(KERN_INFO "%s cache controller enabled\n", type);
        printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n",
@@ -394,6 +423,100 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
 }
 
 #ifdef CONFIG_OF
+static int l2_wt_override;
+
+/*
+ * Note that the end addresses passed to Linux primitives are
+ * noninclusive, while the hardware cache range operations use
+ * inclusive start and end addresses.
+ */
+static unsigned long calc_range_end(unsigned long start, unsigned long end)
+{
+       /*
+        * Limit the number of cache lines processed at once,
+        * since cache range operations stall the CPU pipeline
+        * until completion.
+        */
+       if (end > start + MAX_RANGE_SIZE)
+               end = start + MAX_RANGE_SIZE;
+
+       /*
+        * Cache range operations can't straddle a page boundary.
+        */
+       if (end > PAGE_ALIGN(start+1))
+               end = PAGE_ALIGN(start+1);
+
+       return end;
+}
+
+/*
+ * Make sure 'start' and 'end' reference the same page, as L2 is PIPT
+ * and range operations only do a TLB lookup on the start address.
+ */
+static void aurora_pa_range(unsigned long start, unsigned long end,
+                       unsigned long offset)
+{
+       unsigned long flags;
+
+       raw_spin_lock_irqsave(&l2x0_lock, flags);
+       writel(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG);
+       writel(end, l2x0_base + offset);
+       raw_spin_unlock_irqrestore(&l2x0_lock, flags);
+
+       cache_sync();
+}
+
+static void aurora_inv_range(unsigned long start, unsigned long end)
+{
+       /*
+        * round start and end adresses up to cache line size
+        */
+       start &= ~(CACHE_LINE_SIZE - 1);
+       end = ALIGN(end, CACHE_LINE_SIZE);
+
+       /*
+        * Invalidate all full cache lines between 'start' and 'end'.
+        */
+       while (start < end) {
+               unsigned long range_end = calc_range_end(start, end);
+               aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
+                               AURORA_INVAL_RANGE_REG);
+               start = range_end;
+       }
+}
+
+static void aurora_clean_range(unsigned long start, unsigned long end)
+{
+       /*
+        * If L2 is forced to WT, the L2 will always be clean and we
+        * don't need to do anything here.
+        */
+       if (!l2_wt_override) {
+               start &= ~(CACHE_LINE_SIZE - 1);
+               end = ALIGN(end, CACHE_LINE_SIZE);
+               while (start != end) {
+                       unsigned long range_end = calc_range_end(start, end);
+                       aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
+                                       AURORA_CLEAN_RANGE_REG);
+                       start = range_end;
+               }
+       }
+}
+
+static void aurora_flush_range(unsigned long start, unsigned long end)
+{
+       if (!l2_wt_override) {
+               start &= ~(CACHE_LINE_SIZE - 1);
+               end = ALIGN(end, CACHE_LINE_SIZE);
+               while (start != end) {
+                       unsigned long range_end = calc_range_end(start, end);
+                       aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
+                                       AURORA_FLUSH_RANGE_REG);
+                       start = range_end;
+               }
+       }
+}
+
 static void __init l2x0_of_setup(const struct device_node *np,
                                 u32 *aux_val, u32 *aux_mask)
 {
@@ -491,9 +614,15 @@ static void __init pl310_save(void)
        }
 }
 
+static void aurora_save(void)
+{
+       l2x0_saved_regs.ctrl = readl_relaxed(l2x0_base + L2X0_CTRL);
+       l2x0_saved_regs.aux_ctrl = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
+}
+
 static void l2x0_resume(void)
 {
-       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) {
+       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
                /* restore aux ctrl and enable l2 */
                l2x0_unlock(readl_relaxed(l2x0_base + L2X0_CACHE_ID));
 
@@ -502,7 +631,7 @@ static void l2x0_resume(void)
 
                l2x0_inv_all();
 
-               writel_relaxed(1, l2x0_base + L2X0_CTRL);
+               writel_relaxed(L2X0_CTRL_EN, l2x0_base + L2X0_CTRL);
        }
 }
 
@@ -510,7 +639,7 @@ static void pl310_resume(void)
 {
        u32 l2x0_revision;
 
-       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) {
+       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
                /* restore pl310 setup */
                writel_relaxed(l2x0_saved_regs.tag_latency,
                        l2x0_base + L2X0_TAG_LATENCY_CTRL);
@@ -536,22 +665,108 @@ static void pl310_resume(void)
        l2x0_resume();
 }
 
+static void aurora_resume(void)
+{
+       if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
+               writel(l2x0_saved_regs.aux_ctrl, l2x0_base + L2X0_AUX_CTRL);
+               writel(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL);
+       }
+}
+
+static void __init aurora_broadcast_l2_commands(void)
+{
+       __u32 u;
+       /* Enable Broadcasting of cache commands to L2*/
+       __asm__ __volatile__("mrc p15, 1, %0, c15, c2, 0" : "=r"(u));
+       u |= AURORA_CTRL_FW;            /* Set the FW bit */
+       __asm__ __volatile__("mcr p15, 1, %0, c15, c2, 0\n" : : "r"(u));
+       isb();
+}
+
+static void __init aurora_of_setup(const struct device_node *np,
+                               u32 *aux_val, u32 *aux_mask)
+{
+       u32 val = AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU;
+       u32 mask =  AURORA_ACR_REPLACEMENT_MASK;
+
+       of_property_read_u32(np, "cache-id-part",
+                       &cache_id_part_number_from_dt);
+
+       /* Determine and save the write policy */
+       l2_wt_override = of_property_read_bool(np, "wt-override");
+
+       if (l2_wt_override) {
+               val |= AURORA_ACR_FORCE_WRITE_THRO_POLICY;
+               mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK;
+       }
+
+       *aux_val &= ~mask;
+       *aux_val |= val;
+       *aux_mask &= ~mask;
+}
+
 static const struct l2x0_of_data pl310_data = {
-       pl310_of_setup,
-       pl310_save,
-       pl310_resume,
+       .setup = pl310_of_setup,
+       .save  = pl310_save,
+       .outer_cache = {
+               .resume      = pl310_resume,
+               .inv_range   = l2x0_inv_range,
+               .clean_range = l2x0_clean_range,
+               .flush_range = l2x0_flush_range,
+               .sync        = l2x0_cache_sync,
+               .flush_all   = l2x0_flush_all,
+               .inv_all     = l2x0_inv_all,
+               .disable     = l2x0_disable,
+               .set_debug   = pl310_set_debug,
+       },
 };
 
 static const struct l2x0_of_data l2x0_data = {
-       l2x0_of_setup,
-       NULL,
-       l2x0_resume,
+       .setup = l2x0_of_setup,
+       .save  = NULL,
+       .outer_cache = {
+               .resume      = l2x0_resume,
+               .inv_range   = l2x0_inv_range,
+               .clean_range = l2x0_clean_range,
+               .flush_range = l2x0_flush_range,
+               .sync        = l2x0_cache_sync,
+               .flush_all   = l2x0_flush_all,
+               .inv_all     = l2x0_inv_all,
+               .disable     = l2x0_disable,
+       },
+};
+
+static const struct l2x0_of_data aurora_with_outer_data = {
+       .setup = aurora_of_setup,
+       .save  = aurora_save,
+       .outer_cache = {
+               .resume      = aurora_resume,
+               .inv_range   = aurora_inv_range,
+               .clean_range = aurora_clean_range,
+               .flush_range = aurora_flush_range,
+               .sync        = l2x0_cache_sync,
+               .flush_all   = l2x0_flush_all,
+               .inv_all     = l2x0_inv_all,
+               .disable     = l2x0_disable,
+       },
+};
+
+static const struct l2x0_of_data aurora_no_outer_data = {
+       .setup = aurora_of_setup,
+       .save  = aurora_save,
+       .outer_cache = {
+               .resume      = aurora_resume,
+       },
 };
 
 static const struct of_device_id l2x0_ids[] __initconst = {
        { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data },
        { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data },
        { .compatible = "arm,l210-cache", .data = (void *)&l2x0_data },
+       { .compatible = "marvell,aurora-system-cache",
+         .data = (void *)&aurora_no_outer_data},
+       { .compatible = "marvell,aurora-outer-cache",
+         .data = (void *)&aurora_with_outer_data},
        {}
 };
 
@@ -577,17 +792,24 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
        data = of_match_node(l2x0_ids, np)->data;
 
        /* L2 configuration can only be changed if the cache is disabled */
-       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) {
+       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
                if (data->setup)
                        data->setup(np, &aux_val, &aux_mask);
+
+               /* For aurora cache in no outer mode select the
+                * correct mode using the coprocessor*/
+               if (data == &aurora_no_outer_data)
+                       aurora_broadcast_l2_commands();
        }
 
        if (data->save)
                data->save();
 
+       of_init = true;
        l2x0_init(l2x0_base, aux_val, aux_mask);
 
-       outer_cache.resume = data->resume;
+       memcpy(&outer_cache, &data->outer_cache, sizeof(outer_cache));
+
        return 0;
 }
 #endif
index ab88ed4f8e08f0232b88f0138991ab96f5fc5544..99db769307ec30ccb0e182d6a97ff66a985a2fc7 100644 (file)
@@ -92,6 +92,9 @@ static int __init init_static_idmap(void)
                (long long)idmap_start, (long long)idmap_end);
        identity_mapping_add(idmap_pgd, idmap_start, idmap_end);
 
+       /* Flush L1 for the hardware to see this page table content */
+       flush_cache_louis();
+
        return 0;
 }
 early_initcall(init_static_idmap);
@@ -103,12 +106,15 @@ early_initcall(init_static_idmap);
  */
 void setup_mm_for_reboot(void)
 {
-       /* Clean and invalidate L1. */
-       flush_cache_all();
-
        /* Switch to the identity mapping. */
        cpu_switch_mm(idmap_pgd, &init_mm);
 
-       /* Flush the TLB. */
+#ifdef CONFIG_CPU_HAS_ASID
+       /*
+        * We don't have a clean ASID for the identity mapping, which
+        * may clash with virtual addresses of the previous page tables
+        * and therefore potentially in the TLB.
+        */
        local_flush_tlb_all();
+#endif
 }
index 846d279f31764d7803fc6144df9517087286c768..42cc833aa02f7b43aa6e851328a4ef5e4734b30e 100644 (file)
@@ -57,7 +57,7 @@ ENTRY(cpu_v7_reset)
  THUMB(        bic     r1, r1, #1 << 30 )              @ SCTLR.TE (Thumb exceptions)
        mcr     p15, 0, r1, c1, c0, 0           @ disable MMU
        isb
-       mov     pc, r0
+       bx      r0
 ENDPROC(cpu_v7_reset)
        .popsection
 
diff --git a/arch/avr32/include/asm/mach/serial_at91.h b/arch/avr32/include/asm/mach/serial_at91.h
deleted file mode 100644 (file)
index 55b317a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  linux/include/asm-arm/mach/serial_at91.h
- *
- *  Based on serial_sa1100.h  by Nicolas Pitre
- *
- *  Copyright (C) 2002 ATMEL Rousset
- *
- *  Low level machine dependent UART functions.
- */
-
-struct uart_port;
-
-/*
- * This is a temporary structure for registering these
- * functions; it is intended to be discarded after boot.
- */
-struct atmel_port_fns {
-       void    (*set_mctrl)(struct uart_port *, u_int);
-       u_int   (*get_mctrl)(struct uart_port *);
-       void    (*enable_ms)(struct uart_port *);
-       void    (*pm)(struct uart_port *, u_int, u_int);
-       int     (*set_wake)(struct uart_port *, u_int);
-       int     (*open)(struct uart_port *);
-       void    (*close)(struct uart_port *);
-};
-
-#if defined(CONFIG_SERIAL_ATMEL)
-void atmel_register_uart_fns(struct atmel_port_fns *fns);
-#else
-#define atmel_register_uart_fns(fns) do { } while (0)
-#endif
-
-
index e8eb91bd0d28a9411df64124edd47ca779bdf011..a2fc56d2e6819d04a86474157e330ff0467d6b09 100644 (file)
@@ -546,7 +546,8 @@ EXPORT_SYMBOL_GPL(amba_device_add);
 static struct amba_device *
 amba_aphb_device_add(struct device *parent, const char *name,
                     resource_size_t base, size_t size, int irq1, int irq2,
-                    void *pdata, unsigned int periphid, u64 dma_mask)
+                    void *pdata, unsigned int periphid, u64 dma_mask,
+                    struct resource *resbase)
 {
        struct amba_device *dev;
        int ret;
@@ -563,7 +564,7 @@ amba_aphb_device_add(struct device *parent, const char *name,
        dev->dev.platform_data = pdata;
        dev->dev.parent = parent;
 
-       ret = amba_device_add(dev, &iomem_resource);
+       ret = amba_device_add(dev, resbase);
        if (ret) {
                amba_device_put(dev);
                return ERR_PTR(ret);
@@ -578,7 +579,7 @@ amba_apb_device_add(struct device *parent, const char *name,
                    void *pdata, unsigned int periphid)
 {
        return amba_aphb_device_add(parent, name, base, size, irq1, irq2, pdata,
-                                   periphid, 0);
+                                   periphid, 0, &iomem_resource);
 }
 EXPORT_SYMBOL_GPL(amba_apb_device_add);
 
@@ -588,10 +589,33 @@ amba_ahb_device_add(struct device *parent, const char *name,
                    void *pdata, unsigned int periphid)
 {
        return amba_aphb_device_add(parent, name, base, size, irq1, irq2, pdata,
-                                   periphid, ~0ULL);
+                                   periphid, ~0ULL, &iomem_resource);
 }
 EXPORT_SYMBOL_GPL(amba_ahb_device_add);
 
+struct amba_device *
+amba_apb_device_add_res(struct device *parent, const char *name,
+                       resource_size_t base, size_t size, int irq1,
+                       int irq2, void *pdata, unsigned int periphid,
+                       struct resource *resbase)
+{
+       return amba_aphb_device_add(parent, name, base, size, irq1, irq2, pdata,
+                                   periphid, 0, resbase);
+}
+EXPORT_SYMBOL_GPL(amba_apb_device_add_res);
+
+struct amba_device *
+amba_ahb_device_add_res(struct device *parent, const char *name,
+                       resource_size_t base, size_t size, int irq1,
+                       int irq2, void *pdata, unsigned int periphid,
+                       struct resource *resbase)
+{
+       return amba_aphb_device_add(parent, name, base, size, irq1, irq2, pdata,
+                                   periphid, ~0ULL, resbase);
+}
+EXPORT_SYMBOL_GPL(amba_ahb_device_add_res);
+
+
 static void amba_device_initialize(struct amba_device *dev, const char *name)
 {
        device_initialize(&dev->dev);
index edc3e9baf0e7bea7be23841c11692968ad2a344b..5e39b312c7ccbd93760488983d59e5e4e1120c55 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/amba/mmci.h>
 #include <linux/pm_runtime.h>
 #include <linux/types.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <asm/div64.h>
 #include <asm/io.h>
@@ -654,9 +655,31 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
 
        /* The ST Micro variants has a special bit to enable SDIO */
        if (variant->sdio && host->mmc->card)
-               if (mmc_card_sdio(host->mmc->card))
+               if (mmc_card_sdio(host->mmc->card)) {
+                       /*
+                        * The ST Micro variants has a special bit
+                        * to enable SDIO.
+                        */
+                       u32 clk;
+
                        datactrl |= MCI_ST_DPSM_SDIOEN;
 
+                       /*
+                        * The ST Micro variant for SDIO small write transfers
+                        * needs to have clock H/W flow control disabled,
+                        * otherwise the transfer will not start. The threshold
+                        * depends on the rate of MCLK.
+                        */
+                       if (data->flags & MMC_DATA_WRITE &&
+                           (host->size < 8 ||
+                            (host->size <= 8 && host->mclk > 50000000)))
+                               clk = host->clk_reg & ~variant->clkreg_enable;
+                       else
+                               clk = host->clk_reg | variant->clkreg_enable;
+
+                       mmci_write_clkreg(host, clk);
+               }
+
        /*
         * Attempt to use DMA operation mode, if this
         * should fail, fall back to PIO mode
@@ -840,14 +863,14 @@ static int mmci_pio_read(struct mmci_host *host, char *buffer, unsigned int rema
                if (unlikely(count & 0x3)) {
                        if (count < 4) {
                                unsigned char buf[4];
-                               readsl(base + MMCIFIFO, buf, 1);
+                               ioread32_rep(base + MMCIFIFO, buf, 1);
                                memcpy(ptr, buf, count);
                        } else {
-                               readsl(base + MMCIFIFO, ptr, count >> 2);
+                               ioread32_rep(base + MMCIFIFO, ptr, count >> 2);
                                count &= ~0x3;
                        }
                } else {
-                       readsl(base + MMCIFIFO, ptr, count >> 2);
+                       ioread32_rep(base + MMCIFIFO, ptr, count >> 2);
                }
 
                ptr += count;
@@ -876,22 +899,6 @@ static int mmci_pio_write(struct mmci_host *host, char *buffer, unsigned int rem
                         variant->fifosize : variant->fifohalfsize;
                count = min(remain, maxcnt);
 
-               /*
-                * The ST Micro variant for SDIO transfer sizes
-                * less then 8 bytes should have clock H/W flow
-                * control disabled.
-                */
-               if (variant->sdio &&
-                   mmc_card_sdio(host->mmc->card)) {
-                       u32 clk;
-                       if (count < 8)
-                               clk = host->clk_reg & ~variant->clkreg_enable;
-                       else
-                               clk = host->clk_reg | variant->clkreg_enable;
-
-                       mmci_write_clkreg(host, clk);
-               }
-
                /*
                 * SDIO especially may want to send something that is
                 * not divisible by 4 (as opposed to card sectors
@@ -900,7 +907,7 @@ static int mmci_pio_write(struct mmci_host *host, char *buffer, unsigned int rem
                 * byte become a 32bit write, 7 bytes will be two
                 * 32bit writes etc.
                 */
-               writesl(base + MMCIFIFO, ptr, (count + 3) >> 2);
+               iowrite32_rep(base + MMCIFIFO, ptr, (count + 3) >> 2);
 
                ptr += count;
                remain -= count;
@@ -1360,6 +1367,23 @@ static int __devinit mmci_probe(struct amba_device *dev,
                mmc->f_max = min(host->mclk, fmax);
        dev_dbg(mmc_dev(mmc), "clocking block at %u Hz\n", mmc->f_max);
 
+       host->pinctrl = devm_pinctrl_get(&dev->dev);
+       if (IS_ERR(host->pinctrl)) {
+               ret = PTR_ERR(host->pinctrl);
+               goto clk_disable;
+       }
+
+       host->pins_default = pinctrl_lookup_state(host->pinctrl,
+                       PINCTRL_STATE_DEFAULT);
+
+       /* enable pins to be muxed in and configured */
+       if (!IS_ERR(host->pins_default)) {
+               ret = pinctrl_select_state(host->pinctrl, host->pins_default);
+               if (ret)
+                       dev_warn(&dev->dev, "could not set default pins\n");
+       } else
+               dev_warn(&dev->dev, "could not get default pinstate\n");
+
 #ifdef CONFIG_REGULATOR
        /* If we're using the regulator framework, try to fetch a regulator */
        host->vcc = regulator_get(&dev->dev, "vmmc");
index d437ccf62d6bcc76a41862f68b48408f0711c5af..d34d8c0add8e640c3a65e1e772acb0ae61682837 100644 (file)
@@ -195,6 +195,10 @@ struct mmci_host {
        unsigned int            size;
        struct regulator        *vcc;
 
+       /* pinctrl handles */
+       struct pinctrl          *pinctrl;
+       struct pinctrl_state    *pins_default;
+
 #ifdef CONFIG_DMA_ENGINE
        /* DMA stuff */
        struct dma_chan         *dma_current;
index 3d7e1ee2fa57a4a6db1deb0a7a173b90769298a3..a6134c94a9fc842048225395b38307b070b34838 100644 (file)
@@ -43,7 +43,6 @@
 #include <asm/io.h>
 #include <asm/ioctls.h>
 
-#include <asm/mach/serial_at91.h>
 #include <mach/board.h>
 
 #ifdef CONFIG_ARM
@@ -1513,23 +1512,6 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,
        }
 }
 
-/*
- * Register board-specific modem-control line handlers.
- */
-void __init atmel_register_uart_fns(struct atmel_port_fns *fns)
-{
-       if (fns->enable_ms)
-               atmel_pops.enable_ms = fns->enable_ms;
-       if (fns->get_mctrl)
-               atmel_pops.get_mctrl = fns->get_mctrl;
-       if (fns->set_mctrl)
-               atmel_pops.set_mctrl = fns->set_mctrl;
-       atmel_open_hook         = fns->open;
-       atmel_close_hook        = fns->close;
-       atmel_pops.pm           = fns->pm;
-       atmel_pops.set_wake     = fns->set_wake;
-}
-
 struct platform_device *atmel_default_console_device;  /* the serial console device */
 
 #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
index 2ca5959ec3fae04ddf8c73341d906c57d347bbaa..ecc1e16be6239aca3f8a0aa37567f87aa9c8f4ea 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/init.h>
 #include <linux/console.h>
 #include <linux/sysrq.h>
+#include <linux/platform_data/sa11x0-serial.h>
 #include <linux/platform_device.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
@@ -39,7 +40,6 @@
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
-#include <asm/mach/serial_sa1100.h>
 
 /* We've been assigned a range on the "Low-density serial ports" major */
 #define SERIAL_SA1100_MAJOR    204
index 8efbf08c35614dbcd8f3e6138b4cebb55b75e095..d4ca9f1f7f248407b6f1cd4debdfd448a7f94a00 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/mm.h>
+#include <linux/platform_data/pxa2xx_udc.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/irq.h>
@@ -59,9 +60,6 @@
 #include <mach/lubbock.h>
 #endif
 
-#include <asm/mach/udc_pxa2xx.h>
-
-
 /*
  * This driver handles the USB Device Controller (UDC) in Intel's PXA 25x
  * series processors.  The UDC for the IXP 4xx series is very similar.
index e4841c36798bd758d9a037f8d89de467047d88ae..dfddfbf5d9fe7ded64da0841411a5d1d09a21dba 100644 (file)
@@ -284,8 +284,7 @@ static int __devexit sp805_wdt_remove(struct amba_device *adev)
        return 0;
 }
 
-#ifdef CONFIG_PM
-static int sp805_wdt_suspend(struct device *dev)
+static int __maybe_unused sp805_wdt_suspend(struct device *dev)
 {
        struct sp805_wdt *wdt = dev_get_drvdata(dev);
 
@@ -295,7 +294,7 @@ static int sp805_wdt_suspend(struct device *dev)
        return 0;
 }
 
-static int sp805_wdt_resume(struct device *dev)
+static int __maybe_unused sp805_wdt_resume(struct device *dev)
 {
        struct sp805_wdt *wdt = dev_get_drvdata(dev);
 
@@ -304,7 +303,6 @@ static int sp805_wdt_resume(struct device *dev)
 
        return 0;
 }
-#endif /* CONFIG_PM */
 
 static SIMPLE_DEV_PM_OPS(sp805_wdt_dev_pm_ops, sp805_wdt_suspend,
                sp805_wdt_resume);
index d36417158d8f1811f914fb257d58ea97a092bdfc..43ec7e247a8086972ae7ef0e87efde66dd4ac0e7 100644 (file)
@@ -71,6 +71,16 @@ struct amba_device *amba_ahb_device_add(struct device *parent, const char *name,
                                        resource_size_t base, size_t size,
                                        int irq1, int irq2, void *pdata,
                                        unsigned int periphid);
+struct amba_device *
+amba_apb_device_add_res(struct device *parent, const char *name,
+                       resource_size_t base, size_t size, int irq1,
+                       int irq2, void *pdata, unsigned int periphid,
+                       struct resource *resbase);
+struct amba_device *
+amba_ahb_device_add_res(struct device *parent, const char *name,
+                       resource_size_t base, size_t size, int irq1,
+                       int irq2, void *pdata, unsigned int periphid,
+                       struct resource *resbase);
 void amba_device_unregister(struct amba_device *);
 struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int);
 int amba_request_regions(struct amba_device *, const char *);
diff --git a/include/linux/platform_data/pxa2xx_udc.h b/include/linux/platform_data/pxa2xx_udc.h
new file mode 100644 (file)
index 0000000..c6c5e98
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * This supports machine-specific differences in how the PXA2xx
+ * USB Device Controller (UDC) is wired.
+ *
+ * It is set in linux/arch/arm/mach-pxa/<machine>.c or in
+ * linux/arch/mach-ixp4xx/<machine>.c and used in
+ * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
+ */
+#ifndef PXA2XX_UDC_H
+#define PXA2XX_UDC_H
+
+struct pxa2xx_udc_mach_info {
+        int  (*udc_is_connected)(void);                /* do we see host? */
+        void (*udc_command)(int cmd);
+#define        PXA2XX_UDC_CMD_CONNECT          0       /* let host see us */
+#define        PXA2XX_UDC_CMD_DISCONNECT       1       /* so host won't see us */
+
+       /* Boards following the design guidelines in the developer's manual,
+        * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
+        * VBUS IRQ and omit the methods above.  Store the GPIO number
+        * here.  Note that sometimes the signals go through inverters...
+        */
+       bool    gpio_pullup_inverted;
+       int     gpio_pullup;                    /* high == pullup activated */
+};
+
+#endif
diff --git a/include/linux/platform_data/sa11x0-serial.h b/include/linux/platform_data/sa11x0-serial.h
new file mode 100644 (file)
index 0000000..4504d5d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ *  Author: Nicolas Pitre
+ *
+ * Moved and changed lots, Russell King
+ *
+ * Low level machine dependent UART functions.
+ */
+#ifndef SA11X0_SERIAL_H
+#define SA11X0_SERIAL_H
+
+struct uart_port;
+struct uart_info;
+
+/*
+ * This is a temporary structure for registering these
+ * functions; it is intended to be discarded after boot.
+ */
+struct sa1100_port_fns {
+       void    (*set_mctrl)(struct uart_port *, u_int);
+       u_int   (*get_mctrl)(struct uart_port *);
+       void    (*pm)(struct uart_port *, u_int, u_int);
+       int     (*set_wake)(struct uart_port *, u_int);
+};
+
+#ifdef CONFIG_SERIAL_SA1100
+void sa1100_register_uart_fns(struct sa1100_port_fns *fns);
+void sa1100_register_uart(int idx, int port);
+#else
+#define sa1100_register_uart_fns(fns) do { } while (0)
+#define sa1100_register_uart(idx,port) do { } while (0)
+#endif
+
+#endif
index f19ddc47304c8f1e2a52a4acff95697fa9b3c902..1f10e89d15b4d03a07523e6c89482b5b0edfdc3d 100644 (file)
@@ -248,6 +248,7 @@ do_file(char const *const fname)
        case EM_S390:
                custom_sort = sort_relative_table;
                break;
+       case EM_ARM:
        case EM_MIPS:
                break;
        }  /* end switch */