From: wdenk Date: Mon, 27 Jun 2005 13:30:03 +0000 (+0000) Subject: * Fix baudrate calculation problem on MPC5200 systems X-Git-Tag: LABEL_2006_03_12_0025~274 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=342717f72a2f92a14b9c823546e5bcec244f8bf4;p=oweals%2Fu-boot.git * Fix baudrate calculation problem on MPC5200 systems * 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 --- diff --git a/CHANGELOG b/CHANGELOG index cd2697abb7..371b2ff8cc 100644 --- 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 69d7760bea..e9f93076d4 100644 --- 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}" ######################################################################### diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c index c17b8feb41..29878f9b44 100644 --- a/board/inka4x0/inka4x0.c +++ b/board/inka4x0/inka4x0.c @@ -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 */ diff --git a/common/cmd_usb.c b/common/cmd_usb.c index fbddb12dfd..4747592c76 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -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" diff --git a/cpu/mpc5xxx/serial.c b/cpu/mpc5xxx/serial.c index f463d2cf07..1e9628c511 100644 --- a/cpu/mpc5xxx/serial.c +++ b/cpu/mpc5xxx/serial.c @@ -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; } diff --git a/include/configs/hmi1001.h b/include/configs/hmi1001.h index fc97b8dde4..4e44bde624 100644 --- a/include/configs/hmi1001.h +++ b/include/configs/hmi1001.h @@ -56,7 +56,10 @@ * 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) @@ -101,6 +104,29 @@ */ #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 */ @@ -165,7 +191,7 @@ #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 */ /* @@ -179,11 +205,6 @@ */ #define CFG_GPS_PORT_CONFIG 0x01051004 -/* - * RTC configuration - */ -#define CONFIG_RTC_MPC5200 1 /* use internal MPC5200 RTC */ - /* * Miscellaneous configurable options */