summaryrefslogtreecommitdiff
path: root/drivers/reset
AgeCommit message (Collapse)Author
2016-02-10reset: sti: Make reset_control_ops constPhilipp Zabel
The syscfg_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-02-10reset: zynq: Make reset_control_ops constPhilipp Zabel
The zynq_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-02-10reset: socfpga: Make reset_control_ops constPhilipp Zabel
The socfpga_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-02-10reset: hi6220: Make reset_control_ops constPhilipp Zabel
The hi6220_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-02-10reset: ath79: Make reset_control_ops constPhilipp Zabel
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>
2016-02-08reset: lpc18xx: Make reset_control_ops constPhilipp Zabel
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>
2016-02-08reset: sunxi: Make reset_control_ops constPhilipp Zabel
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>
2016-02-08reset: img: Make reset_control_ops constPhilipp Zabel
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>
2016-02-08reset: berlin: Make reset_control_ops constPhilipp Zabel
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>
2016-02-05reset: berlin: drop DT cell size checkPhilipp Zabel
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>
2016-02-05reset: img: Add Pistachio reset controller driverDamien Horsley
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>
2016-01-25reset: hisilicon: check return value of reset_controller_register()Masahiro Yamada
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>
2016-01-25reset: Move DT cell size check to the coreMaxime Ripard
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>
2016-01-25reset: remove unnecessary local variable initialization from ↵Philipp Zabel
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>
2015-12-12reset: hi6220: fix modular buildArnd Bergmann
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>
2015-11-25reset: ath79: Add system restart supportAlban Bedel
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>
2015-11-20reset: hi6220: Reset driver for hisilicon hi6220 SoCChen Feng
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>
2015-11-18reset: remove unused device pointer from struct reset_controlPhilipp Zabel
Commit 0c5b2b915a58 ("reset: Mark function as static and remove unused function in core.c") removed the only user of the device pointer in struct reset_control. As it is now unused, remove it. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-11-16reset: check return value of reset_controller_register()Masahiro Yamada
Currently, reset_controller_register() always return 0, but it would be better to check its return code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-11-16reset: remove redundant $(CONFIG_RESET_CONTROLLER) from MakefileMasahiro Yamada
The directory drivers/reset/ is guarded by CONFIG_RESET_CONTROLLER in driver/Makefile. CONFIG_RESET_CONTROLLER is boolean, so it always evaluates to 'y' in drivers/reset/Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-11-16reset: use ENOTSUPP instead of ENOSYSPhilipp Zabel
ENOSYS is reserved to report invalid syscalls to userspace. Consistently return ENOTSUPP to indicate that the driver doesn't support the functionality or the reset framework is not enabled at all. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-11-16reset: sunxi: mark the of_device_id array as __initconstPhilipp Zabel
Since this array is static const, it should be marked as __initconst. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-11-16reset: sti: add a missing blank line after declarationPhilipp Zabel
This just fixes a checkpatch warning, no functional change. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
2015-11-16reset: sti: Provide ops .status() call-backLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-11-16reset: sti: Add support for resetting co-processorsLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-11-16reset: Fix of_reset_control_get() for consistent return valuesAlban Bedel
When of_reset_control_get() is called without connection ID it returns -ENOENT when the 'resets' property doesn't exists or is an empty entry. However when a connection ID is given it returns -EINVAL when the 'resets' property doesn't exists or the requested name can't be found. This is because the error code returned by of_property_match_string() is just passed down as an index to of_parse_phandle_with_args(), which then returns -EINVAL. To get a consistent return value with both code paths we must return -ENOENT when of_property_match_string() fails. Signed-off-by: Alban Bedel <albeu@free.fr> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-11-16reset: add of_reset_control_get_by_index()Vince Hsu
Add of_reset_control_get_by_index() to allow the drivers to get reset device without knowing its name. Signed-off-by: Vince Hsu <vinceh@nvidia.com> [jonathanh@nvidia.com: Updated stub function to return -ENOTSUPP instead of -ENOSYS which should only be used for system calls.] Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-09-01reset: ath79: Fix missing spin_lock_initAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Alban Bedel <albeu@free.fr> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-08-16Merge branch 'reset/ath79' into reset/nextPhilipp Zabel
2015-08-04reset: reset-zynq: Adding support for Xilinx Zynq reset controller.Moritz Fischer
This adds a reset controller driver to control the Xilinx Zynq AP-SoC's various resets. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-08-04reset: Add a driver for the reset controller on the AR71XX/AR9XXXAlban Bedel
The AR71XX/AR9XXX SoC have a simple reset controller with one bit per reset line. Signed-off-by: Alban Bedel <albeu@free.fr> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-08-03reset: socfpga: Update reset-socfpga to read the altr,modrst-offset propertyDinh Nguyen
In order for the Arria10 to be able to re-use the reset driver for SoCFPGA Cyclone5/Arria5, we need to read the 'altr,modrst-offset' property from the device tree entry. The 'altr,modrst-offset' property is the first register into the reset manager that is used for bringing peripherals out of reset. The driver assumes a modrst-offset of 0x10 in order to support legacy Cyclone5/Arria5 hardware. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
2015-08-03reset: add driver for lpc18xx rguJoachim Eastwood
Add reset driver for the Reset Generation Unit (RGU) found on NXP LPC18xx and LPC43xx devies. This reset controller features up to 64 reset lines connected to different blocks and peripheral in the SoC. Most reset lines on the controller are self clearing except for those dealing with the Cortex-M0 cores on LPC43xx devices. This driver also registers a restart handler that can be used to reset the entire device. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-08-03reset: sti: constify of_device_id arrayFabian Frederick
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Acked-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-08-03ARM: STi: DT: Move reset controller constants into common locationPhilipp Zabel
By popular vote, the DT binding includes for reset controllers are located in include/dt-bindings/reset/. Move the STi reset constants in there, too, to avoid confusion. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Patrice Chotard <patrice.chotard@st.com>
2015-05-18reset: berlin: drop arch_initcall initializationAntoine Tenart
With proper platform driver probing for berlin reset driver, drop the arch_initcall workaround. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-05-18reset: berlin: convert to a platform driverAntoine Tenart
The Berlin reset controller was introduced without being a platform driver because of a needed DT rework: the node describing the reset controller also describes the pinctrl and clk controllers... Prepare conversion by adding a platform driver probe to a new compatible "marvell,berlin2-reset" with syscon regmap. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-01-16reset: sunxi: fix spinlock initializationTyler Baker
Call spin_lock_init() before the spinlocks are used, both in early init and probe functions preventing a lockdep splat. I have been observing lockdep complaining [1] during boot on my a80 optimus [2] when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat, and has been tested on a few other sunxi platforms without issue. [1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html [2] http://kernelci.org/boot/?a80-optimus Signed-off-by: Tyler Baker <tyler.baker@linaro.org> Cc: <stable@vger.kernel.org> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-04Merge tag 'reset-for-3.19-2' of git://git.pengutronix.de/git/pza/linux into ↵Arnd Bergmann
next/drivers Pull "Reset controller changes for v3.19" from Philipp Zabel: This adds a new driver for the sti soc family, and creates a reset_control_status interface, which is added to the existing drivers. * tag 'reset-for-3.19-2' of git://git.pengutronix.de/git/pza/linux: reset: add socfpga_reset_status reset: sti: Document sti-picophyreset controllers bindings. reset: stih407: Add softreset, powerdown and picophy controllers reset: stih407: Add reset controllers DT bindings reset: add reset_control_status helper function Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-04reset: add socfpga_reset_statusDinh Nguyen
Populate the reset_status callback for SOCFPGA. Signed-off-by: Alan Tull <atull@opensource.altera.com> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2014-11-03Merge tag 'sti-reset-for-v3.19-1' of ↵Philipp Zabel
git://git.stlinux.com/devel/kernel/linux-sti into reset/for_v3.19 STi reset controller updates for v3.19. This tag adds support to STiH407 reset controllers: 1. st,stih407-powerdown 2. st,stih407-softreset 3. st,stih407-picophyreset
2014-10-31reset: stih407: Add softreset, powerdown and picophy controllersPeter Griffin
This patch adds softreset, powerdown and picophy reset controllers for the STiH407 SoC. With this patch three new devices are registered: - 1. st,stih407-powerdown 2. st,stih407-softreset 3. st,stih407-picophyreset All three devices use system configuration registers mapped via regmap to perform the reset or powerdown. The powerdown controller also has an acknowledgement. A separate picophy reset controller manages the different reset channels within the picophy, which have a different polarity to the other system softresets. Managing these different picophy softreset channels is necessary to correctly handle resuming from suspend when USB2 devices are plugged into the USB3 port. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>
2014-10-20reset: add the Berlin reset controller driverAntoine Ténart
Add a reset controller for Marvell Berlin SoCs which is used by the USB PHYs drivers (for now). Signed-off-by: Antoine Ténart <antoine.tenart@free-electrons.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2014-10-20reset: sti: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20reset: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20reset: add reset_control_status helper functionDinh Nguyen
There are cases where a system will want to read a reset status bit before doing any other toggling. Add a reset_control_status helper function to the reset controller API. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2014-06-02Merge tag 'drivers-for-3.16' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into next Pull ARM SoC driver changes from Olof Johansson: "SoC-near driver changes that we're merging through our tree. Mostly because they depend on other changes we have staged, but in some cases because the driver maintainers preferred that we did it this way. This contains a largeish cleanup series of the omap_l3_noc bus driver, cpuidle rework for Exynos, some reset driver conversions and a long branch of TI EDMA fixes and cleanups, with more to come next release. The TI EDMA cleanups is a shared branch with the dmaengine tree, with a handful of Davinci-specific fixes on top. After discussion at last year's KS (and some more on the mailing lists), we are here adding a drivers/soc directory. The purpose of this is to keep per-vendor shared code that's needed by different drivers but that doesn't fit into the MFD (nor drivers/platform) model. We expect to keep merging contents for this hierarchy through arm-soc so we can keep an eye on what the vendors keep adding here and not making it a free-for-all to shove in crazy stuff" * tag 'drivers-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (101 commits) cpufreq: exynos: Fix driver compilation with ARCH_MULTIPLATFORM tty: serial: msm: Remove direct access to GSBI power: reset: keystone-reset: introduce keystone reset driver Documentation: dt: add bindings for keystone pll control controller Documentation: dt: add bindings for keystone reset driver soc: qcom: fix of_device_id table ARM: EXYNOS: Fix kernel panic when unplugging CPU1 on exynos ARM: EXYNOS: Move the driver to drivers/cpuidle directory ARM: EXYNOS: Cleanup all unneeded headers from cpuidle.c ARM: EXYNOS: Pass the AFTR callback to the platform_data ARM: EXYNOS: Move S5P_CHECK_SLEEP into pm.c ARM: EXYNOS: Move the power sequence call in the cpu_pm notifier ARM: EXYNOS: Move the AFTR state function into pm.c ARM: EXYNOS: Encapsulate the AFTR code into a function ARM: EXYNOS: Disable cpuidle for exynos5440 ARM: EXYNOS: Encapsulate boot vector code into a function for cpuidle ARM: EXYNOS: Pass wakeup mask parameter to function for cpuidle ARM: EXYNOS: Remove ifdef for scu_enable in pm ARM: EXYNOS: Move scu_enable in the cpu_pm notifier ARM: EXYNOS: Use the cpu_pm notifier for pm ...
2014-05-21Merge branch 'sunxi/drivers-for-3.16' of https://github.com/mripard/linux ↵Olof Johansson
into next/drivers Merge "Allwinner drivers changes for 3.16" from Maxime Ripard: Reset drivers for the A31, that have been merged with reset maintainer's Acked-by. * 'sunxi/drivers-for-3.16' of https://github.com/mripard/linux: reset: sunxi: allow MFD subdevices probe reset: sunxi: document sunxi's reset controllers bindings Signed-off-by: Olof Johansson <olof@lixom.net>
2014-05-21driver: reset: sti: add keyscan for stih416Gabriel FERNANDEZ
Add keyscan reset on stih416 reset controller. Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org> Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>