From: Nava kishore Manne <nava.manne@xilinx.com> To: <robh+dt@kernel.org>, <michal.simek@xilinx.com>, <derek.kiernan@xilinx.com>, <dragan.cvetic@xilinx.com>, <arnd@arndb.de>, <gregkh@linuxfoundation.org>, <nava.manne@xilinx.com>, <rajan.vaja@xilinx.com>, <jolly.shah@xilinx.com>, <tejas.patel@xilinx.com>, <amit.sunil.dhamne@xilinx.com>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <chinnikishore369@gmail.com>, <git@xilinx.com> Subject: [PATCH 3/5] firmware: xilinx: Add afi ioctl support Date: Tue, 20 Apr 2021 13:41:51 +0530 [thread overview] Message-ID: <20210420081153.17020-4-nava.manne@xilinx.com> (raw) In-Reply-To: <20210420081153.17020-1-nava.manne@xilinx.com> This patch adds afi ioctl to support dynamic PS-PL bus width settings. Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com> --- drivers/firmware/xilinx/zynqmp.c | 13 +++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index 7eb9958662dd..ada9eb9e26e3 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -713,6 +713,19 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value) } EXPORT_SYMBOL_GPL(zynqmp_pm_read_pggs); +/** + * zynqmp_pm_afi() - PM API for setting the PS-PL bus width + * @index: Register index value + * @value: value to be written into the register + * + * Return: Returns status, either success or error+reason + */ +int zynqmp_pm_afi(u32 index, u32 value) +{ + return zynqmp_pm_invoke_fn(PM_IOCTL, 0, IOCTL_AFI, index, value, NULL); +} +EXPORT_SYMBOL_GPL(zynqmp_pm_afi); + /** * zynqmp_pm_set_boot_health_status() - PM API for setting healthy boot status * @value: Status value to be written diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 71177b17eee5..792fb4f5d86f 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -113,6 +113,7 @@ enum pm_ioctl_id { IOCTL_READ_PGGS = 15, /* Set healthy bit value */ IOCTL_SET_BOOT_HEALTH_STATUS = 17, + IOCTL_AFI = 18, }; enum pm_query_id { @@ -353,6 +354,7 @@ int zynqmp_pm_write_pggs(u32 index, u32 value); int zynqmp_pm_read_pggs(u32 index, u32 *value); int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype); int zynqmp_pm_set_boot_health_status(u32 value); +int zynqmp_pm_afi(u32 index, u32 value); #else static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void) { @@ -537,6 +539,11 @@ static inline int zynqmp_pm_set_boot_health_status(u32 value) { return -ENODEV; } + +static inline int zynqmp_pm_afi(u32 index, u32 value) +{ + return -ENODEV; +} #endif #endif /* __FIRMWARE_ZYNQMP_H__ */ -- 2.18.0
WARNING: multiple messages have this Message-ID (diff)
From: Nava kishore Manne <nava.manne@xilinx.com> To: <robh+dt@kernel.org>, <michal.simek@xilinx.com>, <derek.kiernan@xilinx.com>, <dragan.cvetic@xilinx.com>, <arnd@arndb.de>, <gregkh@linuxfoundation.org>, <nava.manne@xilinx.com>, <rajan.vaja@xilinx.com>, <jolly.shah@xilinx.com>, <tejas.patel@xilinx.com>, <amit.sunil.dhamne@xilinx.com>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <chinnikishore369@gmail.com>, <git@xilinx.com> Subject: [PATCH 3/5] firmware: xilinx: Add afi ioctl support Date: Tue, 20 Apr 2021 13:41:51 +0530 [thread overview] Message-ID: <20210420081153.17020-4-nava.manne@xilinx.com> (raw) In-Reply-To: <20210420081153.17020-1-nava.manne@xilinx.com> This patch adds afi ioctl to support dynamic PS-PL bus width settings. Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com> --- drivers/firmware/xilinx/zynqmp.c | 13 +++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index 7eb9958662dd..ada9eb9e26e3 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -713,6 +713,19 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value) } EXPORT_SYMBOL_GPL(zynqmp_pm_read_pggs); +/** + * zynqmp_pm_afi() - PM API for setting the PS-PL bus width + * @index: Register index value + * @value: value to be written into the register + * + * Return: Returns status, either success or error+reason + */ +int zynqmp_pm_afi(u32 index, u32 value) +{ + return zynqmp_pm_invoke_fn(PM_IOCTL, 0, IOCTL_AFI, index, value, NULL); +} +EXPORT_SYMBOL_GPL(zynqmp_pm_afi); + /** * zynqmp_pm_set_boot_health_status() - PM API for setting healthy boot status * @value: Status value to be written diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 71177b17eee5..792fb4f5d86f 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -113,6 +113,7 @@ enum pm_ioctl_id { IOCTL_READ_PGGS = 15, /* Set healthy bit value */ IOCTL_SET_BOOT_HEALTH_STATUS = 17, + IOCTL_AFI = 18, }; enum pm_query_id { @@ -353,6 +354,7 @@ int zynqmp_pm_write_pggs(u32 index, u32 value); int zynqmp_pm_read_pggs(u32 index, u32 *value); int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype); int zynqmp_pm_set_boot_health_status(u32 value); +int zynqmp_pm_afi(u32 index, u32 value); #else static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void) { @@ -537,6 +539,11 @@ static inline int zynqmp_pm_set_boot_health_status(u32 value) { return -ENODEV; } + +static inline int zynqmp_pm_afi(u32 index, u32 value) +{ + return -ENODEV; +} #endif #endif /* __FIRMWARE_ZYNQMP_H__ */ -- 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-04-20 8:20 UTC|newest] Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-20 8:11 [PATCH 0/5]misc: Add afi config drivers support Nava kishore Manne 2021-04-20 8:11 ` Nava kishore Manne 2021-04-20 8:11 ` [PATCH 1/5] misc: doc: Add binding doc for the afi config driver Nava kishore Manne 2021-04-20 8:11 ` Nava kishore Manne 2021-04-20 8:11 ` [PATCH 2/5] misc: zynq: Add " Nava kishore Manne 2021-04-20 8:11 ` Nava kishore Manne 2021-04-20 8:46 ` Greg KH 2021-04-20 8:46 ` Greg KH 2021-04-20 13:36 ` Nava kishore Manne 2021-04-20 13:36 ` Nava kishore Manne 2021-04-20 15:27 ` Greg KH 2021-04-20 15:27 ` Greg KH 2021-04-29 6:23 ` Nava kishore Manne 2021-04-29 6:23 ` Nava kishore Manne 2021-04-20 13:03 ` kernel test robot 2021-04-20 18:17 ` Randy Dunlap 2021-04-20 18:17 ` Randy Dunlap 2021-04-20 8:11 ` Nava kishore Manne [this message] 2021-04-20 8:11 ` [PATCH 3/5] firmware: xilinx: Add afi ioctl support Nava kishore Manne 2021-04-20 8:11 ` [PATCH 4/5] misc: doc: Add binding doc for the zynqmp afi config driver Nava kishore Manne 2021-04-20 8:11 ` Nava kishore Manne 2021-04-20 13:58 ` Rob Herring 2021-04-20 13:58 ` Rob Herring 2021-04-29 4:56 ` Nava kishore Manne 2021-04-29 4:56 ` Nava kishore Manne 2021-04-20 14:15 ` Rob Herring 2021-04-20 14:15 ` Rob Herring 2021-04-29 5:39 ` Nava kishore Manne 2021-04-29 5:39 ` Nava kishore Manne 2021-04-20 8:11 ` [PATCH 5/5] misc: zynqmp: Add " Nava kishore Manne 2021-04-20 8:11 ` Nava kishore Manne 2021-04-20 8:47 ` Greg KH 2021-04-20 8:47 ` Greg KH 2021-04-20 13:45 ` Nava kishore Manne 2021-04-20 13:45 ` Nava kishore Manne 2021-04-20 8:51 ` Greg KH 2021-04-20 8:51 ` Greg KH 2021-04-20 13:47 ` Nava kishore Manne 2021-04-20 13:47 ` Nava kishore Manne 2021-04-20 15:28 ` Greg KH 2021-04-20 15:28 ` Greg KH 2021-04-29 6:01 ` Nava kishore Manne 2021-04-29 6:01 ` Nava kishore Manne 2021-04-20 18:15 ` Randy Dunlap 2021-04-20 18:15 ` Randy Dunlap
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=20210420081153.17020-4-nava.manne@xilinx.com \ --to=nava.manne@xilinx.com \ --cc=amit.sunil.dhamne@xilinx.com \ --cc=arnd@arndb.de \ --cc=chinnikishore369@gmail.com \ --cc=derek.kiernan@xilinx.com \ --cc=devicetree@vger.kernel.org \ --cc=dragan.cvetic@xilinx.com \ --cc=git@xilinx.com \ --cc=gregkh@linuxfoundation.org \ --cc=jolly.shah@xilinx.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=michal.simek@xilinx.com \ --cc=rajan.vaja@xilinx.com \ --cc=robh+dt@kernel.org \ --cc=tejas.patel@xilinx.com \ /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: linkBe 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.