mtd: rawnand: meson: initialize clock register
Subsystems (4)
PATCH v2 1/1 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 <[email protected]>
---
Changelog:
v1 -> v2:
* Change 'CLK_ENABLE_VALUE' -> 'CLK_SELECT_FIX_PLL2': '0x245' -> 'BIT(6)' according doc.
drivers/mtd/nand/raw/meson_nand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mtd/nand/raw/meson_nand.c +3 -1
@@ -91,6 +91,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
@@ -1152,7 +1154,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);
Signature · 1 line
2.35.0
Quoted 5 lines · Arseniy Krasnov
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 <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel