Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2011-2014 Freescale Semiconductor, Inc. |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | /* |
| 7 | * Corenet DS style board configuration file |
| 8 | */ |
| 9 | #ifndef __QEMU_PPCE500_H |
| 10 | #define __QEMU_PPCE500_H |
| 11 | |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 12 | /* Needed to fill the ccsrbar pointer */ |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 13 | |
| 14 | /* Virtual address to CCSRBAR */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 15 | #define CFG_SYS_CCSRBAR 0xe0000000 |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 16 | /* Physical address should be a function call */ |
| 17 | #ifndef __ASSEMBLY__ |
| 18 | extern unsigned long long get_phys_ccsrbar_addr_early(void); |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 19 | #define CFG_SYS_CCSRBAR_PHYS_HIGH (get_phys_ccsrbar_addr_early() >> 32) |
| 20 | #define CFG_SYS_CCSRBAR_PHYS_LOW get_phys_ccsrbar_addr_early() |
Alexander Graf | 6a2aa50 | 2015-03-07 02:10:09 +0100 | [diff] [blame] | 21 | #else |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 22 | #define CFG_SYS_CCSRBAR_PHYS_HIGH 0x0 |
| 23 | #define CFG_SYS_CCSRBAR_PHYS_LOW CFG_SYS_CCSRBAR |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 24 | #endif |
Alexander Graf | 6a2aa50 | 2015-03-07 02:10:09 +0100 | [diff] [blame] | 25 | |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 26 | /* Virtual address to a temporary map if we need it (max 128MB) */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 27 | #define CFG_SYS_TMPVIRT 0xe8000000 |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 28 | |
| 29 | /* |
| 30 | * DDR Setup |
| 31 | */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 32 | #define CFG_SYS_DDR_SDRAM_BASE 0x00000000 |
| 33 | #define CFG_SYS_SDRAM_BASE CFG_SYS_DDR_SDRAM_BASE |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 34 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 35 | #define CFG_SYS_INIT_RAM_ADDR 0x00100000 |
| 36 | #define CFG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0x0 |
| 37 | #define CFG_SYS_INIT_RAM_ADDR_PHYS_LOW 0x00100000 |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 38 | /* The assembler doesn't like typecast */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 39 | #define CFG_SYS_INIT_RAM_ADDR_PHYS \ |
| 40 | ((CFG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \ |
| 41 | CFG_SYS_INIT_RAM_ADDR_PHYS_LOW) |
| 42 | #define CFG_SYS_INIT_RAM_SIZE 0x00004000 |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 43 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 44 | #define CFG_SYS_INIT_SP_OFFSET (CFG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 45 | |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 46 | /* |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 47 | * Miscellaneous configurable options |
| 48 | */ |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 49 | |
| 50 | /* |
| 51 | * For booting Linux, the board info and command line data |
| 52 | * have to be in the first 64 MB of memory, since this is |
| 53 | * the maximum mapped by the Linux kernel during initialization. |
| 54 | */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 55 | #define CFG_SYS_BOOTMAPSZ (64 << 20) /* Initial map for Linux*/ |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 56 | |
| 57 | /* |
| 58 | * Environment Configuration |
| 59 | */ |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 60 | |
Alexander Graf | c346848 | 2014-04-11 17:09:45 +0200 | [diff] [blame] | 61 | #endif /* __QEMU_PPCE500_H */ |