]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Mar 2012 01:02:10 +0000 (18:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Mar 2012 01:02:10 +0000 (18:02 -0700)
Pull "ARM: cleanups of io includes" from Olof Johansson:
 "Rob Herring has done a sweeping change cleaning up all of the
  mach/io.h includes, moving some of the oft-repeated macros to a common
  location and removing a bunch of boiler plate.  This is another step
  closer to a common zImage for multiple platforms."

Fix up various fairly trivial conflicts (<mach/io.h> removal vs changes
around it, tegra localtimer.o is *still* gone, yadda-yadda).

* tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
  ARM: tegra: Include assembler.h in sleep.S to fix build break
  ARM: pxa: use common IOMEM definition
  ARM: dma-mapping: convert ARCH_HAS_DMA_SET_COHERENT_MASK to kconfig symbol
  ARM: __io abuse cleanup
  ARM: create a common IOMEM definition
  ARM: iop13xx: fix missing declaration of iop13xx_init_early
  ARM: fix ioremap/iounmap for !CONFIG_MMU
  ARM: kill off __mem_pci
  ARM: remove bunch of now unused mach/io.h files
  ARM: make mach/io.h include optional
  ARM: clps711x: remove unneeded include of mach/io.h
  ARM: dove: add explicit include of dove.h to addr-map.c
  ARM: at91: add explicit include of hardware.h to uncompressor
  ARM: ep93xx: clean-up mach/io.h
  ARM: tegra: clean-up mach/io.h
  ARM: orion5x: clean-up mach/io.h
  ARM: davinci: remove unneeded mach/io.h include
  [media] davinci: remove includes of mach/io.h
  ARM: OMAP: Remove remaining includes for mach/io.h
  ARM: msm: clean-up mach/io.h
  ...

28 files changed:
1  2 
arch/arm/Kconfig
arch/arm/include/asm/assembler.h
arch/arm/include/asm/io.h
arch/arm/kernel/debug.S
arch/arm/kernel/entry-armv.S
arch/arm/mach-davinci/include/mach/hardware.h
arch/arm/mach-ebsa110/core.c
arch/arm/mach-imx/mm-imx3.c
arch/arm/mach-ixp4xx/goramo_mlr.c
arch/arm/mach-orion5x/pci.c
arch/arm/mach-pxa/mfp-pxa2xx.c
arch/arm/mach-pxa/sharpsl_pm.c
arch/arm/mach-s3c24xx/include/mach/io.h
arch/arm/mach-shmobile/board-ag5evm.c
arch/arm/mach-shmobile/board-bonito.c
arch/arm/mach-shmobile/board-kota2.c
arch/arm/mach-shmobile/intc-sh73a0.c
arch/arm/mach-shmobile/smp-r8a7779.c
arch/arm/mach-shmobile/smp-sh73a0.c
arch/arm/mach-spear6xx/clock.c
arch/arm/mach-tegra/include/mach/debug-macro.S
arch/arm/mach-tegra/include/mach/iomap.h
arch/arm/mach-ux500/include/mach/hardware.h
arch/arm/mm/ioremap.c
drivers/rtc/rtc-sa1100.c
drivers/watchdog/sa1100_wdt.c
sound/arm/pxa2xx-ac97-lib.c
sound/soc/pxa/pxa2xx-ac97.c

index 242f3a33d741378ef4687128779853fbf4385a36,d3999a5f1c710dd93ed6745f8163b6ec16a82e90..93180845ae164dbeeca41a27dfce6fda553bcb3d
@@@ -267,8 -278,8 +277,9 @@@ config ARCH_INTEGRATO
        select GENERIC_CLOCKEVENTS
        select PLAT_VERSATILE
        select PLAT_VERSATILE_FPGA_IRQ
+       select NEED_MACH_IO_H
        select NEED_MACH_MEMORY_H
 +      select SPARSE_IRQ
        help
          Support for ARM's Integrator platform.
  
@@@ -538,7 -555,9 +557,8 @@@ config ARCH_IXP4X
        select CPU_XSCALE
        select GENERIC_GPIO
        select GENERIC_CLOCKEVENTS
 -      select HAVE_SCHED_CLOCK
        select MIGHT_HAVE_PCI
+       select NEED_MACH_IO_H
        select DMABOUNCE if PCI
        help
          Support for Intel's IXP4XX (XScale) family of processors.
@@@ -648,8 -671,10 +671,9 @@@ config ARCH_TEGR
        select GENERIC_CLOCKEVENTS
        select GENERIC_GPIO
        select HAVE_CLK
 -      select HAVE_SCHED_CLOCK
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
+       select NEED_MACH_IO_H if PCI
        select ARCH_HAS_CPUFREQ
        help
          This enables support for NVIDIA Tegra based systems (Tegra APX,
@@@ -773,13 -802,15 +798,14 @@@ config ARCH_S3C24X
        select CLKDEV_LOOKUP
        select ARCH_USES_GETTIMEOFFSET
        select HAVE_S3C2410_I2C if I2C
 +      select HAVE_S3C_RTC if RTC_CLASS
 +      select HAVE_S3C2410_WATCHDOG if WATCHDOG
+       select NEED_MACH_IO_H
        help
 -        Samsung S3C2410X CPU based systems, such as the Simtec Electronics
 -        BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
 -        the Samsung SMDK2410 development board (and derivatives).
 -
 -        Note, the S3C2416 and the S3C2450 are so close that they even share
 -        the same SoC ID code. This means that there is no separate machine
 -        directory (no arch/arm/mach-s3c2450) as the S3C2416 was first.
 +        Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
 +        and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
 +        (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or the
 +        Samsung SMDK2410 development board (and derivatives).
  
  config ARCH_S3C64XX
        bool "Samsung S3C64XX"
Simple merge
index bae7eb6011d2bee680a0fad407db700e2306e18c,35d91406af65f9e926823ef9de6de90bb69c3248..df0ac0bb39aae43d6ebf92a7271c4ba7e536f151
@@@ -96,9 -102,10 +101,11 @@@ static inline void __iomem *__typesafe_
        return (void __iomem *)addr;
  }
  
+ #define IOMEM(x)      ((void __force __iomem *)(x))
  /* IO barriers */
  #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
 +#include <asm/barrier.h>
  #define __iormb()             rmb()
  #define __iowmb()             wmb()
  #else
Simple merge
Simple merge
Simple merge
index f8ca96c354f2280aa1ba10af200b3e443fce51fb,04be18d87e452434c84855650dee746f887c1aab..d534d7f988e0952f0d555c797c3620ff3b40ca1a
@@@ -75,10 -73,10 +75,10 @@@ static void __iomem *imx3_ioremap_calle
                        mtype = MT_DEVICE_NONSHARED;
        }
  
-       return __arm_ioremap(phys_addr, size, mtype);
+       return __arm_ioremap_caller(phys_addr, size, mtype, caller);
  }
  
 -void imx3_init_l2x0(void)
 +void __init imx3_init_l2x0(void)
  {
        void __iomem *l2x0_base;
        void __iomem *clkctl_base;
Simple merge
Simple merge
Simple merge
Simple merge
index 118749f37c4cddf2df549218a218bd5dd850ee16,0000000000000000000000000000000000000000..5dd1db4e267724275d90913d74246d6da122d2bc
mode 100644,000000..100644
--- /dev/null
@@@ -1,216 -1,0 +1,211 @@@
- /*
-  * 1:1 mapping for ioremapped regions.
-  */
- #define __mem_pci(x)  (x)
 +/*
 + * arch/arm/mach-s3c2410/include/mach/io.h
 + *  from arch/arm/mach-rpc/include/mach/io.h
 + *
 + * Copyright (C) 1997 Russell King
 + *         (C) 2003 Simtec Electronics
 +*/
 +
 +#ifndef __ASM_ARM_ARCH_IO_H
 +#define __ASM_ARM_ARCH_IO_H
 +
 +#include <mach/hardware.h>
 +
 +#define IO_SPACE_LIMIT 0xffffffff
 +
 +/*
 + * We use two different types of addressing - PC style addresses, and ARM
 + * addresses.  PC style accesses the PC hardware with the normal PC IO
 + * addresses, eg 0x3f8 for serial#1.  ARM addresses are above A28
 + * and are translated to the start of IO.  Note that all addresses are
 + * not shifted left!
 + */
 +
 +#define __PORT_PCIO(x)        ((x) < (1<<28))
 +
 +#define PCIO_BASE      (S3C24XX_VA_ISA_WORD)
 +#define PCIO_BASE_b    (S3C24XX_VA_ISA_BYTE)
 +#define PCIO_BASE_w    (S3C24XX_VA_ISA_WORD)
 +#define PCIO_BASE_l    (S3C24XX_VA_ISA_WORD)
 +/*
 + * Dynamic IO functions - let the compiler
 + * optimize the expressions
 + */
 +
 +#define DECLARE_DYN_OUT(sz,fnsuffix,instr) \
 +static inline void __out##fnsuffix (unsigned int val, unsigned int port) \
 +{ \
 +      unsigned long temp;                                   \
 +      __asm__ __volatile__(                                 \
 +      "cmp    %2, #(1<<28)\n\t"                             \
 +      "mov    %0, %2\n\t"                                   \
 +      "addcc  %0, %0, %3\n\t"                               \
 +      "str" instr " %1, [%0, #0 ]     @ out" #fnsuffix      \
 +      : "=&r" (temp)                                        \
 +      : "r" (val), "r" (port), "Ir" (PCIO_BASE_##fnsuffix)  \
 +      : "cc");                                              \
 +}
 +
 +
 +#define DECLARE_DYN_IN(sz,fnsuffix,instr)                             \
 +static inline unsigned sz __in##fnsuffix (unsigned int port)          \
 +{                                                                     \
 +      unsigned long temp, value;                                      \
 +      __asm__ __volatile__(                                           \
 +      "cmp    %2, #(1<<28)\n\t"                                       \
 +      "mov    %0, %2\n\t"                                             \
 +      "addcc  %0, %0, %3\n\t"                                         \
 +      "ldr" instr "   %1, [%0, #0 ]   @ in" #fnsuffix         \
 +      : "=&r" (temp), "=r" (value)                                    \
 +      : "r" (port), "Ir" (PCIO_BASE_##fnsuffix)       \
 +      : "cc");                                                        \
 +      return (unsigned sz)value;                                      \
 +}
 +
 +static inline void __iomem *__ioaddr (unsigned long port)
 +{
 +      return __PORT_PCIO(port) ? (PCIO_BASE + port) : (void __iomem *)port;
 +}
 +
 +#define DECLARE_IO(sz,fnsuffix,instr) \
 +      DECLARE_DYN_IN(sz,fnsuffix,instr) \
 +      DECLARE_DYN_OUT(sz,fnsuffix,instr)
 +
 +DECLARE_IO(char,b,"b")
 +DECLARE_IO(short,w,"h")
 +DECLARE_IO(int,l,"")
 +
 +#undef DECLARE_IO
 +#undef DECLARE_DYN_IN
 +
 +/*
 + * Constant address IO functions
 + *
 + * These have to be macros for the 'J' constraint to work -
 + * +/-4096 immediate operand.
 + */
 +#define __outbc(value,port)                                           \
 +({                                                                    \
 +      if (__PORT_PCIO((port)))                                        \
 +              __asm__ __volatile__(                                   \
 +              "strb   %0, [%1, %2]    @ outbc"                        \
 +              : : "r" (value), "r" (PCIO_BASE), "Jr" ((port)));       \
 +      else                                                            \
 +              __asm__ __volatile__(                                   \
 +              "strb   %0, [%1, #0]    @ outbc"                        \
 +              : : "r" (value), "r" ((port)));                         \
 +})
 +
 +#define __inbc(port)                                                  \
 +({                                                                    \
 +      unsigned char result;                                           \
 +      if (__PORT_PCIO((port)))                                        \
 +              __asm__ __volatile__(                                   \
 +              "ldrb   %0, [%1, %2]    @ inbc"                         \
 +              : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port)));      \
 +      else                                                            \
 +              __asm__ __volatile__(                                   \
 +              "ldrb   %0, [%1, #0]    @ inbc"                         \
 +              : "=r" (result) : "r" ((port)));                        \
 +      result;                                                         \
 +})
 +
 +#define __outwc(value,port)                                           \
 +({                                                                    \
 +      unsigned long v = value;                                        \
 +      if (__PORT_PCIO((port))) {                                      \
 +              if ((port) < 256 && (port) > -256)                      \
 +                      __asm__ __volatile__(                           \
 +                      "strh   %0, [%1, %2]    @ outwc"                \
 +                      : : "r" (v), "r" (PCIO_BASE), "Jr" ((port)));   \
 +              else if ((port) > 0)                                    \
 +                      __asm__ __volatile__(                           \
 +                      "strh   %0, [%1, %2]    @ outwc"                \
 +                      : : "r" (v),                                    \
 +                          "r" (PCIO_BASE + ((port) & ~0xff)),         \
 +                           "Jr" (((port) & 0xff)));                   \
 +              else                                                    \
 +                      __asm__ __volatile__(                           \
 +                      "strh   %0, [%1, #0]    @ outwc"                \
 +                      : : "r" (v),                                    \
 +                          "r" (PCIO_BASE + (port)));                  \
 +      } else                                                          \
 +              __asm__ __volatile__(                                   \
 +              "strh   %0, [%1, #0]    @ outwc"                        \
 +              : : "r" (v), "r" ((port)));                             \
 +})
 +
 +#define __inwc(port)                                                  \
 +({                                                                    \
 +      unsigned short result;                                          \
 +      if (__PORT_PCIO((port))) {                                      \
 +              if ((port) < 256 && (port) > -256 )                     \
 +                      __asm__ __volatile__(                           \
 +                      "ldrh   %0, [%1, %2]    @ inwc"                 \
 +                      : "=r" (result)                                 \
 +                      : "r" (PCIO_BASE),                              \
 +                        "Jr" ((port)));                               \
 +              else if ((port) > 0)                                    \
 +                      __asm__ __volatile__(                           \
 +                      "ldrh   %0, [%1, %2]    @ inwc"                 \
 +                      : "=r" (result)                                 \
 +                      : "r" (PCIO_BASE + ((port) & ~0xff)),           \
 +                        "Jr" (((port) & 0xff)));                      \
 +              else                                                    \
 +                      __asm__ __volatile__(                           \
 +                      "ldrh   %0, [%1, #0]    @ inwc"                 \
 +                      : "=r" (result)                                 \
 +                      : "r" (PCIO_BASE + ((port))));                  \
 +      } else                                                          \
 +              __asm__ __volatile__(                                   \
 +              "ldrh   %0, [%1, #0]    @ inwc"                         \
 +              : "=r" (result) : "r" ((port)));                        \
 +      result;                                                         \
 +})
 +
 +#define __outlc(value,port)                                           \
 +({                                                                    \
 +      unsigned long v = value;                                        \
 +      if (__PORT_PCIO((port)))                                        \
 +              __asm__ __volatile__(                                   \
 +              "str    %0, [%1, %2]    @ outlc"                        \
 +              : : "r" (v), "r" (PCIO_BASE), "Jr" ((port)));   \
 +      else                                                            \
 +              __asm__ __volatile__(                                   \
 +              "str    %0, [%1, #0]    @ outlc"                        \
 +              : : "r" (v), "r" ((port)));             \
 +})
 +
 +#define __inlc(port)                                                  \
 +({                                                                    \
 +      unsigned long result;                                           \
 +      if (__PORT_PCIO((port)))                                        \
 +              __asm__ __volatile__(                                   \
 +              "ldr    %0, [%1, %2]    @ inlc"                         \
 +              : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port)));      \
 +      else                                                            \
 +              __asm__ __volatile__(                                   \
 +              "ldr    %0, [%1, #0]    @ inlc"                         \
 +              : "=r" (result) : "r" ((port)));                \
 +      result;                                                         \
 +})
 +
 +#define __ioaddrc(port)       ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)(port)))
 +
 +#define inb(p)                (__builtin_constant_p((p)) ? __inbc(p)     : __inb(p))
 +#define inw(p)                (__builtin_constant_p((p)) ? __inwc(p)     : __inw(p))
 +#define inl(p)                (__builtin_constant_p((p)) ? __inlc(p)     : __inl(p))
 +#define outb(v,p)     (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
 +#define outw(v,p)     (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
 +#define outl(v,p)     (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
 +#define __ioaddr(p)   (__builtin_constant_p((p)) ? __ioaddr(p)  : __ioaddrc(p))
 +
 +#define insb(p,d,l)   __raw_readsb(__ioaddr(p),d,l)
 +#define insw(p,d,l)   __raw_readsw(__ioaddr(p),d,l)
 +#define insl(p,d,l)   __raw_readsl(__ioaddr(p),d,l)
 +
 +#define outsb(p,d,l)  __raw_writesb(__ioaddr(p),d,l)
 +#define outsw(p,d,l)  __raw_writesw(__ioaddr(p),d,l)
 +#define outsl(p,d,l)  __raw_writesl(__ioaddr(p),d,l)
 +
 +#endif
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c0a9093ba3a8675f861871078bc50730fc4dae58,667d53dd70128ca71139cad62b6eb36b5ac9b5ba..14ad8b052f1a0944400d41ec559bc7188b8c5571
@@@ -78,10 -80,10 +78,10 @@@ int __cpuinit sh73a0_boot_secondary(uns
        /* enable cache coherency */
        modify_scu_cpu_psr(0, 3 << (cpu * 8));
  
-       if (((__raw_readl(__io(PSTR)) >> (4 * cpu)) & 3) == 3)
-               __raw_writel(1 << cpu, __io(WUPCR));    /* wake up */
 -      if (((__raw_readw(PSTR) >> (4 * cpu)) & 3) == 3)
++      if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) == 3)
+               __raw_writel(1 << cpu, WUPCR);  /* wake up */
        else
-               __raw_writel(1 << cpu, __io(SRESCR));   /* reset */
+               __raw_writel(1 << cpu, SRESCR); /* reset */
  
        return 0;
  }
Simple merge
index 90069abd37bd84844c5fc29ce2fca73e66d9ec8e,e28ce16751465fda992ba2b508f0e65066d3597b..8ce0661b8a3d34bf4ad9a4004de0606a4e7de547
   *
   */
  
- #include <mach/io.h>
 +#include <linux/serial_reg.h>
 +
  #include <mach/iomap.h>
 +#include <mach/irammap.h>
 +
 +              .macro  addruart, rp, rv, tmp
 +              adr     \rp, 99f                @ actual addr of 99f
 +              ldr     \rv, [\rp]              @ linked addr is stored there
 +              sub     \rv, \rv, \rp           @ offset between the two
 +              ldr     \rp, [\rp, #4]          @ linked tegra_uart_config
 +              sub     \tmp, \rp, \rv          @ actual tegra_uart_config
 +              ldr     \rp, [\tmp]             @ Load tegra_uart_config
 +              cmp     \rp, #1                 @ needs intitialization?
 +              bne     100f                    @ no; go load the addresses
 +              mov     \rv, #0                 @ yes; record init is done
 +              str     \rv, [\tmp]
 +              mov     \rp, #TEGRA_IRAM_BASE   @ See if cookie is in IRAM
 +              ldr     \rv, [\rp, #TEGRA_IRAM_DEBUG_UART_OFFSET]
 +              movw    \rp, #TEGRA_IRAM_DEBUG_UART_COOKIE & 0xffff
 +              movt    \rp, #TEGRA_IRAM_DEBUG_UART_COOKIE >> 16
 +              cmp     \rv, \rp                @ Cookie present?
 +              bne     100f                    @ No, use default UART
 +              mov     \rp, #TEGRA_IRAM_BASE   @ Load UART address from IRAM
 +              ldr     \rv, [\rp, #TEGRA_IRAM_DEBUG_UART_OFFSET + 4]
 +              str     \rv, [\tmp, #4]         @ Store in tegra_uart_phys
 +              sub     \rv, \rv, #IO_APB_PHYS  @ Calculate virt address
 +              add     \rv, \rv, #IO_APB_VIRT
 +              str     \rv, [\tmp, #8]         @ Store in tegra_uart_virt
 +              b       100f
 +
 +              .align
 +99:           .word   .
 +              .word   tegra_uart_config
 +              .ltorg
 +
 +100:          ldr     \rp, [\tmp, #4]         @ Load tegra_uart_phys
 +              ldr     \rv, [\tmp, #8]         @ Load tegra_uart_virt
 +              .endm
 +
 +#define UART_SHIFT 2
 +
 +/*
 + * Code below is swiped from <asm/hardware/debug-8250.S>, but add an extra
 + * check to make sure that we aren't in the CONFIG_TEGRA_DEBUG_UART_NONE case.
 + * We use the fact that all 5 valid UART addresses all have something in the
 + * 2nd-to-lowest byte.
 + */
  
 -      .macro  addruart, rp, rv, tmp
 -        ldr     \rp, =IO_APB_PHYS       @ physical
 -        ldr     \rv, =IO_APB_VIRT        @ virtual
 -      orr     \rp, \rp, #(TEGRA_DEBUG_UART_BASE & 0xFF)
 -      orr     \rp, \rp, #(TEGRA_DEBUG_UART_BASE & 0xFF00)
 -      orr     \rv, \rv, #(TEGRA_DEBUG_UART_BASE & 0xFF)
 -      orr     \rv, \rv, #(TEGRA_DEBUG_UART_BASE & 0xFF00)
 -      .endm
 +              .macro  senduart, rd, rx
 +              tst     \rx, #0x0000ff00
 +              strneb  \rd, [\rx, #UART_TX << UART_SHIFT]
 +1001:
 +              .endm
  
 -#define UART_SHIFT    2
 -#include <asm/hardware/debug-8250.S>
 +              .macro  busyuart, rd, rx
 +              tst     \rx, #0x0000ff00
 +              beq     1002f
 +1001:         ldrb    \rd, [\rx, #UART_LSR << UART_SHIFT]
 +              and     \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
 +              teq     \rd, #UART_LSR_TEMT | UART_LSR_THRE
 +              bne     1001b
 +1002:
 +              .endm
  
 +              .macro  waituart, rd, rx
 +#ifdef FLOW_CONTROL
 +              tst     \rx, #0x0000ff00
 +              beq     1002f
 +1001:         ldrb    \rd, [\rx, #UART_MSR << UART_SHIFT]
 +              tst     \rd, #UART_MSR_CTS
 +              beq     1001b
 +1002:
 +#endif
 +              .endm
Simple merge
index 4940fa8c4e1002f913e7f3171d8cdc72bd5310fb,398ab7a7ceca6c40e1a0f23b92604969d85b6b20..50a5c4adee4807e7027fefb392bd137e63aca0f8
  #include <linux/init.h>
  #include <linux/fs.h>
  #include <linux/interrupt.h>
 +#include <linux/slab.h>
  #include <linux/string.h>
 +#include <linux/of.h>
  #include <linux/pm.h>
  #include <linux/bitops.h>
+ #include <linux/io.h>
  
  #include <mach/hardware.h>
 -#include <asm/irq.h>
 +#include <mach/irqs.h>
  
 -#ifdef CONFIG_ARCH_PXA
 +#if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP)
  #include <mach/regs-rtc.h>
  #endif
  
Simple merge
Simple merge
Simple merge