* [PATCH] power: zynqmp: Use zynqmp_pmufw_node() from firmware
@ 2022-03-01 8:10 ` Michal Simek
2022-03-06 23:15 ` Jaehoon Chung
2022-03-07 8:01 ` Michal Simek
0 siblings, 2 replies; 3+ messages in thread
From: Michal Simek @ 2022-03-01 8:10 UTC (permalink / raw)
To: u-boot, git; +Cc: Jaehoon Chung, Michal Simek
Remove private xpm_configobject[] and use zynqmp_pmufw_node() which
provides the same functionality.
Also add debug messages for easier debugging.
Fixes: e0283cbdfd49 ("power: zynqmp: Add power domain driver for ZynqMP")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/power/domain/zynqmp-power-domain.c | 29 ++++------------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/drivers/power/domain/zynqmp-power-domain.c b/drivers/power/domain/zynqmp-power-domain.c
index 5383d0989698..6943658be429 100644
--- a/drivers/power/domain/zynqmp-power-domain.c
+++ b/drivers/power/domain/zynqmp-power-domain.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <log.h>
#include <malloc.h>
#include <misc.h>
@@ -13,25 +14,6 @@
#include <zynqmp_firmware.h>
-#define NODE_ID_LOCATION 5
-
-static unsigned int xpm_configobject[] = {
- /* HEADER */
- 2, /* Number of remaining words in the header */
- 1, /* Number of sections included in config object */
- PM_CONFIG_OBJECT_TYPE_OVERLAY, /* Type of Config object as overlay */
- /* SLAVE SECTION */
-
- PM_CONFIG_SLAVE_SECTION_ID, /* Section ID */
- 1, /* Number of slaves */
-
- 0, /* Node ID which will be changed below */
- PM_SLAVE_FLAG_IS_SHAREABLE,
- PM_CONFIG_IPI_PSU_CORTEXA53_0_MASK |
- PM_CONFIG_IPI_PSU_CORTEXR5_0_MASK |
- PM_CONFIG_IPI_PSU_CORTEXR5_1_MASK, /* IPI Mask */
-};
-
static int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
const u32 qos, const enum zynqmp_pm_request_ack ack)
{
@@ -41,12 +23,9 @@ static int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
static int zynqmp_power_domain_request(struct power_domain *power_domain)
{
- /* Record power domain id */
- xpm_configobject[NODE_ID_LOCATION] = power_domain->id;
-
- zynqmp_pmufw_load_config_object(xpm_configobject, sizeof(xpm_configobject));
+ dev_dbg(power_domain->dev, "Request for id: %ld\n", power_domain->id);
- return 0;
+ return zynqmp_pmufw_node(power_domain->id);
}
static int zynqmp_power_domain_free(struct power_domain *power_domain)
@@ -57,6 +36,8 @@ static int zynqmp_power_domain_free(struct power_domain *power_domain)
static int zynqmp_power_domain_on(struct power_domain *power_domain)
{
+ dev_dbg(power_domain->dev, "Domain ON for id: %ld\n", power_domain->id);
+
return zynqmp_pm_request_node(power_domain->id,
ZYNQMP_PM_CAPABILITY_ACCESS,
ZYNQMP_PM_MAX_QOS,
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] power: zynqmp: Use zynqmp_pmufw_node() from firmware
2022-03-01 8:10 ` [PATCH] power: zynqmp: Use zynqmp_pmufw_node() from firmware Michal Simek
@ 2022-03-06 23:15 ` Jaehoon Chung
2022-03-07 8:01 ` Michal Simek
1 sibling, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2022-03-06 23:15 UTC (permalink / raw)
To: Michal Simek, u-boot, git; +Cc: Michal Simek
On 3/1/22 17:10, Michal Simek wrote:
> Remove private xpm_configobject[] and use zynqmp_pmufw_node() which
> provides the same functionality.
> Also add debug messages for easier debugging.
>
> Fixes: e0283cbdfd49 ("power: zynqmp: Add power domain driver for ZynqMP")
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
>
> drivers/power/domain/zynqmp-power-domain.c | 29 ++++------------------
> 1 file changed, 5 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/power/domain/zynqmp-power-domain.c b/drivers/power/domain/zynqmp-power-domain.c
> index 5383d0989698..6943658be429 100644
> --- a/drivers/power/domain/zynqmp-power-domain.c
> +++ b/drivers/power/domain/zynqmp-power-domain.c
> @@ -5,6 +5,7 @@
>
> #include <common.h>
> #include <dm.h>
> +#include <dm/device_compat.h>
> #include <log.h>
> #include <malloc.h>
> #include <misc.h>
> @@ -13,25 +14,6 @@
>
> #include <zynqmp_firmware.h>
>
> -#define NODE_ID_LOCATION 5
> -
> -static unsigned int xpm_configobject[] = {
> - /* HEADER */
> - 2, /* Number of remaining words in the header */
> - 1, /* Number of sections included in config object */
> - PM_CONFIG_OBJECT_TYPE_OVERLAY, /* Type of Config object as overlay */
> - /* SLAVE SECTION */
> -
> - PM_CONFIG_SLAVE_SECTION_ID, /* Section ID */
> - 1, /* Number of slaves */
> -
> - 0, /* Node ID which will be changed below */
> - PM_SLAVE_FLAG_IS_SHAREABLE,
> - PM_CONFIG_IPI_PSU_CORTEXA53_0_MASK |
> - PM_CONFIG_IPI_PSU_CORTEXR5_0_MASK |
> - PM_CONFIG_IPI_PSU_CORTEXR5_1_MASK, /* IPI Mask */
> -};
> -
> static int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
> const u32 qos, const enum zynqmp_pm_request_ack ack)
> {
> @@ -41,12 +23,9 @@ static int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
>
> static int zynqmp_power_domain_request(struct power_domain *power_domain)
> {
> - /* Record power domain id */
> - xpm_configobject[NODE_ID_LOCATION] = power_domain->id;
> -
> - zynqmp_pmufw_load_config_object(xpm_configobject, sizeof(xpm_configobject));
> + dev_dbg(power_domain->dev, "Request for id: %ld\n", power_domain->id);
>
> - return 0;
> + return zynqmp_pmufw_node(power_domain->id);
> }
>
> static int zynqmp_power_domain_free(struct power_domain *power_domain)
> @@ -57,6 +36,8 @@ static int zynqmp_power_domain_free(struct power_domain *power_domain)
>
> static int zynqmp_power_domain_on(struct power_domain *power_domain)
> {
> + dev_dbg(power_domain->dev, "Domain ON for id: %ld\n", power_domain->id);
> +
> return zynqmp_pm_request_node(power_domain->id,
> ZYNQMP_PM_CAPABILITY_ACCESS,
> ZYNQMP_PM_MAX_QOS,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] power: zynqmp: Use zynqmp_pmufw_node() from firmware
2022-03-01 8:10 ` [PATCH] power: zynqmp: Use zynqmp_pmufw_node() from firmware Michal Simek
2022-03-06 23:15 ` Jaehoon Chung
@ 2022-03-07 8:01 ` Michal Simek
1 sibling, 0 replies; 3+ messages in thread
From: Michal Simek @ 2022-03-07 8:01 UTC (permalink / raw)
To: U-Boot, git; +Cc: Jaehoon Chung
út 1. 3. 2022 v 9:11 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> Remove private xpm_configobject[] and use zynqmp_pmufw_node() which
> provides the same functionality.
> Also add debug messages for easier debugging.
>
> Fixes: e0283cbdfd49 ("power: zynqmp: Add power domain driver for ZynqMP")
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> drivers/power/domain/zynqmp-power-domain.c | 29 ++++------------------
> 1 file changed, 5 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/power/domain/zynqmp-power-domain.c b/drivers/power/domain/zynqmp-power-domain.c
> index 5383d0989698..6943658be429 100644
> --- a/drivers/power/domain/zynqmp-power-domain.c
> +++ b/drivers/power/domain/zynqmp-power-domain.c
> @@ -5,6 +5,7 @@
>
> #include <common.h>
> #include <dm.h>
> +#include <dm/device_compat.h>
> #include <log.h>
> #include <malloc.h>
> #include <misc.h>
> @@ -13,25 +14,6 @@
>
> #include <zynqmp_firmware.h>
>
> -#define NODE_ID_LOCATION 5
> -
> -static unsigned int xpm_configobject[] = {
> - /* HEADER */
> - 2, /* Number of remaining words in the header */
> - 1, /* Number of sections included in config object */
> - PM_CONFIG_OBJECT_TYPE_OVERLAY, /* Type of Config object as overlay */
> - /* SLAVE SECTION */
> -
> - PM_CONFIG_SLAVE_SECTION_ID, /* Section ID */
> - 1, /* Number of slaves */
> -
> - 0, /* Node ID which will be changed below */
> - PM_SLAVE_FLAG_IS_SHAREABLE,
> - PM_CONFIG_IPI_PSU_CORTEXA53_0_MASK |
> - PM_CONFIG_IPI_PSU_CORTEXR5_0_MASK |
> - PM_CONFIG_IPI_PSU_CORTEXR5_1_MASK, /* IPI Mask */
> -};
> -
> static int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
> const u32 qos, const enum zynqmp_pm_request_ack ack)
> {
> @@ -41,12 +23,9 @@ static int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
>
> static int zynqmp_power_domain_request(struct power_domain *power_domain)
> {
> - /* Record power domain id */
> - xpm_configobject[NODE_ID_LOCATION] = power_domain->id;
> -
> - zynqmp_pmufw_load_config_object(xpm_configobject, sizeof(xpm_configobject));
> + dev_dbg(power_domain->dev, "Request for id: %ld\n", power_domain->id);
>
> - return 0;
> + return zynqmp_pmufw_node(power_domain->id);
> }
>
> static int zynqmp_power_domain_free(struct power_domain *power_domain)
> @@ -57,6 +36,8 @@ static int zynqmp_power_domain_free(struct power_domain *power_domain)
>
> static int zynqmp_power_domain_on(struct power_domain *power_domain)
> {
> + dev_dbg(power_domain->dev, "Domain ON for id: %ld\n", power_domain->id);
> +
> return zynqmp_pm_request_node(power_domain->id,
> ZYNQMP_PM_CAPABILITY_ACCESS,
> ZYNQMP_PM_MAX_QOS,
> --
> 2.35.1
>
Applied.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-07 8:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20220301081109epcas1p25f6082cd02e06ebdd4542d7cf8d4bad7@epcas1p2.samsung.com>
2022-03-01 8:10 ` [PATCH] power: zynqmp: Use zynqmp_pmufw_node() from firmware Michal Simek
2022-03-06 23:15 ` Jaehoon Chung
2022-03-07 8:01 ` Michal Simek
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.