| 1 | /* |
| 2 | * Authors: Xiangfu Liu <xiangfu@sharism.cc> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version |
| 7 | * 3 of the License, or (at your option) any later version. |
| 8 | */ |
| 9 | |
| 10 | #ifndef __COMMON_H__ |
| 11 | #define __COMMON_H__ |
| 12 | |
| 13 | typedef unsigned int size_t; |
| 14 | typedef unsigned char u8; |
| 15 | typedef unsigned short u16; |
| 16 | typedef unsigned int u32; |
| 17 | |
| 18 | #define REG8(addr) *((volatile u8 *)(addr)) |
| 19 | #define REG16(addr) *((volatile u16 *)(addr)) |
| 20 | #define REG32(addr) *((volatile u32 *)(addr)) |
| 21 | |
| 22 | u32 UART_BASE; |
| 23 | |
| 24 | // tbd: do they have to be copied into globals? or just reference STAGE1_ARGS_ADDR? |
| 25 | volatile u32 ARG_EXTAL; |
| 26 | volatile u32 ARG_CPU_SPEED; |
| 27 | volatile u8 ARG_PHM_DIV; |
| 28 | volatile u32 ARG_UART_BAUD; |
| 29 | volatile u8 ARG_BUS_WIDTH_16; |
| 30 | volatile u8 ARG_BANK_ADDR_2BIT; |
| 31 | volatile u8 ARG_ROW_ADDR; |
| 32 | volatile u8 ARG_COL_ADDR; |
| 33 | volatile u32 ARG_CPU_ID; |
| 34 | |
| 35 | #endif // __COMMON_H__ |
| 36 | |