Skip to content

Commit d8ef3cc

Browse files
Magnus Dammpmundt
authored andcommitted
sh: sh7786 mstp32 clkdev lookup
Add sh7786 MSTP clocks to the clkdev lookup table. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 8bc23d9 commit d8ef3cc

1 file changed

Lines changed: 54 additions & 1 deletion

File tree

‎arch/sh/kernel/cpu/sh4a/clock-sh7786.c‎

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,49 @@ static struct clk mstp_clks[MSTP_NR] = {
130130
[MSTP102] = SH_CLK_MSTP32("ether_fck", -1, NULL, MSTPCR1, 2, 0),
131131
};
132132

133+
#define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk }
134+
133135
static struct clk_lookup lookups[] = {
136+
/* MSTP32 clocks */
137+
{
138+
/* SCIF5 */
139+
.dev_id = "sh-sci.5",
140+
.con_id = "sci_fck",
141+
.clk = &mstp_clks[MSTP029],
142+
}, {
143+
/* SCIF4 */
144+
.dev_id = "sh-sci.4",
145+
.con_id = "sci_fck",
146+
.clk = &mstp_clks[MSTP028],
147+
}, {
148+
/* SCIF3 */
149+
.dev_id = "sh-sci.3",
150+
.con_id = "sci_fck",
151+
.clk = &mstp_clks[MSTP027],
152+
}, {
153+
/* SCIF2 */
154+
.dev_id = "sh-sci.2",
155+
.con_id = "sci_fck",
156+
.clk = &mstp_clks[MSTP026],
157+
}, {
158+
/* SCIF1 */
159+
.dev_id = "sh-sci.1",
160+
.con_id = "sci_fck",
161+
.clk = &mstp_clks[MSTP025],
162+
}, {
163+
/* SCIF0 */
164+
.dev_id = "sh-sci.0",
165+
.con_id = "sci_fck",
166+
.clk = &mstp_clks[MSTP024],
167+
},
168+
CLKDEV_CON_ID("ssi3_fck", &mstp_clks[MSTP023]),
169+
CLKDEV_CON_ID("ssi2_fck", &mstp_clks[MSTP022]),
170+
CLKDEV_CON_ID("ssi1_fck", &mstp_clks[MSTP021]),
171+
CLKDEV_CON_ID("ssi0_fck", &mstp_clks[MSTP020]),
172+
CLKDEV_CON_ID("hac1_fck", &mstp_clks[MSTP017]),
173+
CLKDEV_CON_ID("hac0_fck", &mstp_clks[MSTP016]),
174+
CLKDEV_CON_ID("i2c1_fck", &mstp_clks[MSTP015]),
175+
CLKDEV_CON_ID("i2c0_fck", &mstp_clks[MSTP014]),
134176
{
135177
/* TMU0 */
136178
.dev_id = "sh_tmu.0",
@@ -191,7 +233,18 @@ static struct clk_lookup lookups[] = {
191233
.dev_id = "sh_tmu.11",
192234
.con_id = "tmu_fck",
193235
.clk = &mstp_clks[MSTP011],
194-
}
236+
},
237+
CLKDEV_CON_ID("sdif1_fck", &mstp_clks[MSTP005]),
238+
CLKDEV_CON_ID("sdif0_fck", &mstp_clks[MSTP004]),
239+
CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]),
240+
CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP112]),
241+
CLKDEV_CON_ID("pcie2_fck", &mstp_clks[MSTP110]),
242+
CLKDEV_CON_ID("pcie1_fck", &mstp_clks[MSTP109]),
243+
CLKDEV_CON_ID("pcie0_fck", &mstp_clks[MSTP108]),
244+
CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]),
245+
CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]),
246+
CLKDEV_CON_ID("du_fck", &mstp_clks[MSTP103]),
247+
CLKDEV_CON_ID("ether_fck", &mstp_clks[MSTP102]),
195248
};
196249

197250
int __init arch_clk_init(void)

0 commit comments

Comments
 (0)