From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 1/5] i.MX5x: define cpu_type() to return processor portion of cpu rev.
Date: Mon, 18 Nov 2013 20:25:13 -0700 [thread overview]
Message-ID: <528ADA19.3010708@boundarydevices.com> (raw)
In-Reply-To: <5289EF32.7010403@denx.de>
Hi Stefano,
On 11/18/2013 03:42 AM, Stefano Babic wrote:
> Hi Eric,
>
> On 17/11/2013 18:17, Eric Nelson wrote:
>> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>> ---
>> This patch is new in V3
>>
>> arch/arm/include/asm/arch-mx5/sys_proto.h | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h b/arch/arm/include/asm/arch-mx5/sys_proto.h
>> index 9949ad1..9dad5fc 100644
>> --- a/arch/arm/include/asm/arch-mx5/sys_proto.h
>> +++ b/arch/arm/include/asm/arch-mx5/sys_proto.h
>> @@ -17,6 +17,10 @@
>>
>> #define is_soc_rev(rev) ((get_cpu_rev() & 0xFF) - rev)
>> u32 get_cpu_rev(void);
>> +
>> +/* returns MXC_CPU_ value */
>> +#define cpu_type(rev) (((rev) >> 12)&0xff)
>> +
>
> There is already a get_cpu_type() for other architectures (OMAP). We do
> not need to reinvent the wheel this time, and it is correct to add
> get_cpu_type(void) to sys_proto.h.
>
> This lets also easier to understand the code because it can be directly
> derived from the User's Manual: shifting 12 bit in your macro is only
> because this is done in get_cpu_rev(), not because this is the offset in
> the i.MX6 register.
>
Okay. I'll re-submit with get_cpu_type(void) implemented imx-common/cpu.c.
I still question the fact that we have two header files for i.MX5x
and i.MX6x declaring the returns implemented there.
It seems that we should have a single header for routines
implemented there.
Perhaps arch/arm/include/imx-common/cpu.h?
Please advise,
Eric
next prev parent reply other threads:[~2013-11-19 3:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-17 17:17 [U-Boot] [PATCH V3 0/5] imx: Define common routines to set cpu and board environment variables Eric Nelson
2013-11-17 17:17 ` [U-Boot] [PATCH V3 1/5] i.MX5x: define cpu_type() to return processor portion of cpu rev Eric Nelson
2013-11-17 19:24 ` Marek Vasut
2013-11-18 10:42 ` Stefano Babic
2013-11-19 3:25 ` Eric Nelson [this message]
2013-11-19 9:12 ` Stefano Babic
2013-11-17 17:17 ` [U-Boot] [PATCH 2/5] imx: Define common routines to set cpu and board environment variables Eric Nelson
2013-11-17 17:17 ` [U-Boot] [PATCH 3/5] i.MX6: nitrogen6x/sabrelite: override set_board_name() Eric Nelson
2013-11-18 10:57 ` Stefano Babic
2013-11-19 3:40 ` Eric Nelson
2013-11-19 9:02 ` Stefano Babic
2013-11-17 17:17 ` [U-Boot] [PATCH 4/5] i.MX6: nitrogen6x/sabrelite: initialize imx_type and board_name values Eric Nelson
2013-11-17 17:17 ` [U-Boot] [PATCH 5/5] i.MX6: mx6*sabre*: " Eric Nelson
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=528ADA19.3010708@boundarydevices.com \
--to=eric.nelson@boundarydevices.com \
--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