[U-Boot] [PATCH] board/freescale: Share qbman init between archs
york sun
york.sun at nxp.com
Thu Jun 1 00:46:56 UTC 2017
On 05/31/2017 08:17 AM, Roy Pledge wrote:
> On 5/30/2017 12:40 PM, york sun wrote:
>> On 05/12/2017 01:30 PM, Roy Pledge wrote:
>>> From: Ahmed Mansour <ahmed.mansour at nxp.com>
>>>
>>> This patch adds changes necessary to move functionality present in
>>> PowerPC folders with ARM architectures that have DPAA1 QBMan hardware
>>>
>>> - Created new board/freescale/common/portals.c to house shared device
>>> tree fixups for DPAA1 devices with ARM and PowerPC cores
>> I don't think using board/freescale/common/portals.c is the best
>> solution. QBMan is a SoC feature, not Freescale board specific. Please
>> consider to move it to somewhere common.
> Do you have a suggestion? We choose this location as the fman support
> is in this directory as well. There doesn't seem to be a good place to
> share SoC specific drivers other than perhaps drivers/soc but there is
> very little in that directory right now.
How about drivers/misc? We have IFC driver there.
>>
>>> - Added new header file to top includes directory to allow files in
>>> both architectures to grab the function prototypes
>>> - Port inhibit_portals() from PowerPC to ARM. This function is used in
>>> setup to disable interrupts on all QMan and BMan portals. It is
>>> needed because the interrupts are enabled by default for all portals
>>> including unused/uninitialised portals. When the kernel attempts to
>>> go to deep sleep the unused portals prevent it from doing so
>>>
>>> Signed-off-by: Ahmed Mansour <ahmed.mansour at nxp.com>
>>> Signed-off-by: Roy Pledge <roy.pledge at nxp.com>
>>> ---
>>> arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 7 +
>>> arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 15 +
>>> .../arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c | 3 +
>>> .../include/asm/arch-fsl-layerscape/immap_lsch2.h | 29 ++
>>> arch/powerpc/cpu/mpc85xx/cpu_init.c | 3 +-
>>> arch/powerpc/cpu/mpc85xx/fdt.c | 1 +
>>> arch/powerpc/cpu/mpc85xx/portals.c | 281 -------------------
>>> arch/powerpc/include/asm/fsl_liodn.h | 5 +-
>>> arch/powerpc/include/asm/fsl_portals.h | 4 -
>>> arch/powerpc/include/asm/immap_85xx.h | 60 ----
>>> board/freescale/common/Makefile | 2 +
>>> board/freescale/common/portals.c | 312 +++++++++++++++++++++
>>> include/configs/ls1043a_common.h | 2 +
>>> include/fsl_qbman.h | 75 +++++
>>> 14 files changed, 451 insertions(+), 348 deletions(-)
>>> create mode 100644 board/freescale/common/portals.c
>>> create mode 100644 include/fsl_qbman.h
>>>
>>> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
>>> index bb02960..4b5b1b4 100644
>>> --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
>>> +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
>>> @@ -26,6 +26,10 @@
>>> #ifdef CONFIG_SYS_FSL_DDR
>>> #include <fsl_ddr.h>
>>> #endif
>>> +#include <fsl_immap.h>
>>> +#ifdef CONFIG_SYS_DPAA_QBMAN
>>> +#include <fsl_qbman.h>
>>> +#endif
>> Do not use ifdef if you can avoid it.
>>
>> <snip>
>>
>>> diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
>>> index e269248..e2d6ef1 100644
>>> --- a/include/configs/ls1043a_common.h
>>> +++ b/include/configs/ls1043a_common.h
>>> @@ -201,6 +201,8 @@
>>> #endif
>>> #endif
>>>
>>> +#define CONFIG_SYS_DPAA_QBMAN /* Support Q/Bman */
>>> +
>> It's better to move this option to Kconfig.
> Again we copied what was done for FMan here
We are moving config options to Kconfig.
York
More information about the U-Boot
mailing list