[U-Boot] [PATCH 2/2 v6] powerpc/mpc83xx: Add 33.33MHz support for mpc8360emds
Chang-Ming.Huang at freescale.com
Chang-Ming.Huang at freescale.com
Thu Nov 3 07:46:13 CET 2011
From: Jerry Huang <Chang-Ming.Huang at freescale.com>
The new MPC8360EMDS board changes the oscillator to 33.33MHz
in order to support QE 500MHz since 2008.
Signed-off-by: Jerry Huang <Chang-Ming.Huang at freescale.com>
CC: Kim Phillips <kim.phillips at freescale.com>
---
cahnges for v2:
- fix multiline comment wrong
changes for v3:
- change the oscillator to 33330000, not 33300000
changes for v4:
- add the mandatory history of changes
changes for v5:
- move the code to platform file from lib/board.c
- add 2011 copyright
changes for v6:
- split into two patch
- add the CLKIN33 option for 33.33MHz oscillator
- add the readme for CLKIN33 option
- add CC
boards.cfg | 5 +++++
doc/README.mpc8360emds | 14 ++++++++++++++
include/configs/MPC8360EMDS.h | 25 +++++++++++++++++++++++++
3 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/boards.cfg b/boards.cfg
index 90dab8b..273615d 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -424,6 +424,11 @@ MPC8360EMDS_ATM powerpc mpc83xx mpc8360emds freesca
MPC8360EMDS_HOST_33 powerpc mpc83xx mpc8360emds freescale - MPC8360EMDS:PCI,PCI_33M,PQ_MDS_PIB=1
MPC8360EMDS_HOST_66 powerpc mpc83xx mpc8360emds freescale - MPC8360EMDS:PCI,PCI_66M,PQ_MDS_PIB=1
MPC8360EMDS_SLAVE powerpc mpc83xx mpc8360emds freescale - MPC8360EMDS:PCI,PCISLAVE
+MPC8360EMDS_CLKIN33 powerpc mpc83xx mpc8360emds freescale - MPC8360EMDS:CLKIN_33MHZ
+MPC8360EMDS_CLKIN33_ATM powerpc mpc83xx mpc8360emds freescale - MPC8360EMDS:CLKIN_33MHZ,PQ_MDS_PIB=1,PQ_MDS_PIB_ATM=1
+MPC8360EMDS_CLKIN33_HOST_33 powerpc mpc83xx mpc8360emds freescale - MPC8360EMDS:CLKIN_33MHZ,PCI,PCI_33M,PQ_MDS_PIB=1
+MPC8360EMDS_CLKIN33_HOST_66 powerpc mpc83xx mpc8360emds freescale - MPC8360EMDS:CLKIN_33MHZ,PCI,PCI_66M,PQ_MDS_PIB=1
+MPC8360EMDS_CLKIN33_SLAVE powerpc mpc83xx mpc8360emds freescale - MPC8360EMDS:CLKIN_33MHZ,PCI,PCISLAVE
MPC8360ERDK powerpc mpc83xx mpc8360erdk freescale - MPC8360ERDK
MPC8360ERDK_33 powerpc mpc83xx mpc8360erdk freescale - MPC8360ERDK:CLKIN_33MHZ
MPC8360ERDK_66 powerpc mpc83xx mpc8360erdk freescale - MPC8360ERDK
diff --git a/doc/README.mpc8360emds b/doc/README.mpc8360emds
index d65a2a4..6506193 100644
--- a/doc/README.mpc8360emds
+++ b/doc/README.mpc8360emds
@@ -109,6 +109,20 @@ Freescale MPC8360EMDS Board
1) DIP SW setting is similar as Section 1.1, except for SW9[3] is 1
2) Make MPC8360EMDS_SLAVE_config
+ MPC8360EMDS shipped with 33.33MHz oscillator(U41 is 33.33MHZ):
+
+ To make u-boot as the defualt with 33.33MHz oscillator:
+ 1) make distclean
+ 2) make MPC8360EMDS_CLKIN33_config
+
+ To make u-boot support the other feature with 33.33MHz oscillator:
+ 1) make distclean
+ 2) make MPC8360EMDS_CLKIN33_XXX_config
+ (where XXX is:
+ ATM - ATM support with 33.33MHz oscillator
+ HOST_33 - PCI host 33M support with 33.33MHz oscillator
+ HOST_66 - PCI host 66M support with 33.33MHz oscillator
+ SLAVE - PCI slave support with 33.33MHz oscillator)
5. Downloading and Flashing Images
diff --git a/include/configs/MPC8360EMDS.h b/include/configs/MPC8360EMDS.h
index cfba894..9aa3973 100644
--- a/include/configs/MPC8360EMDS.h
+++ b/include/configs/MPC8360EMDS.h
@@ -39,6 +39,18 @@
/*
* System Clock Setup
*/
+#ifdef CONFIG_CLKIN_33MHZ
+#ifdef CONFIG_PCISLAVE
+#define CONFIG_83XX_PCICLK 33330000 /* in HZ */
+#else
+#define CONFIG_83XX_CLKIN 33330000 /* in Hz */
+#endif
+
+#ifndef CONFIG_SYS_CLK_FREQ
+#define CONFIG_SYS_CLK_FREQ 33330000
+#endif
+
+#else
#ifdef CONFIG_PCISLAVE
#define CONFIG_83XX_PCICLK 66000000 /* in HZ */
#else
@@ -48,10 +60,22 @@
#ifndef CONFIG_SYS_CLK_FREQ
#define CONFIG_SYS_CLK_FREQ 66000000
#endif
+#endif
/*
* Hardware Reset Configuration Word
*/
+#ifdef CONFIG_CLKIN_33MHZ
+#define CONFIG_SYS_HRCW_LOW (\
+ HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
+ HRCWL_DDR_TO_SCB_CLK_1X1 |\
+ HRCWL_CSB_TO_CLKIN_8X1 |\
+ HRCWL_VCO_1X2 |\
+ HRCWL_CE_PLL_VCO_DIV_4 |\
+ HRCWL_CE_PLL_DIV_1X1 |\
+ HRCWL_CE_TO_PLL_1X15 |\
+ HRCWL_CORE_TO_CSB_2X1)
+#else
#define CONFIG_SYS_HRCW_LOW (\
HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
HRCWL_DDR_TO_SCB_CLK_1X1 |\
@@ -61,6 +85,7 @@
HRCWL_CE_PLL_DIV_1X1 |\
HRCWL_CE_TO_PLL_1X6 |\
HRCWL_CORE_TO_CSB_2X1)
+#endif
#ifdef CONFIG_PCISLAVE
#define CONFIG_SYS_HRCW_HIGH (\
--
1.6.4
More information about the U-Boot
mailing list