mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
ARM: pxa: split up mach/hardware.h
The mach/hardware.h is included in lots of places, and it provides three different things on pxa: - the cpu_is_pxa* macros - an indirect inclusion of mach/addr-map.h - the __REG() and io_pv2() helper macros Split it up into separate <linux/soc/pxa/cpu.h> and mach/pxa-regs.h headers, then change all the files that use mach/hardware.h to include the exact set of those three headers that they actually need, allowing for further more targeted cleanup. linux/soc/pxa/cpu.h can remain permanently exported and is now in a global location along with similar headers. pxa-regs.h and addr-map.h are only used in a very small number of drivers now and can be moved to arch/arm/mach-pxa/ directly when those drivers are to pass the necessary data as resources. Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@kernel.org> Cc: linux-clk@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linux-leds@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: linux-mtd@lists.infradead.org Cc: linux-rtc@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-watchdog@vger.kernel.org Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
|
||||
@@ -26,13 +26,16 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#include <asm/hardware/sa1111.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_SA1100
|
||||
#include <mach/hardware.h>
|
||||
#endif
|
||||
|
||||
/* SA1111 IRQs */
|
||||
#define IRQ_GPAIN0 (0)
|
||||
#define IRQ_GPAIN1 (1)
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <linux/spi/spi_gpio.h>
|
||||
#include <linux/spi/tdo24m.h>
|
||||
|
||||
#include <linux/soc/pxa/cpu.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/setup.h>
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/platform_data/i2c-pxa.h>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <linux/platform_data/mmc-pxamci.h>
|
||||
#include <linux/platform_data/usb-ohci-pxa27x.h>
|
||||
#include "pxa27x.h"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/soc/pxa/cpu.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <linux/sizes.h>
|
||||
#include <asm/system_info.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <asm/setup.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/hardware.h>
|
||||
|
||||
#include <mach/corgi.h>
|
||||
#include <mach/pxa2xx-regs.h>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include "csb726.h"
|
||||
#include "pxa27x.h"
|
||||
#include <linux/platform_data/mmc-pxamci.h>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/spi/pxa2xx_spi.h>
|
||||
#include <linux/platform_data/i2c-pxa.h>
|
||||
#include <linux/soc/pxa/cpu.h>
|
||||
|
||||
#include "udc.h"
|
||||
#include <linux/platform_data/usb-pxa3xx-ulpi.h>
|
||||
@@ -20,7 +21,6 @@
|
||||
#include <linux/platform_data/keypad-pxa27x.h>
|
||||
#include <linux/platform_data/media/camera-pxa.h>
|
||||
#include <mach/audio.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <linux/platform_data/mmp_dma.h>
|
||||
#include <linux/platform_data/mtd-nand-pxa3xx.h>
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "pxa27x.h"
|
||||
#include <linux/platform_data/video-pxafb.h>
|
||||
#include <linux/platform_data/usb-ohci-pxa27x.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <linux/platform_data/keypad-pxa27x.h>
|
||||
#include <linux/platform_data/media/camera-pxa.h>
|
||||
|
||||
|
||||
@@ -17,11 +17,12 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/soc/pxa/cpu.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <mach/addr-map.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/reset.h>
|
||||
#include <mach/smemc.h>
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <asm/setup.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
#include <linux/spi/pxa2xx_spi.h>
|
||||
#include <linux/platform_data/i2c-pxa.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include "pxa27x.h"
|
||||
#include <mach/addr-map.h>
|
||||
#include <mach/hx4700.h>
|
||||
#include <linux/platform_data/irda-pxaficp.h>
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <asm/setup.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
52
arch/arm/mach-pxa/include/mach/pxa-regs.h
Normal file
52
arch/arm/mach-pxa/include/mach/pxa-regs.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Author: Nicolas Pitre
|
||||
* Created: Jun 15, 2001
|
||||
* Copyright: MontaVista Software Inc.
|
||||
*/
|
||||
#ifndef __ASM_MACH_PXA_REGS_H
|
||||
#define __ASM_MACH_PXA_REGS_H
|
||||
|
||||
/*
|
||||
* Workarounds for at least 2 errata so far require this.
|
||||
* The mapping is set in mach-pxa/generic.c.
|
||||
*/
|
||||
#define UNCACHED_PHYS_0 0xfe000000
|
||||
#define UNCACHED_PHYS_0_SIZE 0x00100000
|
||||
|
||||
/*
|
||||
* Intel PXA2xx internal register mapping:
|
||||
*
|
||||
* 0x40000000 - 0x41ffffff <--> 0xf2000000 - 0xf3ffffff
|
||||
* 0x44000000 - 0x45ffffff <--> 0xf4000000 - 0xf5ffffff
|
||||
* 0x48000000 - 0x49ffffff <--> 0xf6000000 - 0xf7ffffff
|
||||
* 0x4c000000 - 0x4dffffff <--> 0xf8000000 - 0xf9ffffff
|
||||
* 0x50000000 - 0x51ffffff <--> 0xfa000000 - 0xfbffffff
|
||||
* 0x54000000 - 0x55ffffff <--> 0xfc000000 - 0xfdffffff
|
||||
* 0x58000000 - 0x59ffffff <--> 0xfe000000 - 0xffffffff
|
||||
*
|
||||
* Note that not all PXA2xx chips implement all those addresses, and the
|
||||
* kernel only maps the minimum needed range of this mapping.
|
||||
*/
|
||||
#define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1))
|
||||
#define io_p2v(x) IOMEM(0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1))
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# define __REG(x) (*((volatile u32 __iomem *)io_p2v(x)))
|
||||
|
||||
/* With indexed regs we don't want to feed the index through io_p2v()
|
||||
especially if it is a variable, otherwise horrible code will result. */
|
||||
# define __REG2(x,y) \
|
||||
(*(volatile u32 __iomem*)((u32)&__REG(x) + (y)))
|
||||
|
||||
# define __PREG(x) (io_v2p((u32)&(x)))
|
||||
|
||||
#else
|
||||
|
||||
# define __REG(x) io_p2v(x)
|
||||
# define __PREG(x) io_v2p(x)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -11,7 +11,7 @@
|
||||
#ifndef __PXA2XX_REGS_H
|
||||
#define __PXA2XX_REGS_H
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include "pxa-regs.h"
|
||||
|
||||
/*
|
||||
* Power Manager
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#ifndef __ASM_ARCH_PXA3XX_REGS_H
|
||||
#define __ASM_ARCH_PXA3XX_REGS_H
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include "pxa-regs.h"
|
||||
|
||||
/*
|
||||
* Oscillator Configuration Register (OSCC)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifndef __ASM_ARCH_REGS_AC97_H
|
||||
#define __ASM_ARCH_REGS_AC97_H
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include "pxa-regs.h"
|
||||
|
||||
/*
|
||||
* AC97 Controller registers
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user