]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
am33xx: elm: fix clearing of irqstatus bits
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 6 May 2016 14:19:04 +0000 (16:19 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 6 May 2016 14:19:04 +0000 (16:19 +0200)
The irqstatus bits are cleared by writing a '1' to the irqstatus
register. Change bogus RMW register access to a simple write of the
bitmask to be cleared.

arch/arm/cpu/armv7/am33xx/elm.c

index b0b05f4c8593ae233ebc86bacc5d433bd7303349..21f3473a2888f7187e95b1a2859c8177a685da14 100644 (file)
@@ -111,8 +111,7 @@ int elm_check_error(u8 *syndrome, u32 nibbles, u32 *error_count,
        /* wait for processing to complete */
        while (!(readl(&elm_cfg->irqstatus) & (0x1 << poly)));
        /* clear status */
        /* wait for processing to complete */
        while (!(readl(&elm_cfg->irqstatus) & (0x1 << poly)));
        /* clear status */
-       writel((readl(&elm_cfg->irqstatus) & ~(0x1 << poly)),
-               &elm_cfg->irqstatus);
+       writel(0x1 << poly, &elm_cfg->irqstatus);
 
        /* check if correctable */
        location_status = readl(&elm_cfg->error_location[poly].location_status);
 
        /* check if correctable */
        location_status = readl(&elm_cfg->error_location[poly].location_status);