]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
* PPC405EP: Add CFG_GPIO0_OR, CFG_GPIO0_ODR to setup GPIO completely.
authorStefan Roese <sr@denx.de>
Thu, 12 Oct 2006 17:43:29 +0000 (19:43 +0200)
committerStefan Roese <sr@denx.de>
Thu, 12 Oct 2006 18:09:27 +0000 (20:09 +0200)
  - Add configuration of Open Drain GPIO Output selection
  - Add configuration of initial value of GPIO output pins
Patch by Tolunay Orkun, 07 Apr 2006

CHANGELOG
cpu/ppc4xx/cpu_init.c

index 166cfa3a4ed30b3f9695ae7e5be68bb33fc8d677..87a87461d93da191bf0012656566b8237f3448e5 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,11 @@
 Changes since U-Boot 1.1.4:
 ======================================================================
 
+* PPC405EP: Add CFG_GPIO0_OR, CFG_GPIO0_ODR to setup GPIO completely.
+  - Add configuration of Open Drain GPIO Output selection
+  - Add configuration of initial value of GPIO output pins
+  Patch by Tolunay Orkun, 07 Apr 2006
+
 * Fix spelling; minor code cleanup.
 
 * Fix JFFS2 compilation problem
index b27567fa4d14100e2ae07fe83ee3c394da06c29b..def46f15cac30e705d74ac2df51668f45fb34dba 100644 (file)
@@ -226,13 +226,19 @@ cpu_init_f (void)
        /*
         * GPIO0 setup (select GPIO or alternate function)
         */
-       out32(GPIO0_OSRH, CFG_GPIO0_OSRH);   /* output select */
+#if defined(CFG_GPIO0_OR)
+       out32(GPIO0_OR, CFG_GPIO0_OR);          /* set initial state of output pins     */
+#endif
+#if defined(CFG_GPIO0_ODR)
+       out32(GPIO0_ODR, CFG_GPIO0_ODR);        /* open-drain select                    */
+#endif
+       out32(GPIO0_OSRH, CFG_GPIO0_OSRH);      /* output select                        */
        out32(GPIO0_OSRL, CFG_GPIO0_OSRL);
-       out32(GPIO0_ISR1H, CFG_GPIO0_ISR1H); /* input select */
+       out32(GPIO0_ISR1H, CFG_GPIO0_ISR1H);    /* input select                         */
        out32(GPIO0_ISR1L, CFG_GPIO0_ISR1L);
-       out32(GPIO0_TSRH, CFG_GPIO0_TSRH);   /* three-state select */
+       out32(GPIO0_TSRH, CFG_GPIO0_TSRH);      /* three-state select                   */
        out32(GPIO0_TSRL, CFG_GPIO0_TSRL);
-       out32(GPIO0_TCR, CFG_GPIO0_TCR);     /* enable output driver for outputs */
+       out32(GPIO0_TCR, CFG_GPIO0_TCR);        /* enable output driver for outputs     */
 
        /*
         * Set EMAC noise filter bits