On Thu, Oct 22, 2015 at 7:15 PM, Jagan Teki <jt...@openedev.com> wrote:

>>>  #define        MXS_SPI_MAX_TIMEOUT     1000000
>>>  #define        MXS_SPI_PORT_OFFSET     0x2000
>>> -#define MXS_SSP_CHIPSELECT_MASK                0x00300000
>>> +#define MXS_SSP_CHIPSELECT_MASK                GENMASK(21, 20)
>>
>> Does this really improve the code?
>
> GENMASK will simplificate the bit masking and most of drivers in Linux
> start using this along with BIT for bit shifting.

Most drivers?

In mainline kernel:

git grep GENMASK drivers/spi/ | wc -l
2

No, this is not most drivers ;-)
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to