summaryrefslogtreecommitdiffstats
path: root/arch/sparc/cpu/leon2
diff options
context:
space:
mode:
authorFrancois Retief <fgretief@spaceteq.co.za>2015-11-21 23:15:07 +0200
committerFrancois Retief <fgretief@spaceteq.co.za>2015-12-03 13:15:50 +0200
commit7a4fb11b85939b47738283c3a7ae7f461468e274 (patch)
treee3367520a0795a6e84275381a92d0f9f4bf71cfc /arch/sparc/cpu/leon2
parentf376c42f3b28862326ea378b0b6cc6b9b699d0c0 (diff)
downloadtalos-obmc-uboot-7a4fb11b85939b47738283c3a7ae7f461468e274.tar.gz
talos-obmc-uboot-7a4fb11b85939b47738283c3a7ae7f461468e274.zip
sparc: Remove non-generic board init files: board.c, time.c
Remove the board.c and time.c files and all associated non-generic board initialization code. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
Diffstat (limited to 'arch/sparc/cpu/leon2')
-rw-r--r--arch/sparc/cpu/leon2/cpu_init.c45
-rw-r--r--arch/sparc/cpu/leon2/interrupts.c14
2 files changed, 1 insertions, 58 deletions
diff --git a/arch/sparc/cpu/leon2/cpu_init.c b/arch/sparc/cpu/leon2/cpu_init.c
index b4d91e5039..9dfb99cb0f 100644
--- a/arch/sparc/cpu/leon2/cpu_init.c
+++ b/arch/sparc/cpu/leon2/cpu_init.c
@@ -14,9 +14,6 @@
#include <config.h>
-#define TIMER_BASE_CLK 1000000
-#define US_PER_TICK (1000000 / CONFIG_SYS_HZ)
-
DECLARE_GLOBAL_DATA_PTR;
/*
@@ -77,48 +74,8 @@ int cpu_init_r(void)
return 0;
}
-/* Uses Timer 0 to get accurate
- * pauses. Max 2 raised to 32 ticks
- *
- */
-void cpu_wait_ticks(unsigned long ticks)
-{
- unsigned long start = get_timer(0);
- while (get_timer(start) < ticks) ;
-}
-
-/* initiate and setup timer0 interrupt to configured HZ. Base clock is 1MHz.
- * Return irq number for timer int or a negative number for
- * dealing with self
- */
-int timer_interrupt_init_cpu(void)
-{
- LEON2_regs *leon2 = (LEON2_regs *) LEON2_PREGS;
-
- /* SYS_HZ ticks per second */
- leon2->Timer_Counter_1 = 0;
- leon2->Timer_Reload_1 = (TIMER_BASE_CLK / CONFIG_SYS_HZ) - 1;
- leon2->Timer_Control_1 =
- (LEON2_TIMER_CTRL_EN | LEON2_TIMER_CTRL_RS | LEON2_TIMER_CTRL_LD);
-
- return LEON2_TIMER1_IRQNO;
-}
-
-/*
- * This function is intended for SHORT delays only.
+/* initiate and setup timer0 to configured HZ. Base clock is 1MHz.
*/
-unsigned long cpu_usec2ticks(unsigned long usec)
-{
- if (usec < US_PER_TICK)
- return 1;
- return usec / US_PER_TICK;
-}
-
-unsigned long cpu_ticks2usec(unsigned long ticks)
-{
- return ticks * US_PER_TICK;
-}
-
int timer_init(void)
{
LEON2_regs *leon2 = (LEON2_regs *)LEON2_PREGS;
diff --git a/arch/sparc/cpu/leon2/interrupts.c b/arch/sparc/cpu/leon2/interrupts.c
index f78ec8a410..602e4a67ba 100644
--- a/arch/sparc/cpu/leon2/interrupts.c
+++ b/arch/sparc/cpu/leon2/interrupts.c
@@ -118,20 +118,6 @@ int interrupt_init_cpu(void)
/****************************************************************************/
-/* Handle Timer 0 IRQ */
-void timer_interrupt_cpu(void *arg)
-{
- LEON2_regs *leon2 = (LEON2_regs *) LEON2_PREGS;
-
- leon2->Timer_Control_1 =
- (LEON2_TIMER_CTRL_EN | LEON2_TIMER_CTRL_RS | LEON2_TIMER_CTRL_LD);
-
- /* nothing to do here */
- return;
-}
-
-/****************************************************************************/
-
/*
* Install and free a interrupt handler.
*/
OpenPOWER on IntegriCloud