On Mon, Aug 27, 2018 at 7:32 PM Anson Huang <anson.hu...@nxp.com> wrote: > > Hi, Andrey > > Anson Huang > Best Regards! > > > > -----Original Message----- > > From: Andrey Smirnov <andrew.smir...@gmail.com> > > Sent: Tuesday, August 28, 2018 7:04 AM > > To: Anson Huang <anson.hu...@nxp.com> > > Cc: Shawn Guo <shawn...@kernel.org>; Sascha Hauer > > <s.ha...@pengutronix.de>; Sascha Hauer <ker...@pengutronix.de>; Fabio > > Estevam <fabio.este...@nxp.com>; linux-arm-kernel > > <linux-arm-ker...@lists.infradead.org>; linux-kernel > > <linux-kernel@vger.kernel.org>; dl-linux-imx <linux-...@nxp.com> > > 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.smir...@gmail.com> wrote: > > > > > > On Sun, Aug 5, 2018 at 11:45 PM Anson Huang <anson.hu...@nxp.com> > > 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. Thanks, Andrey Smirnov