forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/powerpc/platforms/8xx/m8xx_setup.c
....@@ -39,12 +39,6 @@
3939 return IRQ_HANDLED;
4040 }
4141
42
-static struct irqaction tbint_irqaction = {
43
- .handler = timebase_interrupt,
44
- .flags = IRQF_NO_THREAD,
45
- .name = "tbint",
46
-};
47
-
4842 /* per-board overridable init_internal_rtc() function. */
4943 void __init __attribute__ ((weak))
5044 init_internal_rtc(void)
....@@ -66,7 +60,7 @@
6660 int found = 0;
6761
6862 /* The cpu node should have timebase and clock frequency properties */
69
- cpu = of_find_node_by_type(NULL, "cpu");
63
+ cpu = of_get_cpu_node(0, NULL);
7064
7165 if (cpu) {
7266 fp = of_get_property(cpu, name, NULL);
....@@ -147,8 +141,9 @@
147141 * we have to enable the timebase). The decrementer interrupt
148142 * is wired into the vector table, nothing to do here for that.
149143 */
150
- cpu = of_find_node_by_type(NULL, "cpu");
144
+ cpu = of_get_cpu_node(0, NULL);
151145 virq= irq_of_parse_and_map(cpu, 0);
146
+ of_node_put(cpu);
152147 irq = virq_to_hw(virq);
153148
154149 sys_tmr2 = immr_map(im_sit);
....@@ -156,7 +151,8 @@
156151 (TBSCR_TBF | TBSCR_TBE));
157152 immr_unmap(sys_tmr2);
158153
159
- if (setup_irq(virq, &tbint_irqaction))
154
+ if (request_irq(virq, timebase_interrupt, IRQF_NO_THREAD, "tbint",
155
+ NULL))
160156 panic("Could not allocate timer IRQ!");
161157 }
162158