On 23 October 2015 at 02:48, Fabio Estevam <feste...@gmail.com> wrote: > 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?
Most drivers will include all drivers in Linux not only spi drivers. > > In mainline kernel: > > git grep GENMASK drivers/spi/ | wc -l > 2 # grep -R GENMASK drivers/ | wc -l 465 > > No, this is not most drivers ;-) -- Jagan | openedev. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot