[PATCH v3 4/7] drivers: misc: k3_avs: Extract MPU clk and dev ID from DT

Manorit Chawdhry m-chawdhry at ti.com
Tue Oct 1 10:47:33 CEST 2024


Hi Udit,

On 08:44-20240815, Kumar, Udit wrote:
> 
> On 8/13/2024 11:40 AM, Manorit Chawdhry wrote:
> > Different devices have different MPU clk and dev ID. Currently it had
> > been hardcoded. Move it to DT based extraction.
> > 
> > Signed-off-by: Manorit Chawdhry <m-chawdhry at ti.com>
> > ---
> >   drivers/misc/k3_avs.c | 37 +++++++++++++++++++++++++++++++++++++
> >   1 file changed, 37 insertions(+)
> > 
> > diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
> > index 568cf5b20d51..f94eee5b1c64 100644
> > --- a/drivers/misc/k3_avs.c
> > +++ b/drivers/misc/k3_avs.c
> > @@ -352,6 +352,9 @@ static int k3_avs_probe(struct udevice *dev)
> >   	struct k3_avs_privdata *priv;
> >   	struct vd_data *vd;
> >   	int ret;
> > +	ofnode node;
> > +	struct ofnode_phandle_args phandle_args;
> > +	int i = 0;
> >   	priv = dev_get_priv(dev);
> >   	priv->dev = dev;
> > @@ -367,6 +370,34 @@ static int k3_avs_probe(struct udevice *dev)
> >   		return -ENODEV;
> >   	for (vd = priv->vd_config->vds; vd->id >= 0; vd++) {
> > +		/* Get the clock and dev id for Jacinto platforms */
> > +		if (vd->id == J721E_VDD_MPU) {
> > +			node = ofnode_get_aliases_node("remoteproc1");
> 
> My suggestion will be to search node based upon compatible name am654-rproc

Yes, that seems like a good idea, let me try that.

> 
> 
> > +			if (!ofnode_valid(node))
> > +				return -ENODEV;
> > +
> > +			i = ofnode_stringlist_search(node, "clock-names", "core");
> > +			if (i < 0)
> > +				return -ENODEV;
> > +
> > +			debug("%s: i: %d\n", __func__, i);
> 
> I assume this was for your debug only, Please see if you can remove this

Ack.

Regards,
Manorit


More information about the U-Boot mailing list