[rtems commit] bsp/qoriq: Fix pre-processor expansion

Sebastian Huber sebh at rtems.org
Fri Jul 28 13:40:49 UTC 2017


Module:    rtems
Branch:    master
Commit:    8966e8a3a07d341adf1c539e985c2c82202f6c96
Changeset: http://git.rtems.org/rtems/commit/?id=8966e8a3a07d341adf1c539e985c2c82202f6c96

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jul 28 15:39:39 2017 +0200

bsp/qoriq: Fix pre-processor expansion

Update #3082.
Update #3085.

---

 c/src/lib/libbsp/powerpc/qoriq/configure.ac  | 10 +++++++---
 c/src/lib/libbsp/powerpc/qoriq/include/bsp.h |  2 ++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/qoriq/configure.ac b/c/src/lib/libbsp/powerpc/qoriq/configure.ac
index 0a6f1b5..baf8b0e 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/configure.ac
+++ b/c/src/lib/libbsp/powerpc/qoriq/configure.ac
@@ -144,9 +144,13 @@ RTEMS_BSPOPTS_SET([QORIQ_CLOCK_TIMECOUNTER],[qoriq_core_1],[5])
 RTEMS_BSPOPTS_SET([QORIQ_CLOCK_TIMECOUNTER],[*],[1])
 RTEMS_BSPOPTS_HELP([QORIQ_CLOCK_TIMECOUNTER],[global timer used for the timecounter, 0..3 maps to A0..A3, and 4..7 maps to B0..B3])
 
-RTEMS_BSPOPTS_SET([QORIQ_CHIP_VARIANT],[qoriq_e6500*],[QORIQ_CHIP('T', 0)])
-RTEMS_BSPOPTS_SET([QORIQ_CHIP_VARIANT],[*],[QORIQ_CHIP('P', 1020)])
-RTEMS_BSPOPTS_HELP([QORIQ_CHIP_VARIANT],[chip variant, use the QORIQ_CHIP('X', 1234) macro])
+RTEMS_BSPOPTS_SET([QORIQ_CHIP_NUMBER],[qoriq_e6500*],[0])
+RTEMS_BSPOPTS_SET([QORIQ_CHIP_NUMBER],[*],[1020])
+RTEMS_BSPOPTS_HELP([QORIQ_CHIP_NUMBER],[chip number, e.g. 1020, 2040, 2080, 4240])
+
+RTEMS_BSPOPTS_SET([QORIQ_CHIP_SERIES],[qoriq_e6500*],[\'T\'])
+RTEMS_BSPOPTS_SET([QORIQ_CHIP_SERIES],[*],[\'P\'])
+RTEMS_BSPOPTS_HELP([QORIQ_CHIP_SERIES],[chip series, e.g. 'P' or 'T'])
 
 RTEMS_BSPOPTS_SET([QORIQ_BUS_CLOCK_DIVIDER],[qoriq_e6500*],[2])
 RTEMS_BSPOPTS_SET([QORIQ_BUS_CLOCK_DIVIDER],[*],[1])
diff --git a/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h b/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
index 7469ab1..8e168ee 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/qoriq/include/bsp.h
@@ -47,6 +47,8 @@ extern "C" {
 
 #define QORIQ_CHIP_T4240 QORIQ_CHIP('T', 4240)
 
+#define QORIQ_CHIP_VARIANT QORIQ_CHIP(QORIQ_CHIP_SERIES, QORIQ_CHIP_NUMBER)
+
 #define QORIQ_CHIP_IS_T_VARIANT(variant) ((variant) / 10000 == 'T')
 
 extern unsigned BSP_bus_frequency;




More information about the vc mailing list