public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Heimpold <mhei@heimpold.de>
To: u-boot@lists.denx.de
Subject: [PATCH 07/24] imx: update is_imx6ull to include i.MX6ULZ
Date: Fri, 24 Apr 2020 22:14:20 +0200	[thread overview]
Message-ID: <27400579.jLRJ1sbLHe@kerker> (raw)
In-Reply-To: <DB6PR0402MB276092EA48B1CDEAE14E895E88D30@DB6PR0402MB2760.eurprd04.prod.outlook.com>

Hi,

Am Donnerstag, 23. April 2020, 03:33:49 CEST schrieb Peng Fan:
> > Subject: Re: [PATCH 07/24] imx: update is_imx6ull to include i.MX6ULZ
> > 
> > Am Mittwoch, 22. April 2020, 15:52:18 CEST schrieb Peng Fan:
> > > Update is_imx6ull helper to include i.MX6ULZ SoC. i.MX6ULZ could share
> > > same macro, then we no need to add is_imx6ulz in various drivers.
> > >
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > >  arch/arm/include/asm/mach-imx/sys_proto.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h
> > > b/arch/arm/include/asm/mach-imx/sys_proto.h
> > > index a02cd40c7d..2a997f280d 100644
> > > --- a/arch/arm/include/asm/mach-imx/sys_proto.h
> > > +++ b/arch/arm/include/asm/mach-imx/sys_proto.h
> > > @@ -37,7 +37,7 @@
> > >  #define is_mx6sl() (is_cpu_type(MXC_CPU_MX6SL))  #define
> > is_mx6solo()
> > > (is_cpu_type(MXC_CPU_MX6SOLO))  #define is_mx6ul()
> > > (is_cpu_type(MXC_CPU_MX6UL)) -#define is_mx6ull()
> > > (is_cpu_type(MXC_CPU_MX6ULL))
> > > +#define is_mx6ull() (is_cpu_type(MXC_CPU_MX6ULL) ||
> > > +is_cpu_type(MXC_CPU_MX6ULZ))
> > 
> > While I probably understand your intentions, I fear that it will lead to
> > confusion when the helper's name does not reflect that more than one cpu
> > type can match.
> > What about introducing is_mx6ulX() to signal that the last letter is "don't
> > care"?
> 
> Renaming the macro needs to modify drivers using this macro, this is risk
> to easy break existing code.
> I prefer to keep as is.

but when you look at the drivers using this is_mx6ull() macro, then you'll
find already a bunch of other is_mx...() macros used in addition. Then it
would also be possible to add the is_mx6ulz() one - it won't make the
situation worse at these points.
In my eyes, this is better than hiding two CPUs behind one macro.

Thanks,
Michael

> 
> Thanks,
> Peng.
> 
> > 
> > Best regards,
> > Michael
> > 
> > >  #define is_mx6ulz() (is_cpu_type(MXC_CPU_MX6ULZ))  #define
> > > is_mx6sll() (is_cpu_type(MXC_CPU_MX6SLL))
> > >
> > >
> > 
> > 
> > 
> 

  reply	other threads:[~2020-04-24 20:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 13:52 [PATCH 01/24] imx: fix cpu_type helper Peng Fan
2020-04-22 13:52 ` [PATCH 02/24] imx8mm: Update CPU speed grading Peng Fan
2020-04-25 14:23   ` Fabio Estevam
2020-04-22 13:52 ` [PATCH 03/24] imx8mn: Update speed grade Peng Fan
2020-04-22 13:52 ` [PATCH 04/24] imx: cpu: support speed grade for i.MX8MP Peng Fan
2020-04-22 13:52 ` [PATCH 05/24] imx: imx8m: add i.MX8MQ Dual and QuadLite support Peng Fan
2020-04-22 13:52 ` [PATCH 06/24] imx: imx8m: add i.MX8MN variants support Peng Fan
2020-04-22 13:52 ` [PATCH 07/24] imx: update is_imx6ull to include i.MX6ULZ Peng Fan
2020-04-22 20:00   ` Michael Heimpold
2020-04-23  1:33     ` Peng Fan
2020-04-24 20:14       ` Michael Heimpold [this message]
2020-04-27  1:25         ` Peng Fan
2020-04-27  7:57           ` Peng Fan
2020-04-22 13:52 ` [PATCH 08/24] imx8: move SIP macro to common header Peng Fan
2020-04-22 13:52 ` [PATCH 09/24] imx8m: acquire ATF commit hash Peng Fan
2020-04-22 13:52 ` [PATCH 10/24] imx8m: update clock root and fix core_sel Peng Fan
2020-04-22 13:52 ` [PATCH 11/24] imx8mq: Enable eMMC HS400 and SD UHS mode on EVK Peng Fan
2020-04-22 13:52 ` [PATCH 12/24] imx8mq: Set ARM core clock directly from ARM PLL Peng Fan
2020-04-22 13:52 ` [PATCH 13/24] imx8m: Dump DRAM PLL rate by clocks command Peng Fan
2020-04-22 13:52 ` [PATCH 14/24] imx8: parser: fix 'end address' parameter of rm_find_memreg Peng Fan
2020-04-22 13:52 ` [PATCH 15/24] imx8: Change to use new SECO API commands Peng Fan
2020-04-22 13:52 ` [PATCH 16/24] imx8: ahab: fix 'end address' parameter of rm_find_memreg Peng Fan
2020-04-22 13:52 ` [PATCH 17/24] imx8: ahab: fix some bad debug message formating Peng Fan
2020-04-22 13:52 ` [PATCH 18/24] imx8: parser: " Peng Fan
2020-04-22 13:52 ` [PATCH 19/24] imx8mm: clock: fix fracpll decode issue Peng Fan
2020-04-22 13:52 ` [PATCH 20/24] imx8m: Enable WDOG_B for timeout Peng Fan
2020-04-22 13:52 ` [PATCH 21/24] doc: ahab: Add encrypted boot documentation for i.MX8/8x devices Peng Fan
2020-04-22 13:52 ` [PATCH 22/24] imx8: scu api: Add support for SECO manufacturing protection APIs Peng Fan
2020-04-22 13:52 ` [PATCH 23/24] imx8: Update SCFW API to version 1.5 Peng Fan
2020-04-22 13:52 ` [PATCH 24/24] imx8: Configure SNVS Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27400579.jLRJ1sbLHe@kerker \
    --to=mhei@heimpold.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox