Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 820d41cf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents 6268b325 88b48684
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -179,6 +179,9 @@ config ZONE_DMA
config NEED_DMA_MAP_STATE
       def_bool y

config ARCH_HAS_DMA_SET_COHERENT_MASK
	bool

config GENERIC_ISA_DMA
	bool

@@ -216,6 +219,13 @@ config ARM_PATCH_PHYS_VIRT
	  this feature (eg, building a kernel for a single machine) and
	  you need to shrink the kernel to the minimal size.

config NEED_MACH_IO_H
	bool
	help
	  Select this when mach/io.h is required to provide special
	  definitions for this platform.  The need for mach/io.h should
	  be avoided when possible.

config NEED_MACH_MEMORY_H
	bool
	help
@@ -267,6 +277,7 @@ config ARCH_INTEGRATOR
	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
@@ -406,6 +417,7 @@ config ARCH_EBSA110
	select ISA
	select NO_IOPORT
	select ARCH_USES_GETTIMEOFFSET
	select NEED_MACH_IO_H
	select NEED_MACH_MEMORY_H
	help
	  This is an evaluation board for the StrongARM processor available
@@ -432,6 +444,7 @@ config ARCH_FOOTBRIDGE
	select FOOTBRIDGE
	select GENERIC_CLOCKEVENTS
	select HAVE_IDE
	select NEED_MACH_IO_H
	select NEED_MACH_MEMORY_H
	help
	  Support for systems based on the DC21285 companion chip
@@ -483,6 +496,7 @@ config ARCH_IOP13XX
	select PCI
	select ARCH_SUPPORTS_MSI
	select VMSPLIT_1G
	select NEED_MACH_IO_H
	select NEED_MACH_MEMORY_H
	select NEED_RET_TO_USER
	help
@@ -492,6 +506,7 @@ config ARCH_IOP32X
	bool "IOP32x-based"
	depends on MMU
	select CPU_XSCALE
	select NEED_MACH_IO_H
	select NEED_RET_TO_USER
	select PLAT_IOP
	select PCI
@@ -504,6 +519,7 @@ config ARCH_IOP33X
	bool "IOP33x-based"
	depends on MMU
	select CPU_XSCALE
	select NEED_MACH_IO_H
	select NEED_RET_TO_USER
	select PLAT_IOP
	select PCI
@@ -517,6 +533,7 @@ config ARCH_IXP23XX
	select CPU_XSC3
 	select PCI
	select ARCH_USES_GETTIMEOFFSET
	select NEED_MACH_IO_H
	select NEED_MACH_MEMORY_H
	help
	  Support for Intel's IXP23xx (XScale) family of processors.
@@ -527,6 +544,7 @@ config ARCH_IXP2000
	select CPU_XSCALE
	select PCI
	select ARCH_USES_GETTIMEOFFSET
	select NEED_MACH_IO_H
	select NEED_MACH_MEMORY_H
	help
	  Support for Intel's IXP2400/2800 (XScale) family of processors.
@@ -534,11 +552,13 @@ config ARCH_IXP2000
config ARCH_IXP4XX
	bool "IXP4xx-based"
	depends on MMU
	select ARCH_HAS_DMA_SET_COHERENT_MASK
	select CLKSRC_MMIO
	select CPU_XSCALE
	select GENERIC_GPIO
	select GENERIC_CLOCKEVENTS
	select MIGHT_HAVE_PCI
	select NEED_MACH_IO_H
	select DMABOUNCE if PCI
	help
	  Support for Intel's IXP4XX (XScale) family of processors.
@@ -549,6 +569,7 @@ config ARCH_DOVE
	select PCI
	select ARCH_REQUIRE_GPIOLIB
	select GENERIC_CLOCKEVENTS
	select NEED_MACH_IO_H
	select PLAT_ORION
	help
	  Support for the Marvell Dove SoC 88AP510
@@ -559,6 +580,7 @@ config ARCH_KIRKWOOD
	select PCI
	select ARCH_REQUIRE_GPIOLIB
	select GENERIC_CLOCKEVENTS
	select NEED_MACH_IO_H
	select PLAT_ORION
	help
	  Support for the following Marvell Kirkwood series SoCs:
@@ -583,6 +605,7 @@ config ARCH_MV78XX0
	select PCI
	select ARCH_REQUIRE_GPIOLIB
	select GENERIC_CLOCKEVENTS
	select NEED_MACH_IO_H
	select PLAT_ORION
	help
	  Support for the following Marvell MV78xx0 series SoCs:
@@ -650,6 +673,7 @@ config ARCH_TEGRA
	select HAVE_CLK
	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,
@@ -741,6 +765,7 @@ config ARCH_RPC
	select ARCH_SPARSEMEM_ENABLE
	select ARCH_USES_GETTIMEOFFSET
	select HAVE_IDE
	select NEED_MACH_IO_H
	select NEED_MACH_MEMORY_H
	help
	  On the Acorn Risc-PC, Linux can support the internal IDE disk and
@@ -775,6 +800,7 @@ config ARCH_S3C24XX
	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 S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
	  and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
@@ -876,6 +902,7 @@ config ARCH_SHARK
	select PCI
	select ARCH_USES_GETTIMEOFFSET
	select NEED_MACH_MEMORY_H
	select NEED_MACH_IO_H
	help
	  Support for the StrongARM based Digital DNARD machine, also known
	  as "Shark" (<http://www.shark-linux.de/shark.html>).
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@
#include <asm/ptrace.h>
#include <asm/domain.h>

#define IOMEM(x)	(x)

/*
 * Endian independent macros for shifting bytes within registers.
 */
+33 −38
Original line number Diff line number Diff line
@@ -82,6 +82,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns
extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
extern void __iounmap(volatile void __iomem *addr);
extern void __arm_iounmap(volatile void __iomem *addr);

extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
	unsigned int, void *);
extern void (*arch_iounmap)(volatile void __iomem *);

/*
 * Bad read/write accesses...
@@ -96,6 +101,8 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
	return (void __iomem *)addr;
}

#define IOMEM(x)	((void __force __iomem *)(x))

/* IO barriers */
#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
#include <asm/barrier.h>
@@ -109,7 +116,11 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
/*
 * Now, pick up the machine-defined IO definitions
 */
#ifdef CONFIG_NEED_MACH_IO_H
#include <mach/io.h>
#else
#define __io(a)		({ (void)(a); __typesafe_io(0); })
#endif

/*
 * This is the limit of PC card/PCI/ISA IO space, which is by default
@@ -211,18 +222,18 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
 * Again, this are defined to perform little endian accesses.  See the
 * IO port primitives for more information.
 */
#ifdef __mem_pci
#define readb_relaxed(c) ({ u8  __r = __raw_readb(__mem_pci(c)); __r; })
#ifndef readl
#define readb_relaxed(c) ({ u8  __r = __raw_readb(c); __r; })
#define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \
					__raw_readw(__mem_pci(c))); __r; })
					__raw_readw(c)); __r; })
#define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \
					__raw_readl(__mem_pci(c))); __r; })
					__raw_readl(c)); __r; })

#define writeb_relaxed(v,c)	((void)__raw_writeb(v,__mem_pci(c)))
#define writeb_relaxed(v,c)	((void)__raw_writeb(v,c))
#define writew_relaxed(v,c)	((void)__raw_writew((__force u16) \
					cpu_to_le16(v),__mem_pci(c)))
					cpu_to_le16(v),c))
#define writel_relaxed(v,c)	((void)__raw_writel((__force u32) \
					cpu_to_le32(v),__mem_pci(c)))
					cpu_to_le32(v),c))

#define readb(c)		({ u8  __v = readb_relaxed(c); __iormb(); __v; })
#define readw(c)		({ u16 __v = readw_relaxed(c); __iormb(); __v; })
@@ -232,30 +243,19 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
#define writew(v,c)		({ __iowmb(); writew_relaxed(v,c); })
#define writel(v,c)		({ __iowmb(); writel_relaxed(v,c); })

#define readsb(p,d,l)		__raw_readsb(__mem_pci(p),d,l)
#define readsw(p,d,l)		__raw_readsw(__mem_pci(p),d,l)
#define readsl(p,d,l)		__raw_readsl(__mem_pci(p),d,l)

#define writesb(p,d,l)		__raw_writesb(__mem_pci(p),d,l)
#define writesw(p,d,l)		__raw_writesw(__mem_pci(p),d,l)
#define writesl(p,d,l)		__raw_writesl(__mem_pci(p),d,l)
#define readsb(p,d,l)		__raw_readsb(p,d,l)
#define readsw(p,d,l)		__raw_readsw(p,d,l)
#define readsl(p,d,l)		__raw_readsl(p,d,l)

#define memset_io(c,v,l)	_memset_io(__mem_pci(c),(v),(l))
#define memcpy_fromio(a,c,l)	_memcpy_fromio((a),__mem_pci(c),(l))
#define memcpy_toio(c,a,l)	_memcpy_toio(__mem_pci(c),(a),(l))
#define writesb(p,d,l)		__raw_writesb(p,d,l)
#define writesw(p,d,l)		__raw_writesw(p,d,l)
#define writesl(p,d,l)		__raw_writesl(p,d,l)

#elif !defined(readb)
#define memset_io(c,v,l)	_memset_io(c,(v),(l))
#define memcpy_fromio(a,c,l)	_memcpy_fromio((a),c,(l))
#define memcpy_toio(c,a,l)	_memcpy_toio(c,(a),(l))

#define readb(c)			(__readwrite_bug("readb"),0)
#define readw(c)			(__readwrite_bug("readw"),0)
#define readl(c)			(__readwrite_bug("readl"),0)
#define writeb(v,c)			__readwrite_bug("writeb")
#define writew(v,c)			__readwrite_bug("writew")
#define writel(v,c)			__readwrite_bug("writel")

#define check_signature(io,sig,len)	(0)

#endif	/* __mem_pci */
#endif	/* readl */

/*
 * ioremap and friends.
@@ -264,16 +264,11 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
 * Documentation/io-mapping.txt.
 *
 */
#ifndef __arch_ioremap
#define __arch_ioremap			__arm_ioremap
#define __arch_iounmap			__iounmap
#endif

#define ioremap(cookie,size)		__arch_ioremap((cookie), (size), MT_DEVICE)
#define ioremap_nocache(cookie,size)	__arch_ioremap((cookie), (size), MT_DEVICE)
#define ioremap_cached(cookie,size)	__arch_ioremap((cookie), (size), MT_DEVICE_CACHED)
#define ioremap_wc(cookie,size)		__arch_ioremap((cookie), (size), MT_DEVICE_WC)
#define iounmap				__arch_iounmap
#define ioremap(cookie,size)		__arm_ioremap((cookie), (size), MT_DEVICE)
#define ioremap_nocache(cookie,size)	__arm_ioremap((cookie), (size), MT_DEVICE)
#define ioremap_cached(cookie,size)	__arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
#define ioremap_wc(cookie,size)		__arm_ioremap((cookie), (size), MT_DEVICE_WC)
#define iounmap				__arm_iounmap

/*
 * io{read,write}{8,16,32} macros
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
 *  32-bit debugging code
 */
#include <linux/linkage.h>
#include <asm/assembler.h>

		.text

+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 *  that causes it to save wrong values...  Be aware!
 */

#include <asm/assembler.h>
#include <asm/memory.h>
#include <asm/glue-df.h>
#include <asm/glue-pf.h>
Loading