Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
On 10/28/2016 04:36 AM, Philipp Zabel wrote: > Hi Andrew, > > is there (going to be) as stable branch I can base these on, or should I > just wait until the prerequisite patches appear in arm-soc/for-next? > > Am Donnerstag, den 27.10.2016, 16:49 -0500 schrieb Andrew F. Davis: >> Some TI Keystone family of SoCs contain a system controller (like the >> Power Management Micro Controller (PMMC) on K2G SoCs) that manage the >> low-level device control (like clocks, resets etc) for the various >> hardware modules present on the SoC. These device control operations >> are provided to the host processor OS through a communication protocol >> called the TI System Control Interface (TI SCI) protocol. >> >> This patch adds a reset driver that communicates to the system >> controller over the TI SCI protocol for performing reset management >> of various devices present on the SoC. Various reset functionalities >> are achieved by the means of different TI SCI device operations >> provided by the TI SCI framework. >> >> Signed-off-by: Andrew F. Davis>> [s-a...@ti.com: documentation changes, revised commit message] >> Signed-off-by: Suman Anna >> Signed-off-by: Nishanth Menon >> --- >> MAINTAINERS | 1 + >> drivers/reset/Kconfig| 9 ++ >> drivers/reset/Makefile | 1 + >> drivers/reset/reset-ti-sci.c | 262 >> +++ >> 4 files changed, 273 insertions(+) >> create mode 100644 drivers/reset/reset-ti-sci.c >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index accf991..b93d91a 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -11901,6 +11901,7 @@ F: include/dt-bindings/clock/k2g.h >> F: drivers/clk/keystone/sci-clk.c >> F: Documentation/devicetree/bindings/reset/ti,sci-reset.txt >> F: include/dt-bindings/reset/k2g.h >> +F: drivers/reset/reset-ti-sci.c >> >> THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER >> M: Hans Verkuil >> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig >> index 06d9fa2..4c21c9d 100644 >> --- a/drivers/reset/Kconfig >> +++ b/drivers/reset/Kconfig >> @@ -66,6 +66,15 @@ config RESET_SUNXI >> help >>This enables the reset driver for Allwinner SoCs. >> >> +config RESET_TI_SCI >> +tristate "TI System Control Interface (TI-SCI) reset driver" >> +depends on RESET_CONTROLLER >> +depends on TI_SCI_PROTOCOL >> +help >> + This enables the reset driver support over TI System Control Interface >> + available on some new TI SoCs. If you wish to use reset resources >> + managed by the TI System Controller, say Y here. Otherwise, say N. >> + >> config TI_SYSCON_RESET >> tristate "TI SYSCON Reset Driver" >> depends on HAS_IOMEM >> diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile >> index bbe7026..36321f2 100644 >> --- a/drivers/reset/Makefile >> +++ b/drivers/reset/Makefile >> @@ -10,6 +10,7 @@ obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o >> obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o >> obj-$(CONFIG_RESET_STM32) += reset-stm32.o >> obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o >> +obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o >> obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o >> obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o >> obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o >> diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c >> new file mode 100644 >> index 000..42ccf12 >> --- /dev/null >> +++ b/drivers/reset/reset-ti-sci.c >> @@ -0,0 +1,262 @@ >> +/* >> + * Texas Instrument's System Control Interface (TI-SCI) reset driver >> + * >> + * Copyright (C) 2015-2016 Texas Instruments Incorporated - >> http://www.ti.com/ >> + * Andrew F. Davis >> + * >> + * This program is free software; you can redistribute it and/or modify >> + * it under the terms of the GNU General Public License version 2 as >> + * published by the Free Software Foundation. >> + * >> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any >> + * kind, whether express or implied; without even the implied warranty >> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +/** >> + * struct ti_sci_reset_control - reset control structure >> + * @dev_id: SoC-specific device identifier >> + * @reset_mask: reset mask to use for toggling reset >> + */ >> +struct ti_sci_reset_control { >> +u32 dev_id; >> +u32 reset_mask; >> +}; >> + >> +/** >> + * struct ti_sci_reset_data - reset controller information structure >> + * @rcdev: reset controller entity >> + * @dev: reset controller device pointer >> + * @sci: TI SCI handle used for communication with system controller >> + * @idr: idr structure for mapping ids to reset control structures >> + */ >> +struct ti_sci_reset_data { >> +
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
On 10/28/2016 04:36 AM, Philipp Zabel wrote: > Hi Andrew, > > is there (going to be) as stable branch I can base these on, or should I > just wait until the prerequisite patches appear in arm-soc/for-next? > > Am Donnerstag, den 27.10.2016, 16:49 -0500 schrieb Andrew F. Davis: >> Some TI Keystone family of SoCs contain a system controller (like the >> Power Management Micro Controller (PMMC) on K2G SoCs) that manage the >> low-level device control (like clocks, resets etc) for the various >> hardware modules present on the SoC. These device control operations >> are provided to the host processor OS through a communication protocol >> called the TI System Control Interface (TI SCI) protocol. >> >> This patch adds a reset driver that communicates to the system >> controller over the TI SCI protocol for performing reset management >> of various devices present on the SoC. Various reset functionalities >> are achieved by the means of different TI SCI device operations >> provided by the TI SCI framework. >> >> Signed-off-by: Andrew F. Davis >> [s-a...@ti.com: documentation changes, revised commit message] >> Signed-off-by: Suman Anna >> Signed-off-by: Nishanth Menon >> --- >> MAINTAINERS | 1 + >> drivers/reset/Kconfig| 9 ++ >> drivers/reset/Makefile | 1 + >> drivers/reset/reset-ti-sci.c | 262 >> +++ >> 4 files changed, 273 insertions(+) >> create mode 100644 drivers/reset/reset-ti-sci.c >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index accf991..b93d91a 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -11901,6 +11901,7 @@ F: include/dt-bindings/clock/k2g.h >> F: drivers/clk/keystone/sci-clk.c >> F: Documentation/devicetree/bindings/reset/ti,sci-reset.txt >> F: include/dt-bindings/reset/k2g.h >> +F: drivers/reset/reset-ti-sci.c >> >> THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER >> M: Hans Verkuil >> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig >> index 06d9fa2..4c21c9d 100644 >> --- a/drivers/reset/Kconfig >> +++ b/drivers/reset/Kconfig >> @@ -66,6 +66,15 @@ config RESET_SUNXI >> help >>This enables the reset driver for Allwinner SoCs. >> >> +config RESET_TI_SCI >> +tristate "TI System Control Interface (TI-SCI) reset driver" >> +depends on RESET_CONTROLLER >> +depends on TI_SCI_PROTOCOL >> +help >> + This enables the reset driver support over TI System Control Interface >> + available on some new TI SoCs. If you wish to use reset resources >> + managed by the TI System Controller, say Y here. Otherwise, say N. >> + >> config TI_SYSCON_RESET >> tristate "TI SYSCON Reset Driver" >> depends on HAS_IOMEM >> diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile >> index bbe7026..36321f2 100644 >> --- a/drivers/reset/Makefile >> +++ b/drivers/reset/Makefile >> @@ -10,6 +10,7 @@ obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o >> obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o >> obj-$(CONFIG_RESET_STM32) += reset-stm32.o >> obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o >> +obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o >> obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o >> obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o >> obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o >> diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c >> new file mode 100644 >> index 000..42ccf12 >> --- /dev/null >> +++ b/drivers/reset/reset-ti-sci.c >> @@ -0,0 +1,262 @@ >> +/* >> + * Texas Instrument's System Control Interface (TI-SCI) reset driver >> + * >> + * Copyright (C) 2015-2016 Texas Instruments Incorporated - >> http://www.ti.com/ >> + * Andrew F. Davis >> + * >> + * This program is free software; you can redistribute it and/or modify >> + * it under the terms of the GNU General Public License version 2 as >> + * published by the Free Software Foundation. >> + * >> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any >> + * kind, whether express or implied; without even the implied warranty >> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +/** >> + * struct ti_sci_reset_control - reset control structure >> + * @dev_id: SoC-specific device identifier >> + * @reset_mask: reset mask to use for toggling reset >> + */ >> +struct ti_sci_reset_control { >> +u32 dev_id; >> +u32 reset_mask; >> +}; >> + >> +/** >> + * struct ti_sci_reset_data - reset controller information structure >> + * @rcdev: reset controller entity >> + * @dev: reset controller device pointer >> + * @sci: TI SCI handle used for communication with system controller >> + * @idr: idr structure for mapping ids to reset control structures >> + */ >> +struct ti_sci_reset_data { >> +struct reset_controller_dev rcdev; >> +struct device *dev; >> +
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
On 10/28/2016 12:43 PM, Mathieu Poirier wrote: > On 27 October 2016 at 15:49, Andrew F. Daviswrote: >> Some TI Keystone family of SoCs contain a system controller (like the >> Power Management Micro Controller (PMMC) on K2G SoCs) that manage the >> low-level device control (like clocks, resets etc) for the various >> hardware modules present on the SoC. These device control operations >> are provided to the host processor OS through a communication protocol >> called the TI System Control Interface (TI SCI) protocol. >> >> This patch adds a reset driver that communicates to the system >> controller over the TI SCI protocol for performing reset management >> of various devices present on the SoC. Various reset functionalities >> are achieved by the means of different TI SCI device operations >> provided by the TI SCI framework. >> >> Signed-off-by: Andrew F. Davis >> [s-a...@ti.com: documentation changes, revised commit message] >> Signed-off-by: Suman Anna >> Signed-off-by: Nishanth Menon >> --- >> MAINTAINERS | 1 + >> drivers/reset/Kconfig| 9 ++ >> drivers/reset/Makefile | 1 + >> drivers/reset/reset-ti-sci.c | 262 >> +++ >> 4 files changed, 273 insertions(+) >> create mode 100644 drivers/reset/reset-ti-sci.c >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index accf991..b93d91a 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -11901,6 +11901,7 @@ F: include/dt-bindings/clock/k2g.h >> F: drivers/clk/keystone/sci-clk.c >> F: Documentation/devicetree/bindings/reset/ti,sci-reset.txt >> F: include/dt-bindings/reset/k2g.h >> +F: drivers/reset/reset-ti-sci.c >> >> THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER >> M: Hans Verkuil >> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig >> index 06d9fa2..4c21c9d 100644 >> --- a/drivers/reset/Kconfig >> +++ b/drivers/reset/Kconfig >> @@ -66,6 +66,15 @@ config RESET_SUNXI >> help >> This enables the reset driver for Allwinner SoCs. >> >> +config RESET_TI_SCI >> + tristate "TI System Control Interface (TI-SCI) reset driver" >> + depends on RESET_CONTROLLER >> + depends on TI_SCI_PROTOCOL >> + help >> + This enables the reset driver support over TI System Control >> Interface >> + available on some new TI SoCs. If you wish to use reset resources >> + managed by the TI System Controller, say Y here. Otherwise, say N. >> + >> config TI_SYSCON_RESET >> tristate "TI SYSCON Reset Driver" >> depends on HAS_IOMEM >> diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile >> index bbe7026..36321f2 100644 >> --- a/drivers/reset/Makefile >> +++ b/drivers/reset/Makefile >> @@ -10,6 +10,7 @@ obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o >> obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o >> obj-$(CONFIG_RESET_STM32) += reset-stm32.o >> obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o >> +obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o >> obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o >> obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o >> obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o >> diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c >> new file mode 100644 >> index 000..42ccf12 >> --- /dev/null >> +++ b/drivers/reset/reset-ti-sci.c >> @@ -0,0 +1,262 @@ >> +/* >> + * Texas Instrument's System Control Interface (TI-SCI) reset driver >> + * >> + * Copyright (C) 2015-2016 Texas Instruments Incorporated - >> http://www.ti.com/ >> + * Andrew F. Davis >> + * >> + * This program is free software; you can redistribute it and/or modify >> + * it under the terms of the GNU General Public License version 2 as >> + * published by the Free Software Foundation. >> + * >> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any >> + * kind, whether express or implied; without even the implied warranty >> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +/** >> + * struct ti_sci_reset_control - reset control structure >> + * @dev_id: SoC-specific device identifier >> + * @reset_mask: reset mask to use for toggling reset >> + */ >> +struct ti_sci_reset_control { >> + u32 dev_id; >> + u32 reset_mask; >> +}; >> + >> +/** >> + * struct ti_sci_reset_data - reset controller information structure >> + * @rcdev: reset controller entity >> + * @dev: reset controller device pointer >> + * @sci: TI SCI handle used for communication with system controller >> + * @idr: idr structure for mapping ids to reset control structures >> + */ >> +struct ti_sci_reset_data { >> + struct reset_controller_dev rcdev; >> + struct device *dev; >> + const struct
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
On 10/28/2016 12:43 PM, Mathieu Poirier wrote: > On 27 October 2016 at 15:49, Andrew F. Davis wrote: >> Some TI Keystone family of SoCs contain a system controller (like the >> Power Management Micro Controller (PMMC) on K2G SoCs) that manage the >> low-level device control (like clocks, resets etc) for the various >> hardware modules present on the SoC. These device control operations >> are provided to the host processor OS through a communication protocol >> called the TI System Control Interface (TI SCI) protocol. >> >> This patch adds a reset driver that communicates to the system >> controller over the TI SCI protocol for performing reset management >> of various devices present on the SoC. Various reset functionalities >> are achieved by the means of different TI SCI device operations >> provided by the TI SCI framework. >> >> Signed-off-by: Andrew F. Davis >> [s-a...@ti.com: documentation changes, revised commit message] >> Signed-off-by: Suman Anna >> Signed-off-by: Nishanth Menon >> --- >> MAINTAINERS | 1 + >> drivers/reset/Kconfig| 9 ++ >> drivers/reset/Makefile | 1 + >> drivers/reset/reset-ti-sci.c | 262 >> +++ >> 4 files changed, 273 insertions(+) >> create mode 100644 drivers/reset/reset-ti-sci.c >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index accf991..b93d91a 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -11901,6 +11901,7 @@ F: include/dt-bindings/clock/k2g.h >> F: drivers/clk/keystone/sci-clk.c >> F: Documentation/devicetree/bindings/reset/ti,sci-reset.txt >> F: include/dt-bindings/reset/k2g.h >> +F: drivers/reset/reset-ti-sci.c >> >> THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER >> M: Hans Verkuil >> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig >> index 06d9fa2..4c21c9d 100644 >> --- a/drivers/reset/Kconfig >> +++ b/drivers/reset/Kconfig >> @@ -66,6 +66,15 @@ config RESET_SUNXI >> help >> This enables the reset driver for Allwinner SoCs. >> >> +config RESET_TI_SCI >> + tristate "TI System Control Interface (TI-SCI) reset driver" >> + depends on RESET_CONTROLLER >> + depends on TI_SCI_PROTOCOL >> + help >> + This enables the reset driver support over TI System Control >> Interface >> + available on some new TI SoCs. If you wish to use reset resources >> + managed by the TI System Controller, say Y here. Otherwise, say N. >> + >> config TI_SYSCON_RESET >> tristate "TI SYSCON Reset Driver" >> depends on HAS_IOMEM >> diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile >> index bbe7026..36321f2 100644 >> --- a/drivers/reset/Makefile >> +++ b/drivers/reset/Makefile >> @@ -10,6 +10,7 @@ obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o >> obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o >> obj-$(CONFIG_RESET_STM32) += reset-stm32.o >> obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o >> +obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o >> obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o >> obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o >> obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o >> diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c >> new file mode 100644 >> index 000..42ccf12 >> --- /dev/null >> +++ b/drivers/reset/reset-ti-sci.c >> @@ -0,0 +1,262 @@ >> +/* >> + * Texas Instrument's System Control Interface (TI-SCI) reset driver >> + * >> + * Copyright (C) 2015-2016 Texas Instruments Incorporated - >> http://www.ti.com/ >> + * Andrew F. Davis >> + * >> + * This program is free software; you can redistribute it and/or modify >> + * it under the terms of the GNU General Public License version 2 as >> + * published by the Free Software Foundation. >> + * >> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any >> + * kind, whether express or implied; without even the implied warranty >> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +/** >> + * struct ti_sci_reset_control - reset control structure >> + * @dev_id: SoC-specific device identifier >> + * @reset_mask: reset mask to use for toggling reset >> + */ >> +struct ti_sci_reset_control { >> + u32 dev_id; >> + u32 reset_mask; >> +}; >> + >> +/** >> + * struct ti_sci_reset_data - reset controller information structure >> + * @rcdev: reset controller entity >> + * @dev: reset controller device pointer >> + * @sci: TI SCI handle used for communication with system controller >> + * @idr: idr structure for mapping ids to reset control structures >> + */ >> +struct ti_sci_reset_data { >> + struct reset_controller_dev rcdev; >> + struct device *dev; >> + const struct ti_sci_handle *sci; >> + struct idr idr; >> +}; >> + >> +#define to_ti_sci_reset_data(p)
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
On 27 October 2016 at 15:49, Andrew F. Daviswrote: > Some TI Keystone family of SoCs contain a system controller (like the > Power Management Micro Controller (PMMC) on K2G SoCs) that manage the > low-level device control (like clocks, resets etc) for the various > hardware modules present on the SoC. These device control operations > are provided to the host processor OS through a communication protocol > called the TI System Control Interface (TI SCI) protocol. > > This patch adds a reset driver that communicates to the system > controller over the TI SCI protocol for performing reset management > of various devices present on the SoC. Various reset functionalities > are achieved by the means of different TI SCI device operations > provided by the TI SCI framework. > > Signed-off-by: Andrew F. Davis > [s-a...@ti.com: documentation changes, revised commit message] > Signed-off-by: Suman Anna > Signed-off-by: Nishanth Menon > --- > MAINTAINERS | 1 + > drivers/reset/Kconfig| 9 ++ > drivers/reset/Makefile | 1 + > drivers/reset/reset-ti-sci.c | 262 > +++ > 4 files changed, 273 insertions(+) > create mode 100644 drivers/reset/reset-ti-sci.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index accf991..b93d91a 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -11901,6 +11901,7 @@ F: include/dt-bindings/clock/k2g.h > F: drivers/clk/keystone/sci-clk.c > F: Documentation/devicetree/bindings/reset/ti,sci-reset.txt > F: include/dt-bindings/reset/k2g.h > +F: drivers/reset/reset-ti-sci.c > > THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER > M: Hans Verkuil > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig > index 06d9fa2..4c21c9d 100644 > --- a/drivers/reset/Kconfig > +++ b/drivers/reset/Kconfig > @@ -66,6 +66,15 @@ config RESET_SUNXI > help > This enables the reset driver for Allwinner SoCs. > > +config RESET_TI_SCI > + tristate "TI System Control Interface (TI-SCI) reset driver" > + depends on RESET_CONTROLLER > + depends on TI_SCI_PROTOCOL > + help > + This enables the reset driver support over TI System Control > Interface > + available on some new TI SoCs. If you wish to use reset resources > + managed by the TI System Controller, say Y here. Otherwise, say N. > + > config TI_SYSCON_RESET > tristate "TI SYSCON Reset Driver" > depends on HAS_IOMEM > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile > index bbe7026..36321f2 100644 > --- a/drivers/reset/Makefile > +++ b/drivers/reset/Makefile > @@ -10,6 +10,7 @@ obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o > obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o > obj-$(CONFIG_RESET_STM32) += reset-stm32.o > obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o > +obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o > obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o > obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o > obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o > diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c > new file mode 100644 > index 000..42ccf12 > --- /dev/null > +++ b/drivers/reset/reset-ti-sci.c > @@ -0,0 +1,262 @@ > +/* > + * Texas Instrument's System Control Interface (TI-SCI) reset driver > + * > + * Copyright (C) 2015-2016 Texas Instruments Incorporated - > http://www.ti.com/ > + * Andrew F. Davis > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any > + * kind, whether express or implied; without even the implied warranty > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +/** > + * struct ti_sci_reset_control - reset control structure > + * @dev_id: SoC-specific device identifier > + * @reset_mask: reset mask to use for toggling reset > + */ > +struct ti_sci_reset_control { > + u32 dev_id; > + u32 reset_mask; > +}; > + > +/** > + * struct ti_sci_reset_data - reset controller information structure > + * @rcdev: reset controller entity > + * @dev: reset controller device pointer > + * @sci: TI SCI handle used for communication with system controller > + * @idr: idr structure for mapping ids to reset control structures > + */ > +struct ti_sci_reset_data { > + struct reset_controller_dev rcdev; > + struct device *dev; > + const struct ti_sci_handle *sci; > + struct idr idr; > +}; > + > +#define to_ti_sci_reset_data(p)\ > + container_of((p), struct ti_sci_reset_data, rcdev) > + > +/** > + *
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
On 27 October 2016 at 15:49, Andrew F. Davis wrote: > Some TI Keystone family of SoCs contain a system controller (like the > Power Management Micro Controller (PMMC) on K2G SoCs) that manage the > low-level device control (like clocks, resets etc) for the various > hardware modules present on the SoC. These device control operations > are provided to the host processor OS through a communication protocol > called the TI System Control Interface (TI SCI) protocol. > > This patch adds a reset driver that communicates to the system > controller over the TI SCI protocol for performing reset management > of various devices present on the SoC. Various reset functionalities > are achieved by the means of different TI SCI device operations > provided by the TI SCI framework. > > Signed-off-by: Andrew F. Davis > [s-a...@ti.com: documentation changes, revised commit message] > Signed-off-by: Suman Anna > Signed-off-by: Nishanth Menon > --- > MAINTAINERS | 1 + > drivers/reset/Kconfig| 9 ++ > drivers/reset/Makefile | 1 + > drivers/reset/reset-ti-sci.c | 262 > +++ > 4 files changed, 273 insertions(+) > create mode 100644 drivers/reset/reset-ti-sci.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index accf991..b93d91a 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -11901,6 +11901,7 @@ F: include/dt-bindings/clock/k2g.h > F: drivers/clk/keystone/sci-clk.c > F: Documentation/devicetree/bindings/reset/ti,sci-reset.txt > F: include/dt-bindings/reset/k2g.h > +F: drivers/reset/reset-ti-sci.c > > THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER > M: Hans Verkuil > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig > index 06d9fa2..4c21c9d 100644 > --- a/drivers/reset/Kconfig > +++ b/drivers/reset/Kconfig > @@ -66,6 +66,15 @@ config RESET_SUNXI > help > This enables the reset driver for Allwinner SoCs. > > +config RESET_TI_SCI > + tristate "TI System Control Interface (TI-SCI) reset driver" > + depends on RESET_CONTROLLER > + depends on TI_SCI_PROTOCOL > + help > + This enables the reset driver support over TI System Control > Interface > + available on some new TI SoCs. If you wish to use reset resources > + managed by the TI System Controller, say Y here. Otherwise, say N. > + > config TI_SYSCON_RESET > tristate "TI SYSCON Reset Driver" > depends on HAS_IOMEM > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile > index bbe7026..36321f2 100644 > --- a/drivers/reset/Makefile > +++ b/drivers/reset/Makefile > @@ -10,6 +10,7 @@ obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o > obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o > obj-$(CONFIG_RESET_STM32) += reset-stm32.o > obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o > +obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o > obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o > obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o > obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o > diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c > new file mode 100644 > index 000..42ccf12 > --- /dev/null > +++ b/drivers/reset/reset-ti-sci.c > @@ -0,0 +1,262 @@ > +/* > + * Texas Instrument's System Control Interface (TI-SCI) reset driver > + * > + * Copyright (C) 2015-2016 Texas Instruments Incorporated - > http://www.ti.com/ > + * Andrew F. Davis > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any > + * kind, whether express or implied; without even the implied warranty > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +/** > + * struct ti_sci_reset_control - reset control structure > + * @dev_id: SoC-specific device identifier > + * @reset_mask: reset mask to use for toggling reset > + */ > +struct ti_sci_reset_control { > + u32 dev_id; > + u32 reset_mask; > +}; > + > +/** > + * struct ti_sci_reset_data - reset controller information structure > + * @rcdev: reset controller entity > + * @dev: reset controller device pointer > + * @sci: TI SCI handle used for communication with system controller > + * @idr: idr structure for mapping ids to reset control structures > + */ > +struct ti_sci_reset_data { > + struct reset_controller_dev rcdev; > + struct device *dev; > + const struct ti_sci_handle *sci; > + struct idr idr; > +}; > + > +#define to_ti_sci_reset_data(p)\ > + container_of((p), struct ti_sci_reset_data, rcdev) > + > +/** > + * ti_sci_reset_set() - program a device's reset > + * @rcdev: reset controller entity > +
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
On Fri, Oct 28, 2016 at 4:36 AM, Philipp Zabelwrote: > Hi Andrew, > > is there (going to be) as stable branch I can base these on, or should I > just wait until the prerequisite patches appear in arm-soc/for-next? > TISCI is still to be merged. http://marc.info/?l=linux-arm-kernel=147756439730680=2 pull request for 4.10 was send out recently. --- Regards, Nishanth Menon
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
On Fri, Oct 28, 2016 at 4:36 AM, Philipp Zabel wrote: > Hi Andrew, > > is there (going to be) as stable branch I can base these on, or should I > just wait until the prerequisite patches appear in arm-soc/for-next? > TISCI is still to be merged. http://marc.info/?l=linux-arm-kernel=147756439730680=2 pull request for 4.10 was send out recently. --- Regards, Nishanth Menon
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
Hi Andrew, is there (going to be) as stable branch I can base these on, or should I just wait until the prerequisite patches appear in arm-soc/for-next? Am Donnerstag, den 27.10.2016, 16:49 -0500 schrieb Andrew F. Davis: > Some TI Keystone family of SoCs contain a system controller (like the > Power Management Micro Controller (PMMC) on K2G SoCs) that manage the > low-level device control (like clocks, resets etc) for the various > hardware modules present on the SoC. These device control operations > are provided to the host processor OS through a communication protocol > called the TI System Control Interface (TI SCI) protocol. > > This patch adds a reset driver that communicates to the system > controller over the TI SCI protocol for performing reset management > of various devices present on the SoC. Various reset functionalities > are achieved by the means of different TI SCI device operations > provided by the TI SCI framework. > > Signed-off-by: Andrew F. Davis> [s-a...@ti.com: documentation changes, revised commit message] > Signed-off-by: Suman Anna > Signed-off-by: Nishanth Menon > --- > MAINTAINERS | 1 + > drivers/reset/Kconfig| 9 ++ > drivers/reset/Makefile | 1 + > drivers/reset/reset-ti-sci.c | 262 > +++ > 4 files changed, 273 insertions(+) > create mode 100644 drivers/reset/reset-ti-sci.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index accf991..b93d91a 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -11901,6 +11901,7 @@ F:include/dt-bindings/clock/k2g.h > F: drivers/clk/keystone/sci-clk.c > F: Documentation/devicetree/bindings/reset/ti,sci-reset.txt > F: include/dt-bindings/reset/k2g.h > +F: drivers/reset/reset-ti-sci.c > > THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER > M: Hans Verkuil > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig > index 06d9fa2..4c21c9d 100644 > --- a/drivers/reset/Kconfig > +++ b/drivers/reset/Kconfig > @@ -66,6 +66,15 @@ config RESET_SUNXI > help > This enables the reset driver for Allwinner SoCs. > > +config RESET_TI_SCI > + tristate "TI System Control Interface (TI-SCI) reset driver" > + depends on RESET_CONTROLLER > + depends on TI_SCI_PROTOCOL > + help > + This enables the reset driver support over TI System Control Interface > + available on some new TI SoCs. If you wish to use reset resources > + managed by the TI System Controller, say Y here. Otherwise, say N. > + > config TI_SYSCON_RESET > tristate "TI SYSCON Reset Driver" > depends on HAS_IOMEM > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile > index bbe7026..36321f2 100644 > --- a/drivers/reset/Makefile > +++ b/drivers/reset/Makefile > @@ -10,6 +10,7 @@ obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o > obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o > obj-$(CONFIG_RESET_STM32) += reset-stm32.o > obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o > +obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o > obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o > obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o > obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o > diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c > new file mode 100644 > index 000..42ccf12 > --- /dev/null > +++ b/drivers/reset/reset-ti-sci.c > @@ -0,0 +1,262 @@ > +/* > + * Texas Instrument's System Control Interface (TI-SCI) reset driver > + * > + * Copyright (C) 2015-2016 Texas Instruments Incorporated - > http://www.ti.com/ > + * Andrew F. Davis > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any > + * kind, whether express or implied; without even the implied warranty > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +/** > + * struct ti_sci_reset_control - reset control structure > + * @dev_id: SoC-specific device identifier > + * @reset_mask: reset mask to use for toggling reset > + */ > +struct ti_sci_reset_control { > + u32 dev_id; > + u32 reset_mask; > +}; > + > +/** > + * struct ti_sci_reset_data - reset controller information structure > + * @rcdev: reset controller entity > + * @dev: reset controller device pointer > + * @sci: TI SCI handle used for communication with system controller > + * @idr: idr structure for mapping ids to reset control structures > + */ > +struct ti_sci_reset_data { > + struct reset_controller_dev rcdev; > + struct device *dev; > + const struct ti_sci_handle *sci; > + struct idr idr; > +}; > + > +#define
Re: [PATCH v2 3/3] reset: Add the TI SCI reset driver
Hi Andrew, is there (going to be) as stable branch I can base these on, or should I just wait until the prerequisite patches appear in arm-soc/for-next? Am Donnerstag, den 27.10.2016, 16:49 -0500 schrieb Andrew F. Davis: > Some TI Keystone family of SoCs contain a system controller (like the > Power Management Micro Controller (PMMC) on K2G SoCs) that manage the > low-level device control (like clocks, resets etc) for the various > hardware modules present on the SoC. These device control operations > are provided to the host processor OS through a communication protocol > called the TI System Control Interface (TI SCI) protocol. > > This patch adds a reset driver that communicates to the system > controller over the TI SCI protocol for performing reset management > of various devices present on the SoC. Various reset functionalities > are achieved by the means of different TI SCI device operations > provided by the TI SCI framework. > > Signed-off-by: Andrew F. Davis > [s-a...@ti.com: documentation changes, revised commit message] > Signed-off-by: Suman Anna > Signed-off-by: Nishanth Menon > --- > MAINTAINERS | 1 + > drivers/reset/Kconfig| 9 ++ > drivers/reset/Makefile | 1 + > drivers/reset/reset-ti-sci.c | 262 > +++ > 4 files changed, 273 insertions(+) > create mode 100644 drivers/reset/reset-ti-sci.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index accf991..b93d91a 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -11901,6 +11901,7 @@ F:include/dt-bindings/clock/k2g.h > F: drivers/clk/keystone/sci-clk.c > F: Documentation/devicetree/bindings/reset/ti,sci-reset.txt > F: include/dt-bindings/reset/k2g.h > +F: drivers/reset/reset-ti-sci.c > > THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER > M: Hans Verkuil > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig > index 06d9fa2..4c21c9d 100644 > --- a/drivers/reset/Kconfig > +++ b/drivers/reset/Kconfig > @@ -66,6 +66,15 @@ config RESET_SUNXI > help > This enables the reset driver for Allwinner SoCs. > > +config RESET_TI_SCI > + tristate "TI System Control Interface (TI-SCI) reset driver" > + depends on RESET_CONTROLLER > + depends on TI_SCI_PROTOCOL > + help > + This enables the reset driver support over TI System Control Interface > + available on some new TI SoCs. If you wish to use reset resources > + managed by the TI System Controller, say Y here. Otherwise, say N. > + > config TI_SYSCON_RESET > tristate "TI SYSCON Reset Driver" > depends on HAS_IOMEM > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile > index bbe7026..36321f2 100644 > --- a/drivers/reset/Makefile > +++ b/drivers/reset/Makefile > @@ -10,6 +10,7 @@ obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o > obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o > obj-$(CONFIG_RESET_STM32) += reset-stm32.o > obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o > +obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o > obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o > obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o > obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o > diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c > new file mode 100644 > index 000..42ccf12 > --- /dev/null > +++ b/drivers/reset/reset-ti-sci.c > @@ -0,0 +1,262 @@ > +/* > + * Texas Instrument's System Control Interface (TI-SCI) reset driver > + * > + * Copyright (C) 2015-2016 Texas Instruments Incorporated - > http://www.ti.com/ > + * Andrew F. Davis > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any > + * kind, whether express or implied; without even the implied warranty > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +/** > + * struct ti_sci_reset_control - reset control structure > + * @dev_id: SoC-specific device identifier > + * @reset_mask: reset mask to use for toggling reset > + */ > +struct ti_sci_reset_control { > + u32 dev_id; > + u32 reset_mask; > +}; > + > +/** > + * struct ti_sci_reset_data - reset controller information structure > + * @rcdev: reset controller entity > + * @dev: reset controller device pointer > + * @sci: TI SCI handle used for communication with system controller > + * @idr: idr structure for mapping ids to reset control structures > + */ > +struct ti_sci_reset_data { > + struct reset_controller_dev rcdev; > + struct device *dev; > + const struct ti_sci_handle *sci; > + struct idr idr; > +}; > + > +#define to_ti_sci_reset_data(p) \ > + container_of((p), struct