[PATCH] mtd: maps: lantiq-flash: Check if the EBU endianness swap is enabled
Seb
sebtx452 at gmail.com
Wed Jan 25 01:04:37 PST 2017
Hello,
> 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;
---
And then set this property directly on my device-specific dts file ?
More information about the linux-mtd
mailing list