Skip to content

Commit 811cb89

Browse files
legoaterCyrillePitchen
authored andcommitted
mtd: spi-nor: aspeed: set 4B setting for all chips
The driver made the wrong assumption that the 4B setting was autodetected for all chips of the AST2500 FMC flash controller. This is only the case for the CS0. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
1 parent eb353aa commit 811cb89

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

‎drivers/mtd/spi-nor/aspeed-smc.c‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -621,19 +621,18 @@ static void aspeed_smc_chip_set_type(struct aspeed_smc_chip *chip, int type)
621621
}
622622

623623
/*
624-
* The AST2500 FMC flash controller should be strapped by hardware, or
625-
* autodetected, but the AST2500 SPI flash needs to be set.
624+
* The first chip of the AST2500 FMC flash controller is strapped by
625+
* hardware, or autodetected, but other chips need to be set. Enforce
626+
* the 4B setting for all chips.
626627
*/
627628
static void aspeed_smc_chip_set_4b(struct aspeed_smc_chip *chip)
628629
{
629630
struct aspeed_smc_controller *controller = chip->controller;
630631
u32 reg;
631632

632-
if (chip->controller->info == &spi_2500_info) {
633-
reg = readl(controller->regs + CE_CONTROL_REG);
634-
reg |= 1 << chip->cs;
635-
writel(reg, controller->regs + CE_CONTROL_REG);
636-
}
633+
reg = readl(controller->regs + CE_CONTROL_REG);
634+
reg |= 1 << chip->cs;
635+
writel(reg, controller->regs + CE_CONTROL_REG);
637636
}
638637

639638
/*

0 commit comments

Comments
 (0)