summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)Author
2014-03-29Merge tag 'samsung-pm-1' of ↵Arnd Bergmann
http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers Merge "Samsung S2R PM updates for v3.15" from Kukjin Kim: From Tomasz Figa: This series reworks suspend/resume handling of Samsung clock drivers to cover more SoC specific aspects that are beyond simple register save and restore. The goal is to have all the suspend/resume code that touches the clock controller in single place, which is the clock driver. * tag 'samsung-pm-1' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: Drop legacy Exynos4 clock suspend/resume code clk: samsung: exynos4: Add remaining suspend/resume handling clk: samsung: Drop old suspend/resume code clk: samsung: s3c64xx: Move suspend/resume handling to SoC driver clk: samsung: exynos5420: Move suspend/resume handling to SoC driver clk: samsung: exynos5250: Move suspend/resume handling to SoC driver clk: samsung: exynos4: Move suspend/resume handling to SoC driver clk: samsung: Provide common helpers for register save/restore clk: exynos4: Remove remnants of non-DT support Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-27Merge branch 'reset/for_v3.15' of git://git.pengutronix.de/git/pza/linux ↵Arnd Bergmann
into next/drivers Merge "reset controller fixes and updates" from Philipp Zabel: * 'reset/for_v3.15' of git://git.pengutronix.de/git/pza/linux: reset: Add optional resets and stubs reset: Add of_reset_control_get reset: Mark function as static and remove unused function in core.c reset: allow drivers to request probe deferral Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-27Revert "net: stmmac: Add SOCFPGA glue driver"Arnd Bergmann
This reverts commit 2d237c06a4161767fe1da598d15291914a7bbeed. The driver needs other changes, which unfortunately conflict with patches in the netdev tree. Revert it here so it can get merged on top of the other driver through netdev. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-20Merge tag 'tegra-for-3.15-drivers' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers Merge "ARM: tegra: driver changes for 3.15" from Stephen Warren: A single cleanup for the Tegra AHB driver. * tag 'tegra-for-3.15-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: drivers/amba: don't check resource with devm_ioremap_resource Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-18Merge tag 'sti-reset-for-v3.15' of ↵Arnd Bergmann
git://git.stlinux.com/devel/kernel/linux-sti into next/drivers Merge "STi Reset controller support" from Srinivas Kandagatla: * tag 'sti-reset-for-v3.15' of git://git.stlinux.com/devel/kernel/linux-sti: ARM: STi: Add reset controller support to mach-sti Kconfig drivers: reset: stih416: add softreset controller drivers: reset: stih415: add softreset controller drivers: reset: Reset controller driver for STiH416 drivers: reset: Reset controller driver for STiH415 drivers: reset: STi SoC system configuration reset controller support Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-17Merge tag 'mvebu-drivers-3.15-2' of git://git.infradead.org/linux-mvebu into ↵Arnd Bergmann
next/drivers Merge "mvebu drivers for v3.15" from Jason Cooper: pull request #1: - mvebu mbus - use of_find_matching_node_and_match - rtc - use PTR_ERR_OR_ZERO in isl12057 - work around issue in mv where date returned is 2038 - kirkwood -> mach-mvebu - various Kconfig oneliners to allow building kirkwood in -mvebu/ pull request #2: - reset - re-use qnap-poweroff driver for Synology NASs * tag 'mvebu-drivers-3.15-2' of git://git.infradead.org/linux-mvebu: Power: Reset: Generalize qnap-poweroff to work on Synology devices. drivers: Enable building of Kirkwood drivers for mach-mvebu rtc: mv: reset date if after year 2038 rtc: isl12057: use PTR_ERR_OR_ZERO to fix coccinelle warnings bus: mvebu-mbus: make use of of_find_matching_node_and_match Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-17Merge tag 'socfpga_updates_for_3.15_v2' of ↵Arnd Bergmann
git://git.rocketboards.org/linux-socfpga-next into next/drivers Merge "SOCFPGA updates for 3.15 version 2" from Dinh Nguyen: *Update SOCFPGA DTS to include ethernet, sd/mmc, and clock fixes *Add stmmac ethernet glue layer *Update socfpga_defconfig to include sd/mmc, and micrel_phy * tag 'socfpga_updates_for_3.15_v2' of git://git.rocketboards.org/linux-socfpga-next: dts: socfpga: Add sysmgr node so the gmac can use to reference dts: socfpga: Add support for SD/MMC on the SOCFPGA platform dts: socfpga: Update clock entry to support multiple parents ARM: socfpga: Update socfpga_defconfig dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac. net: stmmac: Add SOCFPGA glue driver Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-11drivers: reset: stih416: add softreset controllerSrinivas Kandagatla
This patch adds softreset controller for STiH416 SOC, soft reset controller is based on system configuration registers which are mapped via regmap. This reset controller does not have any feedback or acknowledgement. With this patch a new device "st,stih416-softreset" is registered with system configuration registers based reset controller that controls the softreset state of the hardware such as Ethernet, IRB. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
2014-03-11drivers: reset: stih415: add softreset controllerSrinivas Kandagatla
This patch adds softreset controller for STiH415 SOC, soft reset controller is based on system configuration registers which are mapped via regmap. This reset controller does not have any feedback or acknowledgement. With this patch a new device "st,stih415-softreset" is registered with system configuration registers based reset controller that controls the softreset state of the hardware such as Ethernet, IRB. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
2014-03-11drivers: reset: Reset controller driver for STiH416Stephen Gallimore
This patch adds a reset controller platform driver for the STiH416 SoC. This initial version provides a compatible driver for the "st,stih416-powerdown" device, which registers a system configuration register based reset controller that controls the powerdown state of hardware such as the on-chip USB host controllers. Signed-off-by: Stephen Gallimore <stephen.gallimore@st.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
2014-03-11drivers: reset: Reset controller driver for STiH415Stephen Gallimore
This patch adds a reset controller platform driver for the STiH415 SoC. This initial version provides a compatible driver for the "st,stih415-powerdown" device, which registers a system configuration register based reset controller that controls the powerdown state of hardware such as the on-chip USB host controllers. Signed-off-by: Stephen Gallimore <stephen.gallimore@st.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
2014-03-11drivers: reset: STi SoC system configuration reset controller supportStephen Gallimore
This patch adds a reset controller implementation for STMicroelectronics STi family SoCs; it allows a group of related reset like controls found in multiple system configuration registers to be represented by a single controller device. System configuration registers are accessed through the regmap framework and the mfd/syscon driver. The implementation optionally supports waiting for the reset action to be acknowledged in a separate status register and supports both active high and active low reset lines. These properties are common across all the reset channels in a specific reset controller instance, hence all channels in a paritcular controller are expected to behave in the same way. Signed-off-by: Stephen Gallimore <stephen.gallimore@st.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
2014-03-08Merge tag 'omap-for-v3.15/crossbar-signed' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers Merge OMAP crossbar support from Tony Lindgren: Add support for GIC crossbar that routes interrupts on newer omaps. Looks like people wanted these merged via the omap tree as it's the only user for the GIC crossbar. * tag 'omap-for-v3.15/crossbar-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: DRA: Enable Crossbar IP support for DRA7XX ARM: OMAP4+: Correct Wakeup-gen code to use physical irq number DRIVERS: IRQCHIP: CROSSBAR: Add support for Crossbar IP DRIVERS: IRQCHIP: IRQ-GIC: Add support for routable irqs Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-08Merge tag 'mvebu-watchdog-3.15-2' of git://git.infradead.org/linux-mvebu ↵Olof Johansson
into next/drivers mvebu watchdog driver changes for v3.15 (incremental #2) - remove warnings by using %pa for phys_addr_t * tag 'mvebu-watchdog-3.15-2' of git://git.infradead.org/linux-mvebu: watchdog: orion_wdt: Use %pa to print 'phys_addr_t' Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-06Merge tag 'armsoc/for-3.15/drivers' of git://github.com/broadcom/mach-bcm ↵Arnd Bergmann
into next/drivers Merge "ARM: mach-bcm: bcm281xx clock driver" from Matt Porter: This pull request contains the Broadcom bcm281xx clock driver series. This series is being merged through the arm-soc tree because there is an ordering dependency where the driver *must* be merged before the related dts changes. This is a result of the bcm281xx dts already containing dummy fixed clock nodes that must be updated. * tag 'armsoc/for-3.15/drivers' of git://github.com/broadcom/mach-bcm: clk: bcm281xx: don't disable unused peripheral clocks clk: bcm281xx: add initial clock framework support Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-03-04Power: Reset: Generalize qnap-poweroff to work on Synology devices.Andrew Lunn
The Synology NAS devices use a very similar mechanism to QNAP NAS devices to power off. Both send a single charactor command to a PIC, over the second serial port. However the baud rate and the command differ. Generalize the driver to support this. Signed-off-by: Ben Peddell <klightspeed@killerwolves.net> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Jason Cooper <jason@lakedaemon.net> Cc: Anton Vorontsov <anton@enomsg.org> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-26net: stmmac: Add SOCFPGA glue driverDinh Nguyen
Like the STi series SOCs, Altera's SOCFPGA also needs a glue layer on top of the Synopsys gmac IP. This patch adds the platform driver for the glue layer which configures the IP before the generic STMMAC driver takes over. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Acked-by: David S. Miller <davem@davemloft.net> --- v3: Remove stray empty line at end of dwmac-socfpga.c. v2: Use the dwmac-sti as an example for a glue layer and split patch up to have dts as a separate patch. Also cc dts maintainers since there is a new binding.
2014-02-25watchdog: orion_wdt: Use %pa to print 'phys_addr_t'Fabio Estevam
When building an ARM multi_v7_defconfig with LPAE option selected we get the following build warning: drivers/watchdog/orion_wdt.c:272:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'phys_addr_t' [-Wformat=] Fix it by using %pa to print 'phys_addr_t'. Reported-by: Olof's autobuilder <build@lixom.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-25drivers: cci: Export CCI PMU revisionPunit Agrawal
The event numbering changed between revision r0 and r1 of the CCI PMU. Expose this to userspace to allow tooling to handle the differences in event numbers. Suggested-by: Drew Richardson <Drew.Richardson@arm.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25drivers: cci: Extend support to CCI revisions > r1p2Punit Agrawal
The driver queries the CCI IP revision to distinguish between r0 and r1 scheme for event numbers and currently supports upto version r1p2. To minimise code churn every time there's a new version of the IP, assume that event numbering doesn't change for revisions > r1p0 (which is the case). The driver will still need an update for future revisions that change the event numbers. Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25Merge tag 'qcom-drivers-for-3.15' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom into next/drivers Merge "qcom driver changes for v3.15" from Kumar Gala: We've split Qualcomm MSM support into legacy and multiplatform. These drivers are only relevant on the multiplatform supported SoCs so switch the Kconfig depends to ARCH_QCOM. * tag 'qcom-drivers-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom: gpio: msm: switch Kconfig to ARCH_QCOM depends hwrng: msm: switch Kconfig to ARCH_QCOM depends power: reset: msm - switch Kconfig to ARCH_QCOM depends drm/msm: drop ARCH_MSM Kconfig depend tty: serial: msm: Enable building msm_serial for ARCH_QCOM
2014-02-25Merge branch 'qcom/cleanup' into next/driversArnd Bergmann
* qcom/cleanup: ARM: qcom: Rename various msm prefixed functions to qcom clocksource: qcom: split building of legacy vs multiplatform support ARM: qcom: Split Qualcomm support into legacy and multiplatform clocksource: qcom: Move clocksource code out of mach-msm ARM: msm: kill off hotplug.c ARM: msm: Remove pen_release usage ARM: dts: msm: split out msm8660 and msm8960 soc into dts include This cleanup branch is a dependency for the following qcom driver changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25irqchip: VIC: export vic_init_cascadedArnd Bergmann
vic_init_cascaded is called by integrator impd1 code that can be a loadable module, so the function has to be exported. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2014-02-25Merge tag 'mvebu-watchdog-3.15' of git://git.infradead.org/linux-mvebu into ↵Arnd Bergmann
next/drivers mvebu watchdog driver changes for v3.15 - orion watchdog - cleanup and extend driver to support Armada 370 and Armada XP Depends: - tags/irqchip-mvebu-fixes-3.14 (already pulled by tglx) - both are based on v3.14-rc1 * tag 'mvebu-watchdog-3.15' of git://git.infradead.org/linux-mvebu: watchdog: orion: Enable the build on ARCH_MVEBU watchdog: orion: Add support for Armada 370 and Armada XP SoC watchdog: orion: Add per-compatible watchdog start implementation watchdog: orion: Add per-compatible clock initialization watchdog: orion: Introduce per-compatible of_device_id data watchdog: orion: Introduce an orion_watchdog device structure watchdog: orion: Remove unneeded BRIDGE_CAUSE clear watchdog: orion: Make RSTOUT register a separate resource watchdog: orion: Handle the interrupt so it's properly acked watchdog: orion: Make sure the watchdog is initially stopped watchdog: orion: Remove unused macros watchdog: orion: Use atomic access for shared registers watchdog: orion: Add clock error handling Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25Merge tag 'irqchip-mvebu-fixes-3.14' of git://git.infradead.org/linux-mvebu ↵Arnd Bergmann
into next/drivers irqchip mvebu fixes for v3.14 - orion: - fixes for clearing bridge cause register, and clearing stale interrupts * tag 'irqchip-mvebu-fixes-3.14' of git://git.infradead.org/linux-mvebu: irqchip: orion: Fix getting generic chip pointer. irqchip: orion: clear stale interrupts in irq_startup irqchip: orion: use handle_edge_irq on bridge irqs irqchip: orion: clear bridge cause register on init This is a dependency for the mvebu watchdog changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25Merge tag 'davinci-for-v3.15/nand' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/drivers A patch to break dependency of DaVinci NAND driver with mach-davinci. Required for reuse of driver on other platforms (keystone). * tag 'davinci-for-v3.15/nand' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: aemif: get rid of davinci-nand driver dependency on aemif Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-25gpio: msm: switch Kconfig to ARCH_QCOM dependsKumar Gala
We've split Qualcomm MSM support into legacy and multiplatform. The gpio msm-v2 driver is only relevant on the multiplatform supported SoCs so switch the Kconfig depends to ARCH_QCOM. CC: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-02-24clk: bcm281xx: don't disable unused peripheral clocksAlex Elder
Add the CLK_IGNORE_UNUSED flag when setting up a peripheral clock. This prevents unused clocks from getting disabled, and by doing this we can use the common clock code even before we've resolved all the spots that need to get a reference to their clock. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Matt Porter <mporter@linaro.org> Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Matt Porter <mporter@linaro.org>
2014-02-24clk: bcm281xx: add initial clock framework supportAlex Elder
Add code for device tree support of clocks in the BCM281xx family of SoCs. Machines in this family use peripheral clocks implemented by "Kona" clock control units (CCUs). (Other Broadcom SoC families use Kona style CCUs as well, but support for them is not yet upstream.) A BCM281xx SoC has multiple CCUs, each of which manages a set of clocks on the SoC. A Kona peripheral clock is composite clock that may include a gate, a parent clock multiplexor, and zero, one or two dividers. There is a variety of gate types, and many gates implement hardware-managed gating (often called "auto-gating"). Most dividers divide their input clock signal by an integer value (one or more). There are also "fractional" dividers which allow division by non-integer values. To accomodate such dividers, clock rates and dividers are generally maintained by the code in "scaled" form, which allows integer and fractional dividers to be handled in a uniform way. If present, the gate for a Kona peripheral clock must be enabled when a change is made to its multiplexor or one of its dividers. Additionally, dividers and multiplexors have trigger registers which must be used whenever the divider value or selected parent clock is changed. The same trigger is often used for a divider and multiplexor, and a BCM281xx peripheral clock occasionally has two triggers. The gate, dividers, and parent clock selector are treated in this code as "components" of a peripheral clock. Their functionality is implemented directly--e.g. the common clock framework gate implementation is not used for a Kona peripheral clock gate. (This has being considered though, and the intention is to evolve this code to leverage common code as much as possible.) The source code is divided into three general portions: drivers/clk/bcm/clk-kona.h drivers/clk/bcm/clk-kona.c These implement the basic Kona clock functionality, including the clk_ops methods and various routines to manipulate registers and interpret their values. This includes some functions used to set clocks to a desired initial state (though this feature is only partially implemented here). drivers/clk/bcm/clk-kona-setup.c This contains generic run-time initialization code for data structures representing Kona CCUs and clocks. This encapsulates the clock structure initialization that can't be done statically. Note that there is a great deal of validity-checking code here, making explicit certain assumptions in the code. This is mostly useful for adding new clock definitions and could possibly be disabled for production use. drivers/clk/bcm/clk-bcm281xx.c This file defines the specific CCUs used by BCM281XX family SoCs, as well as the specific clocks implemented by each. It declares a device tree clock match entry for each CCU defined. include/dt-bindings/clock/bcm281xx.h This file defines the selector (index) values used to identify a particular clock provided by a CCU. It consists entirely of C preprocessor constants, to be used by both the C source and device tree source files. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Tim Kryger <tim.kryger@linaro.org> Reviewed-by: Matt Porter <mporter@linaro.org> Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Matt Porter <mporter@linaro.org>
2014-02-24drivers: Enable building of Kirkwood drivers for mach-mvebuAndrew Lunn
With the move of kirkwood into mach-mvebu, drivers Kconfig need tweeking to allow the kirkwood specific drivers to be built. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Tested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Bryan Wu <cooloney@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-23ARM: davinci: aemif: get rid of davinci-nand driver dependency on aemifIvan Khoronzhuk
The problem that the set timings code contains the call of Davinci platform function davinci_aemif_setup_timing() which is not accessible if kernel is built for another platform like Keystone. The Keysone platform is going to use TI AEMIF driver. If TI AEMIF is used we don't need to set timings and bus width. It is done by AEMIF driver. To get rid of davinci-nand driver dependency on aemif platform code we moved aemif code to davinci platform. The platform AEMIF code (aemif.c) has to be removed once Davinci will be converted to DT and use ti-aemif.c driver. Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> [nsekhar@ti.com: fixed checkpatch error and a build breakage due to missing include, rebased onto l2-mtd/master] Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2014-02-22watchdog: orion: Enable the build on ARCH_MVEBUEzequiel Garcia
After adding support for Armada 370/XP SoC let's enable the build on these platforms. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Add support for Armada 370 and Armada XP SoCEzequiel Garcia
Using the added infrastructure for handling SoC differences, this commit adds support for the watchdog controller available in Armada 370 and Armada XP SoCs. Also, and because the AXP clock initialization uses of_clk_get_by_name, this commit changes the orion clock initialization to use clk_get() and adds a proper clk_put() on the common exit/error paths. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Add per-compatible watchdog start implementationEzequiel Garcia
To handle differences between SoCs this commit adds per-compatible string start() function for the watchdog kick-off. This is preparation work and makes no functionality changes to the current driver. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Add per-compatible clock initializationEzequiel Garcia
Following the introduction of the compatible-data field, it's now possible to further abstract the clock initialization. This will allow to support SoC with a different clock setup. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Introduce per-compatible of_device_id dataEzequiel Garcia
This commit adds an orion_watchdog_data structure to hold compatible-data information. This allows to remove the driver-wide definition and to be able to add support for multiple compatible-strings in the future. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Introduce an orion_watchdog device structureEzequiel Garcia
In order to prepare to support multiple compatible-strings, this commit adds a device structure to hold the driver's state. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Remove unneeded BRIDGE_CAUSE clearEzequiel Garcia
After adding the IRQ request, the BRIDGE_CAUSE bit should be cleared by the bridge interrupt controller. There's no longer a need to do it in the watchdog driver, so we can simply remove it. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Make RSTOUT register a separate resourceEzequiel Garcia
In order to support other SoC, it's required to distinguish the 'control' timer register, from the 'rstout' register that enables system reset on watchdog expiration. To prevent a compatibility break, this commit adds a fallback to a hardcoded RSTOUT address. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Handle the interrupt so it's properly ackedEzequiel Garcia
DT-enabled plaforms, where the irqchip driver for the brigde interrupt controller is available, can handle the watchdog IRQ properly. Therefore, request the interrupt and add a dummy handler that merely calls panic(). This is done in order to have an initial 'ack' of the interruption, which clears the watchdog state. Furthermore, since some platforms don't have such IRQ, this commit makes the interrupt specification optional. Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Make sure the watchdog is initially stoppedEzequiel Garcia
Having the watchdog initially fully stopped is important to avoid any spurious watchdog triggers, in case the registers are not in its reset state. If the watchdog rstout is enabled and the watchdog counter running, this initial stop is not performed, to comply with the 'nowayout' parameter. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Remove unused macrosEzequiel Garcia
These are not used anywhere so it's safe to remove them. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Use atomic access for shared registersEzequiel Garcia
Since the timer control register is shared with the clocksource driver, use the recently introduced atomic_io_clear_set() to access such register. Given the watchdog core already provides serialization for all the watchdog ops, this commit allows to remove the spinlock entirely. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Add clock error handlingEzequiel Garcia
This commit adds a check for clk_prepare_enable success and introduces an error path to disable the clock properly. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-21rtc: mv: reset date if after year 2038Thomas Petazzoni
Dates after January, 19th 2038 are badly handled by userspace due to the time being stored on 32 bits. This causes issues on some Marvell platform on which the RTC is initialized by default to a date that's beyond 2038, causing a really weird behavior of the RTC. In order to avoid that, reset the date to a sane value if the RTC is beyond 2038. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-21Merge tag 'integrator-for-v3.15-1' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/drivers Merge "Integrator/Versatile base patch stack for the v3.15 series" from Linus Walleij: "this is a set of patches I have sent for review and failed to get ACKs from the proper subsystem maintainers after repeated pings. However I now need to have this rotated in linux-next as a base for multiplatform, so please pull it in, it is all ARM drivers anyway. Russell pointed out some things and these have been fixed and iterated in this series." - Move integrator clock definitions to the device tree, alter clock and timer drivers accordingly. - Alter the VIC irqchip driver to support cascaded VICs off a parent IRQ controller. - Update the IM-PD1 plugin code to use managed resources. - Register the VIC on the IM-PD1. - Select the PL061 GPIO block for the IM-PD1 on the Integrator/AP. * tag 'integrator-for-v3.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: integrator: select GPIO block ARM: integrator: register the IM-PD1 VIC ARM: integrator: use managed resources for the IM-PD1 irqchip: support cascaded VICs irqchip: vic: update the base IRQ member correctly clk: versatile: respect parent rate in ICST clock clk: versatile: pass a parent to the ICST clock ARM: integrator: switch to fetch clocks from device tree ARM: SP804: make Integrator/CP timer pick clock from DT ARM: integrator: define clocks in the device trees Signed-off-by: Olof Johansson <olof@lixom.net>
2014-02-21irqchip: orion: Fix getting generic chip pointer.Andrew Lunn
Enabling SPARSE_IRQ shows up a bug in the irq-orion bridge interrupt handler. The bridge interrupt is implemented using a single generic chip. Thus the parameter passed to irq_get_domain_generic_chip() should always be zero. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Fixes: 9dbd90f17e4f ("irqchip: Add support for Marvell Orion SoCs") Cc: <stable@vger.kernel.org> # v3.11+ Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-21hwrng: msm: switch Kconfig to ARCH_QCOM dependsKumar Gala
We've split Qualcomm MSM support into legacy and multiplatform. The RNG driver is only relevant on the multiplatform supported SoCs so switch the Kconfig depends to ARCH_QCOM. Acked-by: Herbert Xu <herbert@gondor.apana.org.au> CC: Stanimir Varbanov <svarbanov@mm-sol.com> Signed-off-by: Kumar Gala <galak@codeaurora.org>
2014-02-20Merge tag 'renesas-soc-for-v3.15' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Merge "Renesas ARM Based SoC Updates for v3.15" from Simon Horman: * r7s72100 SoC (RZ/A1H) - Add i2c clocks (portion missing from previous patch due to miss-merge) * r8a7791 (R-Car M2) - Add SATA clocks - Add ZS clock - Wait for status on all MSTP clocks -- Add I2C and VIN clocks * r8a7790 (R-Car H2) - Add PCI USB host clock support - Add Audio DMAC, SATA and VIN clocks - Add Audio DMAC support * r8a7779 (R-Car H1) - Wait for status on selected MSTP clocks * tag 'renesas-soc-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: r8a7790: Add PCI USB host clock support ARM: shmobile: r7s72100: really add i2c clocks ARM: shmobile: r8a7791: Add SATA clocks ARM: shmobile: r8a7791: Add ZS clock ARM: shmobile: r8a7790: Add SATA clocks ARM: shmobile: r8a7790: Add VIN clock support ARM: shmobile: r8a7790: add Audio DMAC support ARM: shmobile: r8a7790: add Audio DMAC clock ARM: shmobile: r8a7791: Wait for status on all MSTP clocks ARM: shmobile: r8a7791: Add VIN clocks ARM: shmobile: r8a7791: Add I2C clocks ARM: shmobile: r8a7790: Wait for status on all MSTP clocks ARM: shmobile: r8a7779: Wait for status on selected MSTP clocks ARM: shmobile: wait for MSTP clock status to toggle, when enabling it
2014-02-18rtc: isl12057: use PTR_ERR_OR_ZERO to fix coccinelle warningsFengguang Wu
drivers/rtc/rtc-isl12057.c:278:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Arnaud Ebalard <arno@natisbad.org> CC: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>