diff options
author | Daniel Golle <daniel@makrotopia.org> | 2019-06-12 01:14:25 +0200 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2019-06-12 01:18:52 +0200 |
commit | 000d400baa0af2e42c9a462e42df7dc9abde1ec7 (patch) | |
tree | a11c2dd570e8f02c4a141f135fc8db1e1d391ef2 /target/linux/cns3xxx/patches-4.19/090-timers.patch | |
parent | c4e727f01cc40bd57274d0b885b0f75cde9c4683 (diff) | |
download | upstream-000d400baa0af2e42c9a462e42df7dc9abde1ec7.tar.gz upstream-000d400baa0af2e42c9a462e42df7dc9abde1ec7.tar.bz2 upstream-000d400baa0af2e42c9a462e42df7dc9abde1ec7.zip |
kernel: drop everything not on kernel version 4.14
* Remove testing patches for kernel version 4.19
* remove targets ar7, ixp4xx, orion
Those targets are still on kernel 4.9, patches for 4.14 were not ready
in time. They may be readded once people prepare and test patches for
kernel 4.14.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/cns3xxx/patches-4.19/090-timers.patch')
-rw-r--r-- | target/linux/cns3xxx/patches-4.19/090-timers.patch | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/target/linux/cns3xxx/patches-4.19/090-timers.patch b/target/linux/cns3xxx/patches-4.19/090-timers.patch deleted file mode 100644 index b3810f8c9b..0000000000 --- a/target/linux/cns3xxx/patches-4.19/090-timers.patch +++ /dev/null @@ -1,105 +0,0 @@ ---- a/arch/arm/mach-cns3xxx/core.c -+++ b/arch/arm/mach-cns3xxx/core.c -@@ -138,6 +138,7 @@ static int cns3xxx_set_oneshot(struct cl - - /* period set, and timer enabled in 'next_event' hook */ - ctrl |= (1 << 2) | (1 << 9); -+ writel(0, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET); - writel(ctrl, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET); - return 0; - } -@@ -148,7 +149,7 @@ static int cns3xxx_set_periodic(struct c - int pclk = cns3xxx_cpu_clock() / 8; - int reload; - -- reload = pclk * 20 / (3 * HZ) * 0x25000; -+ reload = pclk * 1000000 / HZ; - writel(reload, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET); - ctrl |= (1 << 0) | (1 << 2) | (1 << 9); - writel(ctrl, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET); -@@ -175,8 +176,8 @@ static struct clock_event_device cns3xxx - .set_state_oneshot = cns3xxx_set_oneshot, - .tick_resume = cns3xxx_shutdown, - .set_next_event = cns3xxx_timer_set_next_event, -- .rating = 350, -- .cpumask = cpu_all_mask, -+ .rating = 300, -+ .cpumask = cpu_possible_mask, - }; - - static void __init cns3xxx_clockevents_init(unsigned int timer_irq) -@@ -220,6 +221,32 @@ static void __init cns3xxx_init_twd(void - twd_local_timer_register(&cns3xx_twd_local_timer); - } - -+static u64 cns3xxx_get_cycles(struct clocksource *cs) -+{ -+ u64 val; -+ -+ val = readl(cns3xxx_tmr1 + TIMER_FREERUN_CONTROL_OFFSET); -+ val &= 0xffff; -+ -+ return ((val << 32) | readl(cns3xxx_tmr1 + TIMER_FREERUN_OFFSET)); -+} -+ -+static struct clocksource clocksource_cns3xxx = { -+ .name = "freerun", -+ .rating = 200, -+ .read = cns3xxx_get_cycles, -+ .mask = CLOCKSOURCE_MASK(48), -+ .flags = CLOCK_SOURCE_IS_CONTINUOUS, -+}; -+ -+static void __init cns3xxx_clocksource_init(void) -+{ -+ /* Reset the FreeRunning counter */ -+ writel((1 << 16), cns3xxx_tmr1 + TIMER_FREERUN_CONTROL_OFFSET); -+ -+ clocksource_register_khz(&clocksource_cns3xxx, 100); -+} -+ - /* - * Set up the clock source and clock events devices - */ -@@ -237,13 +264,12 @@ static void __init __cns3xxx_timer_init( - /* stop free running timer3 */ - writel(0, cns3xxx_tmr1 + TIMER_FREERUN_CONTROL_OFFSET); - -- /* timer1 */ -- writel(0x5C800, cns3xxx_tmr1 + TIMER1_COUNTER_OFFSET); -- writel(0x5C800, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET); -- - writel(0, cns3xxx_tmr1 + TIMER1_MATCH_V1_OFFSET); - writel(0, cns3xxx_tmr1 + TIMER1_MATCH_V2_OFFSET); - -+ val = (cns3xxx_cpu_clock() >> 3) * 1000000 / HZ; -+ writel(val, cns3xxx_tmr1 + TIMER1_COUNTER_OFFSET); -+ - /* mask irq, non-mask timer1 overflow */ - irq_mask = readl(cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET); - irq_mask &= ~(1 << 2); -@@ -255,23 +281,9 @@ static void __init __cns3xxx_timer_init( - val |= (1 << 9); - writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET); - -- /* timer2 */ -- writel(0, cns3xxx_tmr1 + TIMER2_MATCH_V1_OFFSET); -- writel(0, cns3xxx_tmr1 + TIMER2_MATCH_V2_OFFSET); -- -- /* mask irq */ -- irq_mask = readl(cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET); -- irq_mask |= ((1 << 3) | (1 << 4) | (1 << 5)); -- writel(irq_mask, cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET); -- -- /* down counter */ -- val = readl(cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET); -- val |= (1 << 10); -- writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET); -- -- /* Make irqs happen for the system timer */ - setup_irq(timer_irq, &cns3xxx_timer_irq); - -+ cns3xxx_clocksource_init(); - cns3xxx_clockevents_init(timer_irq); - cns3xxx_init_twd(); - } |