diff mbox

[U-Boot,v2,1/4] ARM: at91: add cpu.h

Message ID 1439187268-16449-2-git-send-email-hs@denx.de
State Superseded, archived
Delegated to: Andreas Bießmann
Headers show

Commit Message

Heiko Schocher Aug. 10, 2015, 6:14 a.m. UTC
add cpu.h from linux:

7538ec7d1e5: ARM: at91: remove no-MMU at91x40 support

so it is easier to port linux code, which is based on it.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

Changes in v2: None

 arch/arm/mach-at91/include/mach/cpu.h | 149 ++++++++++++++++++++++++++++++++++
 1 file changed, 149 insertions(+)
 create mode 100644 arch/arm/mach-at91/include/mach/cpu.h

Comments

Alexandre Belloni Aug. 11, 2015, 9:03 a.m. UTC | #1
Hi,

On 10/08/2015 at 08:14:24 +0200, Heiko Schocher wrote :
> add cpu.h from linux:
> 
> 7538ec7d1e5: ARM: at91: remove no-MMU at91x40 support
> 
> so it is easier to port linux code, which is based on it.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/mach-at91/include/mach/cpu.h | 149 ++++++++++++++++++++++++++++++++++
>  1 file changed, 149 insertions(+)
>  create mode 100644 arch/arm/mach-at91/include/mach/cpu.h
> 

My comment still holds, you should not need that a no Linux code is
using cpui_is_at91* anymore. The main concern is that you will be based
on an older version of the driver and you will be missing future fixes.
Heiko Schocher Aug. 11, 2015, 9:44 a.m. UTC | #2
Hello Alexandre,

Am 11.08.2015 um 11:03 schrieb Alexandre Belloni:
> Hi,
>
> On 10/08/2015 at 08:14:24 +0200, Heiko Schocher wrote :
>> add cpu.h from linux:
>>
>> 7538ec7d1e5: ARM: at91: remove no-MMU at91x40 support
>>
>> so it is easier to port linux code, which is based on it.
>>
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>> ---
>>
>> Changes in v2: None
>>
>>   arch/arm/mach-at91/include/mach/cpu.h | 149 ++++++++++++++++++++++++++++++++++
>>   1 file changed, 149 insertions(+)
>>   create mode 100644 arch/arm/mach-at91/include/mach/cpu.h
>>
>
> My comment still holds, you should not need that a no Linux code is

Sorry, seems I missed your comment ... Sorry for that.

> using cpui_is_at91* anymore. The main concern is that you will be based
> on an older version of the driver and you will be missing future fixes.

Ok, I look into this, and update to a newer version.

bye,
Heiko
diff mbox

Patch

diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
new file mode 100644
index 0000000..a5e698d
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -0,0 +1,149 @@ 
+/*
+ * from linux:
+ * 7538ec7d1e5: ARM: at91: remove no-MMU at91x40 support
+ *
+ * arch/arm/mach-at91/include/mach/cpu.h
+ *
+ * Copyright (C) 2006 SAN People
+ * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ *
+ */
+
+#ifndef __AT91_MACH_CPU_H__
+#define __AT91_MACH_CPU_H__
+
+#ifdef CONFIG_AT91RM9200
+#define cpu_is_at91rm9200()	(1)
+#else
+#define cpu_is_at91rm9200()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9260
+#define cpu_is_at91sam9260()	(1)
+#else
+#define cpu_is_at91sam9260()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9G20
+#define cpu_is_at91sam9g20()	(1)
+#else
+#define cpu_is_at91sam9g20()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9XE
+#define cpu_is_at91sam9xe()	(1)
+#else
+#define cpu_is_at91sam9xe()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9261
+#define cpu_is_at91sam9261()	(1)
+#else
+#define cpu_is_at91sam9261()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9G10
+#define cpu_is_at91sam9g10()	(1)
+#else
+#define cpu_is_at91sam9g10()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9263
+#define cpu_is_at91sam9263()	(1)
+#else
+#define cpu_is_at91sam9263()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9RL
+#define cpu_is_at91sam9rl()	(1)
+#else
+#define cpu_is_at91sam9rl()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9G45
+#define cpu_is_at91sam9g45()	(1)
+#else
+#define cpu_is_at91sam9g45()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9G45ES
+#define cpu_is_at91sam9g45es()	(1)
+#else
+#define cpu_is_at91sam9g45es()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9M10
+#define cpu_is_at91sam9m10()	(1)
+#else
+#define cpu_is_at91sam9m10()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9G46
+#define cpu_is_at91sam9g46()	(1)
+#else
+#define cpu_is_at91sam9g46()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9M11
+#define cpu_is_at91sam9m11()	(1)
+#else
+#define cpu_is_at91sam9m11()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9X5
+#define cpu_is_at91sam9x5()	(1)
+#else
+#define cpu_is_at91sam9x5()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9G15
+#define cpu_is_at91sam9g15()	(1)
+#else
+#define cpu_is_at91sam9g15()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9G35
+#define cpu_is_at91sam9g35()	(1)
+#else
+#define cpu_is_at91sam9g35()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9X35
+#define cpu_is_at91sam9x35()	(1)
+#else
+#define cpu_is_at91sam9x35()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9G25
+#define cpu_is_at91sam9g25()	(1)
+#else
+#define cpu_is_at91sam9g25()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9X25
+#define cpu_is_at91sam9x25()	(1)
+#else
+#define cpu_is_at91sam9x25()	(0)
+#endif
+
+#ifdef CONFIG_AT91SAM9N12
+#define cpu_is_at91sam9n12()	(1)
+#else
+#define cpu_is_at91sam9n12()	(0)
+#endif
+
+#ifdef CONFIG_SAMA5D3
+#define cpu_is_sama5d3()	(1)
+#else
+#define cpu_is_sama5d3()	(0)
+#endif
+
+#ifdef CONFIG_SAMA5D4
+#define cpu_is_sama5d4()	(1)
+#else
+#define cpu_is_sama5d4()	(0)
+#endif
+
+#endif