From: Aswath Govindraju <a-govindraju@ti.com>
Cc: <u-boot@lists.denx.de>, Wolfgang Denk <wd@denx.de>,
Hari Nagalla <hnagalla@ti.com>, David Huang <d-huang@ti.com>,
Keerthy <j-keerthy@ti.com>, Dave Gerlach <d-gerlach@ti.com>,
Suman Anna <s-anna@ti.com>, Nishanth Menon <nm@ti.com>,
Tero Kristo <kristo@kernel.org>,
Kishon Vijay Abraham I <kishon@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Christian Hewitt <christianshewitt@gmail.com>,
Tim Harvey <tharvey@gateworks.com>,
Peter Robinson <pbrobinson@gmail.com>,
Kever Yang <kever.yang@rock-chips.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Fabio Estevam <festevam@denx.de>,
Andre Przywara <andre.przywara@arm.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Sean Anderson <seanga2@gmail.com>,
Lukasz Majewski <lukma@denx.de>,
Aswath Govindraju <a-govindraju@ti.com>
Subject: [PATCH v2 01/20] remoteproc: k3_system_controller: Support optional boot_notification channel
Date: Tue, 11 Jan 2022 13:25:26 +0530 [thread overview]
Message-ID: <20220111075545.1880-2-a-govindraju@ti.com> (raw)
In-Reply-To: <20220111075545.1880-1-a-govindraju@ti.com>
From: Nishanth Menon <nm@ti.com>
If there is an optional boot notification channel that an SoC uses
separate from the rx path, use the same.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
.../remoteproc/k3-system-controller.txt | 3 +++
drivers/remoteproc/k3_system_controller.c | 20 ++++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/doc/device-tree-bindings/remoteproc/k3-system-controller.txt b/doc/device-tree-bindings/remoteproc/k3-system-controller.txt
index 32f4720b0d17..33dc46812ed4 100644
--- a/doc/device-tree-bindings/remoteproc/k3-system-controller.txt
+++ b/doc/device-tree-bindings/remoteproc/k3-system-controller.txt
@@ -13,6 +13,9 @@ Required properties:
"rx" for Receive channel
- mboxes: Corresponding phandles to mailbox channels.
+Optional properties:
+--------------------
+- mbox-names: "boot_notify" for Optional alternate boot notification channel.
Example:
--------
diff --git a/drivers/remoteproc/k3_system_controller.c b/drivers/remoteproc/k3_system_controller.c
index 89cb90207dcb..e2affe69c678 100644
--- a/drivers/remoteproc/k3_system_controller.c
+++ b/drivers/remoteproc/k3_system_controller.c
@@ -77,14 +77,18 @@ struct k3_sysctrler_desc {
* struct k3_sysctrler_privdata - Structure representing System Controller data.
* @chan_tx: Transmit mailbox channel
* @chan_rx: Receive mailbox channel
+ * @chan_boot_notify: Boot notification channel
* @desc: SoC description for this instance
* @seq_nr: Counter for number of messages sent.
+ * @has_boot_notify: Has separate boot notification channel
*/
struct k3_sysctrler_privdata {
struct mbox_chan chan_tx;
struct mbox_chan chan_rx;
+ struct mbox_chan chan_boot_notify;
struct k3_sysctrler_desc *desc;
u32 seq_nr;
+ bool has_boot_notify;
};
static inline
@@ -223,7 +227,8 @@ static int k3_sysctrler_start(struct udevice *dev)
debug("%s(dev=%p)\n", __func__, dev);
/* Receive the boot notification. Note that it is sent only once. */
- ret = mbox_recv(&priv->chan_rx, &msg, priv->desc->max_rx_timeout_us);
+ ret = mbox_recv(priv->has_boot_notify ? &priv->chan_boot_notify :
+ &priv->chan_rx, &msg, priv->desc->max_rx_timeout_us);
if (ret) {
dev_err(dev, "%s: Boot Notification response failed. ret = %d\n",
__func__, ret);
@@ -272,6 +277,19 @@ static int k3_of_to_priv(struct udevice *dev,
return ret;
}
+ /* Some SoCs may have a optional channel for boot notification. */
+ priv->has_boot_notify = 1;
+ ret = mbox_get_by_name(dev, "boot_notify", &priv->chan_boot_notify);
+ if (ret == -ENODATA) {
+ dev_dbg(dev, "%s: Acquiring optional Boot_notify failed. ret = %d. Using Rx\n",
+ __func__, ret);
+ priv->has_boot_notify = 0;
+ } else if (ret) {
+ dev_err(dev, "%s: Acquiring boot_notify channel failed. ret = %d\n",
+ __func__, ret);
+ return ret;
+ }
+
return 0;
}
--
2.17.1
next prev parent reply other threads:[~2022-01-11 7:56 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 7:55 [PATCH v2 00/20] J721S2: Add initial support Aswath Govindraju
2022-01-11 7:55 ` Aswath Govindraju [this message]
2022-01-13 14:12 ` [PATCH v2 01/20] remoteproc: k3_system_controller: Support optional boot_notification channel Tom Rini
2022-01-17 5:31 ` Aswath Govindraju
2022-01-17 6:52 ` Aswath Govindraju
2022-01-17 13:54 ` Tom Rini
2022-01-18 5:56 ` Aswath Govindraju
2022-01-18 12:50 ` Tom Rini
2022-01-18 13:50 ` Nishanth Menon
2022-01-18 14:17 ` Tom Rini
2022-01-11 7:55 ` [PATCH v2 02/20] ram: k3-ddrss: lpddr4_structs_if.h: Add a pointer to ddr instance Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 03/20] ram: k3-ddrss: Add support for multiple instances of DDR subsystems Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 04/20] ram: k3-ddrss: Add support for configuring MSMC subsystem in case of Multiple " Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 05/20] arm: K3: Add basic support for J721S2 SoC definition Aswath Govindraju
2022-01-13 14:13 ` Tom Rini
2022-01-11 7:55 ` [PATCH v2 06/20] drivers: dma: Add support for J721S2 Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 07/20] clk: clk-k3: Add support for J721S2 SoC Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 08/20] power: domain: ti: " Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 09/20] ram: k3-ddrss: " Aswath Govindraju
2022-01-13 14:15 ` Tom Rini
2022-01-17 6:31 ` Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 10/20] soc: ti: k3-socinfo: Add entry " Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 11/20] board: ti: j721s2: Add board support for J721S2 Aswath Govindraju
2022-01-13 14:16 ` Tom Rini
2022-01-17 6:42 ` Aswath Govindraju
2022-01-17 13:54 ` Tom Rini
2022-01-11 7:55 ` [PATCH v2 12/20] dt-bindings: ti-serdes-mux: Add defines for J721S2 SoC Aswath Govindraju
2022-01-13 14:17 ` Tom Rini
2022-01-17 5:41 ` Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 13/20] dt-bindings: pinctrl: k3: Introduce pinmux definitions for J721S2 Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 14/20] arm: dts: Add initial support for J721S2 SoC Aswath Govindraju
2022-01-13 14:08 ` Tom Rini
2022-01-13 14:16 ` Aswath Govindraju
2022-01-13 14:23 ` Tom Rini
2022-01-11 7:55 ` [PATCH v2 15/20] arm: dts: Add initial support for J721S2 System on Module Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 16/20] arm: dts: Add support for A72 specific J721S2 Common Processor Board Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 17/20] arm: dts: k3-j721s2: Add r5 specific dt support Aswath Govindraju
2022-01-13 14:11 ` Tom Rini
2022-01-11 7:55 ` [PATCH v2 18/20] arm: dts: k3-j721s2-ddr: Add DDR support Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 19/20] configs: j721s2_evm_r5_defconfig: Add R5 SPL specific defconfig Aswath Govindraju
2022-01-11 7:55 ` [PATCH v2 20/20] configs: j721s2_evm_a72_defconfig: Add A72 " Aswath Govindraju
2022-01-18 7:30 ` [PATCH v2 00/20] J721S2: Add initial support Aswath Govindraju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220111075545.1880-2-a-govindraju@ti.com \
--to=a-govindraju@ti.com \
--cc=andre.przywara@arm.com \
--cc=christianshewitt@gmail.com \
--cc=d-gerlach@ti.com \
--cc=d-huang@ti.com \
--cc=festevam@denx.de \
--cc=hnagalla@ti.com \
--cc=j-keerthy@ti.com \
--cc=jh80.chung@samsung.com \
--cc=kever.yang@rock-chips.com \
--cc=kishon@ti.com \
--cc=kristo@kernel.org \
--cc=lukma@denx.de \
--cc=narmstrong@baylibre.com \
--cc=nm@ti.com \
--cc=pbrobinson@gmail.com \
--cc=s-anna@ti.com \
--cc=seanga2@gmail.com \
--cc=tharvey@gateworks.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.