smdk2410.c revision 1.2.4.2 1 1.2.4.2 skrll /* $NetBSD: smdk2410.c,v 1.2.4.2 2004/08/03 10:34:08 skrll Exp $ */
2 1.2.4.2 skrll
3 1.2.4.2 skrll /*
4 1.2.4.2 skrll * Copyright (c) 2003 By Noon Software, Inc. All rights reserved.
5 1.2.4.2 skrll *
6 1.2.4.2 skrll * Redistribution and use in source and binary forms, with or without
7 1.2.4.2 skrll * modification, are permitted provided that the following conditions
8 1.2.4.2 skrll * are met:
9 1.2.4.2 skrll * 1. Redistributions of source code must retain the above copyright
10 1.2.4.2 skrll * notice, this list of conditions and the following disclaimer.
11 1.2.4.2 skrll * 2. Redistributions in binary form must reproduce the above copyright
12 1.2.4.2 skrll * notice, this list of conditions and the following disclaimer in the
13 1.2.4.2 skrll * documentation and/or other materials provided with the distribution.
14 1.2.4.2 skrll * 3. The names of the authors may not be used to endorse or promote products
15 1.2.4.2 skrll * derived from this software without specific prior written permission.
16 1.2.4.2 skrll *
17 1.2.4.2 skrll * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
18 1.2.4.2 skrll * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 1.2.4.2 skrll * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 1.2.4.2 skrll * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 1.2.4.2 skrll * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 1.2.4.2 skrll * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 1.2.4.2 skrll * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 1.2.4.2 skrll * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 1.2.4.2 skrll * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 1.2.4.2 skrll * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 1.2.4.2 skrll */
28 1.2.4.2 skrll
29 1.2.4.2 skrll /*
30 1.2.4.2 skrll * Board initialization routines for the Samsung's SMDK2410.
31 1.2.4.2 skrll */
32 1.2.4.2 skrll
33 1.2.4.2 skrll #include <sys/types.h>
34 1.2.4.2 skrll #include <lib/libsa/stand.h>
35 1.2.4.2 skrll #include <arch/arm/s3c2xx0/s3c2410reg.h>
36 1.2.4.2 skrll
37 1.2.4.2 skrll #include "board.h"
38 1.2.4.2 skrll
39 1.2.4.2 skrll void
40 1.2.4.2 skrll board_init(void)
41 1.2.4.2 skrll {
42 1.2.4.2 skrll
43 1.2.4.2 skrll mem_init();
44 1.2.4.2 skrll }
45 1.2.4.2 skrll
46 1.2.4.2 skrll void
47 1.2.4.2 skrll board_fini(void)
48 1.2.4.2 skrll {
49 1.2.4.2 skrll
50 1.2.4.2 skrll }
51 1.2.4.2 skrll
52 1.2.4.2 skrll void
53 1.2.4.2 skrll mem_init(void)
54 1.2.4.2 skrll {
55 1.2.4.2 skrll uint32_t start, size, heap;
56 1.2.4.2 skrll
57 1.2.4.2 skrll start = S3C2410_SDRAM_START;
58 1.2.4.2 skrll size = SDRAM_SIZE;
59 1.2.4.2 skrll
60 1.2.4.2 skrll heap = (start + size) - HEAP_SIZE;
61 1.2.4.2 skrll
62 1.2.4.2 skrll printf(">> RAM 0x%x - 0x%x, heap at 0x%x\n",
63 1.2.4.2 skrll start, (start + size) - 1, heap);
64 1.2.4.2 skrll setheap((void *)heap, (void *)(heap + HEAP_SIZE - 1));
65 1.2.4.2 skrll }
66