[PATCH] mtd: maps: lantiq-flash: Check if the EBU endianness swap is enabled
Langer, Thomas
thomas.langer at intel.com
Wed Jan 25 08:58:44 PST 2017
> Hello,
Hi Sebastian
>
>
> > I would prefer to use a device tree option to activate this check and
> > only access LTQ_EBU_BUSCON0 when this property is set.
>
> If I understand correctly, I have to make something like this :
>
> ---
>
> bool mtd_addr_swap=true;
>
> if (!of_machine_is_compatible("lantiq,falcon") &&
> of_find_property(pdev->dev.of_node,
> "lantiq,ebu_swap_check", NULL))
> if (ltq_ebu_r32(LTQ_EBU_BUSCON0) & EBU_FLASH_ENDIAN_SWAP)
> mtd_addr_swap = false;
>
No, please avoid "of_machine_is_compatible" in drivers.
> ---
>
> And then set this property directly on my device-specific dts file ?
We should introduce specific compatible strings for this driver, which trigger this,
e.g. "lantiq,nor-vr9" or "lantiq,nor-ar10" (or better using family names "xrx200" and "xrx300")
Regards,
Thomas
More information about the linux-mtd
mailing list