Re: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms
From: Andrey Smirnov
Date: Tue Aug 28 2018 - 03:08:34 EST
On Mon, Aug 27, 2018 at 7:32 PM Anson Huang <anson.huang@xxxxxxx> wrote:
> Hi, Andrey
> Anson Huang
> Best Regards!
> > -----Original Message-----
> > From: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
> > Sent: Tuesday, August 28, 2018 7:04 AM
> > To: Anson Huang <anson.huang@xxxxxxx>
> > Cc: Shawn Guo <shawnguo@xxxxxxxxxx>; Sascha Hauer
> > <s.hauer@xxxxxxxxxxxxxx>; Sascha Hauer <kernel@xxxxxxxxxxxxxx>; Fabio
> > Estevam <fabio.estevam@xxxxxxx>; linux-arm-kernel
> > <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>; linux-kernel
> > <linux-kernel@xxxxxxxxxxxxxxx>; dl-linux-imx <linux-imx@xxxxxxx>
> > Subject: Re: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for
> > other i.MX platforms
> > On Mon, Aug 27, 2018 at 3:51 PM Andrey Smirnov
> > <andrew.smirnov@xxxxxxxxx> wrote:
> > >
> > > On Sun, Aug 5, 2018 at 11:45 PM Anson Huang <Anson.Huang@xxxxxxx>
> > wrote:
> > > >
> > > > i.MX8MQ and i.MX8MM share same gpc module with i.MX7D, they can
> > > > reuse gpcv2 pgc driver for power domain control, this patch renames
> > > > all functions and structure definitions started with "imx7" to
> > > > "imx", and check machine type to pass platform specific power domain
> > > > data for power domain driver, thus make
> > > > gpcv2 pgc driver more generic for i.MX platforms.
> > > >
> > >
> > > Just for the sake of
> > Oops, forgot to type out the question I had about i.MX8MQ GPC in general. I've
> > noticed that vendor tree for i.MX8MQ has a separate driver for GPC that relies
> > on code in ARM Trusted Firmware binary blob to do the actual switching. Do
> > you by any chances know the relation between this code and the driver I
> > describe? Are they mutually exclusive or complimentary (I assume the former)?
> > Will the ATF-based driver be eventually deprecated?
> Yes, our internal NXP tree currently put all GPC registers operation in ARM Trusted Firmware, and
> Linux kernel has a gpc-psci.c which is a virtual GPC driver to call SMC and trap into ARM Trusted Firmware
> whenever it wants to read/write GPC registers. But for upstream, we plan to reuse i.MX7D's
> GPC driver for power domain control, since the GPC registers for power domain control are
> independent with other low power mode's control registers, it is NOT necessary to introduce
> another virtual GPC driver to call ARM Trusted Firmware for power domain control.
> So yes, ATF-based gpc driver for power domain control will be deprecated when we upstream the ATF for
> i.MX8MQ series SoCs. We prefer to reuse the i.MX7D's GPC driver in upstream Linux kernel. If you are OK
> with this, I will send out a V2 patch set to address your comments, thanks.
By all means, I have no objections, the more this code can be reused
the better. I just wanted to confirm if I understood the relation
between two drivers and their future right, that's all.