Hi Marek, Peng

Thank you for your feedback and suggestion.
I have posted a v2 patch that uses dev_read_u32() to simplify the code as you recommended.

Best regards,
Tanmay

On 9/29/2025 8:34 AM, Peng Fan wrote:
On Sun, Sep 28, 2025 at 08:54:44PM +0200, Marek Vasut wrote:
On 9/28/25 8:38 PM, Tanmay Kathpalia wrote:
Convert device tree property value to CPU endianness using
fdt32_to_cpu(). This prevents incorrect values on platforms
with differing endianness.

Signed-off-by: Tanmay Kathpalia <[email protected]>
---
   drivers/mmc/sdhci-cadence6.c | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/sdhci-cadence6.c b/drivers/mmc/sdhci-cadence6.c
index 9a92b8437a6..6f60fee6df4 100644
--- a/drivers/mmc/sdhci-cadence6.c
+++ b/drivers/mmc/sdhci-cadence6.c
@@ -220,14 +220,14 @@ int sdhci_cdns6_phy_adj(struct udevice *dev, struct 
sdhci_cdns_plat *plat, u32 m
                prop = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
                                   sdhci_cdns6_phy_cfgs[i].property, NULL);
Use dev_read_u32_default() or some such function from drivers/core/read.c ,
that should greatly simplify this code.

+ 1

Thanks,
Peng

Reply via email to