]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ppc/85xx: Fix LCRR_CLKDIV defines
authorKumar Gala <galak@kernel.crashing.org>
Wed, 16 Sep 2009 03:21:58 +0000 (22:21 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 24 Sep 2009 17:04:57 +0000 (12:04 -0500)
For some reason the CLKDIV field varies between SoC in how it interprets
the bit values.

All 83xx and early (e500v1) PQ3 devices support:
 clk/2: CLKDIV = 2
 clk/4: CLKDIV = 4
 clk/8: CLKDIV = 8

Newer PQ3 (e500v2) and MPC86xx support:
 clk/4: CLKDIV = 2
 clk/8: CLKDIV = 4
 clk/16: CLKDIV = 8

Ensure that the MPC86xx and MPC85xx still get the same behavior and make
the defines reflect their logical view (not the value of the field).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Peter Tyser <ptyser@xes-inc.com>
include/asm-ppc/fsl_lbc.h
include/configs/XPEDITE5170.h
include/configs/XPEDITE5200.h
include/configs/XPEDITE5370.h

index a28082e56e616e28e3adce01a3011a5622a8304e..08d31e12e4c872e3ff3c37042287d36eac6c9605 100644 (file)
  */
 #define LCRR_CLKDIV                    0x0000001F
 #define LCRR_CLKDIV_SHIFT              0
+#if defined(CONFIG_MPC83xx) || defined (CONFIG_MPC8540) || \
+    defined(CONFIG_MPC8541) || defined (CONFIG_MPC8555) || \
+    defined(CONFIG_MPC8560)
 #define LCRR_CLKDIV_2                  0x00000002
 #define LCRR_CLKDIV_4                  0x00000004
 #define LCRR_CLKDIV_8                  0x00000008
+#else
+#define LCRR_CLKDIV_4                  0x00000002
+#define LCRR_CLKDIV_8                  0x00000004
+#define LCRR_CLKDIV_16                 0x00000008
+#endif
 
 /* LTEDR - Transfer Error Check Disable Register
  */
index 242466ae12048dce561b1fa480a25f442ee71c17..30642cdfef4a75eb7aa3be542c19f30885a31fd6 100644 (file)
@@ -122,7 +122,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
  * 0xf800_0000 0xffff_ffff     NOR Flash 1             128M non-cacheable
  */
 
-#define CONFIG_SYS_LBC_LCRR            (LCRR_CLKDIV_2 | LCRR_EADC_3)
+#define CONFIG_SYS_LBC_LCRR            (LCRR_CLKDIV_4 | LCRR_EADC_3)
 
 /*
  * NAND flash configuration
index deda20843afb5c79291b4e2e0e75d4288590eed6..d79231b8b8b306a283ebf65324e2eb1bcae75d89 100644 (file)
  * 0xfc00_0000 0xffff_ffff     NOR Flash 1             64M non-cacheable
  */
 
-#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_4 | LCRR_EADC_3)
+#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_8 | LCRR_EADC_3)
 
 /*
  * NAND flash configuration
index 3c58ebe39b2871640c1fb512ec49d2d7d55386cc..65e1afddc6930109f638184ebce13040e9c2bd12 100644 (file)
@@ -116,7 +116,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
  * 0xf800_0000 0xffff_ffff     NOR Flash 1             128M non-cacheable
  */
 
-#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_4 | LCRR_EADC_3)
+#define CONFIG_SYS_LBC_LCRR    (LCRR_CLKDIV_8 | LCRR_EADC_3)
 
 /*
  * NAND flash configuration