Skip to contentSkip to conversation

arm: socfpga: introduce SOCFPGA_GEN5 or SOCFPGA_GEN10

RFC In review dinguyen at opensource.altera.com 2 participants 4 messages Dec 1, 2015 – Dec 2, 2015

lore
Share & tools
lore
#0 lore raw

RFC 1/1 arm: socfpga: introduce SOCFPGA_GEN5 or SOCFPGA_GEN10

From: Dinh Nguyen <[email protected]>

Define SOCFPGA_GEN5 which applies to Arria5/Cyclone5 hardware, and SOCFPGA_GEN10 for Arria10 hardware.

This would allow us to use the shorten define in the rest of code.

---
 include/configs/socfpga_common.h | 5 +++++
 1 file changed, 5 insertions(+)
include/configs/socfpga_common.h +5 -0
index 3374683..8fc5666 100644
@@ -6,6 +6,11 @@
 #ifndef __CONFIG_SOCFPGA_CYCLONE5_COMMON_H__
 #define __CONFIG_SOCFPGA_CYCLONE5_COMMON_H__
 
+#if defined(CONFIG_TARGET_SOCFPGA_ARRIA5) || defined(CONFIG_TARGET_SOCFPGA_CYCLONE5)
+#define SOCFPGA_GEN5
+#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
+#define SOCFPGA_GEN10
+#endif
 
 /* Virtual target or real hardware */
 #undef CONFIG_SOCFPGA_VIRTUAL_TARGET
Signature · 1 line
2.6.2
#1 lore raw
Quoted 22 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Define SOCFPGA_GEN5 which applies to Arria5/Cyclone5 hardware, and SOCFPGA_GEN10 for Arria10 hardware.

This would allow us to use the shorten define in the rest of code.

---
 include/configs/socfpga_common.h | 5 +++++
 1 file changed, 5 insertions(+)
(quoted diff) +0 -0

b/include/configs/socfpga_common.h index 3374683..8fc5666 100644

include/configs/socfpga_common.h +1 -0
@@ -6,6 +6,11 @@
 #ifndef __CONFIG_SOCFPGA_CYCLONE5_COMMON_H__
 #define __CONFIG_SOCFPGA_CYCLONE5_COMMON_H__
 
+#if defined(CONFIG_TARGET_SOCFPGA_ARRIA5) ||

defined(CONFIG_TARGET_SOCFPGA_CYCLONE5) +#define SOCFPGA_GEN5

include/configs/socfpga_common.h line 13

Quoted 3 lines
include/configs/socfpga_common.h +3 -0
+#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
+#define SOCFPGA_GEN10
+#endif

The same thing can be done in arch/arm/mach-socfpga/Kconfig -- introduce blank symbol similar to TARGET_SOCFPGA_CYCLONE5 and make both of the TARGET_SOCFPGA_CYCLONE5 and TARGET_SOCFPGA_ARRIA5 select it. But do you think it's worth it ?

Best regards,
Marek Vasut

#2 lore raw
Quoted 22 lines · Marek Vasut
Quoted 20 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Define SOCFPGA_GEN5 which applies to Arria5/Cyclone5 hardware, and SOCFPGA_GEN10 for Arria10 hardware.

This would allow us to use the shorten define in the rest of code.

---
 include/configs/socfpga_common.h | 5 +++++
 1 file changed, 5 insertions(+)
(quoted diff) +0 -0

b/include/configs/socfpga_common.h index 3374683..8fc5666 100644

include/configs/socfpga_common.h +0 -0
@@ -6,6 +6,11 @@
 #ifndef __CONFIG_SOCFPGA_CYCLONE5_COMMON_H__
 #define __CONFIG_SOCFPGA_CYCLONE5_COMMON_H__
 
Quoted 11 lines

include/configs/socfpga_common.h line 13

Quoted 5 lines
include/configs/socfpga_common.h +1 -0
+#if defined(CONFIG_TARGET_SOCFPGA_ARRIA5) ||

defined(CONFIG_TARGET_SOCFPGA_CYCLONE5) +#define SOCFPGA_GEN5

include/configs/socfpga_common.h +3 -0
+#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
+#define SOCFPGA_GEN10
+#endif

The same thing can be done in arch/arm/mach-socfpga/Kconfig -- introduce blank symbol similar to TARGET_SOCFPGA_CYCLONE5 and make both of the TARGET_SOCFPGA_CYCLONE5 and TARGET_SOCFPGA_ARRIA5 select it. But do you think it's worth it ?

Yes, I like that idea!

Thanks,
Dinh

#3 lore raw
Quoted 38 lines · Dinh Nguyen
Quoted 26 lines · Marek Vasut

On Tuesday, December 01, 2015 at 11:00:02 PM,
dinguyen at opensource.altera.com

Quoted 22 lines · wrote:

From: Dinh Nguyen <[email protected]>

Define SOCFPGA_GEN5 which applies to Arria5/Cyclone5 hardware, and SOCFPGA_GEN10 for Arria10 hardware.

This would allow us to use the shorten define in the rest of code.

---

 include/configs/socfpga_common.h | 5 +++++
 1 file changed, 5 insertions(+)
(quoted diff) +0 -0

b/include/configs/socfpga_common.h index 3374683..8fc5666 100644

include/configs/socfpga_common.h +0 -0
@@ -6,6 +6,11 @@
 
 #ifndef __CONFIG_SOCFPGA_CYCLONE5_COMMON_H__
 #define __CONFIG_SOCFPGA_CYCLONE5_COMMON_H__
 
Quoted 10 lines

include/configs/socfpga_common.h line 13

Quoted 5 lines
include/configs/socfpga_common.h +1 -0
+#if defined(CONFIG_TARGET_SOCFPGA_ARRIA5) ||

defined(CONFIG_TARGET_SOCFPGA_CYCLONE5) +#define SOCFPGA_GEN5

include/configs/socfpga_common.h +3 -0
+#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
+#define SOCFPGA_GEN10
+#endif

The same thing can be done in arch/arm/mach-socfpga/Kconfig -- introduce blank symbol similar to TARGET_SOCFPGA_CYCLONE5 and make both of the TARGET_SOCFPGA_CYCLONE5 and TARGET_SOCFPGA_ARRIA5 select it. But do you think it's worth it ?

Quoted 1 line

Yes, I like that idea!

You might want to fix all the places where we use if defined(CV) || defined(AV) then too.

Thanks!

Best regards,
Marek Vasut