Skip to content

Commit acb1fd5

Browse files
Arseniy Krasnovmiquelraynal
authored andcommitted
mtd: rawnand: meson: initialize clock register
Clock register must be also initialized during controller probing. If this is not performed (for example by bootloader before) - controller will not work. Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20231120064239.3304108-1-avkrasnov@salutedevices.com
1 parent 923fb62 commit acb1fd5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/mtd/nand/raw/meson_nand.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090

9191
/* eMMC clock register, misc control */
9292
#define CLK_SELECT_NAND BIT(31)
93+
#define CLK_ALWAYS_ON_NAND BIT(24)
94+
#define CLK_SELECT_FIX_PLL2 BIT(6)
9395

9496
#define NFC_CLK_CYCLE 6
9597

@@ -1154,7 +1156,7 @@ static int meson_nfc_clk_init(struct meson_nfc *nfc)
11541156
return PTR_ERR(nfc->nand_clk);
11551157

11561158
/* init SD_EMMC_CLOCK to sane defaults w/min clock rate */
1157-
writel(CLK_SELECT_NAND | readl(nfc->reg_clk),
1159+
writel(CLK_ALWAYS_ON_NAND | CLK_SELECT_NAND | CLK_SELECT_FIX_PLL2,
11581160
nfc->reg_clk);
11591161

11601162
ret = clk_prepare_enable(nfc->core_clk);

0 commit comments

Comments
 (0)