]> git.sur5r.net Git - u-boot/commitdiff
spi: mpc8xxx_spi: Use BIT macro
authorJagan Teki <jteki@openedev.com>
Thu, 22 Oct 2015 20:08:07 +0000 (01:38 +0530)
committerJagan Teki <jteki@openedev.com>
Tue, 27 Oct 2015 17:51:28 +0000 (23:21 +0530)
Replace numerical bit shift with BIT macro
in mpc8xxx_spi

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
drivers/spi/mpc8xxx_spi.c

index 0d59c361513319f796ac6bf82671616d07b67625..00cbcbf9fc0af946dc304572b713edcc352f115e 100644 (file)
@@ -55,7 +55,7 @@ void spi_init(void)
         * some registers
         */
        spi->mode = SPI_MODE_REV | SPI_MODE_MS | SPI_MODE_EN;
-       spi->mode = (spi->mode & 0xfff0ffff) | (1 << 16); /* Use SYSCLK / 8
+       spi->mode = (spi->mode & 0xfff0ffff) | BIT(16); /* Use SYSCLK / 8
                                                             (16.67MHz typ.) */
        spi->event = 0xffffffff;        /* Clear all SPI events */
        spi->mask = 0x00000000; /* Mask  all SPI interrupts */