Skip to content

Commit 656db50

Browse files
committed
[MIPS] time: Cause platform definitions of plat_timer_setup to cause error.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 0d0cc92 commit 656db50

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎arch/mips/kernel/time.c‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Free Software Foundation; either version 2 of the License, or (at your
1212
* option) any later version.
1313
*/
14+
#include <linux/bug.h>
1415
#include <linux/clockchips.h>
1516
#include <linux/types.h>
1617
#include <linux/kernel.h>
@@ -115,10 +116,6 @@ EXPORT_SYMBOL(perf_irq);
115116
* (only needed if you intended to use cpu counter as timer interrupt
116117
* source)
117118
* 2) calculate a couple of cached variables for later usage
118-
* 3) plat_timer_setup() -
119-
* a) (optional) over-write any choices made above by time_init().
120-
* b) machine specific code should setup the timer irqaction.
121-
* c) enable the timer interrupt
122119
*/
123120

124121
unsigned int mips_hpt_frequency;
@@ -221,8 +218,18 @@ void __init __weak plat_time_init(void)
221218
{
222219
}
223220

224-
void __init __weak plat_timer_setup(struct irqaction *irq)
221+
/*
222+
* This function exists in order to cause an error due to a duplicate
223+
* definition if platform code should have its own implementation. The hook
224+
* to use instead is plat_time_init. plat_time_init does not receive the
225+
* irqaction pointer argument anymore. This is because any function which
226+
* initializes an interrupt timer now takes care of its own request_irq rsp.
227+
* setup_irq calls and each clock_event_device should use its own
228+
* struct irqrequest.
229+
*/
230+
void __init plat_timer_setup(struct irqaction *irq)
225231
{
232+
BUG();
226233
}
227234

228235
void __init time_init(void)

0 commit comments

Comments
 (0)