#define UART4_DMA_ENABLE 0
#define UART5_DMA_ENABLE 0
+#ifdef CONFIG_CLK_DEBUG
+#define __INIT_CLK_DEBUG(n) .name = #n,
+#else
+#define __INIT_CLK_DEBUG(n)
+#endif
+
extern int mxc_jtag_enabled;
extern int uart_at_24;
extern int cpufreq_trig_needed;
/* External high frequency clock */
static struct clk ckih_clk = {
+ __INIT_CLK_DEBUG(ckih_clk)
.get_rate = get_high_reference_clock_rate,
};
static struct clk ckih2_clk = {
+ __INIT_CLK_DEBUG(ckih2_clk)
.get_rate = get_ckih2_reference_clock_rate,
};
static struct clk osc_clk = {
+ __INIT_CLK_DEBUG(osc_clk)
.get_rate = get_oscillator_reference_clock_rate,
};
/* External low frequency (32kHz) clock */
static struct clk ckil_clk = {
+ __INIT_CLK_DEBUG(ckil_clk)
.get_rate = get_low_reference_clock_rate,
};
}
static struct clk fpm_clk = {
+ __INIT_CLK_DEBUG(fpm_clk)
.parent = &ckil_clk,
.get_rate = _fpm_get_rate,
.enable = _fpm_enable,
}
static struct clk fpm_div2_clk = {
+ __INIT_CLK_DEBUG(fpm_div2_clk)
.parent = &fpm_clk,
.get_rate = _fpm_div2_get_rate,
};
}
static struct clk pll1_main_clk = {
+ __INIT_CLK_DEBUG(pll1_main_clk)
.parent = &osc_clk,
.get_rate = _clk_pll_get_rate,
.enable = _clk_pll_enable,
/* pll1 switch clock */
static struct clk pll1_sw_clk = {
+ __INIT_CLK_DEBUG(pll1_sw_clk)
.parent = &pll1_main_clk,
.set_parent = _clk_pll1_sw_set_parent,
.get_rate = _clk_pll1_sw_get_rate,
/* same as pll2_main_clk. These two clocks should always be the same */
static struct clk pll2_sw_clk = {
+ __INIT_CLK_DEBUG(pll2_sw_clk)
.parent = &osc_clk,
.get_rate = _clk_pll_get_rate,
.enable = _clk_pll_enable,
/* same as pll3_main_clk. These two clocks should always be the same */
static struct clk pll3_sw_clk = {
+ __INIT_CLK_DEBUG(pll3_sw_clk)
.parent = &osc_clk,
.set_rate = _clk_pll_set_rate,
.get_rate = _clk_pll_get_rate,
/* same as pll4_main_clk. These two clocks should always be the same */
static struct clk pll4_sw_clk = {
+ __INIT_CLK_DEBUG(pll4_sw_clk)
.parent = &osc_clk,
.set_rate = _clk_pll_set_rate,
.get_rate = _clk_pll_get_rate,
}
static struct clk lp_apm_clk = {
+ __INIT_CLK_DEBUG(lp_apm_clk)
.parent = &osc_clk,
.set_parent = _clk_lp_apm_set_parent,
};
static struct clk cpu_clk = {
+ __INIT_CLK_DEBUG(cpu_clk)
.parent = &pll1_sw_clk,
.get_rate = _clk_arm_get_rate,
.set_rate = _clk_cpu_set_rate,
}
static struct clk periph_apm_clk = {
+ __INIT_CLK_DEBUG(periph_apm_clk)
.parent = &pll1_sw_clk,
.set_parent = _clk_periph_apm_set_parent,
};
}
static struct clk main_bus_clk = {
+ __INIT_CLK_DEBUG(main_bus_clk)
.parent = &pll2_sw_clk,
.set_parent = _clk_main_bus_set_parent,
.get_rate = _clk_main_bus_get_rate,
static struct clk axi_a_clk = {
+ __INIT_CLK_DEBUG(axi_a_clk)
.parent = &main_bus_clk,
.get_rate = _clk_axi_a_get_rate,
.set_rate = _clk_axi_a_set_rate,
}
static struct clk ddr_hf_clk = {
+ __INIT_CLK_DEBUG(ddr_hf_clk)
.parent = &pll1_sw_clk,
.get_rate = _clk_ddr_hf_get_rate,
.round_rate = _clk_ddr_hf_round_rate,
static struct clk axi_b_clk = {
+ __INIT_CLK_DEBUG(axi_b_clk)
.parent = &main_bus_clk,
.get_rate = _clk_axi_b_get_rate,
.set_rate = _clk_axi_b_set_rate,
static struct clk ahb_clk = {
+ __INIT_CLK_DEBUG(ahb_clk)
.parent = &main_bus_clk,
.get_rate = _clk_ahb_get_rate,
.set_rate = _clk_ahb_set_rate,
static struct clk ahb_max_clk = {
+ __INIT_CLK_DEBUG(ahb_max_clk)
.parent = &ahb_clk,
.enable_reg = MXC_CCM_CCGR0,
.enable_shift = MXC_CCM_CCGRx_CG14_OFFSET,
static struct clk emi_slow_clk = {
+ __INIT_CLK_DEBUG(emi_slow_clk)
.parent = &main_bus_clk,
.set_parent = _clk_emi_slow_set_parent,
.get_rate = _clk_emi_slow_get_rate,
};
static struct clk ahbmux1_clk = {
+ __INIT_CLK_DEBUG(ahbmux1_clk)
.id = 0,
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
};
static struct clk ahbmux2_clk = {
+ __INIT_CLK_DEBUG(ahbmux2_clk)
.id = 0,
.parent = &ahb_clk,
.enable = _clk_enable,
static struct clk emi_fast_clk = {
+ __INIT_CLK_DEBUG(emi_fast_clk)
.parent = &ddr_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR5,
static struct clk emi_intr_clk[] = {
{
+ __INIT_CLK_DEBUG(emi_intr_clk_0)
.id = 0,
.parent = &ahb_clk,
.secondary = &ahbmux2_clk,
/* On MX51 - this clock is name emi_garb_clk, and controls the
* access of ARM to GARB.
*/
+ __INIT_CLK_DEBUG(emi_intr_clk_1)
.id = 1,
.parent = &ahb_clk,
.secondary = &ahbmux2_clk,
}
static struct clk ipg_clk = {
+ __INIT_CLK_DEBUG(ipg_clk)
.parent = &ahb_clk,
.get_rate = _clk_ipg_get_rate,
};
}
static struct clk ipg_perclk = {
+ __INIT_CLK_DEBUG(ipg_perclk)
.parent = &lp_apm_clk,
.get_rate = _clk_ipg_per_get_rate,
.set_parent = _clk_ipg_per_set_parent,
}
static struct clk ipumux1_clk = {
+ __INIT_CLK_DEBUG(ipumux1_clk)
.enable_reg = MXC_CCM_CCGR5,
.enable_shift = MXC_CCM_CCGR5_CG6_1_OFFSET,
.enable = _clk_ipmux_enable,
};
static struct clk ipumux2_clk = {
+ __INIT_CLK_DEBUG(ipumux2_clk)
.enable_reg = MXC_CCM_CCGR5,
.enable_shift = MXC_CCM_CCGR5_CG6_2_OFFSET,
.enable = _clk_ipmux_enable,
}
static struct clk ocram_clk = {
+ __INIT_CLK_DEBUG(ocram_clk)
.enable_reg = MXC_CCM_CCGR6,
.enable_shift = MXC_CCM_CCGRx_CG1_OFFSET,
.enable = _clk_ocram_enable,
static struct clk aips_tz1_clk = {
+ __INIT_CLK_DEBUG(aips_tz1_clk)
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
.enable_reg = MXC_CCM_CCGR0,
};
static struct clk aips_tz2_clk = {
+ __INIT_CLK_DEBUG(aips_tz2_clk)
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
.enable_reg = MXC_CCM_CCGR0,
};
static struct clk gpc_dvfs_clk = {
+ __INIT_CLK_DEBUG(gpc_dvfs_clk)
.enable_reg = MXC_CCM_CCGR5,
.enable_shift = MXC_CCM_CCGRx_CG12_OFFSET,
.enable = _clk_enable,
static struct clk sdma_clk[] = {
{
+ __INIT_CLK_DEBUG(sdma_clk)
.parent = &ahb_clk,
.enable_reg = MXC_CCM_CCGR4,
.enable_shift = MXC_CCM_CCGRx_CG15_OFFSET,
static struct clk ipu_clk[] = {
{
+ __INIT_CLK_DEBUG(ipu_clk)
.parent = &ahb_clk,
.secondary = &ipu_clk[1],
.enable_reg = MXC_CCM_CCGR5,
.flags = CPU_FREQ_TRIG_UPDATE | AHB_MED_SET_POINT,
},
{
+ __INIT_CLK_DEBUG(ipu_clk_1)
.parent = &emi_fast_clk,
.secondary = &ahbmux1_clk,
}
static struct clk ipu_di_clk[] = {
{
+ __INIT_CLK_DEBUG(ipu_di_clk_0)
.id = 0,
.parent = &pll3_sw_clk,
.enable_reg = MXC_CCM_CCGR6,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ipu_di_clk_1)
.id = 1,
.parent = &pll3_sw_clk,
.enable_reg = MXC_CCM_CCGR6,
static struct clk ldb_di_clk[] = {
{
+ __INIT_CLK_DEBUG(ldb_di_clk_0)
.id = 0,
.parent = &pll4_sw_clk,
.enable_reg = MXC_CCM_CCGR6,
.flags = AHB_MED_SET_POINT,
},
{
+ __INIT_CLK_DEBUG(ldb_di_clk_1)
.id = 1,
.parent = &pll4_sw_clk,
.enable_reg = MXC_CCM_CCGR6,
}
static struct clk csi1_clk = {
+ __INIT_CLK_DEBUG(csi1_clk)
.parent = &pll3_sw_clk,
.set_parent = _clk_csi1_set_parent,
.get_rate = _clk_csi1_get_rate,
}
static struct clk mipi_esc_clk = {
+ __INIT_CLK_DEBUG(mipi_esc_clk)
.parent = &pll2_sw_clk,
.enable_reg = MXC_CCM_CCGR4,
.enable_shift = MXC_CCM_CCGRx_CG5_OFFSET,
};
static struct clk mipi_hsc2_clk = {
+ __INIT_CLK_DEBUG(mipi_hsc2_clk)
.parent = &pll2_sw_clk,
.enable_reg = MXC_CCM_CCGR4,
.enable_shift = MXC_CCM_CCGRx_CG4_OFFSET,
};
static struct clk mipi_hsc1_clk = {
+ __INIT_CLK_DEBUG(mipi_hsc1_clk)
.parent = &pll2_sw_clk,
.enable_reg = MXC_CCM_CCGR4,
.enable_shift = MXC_CCM_CCGRx_CG3_OFFSET,
};
static struct clk mipi_hsp_clk = {
+ __INIT_CLK_DEBUG(mipi_hsp_clk)
.parent = &ipu_clk[0],
.enable_reg = MXC_CCM_CCGR4,
.enable_shift = MXC_CCM_CCGRx_CG6_OFFSET,
}
static struct clk tve_clk = {
+ __INIT_CLK_DEBUG(tve_clk)
.parent = &pll3_sw_clk,
.set_parent = _clk_tve_set_parent,
.enable_reg = MXC_CCM_CCGR2,
};
static struct clk spba_clk = {
+ __INIT_CLK_DEBUG(spba_clk)
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR5,
.enable_shift = MXC_CCM_CCGRx_CG0_OFFSET,
}
static struct clk uart_main_clk = {
+ __INIT_CLK_DEBUG(uart_main_clk)
.parent = &pll2_sw_clk,
.get_rate = _clk_uart_get_rate,
.set_parent = _clk_uart_set_parent,
static struct clk uart1_clk[] = {
{
+ __INIT_CLK_DEBUG(uart1_clk_0)
.id = 0,
.parent = &uart_main_clk,
.secondary = &uart1_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart1_clk_1)
.id = 0,
.parent = &ipg_clk,
#if UART1_DMA_ENABLE
static struct clk uart2_clk[] = {
{
+ __INIT_CLK_DEBUG(uart2_clk_0)
.id = 1,
.parent = &uart_main_clk,
.secondary = &uart2_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart2_clk_1)
.id = 1,
.parent = &ipg_clk,
#if UART2_DMA_ENABLE
static struct clk uart3_clk[] = {
{
+ __INIT_CLK_DEBUG(uart3_clk_0)
.id = 2,
.parent = &uart_main_clk,
.secondary = &uart3_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart3_clk_1)
.id = 2,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk uart4_clk[] = {
{
+ __INIT_CLK_DEBUG(uart4_clk_0)
.id = 3,
.parent = &uart_main_clk,
.secondary = &uart4_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart4_clk_1)
.id = 3,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk uart5_clk[] = {
{
+ __INIT_CLK_DEBUG(uart5_clk_0)
.id = 4,
.parent = &uart_main_clk,
.secondary = &uart5_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart5_clk_1)
.id = 4,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk gpt_clk[] = {
{
+ __INIT_CLK_DEBUG(gpt_clki_0)
.parent = &ipg_perclk,
.id = 0,
.enable_reg = MXC_CCM_CCGR2,
.secondary = &gpt_clk[1],
},
{
+ __INIT_CLK_DEBUG(gpt_clki_1)
.id = 0,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR2,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(gpt_clki_2)
.id = 0,
.parent = &ckil_clk,
},
static struct clk pwm1_clk[] = {
{
+ __INIT_CLK_DEBUG(pwm1_clk_0)
.parent = &ipg_perclk,
.id = 0,
.enable_reg = MXC_CCM_CCGR2,
.secondary = &pwm1_clk[1],
},
{
+ __INIT_CLK_DEBUG(pwm1_clk_1)
.id = 0,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR2,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(pwm1_clk_2)
.id = 0,
.parent = &ckil_clk,
},
static struct clk pwm2_clk[] = {
{
+ __INIT_CLK_DEBUG(pwm2_clk_0)
.parent = &ipg_perclk,
.id = 1,
.enable_reg = MXC_CCM_CCGR2,
.secondary = &pwm2_clk[1],
},
{
+ __INIT_CLK_DEBUG(pwm2_clk_1)
.id = 1,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR2,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(pwm2_clk_2)
.id = 1,
.parent = &ckil_clk,
},
static struct clk i2c_clk[] = {
{
+ __INIT_CLK_DEBUG(i2c_clk_0)
.id = 0,
.parent = &ipg_perclk,
.enable_reg = MXC_CCM_CCGR1,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(i2c_clk_1)
.id = 1,
.parent = &ipg_perclk,
.enable_reg = MXC_CCM_CCGR1,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(i2c_clk_2)
.id = 2,
.parent = &ipg_perclk,
.enable_reg = MXC_CCM_CCGR1,
}
static struct clk hsi2c_serial_clk = {
+ __INIT_CLK_DEBUG(hsi2c_serial_clk)
.id = 0,
.parent = &pll3_sw_clk,
.secondary = &spba_clk,
};
static struct clk hsi2c_clk = {
+ __INIT_CLK_DEBUG(hsi2c_clk)
.id = 0,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR1,
}
static struct clk cspi_main_clk = {
+ __INIT_CLK_DEBUG(cspi_main_clk)
.parent = &pll3_sw_clk,
.get_rate = _clk_cspi_get_rate,
.set_parent = _clk_cspi_set_parent,
static struct clk cspi1_clk[] = {
{
+ __INIT_CLK_DEBUG(cspi1_clk_0)
.id = 0,
.parent = &cspi_main_clk,
.secondary = &cspi1_clk[1],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(cspi1_clk_1)
.id = 0,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk cspi2_clk[] = {
{
+ __INIT_CLK_DEBUG(cspi2_clk_0)
.id = 1,
.parent = &cspi_main_clk,
.secondary = &cspi2_clk[1],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(cspi2_clk_1)
.id = 1,
.parent = &ipg_clk,
.secondary = &aips_tz2_clk,
};
static struct clk cspi3_clk = {
+ __INIT_CLK_DEBUG(cspi3_clk)
.id = 2,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR4,
}
static struct clk ieee_rtc_clk = {
+ __INIT_CLK_DEBUG(ieee_rtc_clk)
.id = 0,
.parent = &pll3_sw_clk,
.set_parent = _clk_ieee_rtc_set_parent,
}
static struct clk ssi_lp_apm_clk = {
+ __INIT_CLK_DEBUG(ssi_lp_apm_clk)
.parent = &ckih_clk,
.set_parent = _clk_ssi_lp_apm_set_parent,
};
static struct clk ssi1_clk[] = {
{
+ __INIT_CLK_DEBUG(ssi1_clk_0)
.id = 0,
.parent = &pll3_sw_clk,
.set_parent = _clk_ssi1_set_parent,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi1_clk_1)
.id = 0,
.parent = &ipg_clk,
.secondary = &ssi1_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi1_clk_2)
.id = 0,
.parent = &aips_tz2_clk,
#ifdef CONFIG_SND_MXC_SOC_IRAM
static struct clk ssi2_clk[] = {
{
+ __INIT_CLK_DEBUG(ssi2_clk_0)
.id = 1,
.parent = &pll3_sw_clk,
.set_parent = _clk_ssi2_set_parent,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi2_clk_1)
.id = 1,
.parent = &ipg_clk,
.secondary = &ssi2_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi2_clk_2)
.id = 1,
.parent = &spba_clk,
#ifdef CONFIG_SND_MXC_SOC_IRAM
static struct clk ssi3_clk[] = {
{
+ __INIT_CLK_DEBUG(ssi3_clk_0)
.id = 2,
.parent = &ssi1_clk[0],
.set_parent = _clk_ssi3_set_parent,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi3_clk_1)
.id = 2,
.parent = &ipg_clk,
.secondary = &ssi3_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi3_clk_2)
.id = 2,
.parent = &aips_tz2_clk,
#ifdef CONFIG_SND_MXC_SOC_IRAM
}
static struct clk ssi_ext1_clk = {
+ __INIT_CLK_DEBUG(ssi_ext1_clk)
.parent = &pll3_sw_clk,
.set_parent = _clk_ssi_ext1_set_parent,
.set_rate = _clk_ssi_ext1_set_rate,
}
static struct clk ssi_ext2_clk = {
+ __INIT_CLK_DEBUG(ssi_ext2_clk)
.parent = &pll3_sw_clk,
.set_parent = _clk_ssi_ext2_set_parent,
.get_rate = _clk_ssi_ext2_get_rate,
static struct clk esai_clk[] = {
{
+ __INIT_CLK_DEBUG(esai_clk_0)
.id = 0,
.parent = &pll3_sw_clk,
.set_parent = _clk_esai_set_parent,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esai_clk_1)
.id = 0,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR6,
};
static struct clk iim_clk = {
+ __INIT_CLK_DEBUG(iim_clk)
.parent = &ipg_clk,
.secondary = &aips_tz2_clk,
.enable = _clk_enable,
};
static struct clk tmax1_clk = {
+ __INIT_CLK_DEBUG(tmax1_clk)
.id = 0,
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
};
static struct clk tmax2_clk = {
+ __INIT_CLK_DEBUG(tmax2_clk)
.id = 0,
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
};
static struct clk tmax3_clk = {
+ __INIT_CLK_DEBUG(tmax3_clk)
.id = 0,
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
static struct clk usboh3_clk[] = {
{
+ __INIT_CLK_DEBUG(usboh3_clk_0)
.parent = &pll3_sw_clk,
.set_parent = _clk_usboh3_set_parent,
.get_rate = _clk_usboh3_get_rate,
.flags = AHB_MED_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(usboh3_clk_1)
.parent = &tmax2_clk,
#if defined(CONFIG_USB_STATIC_IRAM) \
|| defined(CONFIG_USB_STATIC_IRAM_PPH)
};
static struct clk usb_ahb_clk = {
+ __INIT_CLK_DEBUG(usb_ahb_clk)
.parent = &ipg_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR2,
static struct clk usb_phy_clk[] = {
{
+ __INIT_CLK_DEBUG(usb_phy_clk_0)
.id = 0,
.parent = &pll3_sw_clk,
.secondary = &tmax3_clk,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(usb_phy_clk_1)
.id = 1,
.parent = &pll3_sw_clk,
.secondary = &tmax3_clk,
};
static struct clk esdhc_dep_clks = {
+ __INIT_CLK_DEBUG(esdhc_dep_clks)
.parent = &spba_clk,
.secondary = &emi_fast_clk,
};
static struct clk esdhc1_clk[] = {
{
+ __INIT_CLK_DEBUG(esdhc1_clk_0)
.id = 0,
.parent = &pll2_sw_clk,
.set_parent = _clk_esdhc1_set_parent,
.secondary = &esdhc1_clk[1],
},
{
+ __INIT_CLK_DEBUG(esdhc1_clk_1)
.id = 0,
.parent = &ipg_clk,
.secondary = &esdhc1_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esdhc1_clk_2)
.id = 0,
.parent = &tmax3_clk,
.secondary = &esdhc_dep_clks,
static struct clk esdhc2_clk[] = {
{
+ __INIT_CLK_DEBUG(esdhc2_clk_0)
.id = 1,
.parent = &pll3_sw_clk,
.set_parent = _clk_esdhc2_set_parent,
.secondary = &esdhc2_clk[1],
},
{
+ __INIT_CLK_DEBUG(esdhc2_clk_1)
.id = 1,
.parent = &ipg_clk,
.secondary = &esdhc2_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esdhc2_clk_2)
.id = 0,
.parent = &tmax2_clk,
.secondary = &esdhc_dep_clks,
static struct clk esdhc3_clk[] = {
{
+ __INIT_CLK_DEBUG(esdhc3_clk_0)
.id = 2,
.parent = &esdhc1_clk[0],
.set_parent = _clk_esdhc3_set_parent,
.secondary = &esdhc3_clk[1],
},
{
+ __INIT_CLK_DEBUG(esdhc3_clk_1)
.id = 2,
.parent = &ipg_clk,
.secondary = &esdhc3_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esdhc3_clk_2)
.id = 0,
.parent = &ahb_max_clk,
.secondary = &esdhc_dep_clks,
static struct clk esdhc4_clk[] = {
{
+ __INIT_CLK_DEBUG(esdhc4_clk_0)
.id = 3,
.parent = &esdhc1_clk[0],
.set_parent = _clk_esdhc4_set_parent,
.secondary = &esdhc4_clk[1],
},
{
+ __INIT_CLK_DEBUG(esdhc4_clk_1)
.id = 3,
.parent = &ipg_clk,
.secondary = &esdhc4_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esdhc4_clk_2)
.id = 0,
.parent = &tmax3_clk,
.secondary = &esdhc_dep_clks,
};
static struct clk sata_clk = {
+ __INIT_CLK_DEBUG(sata_clk)
.parent = &ipg_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR4,
};
static struct clk ieee_1588_clk = {
+ __INIT_CLK_DEBUG(ieee_1588_clk)
.parent = &ipg_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR7,
static struct clk mlb_clk[] = {
{
+ __INIT_CLK_DEBUG(mlb_clk_0)
.parent = &ipg_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR7,
.secondary = &mlb_clk[1],
},
{
+ __INIT_CLK_DEBUG(mlb_clk_1)
.parent = &emi_fast_clk,
.secondary = &emi_intr_clk[1],
},
static struct clk can1_clk[] = {
{
+ __INIT_CLK_DEBUG(can1_clk_0)
.id = 0,
.parent = &lp_apm_clk,
.set_parent = _can_root_clk_set,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(can1_clk_1)
.id = 0,
.parent = &ipg_clk,
.enable = _clk_enable,
static struct clk can2_clk[] = {
{
+ __INIT_CLK_DEBUG(can2_clk_0)
.id = 1,
.parent = &lp_apm_clk,
.set_parent = _can_root_clk_set,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(can2_clk_1)
.id = 1,
.parent = &ipg_clk,
.enable = _clk_enable,
static struct clk sim_clk[] = {
{
+ __INIT_CLK_DEBUG(sim_clk_0)
.parent = &pll3_sw_clk,
.set_parent = _clk_sim_set_parent,
.secondary = &sim_clk[1],
.flags = AHB_HIGH_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(sim_clk_1)
.parent = &ipg_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR4,
}
static struct clk emi_enfc_clk = {
+ __INIT_CLK_DEBUG(emi_enfc_clk)
.parent = &emi_slow_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR5,
}
static struct clk spdif_xtal_clk = {
+ __INIT_CLK_DEBUG(spdif_xtal_clk)
.parent = &osc_clk,
.set_parent = _clk_spdif_xtal_set_parent,
.enable = _clk_enable,
static struct clk spdif0_clk[] = {
{
+ __INIT_CLK_DEBUG(spdif0_clk_0)
.id = 0,
.parent = &pll3_sw_clk,
.set_parent = _clk_spdif0_set_parent,
.flags = AHB_HIGH_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(spdif0_clk_1)
.id = 0,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk spdif1_clk[] = {
{
+ __INIT_CLK_DEBUG(spdif1_clk_0)
.id = 1,
.parent = &pll3_sw_clk,
.set_parent = _clk_spdif1_set_parent,
.flags = AHB_HIGH_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(spdif1_clk_1)
.id = 0,
.parent = &ipg_clk,
.secondary = &spba_clk,
}
static struct clk ddr_clk = {
+ __INIT_CLK_DEBUG(ddr_clk)
.parent = &axi_b_clk,
.set_parent = _clk_ddr_set_parent,
};
}
static struct clk arm_axi_clk = {
+ __INIT_CLK_DEBUG(arm_axi_clk)
.parent = &axi_a_clk,
.set_parent = _clk_arm_axi_set_parent,
.enable = _clk_enable,
static struct clk vpu_clk[] = {
{
+ __INIT_CLK_DEBUG(vpu_clk_0)
.set_parent = _clk_vpu_set_parent,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR5,
.flags = AHB_HIGH_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(vpu_clk_1)
.set_parent = _clk_vpu_set_parent,
.enable = _clk_vpu_enable,
.enable_reg = MXC_CCM_CCGR5,
.secondary = &vpu_clk[2],
},
{
+ __INIT_CLK_DEBUG(vpu_clk_2)
.parent = &emi_fast_clk,
#ifdef CONFIG_MXC_VPU_IRAM
.secondary = &emi_intr_clk[0],
}
static struct clk lpsr_clk = {
+ __INIT_CLK_DEBUG(lpsr_clk)
.parent = &ckil_clk,
.set_parent = _clk_lpsr_set_parent,
};
}
static struct clk pgc_clk = {
+ __INIT_CLK_DEBUG(pgc_clk)
.parent = &ipg_clk,
.get_rate = _clk_pgc_get_rate,
};
/*usb OTG clock */
static struct clk usb_clk = {
+ __INIT_CLK_DEBUG(usb_clk)
.get_rate = _clk_usb_get_rate,
};
static struct clk usb_utmi_clk = {
+ __INIT_CLK_DEBUG(usb_utmi_clk)
.enable = _clk_enable,
.enable_reg = MXC_CCM_CSCMR1,
.enable_shift = MXC_CCM_CSCMR1_USB_PHY_CLK_SEL_OFFSET,
};
static struct clk rtc_clk = {
+ __INIT_CLK_DEBUG(rtc_clk)
.parent = &ckil_clk,
.secondary = &ipg_clk,
.enable = _clk_enable,
};
static struct clk ata_clk = {
+ __INIT_CLK_DEBUG(ata_clk)
.parent = &ipg_clk,
.secondary = &spba_clk,
.enable = _clk_enable,
};
static struct clk owire_clk = {
+ __INIT_CLK_DEBUG(owire_clk)
.parent = &ipg_perclk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR2,
static struct clk fec_clk[] = {
{
+ __INIT_CLK_DEBUG(fec_clk_0)
.parent = &ipg_clk,
.secondary = &fec_clk[1],
.enable = _clk_enable,
.flags = AHB_HIGH_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(fec_clk_1)
.parent = &tmax2_clk,
.secondary = &fec_clk[2],
},
{
+ __INIT_CLK_DEBUG(fec_clk_2)
.parent = &aips_tz2_clk,
.secondary = &emi_fast_clk,
},
static struct clk sahara_clk[] = {
{
+ __INIT_CLK_DEBUG(sahara_clk_0)
.parent = &ahb_clk,
.secondary = &sahara_clk[1],
.enable_reg = MXC_CCM_CCGR4,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(sahara_clk_1)
.parent = &tmax1_clk,
.secondary = &emi_fast_clk,
}
static struct clk scc_clk[] = {
{
+ __INIT_CLK_DEBUG(scc_clk_0)
.parent = &ahb_clk,
.secondary = &scc_clk[1],
.enable_reg = MXC_CCM_CCGR1,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(scc_clk_1)
.parent = &tmax1_clk,
.secondary = &emi_fast_clk,
}
static struct clk garb_clk = {
+ __INIT_CLK_DEBUG(garb_clk)
.parent = &axi_a_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR5,
};
static struct clk gpu3d_clk = {
+ __INIT_CLK_DEBUG(gpu3d_clk)
.parent = &axi_a_clk,
.set_parent = _clk_gpu3d_set_parent,
.enable = _clk_enable,
}
static struct clk gpu2d_clk = {
+ __INIT_CLK_DEBUG(gpu2d_clk)
.parent = &axi_a_clk,
.set_parent = _clk_gpu2d_set_parent,
.enable = _clk_enable,
return 0;
}
static struct clk cko1_clk = {
+ __INIT_CLK_DEBUG(cko1_clk)
.get_rate = cko1_get_rate,
.enable = cko1_enable,
.disable = cko1_disable,
static struct clk asrc_clk[] = {
{
+ __INIT_CLK_DEBUG(asrc_clk_0)
.id = 0,
.parent = &pll4_sw_clk,
.set_parent = _clk_asrc_set_parent,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(asrc_clk_1)
.id = 0,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR7,
clk_tree_init();
- for (i = 0; i < ARRAY_SIZE(lookups); i++)
+ for (i = 0; i < ARRAY_SIZE(lookups); i++) {
clkdev_add(&lookups[i]);
+ clk_debug_register(lookups[i].clk);
+ }
- for (i = 0; i < ARRAY_SIZE(mx51_lookups); i++)
+ for (i = 0; i < ARRAY_SIZE(mx51_lookups); i++) {
clkdev_add(&mx51_lookups[i]);
+ clk_debug_register(mx51_lookups[i].clk);
+ }
max_axi_a_clk = MAX_AXI_A_CLK_MX51;
max_axi_b_clk = MAX_AXI_B_CLK_MX51;
clk_tree_init();
- for (i = 0; i < ARRAY_SIZE(lookups); i++)
+ for (i = 0; i < ARRAY_SIZE(lookups); i++) {
clkdev_add(&lookups[i]);
+ clk_debug_register(lookups[i].clk);
+ }
- for (i = 0; i < ARRAY_SIZE(mx53_lookups); i++)
+ for (i = 0; i < ARRAY_SIZE(mx53_lookups); i++) {
clkdev_add(&mx53_lookups[i]);
+ clk_debug_register(mx53_lookups[i].clk);
+ }
clk_set_parent(&esai_clk[0], &ckih_clk);
#define MAX_AHB_CLK 133333333
#define MAX_EMI_SLOW_CLK 133000000
+#ifdef CONFIG_CLK_DEBUG
+#define __INIT_CLK_DEBUG(n) .name = #n,
+#else
+#define __INIT_CLK_DEBUG(n)
+#endif
+
extern int mxc_jtag_enabled;
extern int uart_at_24;
extern int cpufreq_trig_needed;
/* External high frequency clock */
static struct clk ckih_clk = {
+ __INIT_CLK_DEBUG(ckih_clk)
.get_rate = get_high_reference_clock_rate,
};
static struct clk ckih2_clk = {
+ __INIT_CLK_DEBUG(ckih2_clk)
.get_rate = get_ckih2_reference_clock_rate,
};
static struct clk osc_clk = {
+ __INIT_CLK_DEBUG(osc_clk)
.get_rate = get_oscillator_reference_clock_rate,
};
/* External low frequency (32kHz) clock */
static struct clk ckil_clk = {
+ __INIT_CLK_DEBUG(ckil_clk)
.get_rate = get_low_reference_clock_rate,
};
}
static struct clk apll_clk = {
+ __INIT_CLK_DEBUG(apll_clk)
.get_rate = apll_get_rate,
.enable = apll_enable,
.disable = apll_disable,
}
static struct clk pfd0_clk = {
+ __INIT_CLK_DEBUG(pfd0_clk)
.parent = &apll_clk,
.enable_reg = (void *)MXC_ANADIG_FRAC0,
.enable_shift = MXC_ANADIG_PFD0_FRAC_OFFSET,
};
static struct clk pfd1_clk = {
+ __INIT_CLK_DEBUG(pfd1_clk)
.parent = &apll_clk,
.enable_reg = (void *)MXC_ANADIG_FRAC0,
.enable_shift = MXC_ANADIG_PFD1_FRAC_OFFSET,
};
static struct clk pfd2_clk = {
+ __INIT_CLK_DEBUG(pfd2_clk)
.parent = &apll_clk,
.enable_reg = (void *)MXC_ANADIG_FRAC0,
.enable_shift = MXC_ANADIG_PFD2_FRAC_OFFSET,
};
static struct clk pfd3_clk = {
+ __INIT_CLK_DEBUG(pfd3_clk)
.parent = &apll_clk,
.enable_reg = (void *)MXC_ANADIG_FRAC0,
.enable_shift = MXC_ANADIG_PFD3_FRAC_OFFSET,
};
static struct clk pfd4_clk = {
+ __INIT_CLK_DEBUG(pfd4_clk)
.parent = &apll_clk,
.enable_reg = (void *)MXC_ANADIG_FRAC1,
.enable_shift = MXC_ANADIG_PFD4_FRAC_OFFSET,
};
static struct clk pfd5_clk = {
+ __INIT_CLK_DEBUG(pfd5_clk)
.parent = &apll_clk,
.enable_reg = (void *)MXC_ANADIG_FRAC1,
.enable_shift = MXC_ANADIG_PFD5_FRAC_OFFSET,
};
static struct clk pfd6_clk = {
+ __INIT_CLK_DEBUG(pfd6_clk)
.parent = &apll_clk,
.enable_reg = (void *)MXC_ANADIG_FRAC1,
.enable_shift = MXC_ANADIG_PFD6_FRAC_OFFSET,
};
static struct clk pfd7_clk = {
+ __INIT_CLK_DEBUG(pfd7_clk)
.parent = &apll_clk,
.enable_reg = (void *)MXC_ANADIG_FRAC1,
.enable_shift = MXC_ANADIG_PFD7_FRAC_OFFSET,
}
static struct clk pll1_main_clk = {
+ __INIT_CLK_DEBUG(pll1_main_clk)
.parent = &osc_clk,
.get_rate = _clk_pll_get_rate,
.set_rate = _clk_pll_set_rate,
/* pll1 switch clock */
static struct clk pll1_sw_clk = {
+ __INIT_CLK_DEBUG(pll1_sw_clk)
.parent = &pll1_main_clk,
.set_parent = _clk_pll1_sw_set_parent,
.get_rate = _clk_pll1_sw_get_rate,
/* same as pll2_main_clk. These two clocks should always be the same */
static struct clk pll2_sw_clk = {
+ __INIT_CLK_DEBUG(pll2_sw_clk)
.parent = &osc_clk,
.get_rate = _clk_pll_get_rate,
.enable = _clk_pll_enable,
/* same as pll3_main_clk. These two clocks should always be the same */
static struct clk pll3_sw_clk = {
+ __INIT_CLK_DEBUG(pll3_sw_clk)
.parent = &osc_clk,
.set_rate = _clk_pll_set_rate,
.get_rate = _clk_pll_get_rate,
}
static struct clk lp_apm_clk = {
+ __INIT_CLK_DEBUG(lp_apm_clk)
.parent = &osc_clk,
.set_parent = _clk_lp_apm_set_parent,
.flags = RATE_PROPAGATES,
static struct clk cpu_clk = {
+ __INIT_CLK_DEBUG(cpu_clk)
.parent = &pll1_sw_clk,
.get_rate = _clk_arm_get_rate,
.set_rate = _clk_cpu_set_rate,
}
static struct clk main_bus_clk = {
+ __INIT_CLK_DEBUG(main_bus_clk)
.parent = &pll2_sw_clk,
.set_parent = _clk_main_bus_set_parent,
.get_rate = _clk_main_bus_get_rate,
static struct clk axi_a_clk = {
+ __INIT_CLK_DEBUG(axi_a_clk)
.parent = &main_bus_clk,
.get_rate = _clk_axi_a_get_rate,
.set_rate = _clk_axi_a_set_rate,
static struct clk axi_b_clk = {
+ __INIT_CLK_DEBUG(axi_b_clk)
.parent = &main_bus_clk,
.get_rate = _clk_axi_b_get_rate,
.set_rate = _clk_axi_b_set_rate,
static struct clk ahb_clk = {
+ __INIT_CLK_DEBUG(ahb_clk)
.parent = &main_bus_clk,
.get_rate = _clk_ahb_get_rate,
.set_rate = _clk_ahb_set_rate,
static struct clk ahb_max_clk = {
+ __INIT_CLK_DEBUG(ahb_max_clk)
.parent = &ahb_clk,
.enable_reg = MXC_CCM_CCGR0,
.enable_shift = MXC_CCM_CCGRx_CG14_OFFSET,
};
static struct clk ahbmux1_clk = {
+ __INIT_CLK_DEBUG(ahbmux1_clk)
.id = 0,
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
}
static struct clk ipg_clk = {
+ __INIT_CLK_DEBUG(ipg_clk)
.parent = &ahb_clk,
.get_rate = _clk_ipg_get_rate,
.flags = RATE_PROPAGATES,
}
static struct clk ipg_perclk = {
+ __INIT_CLK_DEBUG(ipg_perclk)
.parent = &lp_apm_clk,
.get_rate = _clk_ipg_per_get_rate,
.set_parent = _clk_ipg_per_set_parent,
};
static struct clk ipmux1_clk = {
+ __INIT_CLK_DEBUG(ipmux1_clk)
.enable_reg = MXC_CCM_CCGR5,
.enable_shift = MXC_CCM_CCGRx_CG6_OFFSET,
.enable = _clk_enable,
};
static struct clk ipmux2_clk = {
+ __INIT_CLK_DEBUG(ipmux2_clk)
.enable_reg = MXC_CCM_CCGR6,
.enable_shift = MXC_CCM_CCGRx_CG0_OFFSET,
.enable = _clk_enable,
}
static struct clk sys_clk = {
+ __INIT_CLK_DEBUG(sys_clk)
.enable = _clk_sys_clk_enable,
.disable = _clk_sys_clk_disable,
};
static struct clk weim_clk[] = {
{
+ __INIT_CLK_DEBUG(weim_clk_0)
.parent = &main_bus_clk,
.set_parent = _clk_weim_set_parent,
.set_rate = _clk_weim_set_rate,
.secondary = &weim_clk[1],
},
{
+ __INIT_CLK_DEBUG(weim_clk_1)
.parent = &ipg_clk,
.secondary = &sys_clk,
.enable = _clk_enable,
}
static struct clk ocram_clk = {
+ __INIT_CLK_DEBUG(ocram_clk)
.parent = &sys_clk,
.enable_reg = MXC_CCM_CCGR6,
.enable_shift = MXC_CCM_CCGRx_CG1_OFFSET,
};
static struct clk aips_tz1_clk = {
+ __INIT_CLK_DEBUG(aips_tz1_clk)
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
.enable_reg = MXC_CCM_CCGR0,
};
static struct clk aips_tz2_clk = {
+ __INIT_CLK_DEBUG(aips_tz2_clk)
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
.enable_reg = MXC_CCM_CCGR0,
};
static struct clk gpc_dvfs_clk = {
+ __INIT_CLK_DEBUG(gpc_dvfs_clk)
.enable_reg = MXC_CCM_CCGR5,
.enable_shift = MXC_CCM_CCGRx_CG12_OFFSET,
.enable = _clk_enable,
static struct clk sdma_clk[] = {
{
+ __INIT_CLK_DEBUG(sdma_clk_0)
.parent = &ahb_clk,
.enable_reg = MXC_CCM_CCGR4,
.enable_shift = MXC_CCM_CCGRx_CG15_OFFSET,
.disable = _clk_sdma_disable,
},
{
+ __INIT_CLK_DEBUG(sdma_clk_1)
.parent = &ipg_clk,
#ifdef CONFIG_SDMA_IRAM
.secondary = &ocram_clk,
};
static struct clk spba_clk = {
+ __INIT_CLK_DEBUG(spba_clk)
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR5,
.enable_shift = MXC_CCM_CCGRx_CG0_OFFSET,
}
static struct clk uart_main_clk = {
+ __INIT_CLK_DEBUG(uart_main_clk)
.parent = &pll2_sw_clk,
.get_rate = _clk_uart_get_rate,
.set_parent = _clk_uart_set_parent,
static struct clk uart1_clk[] = {
{
+ __INIT_CLK_DEBUG(uart1_clk_0)
.id = 0,
.parent = &uart_main_clk,
.secondary = &uart1_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart1_clk_1)
.id = 0,
.parent = &ipg_clk,
#if UART1_DMA_ENABLE
static struct clk uart2_clk[] = {
{
+ __INIT_CLK_DEBUG(uart2_clk_0)
.id = 1,
.parent = &uart_main_clk,
.secondary = &uart2_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart2_clk_1)
.id = 1,
.parent = &ipg_clk,
#if UART2_DMA_ENABLE
static struct clk uart3_clk[] = {
{
+ __INIT_CLK_DEBUG(uart3_clk_0)
.id = 2,
.parent = &uart_main_clk,
.secondary = &uart3_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart3_clk_1)
.id = 2,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk uart4_clk[] = {
{
+ __INIT_CLK_DEBUG(uart4_clk_0)
.id = 3,
.parent = &uart_main_clk,
.secondary = &uart4_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart4_clk_1)
.id = 3,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk uart5_clk[] = {
{
+ __INIT_CLK_DEBUG(uart5_clk_0)
.id = 4,
.parent = &uart_main_clk,
.secondary = &uart5_clk[1],
#endif
},
{
+ __INIT_CLK_DEBUG(uart5_clk_1)
.id = 4,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk gpt_clk[] = {
{
+ __INIT_CLK_DEBUG(gpt_clk_0)
.parent = &ipg_perclk,
.id = 0,
.enable_reg = MXC_CCM_CCGR2,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(gpt_clk_1)
.id = 0,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR2,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(gpt_clk_2)
.id = 0,
.parent = &ckil_clk,
},
static struct clk pwm1_clk[] = {
{
+ __INIT_CLK_DEBUG(pwm1_clk_0)
.parent = &ipg_perclk,
.id = 0,
.enable_reg = MXC_CCM_CCGR2,
.secondary = &pwm1_clk[1],
},
{
+ __INIT_CLK_DEBUG(pwm1_clk_1)
.id = 0,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR2,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(pwm1_clk_2)
.id = 0,
.parent = &ckil_clk,
},
static struct clk pwm2_clk[] = {
{
+ __INIT_CLK_DEBUG(pwm2_clk_0)
.parent = &ipg_perclk,
.id = 1,
.enable_reg = MXC_CCM_CCGR2,
.secondary = &pwm2_clk[1],
},
{
+ __INIT_CLK_DEBUG(pwm2_clk_1)
.id = 1,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR2,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(pwm2_clk_2)
.id = 1,
.parent = &ckil_clk,
},
static struct clk i2c_clk[] = {
{
+ __INIT_CLK_DEBUG(i2c_clk_0)
.id = 0,
.parent = &ipg_perclk,
.enable_reg = MXC_CCM_CCGR1,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(i2c_clk_1)
.id = 1,
.parent = &ipg_perclk,
.enable_reg = MXC_CCM_CCGR1,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(i2c_clk_2)
.id = 2,
.parent = &ipg_perclk,
.enable_reg = MXC_CCM_CCGR1,
}
static struct clk cspi_main_clk = {
+ __INIT_CLK_DEBUG(cspi_main_clk)
.parent = &pll3_sw_clk,
.get_rate = _clk_cspi_get_rate,
.set_parent = _clk_cspi_set_parent,
static struct clk cspi1_clk[] = {
{
+ __INIT_CLK_DEBUG(cspi1_clk_0)
.id = 0,
.parent = &cspi_main_clk,
.secondary = &cspi1_clk[1],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(cspi1_clk_1)
.id = 0,
.parent = &ipg_clk,
.secondary = &spba_clk,
static struct clk cspi2_clk[] = {
{
+ __INIT_CLK_DEBUG(cspi2_clk_0)
.id = 1,
.parent = &cspi_main_clk,
.secondary = &cspi2_clk[1],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(cspi2_clk_1)
.id = 1,
.parent = &ipg_clk,
.secondary = &aips_tz2_clk,
};
static struct clk cspi3_clk = {
+ __INIT_CLK_DEBUG(cspi3_clk)
.id = 2,
.parent = &ipg_clk,
.enable_reg = MXC_CCM_CCGR4,
}
static struct clk ssi_lp_apm_clk = {
+ __INIT_CLK_DEBUG(ssi_lp_apm_clk)
.parent = &ckih_clk,
.set_parent = _clk_ssi_lp_apm_set_parent,
};
static struct clk ssi1_clk[] = {
{
+ __INIT_CLK_DEBUG(ssi1_clk_0)
.id = 0,
.parent = &pll3_sw_clk,
.set_parent = _clk_ssi1_set_parent,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi1_clk_1)
.id = 0,
.parent = &ipg_clk,
.secondary = &ssi1_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi1_clk_2)
.id = 0,
.parent = &aips_tz2_clk,
#ifdef CONFIG_SND_MXC_SOC_IRAM
static struct clk ssi2_clk[] = {
{
+ __INIT_CLK_DEBUG(ssi2_clk_0)
.id = 1,
.parent = &pll3_sw_clk,
.set_parent = _clk_ssi2_set_parent,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi2_clk_1)
.id = 1,
.parent = &ipg_clk,
.secondary = &ssi2_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(ssi2_clk_2)
.id = 1,
.parent = &spba_clk,
#ifdef CONFIG_SND_MXC_SOC_IRAM
}
static struct clk ssi_ext1_clk = {
+ __INIT_CLK_DEBUG(ssi_ext1_clk)
.parent = &pll3_sw_clk,
.set_parent = _clk_ssi_ext1_set_parent,
.set_rate = _clk_ssi_ext1_set_rate,
}
static struct clk ssi_ext2_clk = {
+ __INIT_CLK_DEBUG(ssi_ext2_clk)
.parent = &pll3_sw_clk,
.set_parent = _clk_ssi_ext2_set_parent,
.get_rate = _clk_ssi_ext2_get_rate,
};
static struct clk tmax2_clk = {
+ __INIT_CLK_DEBUG(tmax2_clk)
.id = 0,
.parent = &ahb_clk,
.secondary = &ahb_max_clk,
};
static struct clk usb_ahb_clk = {
+ __INIT_CLK_DEBUG(usb_ahb_clk)
.parent = &ipg_clk,
.secondary = &ddr_clk,
.enable = _clk_enable,
static struct clk usb_phy_clk[] = {
{
+ __INIT_CLK_DEBUG(usb_phy_clk_0)
.id = 0,
.parent = &osc_clk,
.enable = _clk_enable,
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(usb_phy_clk_1)
.id = 1,
.parent = &osc_clk,
.enable = _clk_enable,
};
static struct clk esdhc_dep_clks = {
+ __INIT_CLK_DEBUG(esdhc_dep_clks)
.parent = &spba_clk,
.secondary = &ddr_clk,
};
static struct clk esdhc1_clk[] = {
{
+ __INIT_CLK_DEBUG(esdhc1_clk_0)
.id = 0,
.parent = &pll2_sw_clk,
.set_parent = _clk_esdhc1_set_parent,
.flags = AHB_MED_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(esdhc1_clk_1)
.id = 0,
.parent = &ipg_clk,
.secondary = &esdhc1_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esdhc1_clk_2)
.id = 0,
.parent = &tmax2_clk,
.secondary = &esdhc_dep_clks,
static struct clk esdhc2_clk[] = {
{
+ __INIT_CLK_DEBUG(esdhc2_clk_0)
.id = 1,
.parent = &esdhc1_clk[0],
.set_parent = _clk_esdhc2_set_parent,
.flags = AHB_MED_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(esdhc2_clk_1)
.id = 1,
.parent = &ipg_clk,
.secondary = &esdhc2_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esdhc2_clk_2)
.id = 0,
.parent = &tmax2_clk,
.secondary = &esdhc_dep_clks,
static struct clk esdhc3_clk[] = {
{
+ __INIT_CLK_DEBUG(esdhc3_clk_0)
.id = 2,
.parent = &pll2_sw_clk,
.set_parent = _clk_esdhc3_set_parent,
.flags = AHB_MED_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(esdhc3_clk_1)
.id = 2,
.parent = &ipg_clk,
.secondary = &esdhc3_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esdhc3_clk_2)
.id = 0,
.parent = &ahb_max_clk,
.secondary = &esdhc_dep_clks,
static struct clk esdhc4_clk[] = {
{
+ __INIT_CLK_DEBUG(esdhc4_clk_0)
.id = 3,
.parent = &esdhc1_clk[0],
.set_parent = _clk_esdhc4_set_parent,
.flags = AHB_MED_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(esdhc4_clk_1)
.id = 3,
.parent = &ipg_clk,
.secondary = &esdhc4_clk[2],
.disable = _clk_disable,
},
{
+ __INIT_CLK_DEBUG(esdhc4_clk_2)
.id = 0,
.parent = &tmax2_clk,
.secondary = &esdhc_dep_clks,
static struct clk ddr_clk = {
+ __INIT_CLK_DEBUG(ddr_clk)
.parent = &pll1_sw_clk,
.secondary = &sys_clk,
.set_parent = _clk_ddr_set_parent,
}
static struct clk pgc_clk = {
+ __INIT_CLK_DEBUG(pgc_clk)
.parent = &ipg_clk,
.get_rate = _clk_pgc_get_rate,
};
/*usb OTG clock */
static struct clk usb_clk = {
+ __INIT_CLK_DEBUG(usb_clk)
.get_rate = _clk_usb_get_rate,
};
static struct clk rtc_clk = {
+ __INIT_CLK_DEBUG(rtc_clk)
.parent = &ckil_clk,
.secondary = &ipg_clk,
.enable = _clk_enable,
};
struct clk rng_clk = {
+ __INIT_CLK_DEBUG(rng_clk)
.parent = &ipg_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR7,
};
static struct clk owire_clk = {
+ __INIT_CLK_DEBUG(owire_clk)
.parent = &ipg_perclk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR2,
static struct clk fec_clk[] = {
{
+ __INIT_CLK_DEBUG(fec_clk_0)
.parent = &ipg_clk,
.secondary = &fec_clk[1],
.enable = _clk_enable,
.flags = AHB_HIGH_SET_POINT | CPU_FREQ_TRIG_UPDATE,
},
{
+ __INIT_CLK_DEBUG(fec_clk_1)
.parent = &aips_tz2_clk,
.secondary = &ddr_clk,
},
static struct clk gpmi_nfc_clk[] = {
{ /* gpmi_io_clk */
+ __INIT_CLK_DEBUG(gpmi_io_clk)
.parent = &osc_clk,
.secondary = &gpmi_nfc_clk[1],
.set_parent = gpmi_set_parent,
.disable = gpmi_clk_disable,
},
{ /* gpmi_apb_clk */
+ __INIT_CLK_DEBUG(gpmi_apb_clk)
.parent = &apbh_dma_clk,
.secondary = &gpmi_nfc_clk[2],
.enable = _clk_enable,
.disable = _clk_disable,
},
{ /* bch_clk */
+ __INIT_CLK_DEBUG(gpmi_bch_clk)
.parent = &osc_clk,
.secondary = &gpmi_nfc_clk[3],
.enable = bch_clk_enable,
.disable = bch_clk_disable,
},
{ /* bch_apb_clk */
+ __INIT_CLK_DEBUG(gpmi_bch_apb_clk)
.parent = &apbh_dma_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR7,
};
static struct clk ocotp_clk = {
+ __INIT_CLK_DEBUG(ocotp_clk)
.parent = &ahb_clk,
.enable = _clk_enable,
.enable_reg = MXC_CCM_CCGR7,
}
static struct clk gpu2d_clk = {
+ __INIT_CLK_DEBUG(gpu2d_clk)
.parent = &axi_a_clk,
.secondary = &ddr_clk,
.set_parent = _clk_gpu2d_set_parent,
};
static struct clk apbh_dma_clk = {
+ __INIT_CLK_DEBUG(apbh_dma_clk)
.parent = &ahb_clk,
.secondary = &ddr_clk,
.enable = _clk_enable,
};
struct clk dcp_clk = {
+ __INIT_CLK_DEBUG(dcp_clk)
.parent = &ahb_clk,
.secondary = &apbh_dma_clk,
.enable = _clk_enable,
}
static struct clk display_axi_clk = {
+ __INIT_CLK_DEBUG(display_axi_clk)
.parent = &osc_clk,
.secondary = &apbh_dma_clk,
.set_parent = _clk_display_axi_set_parent,
/* TODO: check Auto-Slow Mode */
static struct clk pxp_axi_clk = {
+ __INIT_CLK_DEBUG(pxp_axi_clk)
.parent = &display_axi_clk,
.enable = _clk_pxp_axi_enable,
.disable = _clk_pxp_axi_disable,
};
static struct clk elcdif_axi_clk = {
+ __INIT_CLK_DEBUG(elcdif_axi_clk)
.parent = &display_axi_clk,
.enable = _clk_enable,
.disable = _clk_disable,
}
static struct clk elcdif_pix_clk = {
+ __INIT_CLK_DEBUG(elcdif_pix_clk)
.parent = &osc_clk,
.secondary = &ddr_clk,
.enable = _clk_elcdif_pix_enable,
/* TODO: check Auto-Slow Mode */
static struct clk epdc_axi_clk = {
+ __INIT_CLK_DEBUG(epdc_axi_clk)
.parent = &osc_clk,
.secondary = &apbh_dma_clk,
.enable_reg = MXC_CCM_CCGR6,
/* TODO: check Auto-Slow Mode */
static struct clk epdc_pix_clk = {
+ __INIT_CLK_DEBUG(epdc_pix_clk)
.parent = &osc_clk,
.secondary = &apbh_dma_clk,
.enable_reg = MXC_CCM_CCGR6,
}
static struct clk cko1_clk = {
+ __INIT_CLK_DEBUG(cko1_clk)
.parent = &pll1_sw_clk,
.get_rate = cko1_get_rate,
.enable = cko1_enable,
usb_phy_clk[0].enable_shift = MXC_CCM_CCGRx_CG5_OFFSET;
clk_tree_init();
- for (i = 0; i < ARRAY_SIZE(lookups); i++)
+ for (i = 0; i < ARRAY_SIZE(lookups); i++) {
clkdev_add(&lookups[i]);
+ clk_debug_register(lookups[i].clk);
+ }
/* set DDR clock parent */
reg = __raw_readl(MXC_CCM_CLK_DDR) &