Hi PXA maintainers,
I'm in the process of getting the old ARM platforms to all build in a single kernel. The largest part of that work is changing all the device drivers to no longer require mach/*.h header files.
This series does it for arch/pxa/.
As with the omap1 and s3c24xx series I sent before, I don't expect this all to be correct in the first version, though a lot of the patches are fairly simple and I did exhaustive compile-time testing on them.
Please test if you have the hardware, or review!
Arnd
Bcc: Alexandre Belloni alexandre.belloni@bootlin.com Bcc: alsa-devel@alsa-project.org Bcc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Bcc: Brian Norris computersforpeace@gmail.com Bcc: Daniel Thompson daniel.thompson@linaro.org Bcc: David Woodhouse dwmw2@infradead.org Bcc: Dmitry Torokhov dmitry.torokhov@gmail.com Bcc: Dominik Brodowski linux@dominikbrodowski.net Bcc: dri-devel@lists.freedesktop.org Bcc: Felipe Balbi balbi@kernel.org Bcc: Greg Kroah-Hartman gregkh@linuxfoundation.org Bcc: Guenter Roeck linux@roeck-us.net Bcc: Jacek Anaszewski jacek.anaszewski@gmail.com Bcc: Jens Axboe axboe@kernel.dk Bcc: Jingoo Han jingoohan1@gmail.com Bcc: Jonathan Cameron jic23@cam.ac.uk Bcc: Lee Jones lee.jones@linaro.org Bcc: Lubomir Rintel lkundrak@v3.sk Bcc: Marek Vasut marek.vasut@gmail.com Bcc: Mark Brown broonie@kernel.org Bcc: Michael Turquette mturquette@baylibre.com Bcc: Miquel Raynal miquel.raynal@bootlin.com Bcc: Paul Parsons lost.distance@yahoo.com Bcc: Pavel Machek pavel@ucw.cz Bcc: Philipp Zabel philipp.zabel@gmail.com Bcc: "Rafael J. Wysocki" rjw@rjwysocki.net Bcc: Richard Weinberger richard@nod.at Bcc: Russell King linux@armlinux.org.uk Bcc: Sebastian Reichel sre@kernel.org Bcc: Sergey Lapin slapin@ossfans.org Bcc: Stephen Boyd sboyd@kernel.org Bcc: Tomas Cech sleep_walker@suse.com Bcc: Ulf Hansson ulf.hansson@linaro.org Bcc: Vignesh Raghavendra vigneshr@ti.com Bcc: Viresh Kumar viresh.kumar@linaro.org Bcc: Wim Van Sebroeck wim@linux-watchdog.org Cc: linux-clk@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Cc: linux-ide@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-pm@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: linux-watchdog@vger.kernel.org
Arnd Bergmann (46): ARM: pxa: split mach/generic.h ARM: pxa: make mainstone.h private ARM: pxa: make mach/regs-uart.h private ARM: pxa: remove mach/dma.h ARM: pxa: split up mach/hardware.h ARM: pxa: stop using mach/bitfield.h ARM: pxa: move mach/sound.h to linux/platform_data/ ARM: pxa: move regs-lcd.h into driver watchdog: sa1100: use platform device registration ARM: pxa: pxa2xx-ac97-lib: use IRQ resource ARM: pxa: cmx270: use platform device for nand ARM: pxa: make addr-map.h header local ARM: pxa: move pcmcia board data into mach-pxa ARM: pxa: use pdev resource for palmld mmio ARM: pxa: maybe fix gpio lookup tables ARM: pxa: tosa: use gpio descriptor for audio ARM: pxa: poodle: use platform data for poodle asoc driver ARM: pxa: corgi: use gpio descriptors for audio ARM: pxa: hx4700: use gpio descriptors for audio ARM: pxa: lubbock: pass udc irqs as resource ARM: pxa: spitz: use gpio descriptors for audio ARM: pxa: eseries: use gpio lookup for audio ARM: pxa: z2: use gpio lookup for audio device ARM: pxa: magician: use platform driver for audio ARM: pxa: mainstone-wm97xx: use gpio lookup table ARM: pxa: zylonite: use gpio lookup instead mfp header input: touchscreen: mainstone: fix pxa2xx+pxa3xx configuration input: touchscreen: mainstone: sync with zylonite driver Input: touchscreen: use wrapper for pxa2xx ac97 registers SoC: pxa: use pdev resource for FIFO regs ASoC: pxa: ac97: use normal MMIO accessors ASoC: pxa: i2s: use normal MMIO accessors ARM: pxa: pcmcia: move smemc configuration back to arch ARM: pxa: remove get_clk_frequency_khz() cpufreq: pxa3: move clk register access to clk driver ARM: pxa: move smemc register access from clk to platform ARM: pxa: move clk register definitions to driver video: backlight: tosa: use gpio lookup table power: tosa: simplify probe function ARM: pxa: tosa: use gpio lookup for battery ARM: pxa: move it8152 PCI support into machine ARM: pxa: remove unused mach/bitfield.h ARM: pxa: pci-it8152: add platform checks ARM: mmp: remove tavorevb board support ARM: mmp: rename pxa_register_device ARM: pxa: move plat-pxa to drivers/soc/
arch/arm/Kconfig | 9 - arch/arm/Makefile | 1 - arch/arm/common/Makefile | 1 - arch/arm/common/locomo.c | 1 - arch/arm/common/sa1111.c | 5 +- arch/arm/include/asm/hardware/sa1111.h | 2 - arch/arm/mach-mmp/Kconfig | 10 +- arch/arm/mach-mmp/Makefile | 1 - arch/arm/mach-mmp/devices.c | 2 +- arch/arm/mach-mmp/devices.h | 10 +- arch/arm/mach-mmp/mfp.h | 2 +- arch/arm/mach-mmp/mmp2.h | 48 ++--- arch/arm/mach-mmp/pxa168.h | 60 +++--- arch/arm/mach-mmp/pxa910.h | 38 ++-- arch/arm/mach-mmp/tavorevb.c | 113 ----------- arch/arm/mach-mmp/ttc_dkb.c | 6 +- arch/arm/mach-pxa/Kconfig | 8 +- arch/arm/mach-pxa/Makefile | 22 +- .../mach-pxa/{include/mach => }/addr-map.h | 0 .../arm/mach-pxa/balloon3-pcmcia.c | 4 +- arch/arm/mach-pxa/balloon3.c | 4 +- .../mach-pxa/{include/mach => }/balloon3.h | 2 +- arch/arm/mach-pxa/cm-x270.c | 25 +++ arch/arm/mach-pxa/cm-x2xx-pci.c | 2 +- arch/arm/mach-pxa/cm-x2xx.c | 7 +- arch/arm/mach-pxa/cm-x300.c | 12 +- .../arm/mach-pxa/cm_x255-pcmcia.c | 2 +- .../arm/mach-pxa/cm_x270-pcmcia.c | 2 +- .../arm/mach-pxa/cm_x2xx-pcmcia.c | 2 +- arch/arm/mach-pxa/colibri-evalboard.c | 1 - .../arm/mach-pxa/colibri-pcmcia.c | 2 +- arch/arm/mach-pxa/colibri-pxa270-income.c | 1 - arch/arm/mach-pxa/colibri-pxa270.c | 2 +- arch/arm/mach-pxa/colibri-pxa300.c | 3 +- arch/arm/mach-pxa/colibri-pxa320.c | 2 +- arch/arm/mach-pxa/colibri-pxa3xx.c | 1 - arch/arm/mach-pxa/corgi.c | 23 ++- arch/arm/mach-pxa/{include/mach => }/corgi.h | 2 +- arch/arm/mach-pxa/corgi_pm.c | 3 +- arch/arm/mach-pxa/csb726.c | 3 +- arch/arm/mach-pxa/devices.c | 15 +- .../arm/mach-pxa/e740-pcmcia.c | 2 +- arch/arm/mach-pxa/em-x270.c | 2 +- arch/arm/mach-pxa/eseries.c | 34 +++- arch/arm/mach-pxa/ezx.c | 1 - arch/arm/mach-pxa/generic.c | 78 ++++++-- arch/arm/mach-pxa/generic.h | 9 - arch/arm/mach-pxa/gumstix.c | 1 - .../arm/mach-pxa/hx4700-pcmcia.c | 4 +- arch/arm/mach-pxa/hx4700.c | 18 +- arch/arm/mach-pxa/{include/mach => }/hx4700.h | 2 +- arch/arm/mach-pxa/idp.c | 2 - arch/arm/mach-pxa/include/mach/bitfield.h | 114 ----------- arch/arm/mach-pxa/include/mach/dma.h | 17 -- arch/arm/mach-pxa/include/mach/generic.h | 1 - arch/arm/mach-pxa/include/mach/mfp.h | 2 +- arch/arm/mach-pxa/include/mach/pxa-regs.h | 52 +++++ arch/arm/mach-pxa/include/mach/pxa2xx-regs.h | 47 +---- arch/arm/mach-pxa/include/mach/pxa3xx-regs.h | 71 +------ arch/arm/mach-pxa/include/mach/regs-ost.h | 4 +- arch/arm/mach-pxa/include/mach/reset.h | 2 +- arch/arm/mach-pxa/include/mach/tosa.h | 15 -- arch/arm/mach-pxa/irq.c | 3 +- arch/arm/mach-pxa/littleton.c | 1 - arch/arm/mach-pxa/lpd270.c | 4 +- arch/arm/mach-pxa/lubbock.c | 15 +- .../arm/mach-pxa/{include/mach => }/lubbock.h | 2 - arch/arm/mach-pxa/magician.c | 54 ++++- arch/arm/mach-pxa/mainstone.c | 15 +- .../mach-pxa/{include/mach => }/mainstone.h | 2 - arch/arm/mach-pxa/mfp-pxa2xx.c | 1 + arch/arm/mach-pxa/mfp-pxa2xx.h | 2 +- arch/arm/mach-pxa/mfp-pxa3xx.c | 1 - arch/arm/mach-pxa/mfp-pxa3xx.h | 2 +- arch/arm/mach-pxa/mioa701.c | 2 +- arch/arm/mach-pxa/mxm8x10.c | 8 +- arch/arm/mach-pxa/palm27x.c | 2 +- .../arm/mach-pxa/palmld-pcmcia.c | 5 +- arch/arm/mach-pxa/palmld.c | 23 ++- arch/arm/mach-pxa/{include/mach => }/palmld.h | 2 +- arch/arm/mach-pxa/palmt5.c | 11 +- .../arm/mach-pxa/palmtc-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtc.c | 4 +- arch/arm/mach-pxa/{include/mach => }/palmtc.h | 2 +- arch/arm/mach-pxa/palmte2.c | 2 +- arch/arm/mach-pxa/palmtreo.c | 2 +- .../arm/mach-pxa/palmtx-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtx.c | 13 +- arch/arm/mach-pxa/{include/mach => }/palmtx.h | 2 +- arch/arm/mach-pxa/palmz72.c | 2 +- .../it8152.c => mach-pxa/pci-it8152.c} | 25 ++- .../it8152.h => mach-pxa/pci-it8152.h} | 2 - arch/arm/mach-pxa/pcm990-baseboard.c | 2 +- arch/arm/mach-pxa/poodle.c | 31 ++- arch/arm/mach-pxa/{include/mach => }/poodle.h | 4 +- arch/arm/mach-pxa/pxa-regs.h | 1 + arch/arm/mach-pxa/pxa25x.c | 6 +- arch/arm/mach-pxa/pxa25x.h | 2 +- arch/arm/mach-pxa/pxa27x-udc.h | 2 + arch/arm/mach-pxa/pxa27x.c | 6 +- arch/arm/mach-pxa/pxa27x.h | 2 +- arch/arm/mach-pxa/pxa2xx.c | 1 - arch/arm/mach-pxa/pxa300.c | 1 + arch/arm/mach-pxa/pxa320.c | 1 + arch/arm/mach-pxa/pxa3xx-ulpi.c | 2 +- arch/arm/mach-pxa/pxa3xx.c | 11 +- arch/arm/mach-pxa/pxa3xx.h | 2 +- arch/arm/mach-pxa/pxa930.c | 1 + arch/arm/mach-pxa/regs-rtc.h | 2 +- arch/arm/mach-pxa/regs-u2d.h | 2 - .../mach-pxa/{include/mach => }/regs-uart.h | 2 + arch/arm/mach-pxa/reset.c | 3 - arch/arm/mach-pxa/sleep.S | 5 +- arch/arm/mach-pxa/smemc.c | 11 +- arch/arm/mach-pxa/spitz.c | 33 ++- arch/arm/mach-pxa/{include/mach => }/spitz.h | 2 +- arch/arm/mach-pxa/spitz_pm.c | 3 +- arch/arm/mach-pxa/standby.S | 1 - .../arm/mach-pxa/stargate2-pcmcia.c | 2 +- arch/arm/mach-pxa/tosa.c | 63 +++++- .../arm/mach-pxa/trizeps4-pcmcia.c | 4 +- arch/arm/mach-pxa/trizeps4.c | 4 +- .../mach-pxa/{include/mach => }/trizeps4.h | 3 +- .../arm/mach-pxa/viper-pcmcia.c | 6 +- .../arm/mach-pxa/viper-pcmcia.h | 0 arch/arm/mach-pxa/viper.c | 8 +- .../arm/mach-pxa/vpac270-pcmcia.c | 4 +- arch/arm/mach-pxa/vpac270.c | 4 +- .../arm/mach-pxa/{include/mach => }/vpac270.h | 0 arch/arm/mach-pxa/xcep.c | 2 +- arch/arm/mach-pxa/z2.c | 11 + arch/arm/mach-pxa/zeus.c | 6 +- arch/arm/mach-pxa/zylonite.c | 34 +++- arch/arm/mach-pxa/zylonite.h | 2 + arch/arm/mach-pxa/zylonite_pxa300.c | 1 + arch/arm/mach-pxa/zylonite_pxa320.c | 1 + arch/arm/mach-sa1100/generic.c | 6 +- arch/arm/mach-sa1100/include/mach/reset.h | 1 - drivers/ata/pata_palmld.c | 3 +- drivers/clk/pxa/clk-pxa.c | 8 +- drivers/clk/pxa/clk-pxa.h | 9 +- drivers/clk/pxa/clk-pxa25x.c | 46 ++--- drivers/clk/pxa/clk-pxa27x.c | 68 +++---- drivers/clk/pxa/clk-pxa3xx.c | 139 +++++++++++-- drivers/cpufreq/pxa2xx-cpufreq.c | 6 +- drivers/cpufreq/pxa3xx-cpufreq.c | 65 +++--- drivers/input/mouse/pxa930_trkball.c | 1 - drivers/input/touchscreen/Kconfig | 2 + drivers/input/touchscreen/mainstone-wm97xx.c | 123 ++++++------ drivers/input/touchscreen/zylonite-wm97xx.c | 34 ++-- drivers/leds/leds-locomo.c | 1 - drivers/mmc/host/pxamci.c | 2 +- drivers/mtd/maps/pxa2xx-flash.c | 2 - drivers/mtd/nand/raw/cmx270_nand.c | 89 +++------ drivers/pcmcia/Makefile | 16 -- drivers/pcmcia/pxa2xx_base.c | 48 ++--- drivers/pcmcia/pxa2xx_sharpsl.c | 3 +- drivers/pcmcia/sa1111_generic.c | 1 - drivers/pcmcia/sa1111_lubbock.c | 1 - drivers/pcmcia/soc_common.c | 2 - drivers/pcmcia/soc_common.h | 120 +---------- drivers/power/supply/tosa_battery.c | 189 ++++++++++-------- drivers/rtc/rtc-pxa.c | 2 - drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + .../arm/plat-pxa => drivers/soc/pxa}/Kconfig | 5 +- .../arm/plat-pxa => drivers/soc/pxa}/Makefile | 4 - {arch/arm/plat-pxa => drivers/soc/pxa}/mfp.c | 2 +- {arch/arm/plat-pxa => drivers/soc/pxa}/ssp.c | 0 drivers/usb/gadget/udc/pxa25x_udc.c | 37 ++-- drivers/usb/gadget/udc/pxa25x_udc.h | 7 +- drivers/usb/host/ohci-pxa27x.c | 3 +- drivers/video/backlight/tosa_bl.c | 10 +- drivers/video/backlight/tosa_bl.h | 8 + drivers/video/backlight/tosa_lcd.c | 28 ++- .../video/fbdev/pxa3xx-regs.h | 24 +-- drivers/video/fbdev/pxafb.c | 4 +- drivers/watchdog/sa1100_wdt.c | 88 +++++--- include/linux/clk/pxa.h | 16 ++ include/linux/platform_data/asoc-poodle.h | 16 ++ .../linux/platform_data/asoc-pxa.h | 4 +- include/linux/platform_data/video-pxafb.h | 22 +- .../hardware.h => include/linux/soc/pxa/cpu.h | 61 +----- .../plat => include/linux/soc/pxa}/mfp.h | 6 +- include/linux/soc/pxa/smemc.h | 13 ++ include/pcmcia/soc_common.h | 125 ++++++++++++ include/sound/pxa2xx-lib.h | 4 + sound/arm/pxa2xx-ac97-lib.c | 145 +++++++++----- .../arm/pxa2xx-ac97-regs.h | 42 ++-- sound/arm/pxa2xx-ac97.c | 3 +- sound/soc/pxa/corgi.c | 42 ++-- sound/soc/pxa/e740_wm9705.c | 37 ++-- sound/soc/pxa/e750_wm9705.c | 33 ++- sound/soc/pxa/e800_wm9712.c | 33 ++- sound/soc/pxa/em-x270.c | 2 +- sound/soc/pxa/hx4700.c | 34 ++-- sound/soc/pxa/magician.c | 141 ++++--------- sound/soc/pxa/mioa701_wm9713.c | 2 +- sound/soc/pxa/palm27x.c | 2 +- sound/soc/pxa/poodle.c | 51 ++--- sound/soc/pxa/pxa2xx-ac97.c | 24 ++- sound/soc/pxa/pxa2xx-i2s.c | 112 ++++++----- sound/soc/pxa/spitz.c | 58 +++--- sound/soc/pxa/tosa.c | 18 +- sound/soc/pxa/z2.c | 8 +- 205 files changed, 1916 insertions(+), 1795 deletions(-) delete mode 100644 arch/arm/mach-mmp/tavorevb.c rename arch/arm/mach-pxa/{include/mach => }/addr-map.h (100%) rename drivers/pcmcia/pxa2xx_balloon3.c => arch/arm/mach-pxa/balloon3-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/balloon3.h (99%) rename drivers/pcmcia/pxa2xx_cm_x255.c => arch/arm/mach-pxa/cm_x255-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_cm_x270.c => arch/arm/mach-pxa/cm_x270-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_cm_x2xx.c => arch/arm/mach-pxa/cm_x2xx-pcmcia.c (96%) rename drivers/pcmcia/pxa2xx_colibri.c => arch/arm/mach-pxa/colibri-pcmcia.c (99%) rename arch/arm/mach-pxa/{include/mach => }/corgi.h (98%) rename drivers/pcmcia/pxa2xx_e740.c => arch/arm/mach-pxa/e740-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_hx4700.c => arch/arm/mach-pxa/hx4700-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/hx4700.h (99%) delete mode 100644 arch/arm/mach-pxa/include/mach/bitfield.h delete mode 100644 arch/arm/mach-pxa/include/mach/dma.h delete mode 100644 arch/arm/mach-pxa/include/mach/generic.h create mode 100644 arch/arm/mach-pxa/include/mach/pxa-regs.h rename arch/arm/mach-pxa/{include/mach => }/lubbock.h (97%) rename arch/arm/mach-pxa/{include/mach => }/mainstone.h (99%) rename drivers/pcmcia/pxa2xx_palmld.c => arch/arm/mach-pxa/palmld-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmld.h (98%) rename drivers/pcmcia/pxa2xx_palmtc.c => arch/arm/mach-pxa/palmtc-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtc.h (98%) rename drivers/pcmcia/pxa2xx_palmtx.c => arch/arm/mach-pxa/palmtx-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtx.h (98%) rename arch/arm/{common/it8152.c => mach-pxa/pci-it8152.c} (95%) rename arch/arm/{include/asm/hardware/it8152.h => mach-pxa/pci-it8152.h} (98%) rename arch/arm/mach-pxa/{include/mach => }/poodle.h (97%) create mode 100644 arch/arm/mach-pxa/pxa-regs.h rename arch/arm/mach-pxa/{include/mach => }/regs-uart.h (99%) rename arch/arm/mach-pxa/{include/mach => }/spitz.h (99%) rename drivers/pcmcia/pxa2xx_stargate2.c => arch/arm/mach-pxa/stargate2-pcmcia.c (99%) rename drivers/pcmcia/pxa2xx_trizeps4.c => arch/arm/mach-pxa/trizeps4-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/trizeps4.h (98%) rename drivers/pcmcia/pxa2xx_viper.c => arch/arm/mach-pxa/viper-pcmcia.c (97%) rename include/linux/platform_data/pcmcia-pxa2xx_viper.h => arch/arm/mach-pxa/viper-pcmcia.h (100%) rename drivers/pcmcia/pxa2xx_vpac270.c => arch/arm/mach-pxa/vpac270-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/vpac270.h (100%) rename {arch/arm/plat-pxa => drivers/soc/pxa}/Kconfig (83%) rename {arch/arm/plat-pxa => drivers/soc/pxa}/Makefile (51%) rename {arch/arm/plat-pxa => drivers/soc/pxa}/mfp.c (99%) rename {arch/arm/plat-pxa => drivers/soc/pxa}/ssp.c (100%) create mode 100644 drivers/video/backlight/tosa_bl.h rename arch/arm/mach-pxa/include/mach/regs-lcd.h => drivers/video/fbdev/pxa3xx-regs.h (90%) create mode 100644 include/linux/clk/pxa.h create mode 100644 include/linux/platform_data/asoc-poodle.h rename arch/arm/mach-pxa/include/mach/audio.h => include/linux/platform_data/asoc-pxa.h (93%) rename arch/arm/mach-pxa/include/mach/hardware.h => include/linux/soc/pxa/cpu.h (75%) rename {arch/arm/plat-pxa/include/plat => include/linux/soc/pxa}/mfp.h (98%) create mode 100644 include/linux/soc/pxa/smemc.h create mode 100644 include/pcmcia/soc_common.h rename arch/arm/mach-pxa/include/mach/regs-ac97.h => sound/arm/pxa2xx-ac97-regs.h (71%)
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 Cc: Viresh Kumar viresh.kumar@linaro.org Cc: Dmitry Torokhov dmitry.torokhov@gmail.com Cc: Jacek Anaszewski jacek.anaszewski@gmail.com Cc: Pavel Machek pavel@ucw.cz Cc: Ulf Hansson ulf.hansson@linaro.org Cc: Dominik Brodowski linux@dominikbrodowski.net Cc: Alexandre Belloni alexandre.belloni@bootlin.com Cc: Greg Kroah-Hartman gregkh@linuxfoundation.org Cc: Guenter Roeck linux@roeck-us.net Cc: 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 --- arch/arm/common/locomo.c | 1 - arch/arm/common/sa1111.c | 5 +- arch/arm/mach-pxa/cm-x2xx.c | 2 + arch/arm/mach-pxa/cm-x300.c | 2 + arch/arm/mach-pxa/colibri-evalboard.c | 1 - arch/arm/mach-pxa/colibri-pxa270-income.c | 1 - arch/arm/mach-pxa/colibri-pxa300.c | 1 + arch/arm/mach-pxa/colibri-pxa3xx.c | 1 - arch/arm/mach-pxa/corgi.c | 1 - arch/arm/mach-pxa/corgi_pm.c | 1 - arch/arm/mach-pxa/csb726.c | 1 + arch/arm/mach-pxa/devices.c | 2 +- arch/arm/mach-pxa/ezx.c | 1 - arch/arm/mach-pxa/generic.c | 3 +- arch/arm/mach-pxa/gumstix.c | 1 - arch/arm/mach-pxa/hx4700.c | 2 +- arch/arm/mach-pxa/idp.c | 1 - arch/arm/mach-pxa/include/mach/pxa-regs.h | 52 ++++++++++++++++ arch/arm/mach-pxa/include/mach/pxa2xx-regs.h | 2 +- arch/arm/mach-pxa/include/mach/pxa3xx-regs.h | 2 +- arch/arm/mach-pxa/include/mach/regs-ac97.h | 2 +- arch/arm/mach-pxa/include/mach/regs-ost.h | 2 +- arch/arm/mach-pxa/include/mach/trizeps4.h | 1 + arch/arm/mach-pxa/irq.c | 3 +- arch/arm/mach-pxa/littleton.c | 1 - arch/arm/mach-pxa/lpd270.c | 2 +- arch/arm/mach-pxa/lubbock.c | 1 - arch/arm/mach-pxa/magician.c | 2 +- arch/arm/mach-pxa/mainstone.c | 2 +- arch/arm/mach-pxa/mfp-pxa2xx.c | 1 + arch/arm/mach-pxa/mfp-pxa3xx.c | 1 - arch/arm/mach-pxa/poodle.c | 1 - arch/arm/mach-pxa/pxa-regs.h | 1 + arch/arm/mach-pxa/pxa25x.c | 3 +- arch/arm/mach-pxa/pxa25x.h | 2 +- arch/arm/mach-pxa/pxa27x-udc.h | 2 + arch/arm/mach-pxa/pxa27x.c | 3 +- arch/arm/mach-pxa/pxa27x.h | 2 +- arch/arm/mach-pxa/pxa2xx.c | 1 - arch/arm/mach-pxa/pxa300.c | 1 + arch/arm/mach-pxa/pxa320.c | 1 + arch/arm/mach-pxa/pxa3xx-ulpi.c | 2 +- arch/arm/mach-pxa/pxa3xx.c | 3 +- arch/arm/mach-pxa/pxa3xx.h | 2 +- arch/arm/mach-pxa/pxa930.c | 1 + arch/arm/mach-pxa/regs-rtc.h | 2 +- arch/arm/mach-pxa/regs-uart.h | 2 + arch/arm/mach-pxa/sleep.S | 1 - arch/arm/mach-pxa/smemc.c | 2 +- arch/arm/mach-pxa/spitz_pm.c | 1 - arch/arm/mach-pxa/standby.S | 1 - arch/arm/mach-pxa/xcep.c | 2 +- arch/arm/mach-pxa/zylonite.c | 1 + arch/arm/mach-pxa/zylonite.h | 2 + arch/arm/mach-pxa/zylonite_pxa300.c | 1 + arch/arm/mach-pxa/zylonite_pxa320.c | 1 + drivers/clk/pxa/clk-pxa3xx.c | 1 + drivers/cpufreq/pxa2xx-cpufreq.c | 1 + drivers/cpufreq/pxa3xx-cpufreq.c | 1 + drivers/input/mouse/pxa930_trkball.c | 1 - drivers/input/touchscreen/zylonite-wm97xx.c | 2 +- drivers/leds/leds-locomo.c | 1 - drivers/mmc/host/pxamci.c | 2 +- drivers/mtd/maps/pxa2xx-flash.c | 2 - drivers/mtd/nand/raw/cmx270_nand.c | 3 +- drivers/pcmcia/pxa2xx_base.c | 2 +- drivers/pcmcia/pxa2xx_cm_x2xx.c | 2 +- drivers/pcmcia/pxa2xx_sharpsl.c | 1 - drivers/pcmcia/sa1111_generic.c | 1 - drivers/pcmcia/sa1111_lubbock.c | 1 - drivers/pcmcia/soc_common.c | 2 - drivers/rtc/rtc-pxa.c | 2 - drivers/usb/host/ohci-pxa27x.c | 3 +- drivers/video/fbdev/pxafb.c | 2 +- drivers/watchdog/sa1100_wdt.c | 1 - .../hardware.h => include/linux/soc/pxa/cpu.h | 61 ++----------------- sound/arm/pxa2xx-ac97-lib.c | 1 + sound/soc/pxa/pxa2xx-ac97.c | 2 +- sound/soc/pxa/pxa2xx-i2s.c | 2 +- sound/soc/pxa/z2.c | 1 - 80 files changed, 121 insertions(+), 119 deletions(-) create mode 100644 arch/arm/mach-pxa/include/mach/pxa-regs.h create mode 100644 arch/arm/mach-pxa/pxa-regs.h rename arch/arm/mach-pxa/include/mach/hardware.h => include/linux/soc/pxa/cpu.h (75%)
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 62f241b09fe3..fd9157121406 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -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>
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 947ef7981d92..e2829af69f96 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -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) diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index ff976d1217eb..c731539add9f 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c @@ -14,6 +14,7 @@
#include <linux/dm9000.h> #include <linux/leds.h> +#include <linux/soc/pxa/cpu.h>
#include <asm/mach/arch.h> #include <asm/mach-types.h> @@ -32,6 +33,7 @@ #undef GPIO88_GPIO #undef GPIO89_GPIO #include <mach/audio.h> +#include <mach/addr-map.h> #include <linux/platform_data/video-pxafb.h> #include <mach/smemc.h>
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 425855f456f2..f3f2703fffc6 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -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> diff --git a/arch/arm/mach-pxa/colibri-evalboard.c b/arch/arm/mach-pxa/colibri-evalboard.c index b9c173ede891..b62af07b8f96 100644 --- a/arch/arm/mach-pxa/colibri-evalboard.c +++ b/arch/arm/mach-pxa/colibri-evalboard.c @@ -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> diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c index dbad2f13706c..957dc9ad4873 100644 --- a/arch/arm/mach-pxa/colibri-pxa270-income.c +++ b/arch/arm/mach-pxa/colibri-pxa270-income.c @@ -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" diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c index 82052dfd96b6..4ceeea142bfd 100644 --- a/arch/arm/mach-pxa/colibri-pxa300.c +++ b/arch/arm/mach-pxa/colibri-pxa300.c @@ -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> diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c index 3cead80a2b37..701dfef930eb 100644 --- a/arch/arm/mach-pxa/colibri-pxa3xx.c +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c @@ -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> diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index f2d73289230f..e9743ebbee86 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -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> diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c index 092dcb9fced5..ff1ac9bf37cb 100644 --- a/arch/arm/mach-pxa/corgi_pm.c +++ b/arch/arm/mach-pxa/corgi_pm.c @@ -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> diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c index 98fcdc6e2944..d48493445ae5 100644 --- a/arch/arm/mach-pxa/csb726.c +++ b/arch/arm/mach-pxa/csb726.c @@ -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> diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 524d6093e0c7..c289a6c2311d 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -8,6 +8,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> @@ -19,7 +20,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>
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index ec10851b63cf..a77c5988a446 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c @@ -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>
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index ab7cdffd7ea8..3c3cd90bb9b4 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -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> diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c index 4b4589cf431f..b50080d55fa4 100644 --- a/arch/arm/mach-pxa/gumstix.c +++ b/arch/arm/mach-pxa/gumstix.c @@ -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>
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 311268d186ab..4dce8834c5b6 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -37,11 +37,11 @@ #include <linux/usb/gpio_vbus.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>
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index fb0850af8496..57c0511472bc 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c @@ -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> diff --git a/arch/arm/mach-pxa/include/mach/pxa-regs.h b/arch/arm/mach-pxa/include/mach/pxa-regs.h new file mode 100644 index 000000000000..ba5120c06b8a --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/pxa-regs.h @@ -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 diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h index fa121e135915..f68b573ab4a0 100644 --- a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h +++ b/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h @@ -11,7 +11,7 @@ #ifndef __PXA2XX_REGS_H #define __PXA2XX_REGS_H
-#include <mach/hardware.h> +#include "pxa-regs.h"
/* * Power Manager diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h index 070f6c74196e..8eb1ba533e1c 100644 --- a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h +++ b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h @@ -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) diff --git a/arch/arm/mach-pxa/include/mach/regs-ac97.h b/arch/arm/mach-pxa/include/mach/regs-ac97.h index 1db96fd4df32..ec09b9635e25 100644 --- a/arch/arm/mach-pxa/include/mach/regs-ac97.h +++ b/arch/arm/mach-pxa/include/mach/regs-ac97.h @@ -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 diff --git a/arch/arm/mach-pxa/include/mach/regs-ost.h b/arch/arm/mach-pxa/include/mach/regs-ost.h index deb564ed8ee7..109d0ed264df 100644 --- a/arch/arm/mach-pxa/include/mach/regs-ost.h +++ b/arch/arm/mach-pxa/include/mach/regs-ost.h @@ -2,7 +2,7 @@ #ifndef __ASM_MACH_REGS_OST_H #define __ASM_MACH_REGS_OST_H
-#include <mach/hardware.h> +#include "pxa-regs.h"
/* * OS Timer & Match Registers diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/include/mach/trizeps4.h index 3cddb1428c5e..27926629f9c6 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/include/mach/trizeps4.h @@ -11,6 +11,7 @@ #ifndef _TRIPEPS4_H_ #define _TRIPEPS4_H_
+#include <mach/addr-map.h> #include "irqs.h" /* PXA_GPIO_TO_IRQ */
/* physical memory regions */ diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 74efc3ab595f..f25c30e8a834 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -17,13 +17,14 @@ #include <linux/irq.h> #include <linux/of_address.h> #include <linux/of_irq.h> +#include <linux/soc/pxa/cpu.h>
#include <asm/exception.h>
-#include <mach/hardware.h> #include <mach/irqs.h>
#include "generic.h" +#include "pxa-regs.h"
#define ICIP (0x000) #define ICMR (0x004) diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 793f61375ee8..7486056e6cce 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c @@ -31,7 +31,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> diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 20e00e970385..1b7c2def3033 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c @@ -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>
@@ -39,6 +38,7 @@
#include "pxa27x.h" #include "lpd270.h" +#include <mach/addr-map.h> #include <mach/audio.h> #include <linux/platform_data/video-pxafb.h> #include <linux/platform_data/mmc-pxamci.h> diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 742d18a1f7dc..477d144f039c 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c @@ -34,7 +34,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>
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index e1a394ac3eea..ce4c677be868 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -30,12 +30,12 @@ #include <linux/usb/gpio_vbus.h> #include <linux/platform_data/i2c-pxa.h>
-#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/system_info.h>
#include "pxa27x.h" +#include <mach/addr-map.h> #include <mach/magician.h> #include <linux/platform_data/video-pxafb.h> #include <linux/platform_data/mmc-pxamci.h> diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index ef79417ca001..16883c996c45 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c @@ -35,7 +35,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>
@@ -52,6 +51,7 @@ #include <linux/platform_data/irda-pxaficp.h> #include <linux/platform_data/usb-ohci-pxa27x.h> #include <linux/platform_data/keypad-pxa27x.h> +#include <mach/addr-map.h> #include <mach/smemc.h>
#include "generic.h" diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index 6a5451b186c2..6bc7206fd2ac 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c @@ -16,6 +16,7 @@ #include <linux/init.h> #include <linux/io.h> #include <linux/syscore_ops.h> +#include <linux/soc/pxa/cpu.h>
#include <mach/pxa2xx-regs.h> #include "mfp-pxa2xx.h" diff --git a/arch/arm/mach-pxa/mfp-pxa3xx.c b/arch/arm/mach-pxa/mfp-pxa3xx.c index 56114df9700d..f26b5e5412cf 100644 --- a/arch/arm/mach-pxa/mfp-pxa3xx.c +++ b/arch/arm/mach-pxa/mfp-pxa3xx.c @@ -16,7 +16,6 @@ #include <linux/io.h> #include <linux/syscore_ops.h>
-#include <mach/hardware.h> #include "mfp-pxa3xx.h" #include <mach/pxa3xx-regs.h>
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 3a4ecc3c8f8b..8dd791ee49bf 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c @@ -30,7 +30,6 @@ #include <linux/mtd/sharpsl.h> #include <linux/memblock.h>
-#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/irq.h> #include <asm/setup.h> diff --git a/arch/arm/mach-pxa/pxa-regs.h b/arch/arm/mach-pxa/pxa-regs.h new file mode 100644 index 000000000000..584d2ac592cc --- /dev/null +++ b/arch/arm/mach-pxa/pxa-regs.h @@ -0,0 +1 @@ +#include <mach/pxa-regs.h> diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 0d25cc45f825..305047ebd2f1 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -26,14 +26,15 @@ #include <linux/irq.h> #include <linux/irqchip.h> #include <linux/platform_data/mmp_dma.h> +#include <linux/soc/pxa/cpu.h>
#include <asm/mach/map.h> #include <asm/suspend.h> -#include <mach/hardware.h> #include <mach/irqs.h> #include "pxa25x.h" #include <mach/reset.h> #include "pm.h" +#include <mach/addr-map.h> #include <mach/smemc.h>
#include "generic.h" diff --git a/arch/arm/mach-pxa/pxa25x.h b/arch/arm/mach-pxa/pxa25x.h index b58d0fbdb4db..403bc16c2ed2 100644 --- a/arch/arm/mach-pxa/pxa25x.h +++ b/arch/arm/mach-pxa/pxa25x.h @@ -2,7 +2,7 @@ #ifndef __MACH_PXA25x_H #define __MACH_PXA25x_H
-#include <mach/hardware.h> +#include <mach/addr-map.h> #include <mach/pxa2xx-regs.h> #include "mfp-pxa25x.h" #include <mach/irqs.h> diff --git a/arch/arm/mach-pxa/pxa27x-udc.h b/arch/arm/mach-pxa/pxa27x-udc.h index faf73804697f..2d3df3b1cb68 100644 --- a/arch/arm/mach-pxa/pxa27x-udc.h +++ b/arch/arm/mach-pxa/pxa27x-udc.h @@ -2,6 +2,8 @@ #ifndef _ASM_ARCH_PXA27X_UDC_H #define _ASM_ARCH_PXA27X_UDC_H
+#include "pxa-regs.h" + #ifdef _ASM_ARCH_PXA25X_UDC_H #error You cannot include both PXA25x and PXA27x UDC support #endif diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index f7e89831e85b..a81ac88ecbfd 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -23,9 +23,9 @@ #include <linux/irq.h> #include <linux/platform_data/i2c-pxa.h> #include <linux/platform_data/mmp_dma.h> +#include <linux/soc/pxa/cpu.h>
#include <asm/mach/map.h> -#include <mach/hardware.h> #include <asm/irq.h> #include <asm/suspend.h> #include <mach/irqs.h> @@ -33,6 +33,7 @@ #include <mach/reset.h> #include <linux/platform_data/usb-ohci-pxa27x.h> #include "pm.h" +#include <mach/addr-map.h> #include <mach/smemc.h>
#include "generic.h" diff --git a/arch/arm/mach-pxa/pxa27x.h b/arch/arm/mach-pxa/pxa27x.h index abdc02fb4f03..6c99090647d2 100644 --- a/arch/arm/mach-pxa/pxa27x.h +++ b/arch/arm/mach-pxa/pxa27x.h @@ -3,7 +3,7 @@ #define __MACH_PXA27x_H
#include <linux/suspend.h> -#include <mach/hardware.h> +#include <mach/addr-map.h> #include <mach/pxa2xx-regs.h> #include "mfp-pxa27x.h" #include <mach/irqs.h> diff --git a/arch/arm/mach-pxa/pxa2xx.c b/arch/arm/mach-pxa/pxa2xx.c index 2d26cd2afbf3..ac72acb43e26 100644 --- a/arch/arm/mach-pxa/pxa2xx.c +++ b/arch/arm/mach-pxa/pxa2xx.c @@ -12,7 +12,6 @@ #include <linux/device.h> #include <linux/io.h>
-#include <mach/hardware.h> #include <mach/pxa2xx-regs.h> #include "mfp-pxa25x.h" #include <mach/reset.h> diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c index 7f2f5a6a2263..f77ec118d5b9 100644 --- a/arch/arm/mach-pxa/pxa300.c +++ b/arch/arm/mach-pxa/pxa300.c @@ -14,6 +14,7 @@ #include <linux/kernel.h> #include <linux/platform_device.h> #include <linux/io.h> +#include <linux/soc/pxa/cpu.h>
#include "pxa300.h"
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c index 78abcc741df7..e372e6c118de 100644 --- a/arch/arm/mach-pxa/pxa320.c +++ b/arch/arm/mach-pxa/pxa320.c @@ -14,6 +14,7 @@ #include <linux/kernel.h> #include <linux/platform_device.h> #include <linux/io.h> +#include <linux/soc/pxa/cpu.h>
#include "pxa320.h"
diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c index 4bd7da1f8657..c29a7f0fa1b0 100644 --- a/arch/arm/mach-pxa/pxa3xx-ulpi.c +++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c @@ -21,8 +21,8 @@ #include <linux/clk.h> #include <linux/usb.h> #include <linux/usb/otg.h> +#include <linux/soc/pxa/cpu.h>
-#include <mach/hardware.h> #include "regs-u2d.h" #include <linux/platform_data/usb-pxa3xx-ulpi.h>
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 6eb1c24d7395..fc84aed99481 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -24,14 +24,15 @@ #include <linux/syscore_ops.h> #include <linux/platform_data/i2c-pxa.h> #include <linux/platform_data/mmp_dma.h> +#include <linux/soc/pxa/cpu.h>
#include <asm/mach/map.h> #include <asm/suspend.h> -#include <mach/hardware.h> #include <mach/pxa3xx-regs.h> #include <mach/reset.h> #include <linux/platform_data/usb-ohci-pxa27x.h> #include "pm.h" +#include <mach/addr-map.h> #include <mach/smemc.h> #include <mach/irqs.h>
diff --git a/arch/arm/mach-pxa/pxa3xx.h b/arch/arm/mach-pxa/pxa3xx.h index 6d4502aa9d06..22ace053ea25 100644 --- a/arch/arm/mach-pxa/pxa3xx.h +++ b/arch/arm/mach-pxa/pxa3xx.h @@ -2,7 +2,7 @@ #ifndef __MACH_PXA3XX_H #define __MACH_PXA3XX_H
-#include <mach/hardware.h> +#include <mach/addr-map.h> #include <mach/pxa3xx-regs.h> #include <mach/irqs.h>
diff --git a/arch/arm/mach-pxa/pxa930.c b/arch/arm/mach-pxa/pxa930.c index bf91de4267e5..b9021a40cbd1 100644 --- a/arch/arm/mach-pxa/pxa930.c +++ b/arch/arm/mach-pxa/pxa930.c @@ -13,6 +13,7 @@ #include <linux/irq.h> #include <linux/gpio-pxa.h> #include <linux/platform_device.h> +#include <linux/soc/pxa/cpu.h>
#include "pxa930.h"
diff --git a/arch/arm/mach-pxa/regs-rtc.h b/arch/arm/mach-pxa/regs-rtc.h index b1f9ff14e335..96255a0f595e 100644 --- a/arch/arm/mach-pxa/regs-rtc.h +++ b/arch/arm/mach-pxa/regs-rtc.h @@ -2,7 +2,7 @@ #ifndef __ASM_MACH_REGS_RTC_H #define __ASM_MACH_REGS_RTC_H
-#include <mach/hardware.h> +#include "pxa-regs.h"
/* * Real Time Clock diff --git a/arch/arm/mach-pxa/regs-uart.h b/arch/arm/mach-pxa/regs-uart.h index 9a168f83afeb..490e9ca16297 100644 --- a/arch/arm/mach-pxa/regs-uart.h +++ b/arch/arm/mach-pxa/regs-uart.h @@ -2,6 +2,8 @@ #ifndef __ASM_ARCH_REGS_UART_H #define __ASM_ARCH_REGS_UART_H
+#include "pxa-regs.h" + /* * UARTs */ diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S index 6c5b3ffd2cd3..272efeb954f4 100644 --- a/arch/arm/mach-pxa/sleep.S +++ b/arch/arm/mach-pxa/sleep.S @@ -13,7 +13,6 @@
#include <linux/linkage.h> #include <asm/assembler.h> -#include <mach/hardware.h> #include <mach/smemc.h> #include <mach/pxa2xx-regs.h>
diff --git a/arch/arm/mach-pxa/smemc.c b/arch/arm/mach-pxa/smemc.c index 32e82cc92ea5..47b99549d616 100644 --- a/arch/arm/mach-pxa/smemc.c +++ b/arch/arm/mach-pxa/smemc.c @@ -8,8 +8,8 @@ #include <linux/init.h> #include <linux/io.h> #include <linux/syscore_ops.h> +#include <linux/soc/pxa/cpu.h>
-#include <mach/hardware.h> #include <mach/smemc.h>
#ifdef CONFIG_PM diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 25a1f8c5a738..201dabe883b6 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c @@ -18,7 +18,6 @@
#include <asm/irq.h> #include <asm/mach-types.h> -#include <mach/hardware.h>
#include <mach/spitz.h> #include "pxa27x.h" diff --git a/arch/arm/mach-pxa/standby.S b/arch/arm/mach-pxa/standby.S index eab1645bb4ad..626fecdefb1c 100644 --- a/arch/arm/mach-pxa/standby.S +++ b/arch/arm/mach-pxa/standby.S @@ -11,7 +11,6 @@
#include <linux/linkage.h> #include <asm/assembler.h> -#include <mach/hardware.h>
#include <mach/pxa2xx-regs.h>
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c index f485146b899f..e6ab428287ae 100644 --- a/arch/arm/mach-pxa/xcep.c +++ b/arch/arm/mach-pxa/xcep.c @@ -24,8 +24,8 @@ #include <asm/mach/irq.h> #include <asm/mach/map.h>
-#include <mach/hardware.h> #include "pxa25x.h" +#include <mach/addr-map.h> #include <mach/smemc.h>
#include "generic.h" diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index bf2ab5bd49ec..c56c86b35025 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c @@ -20,6 +20,7 @@ #include <linux/pwm.h> #include <linux/pwm_backlight.h> #include <linux/smc91x.h> +#include <linux/soc/pxa/cpu.h>
#include <asm/mach-types.h> #include <asm/mach/arch.h> diff --git a/arch/arm/mach-pxa/zylonite.h b/arch/arm/mach-pxa/zylonite.h index 7300ec2aac0d..afe3efcb8e04 100644 --- a/arch/arm/mach-pxa/zylonite.h +++ b/arch/arm/mach-pxa/zylonite.h @@ -2,6 +2,8 @@ #ifndef __ASM_ARCH_ZYLONITE_H #define __ASM_ARCH_ZYLONITE_H
+#include <linux/soc/pxa/cpu.h> + #define ZYLONITE_ETH_PHYS 0x14000000
#define EXT_GPIO(x) (128 + (x)) diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c index 956fec1c4940..50a8a3547dbc 100644 --- a/arch/arm/mach-pxa/zylonite_pxa300.c +++ b/arch/arm/mach-pxa/zylonite_pxa300.c @@ -17,6 +17,7 @@ #include <linux/platform_data/i2c-pxa.h> #include <linux/platform_data/pca953x.h> #include <linux/gpio.h> +#include <linux/soc/pxa/cpu.h>
#include "pxa300.h" #include "devices.h" diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c index 94cb834f36cd..67cab4f1194b 100644 --- a/arch/arm/mach-pxa/zylonite_pxa320.c +++ b/arch/arm/mach-pxa/zylonite_pxa320.c @@ -14,6 +14,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/gpio.h> +#include <linux/soc/pxa/cpu.h>
#include "pxa320.h" #include "zylonite.h" diff --git a/drivers/clk/pxa/clk-pxa3xx.c b/drivers/clk/pxa/clk-pxa3xx.c index 60db92772e72..027b78183565 100644 --- a/drivers/clk/pxa/clk-pxa3xx.c +++ b/drivers/clk/pxa/clk-pxa3xx.c @@ -14,6 +14,7 @@ #include <linux/clk-provider.h> #include <linux/clkdev.h> #include <linux/of.h> +#include <linux/soc/pxa/cpu.h> #include <mach/smemc.h> #include <mach/pxa3xx-regs.h>
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index f0b6f52eb2c3..0f0e676ff781 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -24,6 +24,7 @@ #include <linux/cpufreq.h> #include <linux/err.h> #include <linux/regulator/consumer.h> +#include <linux/soc/pxa/cpu.h> #include <linux/io.h>
#include <mach/pxa2xx-regs.h> diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index 32f993c94675..d3b398b4aa6a 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -8,6 +8,7 @@ #include <linux/sched.h> #include <linux/init.h> #include <linux/cpufreq.h> +#include <linux/soc/pxa/cpu.h> #include <linux/slab.h> #include <linux/io.h>
diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c index 41acde60b60f..fb04c851aaa7 100644 --- a/drivers/input/mouse/pxa930_trkball.c +++ b/drivers/input/mouse/pxa930_trkball.c @@ -15,7 +15,6 @@ #include <linux/io.h> #include <linux/slab.h>
-#include <mach/hardware.h> #include <linux/platform_data/mouse-pxa930_trkball.h>
/* Trackball Controller Register Definitions */ diff --git a/drivers/input/touchscreen/zylonite-wm97xx.c b/drivers/input/touchscreen/zylonite-wm97xx.c index 0f4ac7f844ce..f57bdf083188 100644 --- a/drivers/input/touchscreen/zylonite-wm97xx.c +++ b/drivers/input/touchscreen/zylonite-wm97xx.c @@ -21,9 +21,9 @@ #include <linux/irq.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/soc/pxa/cpu.h> #include <linux/wm97xx.h>
-#include <mach/hardware.h> #include <mach/mfp.h> #include <mach/regs-ac97.h>
diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c index 42dc46e3f00f..9aa3fccd71fb 100644 --- a/drivers/leds/leds-locomo.c +++ b/drivers/leds/leds-locomo.c @@ -11,7 +11,6 @@ #include <linux/device.h> #include <linux/leds.h>
-#include <mach/hardware.h> #include <asm/hardware/locomo.h>
static void locomoled_brightness_set(struct led_classdev *led_cdev, diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 024acc1b0a2e..26740966ca76 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -31,10 +31,10 @@ #include <linux/gfp.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/soc/pxa/cpu.h>
#include <linux/sizes.h>
-#include <mach/hardware.h> #include <linux/platform_data/mmc-pxamci.h>
#include "pxamci.h" diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index 7d96758a8f04..1749dbbacc13 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c @@ -16,8 +16,6 @@ #include <linux/mtd/partitions.h>
#include <asm/io.h> -#include <mach/hardware.h> - #include <asm/mach/flash.h>
#define CACHELINESIZE 32 diff --git a/drivers/mtd/nand/raw/cmx270_nand.c b/drivers/mtd/nand/raw/cmx270_nand.c index 045b6175ae79..7af3d0bdcdb8 100644 --- a/drivers/mtd/nand/raw/cmx270_nand.c +++ b/drivers/mtd/nand/raw/cmx270_nand.c @@ -17,12 +17,13 @@ #include <linux/slab.h> #include <linux/gpio.h> #include <linux/module.h> +#include <linux/soc/pxa/cpu.h>
#include <asm/io.h> #include <asm/irq.h> #include <asm/mach-types.h>
-#include <mach/pxa2xx-regs.h> +#include <mach/addr-map.h>
#define GPIO_NAND_CS (11) #define GPIO_NAND_RB (89) diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index d6d2f75f8f47..7cd1375d6087 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c @@ -23,8 +23,8 @@ #include <linux/kernel.h> #include <linux/spinlock.h> #include <linux/platform_device.h> +#include <linux/soc/pxa/cpu.h>
-#include <mach/hardware.h> #include <mach/smemc.h> #include <asm/io.h> #include <asm/irq.h> diff --git a/drivers/pcmcia/pxa2xx_cm_x2xx.c b/drivers/pcmcia/pxa2xx_cm_x2xx.c index 14eae238131d..8c5040e55e24 100644 --- a/drivers/pcmcia/pxa2xx_cm_x2xx.c +++ b/drivers/pcmcia/pxa2xx_cm_x2xx.c @@ -7,9 +7,9 @@ */
#include <linux/module.h> +#include <linux/soc/pxa/cpu.h>
#include <asm/mach-types.h> -#include <mach/hardware.h>
int cmx255_pcmcia_init(void); int cmx270_pcmcia_init(void); diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 5fdd25a9e28e..66fe1d1af12a 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -15,7 +15,6 @@ #include <linux/platform_device.h>
#include <asm/mach-types.h> -#include <mach/hardware.h> #include <asm/irq.h> #include <asm/hardware/scoop.h>
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index 11783410223b..2f556fa37c43 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c @@ -17,7 +17,6 @@
#include <pcmcia/ss.h>
-#include <mach/hardware.h> #include <asm/hardware/sa1111.h> #include <asm/mach-types.h> #include <asm/irq.h> diff --git a/drivers/pcmcia/sa1111_lubbock.c b/drivers/pcmcia/sa1111_lubbock.c index 7feb8d61c639..f1b5160cb8fa 100644 --- a/drivers/pcmcia/sa1111_lubbock.c +++ b/drivers/pcmcia/sa1111_lubbock.c @@ -17,7 +17,6 @@ #include <linux/init.h> #include <linux/delay.h>
-#include <mach/hardware.h> #include <asm/hardware/sa1111.h> #include <asm/mach-types.h>
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 3a8c84bb174d..9276a628473d 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -47,8 +47,6 @@ #include <linux/spinlock.h> #include <linux/timer.h>
-#include <mach/hardware.h> - #include "soc_common.h"
static irqreturn_t soc_common_pcmcia_interrupt(int irq, void *dev); diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index d2f1d8f754bf..ea5da3edacd8 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c @@ -16,8 +16,6 @@ #include <linux/of.h> #include <linux/of_device.h>
-#include <mach/hardware.h> - #include "rtc-sa1100.h"
#define RTC_DEF_DIVIDER (32768 - 1) diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 7679fb583e41..0dfe9b7c02e2 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -36,8 +36,7 @@ #include <linux/usb.h> #include <linux/usb/hcd.h> #include <linux/usb/otg.h> - -#include <mach/hardware.h> +#include <linux/soc/pxa/cpu.h>
#include "ohci.h"
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index f70c9f79622e..ece691a0f18a 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -57,10 +57,10 @@ #include <linux/console.h> #include <linux/of_graph.h> #include <linux/regulator/consumer.h> +#include <linux/soc/pxa/cpu.h> #include <video/of_display_timing.h> #include <video/videomode.h>
-#include <mach/hardware.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/div64.h> diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c index cbd8c957182f..0f6ffc1e7f4e 100644 --- a/drivers/watchdog/sa1100_wdt.c +++ b/drivers/watchdog/sa1100_wdt.c @@ -35,7 +35,6 @@ #endif
#include <mach/reset.h> -#include <mach/hardware.h>
static unsigned long oscr_freq; static unsigned long sa1100wdt_users; diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/include/linux/soc/pxa/cpu.h similarity index 75% rename from arch/arm/mach-pxa/include/mach/hardware.h rename to include/linux/soc/pxa/cpu.h index ee7eab16135f..5782450ee45c 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/include/linux/soc/pxa/cpu.h @@ -1,61 +1,16 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * arch/arm/mach-pxa/include/mach/hardware.h - * * Author: Nicolas Pitre * Created: Jun 15, 2001 * Copyright: MontaVista Software Inc. */
-#ifndef __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -#include <mach/addr-map.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 - -#ifndef __ASSEMBLY__ +#ifndef __SOC_PXA_CPU_H +#define __SOC_PXA_CPU_H
+#ifdef CONFIG_ARM #include <asm/cputype.h> +#endif
/* * CPU Stepping CPU_ID JTAG_ID @@ -294,12 +249,4 @@ __cpu_is_pxa93x(read_cpuid_id()); \ })
- -/* - * return current memory and LCD clock frequency in units of 10kHz - */ -extern unsigned int get_memclk_frequency_10khz(void); - #endif - -#endif /* _ASM_ARCH_HARDWARE_H */ diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 58274b4a1f09..84d5f85073b9 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c @@ -17,6 +17,7 @@ #include <linux/io.h> #include <linux/gpio.h> #include <linux/of_gpio.h> +#include <linux/soc/pxa/cpu.h>
#include <sound/pxa2xx-lib.h>
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index bf28187315db..eb99e01ee26f 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c @@ -21,7 +21,7 @@ #include <sound/pxa2xx-lib.h> #include <sound/dmaengine_pcm.h>
-#include <mach/hardware.h> +#include <mach/pxa-regs.h> #include <mach/regs-ac97.h> #include <mach/audio.h>
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 9f7fb7335ac0..e7c43fe46dff 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c @@ -21,7 +21,7 @@ #include <sound/pxa2xx-lib.h> #include <sound/dmaengine_pcm.h>
-#include <mach/hardware.h> +#include <mach/pxa-regs.h> #include <mach/audio.h>
#include "pxa2xx-i2s.h" diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c index f9a33cb36f5b..8f121ca13eee 100644 --- a/sound/soc/pxa/z2.c +++ b/sound/soc/pxa/z2.c @@ -21,7 +21,6 @@ #include <sound/jack.h>
#include <asm/mach-types.h> -#include <mach/hardware.h> #include <mach/audio.h> #include <mach/z2.h>
On 18-10-19, 17:41, Arnd Bergmann wrote:
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 Cc: Viresh Kumar viresh.kumar@linaro.org Cc: Dmitry Torokhov dmitry.torokhov@gmail.com Cc: Jacek Anaszewski jacek.anaszewski@gmail.com Cc: Pavel Machek pavel@ucw.cz Cc: Ulf Hansson ulf.hansson@linaro.org Cc: Dominik Brodowski linux@dominikbrodowski.net Cc: Alexandre Belloni alexandre.belloni@bootlin.com Cc: Greg Kroah-Hartman gregkh@linuxfoundation.org Cc: Guenter Roeck linux@roeck-us.net Cc: 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
drivers/cpufreq/pxa2xx-cpufreq.c | 1 + drivers/cpufreq/pxa3xx-cpufreq.c | 1 +
Acked-by: Viresh Kumar viresh.kumar@linaro.org
On Fri, Oct 18, 2019 at 05:41:20PM +0200, Arnd Bergmann wrote:
The mach/hardware.h is included in lots of places, and it provides three different things on pxa:
Acked-by: Mark Brown broonie@kernel.org
Quoting Arnd Bergmann (2019-10-18 08:41:20)
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 Cc: Viresh Kumar viresh.kumar@linaro.org Cc: Dmitry Torokhov dmitry.torokhov@gmail.com Cc: Jacek Anaszewski jacek.anaszewski@gmail.com Cc: Pavel Machek pavel@ucw.cz Cc: Ulf Hansson ulf.hansson@linaro.org Cc: Dominik Brodowski linux@dominikbrodowski.net Cc: Alexandre Belloni alexandre.belloni@bootlin.com Cc: Greg Kroah-Hartman gregkh@linuxfoundation.org Cc: Guenter Roeck linux@roeck-us.net Cc: 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
Acked-by: Stephen Boyd sboyd@kernel.org
There are two identical copies of mach/bitfield.h, one for mach-sa1100 and one for mach-pxa. The pxafb driver only makes use of two macros, which can be trivially open-coded in the header.
Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Signed-off-by: Arnd Bergmann arnd@arndb.de --- arch/arm/mach-pxa/idp.c | 1 - arch/arm/mach-pxa/include/mach/regs-lcd.h | 5 +++-- arch/arm/mach-pxa/regs-u2d.h | 2 -- drivers/video/fbdev/pxafb.c | 1 - 4 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 57c0511472bc..525d01ddfbbb 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c @@ -30,7 +30,6 @@ #include "pxa25x.h" #include "idp.h" #include <linux/platform_data/video-pxafb.h> -#include <mach/bitfield.h> #include <linux/platform_data/mmc-pxamci.h> #include <linux/smc91x.h>
diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/arch/arm/mach-pxa/include/mach/regs-lcd.h index e2b6e3d1f625..6a434675f84a 100644 --- a/arch/arm/mach-pxa/include/mach/regs-lcd.h +++ b/arch/arm/mach-pxa/include/mach/regs-lcd.h @@ -2,8 +2,6 @@ #ifndef __ASM_ARCH_REGS_LCD_H #define __ASM_ARCH_REGS_LCD_H
-#include <mach/bitfield.h> - /* * LCD Controller Registers and Bits Definitions */ @@ -86,6 +84,9 @@ #define LCCR0_OUC (1 << 25) /* Overlay Underlay control bit */ #define LCCR0_LDDALT (1 << 26) /* LDD alternate mapping control */
+#define Fld(Size, Shft) (((Size) << 16) + (Shft)) +#define FShft(Field) ((Field) & 0x0000FFFF) + #define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */ #define LCCR1_DisWdth(Pixel) (((Pixel) - 1) << FShft (LCCR1_PPL))
diff --git a/arch/arm/mach-pxa/regs-u2d.h b/arch/arm/mach-pxa/regs-u2d.h index fe4c80ad87ec..ab517ba62c9a 100644 --- a/arch/arm/mach-pxa/regs-u2d.h +++ b/arch/arm/mach-pxa/regs-u2d.h @@ -2,8 +2,6 @@ #ifndef __ASM_ARCH_PXA3xx_U2D_H #define __ASM_ARCH_PXA3xx_U2D_H
-#include <mach/bitfield.h> - /* * USB2 device controller registers and bits definitions */ diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index ece691a0f18a..e68b8a69db92 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -64,7 +64,6 @@ #include <asm/io.h> #include <asm/irq.h> #include <asm/div64.h> -#include <mach/bitfield.h> #include <linux/platform_data/video-pxafb.h>
/*
On 10/18/19 5:41 PM, Arnd Bergmann wrote:
There are two identical copies of mach/bitfield.h, one for mach-sa1100 and one for mach-pxa. The pxafb driver only makes use of two macros, which can be trivially open-coded in the header.
Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Signed-off-by: Arnd Bergmann arnd@arndb.de
Acked-by: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com
Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics
arch/arm/mach-pxa/idp.c | 1 - arch/arm/mach-pxa/include/mach/regs-lcd.h | 5 +++-- arch/arm/mach-pxa/regs-u2d.h | 2 -- drivers/video/fbdev/pxafb.c | 1 - 4 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 57c0511472bc..525d01ddfbbb 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c @@ -30,7 +30,6 @@ #include "pxa25x.h" #include "idp.h" #include <linux/platform_data/video-pxafb.h> -#include <mach/bitfield.h> #include <linux/platform_data/mmc-pxamci.h> #include <linux/smc91x.h>
diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/arch/arm/mach-pxa/include/mach/regs-lcd.h index e2b6e3d1f625..6a434675f84a 100644 --- a/arch/arm/mach-pxa/include/mach/regs-lcd.h +++ b/arch/arm/mach-pxa/include/mach/regs-lcd.h @@ -2,8 +2,6 @@ #ifndef __ASM_ARCH_REGS_LCD_H #define __ASM_ARCH_REGS_LCD_H
-#include <mach/bitfield.h>
/*
- LCD Controller Registers and Bits Definitions
*/ @@ -86,6 +84,9 @@ #define LCCR0_OUC (1 << 25) /* Overlay Underlay control bit */ #define LCCR0_LDDALT (1 << 26) /* LDD alternate mapping control */
+#define Fld(Size, Shft) (((Size) << 16) + (Shft)) +#define FShft(Field) ((Field) & 0x0000FFFF)
#define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */ #define LCCR1_DisWdth(Pixel) (((Pixel) - 1) << FShft (LCCR1_PPL))
diff --git a/arch/arm/mach-pxa/regs-u2d.h b/arch/arm/mach-pxa/regs-u2d.h index fe4c80ad87ec..ab517ba62c9a 100644 --- a/arch/arm/mach-pxa/regs-u2d.h +++ b/arch/arm/mach-pxa/regs-u2d.h @@ -2,8 +2,6 @@ #ifndef __ASM_ARCH_PXA3xx_U2D_H #define __ASM_ARCH_PXA3xx_U2D_H
-#include <mach/bitfield.h>
/*
- USB2 device controller registers and bits definitions
*/ diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index ece691a0f18a..e68b8a69db92 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -64,7 +64,6 @@ #include <asm/io.h> #include <asm/irq.h> #include <asm/div64.h> -#include <mach/bitfield.h> #include <linux/platform_data/video-pxafb.h>
/*
Only the pxafb driver uses this header, so move it into the same directory. The SMART_* macros are required by some platform data definitions and can go into the linux/platform_data/video-pxafb.h header.
Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann arnd@arndb.de --- .../video/fbdev/pxa3xx-regs.h | 19 ---------------- drivers/video/fbdev/pxafb.c | 1 + include/linux/platform_data/video-pxafb.h | 22 ++++++++++++++++++- 3 files changed, 22 insertions(+), 20 deletions(-) rename arch/arm/mach-pxa/include/mach/regs-lcd.h => drivers/video/fbdev/pxa3xx-regs.h (90%)
diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/drivers/video/fbdev/pxa3xx-regs.h similarity index 90% rename from arch/arm/mach-pxa/include/mach/regs-lcd.h rename to drivers/video/fbdev/pxa3xx-regs.h index 6a434675f84a..6a96610ef9b5 100644 --- a/arch/arm/mach-pxa/include/mach/regs-lcd.h +++ b/drivers/video/fbdev/pxa3xx-regs.h @@ -177,23 +177,4 @@ #define PRSR_ST_OK (1 << 9) /* Status OK */ #define PRSR_CON_NT (1 << 10) /* Continue to Next Command */
-#define SMART_CMD_A0 (0x1 << 8) -#define SMART_CMD_READ_STATUS_REG (0x0 << 9) -#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0) -#define SMART_CMD_WRITE_COMMAND (0x1 << 9) -#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0) -#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0) -#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9) -#define SMART_CMD_NOOP (0x4 << 9) -#define SMART_CMD_INTERRUPT (0x5 << 9) - -#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) -#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff)) - -/* SMART_DELAY() is introduced for software controlled delay primitive which - * can be inserted between command sequences, unused command 0x6 is used here - * and delay ranges from 0ms ~ 255ms - */ -#define SMART_CMD_DELAY (0x6 << 9) -#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff)) #endif /* __ASM_ARCH_REGS_LCD_H */ diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index e68b8a69db92..a65453c6c390 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -72,6 +72,7 @@ #define DEBUG_VAR 1
#include "pxafb.h" +#include "pxa3xx-regs.h"
/* Bits which should not be set in machine configuration structures */ #define LCCR0_INVALID_CONFIG_MASK (LCCR0_OUM | LCCR0_BM | LCCR0_QDM |\ diff --git a/include/linux/platform_data/video-pxafb.h b/include/linux/platform_data/video-pxafb.h index b3d574778326..6333bac166a5 100644 --- a/include/linux/platform_data/video-pxafb.h +++ b/include/linux/platform_data/video-pxafb.h @@ -8,7 +8,6 @@ */
#include <linux/fb.h> -#include <mach/regs-lcd.h>
/* * Supported LCD connections @@ -153,6 +152,27 @@ struct pxafb_mach_info { void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); unsigned long pxafb_get_hsync_time(struct device *dev);
+/* smartpanel related */ +#define SMART_CMD_A0 (0x1 << 8) +#define SMART_CMD_READ_STATUS_REG (0x0 << 9) +#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0) +#define SMART_CMD_WRITE_COMMAND (0x1 << 9) +#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0) +#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0) +#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9) +#define SMART_CMD_NOOP (0x4 << 9) +#define SMART_CMD_INTERRUPT (0x5 << 9) + +#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) +#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff)) + +/* SMART_DELAY() is introduced for software controlled delay primitive which + * can be inserted between command sequences, unused command 0x6 is used here + * and delay ranges from 0ms ~ 255ms + */ +#define SMART_CMD_DELAY (0x6 << 9) +#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff)) + #ifdef CONFIG_FB_PXA_SMARTPANEL extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); extern int pxafb_smart_flush(struct fb_info *info);
On 10/18/19 5:41 PM, Arnd Bergmann wrote:
Only the pxafb driver uses this header, so move it into the same directory. The SMART_* macros are required by some platform data definitions and can go into the linux/platform_data/video-pxafb.h header.
Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann arnd@arndb.de
Acked-by: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com
Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics
.../video/fbdev/pxa3xx-regs.h | 19 ---------------- drivers/video/fbdev/pxafb.c | 1 + include/linux/platform_data/video-pxafb.h | 22 ++++++++++++++++++- 3 files changed, 22 insertions(+), 20 deletions(-) rename arch/arm/mach-pxa/include/mach/regs-lcd.h => drivers/video/fbdev/pxa3xx-regs.h (90%)
diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/drivers/video/fbdev/pxa3xx-regs.h similarity index 90% rename from arch/arm/mach-pxa/include/mach/regs-lcd.h rename to drivers/video/fbdev/pxa3xx-regs.h index 6a434675f84a..6a96610ef9b5 100644 --- a/arch/arm/mach-pxa/include/mach/regs-lcd.h +++ b/drivers/video/fbdev/pxa3xx-regs.h @@ -177,23 +177,4 @@ #define PRSR_ST_OK (1 << 9) /* Status OK */ #define PRSR_CON_NT (1 << 10) /* Continue to Next Command */
-#define SMART_CMD_A0 (0x1 << 8) -#define SMART_CMD_READ_STATUS_REG (0x0 << 9) -#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0) -#define SMART_CMD_WRITE_COMMAND (0x1 << 9) -#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0) -#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0) -#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9) -#define SMART_CMD_NOOP (0x4 << 9) -#define SMART_CMD_INTERRUPT (0x5 << 9)
-#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) -#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
-/* SMART_DELAY() is introduced for software controlled delay primitive which
- can be inserted between command sequences, unused command 0x6 is used here
- and delay ranges from 0ms ~ 255ms
- */
-#define SMART_CMD_DELAY (0x6 << 9) -#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff)) #endif /* __ASM_ARCH_REGS_LCD_H */ diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index e68b8a69db92..a65453c6c390 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -72,6 +72,7 @@ #define DEBUG_VAR 1
#include "pxafb.h" +#include "pxa3xx-regs.h"
/* Bits which should not be set in machine configuration structures */ #define LCCR0_INVALID_CONFIG_MASK (LCCR0_OUM | LCCR0_BM | LCCR0_QDM |\ diff --git a/include/linux/platform_data/video-pxafb.h b/include/linux/platform_data/video-pxafb.h index b3d574778326..6333bac166a5 100644 --- a/include/linux/platform_data/video-pxafb.h +++ b/include/linux/platform_data/video-pxafb.h @@ -8,7 +8,6 @@ */
#include <linux/fb.h> -#include <mach/regs-lcd.h>
/*
- Supported LCD connections
@@ -153,6 +152,27 @@ struct pxafb_mach_info { void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); unsigned long pxafb_get_hsync_time(struct device *dev);
+/* smartpanel related */ +#define SMART_CMD_A0 (0x1 << 8) +#define SMART_CMD_READ_STATUS_REG (0x0 << 9) +#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0) +#define SMART_CMD_WRITE_COMMAND (0x1 << 9) +#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0) +#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0) +#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9) +#define SMART_CMD_NOOP (0x4 << 9) +#define SMART_CMD_INTERRUPT (0x5 << 9)
+#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) +#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
+/* SMART_DELAY() is introduced for software controlled delay primitive which
- can be inserted between command sequences, unused command 0x6 is used here
- and delay ranges from 0ms ~ 255ms
- */
+#define SMART_CMD_DELAY (0x6 << 9) +#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff))
#ifdef CONFIG_FB_PXA_SMARTPANEL extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); extern int pxafb_smart_flush(struct fb_info *info);
The driver should not require a machine specific header. Change it to pass the gpio line through a lookup table, and move the timing generator definitions into the drivers itself.
Cc: Lee Jones lee.jones@linaro.org Cc: Daniel Thompson daniel.thompson@linaro.org Cc: Jingoo Han jingoohan1@gmail.com Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann arnd@arndb.de
--- I'm not overly confident that I got the correct device names for the lookup table, it would be good if someone could double-check. --- arch/arm/mach-pxa/include/mach/tosa.h | 15 -------------- arch/arm/mach-pxa/tosa.c | 22 +++++++++++++++++++++ drivers/video/backlight/tosa_bl.c | 10 +++++----- drivers/video/backlight/tosa_bl.h | 8 ++++++++ drivers/video/backlight/tosa_lcd.c | 28 ++++++++++++++++++++------- 5 files changed, 56 insertions(+), 27 deletions(-) create mode 100644 drivers/video/backlight/tosa_bl.h
diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h index a499ed17931e..8bfaca3a8b64 100644 --- a/arch/arm/mach-pxa/include/mach/tosa.h +++ b/arch/arm/mach-pxa/include/mach/tosa.h @@ -72,18 +72,6 @@ #define TOSA_GPIO_BAT0_TH_ON (TOSA_TC6393XB_GPIO_BASE + 14) #define TOSA_GPIO_BAT1_TH_ON (TOSA_TC6393XB_GPIO_BASE + 15)
-/* - * Timing Generator - */ -#define TG_PNLCTL 0x00 -#define TG_TPOSCTL 0x01 -#define TG_DUTYCTL 0x02 -#define TG_GPOSR 0x03 -#define TG_GPODR1 0x04 -#define TG_GPODR2 0x05 -#define TG_PINICTL 0x06 -#define TG_HPOSCTL 0x07 - /* * PXA GPIOs */ @@ -192,7 +180,4 @@ #define TOSA_KEY_MAIL KEY_MAIL #endif
-struct spi_device; -extern int tosa_bl_enable(struct spi_device *spi, int enable); - #endif /* _ASM_ARCH_TOSA_H_ */ diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 9a7f1e42adac..8329a2969b2b 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -813,6 +813,26 @@ static struct pxa2xx_spi_controller pxa_ssp_master_info = { .num_chipselect = 1, };
+static struct gpiod_lookup_table tosa_lcd_gpio_table = { + .dev_id = "spi2.0", + .table = { + GPIO_LOOKUP("tc6393xb", + TOSA_GPIO_TG_ON - TOSA_TC6393XB_GPIO_BASE, + "tg #pwr", GPIO_ACTIVE_HIGH), + { }, + }, +}; + +static struct gpiod_lookup_table tosa_lcd_bl_gpio_table = { + .dev_id = "i2c-tosa-bl", + .table = { + GPIO_LOOKUP("tc6393xb", + TOSA_GPIO_BL_C20MA - TOSA_TC6393XB_GPIO_BASE, + "backlight", GPIO_ACTIVE_HIGH), + { }, + }, +}; + static struct spi_board_info spi_board_info[] __initdata = { { .modalias = "tosa-lcd", @@ -935,6 +955,8 @@ static void __init tosa_init(void) platform_scoop_config = &tosa_pcmcia_config;
pxa2xx_set_spi_info(2, &pxa_ssp_master_info); + gpiod_add_lookup_table(&tosa_lcd_gpio_table); + gpiod_add_lookup_table(&tosa_lcd_bl_gpio_table); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL); diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c index 1275e815bd86..cff5e96fd988 100644 --- a/drivers/video/backlight/tosa_bl.c +++ b/drivers/video/backlight/tosa_bl.c @@ -18,7 +18,7 @@
#include <asm/mach/sharpsl_param.h>
-#include <mach/tosa.h> +#include "tosa_bl.h"
#define COMADJ_DEFAULT 97
@@ -28,6 +28,7 @@ struct tosa_bl_data { struct i2c_client *i2c; struct backlight_device *bl; + struct gpio_desc *gpio;
int comadj; }; @@ -42,7 +43,7 @@ static void tosa_bl_set_backlight(struct tosa_bl_data *data, int brightness) i2c_smbus_write_byte_data(data->i2c, DAC_CH2, (u8)(brightness & 0xff));
/* SetBacklightVR */ - gpio_set_value(TOSA_GPIO_BL_C20MA, brightness & 0x100); + gpiod_set_value(data->gpio, brightness & 0x100);
tosa_bl_enable(spi, brightness); } @@ -87,9 +88,8 @@ static int tosa_bl_probe(struct i2c_client *client, return -ENOMEM;
data->comadj = sharpsl_param.comadj == -1 ? COMADJ_DEFAULT : sharpsl_param.comadj; - - ret = devm_gpio_request_one(&client->dev, TOSA_GPIO_BL_C20MA, - GPIOF_OUT_INIT_LOW, "backlight"); + data->gpio = devm_gpiod_get(&client->dev, "backlight", GPIOD_OUT_LOW); + ret = PTR_ERR_OR_ZERO(data->gpio); if (ret) { dev_dbg(&data->bl->dev, "Unable to request gpio!\n"); return ret; diff --git a/drivers/video/backlight/tosa_bl.h b/drivers/video/backlight/tosa_bl.h new file mode 100644 index 000000000000..589e17e6fdb2 --- /dev/null +++ b/drivers/video/backlight/tosa_bl.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _TOSA_BL_H +#define _TOSA_BL_H + +struct spi_device; +extern int tosa_bl_enable(struct spi_device *spi, int enable); + +#endif diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c index 29af8e27b6e5..e8ab583e5098 100644 --- a/drivers/video/backlight/tosa_lcd.c +++ b/drivers/video/backlight/tosa_lcd.c @@ -19,7 +19,7 @@
#include <asm/mach/sharpsl_param.h>
-#include <mach/tosa.h> +#include "tosa_bl.h"
#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
@@ -28,12 +28,26 @@ #define TG_REG0_UD 0x0004 #define TG_REG0_LR 0x0008
+/* + * Timing Generator + */ +#define TG_PNLCTL 0x00 +#define TG_TPOSCTL 0x01 +#define TG_DUTYCTL 0x02 +#define TG_GPOSR 0x03 +#define TG_GPODR1 0x04 +#define TG_GPODR2 0x05 +#define TG_PINICTL 0x06 +#define TG_HPOSCTL 0x07 + + #define DAC_BASE 0x4e
struct tosa_lcd_data { struct spi_device *spi; struct lcd_device *lcd; struct i2c_client *i2c; + struct gpio_desc *gpiod_tg;
int lcd_power; bool is_vga; @@ -66,7 +80,7 @@ EXPORT_SYMBOL(tosa_bl_enable); static void tosa_lcd_tg_init(struct tosa_lcd_data *data) { /* TG on */ - gpio_set_value(TOSA_GPIO_TG_ON, 0); + gpiod_set_value(data->gpiod_tg, 0);
mdelay(60);
@@ -100,6 +114,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data) */ struct i2c_adapter *adap = i2c_get_adapter(0); struct i2c_board_info info = { + .dev_name = "tosa-bl", .type = "tosa-bl", .addr = DAC_BASE, .platform_data = data->spi, @@ -121,7 +136,7 @@ static void tosa_lcd_tg_off(struct tosa_lcd_data *data) mdelay(50);
/* TG Off */ - gpio_set_value(TOSA_GPIO_TG_ON, 1); + gpiod_set_value(data->gpiod_tg, 1); mdelay(100); }
@@ -191,10 +206,9 @@ static int tosa_lcd_probe(struct spi_device *spi) data->spi = spi; spi_set_drvdata(spi, data);
- ret = devm_gpio_request_one(&spi->dev, TOSA_GPIO_TG_ON, - GPIOF_OUT_INIT_LOW, "tg #pwr"); - if (ret < 0) - return ret; + data->gpiod_tg = devm_gpiod_get(&spi->dev, "tg #pwr", GPIOD_OUT_LOW); + if (IS_ERR(data->gpiod_tg)) + return PTR_ERR(data->gpiod_tg);
mdelay(60);
Arnd Bergmann arnd@arndb.de writes:
The driver should not require a machine specific header. Change it to pass the gpio line through a lookup table, and move the timing generator definitions into the drivers itself.
Cc: Lee Jones lee.jones@linaro.org Cc: Daniel Thompson daniel.thompson@linaro.org Cc: Jingoo Han jingoohan1@gmail.com Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann arnd@arndb.de
I'm not overly confident that I got the correct device names for the lookup table, it would be good if someone could double-check.
Ah the I2C and SPI devices querrying GPIOs ... unless someone does an actual test, this will probably be very regression prone ...
Anyway : Acked-by: Robert Jarzmik robert.jarzmik@free.fr
Cheers.
-- Robert
On Fri, Oct 18, 2019 at 5:43 PM Arnd Bergmann arnd@arndb.de wrote:
The driver should not require a machine specific header. Change it to pass the gpio line through a lookup table, and move the timing generator definitions into the drivers itself.
Cc: Lee Jones lee.jones@linaro.org Cc: Daniel Thompson daniel.thompson@linaro.org Cc: Jingoo Han jingoohan1@gmail.com Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann arnd@arndb.de
I'm not overly confident that I got the correct device names for the lookup table, it would be good if someone could double-check.
You're anyway doing more than required for the people who may or may not be using this platform. Brokenness can surely be fixed later, it's not like we are taking down the entire Amazon cloud or something.
Reviewed-by: Linus Walleij linus.walleij@linaro.org
Yours, Linus Walleij
On Tue, Nov 05, 2019 at 11:04:44AM +0100, Linus Walleij wrote:
On Fri, Oct 18, 2019 at 5:43 PM Arnd Bergmann arnd@arndb.de wrote:
The driver should not require a machine specific header. Change it to pass the gpio line through a lookup table, and move the timing generator definitions into the drivers itself.
Cc: Lee Jones lee.jones@linaro.org Cc: Daniel Thompson daniel.thompson@linaro.org Cc: Jingoo Han jingoohan1@gmail.com Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann arnd@arndb.de
I'm not overly confident that I got the correct device names for the lookup table, it would be good if someone could double-check.
You're anyway doing more than required for the people who may or may not be using this platform. Brokenness can surely be fixed later, it's not like we are taking down the entire Amazon cloud or something.
Reviewed-by: Linus Walleij linus.walleij@linaro.org
Same here. I read, I did't see anything wrong but I can't test.
Reviewed-by: Daniel Thompson daniel.thompson@linaro.org
Daniel.
On Fri, 18 Oct 2019, Arnd Bergmann wrote:
The driver should not require a machine specific header. Change it to pass the gpio line through a lookup table, and move the timing generator definitions into the drivers itself.
Cc: Lee Jones lee.jones@linaro.org Cc: Daniel Thompson daniel.thompson@linaro.org Cc: Jingoo Han jingoohan1@gmail.com Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann arnd@arndb.de
I'm not overly confident that I got the correct device names for the lookup table, it would be good if someone could double-check.
arch/arm/mach-pxa/include/mach/tosa.h | 15 -------------- arch/arm/mach-pxa/tosa.c | 22 +++++++++++++++++++++ drivers/video/backlight/tosa_bl.c | 10 +++++----- drivers/video/backlight/tosa_bl.h | 8 ++++++++ drivers/video/backlight/tosa_lcd.c | 28 ++++++++++++++++++++------- 5 files changed, 56 insertions(+), 27 deletions(-) create mode 100644 drivers/video/backlight/tosa_bl.h
Applied, thanks.
dri-devel@lists.freedesktop.org