]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: cadence_qspi: Fix clearing of pol/pha bits
authorPhil Edworthy <PHIL.EDWORTHY@renesas.com>
Tue, 29 Nov 2016 12:58:26 +0000 (12:58 +0000)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 15 Dec 2016 15:57:27 +0000 (16:57 +0100)
Or'ing together bit positions is clearly wrong.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/spi/cadence_qspi_apb.c

index e285d3c1e761047cd9562dc0520c5fc6350c5a5f..2403e717dc4b9e2437fe61df258b78c5982fbffc 100644 (file)
@@ -311,8 +311,8 @@ void cadence_qspi_apb_set_clk_mode(void *reg_base,
 
        cadence_qspi_apb_controller_disable(reg_base);
        reg = readl(reg_base + CQSPI_REG_CONFIG);
-       reg &= ~(1 <<
-               (CQSPI_REG_CONFIG_CLK_POL_LSB | CQSPI_REG_CONFIG_CLK_PHA_LSB));
+       reg &= ~(1 << CQSPI_REG_CONFIG_CLK_POL_LSB);
+       reg &= ~(1 << CQSPI_REG_CONFIG_CLK_PHA_LSB);
 
        reg |= ((clk_pol & 0x1) << CQSPI_REG_CONFIG_CLK_POL_LSB);
        reg |= ((clk_pha & 0x1) << CQSPI_REG_CONFIG_CLK_PHA_LSB);