Merge branch 'socrates' of /home/wd/git/u-boot/projects
[oweals/u-boot.git] / board / amcc / sequoia / sequoia.c
index ce0537f220684b97f4ddb360a81377ca4076418f..6bcb3ab198141a1e9b62e9db974e1789e268cf97 100644 (file)
@@ -4,7 +4,7 @@
  *
  * (C) Copyright 2006
  * Jacqueline Pira-Ferriol, AMCC/IBM, jpira-ferriol@fr.ibm.com
- * Alain Saurel,            AMCC/IBM, alain.saurel@fr.ibm.com
+ * Alain Saurel,           AMCC/IBM, alain.saurel@fr.ibm.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -86,10 +86,13 @@ int board_early_init_f(void)
        /* enable USB device */
        out_8((u8 *) CFG_BCSR_BASE + 0x09, 0x20);
 
-       /* select Ethernet pins */
+       /* select Ethernet (and optionally IIC1) pins */
        mfsdr(SDR0_PFC1, sdr0_pfc1);
        sdr0_pfc1 = (sdr0_pfc1 & ~SDR0_PFC1_SELECT_MASK) |
                SDR0_PFC1_SELECT_CONFIG_4;
+#ifdef CONFIG_I2C_MULTI_BUS
+       sdr0_pfc1 |= ((sdr0_pfc1 & ~SDR0_PFC1_SIS_MASK) | SDR0_PFC1_SIS_IIC1_SEL);
+#endif
        mfsdr(SDR0_PFC2, sdr0_pfc2);
        sdr0_pfc2 = (sdr0_pfc2 & ~SDR0_PFC2_SELECT_MASK) |
                SDR0_PFC2_SELECT_CONFIG_4;
@@ -136,7 +139,7 @@ int misc_init_r(void)
        mtdcr(ebccfga, pb0cr);
 #endif
        pbcr = mfdcr(ebccfgd);
-        size_val = ffs(gd->bd->bi_flashsize) - 21;
+       size_val = ffs(gd->bd->bi_flashsize) - 21;
        pbcr = (pbcr & 0x0001ffff) | gd->bd->bi_flashstart | (size_val << 17);
 #if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL)
        mtdcr(ebccfga, pb3cr);