source: rtems/c/src/lib/libbsp/m68k/mcf5225x/startup/bspstart.c @ cfaa366

4.115
Last change on this file since cfaa366 was cfaa366, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 17:55:58

General - Remove extraneous blank line in license message

Many files had an extra blank line in the license text
found in the file header. This patch removes that line.

The script that did this also turned off execute permission
when it was turned on incorrectly.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *  BSP startup
3 *
4 *  This routine starts the application.  It includes application,
5 *  board, and monitor specific initialization and configuration.
6 *  The generic CPU dependent initialization has been performed
7 *  before this routine is invoked.
8 *
9 *  Author:
10 *    David Fiddes, D.J@fiddes.surfaid.org
11 *    http://www.calm.hw.ac.uk/davidf/coldfire/
12 *
13 *  COPYRIGHT (c) 1989-1998.
14 *  On-Line Applications Research Corporation (OAR).
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.com/license/LICENSE.
19 *
20 *  $Id$
21 */
22
23#include <bsp.h>
24
25/*
26 * Cannot be frozen
27 */
28void _CPU_cache_freeze_data(void) {}
29void _CPU_cache_unfreeze_data(void) {}
30void _CPU_cache_freeze_instruction(void) {}
31void _CPU_cache_unfreeze_instruction(void) {}
32
33/*
34 * Write-through data cache -- flushes are unnecessary
35 */
36void _CPU_cache_flush_1_data_line(const void *d_addr) {}
37void _CPU_cache_flush_entire_data(void) {}
38
39void _CPU_cache_enable_instruction(void) {}
40void _CPU_cache_disable_instruction(void) {}
41void _CPU_cache_invalidate_entire_instruction(void) {}
42void _CPU_cache_invalidate_1_instruction_line(const void *addr) {}
43
44void _CPU_cache_enable_data(void) {}
45void _CPU_cache_disable_data(void) {}
46void _CPU_cache_invalidate_entire_data(void) {}
47void _CPU_cache_invalidate_1_data_line(const void *addr) {}
48
49/*
50 *  bsp_start
51 *
52 *  This routine does the bulk of the system initialisation.
53 */
54void __attribute__((weak)) bsp_start(void)
55{
56}
57
58uint32_t  __attribute__((weak)) bsp_get_CPU_clock_speed(void)
59{
60  #define DEF_CLOCK_SPEED 8000000.0F //8.0 MHz
61  #define MCF_MFD0_2_MASK 0x7000U
62  #define MCF_RFD0_2_MASK 0x0700U
63  #define MCF_MFD0_2_OFFSET 4U
64
65  #define SPEED_BIAS  ((((MCF_CLOCK_SYNCR & MCF_MFD0_2_MASK) >> 11) + MCF_MFD0_2_OFFSET) / (float)(((MCF_CLOCK_SYNCR & MCF_RFD0_2_MASK)>>7) ? : 1.0F))
66
67  return MCF_CLOCK_SYNCR & MCF_CLOCK_SYNCR_PLLEN ? SPEED_BIAS * DEF_CLOCK_SPEED : DEF_CLOCK_SPEED;
68}
Note: See TracBrowser for help on using the repository browser.