RE: [PATCH] mtd: maps: lantiq-flash: Check if the EBU endianness swap is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux