Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: gxbb: add MMC gate clocks, and expose for DT

Add the SD/eMMC gate clocks and expose them for use by DT.

While at it, also explose FCLK_DIV2 since this is one of the input
clocks to the mux internal to each of the SD/eMMC blocks.

Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Kevin Hilman and committed by
Stephen Boyd
33608dcd 29b4817d

+18 -2
+9
drivers/clk/meson/gxbb.c
··· 583 583 static MESON_GATE(abuf, HHI_GCLK_MPEG0, 18); 584 584 static MESON_GATE(hiu_iface, HHI_GCLK_MPEG0, 19); 585 585 static MESON_GATE(assist_misc, HHI_GCLK_MPEG0, 23); 586 + static MESON_GATE(emmc_a, HHI_GCLK_MPEG0, 24); 587 + static MESON_GATE(emmc_b, HHI_GCLK_MPEG0, 25); 588 + static MESON_GATE(emmc_c, HHI_GCLK_MPEG0, 26); 586 589 static MESON_GATE(spi, HHI_GCLK_MPEG0, 30); 587 590 588 591 static MESON_GATE(i2s_spdif, HHI_GCLK_MPEG1, 2); ··· 751 748 [CLKID_AO_AHB_BUS] = &gxbb_ao_ahb_bus.hw, 752 749 [CLKID_AO_IFACE] = &gxbb_ao_iface.hw, 753 750 [CLKID_AO_I2C] = &gxbb_ao_i2c.hw, 751 + [CLKID_SD_EMMC_A] = &gxbb_emmc_a.hw, 752 + [CLKID_SD_EMMC_B] = &gxbb_emmc_b.hw, 753 + [CLKID_SD_EMMC_C] = &gxbb_emmc_c.hw, 754 754 }, 755 755 .num = NR_CLKS, 756 756 }; ··· 853 847 &gxbb_ao_ahb_bus, 854 848 &gxbb_ao_iface, 855 849 &gxbb_ao_i2c, 850 + &gxbb_emmc_a, 851 + &gxbb_emmc_b, 852 + &gxbb_emmc_c, 856 853 }; 857 854 858 855 static int gxbb_clkc_probe(struct platform_device *pdev)
+5 -2
drivers/clk/meson/gxbb.h
··· 172 172 /* CLKID_CPUCLK */ 173 173 #define CLKID_HDMI_PLL 2 174 174 #define CLKID_FIXED_PLL 3 175 - #define CLKID_FCLK_DIV2 4 175 + /* CLKID_FCLK_DIV2 */ 176 176 #define CLKID_FCLK_DIV3 5 177 177 #define CLKID_FCLK_DIV4 6 178 178 #define CLKID_FCLK_DIV5 7 ··· 262 262 #define CLKID_AO_AHB_BUS 91 263 263 #define CLKID_AO_IFACE 92 264 264 #define CLKID_AO_I2C 93 265 + /* CLKID_SD_EMMC_A */ 266 + /* CLKID_SD_EMMC_B */ 267 + /* CLKID_SD_EMMC_C */ 265 268 266 - #define NR_CLKS 94 269 + #define NR_CLKS 97 267 270 268 271 /* include the CLKIDs that have been made part of the stable DT binding */ 269 272 #include <dt-bindings/clock/gxbb-clkc.h>
+4
include/dt-bindings/clock/gxbb-clkc.h
··· 6 6 #define __GXBB_CLKC_H 7 7 8 8 #define CLKID_CPUCLK 1 9 + #define CLKID_FCLK_DIV2 4 9 10 #define CLKID_CLK81 12 10 11 #define CLKID_ETH 36 12 + #define CLKID_SD_EMMC_A 94 13 + #define CLKID_SD_EMMC_B 95 14 + #define CLKID_SD_EMMC_C 96 11 15 12 16 #endif /* __GXBB_CLKC_H */