| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2014 Zhang, Keguang <keguang.zhang@gmail.com> |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 5 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 6 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 7 | | - * option) any later version. |
|---|
| 8 | 4 | */ |
|---|
| 9 | 5 | |
|---|
| 10 | 6 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 53 | 49 | |
|---|
| 54 | 50 | void __init ls1x_pwmtimer_init(void) |
|---|
| 55 | 51 | { |
|---|
| 56 | | - timer_reg_base = ioremap_nocache(LS1X_TIMER_BASE, SZ_16); |
|---|
| 52 | + timer_reg_base = ioremap(LS1X_TIMER_BASE, SZ_16); |
|---|
| 57 | 53 | if (!timer_reg_base) |
|---|
| 58 | 54 | panic("Failed to remap timer registers"); |
|---|
| 59 | 55 | |
|---|
| .. | .. |
|---|
| 180 | 176 | .tick_resume = ls1x_clockevent_tick_resume, |
|---|
| 181 | 177 | }; |
|---|
| 182 | 178 | |
|---|
| 183 | | -static struct irqaction ls1x_pwmtimer_irqaction = { |
|---|
| 184 | | - .name = "ls1x-pwmtimer", |
|---|
| 185 | | - .handler = ls1x_clockevent_isr, |
|---|
| 186 | | - .dev_id = &ls1x_clockevent, |
|---|
| 187 | | - .flags = IRQF_PERCPU | IRQF_TIMER, |
|---|
| 188 | | -}; |
|---|
| 189 | | - |
|---|
| 190 | 179 | static void __init ls1x_time_init(void) |
|---|
| 191 | 180 | { |
|---|
| 192 | 181 | struct clock_event_device *cd = &ls1x_clockevent; |
|---|
| .. | .. |
|---|
| 210 | 199 | if (ret) |
|---|
| 211 | 200 | panic(KERN_ERR "Failed to register clocksource: %d\n", ret); |
|---|
| 212 | 201 | |
|---|
| 213 | | - setup_irq(LS1X_TIMER_IRQ, &ls1x_pwmtimer_irqaction); |
|---|
| 202 | + if (request_irq(LS1X_TIMER_IRQ, ls1x_clockevent_isr, |
|---|
| 203 | + IRQF_PERCPU | IRQF_TIMER, "ls1x-pwmtimer", |
|---|
| 204 | + &ls1x_clockevent)) |
|---|
| 205 | + pr_err("Failed to register ls1x-pwmtimer interrupt\n"); |
|---|
| 214 | 206 | } |
|---|
| 215 | 207 | #endif /* CONFIG_CEVT_CSRC_LS1X */ |
|---|
| 216 | 208 | |
|---|