Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54d0a216 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

[MIPS] Replace board_timer_setup function pointer by plat_timer_setup.



Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>

---
parent 2c70df5b
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ the following functions or values:
	1. (optional) set up RTC routines
	2. (optional) calibrate and set the mips_counter_frequency

  b) board_timer_setup - a function pointer.  Invoked at the end of time_init()
  b) plat_timer_setup - a function pointer.  Invoked at the end of time_init()
	1. (optional) over-ride any decisions made in time_init()
	2. set up the irqaction for timer interrupt.
	3. enable the timer interrupt
@@ -116,10 +116,8 @@ Step 2: the machine setup() function

  If you supply board_time_init(), set the function poointer.

  Set the function pointer board_timer_setup() (mandatory)


Step 3: implement rtc routines, board_time_init() and board_timer_setup()
Step 3: implement rtc routines, board_time_init() and plat_timer_setup()
  if needed.

  board_time_init() -
@@ -128,7 +126,7 @@ Step 3: implement rtc routines, board_time_init() and board_timer_setup()
 	    (only needed if you intended to use fixed_rate_gettimeoffset
 	     or use cpu counter as timer interrupt source)

  board_timer_setup() - 
  plat_timer_setup() -
 	a) (optional) over-write any choices made above by time_init().
 	b) machine specific code should setup the timer irqaction.
 	c) enable the timer interrupt
+0 −2
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ extern void au1000_power_off(void);
extern void au1x_time_init(void);
extern void au1x_timer_setup(struct irqaction *irq);
extern void au1xxx_time_init(void);
extern void au1xxx_timer_setup(struct irqaction *irq);
extern void set_cpuspec(void);

void __init plat_mem_setup(void)
@@ -123,7 +122,6 @@ void __init plat_mem_setup(void)
	_machine_halt = au1000_halt;
	pm_power_off = au1000_power_off;
	board_time_init = au1xxx_time_init;
	board_timer_setup = au1xxx_timer_setup;

	/* IO/MEM resources. */
	set_io_port_base(0);
+1 −1
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ static unsigned long do_fast_pm_gettimeoffset(void)
}
#endif

void __init au1xxx_timer_setup(struct irqaction *irq)
void __init plat_timer_setup(struct irqaction *irq)
{
	unsigned int est_freq;

+1 −2
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ static void excite_timer_init(void)
	mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2;
}

static void excite_timer_setup(struct irqaction *irq)
void __init plat_timer_setup(struct irqaction *irq)
{
	/* The eXcite platform uses the alternate timer interrupt */
	set_c0_intcontrol(0x80);
@@ -262,7 +262,6 @@ void __init plat_mem_setup(void)

	/* Set up timer initialization hooks */
	board_time_init = excite_timer_init;
	board_timer_setup = excite_timer_setup;

	/* Set up the peripheral address map */
	*(boot_ocd_base + (LKB9 / sizeof (u32))) = 0;
+1 −3
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ const char *get_system_type(void)
	return "MIPS Cobalt";
}

static void __init cobalt_timer_setup(struct irqaction *irq)
void __init plat_timer_setup(struct irqaction *irq)
{
	/* Load timer value for 1KHz (TCLK is 50MHz) */
	GALILEO_OUTL(50*1000*1000 / 1000, GT_TC0_OFS);
@@ -129,8 +129,6 @@ void __init plat_mem_setup(void)
	_machine_halt = cobalt_machine_halt;
	pm_power_off = cobalt_machine_power_off;

	board_timer_setup = cobalt_timer_setup;

        set_io_port_base(CKSEG1ADDR(GT64111_IO_BASE));

	/* I/O port resource must include UART and LCD/buttons */
Loading