diff options
author | Kevin Hilman <khilman@baylibre.com> | 2016-08-02 17:40:11 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-08-15 18:45:57 -0400 |
commit | 33608dcd01d0c0eb3f2442d88c8a97f1195bd2d5 (patch) | |
tree | 8b6de01adbbb3c0207a438db5b9dec522608cc40 | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) |
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>
-rw-r--r-- | drivers/clk/meson/gxbb.c | 9 | ||||
-rw-r--r-- | drivers/clk/meson/gxbb.h | 7 | ||||
-rw-r--r-- | include/dt-bindings/clock/gxbb-clkc.h | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index a4c6684b3019..8e36d22331ce 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c | |||
@@ -583,6 +583,9 @@ static MESON_GATE(sdio, HHI_GCLK_MPEG0, 17); | |||
583 | static MESON_GATE(abuf, HHI_GCLK_MPEG0, 18); | 583 | static MESON_GATE(abuf, HHI_GCLK_MPEG0, 18); |
584 | static MESON_GATE(hiu_iface, HHI_GCLK_MPEG0, 19); | 584 | static MESON_GATE(hiu_iface, HHI_GCLK_MPEG0, 19); |
585 | static MESON_GATE(assist_misc, HHI_GCLK_MPEG0, 23); | 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 | static MESON_GATE(spi, HHI_GCLK_MPEG0, 30); | 589 | static MESON_GATE(spi, HHI_GCLK_MPEG0, 30); |
587 | 590 | ||
588 | static MESON_GATE(i2s_spdif, HHI_GCLK_MPEG1, 2); | 591 | static MESON_GATE(i2s_spdif, HHI_GCLK_MPEG1, 2); |
@@ -748,6 +751,9 @@ static struct clk_hw_onecell_data gxbb_hw_onecell_data = { | |||
748 | [CLKID_AO_AHB_BUS] = &gxbb_ao_ahb_bus.hw, | 751 | [CLKID_AO_AHB_BUS] = &gxbb_ao_ahb_bus.hw, |
749 | [CLKID_AO_IFACE] = &gxbb_ao_iface.hw, | 752 | [CLKID_AO_IFACE] = &gxbb_ao_iface.hw, |
750 | [CLKID_AO_I2C] = &gxbb_ao_i2c.hw, | 753 | [CLKID_AO_I2C] = &gxbb_ao_i2c.hw, |
754 | [CLKID_SD_EMMC_A] = &gxbb_emmc_a.hw, | ||
755 | [CLKID_SD_EMMC_B] = &gxbb_emmc_b.hw, | ||
756 | [CLKID_SD_EMMC_C] = &gxbb_emmc_c.hw, | ||
751 | }, | 757 | }, |
752 | .num = NR_CLKS, | 758 | .num = NR_CLKS, |
753 | }; | 759 | }; |
@@ -847,6 +853,9 @@ static struct clk_gate *gxbb_clk_gates[] = { | |||
847 | &gxbb_ao_ahb_bus, | 853 | &gxbb_ao_ahb_bus, |
848 | &gxbb_ao_iface, | 854 | &gxbb_ao_iface, |
849 | &gxbb_ao_i2c, | 855 | &gxbb_ao_i2c, |
856 | &gxbb_emmc_a, | ||
857 | &gxbb_emmc_b, | ||
858 | &gxbb_emmc_c, | ||
850 | }; | 859 | }; |
851 | 860 | ||
852 | static int gxbb_clkc_probe(struct platform_device *pdev) | 861 | static int gxbb_clkc_probe(struct platform_device *pdev) |
diff --git a/drivers/clk/meson/gxbb.h b/drivers/clk/meson/gxbb.h index a2adf3448b59..217df516de44 100644 --- a/drivers/clk/meson/gxbb.h +++ b/drivers/clk/meson/gxbb.h | |||
@@ -172,7 +172,7 @@ | |||
172 | /* CLKID_CPUCLK */ | 172 | /* CLKID_CPUCLK */ |
173 | #define CLKID_HDMI_PLL 2 | 173 | #define CLKID_HDMI_PLL 2 |
174 | #define CLKID_FIXED_PLL 3 | 174 | #define CLKID_FIXED_PLL 3 |
175 | #define CLKID_FCLK_DIV2 4 | 175 | /* CLKID_FCLK_DIV2 */ |
176 | #define CLKID_FCLK_DIV3 5 | 176 | #define CLKID_FCLK_DIV3 5 |
177 | #define CLKID_FCLK_DIV4 6 | 177 | #define CLKID_FCLK_DIV4 6 |
178 | #define CLKID_FCLK_DIV5 7 | 178 | #define CLKID_FCLK_DIV5 7 |
@@ -262,8 +262,11 @@ | |||
262 | #define CLKID_AO_AHB_BUS 91 | 262 | #define CLKID_AO_AHB_BUS 91 |
263 | #define CLKID_AO_IFACE 92 | 263 | #define CLKID_AO_IFACE 92 |
264 | #define CLKID_AO_I2C 93 | 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 | /* include the CLKIDs that have been made part of the stable DT binding */ | 271 | /* include the CLKIDs that have been made part of the stable DT binding */ |
269 | #include <dt-bindings/clock/gxbb-clkc.h> | 272 | #include <dt-bindings/clock/gxbb-clkc.h> |
diff --git a/include/dt-bindings/clock/gxbb-clkc.h b/include/dt-bindings/clock/gxbb-clkc.h index f889d80246cb..7d418643cdcc 100644 --- a/include/dt-bindings/clock/gxbb-clkc.h +++ b/include/dt-bindings/clock/gxbb-clkc.h | |||
@@ -6,7 +6,11 @@ | |||
6 | #define __GXBB_CLKC_H | 6 | #define __GXBB_CLKC_H |
7 | 7 | ||
8 | #define CLKID_CPUCLK 1 | 8 | #define CLKID_CPUCLK 1 |
9 | #define CLKID_FCLK_DIV2 4 | ||
9 | #define CLKID_CLK81 12 | 10 | #define CLKID_CLK81 12 |
10 | #define CLKID_ETH 36 | 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 | #endif /* __GXBB_CLKC_H */ | 16 | #endif /* __GXBB_CLKC_H */ |