diff options
| author | Mark Hatle <mark.hatle@kernel.crashing.org> | 2020-09-15 16:23:00 -0500 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@xilinx.com> | 2020-11-30 12:49:44 -0800 |
| commit | 3d886fe006c5cbfaea04beb424408db79ec233f5 (patch) | |
| tree | acc7b5b1a75f93feeddace453517ffa4c793d83a | |
| parent | 4aa4cb1d986edeed6abd34778484ec7ddbc99891 (diff) | |
| download | meta-xilinx-3d886fe006c5cbfaea04beb424408db79ec233f5.tar.gz | |
pmu-firmware: Latest toolchain always treats 'assert' as a macro
Rename the structure member from 'assert' to 'resetAssert to avoid a
compilation error:
| pm_reset.c: In function ‘PmResetDoAssert’:
| pm_reset.c:1905:36: error: macro “assert” passed 2 arguments, but takes just 1
| 1905 | reset->ops->assert(reset, action);
| | ^
| In file included from .../tmp/work/microblazeel-v11.0-bs-cmp-xilinx-elf/pmu-firmware/v2020.1+gitAUTOINC+e8db5fb118-r0/recipe-sysroot/usr/include/sys/reent.h:503,
| from .../tmp/work/microblazeel-v11.0-bs-cmp-xilinx-elf/pmu-firmware/v2020.1+gitAUTOINC+e8db5fb118-r0/recipe-sysroot/usr/include/string.h:11,
| from ../misc/zynqmp_pmufw_bsp/psu_pmu_0/include/xil_printf.h:9,
| from xpfw_debug.h:57,
| from xpfw_default.h:37,
| from pm_reset.c:36:
| .../tmp/work/microblazeel-v11.0-bs-cmp-xilinx-elf/pmu-firmware/v2020.1+gitAUTOINC+e8db5fb118-r0/recipe-sysroot/usr/include/assert.h:16: note: macro “assert” defined here
| 16 | # define assert(__e) ((__e) ? (void)0 : __assert_func (__FILE__, __LINE__, \
| |
| Makefile:37: recipe for target ‘pm_reset.o’ failed
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
| -rw-r--r-- | meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware/fix-zynqmp-assert.patch | 68 | ||||
| -rw-r--r-- | meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2020.2.bb | 3 |
2 files changed, 70 insertions, 1 deletions
diff --git a/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware/fix-zynqmp-assert.patch b/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware/fix-zynqmp-assert.patch new file mode 100644 index 00000000..87e1b111 --- /dev/null +++ b/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware/fix-zynqmp-assert.patch | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c b/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c | ||
| 2 | index 297c6c2ddc..bc295cf013 100644 | ||
| 3 | --- a/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c | ||
| 4 | +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c | ||
| 5 | @@ -52,7 +52,7 @@ | ||
| 6 | * @pulse Function performing reset pulse operation | ||
| 7 | */ | ||
| 8 | typedef struct PmResetOps { | ||
| 9 | - void (*const assert)(const PmReset* const rst, const u32 action); | ||
| 10 | + void (*const resetAssert)(const PmReset* const rst, const u32 action); | ||
| 11 | u32 (*const getStatus)(const PmReset* const s); | ||
| 12 | u32 (*const pulse)(const PmReset* const rst); | ||
| 13 | } PmResetOps; | ||
| 14 | @@ -415,37 +415,37 @@ static u32 PmResetPulsePl(const PmReset* const rst) | ||
| 15 | } | ||
| 16 | |||
| 17 | static const PmResetOps pmResetOpsGeneric = { | ||
| 18 | - .assert = PmResetAssertGen, | ||
| 19 | + .resetAssert = PmResetAssertGen, | ||
| 20 | .getStatus = PmResetGetStatusGen, | ||
| 21 | .pulse = PmResetPulseGen, | ||
| 22 | }; | ||
| 23 | |||
| 24 | static const PmResetOps pmResetOpsGpo = { | ||
| 25 | - .assert = PmResetAssertGpo, | ||
| 26 | + .resetAssert = PmResetAssertGpo, | ||
| 27 | .getStatus = PmResetGetStatusGpo, | ||
| 28 | .pulse = PmResetPulseGpo, | ||
| 29 | }; | ||
| 30 | |||
| 31 | static const PmResetOps pmResetOpsRom = { | ||
| 32 | - .assert = PmResetAssertRom, | ||
| 33 | + .resetAssert = PmResetAssertRom, | ||
| 34 | .getStatus = PmResetGetStatusRom, | ||
| 35 | .pulse = PmResetPulseRom, | ||
| 36 | }; | ||
| 37 | |||
| 38 | static const PmResetOps pmResetOpsNoAssert = { | ||
| 39 | - .assert = NULL, | ||
| 40 | + .resetAssert = NULL, | ||
| 41 | .getStatus = PmResetGetStatusRom, | ||
| 42 | .pulse = PmResetPulseRom, | ||
| 43 | }; | ||
| 44 | |||
| 45 | static const PmResetOps pmResetOpsPl = { | ||
| 46 | - .assert = PmResetAssertPl, | ||
| 47 | + .resetAssert = PmResetAssertPl, | ||
| 48 | .getStatus = PmResetGetStatusPl, | ||
| 49 | .pulse = PmResetPulsePl, | ||
| 50 | }; | ||
| 51 | |||
| 52 | static const PmResetOps pmResetOpsGpioBankIO = { | ||
| 53 | - .assert = NULL, | ||
| 54 | + .resetAssert = NULL, | ||
| 55 | .getStatus = PmResetGetStatusGpioBankIOs, | ||
| 56 | .pulse = PmResetPulseGpioBankIOs, | ||
| 57 | }; | ||
| 58 | @@ -1901,8 +1901,8 @@ s32 PmResetDoAssert(const PmReset *reset, u32 action) | ||
| 59 | switch (action) { | ||
| 60 | case PM_RESET_ACTION_RELEASE: | ||
| 61 | case PM_RESET_ACTION_ASSERT: | ||
| 62 | - if (NULL != reset->ops->assert) { | ||
| 63 | - reset->ops->assert(reset, action); | ||
| 64 | + if (NULL != reset->ops->resetAssert) { | ||
| 65 | + reset->ops->resetAssert(reset, action); | ||
| 66 | } else { | ||
| 67 | status = XST_INVALID_PARAM; | ||
| 68 | } | ||
diff --git a/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2020.2.bb b/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2020.2.bb index 652241c0..330e0209 100644 --- a/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2020.2.bb +++ b/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2020.2.bb | |||
| @@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://../../../../license.txt;md5=39ab6ab638f4d1836ba994ec6 | |||
| 6 | SRCREV = "e8db5fb118229fdc621e0ec7848641a23bf60998" | 6 | SRCREV = "e8db5fb118229fdc621e0ec7848641a23bf60998" |
| 7 | PV = "${XILINX_RELEASE_VERSION}+git${SRCPV}" | 7 | PV = "${XILINX_RELEASE_VERSION}+git${SRCPV}" |
| 8 | 8 | ||
| 9 | SRC_URI = "git://github.com/Xilinx/embeddedsw.git;protocol=https;nobranch=1" | 9 | SRC_URI = "git://github.com/Xilinx/embeddedsw.git;protocol=https;nobranch=1 \ |
| 10 | file://fix-zynqmp-assert.patch;pnum=5" | ||
| 10 | 11 | ||
| 11 | COMPATIBLE_HOST = "microblaze.*-elf" | 12 | COMPATIBLE_HOST = "microblaze.*-elf" |
| 12 | COMPATIBLE_MACHINE = "microblaze-pmu" | 13 | COMPATIBLE_MACHINE = "microblaze-pmu" |
