All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] armv8: ls1088a: add icid setup for platform devices
Date: Thu, 21 Mar 2019 12:42:42 +0000	[thread overview]
Message-ID: <ac7b1570-a56b-71e4-c1fe-67917ad90ff0@nxp.com> (raw)
In-Reply-To: <VI1PR0402MB3485776739890FB7EB2CCE2898420@VI1PR0402MB3485.eurprd04.prod.outlook.com>

Hi Horia,

On 21.03.2019 12:36, Horia Geanta wrote:
> On 3/20/2019 4:31 PM, laurentiu.tudor at nxp.com wrote:
>> +struct icid_id_table icid_tbl[] = {
>> +	SET_SDHC_ICID(FSL_SDMMC_STREAM_ID),
>> +	SET_USB_ICID(1, "snps,dwc3", FSL_USB1_STREAM_ID),
>> +	SET_USB_ICID(2, "snps,dwc3", FSL_USB2_STREAM_ID),
>> +	SET_SATA_ICID(1, "fsl,ls1088a-ahci", FSL_SATA1_STREAM_ID),
>> +	SET_SEC_JR_ICID_ENTRY(0, FSL_SEC_STREAM_ID),
>> +	SET_SEC_JR_ICID_ENTRY(1, FSL_SEC_STREAM_ID),
>> +	SET_SEC_JR_ICID_ENTRY(2, FSL_SEC_STREAM_ID),
>> +	SET_SEC_JR_ICID_ENTRY(3, FSL_SEC_STREAM_ID),
>> +	SET_SEC_RTIC_ICID_ENTRY(0, FSL_SEC_STREAM_ID),
>> +	SET_SEC_RTIC_ICID_ENTRY(1, FSL_SEC_STREAM_ID),
>> +	SET_SEC_RTIC_ICID_ENTRY(2, FSL_SEC_STREAM_ID),
>> +	SET_SEC_RTIC_ICID_ENTRY(3, FSL_SEC_STREAM_ID),
>> +	SET_SEC_DECO_ICID_ENTRY(0, FSL_SEC_STREAM_ID),
>> +	SET_SEC_DECO_ICID_ENTRY(1, FSL_SEC_STREAM_ID),
>> +	SET_SEC_DECO_ICID_ENTRY(2, FSL_SEC_STREAM_ID),
>> +	SET_SEC_DECO_ICID_ENTRY(3, FSL_SEC_STREAM_ID),
>> +};
> A single ICID is allocated to all SEC sub-blocks able to initiate transactions.
> I think at least the job rings should have different ICIDs, while the rest could
> share another ICID.

I agree here, problem is that on these chips ICIDs are scarce resource 
because DPAA2 gets a big chunk of them. I'd suggest to leave them like 
that and, if a user needs distinct, per JR ICIDs (s)he can easily tune them.

>>   #define SET_SEC_QI_ICID(streamid) \
>> -	SET_ICID_ENTRY("fsl,sec-v4.0", streamid, \
>> +	SET_ICID_ENTRY("fsl,sec-v4.0", SEC_ICID_REG_VAL(streamid), \
> Is this a fix for LS104x? Then it should be a separate patch.

Not really. I added an intermediate macro, SEC_ICID_REG_VAL(streamid) 
that forms the correct register value starting from ICID, depending on 
the chip version (the register layouts are different between the two).

>> +#else /* CONFIG_FSL_LSCH2 */
> [...]
>> +#define SEC_ICID_REG_VAL(streamid) ((streamid) << 24)
> ICID is in lower 6:0 bits, not in 31:24.

That was also my initial impression but it didn't work (smmu global 
faults with icid 0). Probably there's an ambiguity related to endianness 
in the documentation.

>> +#endif /* !CONFIG_FSL_LSCH2 */
> Nitpick: comment for #endif should match #if condition, which is CONFIG_FSL_LSCH2.
> 

Ok.

Thanks for the review!

---
Best Regards, Laurentiu

  reply	other threads:[~2019-03-21 12:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 14:31 [U-Boot] [PATCH 1/2] armv8: fsl-layerscape: add missing sec jr base address defines laurentiu.tudor at nxp.com
2019-03-20 14:31 ` [U-Boot] [PATCH 2/2] armv8: ls1088a: add icid setup for platform devices laurentiu.tudor at nxp.com
2019-03-21 10:36   ` Horia Geanta
2019-03-21 12:42     ` Laurentiu Tudor [this message]
2019-03-21 15:10       ` Horia Geanta
2019-03-21 15:37         ` Laurentiu Tudor
2019-03-21 12:47     ` Laurentiu Tudor
2019-03-21 13:03     ` Laurentiu Tudor
2019-03-20 14:31 ` [U-Boot] [PATCH v2 1/3] fsl_sec: fix register layout on Layerscape architectures laurentiu.tudor at nxp.com
2019-03-20 15:04   ` Laurentiu Tudor
2019-03-20 14:31 ` [U-Boot] [PATCH v2 2/3] armv8: fsl-layerscape: fix SEC QI ICID setup laurentiu.tudor at nxp.com
2019-03-20 14:31 ` [U-Boot] [PATCH v2 3/3] armv8: fsl-layerscape: avoid DT fixup warning laurentiu.tudor at nxp.com
2019-03-21 10:39 ` [U-Boot] [PATCH 1/2] armv8: fsl-layerscape: add missing sec jr base address defines Horia Geanta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac7b1570-a56b-71e4-c1fe-67917ad90ff0@nxp.com \
    --to=laurentiu.tudor@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.