blob: ba5758551c946c093fef89db20eb881c5a36d3c0 [file] [log] [blame]
Maxime Bizone7300d02009-08-18 13:23:37 +01001/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
7 */
8
Paul Gortmaker26dd3e42017-01-28 21:05:57 -05009#include <linux/init.h>
10#include <linux/export.h>
Maxime Bizone7300d02009-08-18 13:23:37 +010011#include <linux/mutex.h>
12#include <linux/err.h>
13#include <linux/clk.h>
Jonas Gorskic5af3c22017-09-20 13:14:01 +020014#include <linux/clkdev.h>
Maxime Bizon04712f32011-11-04 19:09:35 +010015#include <linux/delay.h>
Maxime Bizone7300d02009-08-18 13:23:37 +010016#include <bcm63xx_cpu.h>
17#include <bcm63xx_io.h>
18#include <bcm63xx_regs.h>
Jonas Gorskiba00e2e2012-10-28 12:17:55 +000019#include <bcm63xx_reset.h>
Jonas Gorski042df4f2013-04-06 10:31:02 +000020
21struct clk {
22 void (*set)(struct clk *, int);
23 unsigned int rate;
24 unsigned int usage;
25 int id;
26};
Maxime Bizone7300d02009-08-18 13:23:37 +010027
28static DEFINE_MUTEX(clocks_mutex);
29
30
31static void clk_enable_unlocked(struct clk *clk)
32{
33 if (clk->set && (clk->usage++) == 0)
34 clk->set(clk, 1);
35}
36
37static void clk_disable_unlocked(struct clk *clk)
38{
39 if (clk->set && (--clk->usage) == 0)
40 clk->set(clk, 0);
41}
42
43static void bcm_hwclock_set(u32 mask, int enable)
44{
45 u32 reg;
46
47 reg = bcm_perf_readl(PERF_CKCTL_REG);
48 if (enable)
49 reg |= mask;
50 else
51 reg &= ~mask;
52 bcm_perf_writel(reg, PERF_CKCTL_REG);
53}
54
55/*
56 * Ethernet MAC "misc" clock: dma clocks and main clock on 6348
57 */
58static void enet_misc_set(struct clk *clk, int enable)
59{
60 u32 mask;
61
62 if (BCMCPU_IS_6338())
63 mask = CKCTL_6338_ENET_EN;
64 else if (BCMCPU_IS_6345())
65 mask = CKCTL_6345_ENET_EN;
66 else if (BCMCPU_IS_6348())
67 mask = CKCTL_6348_ENET_EN;
68 else
69 /* BCMCPU_IS_6358 */
70 mask = CKCTL_6358_EMUSB_EN;
71 bcm_hwclock_set(mask, enable);
72}
73
74static struct clk clk_enet_misc = {
75 .set = enet_misc_set,
76};
77
78/*
79 * Ethernet MAC clocks: only revelant on 6358, silently enable misc
80 * clocks
81 */
82static void enetx_set(struct clk *clk, int enable)
83{
84 if (enable)
85 clk_enable_unlocked(&clk_enet_misc);
86 else
87 clk_disable_unlocked(&clk_enet_misc);
88
Florian Fainelli7b933422013-06-18 16:55:40 +000089 if (BCMCPU_IS_3368() || BCMCPU_IS_6358()) {
Maxime Bizone7300d02009-08-18 13:23:37 +010090 u32 mask;
91
92 if (clk->id == 0)
93 mask = CKCTL_6358_ENET0_EN;
94 else
95 mask = CKCTL_6358_ENET1_EN;
96 bcm_hwclock_set(mask, enable);
97 }
98}
99
100static struct clk clk_enet0 = {
101 .id = 0,
102 .set = enetx_set,
103};
104
105static struct clk clk_enet1 = {
106 .id = 1,
107 .set = enetx_set,
108};
109
110/*
111 * Ethernet PHY clock
112 */
113static void ephy_set(struct clk *clk, int enable)
114{
Florian Fainelli7b933422013-06-18 16:55:40 +0000115 if (BCMCPU_IS_3368() || BCMCPU_IS_6358())
116 bcm_hwclock_set(CKCTL_6358_EPHY_EN, enable);
Maxime Bizone7300d02009-08-18 13:23:37 +0100117}
118
119
120static struct clk clk_ephy = {
121 .set = ephy_set,
122};
123
124/*
Maxime Bizon04712f32011-11-04 19:09:35 +0100125 * Ethernet switch clock
126 */
127static void enetsw_set(struct clk *clk, int enable)
128{
Jonas Gorski1cd1c042013-04-22 10:57:06 +0000129 if (BCMCPU_IS_6328())
130 bcm_hwclock_set(CKCTL_6328_ROBOSW_EN, enable);
131 else if (BCMCPU_IS_6362())
132 bcm_hwclock_set(CKCTL_6362_ROBOSW_EN, enable);
133 else if (BCMCPU_IS_6368())
134 bcm_hwclock_set(CKCTL_6368_ROBOSW_EN |
135 CKCTL_6368_SWPKT_USB_EN |
136 CKCTL_6368_SWPKT_SAR_EN,
137 enable);
138 else
Maxime Bizon04712f32011-11-04 19:09:35 +0100139 return;
Jonas Gorski1cd1c042013-04-22 10:57:06 +0000140
Maxime Bizon04712f32011-11-04 19:09:35 +0100141 if (enable) {
Maxime Bizon04712f32011-11-04 19:09:35 +0100142 /* reset switch core afer clock change */
Jonas Gorskiba00e2e2012-10-28 12:17:55 +0000143 bcm63xx_core_set_reset(BCM63XX_RESET_ENETSW, 1);
Maxime Bizon04712f32011-11-04 19:09:35 +0100144 msleep(10);
Jonas Gorskiba00e2e2012-10-28 12:17:55 +0000145 bcm63xx_core_set_reset(BCM63XX_RESET_ENETSW, 0);
Maxime Bizon04712f32011-11-04 19:09:35 +0100146 msleep(10);
147 }
148}
149
150static struct clk clk_enetsw = {
151 .set = enetsw_set,
152};
153
154/*
Maxime Bizone7300d02009-08-18 13:23:37 +0100155 * PCM clock
156 */
157static void pcm_set(struct clk *clk, int enable)
158{
Florian Fainelli7b933422013-06-18 16:55:40 +0000159 if (BCMCPU_IS_3368())
160 bcm_hwclock_set(CKCTL_3368_PCM_EN, enable);
161 if (BCMCPU_IS_6358())
162 bcm_hwclock_set(CKCTL_6358_PCM_EN, enable);
Maxime Bizone7300d02009-08-18 13:23:37 +0100163}
164
165static struct clk clk_pcm = {
166 .set = pcm_set,
167};
168
169/*
170 * USB host clock
171 */
172static void usbh_set(struct clk *clk, int enable)
173{
Kevin Cernekeedd89d602012-06-23 04:14:51 +0000174 if (BCMCPU_IS_6328())
175 bcm_hwclock_set(CKCTL_6328_USBH_EN, enable);
176 else if (BCMCPU_IS_6348())
Maxime Bizon04712f32011-11-04 19:09:35 +0100177 bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
Jonas Gorski1cd1c042013-04-22 10:57:06 +0000178 else if (BCMCPU_IS_6362())
179 bcm_hwclock_set(CKCTL_6362_USBH_EN, enable);
Maxime Bizon04712f32011-11-04 19:09:35 +0100180 else if (BCMCPU_IS_6368())
Florian Fainellid9831a42012-07-04 16:57:09 +0200181 bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
Maxime Bizone7300d02009-08-18 13:23:37 +0100182}
183
184static struct clk clk_usbh = {
185 .set = usbh_set,
186};
187
188/*
Kevin Cernekeedd89d602012-06-23 04:14:51 +0000189 * USB device clock
190 */
191static void usbd_set(struct clk *clk, int enable)
192{
193 if (BCMCPU_IS_6328())
194 bcm_hwclock_set(CKCTL_6328_USBD_EN, enable);
Jonas Gorski1cd1c042013-04-22 10:57:06 +0000195 else if (BCMCPU_IS_6362())
196 bcm_hwclock_set(CKCTL_6362_USBD_EN, enable);
Kevin Cernekeedd89d602012-06-23 04:14:51 +0000197 else if (BCMCPU_IS_6368())
198 bcm_hwclock_set(CKCTL_6368_USBD_EN, enable);
199}
200
201static struct clk clk_usbd = {
202 .set = usbd_set,
203};
204
205/*
Maxime Bizone7300d02009-08-18 13:23:37 +0100206 * SPI clock
207 */
208static void spi_set(struct clk *clk, int enable)
209{
210 u32 mask;
211
212 if (BCMCPU_IS_6338())
213 mask = CKCTL_6338_SPI_EN;
214 else if (BCMCPU_IS_6348())
215 mask = CKCTL_6348_SPI_EN;
Florian Fainelli7b933422013-06-18 16:55:40 +0000216 else if (BCMCPU_IS_3368() || BCMCPU_IS_6358())
Maxime Bizone7300d02009-08-18 13:23:37 +0100217 mask = CKCTL_6358_SPI_EN;
Jonas Gorski08a41d12013-03-21 14:03:18 +0000218 else if (BCMCPU_IS_6362())
219 mask = CKCTL_6362_SPI_EN;
Florian Fainelli19372b22012-07-04 16:58:30 +0200220 else
221 /* BCMCPU_IS_6368 */
222 mask = CKCTL_6368_SPI_EN;
Maxime Bizone7300d02009-08-18 13:23:37 +0100223 bcm_hwclock_set(mask, enable);
224}
225
226static struct clk clk_spi = {
227 .set = spi_set,
228};
229
230/*
Jonas Gorski0ebe8aa2013-11-30 12:42:02 +0100231 * HSSPI clock
232 */
233static void hsspi_set(struct clk *clk, int enable)
234{
235 u32 mask;
236
237 if (BCMCPU_IS_6328())
238 mask = CKCTL_6328_HSSPI_EN;
239 else if (BCMCPU_IS_6362())
240 mask = CKCTL_6362_HSSPI_EN;
241 else
242 return;
243
244 bcm_hwclock_set(mask, enable);
245}
246
247static struct clk clk_hsspi = {
248 .set = hsspi_set,
249};
250
Jonas Gorski5d691032017-09-20 13:14:06 +0200251/*
252 * HSSPI PLL
253 */
254static struct clk clk_hsspi_pll;
Jonas Gorski0ebe8aa2013-11-30 12:42:02 +0100255
256/*
Maxime Bizon04712f32011-11-04 19:09:35 +0100257 * XTM clock
258 */
259static void xtm_set(struct clk *clk, int enable)
260{
261 if (!BCMCPU_IS_6368())
262 return;
263
Florian Fainellid9831a42012-07-04 16:57:09 +0200264 bcm_hwclock_set(CKCTL_6368_SAR_EN |
Maxime Bizon04712f32011-11-04 19:09:35 +0100265 CKCTL_6368_SWPKT_SAR_EN, enable);
266
267 if (enable) {
Maxime Bizon04712f32011-11-04 19:09:35 +0100268 /* reset sar core afer clock change */
Jonas Gorskiba00e2e2012-10-28 12:17:55 +0000269 bcm63xx_core_set_reset(BCM63XX_RESET_SAR, 1);
Maxime Bizon04712f32011-11-04 19:09:35 +0100270 mdelay(1);
Jonas Gorskiba00e2e2012-10-28 12:17:55 +0000271 bcm63xx_core_set_reset(BCM63XX_RESET_SAR, 0);
Maxime Bizon04712f32011-11-04 19:09:35 +0100272 mdelay(1);
273 }
274}
275
276
277static struct clk clk_xtm = {
278 .set = xtm_set,
279};
280
281/*
Florian Fainelli0b555612012-07-24 16:33:09 +0200282 * IPsec clock
283 */
284static void ipsec_set(struct clk *clk, int enable)
285{
Jonas Gorski1cd1c042013-04-22 10:57:06 +0000286 if (BCMCPU_IS_6362())
287 bcm_hwclock_set(CKCTL_6362_IPSEC_EN, enable);
288 else if (BCMCPU_IS_6368())
289 bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable);
Florian Fainelli0b555612012-07-24 16:33:09 +0200290}
291
292static struct clk clk_ipsec = {
293 .set = ipsec_set,
294};
295
296/*
Jonas Gorskif2d10352012-10-28 11:49:53 +0000297 * PCIe clock
298 */
299
300static void pcie_set(struct clk *clk, int enable)
301{
Jonas Gorski1cd1c042013-04-22 10:57:06 +0000302 if (BCMCPU_IS_6328())
303 bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable);
304 else if (BCMCPU_IS_6362())
305 bcm_hwclock_set(CKCTL_6362_PCIE_EN, enable);
Jonas Gorskif2d10352012-10-28 11:49:53 +0000306}
307
308static struct clk clk_pcie = {
309 .set = pcie_set,
310};
311
312/*
Maxime Bizone7300d02009-08-18 13:23:37 +0100313 * Internal peripheral clock
314 */
315static struct clk clk_periph = {
316 .rate = (50 * 1000 * 1000),
317};
318
319
320/*
321 * Linux clock API implementation
322 */
323int clk_enable(struct clk *clk)
324{
325 mutex_lock(&clocks_mutex);
326 clk_enable_unlocked(clk);
327 mutex_unlock(&clocks_mutex);
328 return 0;
329}
330
331EXPORT_SYMBOL(clk_enable);
332
333void clk_disable(struct clk *clk)
334{
Masahiro Yamada00ca0252016-09-19 03:04:35 +0900335 if (!clk)
336 return;
337
Maxime Bizone7300d02009-08-18 13:23:37 +0100338 mutex_lock(&clocks_mutex);
339 clk_disable_unlocked(clk);
340 mutex_unlock(&clocks_mutex);
341}
342
343EXPORT_SYMBOL(clk_disable);
344
345unsigned long clk_get_rate(struct clk *clk)
346{
Jonas Gorski1b495fa2017-07-18 12:17:27 +0200347 if (!clk)
348 return 0;
349
Maxime Bizone7300d02009-08-18 13:23:37 +0100350 return clk->rate;
351}
352
353EXPORT_SYMBOL(clk_get_rate);
354
Markos Chandras7aa2d052013-07-02 09:13:44 +0000355int clk_set_rate(struct clk *clk, unsigned long rate)
356{
357 return 0;
358}
359EXPORT_SYMBOL_GPL(clk_set_rate);
360
361long clk_round_rate(struct clk *clk, unsigned long rate)
362{
363 return 0;
364}
365EXPORT_SYMBOL_GPL(clk_round_rate);
366
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200367static struct clk_lookup bcm3368_clks[] = {
368 /* fixed rate clocks */
369 CLKDEV_INIT(NULL, "periph", &clk_periph),
Jonas Gorski243fa272017-09-20 13:14:02 +0200370 CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
371 CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200372 /* gated clocks */
373 CLKDEV_INIT(NULL, "enet0", &clk_enet0),
374 CLKDEV_INIT(NULL, "enet1", &clk_enet1),
375 CLKDEV_INIT(NULL, "ephy", &clk_ephy),
376 CLKDEV_INIT(NULL, "usbh", &clk_usbh),
377 CLKDEV_INIT(NULL, "usbd", &clk_usbd),
378 CLKDEV_INIT(NULL, "spi", &clk_spi),
379 CLKDEV_INIT(NULL, "pcm", &clk_pcm),
380};
Maxime Bizone7300d02009-08-18 13:23:37 +0100381
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200382static struct clk_lookup bcm6328_clks[] = {
383 /* fixed rate clocks */
384 CLKDEV_INIT(NULL, "periph", &clk_periph),
Jonas Gorski243fa272017-09-20 13:14:02 +0200385 CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
386 CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
Jonas Gorski5d691032017-09-20 13:14:06 +0200387 CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll),
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200388 /* gated clocks */
389 CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
390 CLKDEV_INIT(NULL, "usbh", &clk_usbh),
391 CLKDEV_INIT(NULL, "usbd", &clk_usbd),
392 CLKDEV_INIT(NULL, "hsspi", &clk_hsspi),
393 CLKDEV_INIT(NULL, "pcie", &clk_pcie),
394};
Maxime Bizone7300d02009-08-18 13:23:37 +0100395
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200396static struct clk_lookup bcm6338_clks[] = {
397 /* fixed rate clocks */
398 CLKDEV_INIT(NULL, "periph", &clk_periph),
Jonas Gorski243fa272017-09-20 13:14:02 +0200399 CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200400 /* gated clocks */
401 CLKDEV_INIT(NULL, "enet0", &clk_enet0),
402 CLKDEV_INIT(NULL, "enet1", &clk_enet1),
403 CLKDEV_INIT(NULL, "ephy", &clk_ephy),
404 CLKDEV_INIT(NULL, "usbh", &clk_usbh),
405 CLKDEV_INIT(NULL, "usbd", &clk_usbd),
406 CLKDEV_INIT(NULL, "spi", &clk_spi),
407};
Maxime Bizone7300d02009-08-18 13:23:37 +0100408
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200409static struct clk_lookup bcm6345_clks[] = {
410 /* fixed rate clocks */
411 CLKDEV_INIT(NULL, "periph", &clk_periph),
Jonas Gorski243fa272017-09-20 13:14:02 +0200412 CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200413 /* gated clocks */
414 CLKDEV_INIT(NULL, "enet0", &clk_enet0),
415 CLKDEV_INIT(NULL, "enet1", &clk_enet1),
416 CLKDEV_INIT(NULL, "ephy", &clk_ephy),
417 CLKDEV_INIT(NULL, "usbh", &clk_usbh),
418 CLKDEV_INIT(NULL, "usbd", &clk_usbd),
419 CLKDEV_INIT(NULL, "spi", &clk_spi),
420};
421
422static struct clk_lookup bcm6348_clks[] = {
423 /* fixed rate clocks */
424 CLKDEV_INIT(NULL, "periph", &clk_periph),
Jonas Gorski243fa272017-09-20 13:14:02 +0200425 CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200426 /* gated clocks */
427 CLKDEV_INIT(NULL, "enet0", &clk_enet0),
428 CLKDEV_INIT(NULL, "enet1", &clk_enet1),
429 CLKDEV_INIT(NULL, "ephy", &clk_ephy),
430 CLKDEV_INIT(NULL, "usbh", &clk_usbh),
431 CLKDEV_INIT(NULL, "usbd", &clk_usbd),
432 CLKDEV_INIT(NULL, "spi", &clk_spi),
433};
434
435static struct clk_lookup bcm6358_clks[] = {
436 /* fixed rate clocks */
437 CLKDEV_INIT(NULL, "periph", &clk_periph),
Jonas Gorski243fa272017-09-20 13:14:02 +0200438 CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
439 CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200440 /* gated clocks */
441 CLKDEV_INIT(NULL, "enet0", &clk_enet0),
442 CLKDEV_INIT(NULL, "enet1", &clk_enet1),
443 CLKDEV_INIT(NULL, "ephy", &clk_ephy),
444 CLKDEV_INIT(NULL, "usbh", &clk_usbh),
445 CLKDEV_INIT(NULL, "usbd", &clk_usbd),
446 CLKDEV_INIT(NULL, "spi", &clk_spi),
447 CLKDEV_INIT(NULL, "pcm", &clk_pcm),
448};
449
450static struct clk_lookup bcm6362_clks[] = {
451 /* fixed rate clocks */
452 CLKDEV_INIT(NULL, "periph", &clk_periph),
Jonas Gorski243fa272017-09-20 13:14:02 +0200453 CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
454 CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
Jonas Gorski5d691032017-09-20 13:14:06 +0200455 CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll),
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200456 /* gated clocks */
457 CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
458 CLKDEV_INIT(NULL, "usbh", &clk_usbh),
459 CLKDEV_INIT(NULL, "usbd", &clk_usbd),
460 CLKDEV_INIT(NULL, "spi", &clk_spi),
461 CLKDEV_INIT(NULL, "hsspi", &clk_hsspi),
462 CLKDEV_INIT(NULL, "pcie", &clk_pcie),
463 CLKDEV_INIT(NULL, "ipsec", &clk_ipsec),
464};
465
466static struct clk_lookup bcm6368_clks[] = {
467 /* fixed rate clocks */
468 CLKDEV_INIT(NULL, "periph", &clk_periph),
Jonas Gorski243fa272017-09-20 13:14:02 +0200469 CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
470 CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200471 /* gated clocks */
472 CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
473 CLKDEV_INIT(NULL, "usbh", &clk_usbh),
474 CLKDEV_INIT(NULL, "usbd", &clk_usbd),
475 CLKDEV_INIT(NULL, "spi", &clk_spi),
476 CLKDEV_INIT(NULL, "xtm", &clk_xtm),
477 CLKDEV_INIT(NULL, "ipsec", &clk_ipsec),
478};
Jonas Gorski26b8c072013-11-30 12:42:03 +0100479
480#define HSSPI_PLL_HZ_6328 133333333
481#define HSSPI_PLL_HZ_6362 400000000
482
483static int __init bcm63xx_clk_init(void)
484{
485 switch (bcm63xx_get_cpu_id()) {
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200486 case BCM3368_CPU_ID:
487 clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks));
488 break;
Jonas Gorski26b8c072013-11-30 12:42:03 +0100489 case BCM6328_CPU_ID:
Jonas Gorski5d691032017-09-20 13:14:06 +0200490 clk_hsspi_pll.rate = HSSPI_PLL_HZ_6328;
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200491 clkdev_add_table(bcm6328_clks, ARRAY_SIZE(bcm6328_clks));
492 break;
493 case BCM6338_CPU_ID:
494 clkdev_add_table(bcm6338_clks, ARRAY_SIZE(bcm6338_clks));
495 break;
496 case BCM6345_CPU_ID:
497 clkdev_add_table(bcm6345_clks, ARRAY_SIZE(bcm6345_clks));
498 break;
499 case BCM6348_CPU_ID:
500 clkdev_add_table(bcm6348_clks, ARRAY_SIZE(bcm6348_clks));
501 break;
502 case BCM6358_CPU_ID:
503 clkdev_add_table(bcm6358_clks, ARRAY_SIZE(bcm6358_clks));
Jonas Gorski26b8c072013-11-30 12:42:03 +0100504 break;
505 case BCM6362_CPU_ID:
Jonas Gorski5d691032017-09-20 13:14:06 +0200506 clk_hsspi_pll.rate = HSSPI_PLL_HZ_6362;
Jonas Gorskic5af3c22017-09-20 13:14:01 +0200507 clkdev_add_table(bcm6362_clks, ARRAY_SIZE(bcm6362_clks));
508 break;
509 case BCM6368_CPU_ID:
510 clkdev_add_table(bcm6368_clks, ARRAY_SIZE(bcm6368_clks));
Jonas Gorski26b8c072013-11-30 12:42:03 +0100511 break;
512 }
513
514 return 0;
515}
516arch_initcall(bcm63xx_clk_init);