summaryrefslogtreecommitdiff
path: root/board/netphone
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-04-23 20:32:05 +0000
committerwdenk <wdenk>2004-04-23 20:32:05 +0000
commit5cf91d6bdc3e60bd43f9ba1bbb97a43ee49b2b2d (patch)
tree5fe88f0a967da1a8d4f073b27294be5fa939c19d /board/netphone
parente35745bb64fae64da3e1fa7f4afe3213287f5908 (diff)
downloadu-boot-imx-5cf91d6bdc3e60bd43f9ba1bbb97a43ee49b2b2d.zip
u-boot-imx-5cf91d6bdc3e60bd43f9ba1bbb97a43ee49b2b2d.tar.gz
u-boot-imx-5cf91d6bdc3e60bd43f9ba1bbb97a43ee49b2b2d.tar.bz2
* Modify KUP4X board configuration to use SL811 driver for USB memory
sticks (including FAT / VFAT filesystem support) * Add SL811 Host Controller Interface driver for USB * Add CFG_I2C_EEPROM_ADDR_OVERFLOW desription to README * Patch by Pantelis Antoniou, 19 Apr 2004: Allow to use shell style syntax (i. e. ${var} ) with standard parser. Minor patches for Intracom boards. * Patch by Christian Pell, 19 Apr 2004: cleanup support for CF/IDE on PCMCIA for PXA25X
Diffstat (limited to 'board/netphone')
-rw-r--r--board/netphone/netphone.c8
-rw-r--r--board/netphone/phone_console.c20
2 files changed, 22 insertions, 6 deletions
diff --git a/board/netphone/netphone.c b/board/netphone/netphone.c
index 91943c9..698115a 100644
--- a/board/netphone/netphone.c
+++ b/board/netphone/netphone.c
@@ -30,6 +30,7 @@
#include <common.h>
#include <miiphy.h>
#include <sed156x.h>
+#include <status_led.h>
#include "mpc8xx.h"
@@ -659,6 +660,7 @@ int overwrite_console(void)
extern int drv_phone_init(void);
extern int drv_phone_use_me(void);
+extern int drv_phone_is_idle(void);
int misc_init_r(void)
{
@@ -691,6 +693,12 @@ int last_stage_init(void)
do_poll();
if (drv_phone_use_me()) {
+ status_led_set(0, STATUS_LED_ON);
+ while (!drv_phone_is_idle()) {
+ do_poll();
+ udelay(1000000 / CFG_HZ);
+ }
+
console_assign(stdin, "phone");
console_assign(stdout, "phone");
console_assign(stderr, "phone");
diff --git a/board/netphone/phone_console.c b/board/netphone/phone_console.c
index a0485b0..c6a59af 100644
--- a/board/netphone/phone_console.c
+++ b/board/netphone/phone_console.c
@@ -179,7 +179,6 @@ static int last_input_mode;
static int refresh_time;
static int blink_time;
static char last_fast_punct;
-static int last_tab_indicator = -1;
/*************************************************************************************************/
@@ -239,8 +238,6 @@ static void console_init(void)
refresh_time = REFRESH_HZ;
blink_time = BLINK_HZ;
- tab_indicator = 1;
-
memset(vty_buf, ' ', sizeof(vty_buf));
memset(last_visible_buf, ' ', sizeof(last_visible_buf));
@@ -253,6 +250,8 @@ static void console_init(void)
sed156x_init();
width = sed156x_text_width;
height = sed156x_text_height - 1;
+
+ tab_indicator = 0;
}
/*****************************************************************************/
@@ -718,8 +717,10 @@ static void update(void)
if (input_mode != last_input_mode)
sed156x_output_at(sed156x_text_width - 3, sed156x_text_height - 1, input_mode_txt[input_mode], 3);
- if (tab_indicator != last_tab_indicator)
+ if (tab_indicator == 0) {
sed156x_output_at(0, sed156x_text_height - 1, "\\t", 2);
+ tab_indicator = 1;
+ }
if (fast_punct != last_fast_punct)
sed156x_output_at(4, sed156x_text_height - 1, &fast_punct, 1);
@@ -779,7 +780,6 @@ static void update(void)
last_input_mode = input_mode;
last_fast_punct = fast_punct;
- last_tab_indicator = tab_indicator;
}
/* ensure visibility; the trick is to minimize the screen movement */
@@ -891,7 +891,8 @@ void phone_putc(const char c)
blink_time = BLINK_HZ;
switch (c) {
- case 13: /* ignore */
+ case '\a': /* ignore bell */
+ case '\r': /* ignore carriage return */
break;
case '\n': /* next line */
@@ -1141,3 +1142,10 @@ static void kp_do_poll(void)
break;
}
}
+
+/**************************************************************************************/
+
+int drv_phone_is_idle(void)
+{
+ return kp_state == SCAN;
+}