sunxi: allow NAND support to be compiled for sun8i platforms
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 28 Feb 2018 19:51:57 +0000 (20:51 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 3 Apr 2018 10:11:52 +0000 (12:11 +0200)
Add some clocks/PLL definitions as well as the dependency on MACH_SUN8I
in Kconfig.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
arch/arm/include/asm/arch-sunxi/clock_sun6i.h
drivers/mtd/nand/Kconfig

index d328df9597d08aae080a95e7cdc18dfbe2df97c2..d35aa479f7b937e8eeae1654ace74fa0fbf7079c 100644 (file)
@@ -192,6 +192,7 @@ struct sunxi_ccm_reg {
 #define ATB_DIV_1                      0
 #define ATB_DIV_2                      1
 #define ATB_DIV_4                      2
+#define AHB_DIV_1                      0
 #define CPU_CLK_SRC_OSC24M             1
 #define CPU_CLK_SRC_PLL1               2
 
@@ -317,6 +318,11 @@ struct sunxi_ccm_reg {
 #define AHB_GATE_OFFSET_LCD0           3
 #endif
 
+#define CCM_NAND_CTRL_M(x)             ((x) - 1)
+#define CCM_NAND_CTRL_N(x)             ((x) << 16)
+#define CCM_NAND_CTRL_PLL6             (0x1 << 24)
+#define CCM_NAND_CTRL_ENABLE           (0x1 << 31)
+
 #define CCM_MMC_CTRL_M(x)              ((x) - 1)
 #define CCM_MMC_CTRL_OCLK_DLY(x)       ((x) << 8)
 #define CCM_MMC_CTRL_N(x)              ((x) << 16)
index a820af61cee9986f81dc705de82ca212a2a99951..dcb8ff66ae1e9744c8e90dbe38e1609a652aa7f5 100644 (file)
@@ -95,7 +95,7 @@ config NAND_PXA3XX
 
 config NAND_SUNXI
        bool "Support for NAND on Allwinner SoCs"
-       depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
+       depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I
        select SYS_NAND_SELF_INIT
        select SYS_NAND_U_BOOT_LOCATIONS
        imply CMD_NAND