arm: socfpga: introduce SOCFPGA_GEN5 or SOCFPGA_GEN10
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
@@ -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
Quoted 22 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
Define
SOCFPGA_GEN5which applies to Arria5/Cyclone5 hardware, andSOCFPGA_GEN10for Arria10 hardware.This would allow us to use the shorten define in the rest of code.
Signed-off-by Dinh Nguyen <[email protected]>--- include/configs/socfpga_common.h | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/include/configs/socfpga_common.hindex 3374683..8fc5666 100644include/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)+#defineSOCFPGA_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
Quoted 22 lines · Marek Vasut
Quoted 20 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
Define
SOCFPGA_GEN5which applies to Arria5/Cyclone5 hardware, andSOCFPGA_GEN10for Arria10 hardware.This would allow us to use the shorten define in the rest of code.
Signed-off-by Dinh Nguyen <[email protected]>--- include/configs/socfpga_common.h | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/include/configs/socfpga_common.hindex 3374683..8fc5666 100644include/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)+#defineSOCFPGA_GEN5include/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 toTARGET_SOCFPGA_CYCLONE5and make both of theTARGET_SOCFPGA_CYCLONE5andTARGET_SOCFPGA_ARRIA5select it. But do you think it's worth it ?
Yes, I like that idea!
Thanks,
Dinh
Quoted 38 lines · Dinh Nguyen
Quoted 26 lines · Marek Vasut
On Tuesday, December 01, 2015 at 11:00:02 PM,
dinguyen at opensource.altera.comQuoted 22 lines · wrote:
From: Dinh Nguyen <[email protected]>
Define
SOCFPGA_GEN5which applies to Arria5/Cyclone5 hardware, andSOCFPGA_GEN10for Arria10 hardware.This would allow us to use the shorten define in the rest of code.
Signed-off-by Dinh Nguyen <[email protected]>---
include/configs/socfpga_common.h | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/include/configs/socfpga_common.hindex 3374683..8fc5666 100644include/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)+#defineSOCFPGA_GEN5include/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 toTARGET_SOCFPGA_CYCLONE5and make both of theTARGET_SOCFPGA_CYCLONE5andTARGET_SOCFPGA_ARRIA5select 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