From 8074c0b1d0f67f393ce4a1e92eec194c9ed9700b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 19 Sep 2008 15:49:36 +0000 Subject: 2008-09-19 Joel Sherrill * Makefile.am: Split out bspstart contents. Move cache code to libcpu. * startup/bspgetcpuclockspeed.c: New file. * startup/bspstart.c: Removed. --- c/src/lib/libbsp/m68k/mcf52235/ChangeLog | 6 +++ c/src/lib/libbsp/m68k/mcf52235/Makefile.am | 6 ++- .../m68k/mcf52235/startup/bspgetcpuclockspeed.c | 17 ++++++ c/src/lib/libbsp/m68k/mcf52235/startup/bspstart.c | 61 ---------------------- 4 files changed, 27 insertions(+), 63 deletions(-) create mode 100644 c/src/lib/libbsp/m68k/mcf52235/startup/bspgetcpuclockspeed.c delete mode 100644 c/src/lib/libbsp/m68k/mcf52235/startup/bspstart.c (limited to 'c/src/lib/libbsp') diff --git a/c/src/lib/libbsp/m68k/mcf52235/ChangeLog b/c/src/lib/libbsp/m68k/mcf52235/ChangeLog index d69119c5c0..e3429e4a80 100644 --- a/c/src/lib/libbsp/m68k/mcf52235/ChangeLog +++ b/c/src/lib/libbsp/m68k/mcf52235/ChangeLog @@ -1,3 +1,9 @@ +2008-09-19 Joel Sherrill + + * Makefile.am: Split out bspstart contents. Move cache code to libcpu. + * startup/bspgetcpuclockspeed.c: New file. + * startup/bspstart.c: Removed. + 2008-09-18 Joel Sherrill * include/bsp.h: Remove unnecessary boilerplate comments. diff --git a/c/src/lib/libbsp/m68k/mcf52235/Makefile.am b/c/src/lib/libbsp/m68k/mcf52235/Makefile.am index ebd477bbf2..3b3005b82c 100644 --- a/c/src/lib/libbsp/m68k/mcf52235/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf52235/Makefile.am @@ -28,8 +28,9 @@ dist_project_lib_DATA += startup/linkcmds startup_SOURCES = startup/bspclean.c ../../shared/bsppredriverhook.c \ ../../shared/bsplibc.c ../../shared/bsppost.c \ ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \ - startup/init52235.c startup/bspstart.c startup/cfinit.c\ - ../../shared/bootcard.c ../../shared/sbrk.c ../../m68k/shared/setvec.c \ + startup/init52235.c ../../shared/bspstart.c startup/cfinit.c \ + startup/bspgetcpuclockspeed.c ../../shared/bootcard.c \ + ../../shared/sbrk.c ../../m68k/shared/setvec.c \ ../../shared/gnatinstallhandler.c clock_SOURCES = clock/clock.c console_SOURCES = console/console.c @@ -51,6 +52,7 @@ libbsp_a_SOURCES = $(startup_SOURCES) $(clock_SOURCES) $(console_SOURCES) \ libbsp_a_LIBADD = \ ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \ + ../../../libcpu/@RTEMS_CPU@/mcf5223x/cachepd.rel \ ../../../libcpu/@RTEMS_CPU@/shared/misc.rel #if HAS_NETWORKING #libbsp_a_LIBADD += network.rel diff --git a/c/src/lib/libbsp/m68k/mcf52235/startup/bspgetcpuclockspeed.c b/c/src/lib/libbsp/m68k/mcf52235/startup/bspgetcpuclockspeed.c new file mode 100644 index 0000000000..c3f99a26a5 --- /dev/null +++ b/c/src/lib/libbsp/m68k/mcf52235/startup/bspgetcpuclockspeed.c @@ -0,0 +1,17 @@ +/* + * COPYRIGHT (c) 1989-2008. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include + +uint32_t bsp_get_CPU_clock_speed(void) +{ + return 60000000; +} diff --git a/c/src/lib/libbsp/m68k/mcf52235/startup/bspstart.c b/c/src/lib/libbsp/m68k/mcf52235/startup/bspstart.c deleted file mode 100644 index 6e2e7f5a19..0000000000 --- a/c/src/lib/libbsp/m68k/mcf52235/startup/bspstart.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * BSP startup - * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * - * Author: - * David Fiddes, D.J@fiddes.surfaid.org - * http://www.calm.hw.ac.uk/davidf/coldfire/ - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include - -/* - * Cannot be frozen - */ -void _CPU_cache_freeze_data(void) {} -void _CPU_cache_unfreeze_data(void) {} -void _CPU_cache_freeze_instruction(void) {} -void _CPU_cache_unfreeze_instruction(void) {} - -/* - * Write-through data cache -- flushes are unnecessary - */ -void _CPU_cache_flush_1_data_line(const void *d_addr) {} -void _CPU_cache_flush_entire_data(void) {} - -void _CPU_cache_enable_instruction(void) {} -void _CPU_cache_disable_instruction(void) {} -void _CPU_cache_invalidate_entire_instruction(void) {} -void _CPU_cache_invalidate_1_instruction_line(const void *addr) {} - -void _CPU_cache_enable_data(void) {} -void _CPU_cache_disable_data(void) {} -void _CPU_cache_invalidate_entire_data(void) {} -void _CPU_cache_invalidate_1_data_line(const void *addr) {} - -/* - * bsp_start - * - * This routine does the bulk of the system initialisation. - */ -void bsp_start(void) -{ -} - -uint32_t bsp_get_CPU_clock_speed(void) -{ - return 60000000; -} -- cgit v1.2.3