Messages in this thread |  | | Date | Wed, 18 Dec 2019 14:55:26 +0000 | From | Sudeep Holla <> | Subject | Re: [PATCH 1/5] firmware: xilinx: Adds new eemi call for reg access |
| |
On Wed, Dec 04, 2019 at 03:29:15PM -0800, Jolly Shah wrote: > From: Rajan Vaja <rajan.vaja@xilinx.com> > > This patch adds new EEMI call which is used for CSU/PMU register > access from linux. > > Signed-off-by: Michal Simek <michal.simek@xilinx.com> > Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> > Signed-off-by: Jolly Shah <jolly.shah@xilinx.com> > --- > drivers/firmware/xilinx/zynqmp.c | 183 +++++++++++++++++++++++++++++++++++ > include/linux/firmware/xlnx-zynqmp.h | 9 ++ > 2 files changed, 192 insertions(+) > > diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c > index fd3d837..56431ad 100644 > --- a/drivers/firmware/xilinx/zynqmp.c > +++ b/drivers/firmware/xilinx/zynqmp.c > @@ -24,6 +24,8 @@ > #include <linux/firmware/xlnx-zynqmp.h> > #include "zynqmp-debug.h" > > +static unsigned long register_address; > + > static const struct zynqmp_eemi_ops *eemi_ops_tbl; > > static const struct mfd_cell firmware_devs[] = { > @@ -664,6 +666,26 @@ static int zynqmp_pm_set_requirement(const u32 node, const u32 capabilities, > qos, ack, NULL); > } > > +/** > + * zynqmp_pm_config_reg_access - PM Config API for Config register access > + * @register_access_id: ID of the requested REGISTER_ACCESS > + * @address: Address of the register to be accessed > + * @mask: Mask to be written to the register > + * @value: Value to be written to the register > + * @out: Returned output value > + * > + * This function calls REGISTER_ACCESS to configure CSU/PMU registers. > + * > + * Return: Returns status, either success or error+reason > + */ > + > +static int zynqmp_pm_config_reg_access(u32 register_access_id, u32 address, > + u32 mask, u32 value, u32 *out) > +{ > + return zynqmp_pm_invoke_fn(PM_REGISTER_ACCESS, register_access_id, > + address, mask, value, out); > +} > +
If you have this API, can you remove all other APIs and implement them using these ? This kills the EEMI abstraction.
NACK for this and any attempts to provide direct reas/write access to the PM config space. EEMI should have better abstraction than this.
-- Regards, Sudeep
|  |