blob: 37028c31ebd448c526c80db68030044f7a8c82b8 [file] [log] [blame]
wdenk359733b2003-03-31 17:27:09 +00001/*
2 * (C) Copyright 2003
3 * Martin Winistoerfer, martinwinistoerfer@gmx.ch.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk359733b2003-03-31 17:27:09 +00006 */
7
8/*
9 * File: cmi.c
10 *
11 * Discription: For generic board specific functions
12 *
13 */
14
15
16#include <common.h>
17#include <mpc5xx.h>
18
19#define SRAM_SIZE 1024000L /* 1M RAM available*/
20
21#if defined(__APPLE__)
22/* Leading underscore on symbols */
23# define SYM_CHAR "_"
24#else /* No leading character on symbols */
25# define SYM_CHAR
26#endif
27
28/*
29 * Macros to generate global absolutes.
30 */
31#define GEN_SYMNAME(str) SYM_CHAR #str
32#define GEN_VALUE(str) #str
33#define GEN_ABS(name, value) \
34 asm (".globl " GEN_SYMNAME(name)); \
35 asm (GEN_SYMNAME(name) " = " GEN_VALUE(value))
36
37/*
38 * Check the board
39 */
40int checkboard(void)
41{
42 puts ("Board: ### No HW ID - assuming CMI board\n");
43 return (0);
44}
45
46/*
47 * Get RAM size.
48 */
Becky Brucebd99ae72008-06-09 16:03:40 -050049phys_size_t initdram(int board_type)
wdenk359733b2003-03-31 17:27:09 +000050{
51 return (SRAM_SIZE); /* We currently have a static size adapted for cmi board. */
52}
53
54/*
55 * Absolute environment address for linker file.
56 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020057GEN_ABS(env_start, CONFIG_ENV_OFFSET + CONFIG_SYS_FLASH_BASE);