summaryrefslogtreecommitdiffstats
path: root/drivers/reset
Commit message (Collapse)AuthorAgeFilesLines
* reset: imx7: Add support for i.MX8MQ IP block variantAndrey Smirnov2019-02-111-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | Port of a Linux commit 34be9b453608fa4475d2b48ee27df2023f08ef2d Add bits and pieces needed to support IP block variant found on i.MX8MQ SoCs. Cc: p.zabel@pengutronix.de Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez <leonard.crestez@nxp.com> Cc: "A.s. Dong" <aisheng.dong@nxp.com> Cc: Richard Zhu <hongxing.zhu@nxp.com> Cc: Rob Herring <robh@kernel.org> Cc: devicetree@vger.kernel.org Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: imx7: Add plubming to support multiple IP variantsAndrey Smirnov2019-02-111-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | Port of a Linux commit cffaab878178c7842ab38690070d665adb3f41fd In order to enable supporting i.MX8MQ with this driver, convert it to expect variant specific bits to be passed via driver data. Cc: p.zabel@pengutronix.de Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez <leonard.crestez@nxp.com> Cc: "A.s. Dong" <aisheng.dong@nxp.com> Cc: Richard Zhu <hongxing.zhu@nxp.com> Cc: Rob Herring <robh@kernel.org> Cc: devicetree@vger.kernel.org Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: Constify "ops" in struct reset_controller_devAndrey Smirnov2019-02-111-1/+1
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: Mark local functions as staticAndrey Smirnov2019-01-181-4/+4
| | | | | | | | | There are no outside users of of_reset_control_get() or gpio_reset_control_get(), so mark them as static. This allows us to avoid "no previous prototype" warning as well. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: Add i.MX7 SRC reset driverAndrey Smirnov2019-01-183-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port of a Linux commit abf97755ae31aaaf35156438dd3036e96f66da83 Add reset controller driver exposing various reset faculties, implemented by System Reset Controller IP block. Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Mark Rutland <mark.rutland@arm.com> Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Linux commit 26fce0557fa639fb7bbc33e31a57cff7df25c3a0 was squashed here as well: reset: imx7: Fix always writing bits as 0 Right now the only user of reset-imx7 is pci-imx6 and the reset_control_assert and deassert calls on pciephy_reset don't toggle the PCIEPHY_BTN and PCIEPHY_G_RST bits as expected. Fix this by writing 1 or 0 respectively. The reference manual is not very clear regarding SRC_PCIEPHY_RCR but for other registers like MIPIPHY and HSICPHY the bits are explicitly documented as "1 means assert, 0 means deassert". The values are still reversed for IMX7_RESET_PCIE_CTRL_APPS_EN. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: socfpga: add missing driver nameSteffen Trumtrar2018-08-081-0/+1
| | | | | | | | | The driver_d is missing the name property. When the reset driver is used in a non-of setup, this will result in an error during device_registration where the dev->name is matched to the driver->name. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: reset-socfpga: sync driver with linuxSteffen Trumtrar2018-01-111-10/+10
| | | | | | | Sync the SoCFPGA reset driver with Linux v4.14-rc1. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: import socfpga-reset driver from linuxSteffen Trumtrar2016-10-182-0/+125
| | | | | | | Port the linux v4.8-rc1 reset-socfpga driver to barebox. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: fix non GPIO resetLucas Stach2016-01-111-0/+1
| | | | | | | | | | The reset controller structure is zero initialized in the OF reset case, but as 0 is also a valid GPIO number the current code tries to assert/deassert the GPIO instead of calling into the reset controller device. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: Add gpio reset supportSascha Hauer2015-11-231-1/+79
| | | | | | | | | If a device has the reset-gpios property we can support this through the reset controller API, so drivers do not have to open code the support for this property each time themselves as done a few dozen times in the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: Allow dummy reset linesSascha Hauer2015-11-231-3/+20
| | | | | | | | | Treat NULL as a dummy reset line which is returned by the reset core when there is no reset line connected to a device (that is, no reset is described in the device tree). With this consumers can just use the reset functions without having to check for existence. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset: add reset controller frameworkLucas Stach2014-05-153-0/+250
Add stripped sown version of the reset controller framework from the Linux kernel. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>