[U-Boot] [PATCH v2 5/5] remoteproc: k3_rproc: Rename to ti_k3_arm64_rproc

Lokesh Vutla lokeshvutla at ti.com
Fri Jun 7 13:55:59 UTC 2019


k3_rproc driver is specifically meant for controlling an arm64
core using TISCI protocol. So rename the driver, Kconfig symbol,
compatible and functions accordingly.

While at it drop this remoteproc selection for a53 defconfig.

Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
---
 configs/am65x_evm_a53_defconfig               |  1 -
 configs/am65x_evm_r5_defconfig                |  2 +-
 configs/am65x_hs_evm_a53_defconfig            |  1 -
 configs/am65x_hs_evm_r5_defconfig             |  2 +-
 drivers/remoteproc/Kconfig                    | 20 ++++---
 drivers/remoteproc/Makefile                   |  2 +-
 .../{k3_rproc.c => ti_k3_arm64_rproc.c}       | 57 ++++++++++---------
 7 files changed, 43 insertions(+), 42 deletions(-)
 rename drivers/remoteproc/{k3_rproc.c => ti_k3_arm64_rproc.c} (77%)

diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index b0c080ebf1..3196b70d2c 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -74,7 +74,6 @@ CONFIG_PINCTRL_SINGLE=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_TI_SCI_POWER_DOMAIN=y
 CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_K3=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_TI_SCI=y
 CONFIG_DM_SERIAL=y
diff --git a/configs/am65x_evm_r5_defconfig b/configs/am65x_evm_r5_defconfig
index 7e81a98454..c59b7d98dc 100644
--- a/configs/am65x_evm_r5_defconfig
+++ b/configs/am65x_evm_r5_defconfig
@@ -86,7 +86,7 @@ CONFIG_SPL_DM_REGULATOR_GPIO=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
 CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_K3=y
+CONFIG_REMOTEPROC_TI_K3_ARM64=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_TI_SCI=y
 CONFIG_DM_SERIAL=y
diff --git a/configs/am65x_hs_evm_a53_defconfig b/configs/am65x_hs_evm_a53_defconfig
index 56052f73f3..48b28b390e 100644
--- a/configs/am65x_hs_evm_a53_defconfig
+++ b/configs/am65x_hs_evm_a53_defconfig
@@ -77,7 +77,6 @@ CONFIG_PINCTRL_SINGLE=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_TI_SCI_POWER_DOMAIN=y
 CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_K3=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_TI_SCI=y
 CONFIG_DM_SERIAL=y
diff --git a/configs/am65x_hs_evm_r5_defconfig b/configs/am65x_hs_evm_r5_defconfig
index d378d1e9ee..2f962b0e82 100644
--- a/configs/am65x_hs_evm_r5_defconfig
+++ b/configs/am65x_hs_evm_r5_defconfig
@@ -86,7 +86,7 @@ CONFIG_SPL_DM_REGULATOR_GPIO=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
 CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_K3=y
+CONFIG_REMOTEPROC_TI_K3_ARM64=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_TI_SCI=y
 CONFIG_DM_SERIAL=y
diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
index 9eb532bc7a..db4d4ee856 100644
--- a/drivers/remoteproc/Kconfig
+++ b/drivers/remoteproc/Kconfig
@@ -22,15 +22,6 @@ config K3_SYSTEM_CONTROLLER
 	help
 	  Say 'y' here to add support for TI' K3 System Controller.
 
-config REMOTEPROC_K3
-	bool "Support for TI's K3 based remoteproc driver"
-	select REMOTEPROC
-	depends on DM
-	depends on ARCH_K3
-	depends on OF_CONTROL
-	help
-	  Say 'y' here to add support for TI' K3 remoteproc driver.
-
 config REMOTEPROC_SANDBOX
 	bool "Support for Test processor for Sandbox"
 	select REMOTEPROC
@@ -40,6 +31,17 @@ config REMOTEPROC_SANDBOX
 	  Say 'y' here to add support for test processor which does dummy
 	  operations for sandbox platform.
 
+config REMOTEPROC_TI_K3_ARM64
+	bool "Support for TI's K3 based ARM64 remoteproc driver"
+	select REMOTEPROC
+	depends on DM
+	depends on ARCH_K3
+	depends on OF_CONTROL
+	help
+	  Say y here to support TI's ARM64 processor subsystems
+	  on various TI K3 family of SoCs through the remote processor
+	  framework.
+
 config REMOTEPROC_TI_POWER
 	bool "Support for TI Power processor"
 	select REMOTEPROC
diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
index 77eb708523..ccc8e7ec32 100644
--- a/drivers/remoteproc/Makefile
+++ b/drivers/remoteproc/Makefile
@@ -8,6 +8,6 @@ obj-$(CONFIG_$(SPL_)REMOTEPROC) += rproc-uclass.o
 
 # Remote proc drivers - Please keep this list alphabetically sorted.
 obj-$(CONFIG_K3_SYSTEM_CONTROLLER) += k3_system_controller.o
-obj-$(CONFIG_REMOTEPROC_K3) += k3_rproc.o
 obj-$(CONFIG_REMOTEPROC_SANDBOX) += sandbox_testproc.o
+obj-$(CONFIG_REMOTEPROC_TI_K3_ARM64) += ti_k3_arm64_rproc.o
 obj-$(CONFIG_REMOTEPROC_TI_POWER) += ti_power_proc.o
diff --git a/drivers/remoteproc/k3_rproc.c b/drivers/remoteproc/ti_k3_arm64_rproc.c
similarity index 77%
rename from drivers/remoteproc/k3_rproc.c
rename to drivers/remoteproc/ti_k3_arm64_rproc.c
index 4f9567c924..9676a96f98 100644
--- a/drivers/remoteproc/k3_rproc.c
+++ b/drivers/remoteproc/ti_k3_arm64_rproc.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Texas Instruments' K3 Remoteproc driver
+ * Texas Instruments' K3 ARM64 Remoteproc driver
  *
  * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
  *	Lokesh Vutla <lokeshvutla at ti.com>
@@ -24,14 +24,14 @@
 #define GTC_CNTR_EN	0x3
 
 /**
- * struct k3_rproc_privdata - Structure representing Remote processor data.
+ * struct k3_arm64_privdata - Structure representing Remote processor data.
  * @rproc_pwrdmn:	rproc power domain data
  * @rproc_rst:		rproc reset control data
  * @sci:		Pointer to TISCI handle
  * @tsp:		TISCI processor control helper structure
  * @gtc_base:		Timer base address.
  */
-struct k3_rproc_privdata {
+struct k3_arm64_privdata {
 	struct power_domain rproc_pwrdmn;
 	struct power_domain gtc_pwrdmn;
 	struct reset_ctl rproc_rst;
@@ -40,16 +40,16 @@ struct k3_rproc_privdata {
 };
 
 /**
- * k3_rproc_load() - Load up the Remote processor image
+ * k3_arm64_load() - Load up the Remote processor image
  * @dev:	rproc device pointer
  * @addr:	Address at which image is available
  * @size:	size of the image
  *
  * Return: 0 if all goes good, else appropriate error message.
  */
-static int k3_rproc_load(struct udevice *dev, ulong addr, ulong size)
+static int k3_arm64_load(struct udevice *dev, ulong addr, ulong size)
 {
-	struct k3_rproc_privdata *rproc = dev_get_priv(dev);
+	struct k3_arm64_privdata *rproc = dev_get_priv(dev);
 	int ret;
 
 	dev_dbg(dev, "%s addr = 0x%lx, size = 0x%lx\n", __func__, addr, size);
@@ -63,14 +63,14 @@ static int k3_rproc_load(struct udevice *dev, ulong addr, ulong size)
 }
 
 /**
- * k3_rproc_start() - Start the remote processor
+ * k3_arm64_start() - Start the remote processor
  * @dev:	rproc device pointer
  *
  * Return: 0 if all went ok, else return appropriate error
  */
-static int k3_rproc_start(struct udevice *dev)
+static int k3_arm64_start(struct udevice *dev)
 {
-	struct k3_rproc_privdata *rproc = dev_get_priv(dev);
+	struct k3_arm64_privdata *rproc = dev_get_priv(dev);
 	int ret;
 
 	dev_dbg(dev, "%s\n", __func__);
@@ -99,12 +99,12 @@ static int k3_rproc_start(struct udevice *dev)
 }
 
 /**
- * k3_rproc_init() - Initialize the remote processor
+ * k3_arm64_init() - Initialize the remote processor
  * @dev:	rproc device pointer
  *
  * Return: 0 if all went ok, else return appropriate error
  */
-static int k3_rproc_init(struct udevice *dev)
+static int k3_arm64_init(struct udevice *dev)
 {
 	dev_dbg(dev, "%s\n", __func__);
 
@@ -114,10 +114,10 @@ static int k3_rproc_init(struct udevice *dev)
 	return 0;
 }
 
-static const struct dm_rproc_ops k3_rproc_ops = {
-	.init = k3_rproc_init,
-	.load = k3_rproc_load,
-	.start = k3_rproc_start,
+static const struct dm_rproc_ops k3_arm64_ops = {
+	.init = k3_arm64_init,
+	.load = k3_arm64_load,
+	.start = k3_arm64_start,
 };
 
 static int ti_sci_proc_of_to_priv(struct udevice *dev, struct ti_sci_proc *tsp)
@@ -148,8 +148,8 @@ static int ti_sci_proc_of_to_priv(struct udevice *dev, struct ti_sci_proc *tsp)
  *
  * Return: 0 if all goes good, else appropriate error message.
  */
-static int k3_rproc_of_to_priv(struct udevice *dev,
-			       struct k3_rproc_privdata *rproc)
+static int k3_arm64_of_to_priv(struct udevice *dev,
+			       struct k3_arm64_privdata *rproc)
 {
 	int ret;
 
@@ -187,21 +187,21 @@ static int k3_rproc_of_to_priv(struct udevice *dev,
 }
 
 /**
- * k3_rproc_probe() - Basic probe
+ * k3_arm64_probe() - Basic probe
  * @dev:	corresponding k3 remote processor device
  *
  * Return: 0 if all goes good, else appropriate error message.
  */
-static int k3_rproc_probe(struct udevice *dev)
+static int k3_arm64_probe(struct udevice *dev)
 {
-	struct k3_rproc_privdata *priv;
+	struct k3_arm64_privdata *priv;
 	int ret;
 
 	dev_dbg(dev, "%s\n", __func__);
 
 	priv = dev_get_priv(dev);
 
-	ret = k3_rproc_of_to_priv(dev, priv);
+	ret = k3_arm64_of_to_priv(dev, priv);
 	if (ret) {
 		dev_dbg(dev, "%s: Probe failed with error %d\n", __func__, ret);
 		return ret;
@@ -212,16 +212,17 @@ static int k3_rproc_probe(struct udevice *dev)
 	return 0;
 }
 
-static const struct udevice_id k3_rproc_ids[] = {
+static const struct udevice_id k3_arm64_ids[] = {
+	{ .compatible = "ti,am654-arm64"},
 	{ .compatible = "ti,am654-rproc"},
 	{}
 };
 
-U_BOOT_DRIVER(k3_rproc) = {
-	.name = "k3_rproc",
-	.of_match = k3_rproc_ids,
+U_BOOT_DRIVER(k3_arm64) = {
+	.name = "k3_arm64",
+	.of_match = k3_arm64_ids,
 	.id = UCLASS_REMOTEPROC,
-	.ops = &k3_rproc_ops,
-	.probe = k3_rproc_probe,
-	.priv_auto_alloc_size = sizeof(struct k3_rproc_privdata),
+	.ops = &k3_arm64_ops,
+	.probe = k3_arm64_probe,
+	.priv_auto_alloc_size = sizeof(struct k3_arm64_privdata),
 };
-- 
2.21.0



More information about the U-Boot mailing list