Skip to contentSkip to conversation

dt: bindings: add documentation for zx2967 family reset controller

PATCH Superseded Baoyou Xie 5 participants 10 messages Jan 17, 2017 – Feb 2, 2017

Subsystems (2)

v3 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Baoyou Xie

author
#0 lore raw

PATCH v3 1/3 dt: bindings: add documentation for zx2967 family reset controller

This patch adds dt-binding documentation for zx2967 family reset controller.

---
 .../devicetree/bindings/reset/zte,zx2967-reset.txt   | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/zte,zx2967-reset.txt
Documentation/devicetree/bindings/reset/zte,zx2967-reset.txt new file +20 -0
new file mode 100644
index 0000000..b015508
@@ -0,0 +1,20 @@
+ZTE zx2967 SoCs Reset Controller
+=======================================
+
+Please also refer to reset.txt in this directory for common reset
+controller binding usage.
+
+Required properties:
+- compatible: should be one of the following.
+	* zte,zx296718-reset
+- reg: physical base address of the controller and length of memory mapped
+	region.
+- #reset-cells: must be 1.
+
+example:
+
+	reset: reset-controller at 1461060 {
+		compatible = "zte,zx296718-reset";
+		reg = <0x01461060 0x8>;
+		#reset-cells = <1>;
+	};
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v3 2/3 MAINTAINERS: add zx2967 reset controller driver to ARM ZTE architecture

Add the zx2967 reset controller driver as maintained by ARM ZTE architecture maintainers, as they're parts of the core IP.

---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
index e63063b..5fb9b62 100644
@@ -1987,9 +1987,11 @@ L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
 S:	Maintained
 F:	arch/arm/mach-zx/
 F:	drivers/clk/zte/
+F:	drivers/reset/reset-zx2967.c
 F:	drivers/soc/zte/
 F:	Documentation/devicetree/bindings/arm/zte.txt
 F:	Documentation/devicetree/bindings/clock/zx296702-clk.txt
+F:	Documentation/devicetree/bindings/reset/zte,zx2967-reset.txt
 F:	Documentation/devicetree/bindings/soc/zte/
 F:	include/dt-bindings/soc/zx*.h
 
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH v3 3/3 reset: zx2967: add reset controller driver for ZTE's zx2967 family

In reply to Baoyou Xie

This patch adds reset controller driver for ZTE's zx2967 family.

---
 drivers/reset/Kconfig        |   6 +++
 drivers/reset/Makefile       |   1 +
 drivers/reset/reset-zx2967.c | 106 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 113 insertions(+)
 create mode 100644 drivers/reset/reset-zx2967.c
drivers/reset/Kconfig +6 -0
index 172dc96..f4cdfe9 100644
@@ -86,6 +86,12 @@ config RESET_UNIPHIER
 	  Say Y if you want to control reset signals provided by System Control
 	  block, Media I/O block, Peripheral Block.
 
+config RESET_ZX2967
+	bool "ZTE ZX2967 Reset Driver"
+	depends on ARCH_ZX || COMPILE_TEST
+	help
+	  This enables the reset controller driver for ZTE's zx2967 family.
+
 config RESET_ZYNQ
 	bool "ZYNQ Reset Driver" if COMPILE_TEST
 	default ARCH_ZYNQ
drivers/reset/Makefile +1 -0
index 13b346e..2cd3f6c 100644
@@ -13,4 +13,5 @@ obj-$(CONFIG_RESET_STM32) += reset-stm32.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
 obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o
 obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o
+obj-$(CONFIG_RESET_ZX2967) += reset-zx2967.o
 obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o
drivers/reset/reset-zx2967.c new file +106 -0

106 lines not on this page · raw message

Signature · 1 line
2.7.4
#4 lore raw

Re: [PATCH v3 3/3] reset: zx2967: add reset controller driver for ZTE's zx2967 family

In reply to Baoyou Xie
Quoted 15 lines · Baoyou Xie

This patch adds reset controller driver for ZTE's zx2967 family.

---
 drivers/reset/Kconfig        |   6 +++
 drivers/reset/Makefile       |   1 +
 drivers/reset/reset-zx2967.c | 106 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 113 insertions(+)
 create mode 100644 drivers/reset/reset-zx2967.c
drivers/reset/Kconfig +0 -0
index 172dc96..f4cdfe9 100644

drivers/reset/Kconfig config RESET_UNIPHIER · line 90

Quoted 5 lines
drivers/reset/Kconfig +2 -0
@@ -86,6 +86,12 @@ config RESET_UNIPHIER
          Say Y if you want to control reset signals provided by System Control
          block, Media I/O block, Peripheral Block.
 
+config RESET_ZX2967
+       bool "ZTE ZX2967 Reset Driver"

This new driver just tripped my linux-next testing for non-modular code that is using modular infrastructure. Is there any value in having this driver as a tristate, or should I send a patch to strip out the needless references to anything modular?

Thanks,
Paul.
--

Quoted 34 lines
drivers/reset/Kconfig +4 -0
+       depends on ARCH_ZX || COMPILE_TEST
+       help
+         This enables the reset controller driver for ZTE's zx2967 family.
+
 config RESET_ZYNQ
        bool "ZYNQ Reset Driver" if COMPILE_TEST
        default ARCH_ZYNQ
drivers/reset/Makefile +1 -0
index 13b346e..2cd3f6c 100644
@@ -13,4 +13,5 @@ obj-$(CONFIG_RESET_STM32) += reset-stm32.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
 obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o
 obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o
+obj-$(CONFIG_RESET_ZX2967) += reset-zx2967.o
 obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o
drivers/reset/reset-zx2967.c new file +11 -0
new file mode 100644
index 0000000..5d82151
@@ -0,0 +1,106 @@
+/*
+ * ZTE's zx2967 family reset controller driver
+ *
+ * Copyright (C) 2017 ZTE Ltd.
+ *
+ * Author: Baoyou Xie <[email protected]>
+ *
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#include <linux/module.h>

[...]

author
#5 lore raw

Re: [PATCH v3 3/3] reset: zx2967: add reset controller driver for ZTE's zx2967 family

Hi, paul:
Could you give more detailed log?

Quoted 72 lines · Paul Gortmaker
Quoted 7 lines · Baoyou Xie

This patch adds reset controller driver for ZTE's zx2967 family.

---
 drivers/reset/Kconfig        |   6 +++
 drivers/reset/Makefile       |   1 +
 drivers/reset/reset-zx2967.c | 106 ++++++++++++++++++++++++++++++

+++++++++++++

drivers/reset/Kconfig config RESET_UNIPHIER · line 86

Quoted 9 lines
 3 files changed, 113 insertions(+)
 create mode 100644 drivers/reset/reset-zx2967.c
drivers/reset/Kconfig +0 -0
index 172dc96..f4cdfe9 100644
@@ -86,6 +86,12 @@ config RESET_UNIPHIER
          Say Y if you want to control reset signals provided by System

Control

drivers/reset/Kconfig config RESET_UNIPHIER · line 90

Quoted 4 lines
drivers/reset/Kconfig +2 -0
          block, Media I/O block, Peripheral Block.
 
+config RESET_ZX2967
+       bool "ZTE ZX2967 Reset Driver"

This new driver just tripped my linux-next testing for non-modular code that is using modular infrastructure. Is there any value in having this driver as a tristate, or should I send a patch to strip out the needless references to anything modular?

Thanks,
Paul.
--

drivers/reset/Kconfig config RESET_UNIPHIER

Quoted 3 lines
drivers/reset/Kconfig +3 -0
+       depends on ARCH_ZX || COMPILE_TEST
+       help
+         This enables the reset controller driver for ZTE's zx2967

family.

Quoted 31 lines
drivers/reset/Kconfig +1 -0
+
 config RESET_ZYNQ
        bool "ZYNQ Reset Driver" if COMPILE_TEST
        default ARCH_ZYNQ
drivers/reset/Makefile +1 -0
index 13b346e..2cd3f6c 100644
@@ -13,4 +13,5 @@ obj-$(CONFIG_RESET_STM32) += reset-stm32.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
 obj-$(CONFIG_TI_SYSCON_RESET) += reset-ti-syscon.o
 obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o
+obj-$(CONFIG_RESET_ZX2967) += reset-zx2967.o
 obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o
drivers/reset/reset-zx2967.c new file +11 -0
new file mode 100644
index 0000000..5d82151
@@ -0,0 +1,106 @@
+/*
+ * ZTE's zx2967 family reset controller driver
+ *
+ * Copyright (C) 2017 ZTE Ltd.
+ *
+ * Author: Baoyou Xie <[email protected]>
+ *
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#include <linux/module.h>

[...]

#6 lore raw

PATCH 1/1 reset: make zx2967 explicitly non-modular

The Kconfig currently controlling compilation of this code is:

config RESET_ZX2967
bool "ZTE ZX2967 Reset Driver

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.

Since builtin_platform_driver() was already in use, the init ordering remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

We don't replace module.h with init.h since the file does not appear to use __init prefix anywhere.

Cc Jun Nie <[email protected]>
Cc Baoyou Xie <[email protected]>
Cc Philipp Zabel <[email protected]>
---
 drivers/reset/reset-zx2967.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/reset/reset-zx2967.c +0 -7
index 5d821513aa3e..4dabb9ec4841 100644
@@ -8,7 +8,6 @@
  * License terms: GNU General Public License (GPL) version 2
  */
 
-#include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/platform_device.h>
 #include <linux/reset-controller.h>
@@ -89,7 +88,6 @@ static const struct of_device_id zx2967_reset_dt_ids[] = {
 	 { .compatible = "zte,zx296718-reset", },
 	 {},
 };
-MODULE_DEVICE_TABLE(of, zx2967_reset_dt_ids);
 
 static struct platform_driver zx2967_reset_driver = {
 	.probe	= zx2967_reset_probe,
@@ -98,9 +96,4 @@ static struct platform_driver zx2967_reset_driver = {
 		.of_match_table	= zx2967_reset_dt_ids,
 	},
 };
-
 builtin_platform_driver(zx2967_reset_driver);
-
-MODULE_AUTHOR("Baoyou Xie <[email protected]>");
-MODULE_DESCRIPTION("ZTE zx2967 Reset Controller Driver");
-MODULE_LICENSE("GPL");
Signature · 1 line
2.11.0
maintainer Applied
#7 lore raw

Re: [PATCH] reset: make zx2967 explicitly non-modular

Quoted 18 lines · Paul Gortmaker

The Kconfig currently controlling compilation of this code is:

config RESET_ZX2967
bool "ZTE ZX2967 Reset Driver

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.

Since builtin_platform_driver() was already in use, the init ordering remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

Quoted 7 lines

We don't replace module.h with init.h since the file does not appear to use __init prefix anywhere.

Cc Jun Nie <[email protected]>
Cc Baoyou Xie <[email protected]>
Cc Philipp Zabel <[email protected]>

Thank you, applied with Baoyou's Reviewed-by.

regards
Philipp

maintainer
#8 lore raw
In reply to Baoyou Xie
Quoted 5 lines · Baoyou Xie

This patch adds dt-binding documentation for zx2967 family reset controller.

Thanks, I've applied all three patches with Shawn's Reviewed-by: on the driver patch.

regards
Philipp

Quoted 31 lines
---
 .../devicetree/bindings/reset/zte,zx2967-reset.txt   | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/zte,zx2967-reset.txt
Documentation/devicetree/bindings/reset/zte,zx2967-reset.txt new file +20 -0
new file mode 100644
index 0000000..b015508
@@ -0,0 +1,20 @@
+ZTE zx2967 SoCs Reset Controller
+=======================================
+
+Please also refer to reset.txt in this directory for common reset
+controller binding usage.
+
+Required properties:
+- compatible: should be one of the following.
+	* zte,zx296718-reset
+- reg: physical base address of the controller and length of memory mapped
+	region.
+- #reset-cells: must be 1.
+
+example:
+
+	reset: reset-controller at 1461060 {
+		compatible = "zte,zx296718-reset";
+		reg = <0x01461060 0x8>;
+		#reset-cells = <1>;
+	};
maintainer Acked-by on v3 1/3
#9 lore raw
In reply to Baoyou Xie
Quoted 9 lines · Baoyou Xie

This patch adds dt-binding documentation for zx2967 family reset controller.

---
 .../devicetree/bindings/reset/zte,zx2967-reset.txt   | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/zte,zx2967-reset.txt