- 14 6月, 2017 12 次提交
-
-
由 Linus Walleij 提交于
The sched_clock() and delay timer callbacks can just call each other and we can save an #ifdef. Suggested-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Cc: Andrew Jeffery <andrew@aj.id.au> Cc: Joel Stanley <joel@jms.id.au> Cc: Jonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
This timer is often used on the ARM architecture, so as with so many siblings, we can implement delay timers, removing the need for the system to calibrate jiffys at boot, and potentially handling CPU frequency scaling on targets. We cannot just protect the Kconfig with a "depends on ARM" because it is already known that different architectures are using Faraday IP blocks, so it is better to make things open-ended and use Result on boot dmesg: Switching to timer-based delay loop, resolution 40n Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000) This is accurately the timer frequency, 250MHz on the APB bus. Cc: Andrew Jeffery <andrew@aj.id.au> Cc: Joel Stanley <joel@jms.id.au> Cc: Jonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NJonas Jensen <jonas.jensen@gmail.com> Tested-by: NAndrew Jeffery <andrew@aj.id.au> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
The different drivers are all using the same pattern when initializing. 1. Get the base address 2. Get the irq number 3. Get the clock 4. Prepare and enable the clock 5. Get the rate 6. Request an interrupt Instead of repeating again and again these steps in all the drivers, let's provide a common init routine to give the opportunity to factor all of them out. We can expect a significant kernel size improvement when the common routine will be used in all the drivers. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Alexandre Belloni 提交于
On sama5d2, power to the core may be cut while entering suspend mode. It is necessary to save and restore the TCB registers. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
The sched_clock() call should be really fast so we want to avoid an extra if() clause on the read path if possible. Implement two sched_clock_read() functions, one if the timer counts up and one if it counts down. Incidentally this also mirrors how clocksource_mmio_init() works and make things simple and easy to understand. Suggested-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Cc: Andrew Jeffery <andrew@aj.id.au> Cc: Joel Stanley <joel@jms.id.au> Cc: Jonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
The macro CLOCKSOURCE_OF_DECLARE has been rename to TIMER_OF_DECLARE. In order to prevent conflicts for the next merge window, a temporary alias has been added which will be removed later. Cc: Arnd Bergman <arnd@arndb.de> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
The config option name is now renamed to 'TIMER_ACPI' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Daniel Lezcano 提交于
The config option name is now renamed to 'TIMER_OF' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Daniel Lezcano 提交于
The table name is now renamed to 'timer' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Daniel Lezcano 提交于
The macro name is now renamed to 'TIMER_ACPI_DECLARE' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Daniel Lezcano 提交于
The function name is now renamed to 'timer_probe' for consistency with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Acked-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Daniel Lezcano 提交于
The CLOCKSOURCE_OF_DECLARE macro is used widely for the timers to declare the clocksource at early stage. However, this macro is also used to initialize the clockevent if any, or the clockevent only. It was originally suggested to declare another macro to initialize a clockevent, so in order to separate the two entities even they belong to the same IP. This was not accepted because of the impact on the DT where splitting a clocksource/clockevent definition does not make sense as it is a Linux concept not a hardware description. On the other side, the clocksource has not interrupt declared while the clockevent has, so it is easy from the driver to know if the description is for a clockevent or a clocksource, IOW it could be implemented at the driver level. So instead of dealing with a named clocksource macro, let's use a more generic one: TIMER_OF_DECLARE. The patch has not functional changes. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Acked-by: NHeiko Stuebner <heiko@sntech.de> Acked-by: NNeil Armstrong <narmstrong@baylibre.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMatthias Brugger <matthias.bgg@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 12 6月, 2017 11 次提交
-
-
由 Daniel Lezcano 提交于
After discussing it, this feature is dropped as it is not considered adequate: https://patchwork.kernel.org/patch/9639317/ There is no user of this macro yet, so there is no impact on the drivers. This reverts commit 376bc271. Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
The recent changes made the fttmr010 to be more generic and support different timers with a very few differences like moxart or aspeed. The aspeed timer uses a countdown and there is a test against the aspeed2400 compatible string to set a flag. With the previous patch, we added the aspeed2500 compatible string but without taking care of setting the countdown flag. Fix this by specifiying a init function and pass the aspeed flag to a common init function. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NAndrew Jeffery <andrew@aj.id.au> Reviewed-by: NAndrew Jeffery <andrew@aj.id.au> Acked-by: NJoel Stanley <joel@jms.id.au> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
Also clean up space-before-tab issues in the documentation. Signed-off-by: NAndrew Jeffery <andrew@aj.id.au> Acked-by: NJoel Stanley <joel@jms.id.au> Acked-by: NRob Herring <robh@kernel.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
This merges the Moxa Art timer driver into the Faraday FTTMR010 driver and replaces all Kconfig symbols to use the Faraday driver instead. We are now so similar that the drivers can be merged by just adding a few lines to the Faraday timer. Differences: - The Faraday driver explicitly sets the counter to count upwards for the clocksource, removing the need for the clocksource core to invert the value. - The Faraday driver also handles sched_clock() On the Aspeed, the counter can only count downwards, so support the timers in downward-counting mode as well, and flag the Aspeed to use this mode. This mode was tested on the Gemini so I have high hopes that it'll work fine on the Aspeed as well. After this we have one driver for all three SoCs and a generic Faraday FTTMR010 timer driver, which is nice. Cc: Joel Stanley <joel@jms.id.au> Cc: Jonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NJoel Stanley <joel@jms.id.au> Tested-by: NJoel Stanley <joel@jms.id.au> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
This switches the clocksource to TIMER2 like the Moxart driver does. Mainly to make it more similar to the Moxart/Aspeed driver but also because it seems more neat to use the timers in order: use timer 1, then timer 2. Cc: Joel Stanley <joel@jms.id.au> Tested-by: NJonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
This switches the drivers to use the bitops BIT() macro to define bits. Cc: Joel Stanley <joel@jms.id.au> Tested-by: NJonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
This converts the Faraday FTTMR010 to use the state container design pattern. Take some care to handle the state container and free:ing of resources as has been done in the Moxa driver. Cc: Joel Stanley <joel@jms.id.au> Tested-by: NJonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
The Gemini now has a proper clock driver and a proper PCLK assigned in its device tree. Drop the Gemini-specific hacks to look up the system speed and rely on the clock framework like everyone else. Cc: Joel Stanley <joel@jms.id.au> Tested-by: NJonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
This merges the Moxa and FTTMR010 device tree bindings into the Faraday binding document to avoid confusion. The FTTMR010 is the IP block used by these SoCs, in vanilla or modified variant. The Aspeed variant is modified such that it is no longer fully register-compatible with FTTMR010 so for this reason it is not listed with two compatible strings, instead just one. Cc: Joel Stanley <joel@jms.id.au> Tested-by: NJonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NRob Herring <robh@kernel.org> Acked-by: NJoel Stanley <joel@jms.id.au> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Linus Walleij 提交于
We need to also prepare and enable the clock we are using to get the right reference count and avoid it being shut off. Tested-by: NJonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Andrew Jeffery 提交于
The merging of a number of clocksource drivers into fttmr010 means we require clock-names to be specified in the Aspeed timer node, else the clocksource fails to probe and boot hangs. Signed-off-by: NAndrew Jeffery <andrew@aj.id.au> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
- 04 6月, 2017 17 次提交
-
-
由 Thomas Gleixner 提交于
All required callbacks are in place. Switch the alarm timer based posix interval timer callbacks to the common implementation and remove the incorrect private implementation. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.825471962@linutronix.de
-
由 Thomas Gleixner 提交于
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.747567162@linutronix.de
-
由 Thomas Gleixner 提交于
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.670026824@linutronix.de
-
由 Thomas Gleixner 提交于
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.592676753@linutronix.de
-
由 Thomas Gleixner 提交于
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.513694229@linutronix.de
-
由 Thomas Gleixner 提交于
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.434598989@linutronix.de
-
由 Thomas Gleixner 提交于
Replace the hrtimer calls by calls to the new try_to_cancel()/arm() kclock callbacks and move the hrtimer specific implementation into the corresponding callback functions. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.355396667@linutronix.de
-
由 Thomas Gleixner 提交于
Add timer_try_to_cancel() and timer_arm() callbacks to kclock which allow to make common_timer_set() usable by both hrtimer and alarmtimer based clocks. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.278022962@linutronix.de
-
由 Thomas Gleixner 提交于
Zero out the settings struct in the common code so the callbacks do not have to do it themself. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.200870713@linutronix.de
-
由 Thomas Gleixner 提交于
Replace the hrtimer calls by calls to the new forward/remaining kclock callbacks and move the hrtimer specific implementation into the corresponding callback functions. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.121437232@linutronix.de
-
由 Thomas Gleixner 提交于
Add two callbacks to kclock which allow using common_)timer_get() for both hrtimer and alarm timer based clocks. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211657.044915536@linutronix.de
-
由 Thomas Gleixner 提交于
Keep track of the activation state of posix timers. This is a preparatory change for making common_timer_get() usable by both hrtimer and alarm timer implementations. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211656.967783982@linutronix.de
-
由 Thomas Gleixner 提交于
Use the new timer_rearm() callback to replace the conditional hardcoded calls into the hrtimer and cpu timer code. This allows later to bring the same logic to alarmtimers. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211656.889661919@linutronix.de
-
由 Thomas Gleixner 提交于
That function is a misnomer. Rename it with a proper prefix to posixtimer_rearm(). Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211656.811362578@linutronix.de
-
由 Thomas Gleixner 提交于
Add a timer_rearm() callback which is used to make the rescheduling of posix interval timers independent of the underlying clock implementation. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211656.732632167@linutronix.de
-
由 Thomas Gleixner 提交于
Having the k_clock pointer in the k_itimer struct avoids the lookup in several code pathes and makes the next steps of unification of the hrtimer and alarmtimer based posix timers simpler. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211656.641222072@linutronix.de
-
由 Thomas Gleixner 提交于
Preparatory patch to unify the alarm timer and hrtimer based posix interval timer handling. The interval is used as a criteria for rearming decisions so moving it out of the clock specific data structures allows later unification. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211656.563922908@linutronix.de
-