]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
* Fix baudrate calculation problem on MPC5200 systems
authorwdenk <wdenk>
Mon, 27 Jun 2005 13:30:03 +0000 (13:30 +0000)
committerwdenk <wdenk>
Mon, 27 Jun 2005 13:30:03 +0000 (13:30 +0000)
* Add MPC8220 boards to MAKEALL script

* Add EEPROM and RTC support for HMI1001 board

* Patch by Detlev Zundel, 20 Jun 2005:
  Fix initialization of low active GPIO pins on inka4x0 board

CHANGELOG
MAKEALL
board/inka4x0/inka4x0.c
common/cmd_usb.c
cpu/mpc5xxx/serial.c
include/configs/hmi1001.h

index cd2697abb7c2591d7a9a44b70f9afa118d028a9e..371b2ff8ccc36531b4b6ea3dcc4e04d5b3d72ef6 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,13 @@
 Changes for U-Boot 1.1.3:
 ======================================================================
 
+* Fix baudrate calculation problem on MPC5200 systems
+
+* Add EEPROM and RTC support for HMI1001 board
+
+* Patch by Detlev Zundel, 20 Jun 2005:
+  Fix initialization of low active GPIO pins on inka4x0 board
+
 * Enable redundant environment, disable HW flash protection of
   HMI1001 board
 
diff --git a/MAKEALL b/MAKEALL
index 69d7760bea05b9c6c8363f2623b3666be3e046fa..e9f93076d498af54e41fd28812286a9f88cdd64b 100644 (file)
--- a/MAKEALL
+++ b/MAKEALL
@@ -129,11 +129,11 @@ LIST_7xx="        \
        BAB7xx          CPCI750         ELPPC                           \
 "
 
-LIST_ppc="${LIST_5xx}  ${LIST_5xxx} \
-         ${LIST_8xx}  \
-         ${LIST_824x} ${LIST_8260} \
-         ${LIST_85xx}  \
-         ${LIST_4xx}               \
+LIST_ppc="${LIST_5xx}  ${LIST_5xxx}            \
+         ${LIST_8xx}                           \
+         ${LIST_8220} ${LIST_824x} ${LIST_8260} \
+         ${LIST_85xx}                          \
+         ${LIST_4xx}                           \
          ${LIST_74xx} ${LIST_7xx}"
 
 #########################################################################
index c17b8feb413d38afdd8f15ef8548ef99c494371b..29878f9b44d513c37fa3db89cc88f43188ff496a 100644 (file)
@@ -173,6 +173,7 @@ void flash_preinit(void)
        *(vu_long *)MPC5XXX_BOOTCS_CFG &= ~0x1; /* clear RO */
 }
 
+#define GPIO_WKUP_7    0x80000000UL
 #define GPIO_PSC3_9    0x04000000UL
 
 int misc_init_f (void)
@@ -189,13 +190,13 @@ int misc_init_f (void)
 
        /* Initialize GPIO output pins.
         */
-       /* Configure GPT as GPIO output */
+       /* Configure GPT as GPIO output (and set them as they control low-active LEDs */
        *(vu_long *)MPC5XXX_GPT0_ENABLE =
        *(vu_long *)MPC5XXX_GPT1_ENABLE =
        *(vu_long *)MPC5XXX_GPT2_ENABLE =
        *(vu_long *)MPC5XXX_GPT3_ENABLE =
        *(vu_long *)MPC5XXX_GPT4_ENABLE =
-       *(vu_long *)MPC5XXX_GPT5_ENABLE = 0x24;
+       *(vu_long *)MPC5XXX_GPT5_ENABLE = 0x34;
 
        /* Configure GPT7 as PWM timer, 1kHz, no ints. */
        *(vu_long *)MPC5XXX_GPT7_ENABLE = 0;/* Disable */
@@ -216,6 +217,8 @@ int misc_init_f (void)
        *(vu_long *)MPC5XXX_WU_GPIO_ENABLE |= 0xc4000000;
        *(vu_long *)MPC5XXX_WU_GPIO_DIR |= 0xc4000000;
 
+       /* Set LR mirror bit because it is low-active */
+       *(vu_long *)MPC5XXX_WU_GPIO_DATA    |= GPIO_WKUP_7;
        /*
         * Reset Coral-P graphics controller
         */
index fbddb12dfd78ffa6ddd716b0eaeb4e19f6b22dc7..4747592c7682a636abda01b1baee34de2922ab7b 100644 (file)
@@ -609,7 +609,7 @@ U_BOOT_CMD(
        "usb tree  - show USB device tree\n"
        "usb info [dev] - show available USB devices\n"
        "usb scan  - (re-)scan USB bus for storage devices\n"
-       "usb device [dev] - show or set current USB storage device\n"
+       "usb dev [dev] - show or set current USB storage device\n"
        "usb part [dev] - print partition table of one or all USB storage devices\n"
        "usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'\n"
        "    to memory address `addr'\n"
index f463d2cf0746489f2cd0cd44f8dcd1270b9fc32e..1e9628c511497f8565746b758e559be6859720e1 100644 (file)
@@ -154,11 +154,11 @@ serial_setbrg(void)
 #if defined(CONFIG_MGT5100)
        baseclk = CFG_MPC5XXX_CLKIN / 32;
 #elif defined(CONFIG_MPC5200)
-       baseclk = gd->ipb_clk / 32;
+       baseclk = (gd->ipb_clk + 16) / 32;
 #endif
 
        /* set up UART divisor */
-       div = baseclk / gd->baudrate;
+       div = (baseclk + (gd->baudrate/2)) / gd->baudrate;
        psc->ctur = div >> 8;
        psc->ctlr = div & 0xff;
 }
index fc97b8dde4a48d4c93d492ab21c4c4f276129448..4e44bde624c957a3500eb144c773be1821b03830 100644 (file)
  * Supported commands
  */
 #define CONFIG_COMMANDS               (CONFIG_CMD_DFL  | \
+                               CFG_CMD_DATE    | \
                                CFG_CMD_DHCP    | \
+                               CFG_CMD_EEPROM  | \
+                               CFG_CMD_I2C     | \
                                CFG_CMD_NFS     | \
                                CFG_CMD_SNTP)
 
  */
 #undef CFG_IPBSPEED_133                /* define for 133MHz speed */
 
+/*
+ * I2C configuration
+ */
+#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
+#define CFG_I2C_MODULE         2       /* Select I2C module #1 or #2 */
+
+#define CFG_I2C_SPEED          100000 /* 100 kHz */
+#define CFG_I2C_SLAVE          0x7F
+
+/*
+ * EEPROM configuration
+ */
+#define CFG_I2C_EEPROM_ADDR            0x58
+#define CFG_I2C_EEPROM_ADDR_LEN                1
+#define CFG_EEPROM_PAGE_WRITE_BITS     4
+#define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10
+
+/*
+ * RTC configuration
+ */
+#define CONFIG_RTC_PCF8563
+#define CFG_I2C_RTC_ADDR               0x51
+
 /*
  * Flash configuration
  */
 #endif
 
 #define CFG_MONITOR_LEN                (192 << 10)     /* Reserve 192 kB for Monitor   */
-#define CFG_MALLOC_LEN         (128 << 10)     /* Reserve 128 kB for malloc()  */
+#define CFG_MALLOC_LEN         (512 << 10)     /* Reserve 128 kB for malloc()  */
 #define CFG_BOOTMAPSZ          (8 << 20)       /* Initial Memory map for Linux */
 
 /*
  */
 #define CFG_GPS_PORT_CONFIG    0x01051004
 
-/*
- * RTC configuration
- */
-#define CONFIG_RTC_MPC5200     1       /* use internal MPC5200 RTC */
-
 /*
  * Miscellaneous configurable options
  */