| .. | .. |
|---|
| 39 | 39 | return IRQ_HANDLED; |
|---|
| 40 | 40 | } |
|---|
| 41 | 41 | |
|---|
| 42 | | -static struct irqaction tbint_irqaction = { |
|---|
| 43 | | - .handler = timebase_interrupt, |
|---|
| 44 | | - .flags = IRQF_NO_THREAD, |
|---|
| 45 | | - .name = "tbint", |
|---|
| 46 | | -}; |
|---|
| 47 | | - |
|---|
| 48 | 42 | /* per-board overridable init_internal_rtc() function. */ |
|---|
| 49 | 43 | void __init __attribute__ ((weak)) |
|---|
| 50 | 44 | init_internal_rtc(void) |
|---|
| .. | .. |
|---|
| 66 | 60 | int found = 0; |
|---|
| 67 | 61 | |
|---|
| 68 | 62 | /* 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); |
|---|
| 70 | 64 | |
|---|
| 71 | 65 | if (cpu) { |
|---|
| 72 | 66 | fp = of_get_property(cpu, name, NULL); |
|---|
| .. | .. |
|---|
| 147 | 141 | * we have to enable the timebase). The decrementer interrupt |
|---|
| 148 | 142 | * is wired into the vector table, nothing to do here for that. |
|---|
| 149 | 143 | */ |
|---|
| 150 | | - cpu = of_find_node_by_type(NULL, "cpu"); |
|---|
| 144 | + cpu = of_get_cpu_node(0, NULL); |
|---|
| 151 | 145 | virq= irq_of_parse_and_map(cpu, 0); |
|---|
| 146 | + of_node_put(cpu); |
|---|
| 152 | 147 | irq = virq_to_hw(virq); |
|---|
| 153 | 148 | |
|---|
| 154 | 149 | sys_tmr2 = immr_map(im_sit); |
|---|
| .. | .. |
|---|
| 156 | 151 | (TBSCR_TBF | TBSCR_TBE)); |
|---|
| 157 | 152 | immr_unmap(sys_tmr2); |
|---|
| 158 | 153 | |
|---|
| 159 | | - if (setup_irq(virq, &tbint_irqaction)) |
|---|
| 154 | + if (request_irq(virq, timebase_interrupt, IRQF_NO_THREAD, "tbint", |
|---|
| 155 | + NULL)) |
|---|
| 160 | 156 | panic("Could not allocate timer IRQ!"); |
|---|
| 161 | 157 | } |
|---|
| 162 | 158 | |
|---|