]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/cmi/cmi.c
rename CFG_ macros to CONFIG_SYS
[people/ms/u-boot.git] / board / cmi / cmi.c
CommitLineData
0db5bca8
WD
1/*
2 * (C) Copyright 2003
3 * Martin Winistoerfer, martinwinistoerfer@gmx.ch.
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24/*
25 * File: cmi.c
26 *
27 * Discription: For generic board specific functions
28 *
29 */
30
31
32#include <common.h>
33#include <mpc5xx.h>
34
35#define SRAM_SIZE 1024000L /* 1M RAM available*/
36
37#if defined(__APPLE__)
38/* Leading underscore on symbols */
39# define SYM_CHAR "_"
40#else /* No leading character on symbols */
41# define SYM_CHAR
42#endif
43
44/*
45 * Macros to generate global absolutes.
46 */
47#define GEN_SYMNAME(str) SYM_CHAR #str
48#define GEN_VALUE(str) #str
49#define GEN_ABS(name, value) \
50 asm (".globl " GEN_SYMNAME(name)); \
51 asm (GEN_SYMNAME(name) " = " GEN_VALUE(value))
52
53/*
54 * Check the board
55 */
56int checkboard(void)
57{
58 puts ("Board: ### No HW ID - assuming CMI board\n");
59 return (0);
60}
61
62/*
63 * Get RAM size.
64 */
9973e3c6 65phys_size_t initdram(int board_type)
0db5bca8
WD
66{
67 return (SRAM_SIZE); /* We currently have a static size adapted for cmi board. */
68}
69
70/*
71 * Absolute environment address for linker file.
72 */
6d0f6bcf 73GEN_ABS(env_start, CONFIG_ENV_OFFSET + CONFIG_SYS_FLASH_BASE);