diff mbox

[U-Boot,3/5] i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)

Message ID 1377799030-32524-1-git-send-email-eric.nelson@boundarydevices.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Eric Nelson Aug. 29, 2013, 5:57 p.m. UTC
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Stefano Babic Aug. 29, 2013, 9:02 p.m. UTC | #1
Hi Eric,

Am 29/08/2013 19:57, schrieb Eric Nelson:
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---
>  arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

Patch is marked as 3/5 in subject - is it part of a patchset ?

> diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h
> index bfdfd29..8c21364 100644
> --- a/arch/arm/include/asm/arch-mx6/sys_proto.h
> +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
> @@ -19,6 +19,13 @@
>  
>  #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)
> +
> +/* use with MXC_CPU_ constants */
> +#define is_cpu_type(cpu) (cpu_type(get_cpu_rev()) == cpu)
> +
>  const char *get_imx_type(u32 imxtype);
>  unsigned imx_ddr_size(void);
>  
> 

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
Eric Nelson Aug. 29, 2013, 9:09 p.m. UTC | #2
Hi Stefano,

On 08/29/2013 02:02 PM, Stefano Babic wrote:
> Hi Eric,
>
> Am 29/08/2013 19:57, schrieb Eric Nelson:
>> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>> ---
>>   arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>
> Patch is marked as 3/5 in subject - is it part of a patchset ?
>

No. I'm just patch-challenged today.

I also forwarded a cover letter for the two patches changing
the ANATOP_PFD macros without proper heading.

Let me know if you'd like me to re-send.
Stefano Babic Aug. 30, 2013, 5:22 a.m. UTC | #3
On 29/08/2013 23:09, Eric Nelson wrote:
> Hi Stefano,
> 
> On 08/29/2013 02:02 PM, Stefano Babic wrote:
>> Hi Eric,
>>
>> Am 29/08/2013 19:57, schrieb Eric Nelson:
>>> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>>> ---
>>>   arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>
>> Patch is marked as 3/5 in subject - is it part of a patchset ?
>>
> 
> No. I'm just patch-challenged today.
> 

;-)

> I also forwarded a cover letter for the two patches changing
> the ANATOP_PFD macros without proper heading.
> 
> Let me know if you'd like me to re-send.
> 

No problem, you do not need to resend it.

Regards,
Stefano
Stefano Babic Aug. 31, 2013, 4:05 p.m. UTC | #4
On 29/08/2013 19:57, Eric Nelson wrote:
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h
index bfdfd29..8c21364 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -19,6 +19,13 @@ 
 
 #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)
+
+/* use with MXC_CPU_ constants */
+#define is_cpu_type(cpu) (cpu_type(get_cpu_rev()) == cpu)
+
 const char *get_imx_type(u32 imxtype);
 unsigned imx_ddr_size(void);