summaryrefslogtreecommitdiff
path: root/board/pcs440ep
diff options
context:
space:
mode:
Diffstat (limited to 'board/pcs440ep')
-rw-r--r--board/pcs440ep/flash.c11
-rw-r--r--board/pcs440ep/pcs440ep.c37
2 files changed, 39 insertions, 9 deletions
diff --git a/board/pcs440ep/flash.c b/board/pcs440ep/flash.c
index 7001440..c5a62e2 100644
--- a/board/pcs440ep/flash.c
+++ b/board/pcs440ep/flash.c
@@ -82,6 +82,7 @@ void flash_print_info(flash_info_t *info)
case FLASH_MAN_AMD: printf ("AMD "); break;
case FLASH_MAN_FUJ: printf ("FUJITSU "); break;
case FLASH_MAN_SST: printf ("SST "); break;
+ case FLASH_MAN_STM: printf ("ST Micro"); break;
case FLASH_MAN_EXCEL: printf ("Excel Semiconductor "); break;
case FLASH_MAN_MX: printf ("MXIC "); break;
default: printf ("Unknown Vendor "); break;
@@ -118,6 +119,8 @@ void flash_print_info(flash_info_t *info)
break;
case FLASH_SST040: printf ("SST39LF/VF040 (4 Mbit, uniform sector size)\n");
break;
+ case STM_ID_M29W040B: printf ("ST Micro M29W040B (4 Mbit, uniform sector size)\n");
+ break;
default: printf ("Unknown Chip Type\n");
break;
}
@@ -193,6 +196,9 @@ static ulong flash_get_size(vu_long *addr, flash_info_t *info)
case (CFG_FLASH_WORD_SIZE)SST_MANUFACT:
info->flash_id = FLASH_MAN_SST;
break;
+ case (CFG_FLASH_WORD_SIZE)STM_MANUFACT:
+ info->flash_id = FLASH_MAN_STM;
+ break;
case (CFG_FLASH_WORD_SIZE)EXCEL_MANUFACT:
info->flash_id = FLASH_MAN_EXCEL;
break;
@@ -226,6 +232,11 @@ static ulong flash_get_size(vu_long *addr, flash_info_t *info)
info->sector_count = 8;
info->size = 0x0080000; /* => 0.5 MB */
break;
+ case (CFG_FLASH_WORD_SIZE)STM_ID_M29W040B:
+ info->flash_id += FLASH_AM040;
+ info->sector_count = 8;
+ info->size = 0x0080000; /* => 0,5 MB */
+ break;
case (CFG_FLASH_WORD_SIZE)AMD_ID_LV800T:
info->flash_id += FLASH_AM800T;
diff --git a/board/pcs440ep/pcs440ep.c b/board/pcs440ep/pcs440ep.c
index ada6b82..0e34a76 100644
--- a/board/pcs440ep/pcs440ep.c
+++ b/board/pcs440ep/pcs440ep.c
@@ -85,8 +85,9 @@ static void status_led_blink (void)
/* set all LED which are on, to state BLINKING */
for (i = 0; i < 4; i++) {
- if (val & 0x08) status_led_set (i, STATUS_LED_BLINKING);
- val = val << 1;
+ if (val & 0x01) status_led_set (3 - i, STATUS_LED_BLINKING);
+ else status_led_set (3 - i, STATUS_LED_OFF);
+ val = val >> 1;
}
}
@@ -113,12 +114,14 @@ void show_boot_progress (int val)
status_led_set (1, STATUS_LED_ON);
status_led_set (2, STATUS_LED_ON);
break;
+#if 0
case 64:
/* starting Ethernet configuration */
status_led_set (0, STATUS_LED_OFF);
status_led_set (1, STATUS_LED_OFF);
status_led_set (2, STATUS_LED_ON);
break;
+#endif
case 80:
/* loading Image */
status_led_set (0, STATUS_LED_ON);
@@ -404,6 +407,9 @@ static void pcs440ep_checksha1 (void)
int ret;
char *cs_test;
+ status_led_set (0, STATUS_LED_OFF);
+ status_led_set (1, STATUS_LED_OFF);
+ status_led_set (2, STATUS_LED_ON);
ret = pcs440ep_sha1 (1);
if (ret == 0) return;
@@ -751,28 +757,41 @@ void hw_watchdog_reset(void)
************************************************************************/
int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
- int rcode = 0;
+ int rcode = 0, i;
ulong pattern = 0;
- pattern = simple_strtoul (argv[1], NULL, 10);
- if (pattern > 200) {
+ pattern = simple_strtoul (argv[1], NULL, 16);
+ if (pattern > 0x400) {
+ int val = GET_LEDS;
+ printf ("led: %x\n", val);
+ return rcode;
+ }
+ if (pattern > 0x200) {
status_led_blink ();
hang ();
return rcode;
}
- if (pattern > 100) {
+ if (pattern > 0x100) {
status_led_blink ();
return rcode;
}
pattern &= 0x0f;
- set_leds (pattern);
+ for (i = 0; i < 4; i++) {
+ if (pattern & 0x01) status_led_set (i, STATUS_LED_ON);
+ else status_led_set (i, STATUS_LED_OFF);
+ pattern = pattern >> 1;
+ }
return rcode;
}
U_BOOT_CMD(
led, 2, 1, do_led,
- "led - set the led\n",
- NULL
+ "led [bitmask] - set the DIAG-LED\n",
+ "[bitmask] 0x01 = DIAG 1 on\n"
+ " 0x02 = DIAG 2 on\n"
+ " 0x04 = DIAG 3 on\n"
+ " 0x08 = DIAG 4 on\n"
+ " > 0x100 set the LED, who are on, to state blinking\n"
);
#if defined(CONFIG_SHA1_CHECK_UB_IMG)