[U-Boot] [upstream-release] [PATCH v2 3/7] misc: fsl_portals: setup QMAN_BAR{E} also on ARM platforms
Laurentiu Tudor
laurentiu.tudor at nxp.com
Tue Jul 3 14:35:07 UTC 2018
Hi Bharat,
Thanks for the review! Comments inline.
On 03.07.2018 16:38, Bharat Bhushan wrote:
>
>
>> -----Original Message-----
>> From: upstream-release-bounces at linux.freescale.net [mailto:upstream-
>> release-bounces at linux.freescale.net] On Behalf Of Laurentiu Tudor
>> Sent: Tuesday, July 3, 2018 5:42 PM
>> To: York Sun <york.sun at nxp.com>; Prabhakar Kushwaha
>> <prabhakar.kushwaha at nxp.com>; u-boot at lists.denx.de
>> Cc: Laurentiu Tudor <laurentiu.tudor at nxp.com>
>> Subject: [upstream-release] [PATCH v2 3/7] misc: fsl_portals: setup
>> QMAN_BAR{E} also on ARM platforms
>>
>> QMAN_BAR{E} register setup was disabled on ARM platforms,
>> however the register does need to be set. Add code that
>> sets it up on ARMs.
>>
>> Signed-off-by: Laurentiu Tudor <laurentiu.tudor at nxp.com>
>> ---
>> drivers/misc/fsl_portals.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/misc/fsl_portals.c b/drivers/misc/fsl_portals.c
>> index 7c22b8d209..5b1233740b 100644
>> --- a/drivers/misc/fsl_portals.c
>> +++ b/drivers/misc/fsl_portals.c
>> @@ -24,14 +24,19 @@ void setup_qbman_portals(void)
>> CONFIG_SYS_BMAN_SWP_ISDR_REG;
>> void __iomem *qpaddr = (void *)CONFIG_SYS_QMAN_CINH_BASE +
>> CONFIG_SYS_QMAN_SWP_ISDR_REG;
>> -#ifdef CONFIG_PPC
>> struct ccsr_qman *qman = (void *)CONFIG_SYS_FSL_QMAN_ADDR;
>>
>> /* Set the Qman initiator BAR to match the LAW (for DQRR stashing)
>> */
>> +#ifdef CONFIG_PPC32
>> #ifdef CONFIG_PHYS_64BIT
>> out_be32(&qman->qcsp_bare,
>> (u32)(CONFIG_SYS_QMAN_MEM_PHYS >> 32));
>> #endif
>> out_be32(&qman->qcsp_bar,
>> (u32)CONFIG_SYS_QMAN_MEM_PHYS);
>> +#else
>> +#ifdef CONFIG_PHYS_64BIT
>> + out_be32(&qman->qcsp_bare,
>> (u32)(CONFIG_SYS_QMAN_MEM_BASE >> 32));
>> +#endif
>> + out_be32(&qman->qcsp_bar,
>> (u32)CONFIG_SYS_QMAN_MEM_BASE);
>> #endif
>
> Can we have same hash define name for PPC and non-PPC?
> We do not need then if-else
Hmm, good point. I could use CONFIG_SYS_QMAN_MEM_PHYS which is also
defined on ls104x [1] but seems to be incorrectly set ... maybe
copypaste error from powerpc? Another thing i noticed is that it's not
actually used at all on ARMs.
I could rewrite the patch to fix the define and simplify the code above,
if there aren't any objections.
[1]
#define CONFIG_SYS_QMAN_MEM_PHYS (0xf00000000ull +
CONFIG_SYS_QMAN_MEM_BASE)
---
Best Regards, Laurentiu
>
>> #ifdef CONFIG_FSL_CORENET
>> int i;
>> --
>> 2.17.1
>>
>> _______________________________________________
>> upstream-release mailing list
>> upstream-release at linux.freescale.net
>> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flinu
>> x.freescale.net%2Fmailman%2Flistinfo%2Fupstream-
>> release&data=02%7C01%7Cbharat.bhushan%40nxp.com%7Ca0e936ecc69f40
>> 6be68208d5e0de4f7b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7
>> C636662167788206253&sdata=WGcw1oH3ktggbybsoMllewQU5Uvbyv8OWa9
>> nBJipK70%3D&reserved=0
More information about the U-Boot
mailing list