Commit acb1fd57 authored by Arseniy Krasnov's avatar Arseniy Krasnov Committed by Miquel Raynal
Browse files

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: default avatarArseniy Krasnov <avkrasnov@salutedevices.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20231120064239.3304108-1-avkrasnov@salutedevices.com
parent 923fb623
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -90,6 +90,8 @@

/* eMMC clock register, misc control */
#define CLK_SELECT_NAND		BIT(31)
#define CLK_ALWAYS_ON_NAND	BIT(24)
#define CLK_SELECT_FIX_PLL2	BIT(6)

#define NFC_CLK_CYCLE		6

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

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

	ret = clk_prepare_enable(nfc->core_clk);