From: Lothar Waßmann Date: Fri, 6 May 2016 14:19:04 +0000 (+0200) Subject: am33xx: elm: fix clearing of irqstatus bits X-Git-Tag: KARO-TX48-2016-05-06~1 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=f3421f3f2f4e5f4dbc125c1b3dc65647af5f9caf am33xx: elm: fix clearing of irqstatus bits 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. --- diff --git a/arch/arm/cpu/armv7/am33xx/elm.c b/arch/arm/cpu/armv7/am33xx/elm.c index b0b05f4c85..21f3473a28 100644 --- a/arch/arm/cpu/armv7/am33xx/elm.c +++ b/arch/arm/cpu/armv7/am33xx/elm.c @@ -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 */ - 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);