diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-11-24 10:25:14 -0600 |
---|---|---|
committer | Andrew Fleming-AFLEMING <afleming@freescale.com> | 2008-12-04 03:15:43 -0600 |
commit | ea154a1781135d822eedee7567cc156089eae93c (patch) | |
tree | b28fb48fbdaf825ff9ae74b22b6373f7cc661052 /include/asm-ppc/fsl_lbc.h | |
parent | 9427ccde0355a2ebf47454e8e1be59f5b9864e08 (diff) | |
download | u-boot-imx-ea154a1781135d822eedee7567cc156089eae93c.zip u-boot-imx-ea154a1781135d822eedee7567cc156089eae93c.tar.gz u-boot-imx-ea154a1781135d822eedee7567cc156089eae93c.tar.bz2 |
FSL: Moved BR_PHYS_ADDR for localbus to common header
The BR_PHYS_ADDR macro is useful on all machines that have local bus
which is pretty much all 83xx/85xx/86xx chips.
Additionally most 85xx & 86xx will need it if they want to support
36-bit physical addresses.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'include/asm-ppc/fsl_lbc.h')
-rw-r--r-- | include/asm-ppc/fsl_lbc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-ppc/fsl_lbc.h b/include/asm-ppc/fsl_lbc.h index cac7bf6..51fc5c1 100644 --- a/include/asm-ppc/fsl_lbc.h +++ b/include/asm-ppc/fsl_lbc.h @@ -69,6 +69,14 @@ #define BR_RES ~(BR_BA | BR_PS | BR_DECC | BR_WP | BR_MSEL | BR_ATOM | BR_V) #endif +/* Convert an address into the right format for the BR registers */ +#ifdef CONFIG_PHYS_64BIT +#define BR_PHYS_ADDR(x) ((unsigned long)((x & 0x0ffff8000ULL) | \ + ((x & 0x300000000ULL) >> 19))) +#else +#define BR_PHYS_ADDR(x) (x & 0xffff8000) +#endif + /* OR - Option Registers */ #define OR0 0x5004 /* Register offset to immr */ |