Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13541226 authored by Vineet Gupta's avatar Vineet Gupta Committed by Philipp Zabel
Browse files

ARC: reset: remove the misleading v1 suffix all over



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: default avatarVineet Gupta <vgupta@synopsys.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent fc9655e6
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
Binding for the HSDK v1 reset controller
Binding for the Synopsys HSDK reset controller


This binding uses the common reset binding[1].
This binding uses the common reset binding[1].


[1] Documentation/devicetree/bindings/reset/reset.txt
[1] Documentation/devicetree/bindings/reset/reset.txt


Required properties:
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
- reg: should always contain 2 pairs address - length: first for reset
  configuration register and second for corresponding SW reset and status bits
  configuration register and second for corresponding SW reset and status bits
  register.
  register.
@@ -13,7 +13,7 @@ Required properties:


Example:
Example:
	reset: reset@880 {
	reset: reset@880 {
		compatible = "snps,hsdk-v1.0-reset";
		compatible = "snps,hsdk-reset";
		#reset-cells = <1>;
		#reset-cells = <1>;
		reg = <0x8A0 0x4>, <0xFF0 0x4>;
		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>
+3 −3
Original line number Original line Diff line number Diff line
@@ -12915,9 +12915,9 @@ F: drivers/mmc/host/dw_mmc*
SYNOPSYS HSDK RESET CONTROLLER DRIVER
SYNOPSYS HSDK RESET CONTROLLER DRIVER
M:	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
M:	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
S:	Supported
S:	Supported
F:	drivers/reset/reset-hsdk-v1.c
F:	drivers/reset/reset-hsdk.c
F:	include/dt-bindings/reset/snps,hsdk-v1-reset.h
F:	include/dt-bindings/reset/snps,hsdk-reset.h
F:	Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt
F:	Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt


SYSTEM CONFIGURATION (SYSCON)
SYSTEM CONFIGURATION (SYSCON)
M:	Lee Jones <lee.jones@linaro.org>
M:	Lee Jones <lee.jones@linaro.org>
+3 −3
Original line number Original line Diff line number Diff line
@@ -34,12 +34,12 @@ config RESET_BERLIN
	help
	help
	  This enables the reset controller driver for Marvell Berlin SoCs.
	  This enables the reset controller driver for Marvell Berlin SoCs.


config RESET_HSDK_V1
config RESET_HSDK
	bool "HSDK v1 Reset Driver"
	bool "Synopsys HSDK Reset Driver"
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	default n
	default n
	help
	help
	  This enables the reset controller driver for HSDK v1.
	  This enables the reset controller driver for HSDK board.


config RESET_IMX7
config RESET_IMX7
	bool "i.MX7 Reset Driver" if COMPILE_TEST
	bool "i.MX7 Reset Driver" if COMPILE_TEST
+1 −1
Original line number Original line Diff line number Diff line
@@ -5,7 +5,7 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/
obj-$(CONFIG_RESET_A10SR) += reset-a10sr.o
obj-$(CONFIG_RESET_A10SR) += reset-a10sr.o
obj-$(CONFIG_RESET_ATH79) += reset-ath79.o
obj-$(CONFIG_RESET_ATH79) += reset-ath79.o
obj-$(CONFIG_RESET_BERLIN) += reset-berlin.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_IMX7) += reset-imx7.o
obj-$(CONFIG_RESET_LANTIQ) += reset-lantiq.o
obj-$(CONFIG_RESET_LANTIQ) += reset-lantiq.o
obj-$(CONFIG_RESET_LPC18XX) += reset-lpc18xx.o
obj-$(CONFIG_RESET_LPC18XX) += reset-lpc18xx.o
+22 −22
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (C) 2017 Synopsys.
 * 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
 * This file is licensed under the terms of the GNU General Public
 * License version 2. This program is licensed "as is" without any
 * License version 2. This program is licensed "as is" without any
@@ -18,9 +18,9 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/types.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_ctl;
	void __iomem			*regs_rst;
	void __iomem			*regs_rst;
	spinlock_t			lock;
	spinlock_t			lock;
@@ -49,12 +49,12 @@ static const u32 rst_map[] = {
#define CGU_IP_SW_RESET_RESET		BIT(0)
#define CGU_IP_SW_RESET_RESET		BIT(0)
#define SW_RESET_TIMEOUT		10000
#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);
	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;
	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);
		!(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)
			      unsigned long id)
{
{
	struct hsdkv1_rst *rst = to_hsdkv1_rst(rcdev);
	struct hsdk_rst *rst = to_hsdk_rst(rcdev);
	unsigned long flags;
	unsigned long flags;
	int ret;
	int ret;


	spin_lock_irqsave(&rst->lock, flags);
	spin_lock_irqsave(&rst->lock, flags);
	hsdkv1_reset_config(rst, id);
	hsdk_reset_config(rst, id);
	ret = hsdkv1_reset_do(rst);
	ret = hsdk_reset_do(rst);
	spin_unlock_irqrestore(&rst->lock, flags);
	spin_unlock_irqrestore(&rst->lock, flags);


	return ret;
	return ret;
}
}


static const struct reset_control_ops hsdkv1_reset_ops = {
static const struct reset_control_ops hsdk_reset_ops = {
	.reset	= hsdkv1_reset_reset,
	.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;
	struct resource *mem;


	rst = devm_kzalloc(&pdev->dev, sizeof(*rst), GFP_KERNEL);
	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);
	spin_lock_init(&rst->lock);


	rst->rcdev.owner = THIS_MODULE;
	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.of_node = pdev->dev.of_node;
	rst->rcdev.nr_resets = HSDK_MAX_RESETS;
	rst->rcdev.nr_resets = HSDK_MAX_RESETS;
	rst->rcdev.of_reset_n_cells = 1;
	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);
	return reset_controller_register(&rst->rcdev);
}
}


static const struct of_device_id hsdkv1_reset_dt_match[] = {
static const struct of_device_id hsdk_reset_dt_match[] = {
	{ .compatible = "snps,hsdk-v1.0-reset" },
	{ .compatible = "snps,hsdk-reset" },
	{ },
	{ },
};
};


static struct platform_driver hsdkv1_reset_driver = {
static struct platform_driver hsdk_reset_driver = {
	.probe	= hsdkv1_reset_probe,
	.probe	= hsdk_reset_probe,
	.driver	= {
	.driver	= {
		.name = "hsdk-v1.0-reset",
		.name = "hsdk-reset",
		.of_match_table = hsdkv1_reset_dt_match,
		.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@synopsys.com>");
MODULE_AUTHOR("Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>");
MODULE_DESCRIPTION("Synopsys HSDKv1 SDP reset driver");
MODULE_DESCRIPTION("Synopsys HSDK SDP reset driver");
MODULE_LICENSE("GPL v2");
MODULE_LICENSE("GPL v2");
Loading