17 #include <mach/hardware.h>
18 #include <mach/common.h>
28 { .arm = 1, .ahb = 4, .sel = 0},
29 { .arm = 1, .ahb = 3, .sel = 1},
30 { .arm = 2, .ahb = 2, .sel = 0},
31 { .arm = 0, .ahb = 0, .sel = 0},
32 { .arm = 0, .ahb = 0, .sel = 0},
33 { .arm = 0, .ahb = 0, .sel = 0},
34 { .arm = 4, .ahb = 1, .sel = 0},
35 { .arm = 1, .ahb = 5, .sel = 0},
36 { .arm = 1, .ahb = 8, .sel = 0},
37 { .arm = 1, .ahb = 6, .sel = 1},
38 { .arm = 2, .ahb = 4, .sel = 0},
39 { .arm = 0, .ahb = 0, .sel = 0},
40 { .arm = 0, .ahb = 0, .sel = 0},
41 { .arm = 0, .ahb = 0, .sel = 0},
42 { .arm = 4, .ahb = 2, .sel = 0},
43 { .arm = 0, .ahb = 0, .sel = 0},
46 static char hsp_div_532[] = { 4, 8, 3, 0 };
47 static char hsp_div_400[] = { 3, 6, 3, 0 };
49 static const char *std_sel[] = {
"ppll",
"arm"};
50 static const char *ipg_per_sel[] = {
"ahb_per_div",
"arm_per_div"};
53 ckih,
mpll,
ppll,
mpll_075,
arm,
hsp,
hsp_div,
hsp_sel,
ahb,
ipg,
80 consumer_sel = (pdr0 >> 16) & 0xf;
81 aad = &clk_consumer[consumer_sel];
83 pr_err(
"i.MX35 clk: illegal consumer mux selection 0x%x\n", consumer_sel);
88 aad = &clk_consumer[0];
91 clk[
ckih] = imx_clk_fixed(
"ckih", 24000000);
95 clk[
mpll] = imx_clk_fixed_factor(
"mpll_075",
"mpll", 3, 4);
98 clk[
arm] = imx_clk_fixed_factor(
"arm",
"mpll_075", 1, aad->
arm);
100 clk[
arm] = imx_clk_fixed_factor(
"arm",
"mpll", 1, aad->
arm);
103 hsp_div = hsp_div_532;
105 hsp_div = hsp_div_400;
107 hsp_sel = (pdr0 >> 20) & 0x3;
108 if (!hsp_div[hsp_sel]) {
109 pr_err(
"i.MX35 clk: illegal hsp clk selection 0x%x\n", hsp_sel);
113 clk[
hsp] = imx_clk_fixed_factor(
"hsp",
"arm", 1, hsp_div[hsp_sel]);
115 clk[
ahb] = imx_clk_fixed_factor(
"ahb",
"arm", 1, aad->
ahb);
116 clk[
ipg] = imx_clk_fixed_factor(
"ipg",
"ahb", 1, 2);
204 pr_err(
"i.MX35 clk %d: register failed with %ld\n",
279 #ifdef CONFIG_MXC_USE_EPIT