#include <commproc.h>
#include <i2c.h>
#include <command.h>
+#include <cmd_bsp.h>
#include <malloc.h>
#include <post.h>
/*
* SDRAM Initialization (offset 5 in UPM RAM)
*
- * This is no UPM entry point. The following definition uses
- * the remaining space to establish an initialization
- * sequence, which is executed by a RUN command.
+ * This is no UPM entry point. The following definition uses
+ * the remaining space to establish an initialization
+ * sequence, which is executed by a RUN command.
*
*/
0x1FF5FC34, 0xEFEABC34, 0x1FB57C35, /* last */
/*
* SDRAM Initialization (offset 5 in UPM RAM)
*
- * This is no UPM entry point. The following definition uses
- * the remaining space to establish an initialization
- * sequence, which is executed by a RUN command.
+ * This is no UPM entry point. The following definition uses
+ * the remaining space to establish an initialization
+ * sequence, which is executed by a RUN command.
*
*/
0x1FF5FC34, 0xEFEABC34, 0x1FB57C35, /* last */
*/
0x0E2DBC04, 0x10AF7C04, 0xF0AFFC00, 0xF0AFFC00,
0xF1AFFC00, 0xEFBAFC00, 0x1FF5FC47, /* last */
- _NOT_USED_,
+ _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/*
*/
0x0E29BC04, 0x10A77C00, 0xF0AFFC00, 0xF0AFFC00,
0xE1BAFC04, 0x1FF5FC47, /* last */
- _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
_NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
/*
int i;
i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);
-
+
gd->kbd_status = 0;
+ /* Forced by PIC. Delays <= 175us loose */
+ udelay(1000);
+
/* Read initial keyboard error code */
val = KEYBD_CMD_READ_STATUS;
i2c_write (kbd_addr, 0, 0, &val, 1);
/*
* Read current keyboard state.
*
- * After the error reset it may take some time before the
- * keyboard PIC picks up a valid keyboard scan - the total
- * scan time is approx. 1.6 ms (information by Martin Rajek,
- * 28 Sep 2002). We read a couple of times for the keyboard
- * to stabilize, using a big enough delay.
- * 10 times should be enough. If the data is still changing,
- * we use what we get :-(
+ * After the error reset it may take some time before the
+ * keyboard PIC picks up a valid keyboard scan - the total
+ * scan time is approx. 1.6 ms (information by Martin Rajek,
+ * 28 Sep 2002). We read a couple of times for the keyboard
+ * to stabilize, using a big enough delay.
+ * 10 times should be enough. If the data is still changing,
+ * we use what we get :-(
*/
memset (tmp_data, 0xFF, KEYBD_DATALEN); /* impossible value */
printf ("Usage:\n%s\n", cmdtp->usage);
return 1;
}
-cmd_tbl_t U_BOOT_CMD(pic) = MK_CMD_ENTRY(
- "pic", 4, 1, do_pic,
- "pic - read and write PIC registers\n",
- "read reg - read PIC register `reg'\n"
- "pic write reg val - write value `val' to PIC register `reg'\n"
-);
/***********************************************************************
F* Function: int do_kbd (cmd_tbl_t *cmdtp, int flag,
return 0;
}
-cmd_tbl_t U_BOOT_CMD(kdb) = MK_CMD_ENTRY(
- "kbd", 1, 1, do_kbd,
- "kbd - read keyboard status\n",
- NULL
-);
-
/* Read and set LSB switch */
#define CFG_PC_TXD1_ENA 0x0008 /* PC.12 */
return 1;
}
-cmd_tbl_t U_BOOT_CMD(lsb) = MK_CMD_ENTRY(
- "lsb", 2, 1, do_lsb,
- "lsb - check and set LSB switch\n",
- "on - switch LSB on\n"
- "lsb off - switch LSB off\n"
- "lsb - print current setting\n"
-);
-
#endif /* CFG_CMD_BSP */
/*----------------------------- Utilities -----------------------------*/
void logbuff_init_ptrs (void)
{
DECLARE_GLOBAL_DATA_PTR;
- unsigned long *ext_tag;
char *s;
log_buf = (unsigned char *)(gd->bd->bi_memsize-LOGBUFF_LEN);
- ext_tag = (unsigned long *)(log_buf)-4;
ext_log_start = (unsigned long *)(log_buf)-3;
ext_log_size = (unsigned long *)(log_buf)-2;
ext_logged_chars = (unsigned long *)(log_buf)-1;
- if (*ext_tag!=LOGBUFF_MAGIC) {
+#ifdef CONFIG_POST
+ /* The post routines have setup the word so we can simply test it */
+ if (post_word_load () & POST_POWERON) {
logged_chars = log_size = log_start = 0;
- *ext_tag = LOGBUFF_MAGIC;
}
+#else
+ /* No post routines, so we do our own checking */
+ if (post_word_load () != LOGBUFF_MAGIC) {
+ logged_chars = log_size = log_start = 0;
+ post_word_store (LOGBUFF_MAGIC);
+ }
+#endif
/* Initialize default loglevel if present */
if ((s = getenv ("loglevel")) != NULL)
console_loglevel = (int)simple_strtoul (s, NULL, 10);
return 1;
}
}
-#if defined(CONFIG_LOGBUFFER)
-cmd_tbl_t U_BOOT_CMD(LOG) = MK_CMD_ENTRY(
- "log", 255, 1, do_log,
- "log - manipulate logbuffer\n",
- "log info - show pointer details\n"
- "log reset - clear contents\n"
- "log show - show contents\n"
- "log append <msg> - append <msg> to the logbuffer\n"
-);
-#endif /* CONFIG_LOGBUFFER */
+
static int logbuff_printk(const char *line)
{
int i;
* This test performs the system hardware monitoring.
* The test passes when all the following voltages and temperatures
* are within allowed ranges:
- *
+ *
* Board temperature
* Front temperature
* +3.3V CPU logic
* +12V PCMCIA
* +12V CCFL
* +5V standby
- *
+ *
* CCFL is not enabled if temperature values are not within allowed ranges
*
* See the list off all parameters in the sysmon_table below
{
(*l)->init(*l);
}
-
+
return 0;
}
int dec, frac;
sprintf(buf, "%+d", unit_val / s->unit_div);
-
+
frac = (unit_val > 0 ? unit_val : -unit_val) % s->unit_div;
p = buf + strlen(buf);
-
+
dec = s->unit_div;
-
+
if (dec != 1)
{
*p++ = '.';
}
-
+
for (dec /= 10; dec != 0; dec /= 10)
{
*p++ = '0' + frac / dec % 10;
}
-
+
strcpy(p, s->unit_name);
-
+
return buf;
}
printf("Error: LM87 not found at 0x%02X\n", this->chip);
return;
}
-
+
/* Configure pins 5,6 as AIN */
val = 0x03;
if (i2c_write(this->chip, 0x16, 1, &val, 1))
t->exec_after(t);
}
-#ifndef DEBUG
- if (!t->val_valid)
-#endif
+ if ((!t->val_valid) || (flags & POST_MANUAL))
{
printf("%-17s = %-10s ", t->name, sysmon_unit_value(t, val));
printf("allowed range");