Root/xbboot/target-common/common.h

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
13typedef unsigned int size_t;
14typedef unsigned char u8;
15typedef unsigned short u16;
16typedef 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
22u32 UART_BASE;
23
24// tbd: do they have to be copied into globals? or just reference STAGE1_ARGS_ADDR?
25volatile u32 ARG_EXTAL;
26volatile u32 ARG_CPU_SPEED;
27volatile u8 ARG_PHM_DIV;
28volatile u32 ARG_UART_BAUD;
29volatile u8 ARG_BUS_WIDTH_16;
30volatile u8 ARG_BANK_ADDR_2BIT;
31volatile u8 ARG_ROW_ADDR;
32volatile u8 ARG_COL_ADDR;
33volatile u32 ARG_CPU_ID;
34
35#endif // __COMMON_H__
36

Archive Download this file



interactive