summaryrefslogtreecommitdiffstats
path: root/drivers/reset (follow)
Commit message (Collapse)AuthorAgeFilesLines
* reset: uniphier: rename MIO reset to SD reset for Pro5, PXs2, LD20 SoCsMasahiro Yamada2016-10-221-8/+8
| | | | | | | | | | | | | I made a mistake as for naming for this block. The MIO block is not implemented for these 3 SoCs in the first place. The current naming will be a trouble if an SoC with both MIO and SD-ctrl blocks appear in the future. This driver has just been merged in the previous merge window. Rename it before the release. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: hi6220: allow to compile test driver on other architecturesPhilipp Zabel2016-08-302-2/+3
| | | | | | | | | Also remove the RESET_CONTROLLER dependency, this Kconfig file is included inside the menuconfig already. Cc: Chen Feng <puck.chen@hisilicon.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: zynq: add driver Kconfig optionPhilipp Zabel2016-08-302-1/+7
| | | | | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Cc: Moritz Fischer <moritz.fischer@ettus.com> Cc: Sören Brinkmann <soren.brinkmann@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: sunxi: add driver Kconfig optionPhilipp Zabel2016-08-302-1/+7
| | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: stm32: add driver Kconfig optionPhilipp Zabel2016-08-302-1/+7
| | | | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Gabriel Fernandez <gabriel.fernandez@st.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: socfpga: add driver Kconfig optionPhilipp Zabel2016-08-302-1/+7
| | | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: pistachio: add driver Kconfig optionPhilipp Zabel2016-08-302-1/+7
| | | | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Cc: Damien Horsley <Damien.Horsley@imgtec.com> Acked-by: James Hartley <james.hartley@imgtec.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: meson: add driver Kconfig optionPhilipp Zabel2016-08-252-1/+7
| | | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Acked-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: lpc18xx: add driver Kconfig optionPhilipp Zabel2016-08-252-1/+7
| | | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Acked-by: Joachim Eastwood <manabian@gmail.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: berlin: add driver Kconfig optionPhilipp Zabel2016-08-252-1/+7
| | | | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Cc: Antoine Tenart <antoine.tenart@free-electrons.com> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: ath79: add driver Kconfig optionPhilipp Zabel2016-08-252-1/+8
| | | | | | | | | Visible only if COMPILE_TEST is enabled, this allows to include the driver in build tests. Acked-by: Aban Bedel <albeu@free.fr> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: ath79: add missing includePhilipp Zabel2016-08-251-0/+1
| | | | | | | The driver uses readl/writel, so it should include linux/io.h. Acked-by: Aban Bedel <albeu@free.fr> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: warn on invalid input to reset_control_reset/assert/deassert/statusPhilipp Zabel2016-08-241-1/+11
| | | | | | | Instead of potentially crashing, dump a backtrace and return -EINVAL if rstc is NULL or an error code. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: uniphier: add reset controller driver for UniPhier SoCsMasahiro Yamada2016-08-243-0/+451
| | | | | | | | This is the initial commit for UniPhier reset controller driver. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drivers: reset: Add STM32 reset driverMaxime Coquelin2016-08-242-0/+109
| | | | | | | | | | | The STM32 MCUs family IPs can be reset by accessing some registers from the RCC block. The list of available reset lines is documented in the DT bindings. Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: socfpga: no need to store modrst_offsetPhilipp Zabel2016-08-081-10/+9
| | | | | | | | Since we can just add it to membase once, there is no need to store modrst_offset separately, and to repeat the addition with every access. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
* reset: add TI SYSCON based reset driverAndrew F. Davis2016-06-293-0/+248
| | | | | | | | | | | | | Add a reset-controller driver for performing reset management of various devices present on the SoC, with the reset registers shared between devices in a common register memory space. This driver uses the syscon/regmap frameworks to actually implement the various reset functionalities needed by the reset consumer devices. Signed-off-by: Andrew F. Davis <afd@ti.com> [s-anna@ti.com: add documentation, syscon name change] Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: hisilicon: Add hi6220 media subsystem reset supportXinliang Liu2016-06-291-2/+47
| | | | | | | | | Add hi6220 media subsystem reset controller. Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Xia Qing <saberlily.xia@hisilicon.com> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: hisilicon: Change to syscon register accessChen Feng2016-06-291-40/+45
| | | | | | | | | | | | | | There are two reset controllers in hi6220 SoC: The peripheral reset controller bits are part of sysctrl registers. The media reset controller bits are part of mediactrl registers. So change register access to syscon way. And rename current reset controller to peripheral one. Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Xia Qing <saberlily.xia@hisilicon.com> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: Add support for the Amlogic Meson SoC Reset ControllerNeil Armstrong2016-06-012-0/+137
| | | | | | | | | | This patch adds the platform driver for the Amlogic Meson SoC Reset Controller. The Meson8b and GXBB SoCs are supported. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: oxnas: Use devm register API and get rid of platform removeNeil Armstrong2016-05-301-11/+1
| | | | | | | | Use the brand new devm_reset_controller_register() API to get rid of the platform driver remove callback. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: fix Kconfig menu to include reset drivers in sub-menuMasahiro Yamada2016-05-302-1/+4
| | | | | | | | | | | | | | | | In "make menuconfig", reset drivers are currently lined up together with the reset sub-system menu, like this: -*- Reset Controller Support ---- < > Hi6220 Reset Driver (It also means, the menu "Reset Controller Support" is always empty.) "Hi6220 Reset Driver" should go into the sub-menu of the "Reset Controller Support". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: zynq: use devm_reset_controller_register()Masahiro Yamada2016-05-301-11/+1
| | | | | | | | Use devm_reset_controller_register() for the reset controller registration and drop the .remove callback. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: socfpga: use devm_reset_controller_register()Masahiro Yamada2016-05-301-11/+1
| | | | | | | | Use devm_reset_controller_register() for the reset controller registration and drop the .remove callback. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: sunxi: use devm_reset_controller_register()Masahiro Yamada2016-05-301-11/+1
| | | | | | | | Use devm_reset_controller_register() for the reset controller registration and drop the .remove callback. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: pistachio: use devm_reset_controller_register()Masahiro Yamada2016-05-301-11/+1
| | | | | | | | Use devm_reset_controller_register() for the reset controller registration and drop the .remove callback. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: ath79: use devm_reset_controller_register()Masahiro Yamada2016-05-301-2/+1
| | | | | | | | Use devm_reset_controller_register() for the reset controller registration and remove the unregister call from the .remove callback. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: add devm_reset_controller_register APIMasahiro Yamada2016-05-301-0/+37
| | | | | | | | | | | Add a device managed API for reset_controller_register(). This helps in reducing code in .remove callbacks and sometimes dropping .remove callbacks entirely. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: Add Oxford Semiconductor Reset Controller driverNeil Armstrong2016-04-013-0/+140
| | | | | | | | | Add System reset controller driver for Oxford Semiconductor OXNAS SoC Family. CC: Ma Haijun <mahaijuns@gmail.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: lpc18xx: get rid of global variables for restart notifierJoachim Eastwood2016-03-301-12/+10
| | | | | | | | | Moving the notifier_block into the drivers priv struct allows us to retrive the priv struct with container_of and remove the global variables. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: Add support for shared reset controlsHans de Goede2016-03-301-11/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some SoCs some hw-blocks share a reset control. Add support for this setup by adding new: reset_control_get_shared() devm_reset_control_get_shared() devm_reset_control_get_shared_by_index() methods to get a reset_control. Note that this patch omits adding of_ variants, if these are needed later they can be easily added. This patch also changes the behavior of the existing exclusive reset_control_get() variants, if these are now called more then once for the same reset_control they will return -EBUSY. To catch existing drivers triggering this error (there should not be any) a WARN_ON(1) is added in this path. When a reset_control is shared, the behavior of reset_control_assert / deassert is changed, for shared reset_controls these will work like the clock-enable/disable and regulator-on/off functions. They will keep a deassert_count, and only (re-)assert the reset after reset_control_assert has been called as many times as reset_control_deassert was called. Calling reset_control_assert without first calling reset_control_deassert is not allowed on a shared reset control. Calling reset_control_reset is also not allowed on a shared reset control. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: Share struct reset_control between reset_control_get callsHans de Goede2016-03-301-21/+63
| | | | | | | | | | | | Now that struct reset_control no longer stores the device pointer for the device calling reset_control_get we can share a single struct reset_control when multiple calls to reset_control_get are made for the same reset line (same id / index). This is a preparation patch for adding support for shared reset lines. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: Make [of_]reset_control_get[_foo] functions wrappersHans de Goede2016-03-301-67/+17
| | | | | | | | | | | | | With both the regular, _by_index and _optional variants we already have quite a few variants of [of_]reset_control_get[_foo], the upcoming addition of shared reset lines support makes this worse. This commit changes all the variants into wrappers around common core functions. For completeness sake this commit also adds a new devm_get_reset_control_by_index wrapper. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: sti: Make reset_control_ops constPhilipp Zabel2016-02-101-1/+1
| | | | | | The syscfg_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: zynq: Make reset_control_ops constPhilipp Zabel2016-02-101-1/+1
| | | | | | The zynq_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: socfpga: Make reset_control_ops constPhilipp Zabel2016-02-101-1/+1
| | | | | | The socfpga_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: hi6220: Make reset_control_ops constPhilipp Zabel2016-02-101-1/+1
| | | | | | The hi6220_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: ath79: Make reset_control_ops constPhilipp Zabel2016-02-101-1/+1
| | | | | | | The ath79_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Alban Bedel <albeu@free.fr>
* reset: lpc18xx: Make reset_control_ops constPhilipp Zabel2016-02-081-1/+1
| | | | | | | The lpc18xx_rgu_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Joachim Eastwood <manabian@gmail.com>
* reset: sunxi: Make reset_control_ops constPhilipp Zabel2016-02-081-1/+1
| | | | | | | The sunxi_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* reset: img: Make reset_control_ops constPhilipp Zabel2016-02-081-1/+1
| | | | | | | The pistachio_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: James Hartley <james.hartley@imgtec.com>
* reset: berlin: Make reset_control_ops constPhilipp Zabel2016-02-081-1/+1
| | | | | | | The berlin_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
* reset: berlin: drop DT cell size checkPhilipp Zabel2016-02-051-3/+0
| | | | | | | Now that the DT cell size check has been moved to the core, there is no need to check again. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: img: Add Pistachio reset controller driverDamien Horsley2016-02-052-0/+155
| | | | | | | | Add reset controller driver for Pistachio SoC Signed-off-by: Damien Horsley <Damien.Horsley@imgtec.com> Signed-off-by: James Hartley <james.hartley@imgtec.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: hisilicon: check return value of reset_controller_register()Masahiro Yamada2016-01-251-3/+1
| | | | | | | | | The newly added hisilicon reset driver missed the subsystem-wide fixup by commit d1f15aa09558 ("reset: check return value of reset_controller_register()"). So fix it now. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: Move DT cell size check to the coreMaxime Ripard2016-01-251-3/+5
| | | | | | | | | | | | The core currently doesn't check that the DT cell size matches what the driver declares, which means that every xlate function needs to duplicate that check. Make sure that of_reset_control_get checks for this to avoid duplication and errors. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: remove unnecessary local variable initialization from ↵Philipp Zabel2016-01-251-1/+1
| | | | | | | | | of_reset_control_get_by_index There is no need to initialize rstc, as it is unconditionally assigned the return value of a kzalloc call before use. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: hi6220: fix modular buildArnd Bergmann2015-12-121-0/+1
| | | | | | | | | | We need to include <linux/module.h> to build the driver as a loadable module: drivers/reset/hisilicon/hi6220_reset.c:108:1: warning: data definition has no type or storage class postcore_initcall(hi6220_reset_init); Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* reset: ath79: Add system restart supportAlban Bedel2015-11-251-1/+29
| | | | | | | | Add a system restart handler that use the FULL_CHIP_RESET bit of the reset controller. Signed-off-by: Alban Bedel <albeu@free.fr> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* reset: hi6220: Reset driver for hisilicon hi6220 SoCChen Feng2015-11-205-0/+116
| | | | | | | | Add reset driver for hi6220-hikey board,this driver supply deassert of IP on hi6220 SoC. Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>