1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-02-13 19:34:22 +00:00

sw: Add full memory map to .h and use it for litedram .lds

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt
2020-05-15 17:43:51 +10:00
parent bdb428a40b
commit 8d64090a68
4 changed files with 27 additions and 13 deletions

View File

@@ -2,9 +2,21 @@
#define __MICROWATT_SOC_H
/*
* Definitions for the syscon registers
* Microwatt SoC memory map
*/
#define MEMORY_BASE 0x00000000 /* "Main" memory alias, either BRAM or DRAM */
#define DRAM_BASE 0x40000000 /* DRAM if present */
#define SYSCON_BASE 0xc0000000 /* System control regs */
#define UART_BASE 0xc0002000 /* UART */
#define XICS_BASE 0xc0004000 /* Interrupt controller */
#define DRAM_CTRL_BASE 0xc0100000 /* LiteDRAM control registers */
#define BRAM_BASE 0xf0000000 /* Internal BRAM */
#define DRAM_INIT_BASE 0xffff0000 /* Internal DRAM init firmware */
/*
* Register definitions for the syscon registers
*/
#define SYSCON_BASE 0xc0000000
#define SYS_REG_SIGNATURE 0x00
#define SYS_REG_INFO 0x08
@@ -18,9 +30,9 @@
#define SYS_REG_CTRL_CORE_RESET (1ull << 1)
#define SYS_REG_CTRL_SOC_RESET (1ull << 2)
/* Definition for the "Potato" UART */
#define UART_BASE 0xc0002000
/*
* Register definitions for the potato UART
*/
#define POTATO_CONSOLE_TX 0x00
#define POTATO_CONSOLE_RX 0x08
#define POTATO_CONSOLE_STATUS 0x10
@@ -31,7 +43,5 @@
#define POTATO_CONSOLE_CLOCK_DIV 0x18
#define POTATO_CONSOLE_IRQ_EN 0x20
/* Definition for the LiteDRAM control registers */
#define DRAM_CTRL_BASE 0xc0100000
#endif /* __MICROWATT_SOC_H */