Skip to content

Commit

Permalink
reset: uniphier-usb3: Rename to reset-uniphier-glue
Browse files Browse the repository at this point in the history
This driver works for controlling the reset lines including USB3
glue layer, however, this can be applied to other glue layers.
Now this patch renames the driver from "reset-uniphier-usb3" to
"reset-uniphier-glue".

At the same time, this changes CONFIG_RESET_UNIPHIER_USB3 to
CONFIG_RESET_UNIPHIER_GLUE.

Signed-off-by: Kunihiko Hayashi <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
  • Loading branch information
khayash1 authored and pH5 committed Jan 7, 2019
1 parent 21b2213 commit 3eb8f76
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions drivers/reset/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ 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_UNIPHIER_USB3
tristate "USB3 reset driver for UniPhier SoCs"
config RESET_UNIPHIER_GLUE
tristate "Reset driver in glue layer for UniPhier SoCs"
depends on (ARCH_UNIPHIER || COMPILE_TEST) && OF
default ARCH_UNIPHIER
select RESET_SIMPLE
help
Support for the USB3 core reset on UniPhier SoCs.
Say Y if you want to control reset signals provided by
USB3 glue layer.
Support for peripheral core reset included in its own glue layer
on UniPhier SoCs. Say Y if you want to control reset signals
provided by the glue layer.

config RESET_ZYNQ
bool "ZYNQ Reset Driver" if COMPILE_TEST
Expand Down
2 changes: 1 addition & 1 deletion drivers/reset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o
obj-$(CONFIG_RESET_TI_SYSCON) += reset-ti-syscon.o
obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o
obj-$(CONFIG_RESET_UNIPHIER_USB3) += reset-uniphier-usb3.o
obj-$(CONFIG_RESET_UNIPHIER_GLUE) += reset-uniphier-glue.o
obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
//
// reset-uniphier-usb3.c - USB3 reset driver for UniPhier
// reset-uniphier-glue.c - Glue layer reset driver for UniPhier
// Copyright 2018 Socionext Inc.
// Author: Kunihiko Hayashi <[email protected]>

Expand All @@ -15,24 +15,24 @@
#define MAX_CLKS 2
#define MAX_RSTS 2

struct uniphier_usb3_reset_soc_data {
struct uniphier_glue_reset_soc_data {
int nclks;
const char * const *clock_names;
int nrsts;
const char * const *reset_names;
};

struct uniphier_usb3_reset_priv {
struct uniphier_glue_reset_priv {
struct clk_bulk_data clk[MAX_CLKS];
struct reset_control *rst[MAX_RSTS];
struct reset_simple_data rdata;
const struct uniphier_usb3_reset_soc_data *data;
const struct uniphier_glue_reset_soc_data *data;
};

static int uniphier_usb3_reset_probe(struct platform_device *pdev)
static int uniphier_glue_reset_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct uniphier_usb3_reset_priv *priv;
struct uniphier_glue_reset_priv *priv;
struct resource *res;
resource_size_t size;
const char *name;
Expand Down Expand Up @@ -100,9 +100,9 @@ static int uniphier_usb3_reset_probe(struct platform_device *pdev)
return ret;
}

static int uniphier_usb3_reset_remove(struct platform_device *pdev)
static int uniphier_glue_reset_remove(struct platform_device *pdev)
{
struct uniphier_usb3_reset_priv *priv = platform_get_drvdata(pdev);
struct uniphier_glue_reset_priv *priv = platform_get_drvdata(pdev);
int i;

for (i = 0; i < priv->data->nrsts; i++)
Expand All @@ -117,7 +117,7 @@ static const char * const uniphier_pro4_clock_reset_names[] = {
"gio", "link",
};

static const struct uniphier_usb3_reset_soc_data uniphier_pro4_data = {
static const struct uniphier_glue_reset_soc_data uniphier_pro4_data = {
.nclks = ARRAY_SIZE(uniphier_pro4_clock_reset_names),
.clock_names = uniphier_pro4_clock_reset_names,
.nrsts = ARRAY_SIZE(uniphier_pro4_clock_reset_names),
Expand All @@ -128,14 +128,14 @@ static const char * const uniphier_pxs2_clock_reset_names[] = {
"link",
};

static const struct uniphier_usb3_reset_soc_data uniphier_pxs2_data = {
static const struct uniphier_glue_reset_soc_data uniphier_pxs2_data = {
.nclks = ARRAY_SIZE(uniphier_pxs2_clock_reset_names),
.clock_names = uniphier_pxs2_clock_reset_names,
.nrsts = ARRAY_SIZE(uniphier_pxs2_clock_reset_names),
.reset_names = uniphier_pxs2_clock_reset_names,
};

static const struct of_device_id uniphier_usb3_reset_match[] = {
static const struct of_device_id uniphier_glue_reset_match[] = {
{
.compatible = "socionext,uniphier-pro4-usb3-reset",
.data = &uniphier_pro4_data,
Expand All @@ -154,18 +154,18 @@ static const struct of_device_id uniphier_usb3_reset_match[] = {
},
{ /* Sentinel */ }
};
MODULE_DEVICE_TABLE(of, uniphier_usb3_reset_match);
MODULE_DEVICE_TABLE(of, uniphier_glue_reset_match);

static struct platform_driver uniphier_usb3_reset_driver = {
.probe = uniphier_usb3_reset_probe,
.remove = uniphier_usb3_reset_remove,
static struct platform_driver uniphier_glue_reset_driver = {
.probe = uniphier_glue_reset_probe,
.remove = uniphier_glue_reset_remove,
.driver = {
.name = "uniphier-usb3-reset",
.of_match_table = uniphier_usb3_reset_match,
.name = "uniphier-glue-reset",
.of_match_table = uniphier_glue_reset_match,
},
};
module_platform_driver(uniphier_usb3_reset_driver);
module_platform_driver(uniphier_glue_reset_driver);

MODULE_AUTHOR("Kunihiko Hayashi <[email protected]>");
MODULE_DESCRIPTION("UniPhier USB3 Reset Driver");
MODULE_DESCRIPTION("UniPhier Glue layer reset driver");
MODULE_LICENSE("GPL");

0 comments on commit 3eb8f76

Please sign in to comment.