aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-08-06Merge tag 'mfd-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfdLinus Torvalds2-6/+2
Pull MFD updates from Lee Jones: "Core Framework: - Change maintainer email address - Use acpi_dev_for_each_child() helper to walk the ACPI list New Device Support: - BCM2711 RPiVid ASB in Broadcom BCM2835 - MT8195 dual-core RISC-V MCU in Chrome OS Embedded Controller - Regulator, RTC and Keys in MediaTek MT6357 PMIC - GPIO in X-Powers AXP20x PMIC - MT6331 and MT6332 in MediaTek MT6357 PMIC - Intel Meteor Lake-P PCI in Intel LPSS PCI New Functionality: - Add support for non-ACPI platforms; lpc_ich Fix-ups: - Use platform data instead of hard-coded values; bcm2835-pm - Make use of BIT/GENMASK macros; intel_soc_pmic_bxtwc - Use dev_err_probe() helper; intel_soc_pmic_chtwc, intel_soc_pmic_bxtwc - Use provided generic APIs / helpers; lpc_ich - Clean-up .remove() return values; asic3, t7l66xb, tc6387xb, tc6393xb - Use correct formatting specifiers; syscon - Replace sprintf() with sysfs_emit(); intel_soc_pmic_bxtwc - Automatically detect and fill USB endpoint pointers; dln2 - Use more appropriate dev/platform/spi resources APIs; intel_soc_pmic_bxtwc - Make use of pm_sleep_ptr(); intel_soc_pmic_chtwc, intel_soc_pmic_bxtwc - Improve error handling; intel_soc_pmic_bxtwc - Use core driver API to create groups; intel_soc_pmic_bxtwc - Kconfig fix-ups; MFD_SUN6I_PRCM - Admin: whitespace/email addresses/etc; max77714, db8500-prcmu, ipaq-micro, intel_soc_pmic_bxtwc - Remove duplicate/unused code/functionality; lpc_ich, twl-core, qcom-pm8008, intel_soc_pmic_bxtwc - DT fix-ups / conversions; da9063, ti,j721e-system-controller, st,stm32-timers, mt6397, qcom,tcsr, mps,mp2629, qcom-pm8xxx, fsl,imx8qxp-csr Bug Fixes: - Fix of_node reference leak; max77620" * tag 'mfd-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (49 commits) dt-bindings: mfd: stm32-timers: Move fixed string node names under 'properties' dt-bindings: mfd: st,stm32-timers: Correct 'resets' property name dt-bindings: mfd: syscon: Update Lee Jones' email address MAINTAINERS: Use Lee Jones' kernel.org address for Syscon submissions MAINTAINERS: Use Lee Jones' kernel.org address for MFD submissions mfd: sun6i-prcm: Update Kconfig description mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment mfd: intel_soc_pmic_bxtwc: Drop unneeded casting mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf() mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR() mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device mfd: intel_soc_pmic_bxtwc: Use dev_err_probe() mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata() mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() mfd: intel-lpss: Add Intel Meteor Lake-P PCI IDs mfd: mt6397: Add basic support for MT6331+MT6332 PMIC mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells ...
2022-08-04Merge tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdxLinus Torvalds2-10/+3
Pull SPDX updates from Greg KH: "Here is the set of SPDX comment updates for 6.0-rc1. Nothing huge here, just a number of updated SPDX license tags and cleanups based on the review of a number of common patterns in GPLv2 boilerplate text. Also included in here are a few other minor updates, two USB files, and one Documentation file update to get the SPDX lines correct. All of these have been in the linux-next tree for a very long time" * tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (28 commits) Documentation: samsung-s3c24xx: Add blank line after SPDX directive x86/crypto: Remove stray comment terminator treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_406.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_398.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_391.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_319.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_298.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_179.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1) treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_160.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_152.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_147.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_133.RULE ...
2022-08-02Merge tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/socLinus Torvalds1-0/+53
Pull ARM boardfile deprecation from Arnd Bergmann: "Over the past ten years, new machine support was based on device tree, and an initial set of about 400 boards using ATAGS with boardfile for booting were grandfathered in, with about half of them either removed or converted to DT over time. Based on the recent mailing list discussion I started, I have now turned the findings into a set of patches that marks most board files as 'depends on UNUSED_BOARD_FILES', leaving only 38 of the 196 boards. For the boards that are marked as unused, there are two final chances for potential users: The removal is scheduled to take place after the longterm stable kernel at the end of 2022, so users can stay on that version for another few years, and if anyone still has one of these machines and is planning to keep updating kernels beyond that version, they can speak up now to have their boards taken off the list again. Waiting for the LTS release also makes sure that there will be at least one longterm kernel that contains the recent multiplatform conversion along while still supporting all legacy boards. The short summary of the current status is: - The s3c24xx, cns3xxx, iop32x and mv78xx0 platforms have no known users and will be removed entirely. - The mmp and davinci platforms have DT support for the important machines and will become DT-only after this. - s3c64xx, dove, orion5x, and pxa keep some board files to allow those to be migrated over to DT more easily, but most board files are getting removed now. DT support on these platforms is partially working but requires changes to additional drivers for the other boards. - omap1, ep93xx, sa1100, footbridge and rpc have no DT support at the moment but have some boards with known users. Removing the board files that nobody uses should make it easier to try a DT conversion if anyone cares. There is no explicit timeline what happens with the boards that remain after this removal, but I expect to revisit this in the future, and with most boards gone, there will be a good time to do a treewide review of platform drivers that never gained DT support and have no remaining in-tree board files" Link: https://lore.kernel.org/linux-arm-kernel/CAK8P3a0Z9vGEQbVRBo84bSyPFM-LF+hs5w8ZA51g2Z+NsdtDQA@mail.gmail.com/ * tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: cns3xxx: add CONFIG_UNUSED_BOARD_FILES dependency ARM: iop32x: mark as unused ARM: s3c: mark most board files as unused ARM: omap1: add Kconfig dependencies for unused boards ARM: sa1100: mark most boards as unused ARM: footbridge: mark cats board for removal ARM: mmp: mark all board files for removal ARM: ep93xx: mark most board files as unused ARM: davinci: mark all ATAGS board files as unused ARM: orion: add ATAGS dependencies ARM: pxa: add Kconfig dependencies for ATAGS based boards ARM: add CONFIG_UNUSED_BOARD_FILES ARM: add ATAGS dependencies to non-DT platforms
2022-07-22ARM: pxa2xx: Fix GPIO descriptor tablesLinus Walleij7-9/+9
Laurence reports: "Kernel >5.18 on Zaurus has a bug where the power management code can't talk to devices, emitting the following errors: sharpsl-pm sharpsl-pm: Error: AC check failed: voltage -22. sharpsl-pm sharpsl-pm: Charging Error! sharpsl-pm sharpsl-pm: Warning: Cannot read main battery! Looking at the recent changes, I found that commit 31455bbda208 ("spi: pxa2xx_spi: Convert to use GPIO descriptors") replaced the deprecated SPI chip select platform device code with a gpiod lookup table. However, this didn't seem to work until I changed the `dev_id` member from the device name to the bus id. I'm not entirely sure why this is necessary, but I suspect it is related to the fact that in sysfs SPI devices are attached under /sys/devices/.../dev_name/spi_master/spiB/spiB.C, rather than directly to the device." After reviewing the change I conclude that the same fix is needed for all affected boards. Fixes: 31455bbda208 ("spi: pxa2xx_spi: Convert to use GPIO descriptors") Reported-by: Laurence de Bruxelles <lfdebrux@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220722114611.1517414-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-22ARM: pxa: add Kconfig dependencies for ATAGS based boardsArnd Bergmann1-0/+53
Most of the traditional board files are no longer used by anyone and will be removed next year, while the DT based machine support remains. Adding a CONFIG_ATAGS dependency around all the board files means that they now actaully get disabled when ATAGS support is left out, and the individual boards that have no known users are marked as depending on CONFIG_UNUSED_BOARD_FILES, with the plan to remove them in early 2023 unless someone else shows interest. Laurence de Bruxelles intends to work on converting the Spitz/Akita/Borzoi family of Sharp Zaurus SL machines to DT, to make that easier those remain for the moment. In addition, the "Gumstix" machine is the one that is supported in qemu with 256MB of RAM, which makes it particularly nice for testing, I'm leaving it in hoping that someone can take care of converting it to DT as well. Finally, Marc Zyngier is still able to test the Zeus and Viper machines, so these could be saved as well if anyone wants to conver them to DT. This seems less likely, so I'm marking them as unused for the time being. For the defconfig files, both the pxa3xx_defconfig and pxa_defconfig now only enable the boards that are not marked as unused, while all the other ones explicitly enable CONFIG_UNUSED_BOARD_FILES to still allow building the kernels. Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Daniel Mack <daniel@zonque.org> Cc: Laurence de Bruxelles <lfdebrux@gmail.com> Acked-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-19mfd: tc6393xb: Make disable callback return voidUwe Kleine-König2-5/+2
All implementations return 0, so simplify accordingly. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220619082655.53728-1-u.kleine-koenig@pengutronix.de
2022-07-19mfd: tc6387xb: Drop disable callback that is never calledUwe Kleine-König1-1/+0
The driver never calls the disable callback, so drop the member from the platform struct and all callbacks from the actual platform datas. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220530192430.2108217-4-u.kleine-koenig@pengutronix.de
2022-06-10treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1)Thomas Gleixner2-10/+3
Based on the normalized pattern: this file is licensed under the terms of the gnu general public license version 2 this program is licensed as is without any warranty of any kind whether express or implied extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal <allison@lohutok.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-02Merge tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/socLinus Torvalds132-1287/+2106
Pull more ARM multiplatform updates from Arnd Bergmann: "The second part of the multiplatform changes now converts the Intel/Marvell PXA platform along with the rest. The patches went through several rebases before the merge window as bugs were found, so they remained separate. This has to touch a lot of drivers, in particular the touchscreen, pcmcia, sound and clk bits, to detach the driver files from the platform and board specific header files" * tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (48 commits) ARM: pxa/mmp: remove traces of plat-pxa ARM: pxa: convert to multiplatform ARM: pxa/sa1100: move I/O space to PCI_IOBASE ARM: pxa: remove support for MTD_XIP ARM: pxa: move mach/*.h to mach-pxa/ ARM: PXA: fix multi-cpu build of xsc3 ARM: pxa: move plat-pxa to drivers/soc/ ARM: mmp: rename pxa_register_device ARM: mmp: remove tavorevb board support ARM: pxa: remove unused mach/bitfield.h ARM: pxa: move clk register definitions to driver ARM: pxa: move smemc register access from clk to platform cpufreq: pxa3: move clk register access to clk driver ARM: pxa: remove get_clk_frequency_khz() ARM: pxa: pcmcia: move smemc configuration back to arch ASoC: pxa: i2s: use normal MMIO accessors ASoC: pxa: ac97: use normal MMIO accessors ASoC: pxa: use pdev resource for FIFO regs Input: wm97xx - get rid of irq_enable method in wm97xx_mach_ops Input: wm97xx - switch to using threaded IRQ ...
2022-05-07ARM: pxa: convert to multiplatformArnd Bergmann3-73/+14
PXA is now ready to be built into a single kernel with all the other ARMv5 platforms, so change the Kconfig bit to finish it off. The mach/uncompress.h support is the last bit that goes away, getting replaced with the normal DEBUG_LL based approach. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa/sa1100: move I/O space to PCI_IOBASEArnd Bergmann2-0/+24
PXA and StrongARM1100 traditionally map their I/O space 1:1 into virtual memory, using a per-bus io_offset that matches the base address of the ioremap mapping. In order for PXA to work in a multiplatform config, this needs to change so I/O space starts at PCI_IOBASE (0xfee00000). Since the pcmcia soc_common support is shared with StrongARM1100, both have to change at the same time. The affected machines are: - Anything with a PCMCIA slot now uses pci_remap_iospace, which is made available to PCMCIA configurations as well, rather than just PCI. The first PCMCIA slot now starts at port number 0x10000. - The Zeus and Viper platforms have PC/104-style ISA buses, which have a static mapping for both I/O and memory space at 0xf1000000, which can no longer work. It does not appear to have any in-tree users, so moving it to port number 0 makes them behave like a traditional PC. - SA1100 does support ISA slots in theory, but all machines that originally enabled this appear to have been removed from the tree ages ago, and the I/O space is never mapped anywhere. - The Nanoengine machine has support for PCI slots, but looks like this never included I/O space, the resources only define the location for memory and config space. With this, the definitions of __io() and IO_SPACE_LIMIT can be simplified, as the only remaining cases are the generic PCI_IOBASE and the custom inb()/outb() macros on RiscPC. S3C24xx still has a custom inb()/outb() in this here, but this is already removed in another branch. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: remove support for MTD_XIPArnd Bergmann1-36/+0
Using MTD-XIP does not work on multiplatform kernels because it requires SoC specific register accesses to be done from low-level flash handling functions in RAM while the rest of the kernel sits in flash. I found no evidence of anyone still actually using this feature, so remove it from PXA to avoid spending a lot of time on actually making it work. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: move mach/*.h to mach-pxa/Arnd Bergmann70-134/+133
None of the headers are included from outside of the mach-pxa directory, so move them all in there. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: move plat-pxa to drivers/soc/Arnd Bergmann3-3/+3
There are two drivers in arch/arm/plat-pxa: mfp and ssp. Both of them should ideally not be needed at all, as there are proper subsystems to replace them. OTOH, they are self-contained and can simply be normal SoC drivers, so move them over there to eliminate one more of the plat-* directories. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> (mach-pxa) Acked-by: Lubomir Rintel <lkundrak@v3.sk> (mach-mmp) Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: remove unused mach/bitfield.hArnd Bergmann1-114/+0
The sa1111.h header defines some constants using the bitfield macros, but those are only used on sa1100, not on pxa, and the users include the bitfield header through mach/hardware.h. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: move clk register definitions to driverArnd Bergmann5-121/+7
The clock register definitions are now used (almost) exclusively in the clk driver, and that relies on no other mach/*.h header files any more. Remove the dependency on mach/pxa*-regs.h by addressing the registers as offsets from a void __iomem * pointer, which is either passed from a board file, or (for the moment) ioremapped at boot time from a hardcoded address in case of DT (this should be moved into the DT of course). Cc: linux-clk@vger.kernel.org Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: move smemc register access from clk to platformArnd Bergmann4-0/+46
The get_sdram_rows() and get_memclkdiv() helpers need smemc register that are separate from the clk registers, move them out of the clk driver, and use an extern declaration instead. Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@kernel.org> Cc: linux-clk@vger.kernel.org Link: https://lore.kernel.org/lkml/87pnielzo4.fsf@belgarion.home/ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07cpufreq: pxa3: move clk register access to clk driverArnd Bergmann3-6/+1
The driver needs some low-level register access for setting the core and bus frequencies. These registers are owned by the clk driver, so move the low-level access into that driver with a slightly higher-level interface and avoid any machine header file dependencies. Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: linux-clk@vger.kernel.org Cc: linux-pm@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: remove get_clk_frequency_khz()Arnd Bergmann3-17/+1
get_clk_frequency_khz() is not a proper name for a global function, and there is only one caller. Convert viper to use the properly namespaced pxa25x_get_clk_frequency_khz() and remove the other references. Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: linux-pm@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: pcmcia: move smemc configuration back to archArnd Bergmann1-0/+29
Rather than poking at the smemc registers directly from the pcmcia/pxa2xx_base driver, move those bits into machine file to have a cleaner interface. Cc: Dominik Brodowski <linux@dominikbrodowski.net> Link: https://lore.kernel.org/lkml/87d0egjzxk.fsf@belgarion.home/ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ASoC: pxa: ac97: use normal MMIO accessorsArnd Bergmann1-102/+0
To avoid dereferencing hardwired constant pointers from a global header file, change the driver to use devm_platform_ioremap_resource for getting an __iomem pointer, and then using readl/writel on that. Each pointer dereference gets changed by a search&replace, which leads to a few overlong lines, but seems less risky than trying to clean up the code at the same time. Cc: alsa-devel@alsa-project.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: zylonite: use gpio lookup instead mfp headerArnd Bergmann1-0/+31
The mach/mfp.h header is only used by this one driver for hardcoded gpio numbers. Change that to use a lookup table instead. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: mainstone-wm97xx: use gpio lookup tableArnd Bergmann4-0/+36
This driver hardcodes gpio numbers without a header file. Use lookup tables instead. Cc: Marek Vasut <marek.vasut@gmail.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: linux-input@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: magician: use platform driver for audioArnd Bergmann1-0/+50
The magician audio driver creates a codec device and gets data from a board specific header file, both of which is a bit suspicious. Move these into the board file itself, using a gpio lookup table. Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: alsa-devel@alsa-project.org Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: z2: use gpio lookup for audio deviceArnd Bergmann1-0/+11
The audio device is allocated by the audio driver, and it uses a gpio number from the mach/z2.h header file. Change it to use a gpio lookup table for the device allocated by the driver to keep the header file local to the machine. Acked-by: Mark Brown <broonie@kernel.org> Cc: alsa-devel@alsa-project.org Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: eseries: use gpio lookup for audioArnd Bergmann1-0/+32
The three eseries machines have very similar drivers for audio, all using the mach/eseries-gpio.h header for finding the gpio numbers. Change these to use gpio descriptors to avoid the header file dependency. I convert the _OFF gpio numbers into GPIO_ACTIVE_LOW ones for consistency here. Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: spitz: use gpio descriptors for audioArnd Bergmann3-3/+34
The audio driver should not use a hardwired gpio number from the header. Change it to use a lookup table. Acked-by: Mark Brown <broonie@kernel.org> Cc: alsa-devel@alsa-project.org Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: lubbock: pass udc irqs as resourceArnd Bergmann2-3/+11
Lubbock is the only machine that has three IRQs for the UDC. These are currently hardcoded in the driver based on a machine header file. Change this to use platform device resources as we use for the generic IRQ anyway. Cc: Felipe Balbi <balbi@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: hx4700: use gpio descriptors for audioArnd Bergmann3-3/+17
The audio driver should not use a hardwired gpio number from the header. Change it to use a lookup table. Cc: Philipp Zabel <philipp.zabel@gmail.com> Cc: Paul Parsons <lost.distance@yahoo.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: corgi: use gpio descriptors for audioArnd Bergmann3-3/+23
The audio driver should not use a hardwired gpio number from the header. Change it to use a lookup table. Acked-by: Mark Brown <broonie@kernel.org> Cc: alsa-devel@alsa-project.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM: pxa: poodle: use platform data for poodle asoc driverArnd Bergmann2-13/+21
The poodle audio driver shows its age by using a custom gpio api for the "locomo" support chip. In a perfect world, this would get converted to use gpiolib and a gpio lookup table. As the world is not perfect, just pass all the required data in a custom platform_data structure. to avoid the globally visible mach/poodle.h header. Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07ARM/pxa/mfd/power/sound: Switch Tosa to GPIO descriptorsLinus Walleij3-70/+18
The Tosa device (Sharp SL-6000) has a mishmash driver set-up for the Toshiba TC6393xb MFD that includes a battery charger and touchscreen and has some kind of relationship to the SoC sound driver for the AC97 codec. Other devices define a chip like this but seem only half-implemented, not really handling battery charging etc. This patch switches the Toshiba MFD device to provide GPIO descriptors to the battery charger and SoC codec. As a result some descriptors need to be moved out of the Tosa boardfile and new one added: all SoC GPIO resources to these drivers now comes from the main boardfile, while the MFD provide GPIOs for its portions. As a result we can request one GPIO from our own GPIO chip and drop two hairy callbacks into the board file. This platform badly needs to have its drivers split up and converted to device tree probing to handle this quite complex relationship in an orderly manner. I just do my best in solving the GPIO descriptor part of the puzzle. Please don't ask me to fix everything that is wrong with these driver to todays standards, I am just trying to fix one aspect. I do try to use modern devres resource management and handle deferred probe using new functions where appropriate. Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: Dirk Opfer <dirk@opfer-online.de> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: Liam Girdwood <lgirdwood@gmail.com> Reviewed-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-20ARM: pxa: maybe fix gpio lookup tablesArnd Bergmann3-7/+7
From inspection I found a couple of GPIO lookups that are listed with device "gpio-pxa", but actually have a number from a different gpio controller. Try to rectify that here, with a guess of what the actual device name is. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-20ARM: pxa: use pdev resource for palmld mmioArnd Bergmann3-5/+12
The palmld header is almost unused in drivers, the only remaining thing now is the PATA device address, which should really be passed as a resource. Cc: linux-ide@vger.kernel.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: make addr-map.h header localArnd Bergmann14-13/+13
Drivers should not rely on the contents of this file, so move it into the platform directory directly. Cc: Philipp Zabel <philipp.zabel@gmail.com> Cc: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/lkml/87mudkmx8g.fsf@belgarion.home/
2022-04-19ARM: pxa: move pcmcia board data into mach-pxaArnd Bergmann24-18/+1481
The drivers/pcmcia/pxa2xx_*.c are essentially part of the board files, but for historic reasons located in drivers/pcmcia. Move them into the same place as the actual board file to avoid lots of machine header inclusions. Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: pxa2xx-ac97-lib: use IRQ resourceArnd Bergmann1-6/+2
The pxa2xx-ac97-lib code is the last driver to use mach/irqs.h for PXA. Almost everything already passes the interrupt as a resource, so use it from there. The one exception is the mxm8x10 machine, which apparently has a resource-less device. Replacing it with the correct one enables the driver here as well. Cc: alsa-devel@alsa-project.org Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19watchdog: sa1100: use platform device registrationArnd Bergmann7-7/+17
Rather than relying on machine specific headers to pass down the reboot status and the register locations, use resources and platform_data. Aside from this, keep the changes to a minimum. Cc: Wim Van Sebroeck <wim@linux-watchdog.org> Cc: linux-watchdog@vger.kernel.org Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: move regs-lcd.h into driverArnd Bergmann1-199/+0
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. Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: move mach/sound.h to linux/platform_data/Arnd Bergmann28-58/+27
This is a basically a platform_data file, so move it out of the mach/* header directory. Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tomas Cech <sleep_walker@suse.com> Cc: Sergey Lapin <slapin@ossfans.org> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: stop using mach/bitfield.hArnd Bergmann3-5/+3
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: dri-devel@lists.freedesktop.org Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: split up mach/hardware.hArnd Bergmann54-342/+97
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>
2022-04-19ARM: pxa: remove mach/dma.hArnd Bergmann4-20/+0
The file no longer contains anything useful, so remove it. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: make mach/regs-uart.h privateArnd Bergmann3-2/+2
This is not used by any drivers, so make it private to the platform. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: make mainstone.h privateArnd Bergmann2-3/+1
No driver includes this any more, so don't expose it globally. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-19ARM: pxa: split mach/generic.hArnd Bergmann2-6/+6
Only one declaration from this header is actually used in drivers, so move that one into the global location and leave everything else private. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-03-23Merge tag 'arm-soc-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/socLinus Torvalds4-1061/+2
Pull ARM SoC updates from Arnd Bergmann: "SoC specific code is generally used for older platforms that don't (yet) use device tree to do the same things. - Support is added for i.MXRT10xx, a Cortex-M7 based microcontroller from NXP. At the moment this is still incomplete as other portions are merged through different trees. - Long abandoned support for running NOMMU ARMv4 or ARMv5 platforms gets removed, now the Arm NOMMU platforms are limited to the Cortex-M family of microcontrollers - Two old PXA boards get removed, along with corresponding driver bits. - Continued cleanup of the Intel IXP4xx platforms, removing some remnants of the old board files. - Minor Cleanups and fixes for Orion, PXA, MMP, Mstar, Samsung - CPU idle support for AT91 - A system controller driver for Polarfire" * tag 'arm-soc-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (29 commits) ARM: remove support for NOMMU ARMv4/v5 ARM: PXA: fix up decompressor code soc: microchip: make mpfs_sys_controller_put static ARM: pxa: remove Intel Imote2 and Stargate 2 boards ARM: mmp: Fix failure to remove sram device ARM: mstar: Select ARM_ERRATA_814220 soc: add microchip polarfire soc system controller ARM: at91: Kconfig: select PM_OPP ARM: at91: PM: add cpu idle support for sama7g5 ARM: at91: ddr: fix typo to align with datasheet naming ARM: at91: ddr: align macro definitions ARM: at91: ddr: remove CONFIG_SOC_SAMA7 dependency ARM: ixp4xx: Convert to SPARSE_IRQ and P2V ARM: ixp4xx: Drop all common code ARM: ixp4xx: Drop custom DMA coherency and bouncing ARM: ixp4xx: Remove feature bit accessors net: ixp4xx_hss: Check features using syscon net: ixp4xx_eth: Drop platform data support soc: ixp4xx-npe: Access syscon regs using regmap soc: ixp4xx: Add features from regmap helper ...
2022-03-01ARM: PXA: fix up decompressor codeArnd Bergmann1-1/+1
The earlier removal of two boards caused a build regression, fix it by removing the extraneous '||'. Reported-by: kernel test robot <lkp@intel.com> Fixes: 28f74201e37c ("ARM: pxa: remove Intel Imote2 and Stargate 2 boards") Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-28ARM: pxa: remove Intel Imote2 and Stargate 2 boardsJonathan Cameron4-1044/+1
I have no reason to believe these boards have any more users and I haven't tested them for several years. Removing them may simplify other changes to the various PXA boards people still care about. The recent conversion of pxa2xx_spi to GPIO descriptors for example had to update this board despite no one caring or testing. Great boards that got me started in kernel development, RIP! Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Daniel Mack <daniel@zonque.org> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: soc@kernel.org Link: https://lore.kernel.org/r/20220227134431.908998-1-jic23@kernel.org' Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-01-31spi: pxa2xx_spi: Convert to use GPIO descriptorsLinus Walleij9-48/+116
This converts the PXA2xx SPI driver to use GPIO descriptors exclusively to retrieve GPIO chip select lines. The device tree and ACPI paths of the driver already use descriptors, hence ->use_gpio_descriptors is already set and this codepath is well tested. Convert all the PXA boards providing chip select GPIOs as platform data and drop the old GPIO chipselect handling in favor of the core managing it exclusively. Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: linux-arm-kernel@lists.infradead.org Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220125005836.494807-1-linus.walleij@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>