.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2008-2009 Manuel Lauss <manuel.lauss@gmail.com> |
---|
3 | 4 | * |
---|
.. | .. |
---|
9 | 10 | * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. |
---|
10 | 11 | * |
---|
11 | 12 | * ######################################################################## |
---|
12 | | - * |
---|
13 | | - * This program is free software; you can distribute it and/or modify it |
---|
14 | | - * under the terms of the GNU General Public License (Version 2) as |
---|
15 | | - * published by the Free Software Foundation. |
---|
16 | | - * |
---|
17 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
---|
18 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
19 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
20 | | - * for more details. |
---|
21 | | - * |
---|
22 | | - * You should have received a copy of the GNU General Public License along |
---|
23 | | - * with this program; if not, write to the Free Software Foundation, Inc., |
---|
24 | | - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
---|
25 | 13 | * |
---|
26 | 14 | * ######################################################################## |
---|
27 | 15 | * |
---|
.. | .. |
---|
81 | 69 | .features = CLOCK_EVT_FEAT_ONESHOT, |
---|
82 | 70 | .rating = 1500, |
---|
83 | 71 | .set_next_event = au1x_rtcmatch2_set_next_event, |
---|
84 | | - .cpumask = cpu_all_mask, |
---|
85 | | -}; |
---|
86 | | - |
---|
87 | | -static struct irqaction au1x_rtcmatch2_irqaction = { |
---|
88 | | - .handler = au1x_rtcmatch2_irq, |
---|
89 | | - .flags = IRQF_TIMER, |
---|
90 | | - .name = "timer", |
---|
91 | | - .dev_id = &au1x_rtcmatch2_clockdev, |
---|
| 72 | + .cpumask = cpu_possible_mask, |
---|
92 | 73 | }; |
---|
93 | 74 | |
---|
94 | 75 | static int __init alchemy_time_init(unsigned int m2int) |
---|
.. | .. |
---|
142 | 123 | cd->min_delta_ns = clockevent_delta2ns(9, cd); |
---|
143 | 124 | cd->min_delta_ticks = 9; /* ~0.28ms */ |
---|
144 | 125 | clockevents_register_device(cd); |
---|
145 | | - setup_irq(m2int, &au1x_rtcmatch2_irqaction); |
---|
| 126 | + if (request_irq(m2int, au1x_rtcmatch2_irq, IRQF_TIMER, "timer", |
---|
| 127 | + &au1x_rtcmatch2_clockdev)) |
---|
| 128 | + pr_err("Failed to register timer interrupt\n"); |
---|
146 | 129 | |
---|
147 | 130 | printk(KERN_INFO "Alchemy clocksource installed\n"); |
---|
148 | 131 | |
---|