From 7632906fc290b652416ab59eb5fb49356c064ed6 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 19 Apr 2018 06:35:52 +0200 Subject: bsps: Move clock drivers to bsps This patch is a part of the BSP source reorganization. Update #3285. --- c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c | 55 -------------------------- 1 file changed, 55 deletions(-) delete mode 100644 c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c (limited to 'c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c') diff --git a/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c b/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c deleted file mode 100644 index 80d91fe4f3..0000000000 --- a/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Use SYS_CLK as system clock - * - * Copyright (c) 2005-2006 Kolja Waschk, rtemsdev/ixo.de - */ - -#include -#include - -#define CLOCK_REGS ((altera_avalon_timer_regs*)NIOS2_IO_BASE(CLOCK_BASE)) - -/* - * Periodic interval timer interrupt handler - */ -#define Clock_driver_support_at_tick() \ - do { CLOCK_REGS->status = 0; } while(0) - -/* - * Attach clock interrupt handler - */ -#define Clock_driver_support_install_isr(_new) \ - set_vector(_new, CLOCK_VECTOR, 1) - -/* - * Turn off the clock - */ -#define Clock_driver_support_shutdown_hardware() \ - do { \ - CLOCK_REGS->control = ALTERA_AVALON_TIMER_CONTROL_STOP_MSK; \ - } while (0) - -/* - * Set up the clock hardware - */ -static void Clock_driver_support_initialize_hardware(void) -{ - uint32_t period; - - CLOCK_REGS->control = ALTERA_AVALON_TIMER_CONTROL_STOP_MSK; - - period = (CLOCK_FREQ/1000000L)*rtems_configuration_get_microseconds_per_tick() - 1; - CLOCK_REGS->period_hi = period >> 16; - CLOCK_REGS->period_lo = period & 0xFFFF; - - CLOCK_REGS->control = ALTERA_AVALON_TIMER_CONTROL_ITO_MSK | - ALTERA_AVALON_TIMER_CONTROL_CONT_MSK | - ALTERA_AVALON_TIMER_CONTROL_START_MSK; - - NIOS2_IENABLE(1 << CLOCK_VECTOR); -} - -#define CLOCK_DRIVER_USE_DUMMY_TIMECOUNTER - -#include "../../../shared/clockdrv_shell.h" - -- cgit v1.2.3