diff --git a/lib/sw_apps/zynqmp_pmufw/src/lscript.ld b/lib/sw_apps/zynqmp_pmufw/src/lscript.ld index 993f3208..6eb13533 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/lscript.ld +++ b/lib/sw_apps/zynqmp_pmufw/src/lscript.ld @@ -170,116 +170,4 @@ _SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 ); _end = .; } -XpbrACPU0SleepHandler = 0xffd00f98; -XpbrACPU0WakeHandler = 0xffd00d4c; -XpbrACPU1SleepHandler = 0xffd00fbc; -XpbrACPU1WakeHandler = 0xffd00d70; -XpbrACPU2SleepHandler = 0xffd00fe0; -XpbrACPU2WakeHandler = 0xffd00d94; -XpbrACPU3SleepHandler = 0xffd01004; -XpbrACPU3WakeHandler = 0xffd00db8; -XpbrCsuSecureLockdownHandler = 0xffd01e60; -XpbrDapFpdWakeHandler = 0xffd01c70; -XpbrDapRpuWakeHandler = 0xffd01cd8; -XpbrDefaultWakeHandler = 0xffd036d0; -XpbrFpdGicProxyWakeHandler = 0xffd00f04; -XpbrFPIsolationReqHandler = 0xffd01518; -XpbrFPLockIsoHandler = 0xffd0156c; -XpbrGpi1Router = 0xffd038ac; -XpbrGpi2Router = 0xffd03960; -XpbrGpi3Handler = 0xffd00d30; -XpbrHwExceptionHandler = 0xffd03d6c; -XpbrHwRstReqHandler = 0xffd01be0; -XpbrIpi0Handler = 0xffd00cf4; -XpbrIsoReqRouter = 0xffd03b94; -XpbrMio0WakeHandler = 0xffd00e5c; -XpbrMio1WakeHandler = 0xffd00e78; -XpbrMio2WakeHandler = 0xffd00e94; -XpbrMio3WakeHandler = 0xffd00eb0; -XpbrMio4WakeHandler = 0xffd00ecc; -XpbrMio5WakeHandler = 0xffd00ee8; -XpbrNullInterruptHandler = 0xffd03d8c; -XpbrNullServiceHandler = 0xffd020e0; -XpbrPLIsolationReqHandler = 0xffd01534; -XpbrPLNonPCAPIsoReqHandler = 0xffd01550; -XpbrPwrDnACPU0Handler = 0xffd0158c; -XpbrPwrDnACPU1Handler = 0xffd015b0; -XpbrPwrDnACPU2Handler = 0xffd015d4; -XpbrPwrDnACPU3Handler = 0xffd015f8; -XpbrPwrDnFpdHandler = 0xffd01814; -XpbrPwrDnGpuHandler = 0xffd0184c; -XpbrPwrDnL2Bank0Handler = 0xffd01664; -XpbrPwrDnOcmBank0Handler = 0xffd0173c; -XpbrPwrDnOcmBank1Handler = 0xffd01760; -XpbrPwrDnOcmBank2Handler = 0xffd01784; -XpbrPwrDnOcmBank3Handler = 0xffd017a8; -XpbrPwrDnPldHandler = 0xffd01830; -XpbrPwrDnPp0Handler = 0xffd0161c; -XpbrPwrDnPp1Handler = 0xffd01640; -XpbrPwrDnR50Handler = 0xffd01878; -XpbrPwrDnR51Handler = 0xffd01894; -XpbrPwrDnReqRouter = 0xffd03ad4; -XpbrPwrDnRpuHandler = 0xffd01688; -XpbrPwrDnTcm0AHandler = 0xffd016ac; -XpbrPwrDnTcm0BHandler = 0xffd016d0; -XpbrPwrDnTcm1AHandler = 0xffd016f4; -XpbrPwrDnTcm1BHandler = 0xffd01718; -XpbrPwrDnUsb0Handler = 0xffd017cc; -XpbrPwrDnUsb1Handler = 0xffd017f0; -XpbrPwrUpACPU0Handler = 0xffd018b0; -XpbrPwrUpACPU1Handler = 0xffd018d4; -XpbrPwrUpACPU2Handler = 0xffd018f8; -XpbrPwrUpACPU3Handler = 0xffd0191c; -XpbrPwrUpFpdHandler = 0xffd01b38; -XpbrPwrUpL2Bank0Handler = 0xffd01988; -XpbrPwrUpOcmBank0Handler = 0xffd01a60; -XpbrPwrUpOcmBank1Handler = 0xffd01a84; -XpbrPwrUpOcmBank2Handler = 0xffd01aa8; -XpbrPwrUpOcmBank3Handler = 0xffd01acc; -XpbrPwrUpPldHandler = 0xffd01b54; -XpbrPwrUpPp0Handler = 0xffd01940; -XpbrPwrUpPp1Handler = 0xffd01964; -XpbrPwrUpReqRouter = 0xffd03a14; -XpbrPwrUpRpuHandler = 0xffd019ac; -XpbrPwrUpTcm0AHandler = 0xffd019d0; -XpbrPwrUpTcm0BHandler = 0xffd019f4; -XpbrPwrUpTcm1AHandler = 0xffd01a18; -XpbrPwrUpTcm1BHandler = 0xffd01a3c; -XpbrPwrUpUsb0Handler = 0xffd01af0; -XpbrPwrUpUsb1Handler = 0xffd01b14; -XpbrR50SleepHandler = 0xffd01028; -XpbrR50WakeHandler = 0xffd00ddc; -XpbrR51SleepHandler = 0xffd0104c; -XpbrR51WakeHandler = 0xffd00e00; -XpbrROMExceptionHandler = 0xffd03d14; -XpbrRstACPU0Handler = 0xffd01124; -XpbrRstACPU1Handler = 0xffd01158; -XpbrRstACPU2Handler = 0xffd0118c; -XpbrRstACPU3Handler = 0xffd011c0; -XpbrRstACPUxHandler = 0xffd01070; -XpbrRstApuHandler = 0xffd01d48; -XpbrRstDisplayPortHandler = 0xffd0131c; -XpbrRstFpdHandler = 0xffd014e8; -XpbrRstGem0Handler = 0xffd013b8; -XpbrRstGem1Handler = 0xffd013e4; -XpbrRstGem2Handler = 0xffd01410; -XpbrRstGem3Handler = 0xffd0143c; -XpbrRstGpuHandler = 0xffd011f4; -XpbrRstLsRpuHandler = 0xffd01dac; -XpbrRstPCIeHandler = 0xffd012b4; -XpbrRstPp0Handler = 0xffd0123c; -XpbrRstPp1Handler = 0xffd01278; -XpbrRstPsOnlyHandler = 0xffd014c0; -XpbrRstR50Handler = 0xffd01350; -XpbrRstR51Handler = 0xffd01384; -XpbrRstSataHandler = 0xffd012e8; -XpbrRstUsb0Handler = 0xffd01468; -XpbrRstUsb1Handler = 0xffd01494; -XpbrRtcAlarmHandler = 0xffd00d14; -XpbrServiceHandler = 0xffd03dfc; -XpbrServiceMode = 0xffd01b70; -XpbrSwExceptionHandler = 0xffd03d7c; -XpbrSwRstReqRouter = 0xffd03c54; -XpbrTMRFaultDetectionHandler = 0xffd00cec; -XpbrUsb0WakeHandler = 0xffd00e24; -XpbrUsb1WakeHandler = 0xffd00e40; +XpbrServHndlrTbl = 0xffd07bc8; diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_api.c b/lib/sw_apps/zynqmp_pmufw/src/pm_api.c index 3a6c68c2..fd55e78a 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_api.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_api.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * PM API calls definitions: api ids, arguments and functions used for @@ -91,15 +89,6 @@ static const PmApiEntry pmApiTable[] = { }, { .apiId = PM_REGISTER_NOTIFIER, .argTypes = { ARG_NODE, ARG_EVENT_ID, ARG_WAKE, ARG_ENABLE } - }, { - .apiId = PM_CLOCK_REQUEST, - .argTypes = { ARG_UINT32, ARG_UINT32, ARG_UNDEF, ARG_UNDEF } - }, { - .apiId = PM_CLOCK_RELEASE, - .argTypes = { ARG_UINT32, ARG_UNDEF, ARG_UNDEF, ARG_UNDEF } - }, { - .apiId = PM_CLOCK_GET_RATE, - .argTypes = { ARG_UINT32, ARG_UNDEF, ARG_UNDEF, ARG_UNDEF } }, { .apiId = PM_RESET_ASSERT, .argTypes = { ARG_UINT32, ARG_UINT32, ARG_UNDEF, ARG_UNDEF } @@ -178,7 +167,6 @@ static PmPayloadStatus PmCheckArgument(const u8 argType, case ARG_OP_CH_TYPE: case ARG_STATE: case ARG_EVENT_ID: - case ARG_CLOCK: case ARG_RESET: case ARG_LATENCY: case ARG_UINT32: diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_api.h b/lib/sw_apps/zynqmp_pmufw/src/pm_api.h index 1335b437..7de956a7 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_api.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_api.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Definitions needed to check correctness of PM API call @@ -67,7 +65,6 @@ #define ARG_STATE 7U #define ARG_QOS 8U #define ARG_EVENT_ID 9U -#define ARG_CLOCK 10U #define ARG_RESET 11U #define ARG_LATENCY 12U #define ARG_UINT32 13U @@ -90,7 +87,6 @@ typedef enum { PM_PAYLOAD_ERR_STATE, PM_PAYLOAD_ERR_QOS, PM_PAYLOAD_ERR_EVENT_ID, - PM_PAYLOAD_ERR_CLOCK, PM_PAYLOAD_ERR_RESET, PM_PAYLOAD_ERR_LATENCY, PM_PAYLOAD_ERR_WAKE, diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_binding.c b/lib/sw_apps/zynqmp_pmufw/src/pm_binding.c index f59265ae..88a41584 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_binding.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_binding.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Implementations of the functions to be used for integrating power diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_binding.h b/lib/sw_apps/zynqmp_pmufw/src/pm_binding.h index 3c2cab21..b110d287 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_binding.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_binding.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Function declarations to be used for integrating * power management within PMU firmware. diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_callbacks.c b/lib/sw_apps/zynqmp_pmufw/src/pm_callbacks.c index 82985481..9f91ff64 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_callbacks.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_callbacks.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * PM callbacks interface. diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_callbacks.h b/lib/sw_apps/zynqmp_pmufw/src/pm_callbacks.h index 3688223f..7a718a70 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_callbacks.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_callbacks.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * PM callbacks interface. diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_common.c b/lib/sw_apps/zynqmp_pmufw/src/pm_common.c index d3853802..3bea7058 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_common.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_common.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Definitions of commonly used functions for debugging PMU Power diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_common.h b/lib/sw_apps/zynqmp_pmufw/src/pm_common.h index e61c8e55..af8a7e4c 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_common.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_common.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Definitions of commonly used macros and enums in PMU Power diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_core.c b/lib/sw_apps/zynqmp_pmufw/src/pm_core.c index e58cf6f9..5cf042e7 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_core.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_core.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * This file contains implementation of the PM API functions, which @@ -550,38 +548,6 @@ static void PmRegisterNotifier(const PmMaster *const master, const u32 node, event, wake, enable); } -/** - * PmClockRequest() - Request the clock at some frequency - * @master Initiator of the request - * @clock The clock in question - * @rate Frequency to be set - */ -static void PmClockRequest(const PmMaster *const master, const u32 clock, - const u32 rate) -{ - PmDbg("%s(%d, %d) not implemented\n", __func__, clock, rate); -} - -/** - * PmClockRelease() - Release the clock - * @master Initiator of the request - * @clock The clock in question - */ -static void PmClockRelease(const PmMaster *const master, const u32 clock) -{ - PmDbg("%s(%d) not implemented\n", __func__, clock); -} - -/** - * PmGetClockRate() - Get current frequency of the clock - * @master Initiator of the request - * @clock Clock whose frequency should be returned - */ -static void PmGetClockRate(const PmMaster *const master, const u32 clock) -{ - PmDbg("%s(%d) not implemented\n", __func__, clock); -} - /** * PmResetAssert() - Request setting of reset (1 - assert, 0 - release) * @master Initiator of the request @@ -664,15 +630,6 @@ void PmProcessApiCall(const PmMaster *const master, case PM_REGISTER_NOTIFIER: PmRegisterNotifier(master, pload[1], pload[2], pload[3], pload[4]); break; - case PM_CLOCK_REQUEST: - PmClockRequest(master, pload[1], pload[2]); - break; - case PM_CLOCK_RELEASE: - PmClockRelease(master, pload[1]); - break; - case PM_CLOCK_GET_RATE: - PmGetClockRate(master, pload[1]); - break; case PM_RESET_ASSERT: PmResetAssert(master, pload[1], pload[2]); break; diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_core.h b/lib/sw_apps/zynqmp_pmufw/src/pm_core.h index 8cc2f808..307a5a22 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_core.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_core.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Contains the function to call for processing a PM API call. diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_defs.h b/lib/sw_apps/zynqmp_pmufw/src/pm_defs.h index b14212bc..1e5e2ecb 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_defs.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_defs.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Definitions of commonly used enums that have to match definitions @@ -79,11 +77,6 @@ #define PM_SET_REQUIREMENT 15U #define PM_SET_MAX_LATENCY 16U -#define PM_CLOCK_REQUEST 17U -#define PM_CLOCK_RELEASE 18U -#define PM_CLOCK_SET_RATE 19U -#define PM_CLOCK_GET_RATE 20U -#define PM_CLOCK_GET_RATE_INFO 21U #define PM_RESET_ASSERT 22U #define PM_RESET_GET_STATUS 23U #define PM_MMIO_WRITE 24U diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_master.c b/lib/sw_apps/zynqmp_pmufw/src/pm_master.c index e1d076c6..464176c4 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_master.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_master.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Master related data and function definitions: @@ -47,196 +45,196 @@ /* Requirement of APU master */ PmRequirement pmApuReq_g[PM_MASTER_APU_SLAVE_MAX] = { - [PM_MASTER_APU_SLAVE_OCM0] = { - .slave = &pmSlaveOcm0_g.slv, - .requestor = &pmMasterApu_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_APU_SLAVE_OCM1] = { - .slave = &pmSlaveOcm1_g.slv, - .requestor = &pmMasterApu_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_APU_SLAVE_OCM2] = { - .slave = &pmSlaveOcm2_g.slv, - .requestor = &pmMasterApu_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_APU_SLAVE_OCM3] = { - .slave = &pmSlaveOcm3_g.slv, - .requestor = &pmMasterApu_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_APU_SLAVE_L2] = { - .slave = &pmSlaveL2_g.slv, - .requestor = &pmMasterApu_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_APU_SLAVE_USB0] = { - .slave = &pmSlaveUsb0_g.slv, - .requestor = &pmMasterApu_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_APU_SLAVE_USB1] = { - .slave = &pmSlaveUsb1_g.slv, - .requestor = &pmMasterApu_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_APU_SLAVE_TTC0] = { - .slave = &pmSlaveTtc0_g.slv, - .requestor = &pmMasterApu_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_APU_SLAVE_SATA] = { - .slave = &pmSlaveSata_g.slv, - .requestor = &pmMasterApu_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, + [PM_MASTER_APU_SLAVE_OCM0] = { + .slave = &pmSlaveOcm0_g.slv, + .requestor = &pmMasterApu_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_APU_SLAVE_OCM1] = { + .slave = &pmSlaveOcm1_g.slv, + .requestor = &pmMasterApu_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_APU_SLAVE_OCM2] = { + .slave = &pmSlaveOcm2_g.slv, + .requestor = &pmMasterApu_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_APU_SLAVE_OCM3] = { + .slave = &pmSlaveOcm3_g.slv, + .requestor = &pmMasterApu_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_APU_SLAVE_L2] = { + .slave = &pmSlaveL2_g.slv, + .requestor = &pmMasterApu_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_APU_SLAVE_USB0] = { + .slave = &pmSlaveUsb0_g.slv, + .requestor = &pmMasterApu_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_APU_SLAVE_USB1] = { + .slave = &pmSlaveUsb1_g.slv, + .requestor = &pmMasterApu_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_APU_SLAVE_TTC0] = { + .slave = &pmSlaveTtc0_g.slv, + .requestor = &pmMasterApu_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_APU_SLAVE_SATA] = { + .slave = &pmSlaveSata_g.slv, + .requestor = &pmMasterApu_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, }; /* Requirement of RPU_0 master */ PmRequirement pmRpu0Req_g[PM_MASTER_RPU_0_SLAVE_MAX] = { - [PM_MASTER_RPU_0_SLAVE_OCM0] = { - .slave = &pmSlaveOcm0_g.slv, - .requestor = &pmMasterRpu0_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_RPU_0_SLAVE_OCM1] = { - .slave = &pmSlaveOcm1_g.slv, - .requestor = &pmMasterRpu0_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_RPU_0_SLAVE_OCM2] = { - .slave = &pmSlaveOcm2_g.slv, - .requestor = &pmMasterRpu0_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_RPU_0_SLAVE_OCM3] = { - .slave = &pmSlaveOcm3_g.slv, - .requestor = &pmMasterRpu0_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_RPU_0_SLAVE_TCM0A] = { - .slave = &pmSlaveTcm0A_g.slv, - .requestor = &pmMasterRpu0_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_RPU_0_SLAVE_TCM0B] = { - .slave = &pmSlaveTcm0B_g.slv, - .requestor = &pmMasterRpu0_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_RPU_0_SLAVE_TCM1A] = { - .slave = &pmSlaveTcm1A_g.slv, - .requestor = &pmMasterRpu0_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_RPU_0_SLAVE_TCM1B] = { - .slave = &pmSlaveTcm1B_g.slv, - .requestor = &pmMasterRpu0_g, - .info = PM_MASTER_USING_SLAVE_MASK, - .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, - }, - [PM_MASTER_APU_SLAVE_USB0] = { - .slave = &pmSlaveUsb0_g.slv, - .requestor = &pmMasterRpu0_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_APU_SLAVE_USB1] = { - .slave = &pmSlaveUsb1_g.slv, - .requestor = &pmMasterRpu0_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_RPU_0_SLAVE_TTC0] = { - .slave = &pmSlaveTtc0_g.slv, - .requestor = &pmMasterRpu0_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, - [PM_MASTER_RPU_0_SLAVE_SATA] = { - .slave = &pmSlaveSata_g.slv, - .requestor = &pmMasterRpu0_g, - .info = 0U, - .currReq = 0U, - .nextReq = 0U, - }, + [PM_MASTER_RPU_0_SLAVE_OCM0] = { + .slave = &pmSlaveOcm0_g.slv, + .requestor = &pmMasterRpu0_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_RPU_0_SLAVE_OCM1] = { + .slave = &pmSlaveOcm1_g.slv, + .requestor = &pmMasterRpu0_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_RPU_0_SLAVE_OCM2] = { + .slave = &pmSlaveOcm2_g.slv, + .requestor = &pmMasterRpu0_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_RPU_0_SLAVE_OCM3] = { + .slave = &pmSlaveOcm3_g.slv, + .requestor = &pmMasterRpu0_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_RPU_0_SLAVE_TCM0A] = { + .slave = &pmSlaveTcm0A_g.slv, + .requestor = &pmMasterRpu0_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_RPU_0_SLAVE_TCM0B] = { + .slave = &pmSlaveTcm0B_g.slv, + .requestor = &pmMasterRpu0_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_RPU_0_SLAVE_TCM1A] = { + .slave = &pmSlaveTcm1A_g.slv, + .requestor = &pmMasterRpu0_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_RPU_0_SLAVE_TCM1B] = { + .slave = &pmSlaveTcm1B_g.slv, + .requestor = &pmMasterRpu0_g, + .info = PM_MASTER_USING_SLAVE_MASK, + .currReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + .nextReq = PM_CAP_ACCESS | PM_CAP_CONTEXT, + }, + [PM_MASTER_RPU_0_SLAVE_USB0] = { + .slave = &pmSlaveUsb0_g.slv, + .requestor = &pmMasterRpu0_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_RPU_0_SLAVE_USB1] = { + .slave = &pmSlaveUsb1_g.slv, + .requestor = &pmMasterRpu0_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_RPU_0_SLAVE_TTC0] = { + .slave = &pmSlaveTtc0_g.slv, + .requestor = &pmMasterRpu0_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, + [PM_MASTER_RPU_0_SLAVE_SATA] = { + .slave = &pmSlaveSata_g.slv, + .requestor = &pmMasterRpu0_g, + .info = 0U, + .currReq = 0U, + .nextReq = 0U, + }, }; PmMaster pmMasterApu_g = { - .procs = pmApuProcs_g, - .procsCnt = PM_PROC_APU_MAX, - .ipiMask = IPI_PMU_0_IER_APU_MASK, - .ipiTrigMask = IPI_PMU_0_TRIG_APU_MASK, - .pmuBuffer = IPI_BUFFER_PMU_BASE + IPI_BUFFER_TARGET_APU_OFFSET, - .buffer = IPI_BUFFER_APU_BASE + IPI_BUFFER_TARGET_PMU_OFFSET, - .reqs = pmApuReq_g, - .reqsCnt = ARRAY_SIZE(pmApuReq_g), + .procs = pmApuProcs_g, + .procsCnt = PM_PROC_APU_MAX, + .ipiMask = IPI_PMU_0_IER_APU_MASK, + .ipiTrigMask = IPI_PMU_0_TRIG_APU_MASK, + .pmuBuffer = IPI_BUFFER_PMU_BASE + IPI_BUFFER_TARGET_APU_OFFSET, + .buffer = IPI_BUFFER_APU_BASE + IPI_BUFFER_TARGET_PMU_OFFSET, + .reqs = pmApuReq_g, + .reqsCnt = ARRAY_SIZE(pmApuReq_g), }; PmMaster pmMasterRpu0_g = { - .procs = &pmRpuProcs_g[PM_PROC_RPU_0], - .procsCnt = 1, - .ipiMask = IPI_PMU_0_IER_RPU_0_MASK, - .ipiTrigMask = IPI_PMU_0_TRIG_RPU_0_MASK, - .pmuBuffer = IPI_BUFFER_PMU_BASE + IPI_BUFFER_TARGET_RPU_0_OFFSET, - .buffer = IPI_BUFFER_RPU_0_BASE + IPI_BUFFER_TARGET_PMU_OFFSET, - .reqs = pmRpu0Req_g, - .reqsCnt = ARRAY_SIZE(pmRpu0Req_g), + .procs = &pmRpuProcs_g[PM_PROC_RPU_0], + .procsCnt = 1, + .ipiMask = IPI_PMU_0_IER_RPU_0_MASK, + .ipiTrigMask = IPI_PMU_0_TRIG_RPU_0_MASK, + .pmuBuffer = IPI_BUFFER_PMU_BASE + IPI_BUFFER_TARGET_RPU_0_OFFSET, + .buffer = IPI_BUFFER_RPU_0_BASE + IPI_BUFFER_TARGET_PMU_OFFSET, + .reqs = pmRpu0Req_g, + .reqsCnt = ARRAY_SIZE(pmRpu0Req_g), }; PmMaster pmMasterRpu1_g = { - .procs = &pmRpuProcs_g[PM_PROC_RPU_1], - .procsCnt = 1, - .ipiMask = IPI_PMU_0_IER_RPU_1_MASK, - .ipiTrigMask = IPI_PMU_0_TRIG_RPU_1_MASK, - .pmuBuffer = IPI_BUFFER_PMU_BASE + IPI_BUFFER_TARGET_RPU_1_OFFSET, - .buffer = IPI_BUFFER_RPU_1_BASE + IPI_BUFFER_TARGET_PMU_OFFSET, - .reqs = NULL, /* lockstep mode is assumed for now */ - .reqsCnt = 0, + .procs = &pmRpuProcs_g[PM_PROC_RPU_1], + .procsCnt = 1, + .ipiMask = IPI_PMU_0_IER_RPU_1_MASK, + .ipiTrigMask = IPI_PMU_0_TRIG_RPU_1_MASK, + .pmuBuffer = IPI_BUFFER_PMU_BASE + IPI_BUFFER_TARGET_RPU_1_OFFSET, + .buffer = IPI_BUFFER_RPU_1_BASE + IPI_BUFFER_TARGET_PMU_OFFSET, + .reqs = NULL, /* lockstep mode is assumed for now */ + .reqsCnt = 0, }; static const PmMaster *const pmAllMasters[PM_MASTER_MAX] = { - [PM_MASTER_APU] = &pmMasterApu_g, - [PM_MASTER_RPU_0] = &pmMasterRpu0_g, - [PM_MASTER_RPU_1] = &pmMasterRpu1_g, + [PM_MASTER_APU] = &pmMasterApu_g, + [PM_MASTER_RPU_0] = &pmMasterRpu0_g, + [PM_MASTER_RPU_1] = &pmMasterRpu1_g, }; /** @@ -251,20 +249,20 @@ static const PmMaster *const pmAllMasters[PM_MASTER_MAX] = { */ u32 PmRequirementSchedule(PmRequirement* const masterReq, const u32 caps) { - u32 status; + u32 status; - /* Check if slave has a state with requested capabilities */ - status = PmCheckCapabilities(masterReq->slave, caps); - if (PM_RET_SUCCESS != status) { - status = PM_RET_ERROR_NOTSUPPORTED; - goto done; - } + /* Check if slave has a state with requested capabilities */ + status = PmCheckCapabilities(masterReq->slave, caps); + if (PM_RET_SUCCESS != status) { + status = PM_RET_ERROR_NOTSUPPORTED; + goto done; + } - /* Schedule setting of the requirement for later */ - masterReq->nextReq = caps; + /* Schedule setting of the requirement for later */ + masterReq->nextReq = caps; done: - return status; + return status; } /** @@ -278,35 +276,35 @@ done: */ u32 PmRequirementUpdate(PmRequirement* const masterReq, const u32 caps) { - u32 status; - u32 tmpCaps; + u32 status; + u32 tmpCaps; - PmDbg("%s\n", __func__); - /* Check if slave has a state with requested capabilities */ - status = PmCheckCapabilities(masterReq->slave, caps); + PmDbg("%s\n", __func__); + /* Check if slave has a state with requested capabilities */ + status = PmCheckCapabilities(masterReq->slave, caps); - PmDbg("PmCheckCapabilities status=%d\n", status); - if (PM_RET_SUCCESS != status) { - goto done; - } + PmDbg("PmCheckCapabilities status=%d\n", status); + if (PM_RET_SUCCESS != status) { + goto done; + } - /* Configure requested capabilities */ - tmpCaps = masterReq->currReq; - masterReq->currReq = caps; - status = PmUpdateSlave(masterReq->slave); + /* Configure requested capabilities */ + tmpCaps = masterReq->currReq; + masterReq->currReq = caps; + status = PmUpdateSlave(masterReq->slave); - PmDbg("PmUpdateSlave status=%d\n", status); + PmDbg("PmUpdateSlave status=%d\n", status); - if (PM_RET_SUCCESS == status) { - /* All capabilities requested in active state are constant */ - masterReq->nextReq = masterReq->currReq; - } else { - /* Remember the last setting, will report an error */ - masterReq->currReq = tmpCaps; - } + if (PM_RET_SUCCESS == status) { + /* All capabilities requested in active state are constant */ + masterReq->nextReq = masterReq->currReq; + } else { + /* Remember the last setting, will report an error */ + masterReq->currReq = tmpCaps; + } done: - return status; + return status; } /** @@ -327,31 +325,32 @@ done: */ void PmRequirementUpdateScheduled(const PmMaster* const master, const bool swap) { - u32 status; - PmRequirementId i; + u32 status; + PmRequirementId i; - PmDbg("%s master %s\n", __func__, PmStrNode(master->procs[0].node.nodeId)); + PmDbg("%s master %s\n", __func__, PmStrNode(master->procs[0].node.nodeId)); - for (i = 0; i < master->reqsCnt; i++) { - if (master->reqs[i].currReq != master->reqs[i].nextReq) { - u32 tmpReq = master->reqs[i].nextReq; + for (i = 0; i < master->reqsCnt; i++) { + if (master->reqs[i].currReq != master->reqs[i].nextReq) { + u32 tmpReq = master->reqs[i].nextReq; - if (true == swap) { - /* Swap current and next requirements */ - master->reqs[i].nextReq = master->reqs[i].currReq; - } + if (true == swap) { + /* Swap current and next requirements */ + master->reqs[i].nextReq = master->reqs[i].currReq; + } - master->reqs[i].currReq = tmpReq; + master->reqs[i].currReq = tmpReq; - /* Update slave setting */ - status = PmUpdateSlave(master->reqs[i].slave); - /* if rom works correctly, status should be always ok */ - if (PM_RET_SUCCESS != status) { - PmDbg("%s ERROR setting slave node %s\n", - __func__, PmStrNode(master->reqs[i].slave->node.nodeId)); - } - } - } + /* Update slave setting */ + status = PmUpdateSlave(master->reqs[i].slave); + /* if rom works correctly, status should be always ok */ + if (PM_RET_SUCCESS != status) { + PmDbg("%s ERROR setting slave node %s\n", + __func__, + PmStrNode(master->reqs[i].slave->node.nodeId)); + } + } + } } /** @@ -361,16 +360,16 @@ void PmRequirementUpdateScheduled(const PmMaster* const master, const bool swap) */ void PmRequirementCancelScheduled(const PmMaster* const master) { - PmRequirementId i; + PmRequirementId i; - for (i = 0; i < master->reqsCnt; i++) { - if (master->reqs[i].currReq != master->reqs[i].nextReq) { - /* Drop the scheduled request by making it constant */ - PmDbg("%s %s\n", - __func__, PmStrNode(master->reqs[i].slave->node.nodeId)); - master->reqs[i].nextReq = master->reqs[i].currReq; - } - } + for (i = 0; i < master->reqsCnt; i++) { + if (master->reqs[i].currReq != master->reqs[i].nextReq) { + /* Drop the scheduled request by making it constant */ + PmDbg("%s %s\n", __func__, + PmStrNode(master->reqs[i].slave->node.nodeId)); + master->reqs[i].nextReq = master->reqs[i].currReq; + } + } } /** @@ -381,20 +380,20 @@ void PmRequirementCancelScheduled(const PmMaster* const master) */ void PmRequirementReleaseAll(const PmMaster* const master) { - u32 status; - PmRequirementId i; + u32 status; + PmRequirementId i; - for (i = 0; i < master->reqsCnt; i++) { - master->reqs[i].currReq = 0U; - master->reqs[i].nextReq = 0U; - /* Update slave setting */ - status = PmUpdateSlave(master->reqs[i].slave); - /* if pmu rom works correctly, status should be always ok */ - if (PM_RET_SUCCESS != status) { - PmDbg("%s ERROR setting slave node %s\n", - __func__, PmStrNode(master->reqs[i].slave->node.nodeId)); - } - } + for (i = 0; i < master->reqsCnt; i++) { + master->reqs[i].currReq = 0U; + master->reqs[i].nextReq = 0U; + /* Update slave setting */ + status = PmUpdateSlave(master->reqs[i].slave); + /* if pmu rom works correctly, status should be always ok */ + if (PM_RET_SUCCESS != status) { + PmDbg("%s ERROR setting slave node %s\n", __func__, + PmStrNode(master->reqs[i].slave->node.nodeId)); + } + } } /** @@ -408,19 +407,19 @@ void PmRequirementReleaseAll(const PmMaster* const master) * not allowed to use the slave. */ PmRequirement* PmGetRequirementForSlave(const PmMaster* const master, - const PmNodeId nodeId) + const PmNodeId nodeId) { - u32 i; - PmRequirement *req = NULL; + u32 i; + PmRequirement *req = NULL; - for (i = 0; i < master->reqsCnt; i++) { - if (master->reqs[i].slave->node.nodeId == nodeId) { - req = &master->reqs[i]; - break; - } - } + for (i = 0; i < master->reqsCnt; i++) { + if (master->reqs[i].slave->node.nodeId == nodeId) { + req = &master->reqs[i]; + break; + } + } - return req; + return req; } /** @@ -429,13 +428,13 @@ PmRequirement* PmGetRequirementForSlave(const PmMaster* const master, */ void PmEnableAllMasterIpis(void) { - u8 i; + u8 i; - for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { - XPfw_RMW32(IPI_PMU_0_IER, - pmAllMasters[i]->ipiMask, - pmAllMasters[i]->ipiMask); - } + for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { + XPfw_RMW32(IPI_PMU_0_IER, + pmAllMasters[i]->ipiMask, + pmAllMasters[i]->ipiMask); + } } /** @@ -446,17 +445,17 @@ void PmEnableAllMasterIpis(void) */ const PmMaster* PmGetMasterByIpiMask(const u32 mask) { - u32 i; - const PmMaster *mst = NULL; + u32 i; + const PmMaster *mst = NULL; - for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { - if (mask == pmAllMasters[i]->ipiMask) { - mst = pmAllMasters[i]; - break; - } - } + for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { + if (mask == pmAllMasters[i]->ipiMask) { + mst = pmAllMasters[i]; + break; + } + } - return mst; + return mst; } /** @@ -469,18 +468,18 @@ const PmMaster* PmGetMasterByIpiMask(const u32 mask) * master), or NULL if such processor is not found. */ PmProc* PmGetProcOfThisMaster(const PmMaster* const master, - const PmNodeId nodeId) + const PmNodeId nodeId) { - u32 i; - PmProc *proc = NULL; + u32 i; + PmProc *proc = NULL; - for (i = 0U; i < master->procsCnt; i++) { - if (nodeId == master->procs[i].node.nodeId) { - proc = &master->procs[i]; - } - } + for (i = 0U; i < master->procsCnt; i++) { + if (nodeId == master->procs[i].node.nodeId) { + proc = &master->procs[i]; + } + } - return proc; + return proc; } /** @@ -493,28 +492,28 @@ PmProc* PmGetProcOfThisMaster(const PmMaster* const master, * given node id, or NULL if such processor is not found */ PmProc* PmGetProcOfOtherMaster(const PmMaster* const master, - const PmNodeId nodeId) + const PmNodeId nodeId) { - u32 i; - PmProc *proc = NULL; + u32 i; + PmProc *proc = NULL; - for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { - u32 p; + for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { + u32 p; - if (master == pmAllMasters[i]) { - continue; - } + if (master == pmAllMasters[i]) { + continue; + } - for (p = 0; p < pmAllMasters[i]->procsCnt; p++) { - if (nodeId == pmAllMasters[i]->procs[p].node.nodeId) { - proc = &pmAllMasters[i]->procs[p]; - goto done; - } - } - } + for (p = 0; p < pmAllMasters[i]->procsCnt; p++) { + if (nodeId == pmAllMasters[i]->procs[p].node.nodeId) { + proc = &pmAllMasters[i]->procs[p]; + goto done; + } + } + } done: - return proc; + return proc; } /** @@ -526,21 +525,22 @@ done: */ PmProc* PmGetProcByNodeId(const PmNodeId nodeId) { - u32 i; - PmProc *proc = NULL; + u32 i; + PmProc *proc = NULL; - for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { - u32 p; - for (p = 0U; p < pmAllMasters[i]->procsCnt; p++) { - if (nodeId == pmAllMasters[i]->procs[p].node.nodeId) { - proc = &pmAllMasters[i]->procs[p]; - goto done; - } - } - } + for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { + u32 p; + + for (p = 0U; p < pmAllMasters[i]->procsCnt; p++) { + if (nodeId == pmAllMasters[i]->procs[p].node.nodeId) { + proc = &pmAllMasters[i]->procs[p]; + goto done; + } + } + } done: - return proc; + return proc; } /** @@ -552,22 +552,22 @@ done: */ PmProc* PmGetProcByWfiStatus(const u32 mask) { - u32 i; - PmProc *proc = NULL; + u32 i; + PmProc *proc = NULL; - for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { - u32 p; + for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { + u32 p; - for (p = 0U; p < pmAllMasters[i]->procsCnt; p++) { - if (mask & pmAllMasters[i]->procs[p].wfiStatusMask) { - proc = &pmAllMasters[i]->procs[p]; - goto done; - } - } - } + for (p = 0U; p < pmAllMasters[i]->procsCnt; p++) { + if (mask & pmAllMasters[i]->procs[p].wfiStatusMask) { + proc = &pmAllMasters[i]->procs[p]; + goto done; + } + } + } done: - return proc; + return proc; } /** @@ -578,22 +578,22 @@ done: */ PmProc* PmGetProcByWakeStatus(const u32 mask) { - u32 i; - PmProc *proc = NULL; + u32 i; + PmProc *proc = NULL; - for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { - u32 p; + for (i = 0U; i < ARRAY_SIZE(pmAllMasters); i++) { + u32 p; - for (p = 0U; p < pmAllMasters[i]->procsCnt; p++) { - if (mask & pmAllMasters[i]->procs[p].wakeStatusMask) { - proc = &pmAllMasters[i]->procs[p]; - goto done; - } - } - } + for (p = 0U; p < pmAllMasters[i]->procsCnt; p++) { + if (mask & pmAllMasters[i]->procs[p].wakeStatusMask) { + proc = &pmAllMasters[i]->procs[p]; + goto done; + } + } + } done: - return proc; + return proc; } /** @@ -606,16 +606,16 @@ done: */ u32 PmMasterGetAwakeProcCnt(const PmMaster* const master) { - u32 i; - u32 activeCnt = 0U; + u32 i; + u32 activeCnt = 0U; - for (i = 0U; i < master->procsCnt; i++) { - if (PM_PROC_STATE_ACTIVE == master->procs[i].node.currState) { - activeCnt++; - } - } + for (i = 0U; i < master->procsCnt; i++) { + if (PM_PROC_STATE_ACTIVE == master->procs[i].node.currState) { + activeCnt++; + } + } - return activeCnt; + return activeCnt; } /** @@ -626,15 +626,15 @@ u32 PmMasterGetAwakeProcCnt(const PmMaster* const master) */ void PmEnableProxyWake(PmMaster* const master) { - u32 i; + u32 i; - PmDbg("%s %s\n", __func__, PmStrNode(master->procs->node.nodeId)); + PmDbg("%s %s\n", __func__, PmStrNode(master->procs->node.nodeId)); - for (i = 0; i < master->reqsCnt; i++) { - if (master->reqs[i].info & PM_MASTER_WAKEUP_REQ_MASK) { - PmSlaveWakeEnable(master->reqs[i].slave); - } - } + for (i = 0; i < master->reqsCnt; i++) { + if (master->reqs[i].info & PM_MASTER_WAKEUP_REQ_MASK) { + PmSlaveWakeEnable(master->reqs[i].slave); + } + } } /** @@ -644,13 +644,13 @@ void PmEnableProxyWake(PmMaster* const master) */ static void PmWakeUpCancelScheduled(PmMaster* const master) { - u32 i; + u32 i; - PmDbg("%s %s\n", __func__, PmStrNode(master->procs->node.nodeId)); + PmDbg("%s %s\n", __func__, PmStrNode(master->procs->node.nodeId)); - for (i = 0; i < master->reqsCnt; i++) { - master->reqs[i].info &= ~PM_MASTER_WAKEUP_REQ_MASK; - } + for (i = 0; i < master->reqsCnt; i++) { + master->reqs[i].info &= ~PM_MASTER_WAKEUP_REQ_MASK; + } } /** @@ -659,33 +659,33 @@ static void PmWakeUpCancelScheduled(PmMaster* const master) */ static void PmWakeUpDisableAll(PmMaster* const master) { - u32 i; + u32 i; - PmDbg("%s for %s\n", __func__, PmStrNode(master->procs->node.nodeId)); + PmDbg("%s for %s\n", __func__, PmStrNode(master->procs->node.nodeId)); - for (i = 0; i < master->reqsCnt; i++) { - PmMasterId r; - bool hasOtherReq = false; + for (i = 0; i < master->reqsCnt; i++) { + PmMasterId r; + bool hasOtherReq = false; - if (0U == (master->reqs[i].info & PM_MASTER_WAKEUP_REQ_MASK)) { - continue; - } + if (0U == (master->reqs[i].info & PM_MASTER_WAKEUP_REQ_MASK)) { + continue; + } - master->reqs[i].info &= ~PM_MASTER_WAKEUP_REQ_MASK; - /* Check if there are other masters waiting for slave's wake-up */ - for (r = 0U; r < master->reqs[i].slave->reqsCnt; r++) { - if (0U != (master->reqs[i].slave->reqs[r]->info & - PM_MASTER_WAKEUP_REQ_MASK)) { - hasOtherReq = true; - break; - } - } + master->reqs[i].info &= ~PM_MASTER_WAKEUP_REQ_MASK; + /* Check if there are other masters waiting for slave's wake-up */ + for (r = 0U; r < master->reqs[i].slave->reqsCnt; r++) { + if (0U != (master->reqs[i].slave->reqs[r]->info & + PM_MASTER_WAKEUP_REQ_MASK)) { + hasOtherReq = true; + break; + } + } - if (false == hasOtherReq) { - /* No other masters waiting for wake, disable wake event */ - PmSlaveWakeDisable(master->reqs[i].slave); - } - } + if (false == hasOtherReq) { + /* No other masters waiting for wake, disable wake event */ + PmSlaveWakeDisable(master->reqs[i].slave); + } + } } /** @@ -698,24 +698,24 @@ static void PmWakeUpDisableAll(PmMaster* const master) */ void PmMasterNotify(PmMaster* const master, const PmProcEvent event) { - switch (event) { - case PM_PROC_EVENT_SLEEP: - PmRequirementUpdateScheduled(master, true); - break; - case PM_PROC_EVENT_ABORT_SUSPEND: - PmRequirementCancelScheduled(master); - PmWakeUpCancelScheduled(master); - break; - case PM_PROC_EVENT_WAKE: - PmRequirementUpdateScheduled(master, false); - PmWakeUpDisableAll(master); - break; - case PM_PROC_EVENT_FORCE_PWRDN: - PmRequirementReleaseAll(master); - PmWakeUpCancelScheduled(master); - break; - default: - PmDbg("%s undefined event #%d\n", __func__, event); - break; - } + switch (event) { + case PM_PROC_EVENT_SLEEP: + PmRequirementUpdateScheduled(master, true); + break; + case PM_PROC_EVENT_ABORT_SUSPEND: + PmRequirementCancelScheduled(master); + PmWakeUpCancelScheduled(master); + break; + case PM_PROC_EVENT_WAKE: + PmRequirementUpdateScheduled(master, false); + PmWakeUpDisableAll(master); + break; + case PM_PROC_EVENT_FORCE_PWRDN: + PmRequirementReleaseAll(master); + PmWakeUpCancelScheduled(master); + break; + default: + PmDbg("%s undefined event #%d\n", __func__, event); + break; + } } diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_master.h b/lib/sw_apps/zynqmp_pmufw/src/pm_master.h index 5c6d0aa5..92b837ea 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_master.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_master.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * This file contains PM master related data structures and @@ -107,9 +105,8 @@ typedef struct PmMaster PmMaster; #define PM_MASTER_RPU_0_SLAVE_MAX 12U /* Pm Master request info masks */ -#define PM_MASTER_WAKEUP_REQ_MASK 0x40U -#define PM_MASTER_USING_SLAVE_MASK 0x80U -#define PM_MASTER_INDEX_MASK 0x3FU +#define PM_MASTER_WAKEUP_REQ_MASK 0x1U +#define PM_MASTER_USING_SLAVE_MASK 0x2U /********************************************************************* * Structure definitions @@ -131,11 +128,11 @@ typedef struct PmMaster PmMaster; * state (after it goes to sleep or before it gets awake) */ typedef struct PmRequirement { - PmSlave* const slave; - PmMaster* const requestor; - u8 info; - u32 currReq; - u32 nextReq; + PmSlave* const slave; + PmMaster* const requestor; + u8 info; + u32 currReq; + u32 nextReq; } PmRequirement; /** @@ -153,14 +150,14 @@ typedef struct PmRequirement { * used slaves) */ typedef struct PmMaster { - PmProc* const procs; - const u8 procsCnt; - const u32 ipiMask; - const u32 ipiTrigMask; - const u32 pmuBuffer; - const u32 buffer; - PmRequirement* const reqs; - const PmRequirementId reqsCnt; + PmProc* const procs; + const u8 procsCnt; + const u32 ipiMask; + const u32 ipiTrigMask; + const u32 pmuBuffer; + const u32 buffer; + PmRequirement* const reqs; + const PmRequirementId reqsCnt; } PmMaster; /********************************************************************* @@ -182,17 +179,18 @@ PmProc* PmGetProcByWfiStatus(const u32 mask); PmProc* PmGetProcByWakeStatus(const u32 mask); PmProc* PmGetProcByNodeId(const PmNodeId nodeId); PmProc* PmGetProcOfThisMaster(const PmMaster* const master, - const PmNodeId nodeId); + const PmNodeId nodeId); PmProc* PmGetProcOfOtherMaster(const PmMaster* const master, - const PmNodeId nodeId); + const PmNodeId nodeId); PmRequirement* PmGetRequirementForSlave(const PmMaster* const master, - const PmNodeId nodeId); + const PmNodeId nodeId); u32 PmMasterGetAwakeProcCnt(const PmMaster* const master); /* Requirements related functions */ u32 PmRequirementSchedule(PmRequirement* const masterReq, const u32 caps); u32 PmRequirementUpdate(PmRequirement* const masterReq, const u32 caps); -void PmRequirementUpdateScheduled(const PmMaster* const master, const bool swap); +void PmRequirementUpdateScheduled(const PmMaster* const master, + const bool swap); void PmRequirementCancelScheduled(const PmMaster* const master); void PmEnableAllMasterIpis(void); diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_node.c b/lib/sw_apps/zynqmp_pmufw/src/pm_node.c index 171fcc36..02ae6a16 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_node.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_node.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Global array of all nodes, and GetbyId function diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_node.h b/lib/sw_apps/zynqmp_pmufw/src/pm_node.h index ebba1892..9f3ad2a9 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_node.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_node.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Pm Node related structures and definitions diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_periph.c b/lib/sw_apps/zynqmp_pmufw/src/pm_periph.c index 0e907c24..e9f38c28 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_periph.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_periph.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ #include "pm_periph.h" #include "pm_common.h" diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_periph.h b/lib/sw_apps/zynqmp_pmufw/src/pm_periph.h index 33c24a6a..717cf50d 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_periph.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_periph.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ #ifndef PM_PERIPH_H_ #define PM_PERIPH_H_ diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_power.c b/lib/sw_apps/zynqmp_pmufw/src/pm_power.c index d023b3ce..e9fe69bf 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_power.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_power.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Power nodes (power islands and power domains) related structures, diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_power.h b/lib/sw_apps/zynqmp_pmufw/src/pm_power.h index e0ece3d4..c79445dc 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_power.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_power.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Power nodes (power islands and power domains) related structures diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_proc.c b/lib/sw_apps/zynqmp_pmufw/src/pm_proc.c index b3c88693..c82d8a6f 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_proc.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_proc.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Definitions of processors and finite state machine diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_proc.h b/lib/sw_apps/zynqmp_pmufw/src/pm_proc.h index 72ae89a0..22ab874d 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_proc.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_proc.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Contains all functions, datas and definitions needed for diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_slave.c b/lib/sw_apps/zynqmp_pmufw/src/pm_slave.c index 00db9bad..18927d6a 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_slave.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_slave.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /************************************************************************* * PM slave structures definitions and code for handling states of slaves. diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_slave.h b/lib/sw_apps/zynqmp_pmufw/src/pm_slave.h index b2cb80a2..2ea3b22d 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_slave.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_slave.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * All functions, data and definitions needed for @@ -84,10 +82,10 @@ typedef struct PmRequirement PmRequirement; #define FPD_GICP_PMU_IRQ_GROUP4 0x10U /* FPD GIC Proxy irq masks */ -#define FPD_GICP_USB0_WAKE_IRQ_MASK 0x400U -#define FPD_GICP_USB1_WAKE_IRQ_MASK 0x800U -#define FPD_GICP_TTC0_WAKE_IRQ_MASK 0x10U -#define FPD_GICP_SATA_WAKE_IRQ_MASK 0x20U +#define FPD_GICP_USB0_WAKE_IRQ_MASK (1 << 11) +#define FPD_GICP_USB1_WAKE_IRQ_MASK (1 << 12) +#define FPD_GICP_TTC0_WAKE_IRQ_MASK (1 << 4) +#define FPD_GICP_SATA_WAKE_IRQ_MASK (1 << 5) /********************************************************************* * Structure definitions diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_sram.c b/lib/sw_apps/zynqmp_pmufw/src/pm_sram.c index 488e7c4f..fcfe87c0 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_sram.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_sram.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Definitions of PM slave SRAM structures and state transitions. diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_sram.h b/lib/sw_apps/zynqmp_pmufw/src/pm_sram.h index 81c9d891..52aec46b 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_sram.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_sram.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * SRAM memories slaves definitions and data structures diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_usb.c b/lib/sw_apps/zynqmp_pmufw/src/pm_usb.c index 531c7cb5..7d520e5c 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_usb.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_usb.c @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * Definitions of PM slave USB structures and state transitions. diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_usb.h b/lib/sw_apps/zynqmp_pmufw/src/pm_usb.h index 144229ea..750271db 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_usb.h +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_usb.h @@ -1,34 +1,32 @@ -/****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -******************************************************************************/ +/* + * Copyright (C) 2014 - 2015 Xilinx, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * Use of the Software is limited solely to applications: + * (a) running on a Xilinx device, or + * (b) that interact with a Xilinx device through a bus or interconnect. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of the Xilinx shall not be used + * in advertising or otherwise to promote the sale, use or other dealings in + * this Software without prior written authorization from Xilinx. + */ /********************************************************************* * USB slaves data structures diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h b/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h index ffa885f8..d7078727 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h @@ -40,22 +40,17 @@ /* Let the MB sleep when it is Idle in Main Loop */ #define SLEEP_WHEN_IDLE -#ifndef ZYNQMP_XPFW_VERSION -#define ZYNQMP_XPFW_VERSION "--LOCAL COPY--" -#endif /* Directs the PMU FW to configure UART */ #define CONFIG_UART -/* Enable Power Management Module */ +/* Enable Power Management and Error Management Modules */ #define ENABLE_PM - +#define ENABLE_EM /* * Disable all other mods * User can enable Each of the Optional Modules if required */ #undef ENABLE_RTC_TEST -#undef ENABLE_EM #undef ENABLE_SCHEDULER - #endif /* XPFW_CONFIG_H_ */ diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_core.c b/lib/sw_apps/zynqmp_pmufw/src/xpfw_core.c index 284acbe0..9c90fc81 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_core.c +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_core.c @@ -93,6 +93,11 @@ XStatus XPfw_CoreConfigure(void) /* FIXME: Enable IPI0 for PM-> Do it elsewhere */ XPfw_InterruptEnable(PMU_IOMODULE_IRQ_ENABLE_IPI0_MASK); XPfw_InterruptStart(); +#ifdef ENABLE_PM /* ENABLE_PM */ + /* Set the FW_IS_PRESENT bit to enable PMUFW discovery by ATF*/ + XPfw_RMW32(PMU_GLOBAL_GLOBAL_CNTRL, PMU_GLOBAL_GLOBAL_CNTRL_FW_IS_PRESENT_MASK, + PMU_GLOBAL_GLOBAL_CNTRL_FW_IS_PRESENT_MASK); +#endif /* ENABLE_PM */ Status = XST_SUCCESS; } else { Status = XST_FAILURE; diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_error_handler.c b/lib/sw_apps/zynqmp_pmufw/src/xpfw_error_handler.c index de627cdd..5fb72129 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_error_handler.c +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_error_handler.c @@ -81,9 +81,6 @@ void XPfw_ErrorHandlerOne(void) /* Latch the Error Flags */ l_ErrorOneReg = XPfw_Read32(PMU_GLOBAL_ERROR_STATUS_1); - /* Clear Error Register so that new errors can trigger an Interrupt */ - XPfw_Write32(PMU_GLOBAL_ERROR_STATUS_1,l_ErrorOneReg); - if( (l_ErrorOneReg & PMU_GLOBAL_ERROR_STATUS_1_DDR_ECC_MASK) != 0x00000000U) { XPfw_ErrorEccDdr(); } @@ -121,8 +118,7 @@ void XPfw_ErrorHandlerOne(void) XPfw_ErrorXmpu(); } - /* Clear Error Register so that new errors can trigger an Interrupt */ - + /* Clear Error Register */ XPfw_Write32(PMU_GLOBAL_ERROR_STATUS_1,l_ErrorOneReg); } @@ -135,9 +131,6 @@ void XPfw_ErrorHandlerTwo(void) /* Latch the Error Flags */ l_ErrorTwoReg = XPfw_Read32(PMU_GLOBAL_ERROR_STATUS_2); - /* Clear Error Register so that new errors can trigger an Interrupt */ - XPfw_Write32(PMU_GLOBAL_ERROR_STATUS_2,l_ErrorTwoReg); - if( (l_ErrorTwoReg & PMU_GLOBAL_ERROR_STATUS_2_TO_MASK) != 0x00000000U) { XPfw_ErrorTimeOut(); } @@ -166,9 +159,8 @@ void XPfw_ErrorHandlerTwo(void) XPfw_ErrorCsuRom(); } - - - + /* Clear Error Register */ + XPfw_Write32(PMU_GLOBAL_ERROR_STATUS_2,l_ErrorTwoReg); } diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_events.c b/lib/sw_apps/zynqmp_pmufw/src/xpfw_events.c index 4d5390aa..a2e0f902 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_events.c +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_events.c @@ -1,5 +1,4 @@ /****************************************************************************** -* * Copyright (C) 2015 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -27,105 +26,101 @@ * Except as contained in this notice, the name of the Xilinx shall not be used * in advertising or otherwise to promote the sale, use or other dealings in * this Software without prior written authorization from Xilinx. -* ******************************************************************************/ #include "xpfw_events.h" #include "xpfw_interrupts.h" - -static struct XPfw_Event_t EventTable[]={ - [0U] = {.Type = (u8)0U, .RegMask = MASK32_ALL_LOW, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_MB_FAULT] = { .Type = XPFW_EV_TYPE_GPI0, .RegMask = MASK32_ALL_HIGH, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_APB_AIB_ERROR] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_APB_AIB_ERROR_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_AXI_AIB_ERROR] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_AXI_AIB_ERROR_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ERROR_2] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ERROR_2_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ERROR_1] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ERROR_1_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_3_DBG_PWRUP] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_3_DBG_PWRUP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_2_DBG_PWRUP] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_2_DBG_PWRUP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_1_DBG_PWRUP] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_1_DBG_PWRUP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_0_DBG_PWRUP] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_0_DBG_PWRUP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_FPD_WAKE_GIC_PROXY] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_FPD_WAKE_GIC_PROXY_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_MIO_WAKE_5] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_5_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_MIO_WAKE_4] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_4_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_MIO_WAKE_3] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_3_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_MIO_WAKE_2] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_2_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_MIO_WAKE_1] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_1_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_MIO_WAKE_0] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_0_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_DAP_RPU_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_DAP_RPU_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_DAP_FPD_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_DAP_FPD_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_USB_1_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_USB_1_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_USB_0_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_USB_0_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_R5_1_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_R5_1_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_R5_0_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_R5_0_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_3_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_3_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_2_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_2_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_1_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_1_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_0_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_0_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_VCC_INT_FP_DISCONNECT] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_VCC_INT_FP_DISCONNECT_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_VCC_INT_DISCONNECT] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_VCC_INT_DISCONNECT_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_VCC_AUX_DISCONNECT] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_VCC_AUX_DISCONNECT_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_DBG_ACPU3_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_ACPU3_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_DBG_ACPU2_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_ACPU2_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_DBG_ACPU1_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_ACPU1_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_DBG_ACPU0_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_ACPU0_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_CP_ACPU3_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_CP_ACPU3_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_CP_ACPU2_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_CP_ACPU2_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_CP_ACPU1_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_CP_ACPU1_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_CP_ACPU0_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_CP_ACPU0_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_DBG_RCPU1_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_RCPU1_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_DBG_RCPU0_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_RCPU0_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_R5_1_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_R5_1_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_R5_0_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_R5_0_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_3_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_ACPU_3_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_2_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_ACPU_2_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_1_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_ACPU_1_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_ACPU_0_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_ACPU_0_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_31] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_31_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_30] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_30_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_29] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_29_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_28] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_28_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_27] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_27_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_26] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_26_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_25] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_25_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_24] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_24_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_23] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_23_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_22] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_22_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_21] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_21_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_20] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_20_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_19] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_19_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_18] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_18_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_17] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_17_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_16] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_16_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_15] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_15_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_14] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_14_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_13] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_13_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_12] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_12_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_11] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_11_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_10] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_10_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_9] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_9_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_8] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_8_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_7] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_7_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_6] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_6_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_5] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_5_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_4] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_4_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_3] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_3_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_2] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_2_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_1] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_1_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_PL_GPI_0] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_0_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_RTC_SECONDS] = { .Type = XPFW_EV_TYPE_RTC, .RegMask = PMU_IOMODULE_IRQ_PENDING_RTC_EVERY_SECOND_MASK, .ModMask = MASK32_ALL_LOW }, - [XPFW_EV_RTC_ALARM] = { .Type = XPFW_EV_TYPE_RTC, .RegMask = PMU_IOMODULE_IRQ_PENDING_RTC_ALARM_MASK, .ModMask = MASK32_ALL_LOW } - +static struct XPfw_Event_t EventTable[] = { + [0U] = {.Type = (u8)0U, .RegMask = MASK32_ALL_LOW, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_MB_FAULT] = { .Type = XPFW_EV_TYPE_GPI0, .RegMask = MASK32_ALL_HIGH, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_APB_AIB_ERROR] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_APB_AIB_ERROR_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_AXI_AIB_ERROR] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_AXI_AIB_ERROR_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ERROR_2] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ERROR_2_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ERROR_1] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ERROR_1_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_3_DBG_PWRUP] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_3_DBG_PWRUP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_2_DBG_PWRUP] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_2_DBG_PWRUP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_1_DBG_PWRUP] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_1_DBG_PWRUP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_0_DBG_PWRUP] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_0_DBG_PWRUP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_FPD_WAKE_GIC_PROXY] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_FPD_WAKE_GIC_PROXY_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_MIO_WAKE_5] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_5_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_MIO_WAKE_4] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_4_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_MIO_WAKE_3] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_3_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_MIO_WAKE_2] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_2_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_MIO_WAKE_1] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_1_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_MIO_WAKE_0] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_MIO_WAKE_0_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_DAP_RPU_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_DAP_RPU_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_DAP_FPD_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_DAP_FPD_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_USB_1_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_USB_1_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_USB_0_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_USB_0_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_R5_1_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_R5_1_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_R5_0_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_R5_0_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_3_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_3_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_2_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_2_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_1_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_1_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_0_WAKE] = { .Type = XPFW_EV_TYPE_GPI1, .RegMask = PMU_IOMODULE_GPI1_ACPU_0_WAKE_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_VCC_INT_FP_DISCONNECT] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_VCC_INT_FP_DISCONNECT_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_VCC_INT_DISCONNECT] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_VCC_INT_DISCONNECT_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_VCC_AUX_DISCONNECT] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_VCC_AUX_DISCONNECT_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_DBG_ACPU3_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_ACPU3_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_DBG_ACPU2_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_ACPU2_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_DBG_ACPU1_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_ACPU1_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_DBG_ACPU0_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_ACPU0_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_CP_ACPU3_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_CP_ACPU3_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_CP_ACPU2_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_CP_ACPU2_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_CP_ACPU1_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_CP_ACPU1_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_CP_ACPU0_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_CP_ACPU0_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_DBG_RCPU1_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_RCPU1_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_DBG_RCPU0_RST_REQ] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_DBG_RCPU0_RST_REQ_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_R5_1_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_R5_1_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_R5_0_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_R5_0_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_3_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_ACPU_3_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_2_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_ACPU_2_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_1_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_ACPU_1_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_ACPU_0_SLEEP] = { .Type = XPFW_EV_TYPE_GPI2, .RegMask = PMU_IOMODULE_GPI2_ACPU_0_SLEEP_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_31] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_31_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_30] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_30_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_29] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_29_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_28] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_28_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_27] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_27_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_26] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_26_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_25] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_25_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_24] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_24_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_23] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_23_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_22] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_22_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_21] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_21_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_20] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_20_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_19] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_19_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_18] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_18_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_17] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_17_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_16] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_16_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_15] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_15_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_14] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_14_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_13] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_13_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_12] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_12_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_11] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_11_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_10] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_10_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_9] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_9_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_8] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_8_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_7] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_7_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_6] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_6_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_5] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_5_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_4] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_4_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_3] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_3_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_2] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_2_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_1] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_1_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_PL_GPI_0] = { .Type = XPFW_EV_TYPE_GPI3, .RegMask = PMU_IOMODULE_GPI3_PL_GPI_0_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_RTC_SECONDS] = { .Type = XPFW_EV_TYPE_RTC, .RegMask = PMU_IOMODULE_IRQ_PENDING_RTC_EVERY_SECOND_MASK, .ModMask = MASK32_ALL_LOW }, + [XPFW_EV_RTC_ALARM] = { .Type = XPFW_EV_TYPE_RTC, .RegMask = PMU_IOMODULE_IRQ_PENDING_RTC_ALARM_MASK, .ModMask = MASK32_ALL_LOW } }; - u32 XPfw_EventGetModMask(u32 EventId) { u32 Mask; - if(EventId < XPFW_EV_MAX){ + + if (EventId < XPFW_EV_MAX) { Mask = EventTable[EventId].ModMask; - } - else{ + } else { Mask = 0U; } @@ -135,10 +130,10 @@ u32 XPfw_EventGetModMask(u32 EventId) u32 XPfw_EventGetRegMask(u32 EventId) { u32 Mask; - if(EventId < XPFW_EV_MAX){ + + if (EventId < XPFW_EV_MAX) { Mask = EventTable[EventId].RegMask; - } - else{ + } else { Mask = MASK32_ALL_HIGH; } @@ -149,8 +144,7 @@ static XStatus XPfw_EventEnable(u32 EventId) { XStatus Status; - switch(EventTable[EventId].Type){ - + switch (EventTable[EventId].Type) { case XPFW_EV_TYPE_GPI0: /* Nothing to do for GPI0. These are enabled by default */ /* Enable GPI0 bit in IRQ_ENABLE */ @@ -190,12 +184,8 @@ static XStatus XPfw_EventEnable(u32 EventId) default: Status = XST_FAILURE; break; - - } - - return Status; } @@ -203,8 +193,7 @@ static XStatus XPfw_EventDisable(u32 EventId) { XStatus Status; - switch(EventTable[EventId].Type){ - + switch (EventTable[EventId].Type) { case XPFW_EV_TYPE_GPI0: /* Nothing to do for GPI0. These are enabled by default */ /* Disable GPI0 bit in IRQ_ENABLE */ @@ -216,7 +205,7 @@ static XStatus XPfw_EventDisable(u32 EventId) /* Disable the event in GPI1 ENABLE register */ XPfw_RMW32(PMU_LOCAL_GPI1_ENABLE, EventTable[EventId].RegMask, 0U); /* Disable the GPI1 bit in IRQ ENABLE */ - if(0U == XPfw_Read32(PMU_LOCAL_GPI1_ENABLE)) { + if (0U == XPfw_Read32(PMU_LOCAL_GPI1_ENABLE)) { XPfw_InterruptDisable(PMU_IOMODULE_IRQ_ENABLE_GPI1_MASK); } Status = XST_SUCCESS; @@ -236,7 +225,7 @@ static XStatus XPfw_EventDisable(u32 EventId) /* Disable the event in GPI3 ENABLE register */ XPfw_RMW32(PMU_LOCAL_GPI3_ENABLE, EventTable[EventId].RegMask, 0U); /* Enable the GPI3 bit in IRQ ENABLE */ - if(0U == XPfw_Read32(PMU_LOCAL_GPI3_ENABLE)) { + if (0U == XPfw_Read32(PMU_LOCAL_GPI3_ENABLE)) { XPfw_InterruptDisable(PMU_IOMODULE_IRQ_ENABLE_GPI3_MASK); } Status = XST_SUCCESS; @@ -250,25 +239,19 @@ static XStatus XPfw_EventDisable(u32 EventId) default: Status = XST_FAILURE; break; - - } - - return Status; } XStatus XPfw_EventAddOwner(u8 ModId, u32 EventId) { XStatus Status; - if((EventId < XPFW_EV_MAX) && (ModId < 32U)){ + if ((EventId < XPFW_EV_MAX) && (ModId < 32U)) { EventTable[EventId].ModMask = EventTable[EventId].ModMask | ((u32)1U<TaskList[Idx].Interval = 0U; - SchedPtr->TaskList[Idx].Callback = NULL; - } - SchedPtr->Enabled = FALSE; - SchedPtr->PitBaseAddr = PitBaseAddr; - SchedPtr->Tick = 0U; - XPfw_Write32(SchedPtr->PitBaseAddr + PIT_CONTROL_OFFSET, 0U); - /* Successfully completed init */ - Status = XST_SUCCESS; - } else { - /* Failed due to NULL pointer to Scheduler */ + if (SchedPtr == NULL) { Status = XST_FAILURE; + goto done; } - return Status; + /* Disable all the tasks */ + for (Idx = 0U; Idx < XPFW_SCHED_MAX_TASK; Idx++) { + SchedPtr->TaskList[Idx].Interval = 0U; + SchedPtr->TaskList[Idx].Callback = NULL; + SchedPtr->TaskList[Idx].Status = XPFW_TASK_STATUS_DISABLED; + } + + SchedPtr->Enabled = FALSE; + SchedPtr->PitBaseAddr = PitBaseAddr; + SchedPtr->Tick = 0U; + XPfw_Write32(SchedPtr->PitBaseAddr + PIT_CONTROL_OFFSET, 0U); + + /* Successfully completed init */ + Status = XST_SUCCESS; + +done: + return Status; } XStatus XPfw_SchedulerStart(XPfw_Scheduler_t *SchedPtr) { - XStatus Status; - if (SchedPtr != NULL) { - SchedPtr->Enabled = TRUE; - - XPfw_Write32(SchedPtr->PitBaseAddr + PIT_PRELOAD_OFFSET, - COUNT_PER_TICK); - XPfw_Write32(SchedPtr->PitBaseAddr + PIT_CONTROL_OFFSET, 3U); - Status = XST_SUCCESS; - } else { + if (SchedPtr == NULL) { Status = XST_FAILURE; + goto done; } + + SchedPtr->Enabled = TRUE; + + XPfw_Write32(SchedPtr->PitBaseAddr + PIT_PRELOAD_OFFSET, + COUNT_PER_TICK); + XPfw_Write32(SchedPtr->PitBaseAddr + PIT_CONTROL_OFFSET, 3U); + Status = XST_SUCCESS; + +done: return Status; } - XStatus XPfw_SchedulerStop(XPfw_Scheduler_t *SchedPtr) { SchedPtr->Enabled =FALSE; @@ -104,85 +107,91 @@ XStatus XPfw_SchedulerStop(XPfw_Scheduler_t *SchedPtr) void XPfw_SchedulerTickHandler(XPfw_Scheduler_t *SchedPtr) { + u32 Idx; /* TODO: Add check to detect task misses */ SchedPtr->Tick++; + for (Idx = 0U; Idx < XPFW_SCHED_MAX_TASK; Idx++) { + /* Check if it this task can be triggered */ + if ((0U != SchedPtr->TaskList[Idx].Interval) && + (NULL != SchedPtr->TaskList[Idx].Callback) && + (0U == (SchedPtr->Tick % SchedPtr->TaskList[Idx].Interval))) { + /* Mark the Task as TRIGGERED */ + SchedPtr->TaskList[Idx].Status = XPFW_TASK_STATUS_TRIGGERED; + } + } } -XStatus XPfw_SchedulerProcess(const XPfw_Scheduler_t *SchedPtr) +XStatus XPfw_SchedulerProcess(XPfw_Scheduler_t *SchedPtr) { u32 Idx; XStatus Status; u32 CallCount = 0U; + for (Idx = 0U; Idx < XPFW_SCHED_MAX_TASK; Idx++) { - /* Check if it is valid event */ - if ((0U != SchedPtr->TaskList[Idx].Interval) - && (NULL != SchedPtr->TaskList[Idx].Callback)) { - /* Check if it has triggered */ - if (0U == (SchedPtr->Tick % SchedPtr->TaskList[Idx].Interval)) { - /* Execute the Task */ - SchedPtr->TaskList[Idx].Callback(); - CallCount++; - } + /* Check if the task is triggered and has a valid Callback */ + if ((XPFW_TASK_STATUS_TRIGGERED == SchedPtr->TaskList[Idx].Status) && + (NULL != SchedPtr->TaskList[Idx].Callback)) { + /* Execute the Task */ + SchedPtr->TaskList[Idx].Callback(); + /* Disable the executed Task */ + SchedPtr->TaskList[Idx].Status = XPFW_TASK_STATUS_DISABLED; + CallCount++; } } - //fw_printf("%s: %d Tasks were triggered\r\n", __func__, CallCount); - if (CallCount > 0U) { Status = XST_SUCCESS; } else { - /* Failed because non of the tasks were triggered */ + /* Failed because none of the tasks were triggered */ Status = XST_FAILURE; } + return Status; } - - XStatus XPfw_SchedulerAddTask(XPfw_Scheduler_t *SchedPtr, u32 OwnerId,u32 MilliSeconds, XPfw_Callback_t Callback) { u32 Idx; XStatus Status; + /* Get the Next Free Task Index */ - for(Idx=0U;Idx < XPFW_SCHED_MAX_TASK;Idx++){ - if( 0U == SchedPtr->TaskList[Idx].Interval){ + for (Idx=0U;Idx < XPFW_SCHED_MAX_TASK;Idx++) { + if (0U == SchedPtr->TaskList[Idx].Interval) { break; } } + /* Check if we have reached Max Task limit */ - if(XPFW_SCHED_MAX_TASK == Idx){ + if (XPFW_SCHED_MAX_TASK == Idx) { Status = XST_FAILURE; - } - else{ - /* Add Interval as a factor of TICK_MILLISECONDS */ - SchedPtr->TaskList[Idx].Interval = MilliSeconds/TICK_MILLISECONDS; - SchedPtr->TaskList[Idx].OwnerId = OwnerId; - SchedPtr->TaskList[Idx].Callback = Callback; - Status = XST_SUCCESS; + goto done; } + /* Add Interval as a factor of TICK_MILLISECONDS */ + SchedPtr->TaskList[Idx].Interval = MilliSeconds/TICK_MILLISECONDS; + SchedPtr->TaskList[Idx].OwnerId = OwnerId; + SchedPtr->TaskList[Idx].Callback = Callback; + Status = XST_SUCCESS; + +done: return Status; } - XStatus XPfw_SchedulerRemoveTask(XPfw_Scheduler_t *SchedPtr, u32 OwnerId, u32 MilliSeconds, XPfw_Callback_t Callback) { u32 Idx; u32 TaskCount = 0; + /*Find the Task Index */ - for (Idx = 0U; Idx < XPFW_SCHED_MAX_TASK; Idx++) { - - if ((Callback == SchedPtr->TaskList[Idx].Callback) - && (SchedPtr->TaskList[Idx].OwnerId == OwnerId)) { - /* Disable task with given Milliseconds param or ALL if Milliseconds=0 */ - if ((SchedPtr->TaskList[Idx].Interval == MilliSeconds) - || (0U == MilliSeconds)) { - SchedPtr->TaskList[Idx].Interval = 0U; - SchedPtr->TaskList[Idx].OwnerId = 0U; - SchedPtr->TaskList[Idx].Callback = NULL; - TaskCount++; - } + if ((Callback == SchedPtr->TaskList[Idx].Callback) && + (SchedPtr->TaskList[Idx].OwnerId == OwnerId) && + ((SchedPtr->TaskList[Idx].Interval == MilliSeconds) || + (0U == MilliSeconds))) { + SchedPtr->TaskList[Idx].Interval = 0U; + SchedPtr->TaskList[Idx].OwnerId = 0U; + SchedPtr->TaskList[Idx].Callback = NULL; + TaskCount++; } } diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_scheduler.h b/lib/sw_apps/zynqmp_pmufw/src/xpfw_scheduler.h index d5f1ffe3..376110e8 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_scheduler.h +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_scheduler.h @@ -1,5 +1,4 @@ /****************************************************************************** -* * Copyright (C) 2015 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -27,23 +26,25 @@ * Except as contained in this notice, the name of the Xilinx shall not be used * in advertising or otherwise to promote the sale, use or other dealings in * this Software without prior written authorization from Xilinx. -* ******************************************************************************/ #ifndef XPFW_SCHEDULER_H_ #define XPFW_SCHEDULER_H_ - #include "xpfw_default.h" #define XPFW_SCHED_MAX_TASK 10U +/* Values for TaskPtr->Status */ +#define XPFW_TASK_STATUS_TRIGGERED 0x5AFEC0C0U +#define XPFW_TASK_STATUS_DISABLED 0x00000000U typedef void (*XPfw_Callback_t) (void); struct XPfw_Task_t{ u32 Interval; u32 OwnerId; + u32 Status; XPfw_Callback_t Callback; }; @@ -55,12 +56,11 @@ typedef struct { u32 Enabled; } XPfw_Scheduler_t ; - void XPfw_SchedulerTickHandler(XPfw_Scheduler_t *SchedPtr); XStatus XPfw_SchedulerInit(XPfw_Scheduler_t *SchedPtr, u32 PitBaseAddr); XStatus XPfw_SchedulerStart(XPfw_Scheduler_t *SchedPtr); XStatus XPfw_SchedulerStop(XPfw_Scheduler_t *SchedPtr); -XStatus XPfw_SchedulerProcess(const XPfw_Scheduler_t *SchedPtr); +XStatus XPfw_SchedulerProcess(XPfw_Scheduler_t *SchedPtr); XStatus XPfw_SchedulerAddTask(XPfw_Scheduler_t *SchedPtr, u32 OwnerId,u32 MilliSeconds, XPfw_Callback_t Callback); XStatus XPfw_SchedulerRemoveTask(XPfw_Scheduler_t *SchedPtr, u32 OwnerId, u32 MilliSeconds, XPfw_Callback_t Callback); diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_user_startup.c b/lib/sw_apps/zynqmp_pmufw/src/xpfw_user_startup.c index 5c729109..debd4102 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_user_startup.c +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_user_startup.c @@ -1,6 +1,5 @@ /****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. +* Copyright (C) 2015 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -27,10 +26,8 @@ * Except as contained in this notice, the name of the Xilinx shall not be used * in advertising or otherwise to promote the sale, use or other dealings in * this Software without prior written authorization from Xilinx. -* ******************************************************************************/ - #include "xpfw_config.h" #include "xpfw_core.h" @@ -46,29 +43,13 @@ #include "ipi_buffer.h" #include "pm_defs.h" - -#ifdef ENABLE_SCHEDULER -void PrintMsg1(void) -{ - fw_printf("Task#1\r\n"); -} -void PrintMsg2(void) -{ - fw_printf("Task#2\r\n"); -} -#endif - - #ifdef ENABLE_PM static void PmIpiHandler(const XPfw_Module_t *ModPtr, u32 IpiNum, u32 SrcMask) { - - u32 isrVal, apiId; XPfw_PmIpiStatus ipiStatus; - switch(IpiNum) { - + switch (IpiNum) { case 0: isrVal = XPfw_Read32(IPI_PMU_0_ISR); fw_printf("Received IPI Mask:0x%08x\r\n", isrVal); @@ -76,11 +57,11 @@ static void PmIpiHandler(const XPfw_Module_t *ModPtr, u32 IpiNum, u32 SrcMask) if (XPFW_PM_IPI_IS_PM_CALL == ipiStatus) { /* Power management API processing */ XPfw_PmIpiHandler(isrVal, apiId); - } - else { + } else { fw_printf("MOD-%d: Non-PM IPI-%d call received\r\n", ModPtr->ModId, IpiNum); } - XPfw_Write32(IPI_PMU_0_ISR, isrVal); + + XPfw_Write32(IPI_PMU_0_ISR, isrVal); break; case 1: @@ -100,34 +81,30 @@ static void PmIpiHandler(const XPfw_Module_t *ModPtr, u32 IpiNum, u32 SrcMask) default: fw_printf("ERROR: Invalid IPI Number: %d\r\n", IpiNum); - } - - } -void PmEventHandler(const XPfw_Module_t *ModPtr, u32 EventId) +static void PmEventHandler(const XPfw_Module_t *ModPtr, u32 EventId) { u32 EvType, RegValue; EvType = XPfw_EventGetType(EventId); switch (EvType) { - case XPFW_EV_TYPE_GPI1: - RegValue = XPfw_EventGetRegMask(EventId); - XPfw_PmWakeHandler(RegValue); - break; - case XPFW_EV_TYPE_GPI2: - RegValue = XPfw_EventGetRegMask(EventId); - XPfw_PmWfiHandler(RegValue); - break; - default: - fw_printf("Unhandled PM Event: %d\r\n", EventId); + case XPFW_EV_TYPE_GPI1: + RegValue = XPfw_EventGetRegMask(EventId); + XPfw_PmWakeHandler(RegValue); + break; + case XPFW_EV_TYPE_GPI2: + RegValue = XPfw_EventGetRegMask(EventId); + XPfw_PmWfiHandler(RegValue); + break; + default: + fw_printf("Unhandled PM Event: %d\r\n", EventId); break; } - } -void PmCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) +static void PmCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) { /* Add Event Handlers for PM */ XPfw_CoreRegisterEvent(ModPtr, XPFW_EV_ACPU_0_WAKE); @@ -163,10 +140,20 @@ void PmCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) */ XPfw_PmInit(); } -#endif +static void ModPmInit(void) +{ + const XPfw_Module_t *PmModPtr = XPfw_CoreCreateMod(); + + (void)XPfw_CoreSetCfgHandler(PmModPtr, PmCfgInit); + (void)XPfw_CoreSetEventHandler(PmModPtr, PmEventHandler); + (void)XPfw_CoreSetIpiHandler(PmModPtr, PmIpiHandler, 0U); +} +#else /* ENABLE_PM */ +static void ModPmInit(void) { } +#endif /* ENABLE_PM */ #ifdef ENABLE_EM -void EmEventHandler(const XPfw_Module_t *ModPtr, u32 EventId) +static void EmEventHandler(const XPfw_Module_t *ModPtr, u32 EventId) { switch (EventId) { case XPFW_EV_ERROR_1: @@ -179,104 +166,91 @@ void EmEventHandler(const XPfw_Module_t *ModPtr, u32 EventId) fw_printf("EM:Unhandled Event(ID:%d)\r\n", EventId); break; } - } -void EmCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) +static void EmCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) { - (void)XPfw_CoreRegisterEvent(ModPtr,XPFW_EV_ERROR_1); - (void)XPfw_CoreRegisterEvent(ModPtr,XPFW_EV_ERROR_2); + (void)XPfw_CoreRegisterEvent(ModPtr, XPFW_EV_ERROR_1); + (void)XPfw_CoreRegisterEvent(ModPtr, XPFW_EV_ERROR_2); XPfw_ErrorHandlerInit(); fw_printf("EM (MOD-%d): Initialized.\r\n", ModPtr->ModId); } -#endif +static void ModEmInit(void) +{ + const XPfw_Module_t *EmModPtr = XPfw_CoreCreateMod(); + + (void)XPfw_CoreSetCfgHandler(EmModPtr, EmCfgInit); + (void)XPfw_CoreSetEventHandler(EmModPtr, EmEventHandler); +} +#else /* ENABLE_EM */ +static void ModEmInit(void) { } +#endif /* ENABLE_EM */ #ifdef ENABLE_RTC_TEST - -void RtcEventHandler(const XPfw_Module_t *ModPtr, u32 EventId) +static void RtcEventHandler(const XPfw_Module_t *ModPtr, u32 EventId) { - fw_printf("MOD%d:EVENTID: %d\r\n", ModPtr->ModId, EventId); //XPfw_CorePrintStats(); - if(XPFW_EV_RTC_SECONDS == EventId){ + if (XPFW_EV_RTC_SECONDS == EventId) { /* Ack the Int in RTC Module */ - Xil_Out32(RTC_RTC_INT_STATUS,1U); + Xil_Out32(RTC_RTC_INT_STATUS, 1U); fw_printf("RTC: %d \r\n", Xil_In32(RTC_CURRENT_TIME)); - } } - - -void RtcCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) +static void RtcCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) { - XPfw_CoreRegisterEvent(ModPtr,XPFW_EV_RTC_SECONDS); + XPfw_CoreRegisterEvent(ModPtr, XPFW_EV_RTC_SECONDS); /* Enable Seconds Alarm */ - Xil_Out32(RTC_RTC_INT_EN,1U); - Xil_Out32(RTC_RTC_INT_STATUS,1U); + Xil_Out32(RTC_RTC_INT_EN, 1U); + Xil_Out32(RTC_RTC_INT_STATUS, 1U); fw_printf("RTC (MOD-%d): Initialized.\r\n", ModPtr->ModId); } +static void ModRtcInit(void) +{ + const XPfw_Module_t *RtcModPtr = XPfw_CoreCreateMod(); -#endif + (void)XPfw_CoreSetCfgHandler(RtcModPtr, RtcCfgInit); + (void)XPfw_CoreSetEventHandler(RtcModPtr, RtcEventHandler); +} +#else /* ENABLE_RTC_TEST */ +static void ModRtcInit(void) { } +#endif /* ENABLE_RTC_TEST */ #ifdef ENABLE_SCHEDULER -void SchCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) +static void PrintMsg1(void) +{ + fw_printf("Task#1\r\n"); +} +static void PrintMsg2(void) +{ + fw_printf("Task#2\r\n"); +} + +static void SchCfgInit(const XPfw_Module_t *ModPtr, const u32 *CfgData, u32 Len) { /* Task every 5 seconds - For our convenience in manual testing */ - fw_printf("Adding Task1 - Status: %d\n", XPfw_CoreScheduleTask(ModPtr,5000U, PrintMsg1)); + fw_printf("Adding Task1 - Status: %d\n", XPfw_CoreScheduleTask(ModPtr, 5000U, PrintMsg1)); /* Every 10 seconds */ - fw_printf("Adding Task2 - Status:%d\n", XPfw_CoreScheduleTask(ModPtr,10000U, PrintMsg2)); + fw_printf("Adding Task2 - Status:%d\n", XPfw_CoreScheduleTask(ModPtr, 10000U, PrintMsg2)); } -#endif +static XStatus ModSchInit(void) +{ + const XPfw_Module_t *SchModPtr = XPfw_CoreCreateMod(); + + return XPfw_CoreSetCfgHandler(SchModPtr, SchCfgInit); +} +#else /* ENABLE_SCHEDULER */ +static void ModSchInit(void) { } +#endif /* ENABLE_SCHEDULER */ void XPfw_UserStartUp(void) { -#ifdef ENABLE_PM - const XPfw_Module_t *PmModPtr; -#endif - -#ifdef ENABLE_RTC_TEST - const XPfw_Module_t *RtcModPtr; -#endif - -#ifdef ENABLE_EM - const XPfw_Module_t *EmModPtr; -#endif - -#ifdef ENABLE_SCHEDULER - const XPfw_Module_t *SchModPtr; -#endif - -#ifdef ENABLE_RTC_TEST - RtcModPtr = XPfw_CoreCreateMod(); - (void)XPfw_CoreSetCfgHandler(RtcModPtr,RtcCfgInit); - (void)XPfw_CoreSetEventHandler(RtcModPtr,RtcEventHandler); -#endif - -#ifdef ENABLE_EM - EmModPtr = XPfw_CoreCreateMod(); - (void)XPfw_CoreSetCfgHandler(EmModPtr,EmCfgInit); - (void)XPfw_CoreSetEventHandler(EmModPtr,EmEventHandler); -#endif - -#ifdef ENABLE_PM - PmModPtr = XPfw_CoreCreateMod(); - (void)XPfw_CoreSetCfgHandler(PmModPtr,PmCfgInit); - (void)XPfw_CoreSetEventHandler(PmModPtr,PmEventHandler); - (void)XPfw_CoreSetIpiHandler(PmModPtr,PmIpiHandler,0U); - -#endif - - - - -#ifdef ENABLE_SCHEDULER - SchModPtr = XPfw_CoreCreateMod(); - (void)XPfw_CoreSetCfgHandler(SchModPtr,SchCfgInit); -#endif - - + ModRtcInit(); + ModEmInit(); + ModPmInit(); + (void)ModSchInit(); } diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_user_startup.h b/lib/sw_apps/zynqmp_pmufw/src/xpfw_user_startup.h index 0dee4640..32a4a436 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_user_startup.h +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_user_startup.h @@ -1,6 +1,5 @@ /****************************************************************************** -* -* Copyright (C) 2015 Xilinx, Inc. All rights reserved. +* Copyright (C) 2015 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -27,10 +26,8 @@ * Except as contained in this notice, the name of the Xilinx shall not be used * in advertising or otherwise to promote the sale, use or other dealings in * this Software without prior written authorization from Xilinx. -* ******************************************************************************/ - #ifndef XPFW_USER_STARTUP_H_ #define XPFW_USER_STARTUP_H_ diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_version.h b/lib/sw_apps/zynqmp_pmufw/src/xpfw_version.h index 883a0ce8..8b01add6 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_version.h +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_version.h @@ -1,4 +1,4 @@ #ifndef ZYNQMP_XPFW_VERSION__H_ -#define ZYNQMP_XPFW_VERSION__H_ -#define ZYNQMP_XPFW_VERSION "51ced25" -#endif + #define ZYNQMP_XPFW_VERSION__H_ + #define ZYNQMP_XPFW_VERSION "rc1-00006-gdc6ab46" + #endif