Skip to content

Commit 097cd14

Browse files
Fu Weimrutland-arm
authored andcommitted
clocksource: arm_arch_timer: add a new enum for spi type
This patch add a new enum "arch_timer_spi_nr" and use it in the driver. Just for code's readability, no functional change. Signed-off-by: Fu Wei <fu.wei@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
1 parent 831610c commit 097cd14

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎drivers/clocksource/arm_arch_timer.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,9 +1258,9 @@ static int __init arch_timer_mem_init(struct device_node *np)
12581258
}
12591259

12601260
if (arch_timer_mem_use_virtual)
1261-
irq = irq_of_parse_and_map(best_frame, 1);
1261+
irq = irq_of_parse_and_map(best_frame, ARCH_TIMER_VIRT_SPI);
12621262
else
1263-
irq = irq_of_parse_and_map(best_frame, 0);
1263+
irq = irq_of_parse_and_map(best_frame, ARCH_TIMER_PHYS_SPI);
12641264

12651265
ret = -EINVAL;
12661266
if (!irq) {

‎include/clocksource/arm_arch_timer.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ enum arch_timer_ppi_nr {
4646
ARCH_TIMER_MAX_TIMER_PPI
4747
};
4848

49+
enum arch_timer_spi_nr {
50+
ARCH_TIMER_PHYS_SPI,
51+
ARCH_TIMER_VIRT_SPI,
52+
ARCH_TIMER_MAX_TIMER_SPI
53+
};
54+
4955
#define ARCH_TIMER_PHYS_ACCESS 0
5056
#define ARCH_TIMER_VIRT_ACCESS 1
5157
#define ARCH_TIMER_MEM_PHYS_ACCESS 2

0 commit comments

Comments
 (0)