source: rtems/c/src/lib/libbsp/arm/nds/startup/bspstart.c @ c193baad

4.104.11
Last change on this file since c193baad was c193baad, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on Apr 9, 2010 at 8:24:57 PM

unify irq data types and code, merge s3c2400/s3c2410 support

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * RTEMS for Nintendo DS platform initialization.
3 *
4 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com>
5 *
6 * The license and distribution terms for this file may be
7 * found in the file LICENSE in this distribution or at
8 *
9 * http://www.rtems.com/license/LICENSE
10 *
11 * $Id$
12 */
13
14#include <bsp.h>
15#include <bsp/bootcard.h>
16#include <nds.h>
17
18extern void BSP_rtems_irq_mngt_init (void);
19/*
20 * start the platform.
21 */
22
23void bsp_start (void)
24{
25  /* initialize irq management */
26  BSP_rtems_irq_mngt_init ();
27
28  /* setup console mode for lower screen */
29  irqEnable (IRQ_VBLANK);
30  videoSetMode (0);
31  videoSetModeSub (MODE_0_2D | DISPLAY_BG0_ACTIVE);
32  vramSetBankC (VRAM_C_SUB_BG);
33
34  SUB_BG0_CR = BG_MAP_BASE (31);
35  BG_PALETTE_SUB[255] = RGB15 (31, 31, 31);
36  consoleInitDefault ((u16 *) SCREEN_BASE_BLOCK_SUB (31),
37                      (u16 *) CHAR_BASE_BLOCK_SUB (0), 16);
38
39  /* print status message */
40  printk ("[+] kernel console started\n");
41
42  /* set the cpu mode to system user */
43  arm_cpu_mode = 0x1f;
44
45  /* configure clock period */
46  Configuration.microseconds_per_tick = 10000;  /* us */
47}
48
49/*
50 * reset bss area.
51 */
52
53void
54bss_reset (void)
55{
56  extern uint8_t __bss_start;
57  extern uint8_t __bss_end;
58
59  memset (&__bss_start, 0, (uint32_t) & __bss_end - (uint32_t) & __bss_start);
60}
61
62/*
63 * A few symbols needed by libnds but not used.
64 */
65
66#include "../include/sys/iosupport.h"
67const devoptab_t *devoptab_list[STD_MAX];
68void *punixTime;
Note: See TracBrowser for help on using the repository browser.