wdenk | 359733b | 2003-03-31 17:27:09 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2003 |
| 3 | * Martin Winistoerfer, martinwinistoerfer@gmx.ch. |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 359733b | 2003-03-31 17:27:09 +0000 | [diff] [blame] | 6 | */ |
| 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 | */ |
| 40 | int 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 Bruce | bd99ae7 | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 49 | phys_size_t initdram(int board_type) |
wdenk | 359733b | 2003-03-31 17:27:09 +0000 | [diff] [blame] | 50 | { |
| 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-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 57 | GEN_ABS(env_start, CONFIG_ENV_OFFSET + CONFIG_SYS_FLASH_BASE); |