Re: [PATCH v2 2/2] ARC: reset: remove the misleading v1 suffix all over

From: Philipp Zabel
Date: Mon Sep 18 2017 - 07:57:40 EST


On Mon, 2017-09-18 at 13:48 +0200, Philipp Zabel wrote:
> From: Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx>
>
> There is no plan yet to do a v2 board. And even if we were to do it
> only
> some IPs would actually change, so it be best to add suffixes at that
> point, not now !
>
> Signed-off-by: Vineet Gupta <vgupta@xxxxxxxxxxxx>
> Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> ---

v2: added missing changes to previously missing DT binding docs

---
> Â...{snps,hsdk-v1-reset.txt => snps,hsdk-reset.txt} |ÂÂ8 ++--
> ÂMAINTAINERSÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ6 +--
> Âdrivers/reset/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ6 +--
> Âdrivers/reset/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ2 +-
> Âdrivers/reset/{reset-hsdk-v1.c => reset-hsdk.c}ÂÂÂÂ| 44 +++++++++++
> -----------
> Âinclude/dt-bindings/reset/snps,hsdk-reset.hÂÂÂÂÂÂÂÂ| 17 +++++++++
> Âinclude/dt-bindings/reset/snps,hsdk-v1-reset.hÂÂÂÂÂ| 17 ---------
> Â7 files changed, 50 insertions(+), 50 deletions(-)
> Ârename Documentation/devicetree/bindings/reset/{snps,hsdk-v1-
> reset.txt => snps,hsdk-reset.txt} (74%)
> Ârename drivers/reset/{reset-hsdk-v1.c => reset-hsdk.c} (72%)
> Âcreate mode 100644 include/dt-bindings/reset/snps,hsdk-reset.h
> Âdelete mode 100644 include/dt-bindings/reset/snps,hsdk-v1-reset.h
>
> diff --git a/Documentation/devicetree/bindings/reset/snps,hsdk-v1-
> reset.txt b/Documentation/devicetree/bindings/reset/snps,hsdk-
> reset.txt
> similarity index 74%
> rename from Documentation/devicetree/bindings/reset/snps,hsdk-v1-
> reset.txt
> rename to Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt
> index 6a68146ee3537..830069b1c37c4 100644
> --- a/Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt
> +++ b/Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt
> @@ -1,11 +1,11 @@
> -Binding for the HSDK v1 reset controller
> +Binding for the Synopsys HSDK reset controller
> Â
> ÂThis binding uses the common reset binding[1].
> Â
> Â[1] Documentation/devicetree/bindings/reset/reset.txt
> Â
> ÂRequired properties:
> -- compatible: should be "snps,hsdk-v1.0-reset".
> +- compatible: should be "snps,hsdk-reset".
> Â- reg: should always contain 2 pairs address - length: first for
> reset
> ÂÂÂconfiguration register and second for corresponding SW reset and
> status bits
> ÂÂÂregister.
> @@ -13,7 +13,7 @@ Required properties:
> Â
> ÂExample:
> Â reset: reset@880 {
> - compatible = "snps,hsdk-v1.0-reset";
> + compatible = "snps,hsdk-reset";
> Â #reset-cells = <1>;
> Â reg = <0x8A0 0x4>, <0xFF0 0x4>;
> Â };
> @@ -25,4 +25,4 @@ Specifying reset lines connected to IP modules:
> Â ....
> Â };
> Â
> -The index could be found in <dt-bindings/reset/snps,hsdk-v1-reset.h>
> +The index could be found in <dt-bindings/reset/snps,hsdk-reset.h>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2281af4b41b6c..3b9887b3644ef 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -12915,9 +12915,9 @@ F: drivers/mmc/host/dw_mmc*
> ÂSYNOPSYS HSDK RESET CONTROLLER DRIVER
> ÂM: Eugeniy Paltsev <Eugeniy.Paltsev@xxxxxxxxxxxx>
> ÂS: Supported
> -F: drivers/reset/reset-hsdk-v1.c
> -F: include/dt-bindings/reset/snps,hsdk-v1-reset.h
> -F: Documentation/devicetree/bindings/reset/snps,hsdk-v1-
> reset.txt
> +F: drivers/reset/reset-hsdk.c
> +F: include/dt-bindings/reset/snps,hsdk-reset.h
> +F: Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt
> Â
> ÂSYSTEM CONFIGURATION (SYSCON)
> ÂM: Lee Jones <lee.jones@xxxxxxxxxx>
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index d063bd5373dd8..a7c7d5a8c089d 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -34,12 +34,12 @@ config RESET_BERLIN
> Â help
> Â ÂÂThis enables the reset controller driver for Marvell Berlin
> SoCs.
> Â
> -config RESET_HSDK_V1
> - bool "HSDK v1 Reset Driver"
> +config RESET_HSDK
> + bool "Synopsys HSDK Reset Driver"
> Â depends on HAS_IOMEM
> Â default n
> Â help
> - ÂÂThis enables the reset controller driver for HSDK v1.
> + ÂÂThis enables the reset controller driver for HSDK board.
> Â
> Âconfig RESET_IMX7
> Â bool "i.MX7 Reset Driver" if COMPILE_TEST
> diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile
> index d368367110e55..af1c15c330b30 100644
> --- a/drivers/reset/Makefile
> +++ b/drivers/reset/Makefile
> @@ -5,7 +5,7 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/
> Âobj-$(CONFIG_RESET_A10SR) += reset-a10sr.o
> Âobj-$(CONFIG_RESET_ATH79) += reset-ath79.o
> Âobj-$(CONFIG_RESET_BERLIN) += reset-berlin.o
> -obj-$(CONFIG_RESET_HSDK_V1) += reset-hsdk-v1.o
> +obj-$(CONFIG_RESET_HSDK) += reset-hsdk.o
> Âobj-$(CONFIG_RESET_IMX7) += reset-imx7.o
> Âobj-$(CONFIG_RESET_LANTIQ) += reset-lantiq.o
> Âobj-$(CONFIG_RESET_LPC18XX) += reset-lpc18xx.o
> diff --git a/drivers/reset/reset-hsdk-v1.c b/drivers/reset/reset-
> hsdk.c
> similarity index 72%
> rename from drivers/reset/reset-hsdk-v1.c
> rename to drivers/reset/reset-hsdk.c
> index bca13e4bf6223..8bce391c6943b 100644
> --- a/drivers/reset/reset-hsdk-v1.c
> +++ b/drivers/reset/reset-hsdk.c
> @@ -1,7 +1,7 @@
> Â/*
> Â * Copyright (C) 2017 Synopsys.
> Â *
> - * Synopsys HSDKv1 SDP reset driver.
> + * Synopsys HSDK Development platform reset driver.
> Â *
> Â * This file is licensed under the terms of the GNU General Public
> Â * License version 2. This program is licensed "as is" without any
> @@ -18,9 +18,9 @@
> Â#include <linux/slab.h>
> Â#include <linux/types.h>
> Â
> -#define to_hsdkv1_rst(p) container_of((p), struct hsdkv1_rst,
> rcdev)
> +#define to_hsdk_rst(p) container_of((p), struct hsdk_rst,
> rcdev)
> Â
> -struct hsdkv1_rst {
> +struct hsdk_rst {
> Â void __iomem *regs_ctl;
> Â void __iomem *regs_rst;
> Â spinlock_t lock;
> @@ -49,12 +49,12 @@ static const u32 rst_map[] = {
> Â#define CGU_IP_SW_RESET_RESET BIT(0)
> Â#define SW_RESET_TIMEOUT 10000
> Â
> -static void hsdkv1_reset_config(struct hsdkv1_rst *rst, unsigned long
> id)
> +static void hsdk_reset_config(struct hsdk_rst *rst, unsigned long id)
> Â{
> Â writel(rst_map[id], rst->regs_ctl + CGU_SYS_RST_CTRL);
> Â}
> Â
> -static int hsdkv1_reset_do(struct hsdkv1_rst *rst)
> +static int hsdk_reset_do(struct hsdk_rst *rst)
> Â{
> Â u32 reg;
> Â
> @@ -69,28 +69,28 @@ static int hsdkv1_reset_do(struct hsdkv1_rst *rst)
> Â !(reg & CGU_IP_SW_RESET_RESET), 5, SW_RESET_TIMEOUT);
> Â}
> Â
> -static int hsdkv1_reset_reset(struct reset_controller_dev *rcdev,
> +static int hsdk_reset_reset(struct reset_controller_dev *rcdev,
> Â ÂÂÂÂÂÂunsigned long id)
> Â{
> - struct hsdkv1_rst *rst = to_hsdkv1_rst(rcdev);
> + struct hsdk_rst *rst = to_hsdk_rst(rcdev);
> Â unsigned long flags;
> Â int ret;
> Â
> Â spin_lock_irqsave(&rst->lock, flags);
> - hsdkv1_reset_config(rst, id);
> - ret = hsdkv1_reset_do(rst);
> + hsdk_reset_config(rst, id);
> + ret = hsdk_reset_do(rst);
> Â spin_unlock_irqrestore(&rst->lock, flags);
> Â
> Â return ret;
> Â}
> Â
> -static const struct reset_control_ops hsdkv1_reset_ops = {
> - .reset = hsdkv1_reset_reset,
> +static const struct reset_control_ops hsdk_reset_ops = {
> + .reset = hsdk_reset_reset,
> Â};
> Â
> -static int hsdkv1_reset_probe(struct platform_device *pdev)
> +static int hsdk_reset_probe(struct platform_device *pdev)
> Â{
> - struct hsdkv1_rst *rst;
> + struct hsdk_rst *rst;
> Â struct resource *mem;
> Â
> Â rst = devm_kzalloc(&pdev->dev, sizeof(*rst), GFP_KERNEL);
> @@ -110,7 +110,7 @@ static int hsdkv1_reset_probe(struct
> platform_device *pdev)
> Â spin_lock_init(&rst->lock);
> Â
> Â rst->rcdev.owner = THIS_MODULE;
> - rst->rcdev.ops = &hsdkv1_reset_ops;
> + rst->rcdev.ops = &hsdk_reset_ops;
> Â rst->rcdev.of_node = pdev->dev.of_node;
> Â rst->rcdev.nr_resets = HSDK_MAX_RESETS;
> Â rst->rcdev.of_reset_n_cells = 1;
> @@ -118,20 +118,20 @@ static int hsdkv1_reset_probe(struct
> platform_device *pdev)
> Â return reset_controller_register(&rst->rcdev);
> Â}
> Â
> -static const struct of_device_id hsdkv1_reset_dt_match[] = {
> - { .compatible = "snps,hsdk-v1.0-reset" },
> +static const struct of_device_id hsdk_reset_dt_match[] = {
> + { .compatible = "snps,hsdk-reset" },
> Â { },
> Â};
> Â
> -static struct platform_driver hsdkv1_reset_driver = {
> - .probe = hsdkv1_reset_probe,
> +static struct platform_driver hsdk_reset_driver = {
> + .probe = hsdk_reset_probe,
> Â .driver = {
> - .name = "hsdk-v1.0-reset",
> - .of_match_table = hsdkv1_reset_dt_match,
> + .name = "hsdk-reset",
> + .of_match_table = hsdk_reset_dt_match,
> Â },
> Â};
> -builtin_platform_driver(hsdkv1_reset_driver);
> +builtin_platform_driver(hsdk_reset_driver);
> Â
> ÂMODULE_AUTHOR("Eugeniy Paltsev <Eugeniy.Paltsev@xxxxxxxxxxxx>");
> -MODULE_DESCRIPTION("Synopsys HSDKv1 SDP reset driver");
> +MODULE_DESCRIPTION("Synopsys HSDK SDP reset driver");
> ÂMODULE_LICENSE("GPL v2");
> diff --git a/include/dt-bindings/reset/snps,hsdk-reset.h b/include/dt-
> bindings/reset/snps,hsdk-reset.h
> new file mode 100644
> index 0000000000000..e1a643e4bc915
> --- /dev/null
> +++ b/include/dt-bindings/reset/snps,hsdk-reset.h
> @@ -0,0 +1,17 @@
> +/**
> + * This header provides index for the HSDK reset controller.
> + */
> +#ifndef _DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK
> +#define _DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK
> +
> +#define HSDK_APB_RESET 0
> +#define HSDK_AXI_RESET 1
> +#define HSDK_ETH_RESET 2
> +#define HSDK_USB_RESET 3
> +#define HSDK_SDIO_RESET 4
> +#define HSDK_HDMI_RESET 5
> +#define HSDK_GFX_RESET 6
> +#define HSDK_DMAC_RESET 7
> +#define HSDK_EBI_RESET 8
> +
> +#endif /*_DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK*/
> diff --git a/include/dt-bindings/reset/snps,hsdk-v1-reset.h
> b/include/dt-bindings/reset/snps,hsdk-v1-reset.h
> deleted file mode 100644
> index d898c89b71232..0000000000000
> --- a/include/dt-bindings/reset/snps,hsdk-v1-reset.h
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -/**
> - * This header provides index for the HSDK v1 reset controller.
> - */
> -#ifndef _DT_BINDINGS_RESET_CONTROLLER_HSDK_V1
> -#define _DT_BINDINGS_RESET_CONTROLLER_HSDK_V1
> -
> -#define HSDK_V1_APB_RESET 0
> -#define HSDK_V1_AXI_RESET 1
> -#define HSDK_V1_ETH_RESET 2
> -#define HSDK_V1_USB_RESET 3
> -#define HSDK_V1_SDIO_RESET 4
> -#define HSDK_V1_HDMI_RESET 5
> -#define HSDK_V1_GFX_RESET 6
> -#define HSDK_V1_DMAC_RESET 7
> -#define HSDK_V1_EBI_RESET 8
> -
> -#endif /*_DT_BINDINGS_RESET_CONTROLLER_HSDK_V1*/