powerpc/85xx: introduce and document CONFIG_SYS_CCSRBAR macros
Introduce the CONFIG_SYS_CCSRBAR_PHYS_HIGH and CONFIG_SYS_CCSRBAR_PHYS_LOW
macros, which contain the high and low portions of CONFIG_SYS_CCSRBAR_PHYS.
This is necessary for the assembly-language code that relocates CCSR, since
the assembler does not understand 64-bit constants.
CONFIG_SYS_CCSRBAR_PHYS is automatically defined from the
CONFIG_SYS_CCSRBAR_PHYS_HIGH and CONFIG_SYS_CCSRBAR_PHYS_LOW macros, so it
should not be defined in a board header file. Similarly,
CONFIG_SYS_CCSRBAR_DEFAULT is defined for each SOC in config_mpc85xx.h, so
it should also not be defined in the board header file.
CONFIG_SYS_CCSR_DO_NOT_RELOCATE is a "short-cut" macro that guarantees that
CONFIG_SYS_CCSRBAR_PHYS is set to the same value as CONFIG_SYS_CCSRBAR_DEFAULT,
and so CCSR will not be relocated.
Since CONFIG_SYS_CCSRBAR_DEFAULT is locked to a fixed value, multi-stage U-Boot
builds (e.g. NAND) are required to relocate CCSR only during the last stage
(i.e. the "real" U-Boot). All other stages should define
CONFIG_SYS_CCSR_DO_NOT_RELOCATE to ensure that CCSR is not relocated.
README is updated with descriptions of all the CONFIG_SYS_CCSRBAR_xxx macros.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
diff --git a/README b/README
index a43da97..91b6695 100644
--- a/README
+++ b/README
@@ -2862,6 +2862,43 @@
and RPXsuper) to be able to adjust the position of
the IMMR register after a reset.
+- CONFIG_SYS_CCSRBAR_DEFAULT:
+ Default (power-on reset) physical address of CCSR on Freescale
+ PowerPC SOCs.
+
+- CONFIG_SYS_CCSRBAR:
+ Virtual address of CCSR. On a 32-bit build, this is typically
+ the same value as CONFIG_SYS_CCSRBAR_DEFAULT.
+
+ CONFIG_SYS_DEFAULT_IMMR must also be set to this value,
+ for cross-platform code that uses that macro instead.
+
+- CONFIG_SYS_CCSRBAR_PHYS:
+ Physical address of CCSR. CCSR can be relocated to a new
+ physical address, if desired. In this case, this macro should
+ be set to that address. Otherwise, it should be set to the
+ same value as CONFIG_SYS_CCSRBAR_DEFAULT. For example, CCSR
+ is typically relocated on 36-bit builds. It is recommended
+ that this macro be defined via the _HIGH and _LOW macros:
+
+ #define CONFIG_SYS_CCSRBAR_PHYS ((CONFIG_SYS_CCSRBAR_PHYS_HIGH
+ * 1ull) << 32 | CONFIG_SYS_CCSRBAR_PHYS_LOW)
+
+- CONFIG_SYS_CCSRBAR_PHYS_HIGH:
+ Bits 33-36 of CONFIG_SYS_CCSRBAR_PHYS. This value is typically
+ either 0 (32-bit build) or 0xF (36-bit build). This macro is
+ used in assembly code, so it must not contain typecasts or
+ integer size suffixes (e.g. "ULL").
+
+- CONFIG_SYS_CCSRBAR_PHYS_LOW:
+ Lower 32-bits of CONFIG_SYS_CCSRBAR_PHYS. This macro is
+ used in assembly code, so it must not contain typecasts or
+ integer size suffixes (e.g. "ULL").
+
+- CONFIG_SYS_CCSR_DO_NOT_RELOCATE:
+ If this macro is defined, then CONFIG_SYS_CCSRBAR_PHYS will be
+ forced to a value that ensures that CCSR is not relocated.
+
- Floppy Disk Support:
CONFIG_SYS_FDC_DRIVE_NUMBER