Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mtd: rawnand: sunxi: Remove superfluous register readings

The register NFC_REG_ECC_CTL was read twice and the result was not used,
then a third time with a mask applied.
Removing those calls didn't change the behavior.

Tested on H616 SoC, scrambling enabled.

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

authored by

Richard Genoud and committed by
Miquel Raynal
deaa77ed 7c99743a

+1 -2
+1 -2
drivers/mtd/nand/raw/sunxi_nand.c
··· 623 623 bool ecc) 624 624 { 625 625 struct sunxi_nfc *nfc = to_sunxi_nfc(nand->controller); 626 - u32 ecc_ctl = readl(nfc->regs + NFC_REG_ECC_CTL); 626 + u32 ecc_ctl; 627 627 u16 state; 628 628 629 629 if (!(nand->options & NAND_NEED_SCRAMBLING)) 630 630 return; 631 631 632 - ecc_ctl = readl(nfc->regs + NFC_REG_ECC_CTL); 633 632 state = sunxi_nfc_randomizer_state(nand, page, ecc); 634 633 ecc_ctl = readl(nfc->regs + NFC_REG_ECC_CTL) & ~NFC_RANDOM_SEED_MSK; 635 634 writel(ecc_ctl | NFC_RANDOM_SEED(state), nfc->regs + NFC_REG_ECC_CTL);