From 7d6a098219f8473ca4653cce5f7a49672b967f36 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Tue, 11 Oct 2011 23:57:30 -0500 Subject: mpc83xx: Cleanup usage of LBC constants Signed-off-by: Joe Hershberger Cc: Joe Hershberger Signed-off-by: Kim Phillips --- arch/powerpc/include/asm/fsl_lbc.h | 8 ++- include/configs/MERGERBOX.h | 14 ++-- include/configs/MPC8308RDB.h | 39 ++++++---- include/configs/MPC8313ERDB.h | 70 ++++++++++++------ include/configs/MPC8315ERDB.h | 35 ++++----- include/configs/MPC8323ERDB.h | 84 ++++------------------ include/configs/MPC832XEMDS.h | 143 ++++++++++++++++--------------------- include/configs/MPC8349EMDS.h | 55 ++++++++------ include/configs/MPC8349ITX.h | 33 +++++---- include/configs/MPC8360EMDS.h | 93 ++++++++++++++++++------ include/configs/MPC8360ERDK.h | 40 +++++++---- include/configs/MPC837XEMDS.h | 44 +++++++----- include/configs/MPC837XERDB.h | 42 +++++++---- include/configs/MVBLM7.h | 15 ++-- include/configs/SIMPC8313.h | 14 ++-- include/configs/TQM834x.h | 5 +- include/configs/km/km83xx-common.h | 14 ++-- include/configs/kmeter1.h | 7 +- include/configs/kmsupx5.h | 4 +- include/configs/mpc8308_p1m.h | 32 +++++---- include/configs/sbc8349.h | 55 +++++++++----- include/configs/suvd3.h | 2 +- include/configs/tuda1.h | 13 ++-- include/configs/tuxa1.h | 13 ++-- include/configs/ve8313.h | 25 +++---- include/configs/vme8349.h | 55 ++++++++++---- 26 files changed, 548 insertions(+), 406 deletions(-) diff --git a/arch/powerpc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h index 8695a62..bf572b7 100644 --- a/arch/powerpc/include/asm/fsl_lbc.h +++ b/arch/powerpc/include/asm/fsl_lbc.h @@ -50,8 +50,10 @@ void lbc_sdram_init(void); #define BR_MSEL 0x000000E0 #define BR_MSEL_SHIFT 5 #define BR_MS_GPCM 0x00000000 /* GPCM */ +#if !defined(CONFIG_MPC834x) && !defined(CONFIG_MPC8360) #define BR_MS_FCM 0x00000020 /* FCM */ -#ifdef CONFIG_MPC83xx +#endif +#if defined(CONFIG_MPC834x) || defined(CONFIG_MPC8360) #define BR_MS_SDRAM 0x00000060 /* SDRAM */ #elif defined(CONFIG_MPC85xx) #define BR_MS_SDRAM 0x00000000 /* SDRAM */ @@ -138,8 +140,10 @@ void lbc_sdram_init(void); #define OR_GPCM_EHTR_SHIFT 1 #define OR_GPCM_EHTR_CLEAR 0x00000000 #define OR_GPCM_EHTR_SET 0x00000002 +#if !defined(CONFIG_MPC8308) #define OR_GPCM_EAD 0x00000001 #define OR_GPCM_EAD_SHIFT 0 +#endif /* helpers to convert values into an OR address mask (GPCM mode) */ #define P2SZ_TO_AM(s) ((~((s) - 1)) & 0xffff8000) /* must be pow of 2 */ @@ -196,8 +200,10 @@ void lbc_sdram_init(void); #define OR_SDRAM_XAM_SHIFT 13 #define OR_SDRAM_COLS 0x00001C00 #define OR_SDRAM_COLS_SHIFT 10 +#define OR_SDRAM_MIN_COLS 7 #define OR_SDRAM_ROWS 0x000001C0 #define OR_SDRAM_ROWS_SHIFT 6 +#define OR_SDRAM_MIN_ROWS 9 #define OR_SDRAM_PMSEL 0x00000020 #define OR_SDRAM_PMSEL_SHIFT 5 #define OR_SDRAM_EAD 0x00000001 diff --git a/include/configs/MERGERBOX.h b/include/configs/MERGERBOX.h index aa35c1c..8176916 100644 --- a/include/configs/MERGERBOX.h +++ b/include/configs/MERGERBOX.h @@ -159,11 +159,13 @@ #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_64MB) -#define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V) +#define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 |\ + BR_MS_GPCM | BR_V) #define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_FLASH_BASE | OR_UPM_XAM |\ OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 |\ - OR_GPCM_XACS | OR_GPCM_SCY_15 | OR_GPCM_TRLX |\ - OR_GPCM_EHTR | OR_GPCM_EAD) + OR_GPCM_XACS | OR_GPCM_SCY_15 |\ + OR_GPCM_TRLX_SET | OR_GPCM_EHTR_SET |\ + OR_GPCM_EAD) #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_MAX_FLASH_SECT 512 @@ -180,14 +182,14 @@ #define CONFIG_NAND_FSL_ELBC 1 #define CONFIG_SYS_NAND_BASE 0xE0600000 -#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_NAND_BASE | (2<