Our usual set of patches for sunxi, with a bunch of them required to
enable the MBUS controller, and two patches to enable cpufreq on the A64. -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXhiwDwAKCRDj7w1vZxhR xTqdAP4ttVk3Kd74NMAthaL6JxMOZ03gwd94yHO/zPbi53CDTwD/eapQVksQ0azO tKmJPm0Dyfyjb1Cf9dwUeakzqhRR/gk= =FuKk -----END PGP SIGNATURE----- Merge tag 'sunxi-clk-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Maxime Ripard: Our usual set of patches for sunxi, with a bunch of them required to enable the MBUS controller, and two patches to enable cpufreq on the A64. * tag 'sunxi-clk-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi: a23/a33: Export the MIPI PLL clk: sunxi: a31: Export the MIPI PLL clk: sunxi-ng: a64: export CLK_CPUX clock for DVFS clk: sunxi-ng: add mux and pll notifiers for A64 CPU clock clk: sunxi-ng: r40: Export MBUS clock clk: sunxi: use of_device_get_match_data
This commit is contained in:
commit
fa9ae3057d
@ -921,11 +921,26 @@ static const struct sunxi_ccu_desc sun50i_a64_ccu_desc = {
|
||||
.num_resets = ARRAY_SIZE(sun50i_a64_ccu_resets),
|
||||
};
|
||||
|
||||
static struct ccu_pll_nb sun50i_a64_pll_cpu_nb = {
|
||||
.common = &pll_cpux_clk.common,
|
||||
/* copy from pll_cpux_clk */
|
||||
.enable = BIT(31),
|
||||
.lock = BIT(28),
|
||||
};
|
||||
|
||||
static struct ccu_mux_nb sun50i_a64_cpu_nb = {
|
||||
.common = &cpux_clk.common,
|
||||
.cm = &cpux_clk.mux,
|
||||
.delay_us = 1, /* > 8 clock cycles at 24 MHz */
|
||||
.bypass_index = 1, /* index of 24 MHz oscillator */
|
||||
};
|
||||
|
||||
static int sun50i_a64_ccu_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res;
|
||||
void __iomem *reg;
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
reg = devm_ioremap_resource(&pdev->dev, res);
|
||||
@ -939,7 +954,18 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
|
||||
|
||||
writel(0x515, reg + SUN50I_A64_PLL_MIPI_REG);
|
||||
|
||||
return sunxi_ccu_probe(pdev->dev.of_node, reg, &sun50i_a64_ccu_desc);
|
||||
ret = sunxi_ccu_probe(pdev->dev.of_node, reg, &sun50i_a64_ccu_desc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Gate then ungate PLL CPU after any rate changes */
|
||||
ccu_pll_notifier_register(&sun50i_a64_pll_cpu_nb);
|
||||
|
||||
/* Reparent CPU during PLL CPU rate changes */
|
||||
ccu_mux_notifier_register(pll_cpux_clk.common.hw.clk,
|
||||
&sun50i_a64_cpu_nb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id sun50i_a64_ccu_ids[] = {
|
||||
|
@ -36,7 +36,6 @@
|
||||
#define CLK_PLL_HSIC 18
|
||||
#define CLK_PLL_DE 19
|
||||
#define CLK_PLL_DDR1 20
|
||||
#define CLK_CPUX 21
|
||||
#define CLK_AXI 22
|
||||
#define CLK_APB 23
|
||||
#define CLK_AHB1 24
|
||||
|
@ -32,7 +32,9 @@
|
||||
/* The PLL_VIDEO1_2X clock is exported */
|
||||
|
||||
#define CLK_PLL_GPU 14
|
||||
#define CLK_PLL_MIPI 15
|
||||
|
||||
/* The PLL_VIDEO1_2X clock is exported */
|
||||
|
||||
#define CLK_PLL9 16
|
||||
#define CLK_PLL10 17
|
||||
|
||||
|
@ -24,7 +24,9 @@
|
||||
#define CLK_PLL_PERIPH 10
|
||||
#define CLK_PLL_PERIPH_2X 11
|
||||
#define CLK_PLL_GPU 12
|
||||
#define CLK_PLL_MIPI 13
|
||||
|
||||
/* The PLL MIPI clock is exported */
|
||||
|
||||
#define CLK_PLL_HSIC 14
|
||||
#define CLK_PLL_DE 15
|
||||
#define CLK_PLL_DDR1 16
|
||||
|
@ -55,10 +55,6 @@
|
||||
|
||||
/* Some more module clocks are exported */
|
||||
|
||||
#define CLK_MBUS 155
|
||||
|
||||
/* Another bunch of module clocks are exported */
|
||||
|
||||
#define CLK_NUMBER (CLK_OUTB + 1)
|
||||
|
||||
#endif /* _CCU_SUN8I_R40_H_ */
|
||||
|
@ -37,7 +37,6 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct clk_onecell_data *clk_data;
|
||||
const struct of_device_id *device;
|
||||
const struct gates_data *data;
|
||||
const char *clk_parent;
|
||||
const char *clk_name;
|
||||
@ -50,10 +49,9 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev)
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
|
||||
device = of_match_device(sun6i_a31_apb0_gates_clk_dt_ids, &pdev->dev);
|
||||
if (!device)
|
||||
data = of_device_get_match_data(&pdev->dev);
|
||||
if (!data)
|
||||
return -ENODEV;
|
||||
data = device->data;
|
||||
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
reg = devm_ioremap_resource(&pdev->dev, r);
|
||||
|
@ -46,6 +46,7 @@
|
||||
#define CLK_PLL_VIDEO0 7
|
||||
#define CLK_PLL_PERIPH0 11
|
||||
|
||||
#define CLK_CPUX 21
|
||||
#define CLK_BUS_MIPI_DSI 28
|
||||
#define CLK_BUS_CE 29
|
||||
#define CLK_BUS_DMA 30
|
||||
|
@ -49,6 +49,8 @@
|
||||
|
||||
#define CLK_PLL_VIDEO1_2X 13
|
||||
|
||||
#define CLK_PLL_MIPI 15
|
||||
|
||||
#define CLK_CPU 18
|
||||
|
||||
#define CLK_AHB1_MIPIDSI 23
|
||||
|
@ -43,6 +43,8 @@
|
||||
#ifndef _DT_BINDINGS_CLK_SUN8I_A23_A33_H_
|
||||
#define _DT_BINDINGS_CLK_SUN8I_A23_A33_H_
|
||||
|
||||
#define CLK_PLL_MIPI 13
|
||||
|
||||
#define CLK_CPUX 18
|
||||
|
||||
#define CLK_BUS_MIPI_DSI 23
|
||||
|
@ -176,7 +176,7 @@
|
||||
#define CLK_AVS 152
|
||||
#define CLK_HDMI 153
|
||||
#define CLK_HDMI_SLOW 154
|
||||
|
||||
#define CLK_MBUS 155
|
||||
#define CLK_DSI_DPHY 156
|
||||
#define CLK_TVE0 157
|
||||
#define CLK_TVE1 158
|
||||
|
Loading…
x
Reference in New Issue
Block a user