21 #include <linux/kernel.h>
22 #include <linux/module.h>
23 #include <linux/list.h>
37 #define RST_DEVICES 0x004
38 #define RST_DEVICES_SET 0x300
39 #define RST_DEVICES_CLR 0x304
40 #define RST_DEVICES_NUM 3
42 #define CLK_OUT_ENB 0x010
43 #define CLK_OUT_ENB_SET 0x320
44 #define CLK_OUT_ENB_CLR 0x324
45 #define CLK_OUT_ENB_NUM 3
47 #define CLK_MASK_ARM 0x44
48 #define MISC_CLK_ENB 0x48
51 #define OSC_CTRL_OSC_FREQ_MASK (3<<30)
52 #define OSC_CTRL_OSC_FREQ_13MHZ (0<<30)
53 #define OSC_CTRL_OSC_FREQ_19_2MHZ (1<<30)
54 #define OSC_CTRL_OSC_FREQ_12MHZ (2<<30)
55 #define OSC_CTRL_OSC_FREQ_26MHZ (3<<30)
56 #define OSC_CTRL_MASK (0x3f2 | OSC_CTRL_OSC_FREQ_MASK)
58 #define OSC_FREQ_DET 0x58
59 #define OSC_FREQ_DET_TRIG (1<<31)
61 #define OSC_FREQ_DET_STATUS 0x5C
62 #define OSC_FREQ_DET_BUSY (1<<31)
63 #define OSC_FREQ_DET_CNT_MASK 0xFFFF
65 #define PERIPH_CLK_SOURCE_I2S1 0x100
66 #define PERIPH_CLK_SOURCE_EMC 0x19c
67 #define PERIPH_CLK_SOURCE_OSC 0x1fc
68 #define PERIPH_CLK_SOURCE_NUM \
69 ((PERIPH_CLK_SOURCE_OSC - PERIPH_CLK_SOURCE_I2S1) / 4)
71 #define PERIPH_CLK_SOURCE_MASK (3<<30)
72 #define PERIPH_CLK_SOURCE_SHIFT 30
73 #define PERIPH_CLK_SOURCE_PWM_MASK (7<<28)
74 #define PERIPH_CLK_SOURCE_PWM_SHIFT 28
75 #define PERIPH_CLK_SOURCE_ENABLE (1<<28)
76 #define PERIPH_CLK_SOURCE_DIVU71_MASK 0xFF
77 #define PERIPH_CLK_SOURCE_DIVU16_MASK 0xFFFF
78 #define PERIPH_CLK_SOURCE_DIV_SHIFT 0
80 #define SDMMC_CLK_INT_FB_SEL (1 << 23)
81 #define SDMMC_CLK_INT_FB_DLY_SHIFT 16
82 #define SDMMC_CLK_INT_FB_DLY_MASK (0xF << SDMMC_CLK_INT_FB_DLY_SHIFT)
85 #define PLL_BASE_BYPASS (1<<31)
86 #define PLL_BASE_ENABLE (1<<30)
87 #define PLL_BASE_REF_ENABLE (1<<29)
88 #define PLL_BASE_OVERRIDE (1<<28)
89 #define PLL_BASE_DIVP_MASK (0x7<<20)
90 #define PLL_BASE_DIVP_SHIFT 20
91 #define PLL_BASE_DIVN_MASK (0x3FF<<8)
92 #define PLL_BASE_DIVN_SHIFT 8
93 #define PLL_BASE_DIVM_MASK (0x1F)
94 #define PLL_BASE_DIVM_SHIFT 0
96 #define PLL_OUT_RATIO_MASK (0xFF<<8)
97 #define PLL_OUT_RATIO_SHIFT 8
98 #define PLL_OUT_OVERRIDE (1<<2)
99 #define PLL_OUT_CLKEN (1<<1)
100 #define PLL_OUT_RESET_DISABLE (1<<0)
102 #define PLL_MISC(c) (((c)->flags & PLL_ALT_MISC_REG) ? 0x4 : 0xc)
104 #define PLL_MISC_DCCON_SHIFT 20
105 #define PLL_MISC_CPCON_SHIFT 8
106 #define PLL_MISC_CPCON_MASK (0xF<<PLL_MISC_CPCON_SHIFT)
107 #define PLL_MISC_LFCON_SHIFT 4
108 #define PLL_MISC_LFCON_MASK (0xF<<PLL_MISC_LFCON_SHIFT)
109 #define PLL_MISC_VCOCON_SHIFT 0
110 #define PLL_MISC_VCOCON_MASK (0xF<<PLL_MISC_VCOCON_SHIFT)
112 #define PLLU_BASE_POST_DIV (1<<20)
114 #define PLLD_MISC_CLKENABLE (1<<30)
115 #define PLLD_MISC_DIV_RST (1<<23)
116 #define PLLD_MISC_DCCON_SHIFT 12
118 #define PLLE_MISC_READY (1 << 15)
120 #define PERIPH_CLK_TO_ENB_REG(c) ((c->u.periph.clk_num / 32) * 4)
121 #define PERIPH_CLK_TO_ENB_SET_REG(c) ((c->u.periph.clk_num / 32) * 8)
122 #define PERIPH_CLK_TO_ENB_BIT(c) (1 << (c->u.periph.clk_num % 32))
124 #define SUPER_CLK_MUX 0x00
125 #define SUPER_STATE_SHIFT 28
126 #define SUPER_STATE_MASK (0xF << SUPER_STATE_SHIFT)
127 #define SUPER_STATE_STANDBY (0x0 << SUPER_STATE_SHIFT)
128 #define SUPER_STATE_IDLE (0x1 << SUPER_STATE_SHIFT)
129 #define SUPER_STATE_RUN (0x2 << SUPER_STATE_SHIFT)
130 #define SUPER_STATE_IRQ (0x3 << SUPER_STATE_SHIFT)
131 #define SUPER_STATE_FIQ (0x4 << SUPER_STATE_SHIFT)
132 #define SUPER_SOURCE_MASK 0xF
133 #define SUPER_FIQ_SOURCE_SHIFT 12
134 #define SUPER_IRQ_SOURCE_SHIFT 8
135 #define SUPER_RUN_SOURCE_SHIFT 4
136 #define SUPER_IDLE_SOURCE_SHIFT 0
138 #define SUPER_CLK_DIVIDER 0x04
140 #define BUS_CLK_DISABLE (1<<3)
141 #define BUS_CLK_DIV_MASK 0x3
144 #define PMC_CTRL_BLINK_ENB (1 << 7)
146 #define PMC_DPD_PADS_ORIDE 0x1c
147 #define PMC_DPD_PADS_ORIDE_BLINK_ENB (1 << 20)
149 #define PMC_BLINK_TIMER_DATA_ON_SHIFT 0
150 #define PMC_BLINK_TIMER_DATA_ON_MASK 0x7fff
151 #define PMC_BLINK_TIMER_ENB (1 << 15)
152 #define PMC_BLINK_TIMER_DATA_OFF_SHIFT 16
153 #define PMC_BLINK_TIMER_DATA_OFF_MASK 0xffff
156 #define TEGRA_CLK_RST_CONTROLLER_CLK_CPU_CMPLX 0x4c
157 #define TEGRA_CLK_RST_CONTROLLER_RST_CPU_CMPLX_SET 0x340
158 #define TEGRA_CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR 0x344
160 #define CPU_CLOCK(cpu) (0x1 << (8 + cpu))
161 #define CPU_RESET(cpu) (0x1111ul << (cpu))
177 static int tegra_periph_clk_enable_refcount[3 * 32];
179 #define clk_writel(value, reg) \
180 __raw_writel(value, reg_clk_base + (reg))
181 #define clk_readl(reg) \
182 __raw_readl(reg_clk_base + (reg))
183 #define pmc_writel(value, reg) \
184 __raw_writel(value, reg_pmc_base + (reg))
185 #define pmc_readl(reg) \
186 __raw_readl(reg_pmc_base + (reg))
188 static unsigned long clk_measure_input_freq(
void)
190 u32 clock_autodetect;
194 if (clock_autodetect >= 732 - 3 && clock_autodetect <= 732 + 3) {
196 }
else if (clock_autodetect >= 794 - 3 && clock_autodetect <= 794 + 3) {
198 }
else if (clock_autodetect >= 1172 - 3 && clock_autodetect <= 1172 + 3) {
200 }
else if (clock_autodetect >= 1587 - 3 && clock_autodetect <= 1587 + 3) {
203 pr_err(
"%s: Unexpected clock autodetect value %d",
204 __func__, clock_autodetect);
210 static int clk_div71_get_divider(
unsigned long parent_rate,
unsigned long rate)
212 s64 divider_u71 = parent_rate * 2;
213 divider_u71 += rate - 1;
214 do_div(divider_u71, rate);
216 if (divider_u71 - 2 < 0)
219 if (divider_u71 - 2 > 255)
222 return divider_u71 - 2;
225 static int clk_div16_get_divider(
unsigned long parent_rate,
unsigned long rate)
229 divider_u16 = parent_rate;
230 divider_u16 += rate - 1;
231 do_div(divider_u16, rate);
233 if (divider_u16 - 1 < 0)
236 if (divider_u16 - 1 > 0xFFFF)
239 return divider_u16 - 1;
242 static unsigned long tegra_clk_fixed_recalc_rate(
struct clk_hw *
hw,
243 unsigned long parent_rate)
249 .recalc_rate = tegra_clk_fixed_recalc_rate,
253 static unsigned long tegra20_clk_m_recalc_rate(
struct clk_hw *
hw,
257 to_clk_tegra(hw)->fixed_rate = clk_measure_input_freq();
261 static void tegra20_clk_m_init(
struct clk_hw *hw)
287 .init = tegra20_clk_m_init,
288 .recalc_rate = tegra20_clk_m_recalc_rate,
297 static int tegra20_super_clk_is_enabled(
struct clk_hw *hw)
309 static int tegra20_super_clk_enable(
struct clk_hw *hw)
316 static void tegra20_super_clk_disable(
struct clk_hw *hw)
324 static u8 tegra20_super_clk_get_parent(
struct clk_hw *hw)
339 static int tegra20_super_clk_set_parent(
struct clk_hw *hw,
u8 index)
350 val |= index << shift;
358 static unsigned long tegra20_super_clk_recalc_rate(
struct clk_hw *hw,
364 static long tegra20_super_clk_round_rate(
struct clk_hw *hw,
unsigned long rate,
365 unsigned long *prate)
370 static int tegra20_super_clk_set_rate(
struct clk_hw *hw,
unsigned long rate,
371 unsigned long parent_rate)
377 .is_enabled = tegra20_super_clk_is_enabled,
378 .enable = tegra20_super_clk_enable,
379 .disable = tegra20_super_clk_disable,
380 .set_parent = tegra20_super_clk_set_parent,
381 .get_parent = tegra20_super_clk_get_parent,
382 .set_rate = tegra20_super_clk_set_rate,
383 .round_rate = tegra20_super_clk_round_rate,
384 .recalc_rate = tegra20_super_clk_recalc_rate,
387 static unsigned long tegra20_twd_clk_recalc_rate(
struct clk_hw *hw,
388 unsigned long parent_rate)
391 u64 rate = parent_rate;
393 if (c->
mul != 0 && c->
div != 0) {
403 .recalc_rate = tegra20_twd_clk_recalc_rate,
406 static u8 tegra20_cop_clk_get_parent(
struct clk_hw *hw)
412 .get_parent = tegra20_cop_clk_get_parent,
421 pr_debug(
"%s %s\n", __func__, assert ?
"assert" :
"deassert");
426 static int tegra20_bus_clk_is_enabled(
struct clk_hw *hw)
435 static int tegra20_bus_clk_enable(
struct clk_hw *hw)
447 spin_unlock_irqrestore(&clock_register_lock, flags);
452 static void tegra20_bus_clk_disable(
struct clk_hw *hw)
464 spin_unlock_irqrestore(&clock_register_lock, flags);
467 static unsigned long tegra20_bus_clk_recalc_rate(
struct clk_hw *hw,
477 if (c->
mul != 0 && c->
div != 0) {
485 static int tegra20_bus_clk_set_rate(
struct clk_hw *hw,
unsigned long rate,
486 unsigned long parent_rate)
497 for (i = 1; i <= 4; i++) {
498 if (rate == parent_rate / i) {
509 spin_unlock_irqrestore(&clock_register_lock, flags);
514 static long tegra20_bus_clk_round_rate(
struct clk_hw *hw,
unsigned long rate,
515 unsigned long *prate)
517 unsigned long parent_rate = *
prate;
520 if (rate >= parent_rate)
523 divider = parent_rate;
532 do_div(parent_rate, divider);
538 .is_enabled = tegra20_bus_clk_is_enabled,
539 .enable = tegra20_bus_clk_enable,
540 .disable = tegra20_bus_clk_disable,
541 .set_rate = tegra20_bus_clk_set_rate,
542 .round_rate = tegra20_bus_clk_round_rate,
543 .recalc_rate = tegra20_bus_clk_recalc_rate,
547 static int tegra20_blink_clk_is_enabled(
struct clk_hw *hw)
557 static unsigned long tegra20_blink_clk_recalc_rate(
struct clk_hw *hw,
581 if (c->
mul != 0 && c->
div != 0) {
589 static int tegra20_blink_clk_enable(
struct clk_hw *hw)
602 static void tegra20_blink_clk_disable(
struct clk_hw *hw)
613 static int tegra20_blink_clk_set_rate(
struct clk_hw *hw,
unsigned long rate,
614 unsigned long parent_rate)
618 if (rate >= parent_rate) {
640 static long tegra20_blink_clk_round_rate(
struct clk_hw *hw,
unsigned long rate,
641 unsigned long *prate)
645 long round_rate = *
prate;
649 if (rate >= *prate) {
657 round_rate += div - 1;
664 .is_enabled = tegra20_blink_clk_is_enabled,
665 .enable = tegra20_blink_clk_enable,
666 .disable = tegra20_blink_clk_disable,
667 .set_rate = tegra20_blink_clk_set_rate,
668 .round_rate = tegra20_blink_clk_round_rate,
669 .recalc_rate = tegra20_blink_clk_recalc_rate,
673 static int tegra20_pll_clk_wait_for_lock(
struct clk_tegra *c)
679 static int tegra20_pll_clk_is_enabled(
struct clk_hw *hw)
688 static unsigned long tegra20_pll_clk_recalc_rate(
struct clk_hw *hw,
701 c->
div = sel->
m * sel->
p;
705 pr_err(
"Clock %s has unknown fixed frequency\n",
720 if (c->
mul != 0 && c->
div != 0) {
728 static int tegra20_pll_clk_enable(
struct clk_hw *hw)
735 val &= ~PLL_BASE_BYPASS;
739 tegra20_pll_clk_wait_for_lock(c);
744 static void tegra20_pll_clk_disable(
struct clk_hw *hw)
755 static int tegra20_pll_clk_set_rate(
struct clk_hw *hw,
unsigned long rate,
756 unsigned long parent_rate)
759 unsigned long input_rate = parent_rate;
767 if (rate != c->
u.
pll.fixed_rate) {
768 pr_err(
"%s: Can not change %s fixed rate %lu to %lu\n",
770 c->
u.
pll.fixed_rate, rate);
779 c->
div = sel->
m * sel->
p;
806 tegra20_pll_clk_enable(hw);
813 static long tegra20_pll_clk_round_rate(
struct clk_hw *hw,
unsigned long rate,
814 unsigned long *prate)
818 unsigned long input_rate = *
prate;
824 return c->
u.
pll.fixed_rate;
829 div = sel->
m * sel->
p;
837 output_rate += div - 1;
844 .is_enabled = tegra20_pll_clk_is_enabled,
845 .enable = tegra20_pll_clk_enable,
846 .disable = tegra20_pll_clk_disable,
847 .set_rate = tegra20_pll_clk_set_rate,
848 .recalc_rate = tegra20_pll_clk_recalc_rate,
849 .round_rate = tegra20_pll_clk_round_rate,
852 static void tegra20_pllx_clk_init(
struct clk_hw *hw)
861 .init = tegra20_pllx_clk_init,
862 .is_enabled = tegra20_pll_clk_is_enabled,
863 .enable = tegra20_pll_clk_enable,
864 .disable = tegra20_pll_clk_disable,
865 .set_rate = tegra20_pll_clk_set_rate,
866 .recalc_rate = tegra20_pll_clk_recalc_rate,
867 .round_rate = tegra20_pll_clk_round_rate,
870 static int tegra20_plle_clk_enable(
struct clk_hw *hw)
891 .is_enabled = tegra20_pll_clk_is_enabled,
892 .enable = tegra20_plle_clk_enable,
893 .set_rate = tegra20_pll_clk_set_rate,
894 .recalc_rate = tegra20_pll_clk_recalc_rate,
895 .round_rate = tegra20_pll_clk_round_rate,
899 static int tegra20_pll_div_clk_is_enabled(
struct clk_hw *hw)
911 static unsigned long tegra20_pll_div_clk_recalc_rate(
struct clk_hw *hw,
923 c->
div = (divu71 + 2);
940 static int tegra20_pll_div_clk_enable(
struct clk_hw *hw)
960 spin_unlock_irqrestore(&clock_register_lock, flags);
968 spin_unlock_irqrestore(&clock_register_lock, flags);
974 static void tegra20_pll_div_clk_disable(
struct clk_hw *hw)
994 spin_unlock_irqrestore(&clock_register_lock, flags);
1001 spin_unlock_irqrestore(&clock_register_lock, flags);
1005 static int tegra20_pll_div_clk_set_rate(
struct clk_hw *hw,
unsigned long rate,
1006 unsigned long parent_rate)
1009 unsigned long flags;
1017 divider_u71 = clk_div71_get_divider(parent_rate, rate);
1018 if (divider_u71 >= 0) {
1031 c->
div = divider_u71 + 2;
1033 spin_unlock_irqrestore(&clock_register_lock, flags);
1037 if (parent_rate == rate * 2)
1043 static long tegra20_pll_div_clk_round_rate(
struct clk_hw *hw,
unsigned long rate,
1044 unsigned long *prate)
1047 unsigned long parent_rate = *
prate;
1053 divider = clk_div71_get_divider(parent_rate, rate);
1064 .is_enabled = tegra20_pll_div_clk_is_enabled,
1065 .enable = tegra20_pll_div_clk_enable,
1066 .disable = tegra20_pll_div_clk_disable,
1067 .set_rate = tegra20_pll_div_clk_set_rate,
1068 .round_rate = tegra20_pll_div_clk_round_rate,
1069 .recalc_rate = tegra20_pll_div_clk_recalc_rate,
1074 static int tegra20_periph_clk_is_enabled(
struct clk_hw *hw)
1096 static int tegra20_periph_clk_enable(
struct clk_hw *hw)
1099 unsigned long flags;
1107 tegra_periph_clk_enable_refcount[c->
u.
periph.clk_num]++;
1108 if (tegra_periph_clk_enable_refcount[c->
u.
periph.clk_num] > 1)
1126 spin_unlock_irqrestore(&clock_register_lock, flags);
1131 static void tegra20_periph_clk_disable(
struct clk_hw *hw)
1134 unsigned long flags;
1141 tegra_periph_clk_enable_refcount[c->
u.
periph.clk_num]--;
1143 if (tegra_periph_clk_enable_refcount[c->
u.
periph.clk_num] > 0)
1151 spin_unlock_irqrestore(&clock_register_lock, flags);
1159 pr_debug(
"%s %s on clock %s\n", __func__,
1169 static int tegra20_periph_clk_set_parent(
struct clk_hw *hw,
u8 index)
1188 val |= (
index) << shift;
1195 static u8 tegra20_periph_clk_get_parent(
struct clk_hw *hw)
1211 return (val & mask) >> shift;
1216 static unsigned long tegra20_periph_clk_recalc_rate(
struct clk_hw *hw,
1217 unsigned long prate)
1220 unsigned long rate =
prate;
1225 c->
div = divu71 + 2;
1229 c->
div = divu16 + 1;
1237 if (c->
mul != 0 && c->
div != 0) {
1246 static int tegra20_periph_clk_set_rate(
struct clk_hw *hw,
unsigned long rate,
1247 unsigned long parent_rate)
1256 divider = clk_div71_get_divider(parent_rate, rate);
1263 c->
div = divider + 2;
1268 divider = clk_div16_get_divider(parent_rate, rate);
1274 c->
div = divider + 1;
1278 }
else if (parent_rate <= rate) {
1287 static long tegra20_periph_clk_round_rate(
struct clk_hw *hw,
1288 unsigned long rate,
unsigned long *prate)
1297 parent_rate = *
prate;
1300 divider = clk_div71_get_divider(parent_rate, rate);
1306 divider = clk_div16_get_divider(parent_rate, rate);
1315 .is_enabled = tegra20_periph_clk_is_enabled,
1316 .enable = tegra20_periph_clk_enable,
1317 .disable = tegra20_periph_clk_disable,
1318 .set_parent = tegra20_periph_clk_set_parent,
1319 .get_parent = tegra20_periph_clk_get_parent,
1320 .set_rate = tegra20_periph_clk_set_rate,
1321 .round_rate = tegra20_periph_clk_round_rate,
1322 .recalc_rate = tegra20_periph_clk_recalc_rate,
1326 static void tegra20_emc_clk_init(
struct clk_hw *hw)
1332 static long tegra20_emc_clk_round_rate(
struct clk_hw *hw,
unsigned long rate,
1333 unsigned long *prate)
1351 clk_rate = tegra20_periph_clk_round_rate(hw, emc_rate,
NULL);
1361 "emc_rate %ld != clk_rate %ld",
1362 emc_rate, clk_rate);
1367 static int tegra20_emc_clk_set_rate(
struct clk_hw *hw,
unsigned long rate,
1368 unsigned long parent_rate)
1382 ret = tegra20_periph_clk_set_rate(hw, rate, parent_rate);
1389 .init = tegra20_emc_clk_init,
1390 .is_enabled = tegra20_periph_clk_is_enabled,
1391 .enable = tegra20_periph_clk_enable,
1392 .disable = tegra20_periph_clk_disable,
1393 .set_parent = tegra20_periph_clk_set_parent,
1394 .get_parent = tegra20_periph_clk_get_parent,
1395 .set_rate = tegra20_emc_clk_set_rate,
1396 .round_rate = tegra20_emc_clk_round_rate,
1397 .recalc_rate = tegra20_periph_clk_recalc_rate,
1401 static int tegra20_clk_double_is_enabled(
struct clk_hw *hw)
1418 static unsigned long tegra20_clk_double_recalc_rate(
struct clk_hw *hw,
1419 unsigned long prate)
1434 static long tegra20_clk_double_round_rate(
struct clk_hw *hw,
unsigned long rate,
1435 unsigned long *prate)
1437 unsigned long output_rate = *
prate;
1443 static int tegra20_clk_double_set_rate(
struct clk_hw *hw,
unsigned long rate,
1444 unsigned long parent_rate)
1446 if (rate != 2 * parent_rate)
1452 .is_enabled = tegra20_clk_double_is_enabled,
1453 .enable = tegra20_periph_clk_enable,
1454 .disable = tegra20_periph_clk_disable,
1455 .set_rate = tegra20_clk_double_set_rate,
1456 .recalc_rate = tegra20_clk_double_recalc_rate,
1457 .round_rate = tegra20_clk_double_round_rate,
1461 static int tegra20_audio_sync_clk_is_enabled(
struct clk_hw *hw)
1470 static int tegra20_audio_sync_clk_enable(
struct clk_hw *hw)
1478 static void tegra20_audio_sync_clk_disable(
struct clk_hw *hw)
1484 static u8 tegra20_audio_sync_clk_get_parent(
struct clk_hw *hw)
1494 static int tegra20_audio_sync_clk_set_parent(
struct clk_hw *hw,
u8 index)
1509 .is_enabled = tegra20_audio_sync_clk_is_enabled,
1510 .enable = tegra20_audio_sync_clk_enable,
1511 .disable = tegra20_audio_sync_clk_disable,
1512 .set_parent = tegra20_audio_sync_clk_set_parent,
1513 .get_parent = tegra20_audio_sync_clk_get_parent,
1518 static int tegra20_cdev_clk_is_enabled(
struct clk_hw *hw)
1533 static int tegra20_cdev_clk_enable(
struct clk_hw *hw)
1543 static void tegra20_cdev_clk_disable(
struct clk_hw *hw)
1552 static unsigned long tegra20_cdev_recalc_rate(
struct clk_hw *hw,
1553 unsigned long prate)
1559 .is_enabled = tegra20_cdev_clk_is_enabled,
1560 .enable = tegra20_cdev_clk_enable,
1561 .disable = tegra20_cdev_clk_disable,
1562 .recalc_rate = tegra20_cdev_recalc_rate,
1566 static void tegra20_wait_cpu_in_reset(
u32 cpu)
1571 reg =
readl(reg_clk_base +
1574 }
while (!(reg & (1 << cpu)));
1579 static void tegra20_put_cpu_in_reset(
u32 cpu)
1586 static void tegra20_cpu_out_of_reset(
u32 cpu)
1593 static void tegra20_enable_cpu_clock(
u32 cpu)
1604 static void tegra20_disable_cpu_clock(
u32 cpu)
1614 .wait_for_reset = tegra20_wait_cpu_in_reset,
1615 .put_in_reset = tegra20_put_cpu_in_reset,
1616 .out_of_reset = tegra20_cpu_out_of_reset,
1617 .enable_clock = tegra20_enable_cpu_clock,
1618 .disable_clock = tegra20_disable_cpu_clock,