diff options
author | Hamish Guthrie <hcg@openwrt.org> | 2007-06-11 14:54:14 +0000 |
---|---|---|
committer | Hamish Guthrie <hcg@openwrt.org> | 2007-06-11 14:54:14 +0000 |
commit | 3e99ade5a2f6331d7a101e0555a06489cc9bf31c (patch) | |
tree | 8079623de92148373189512729fdbd3574549421 /target/linux/at91-2.6/image/dfboot/src/com.c | |
parent | 49c94335fe7e3cf73688c8a8c896ab5e6abc079b (diff) | |
download | master-187ad058-3e99ade5a2f6331d7a101e0555a06489cc9bf31c.tar.gz master-187ad058-3e99ade5a2f6331d7a101e0555a06489cc9bf31c.tar.bz2 master-187ad058-3e99ade5a2f6331d7a101e0555a06489cc9bf31c.zip |
Corrected dfboot issue with ttyS2 and ttyS3
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7566 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/at91-2.6/image/dfboot/src/com.c')
-rw-r--r-- | target/linux/at91-2.6/image/dfboot/src/com.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/target/linux/at91-2.6/image/dfboot/src/com.c b/target/linux/at91-2.6/image/dfboot/src/com.c index 38a2898f7e..aacfb55558 100644 --- a/target/linux/at91-2.6/image/dfboot/src/com.c +++ b/target/linux/at91-2.6/image/dfboot/src/com.c @@ -21,7 +21,10 @@ static char erase_seq[] = "\b \b"; /* erase sequence */ -unsigned int usa[2] = {(unsigned int)AT91C_BASE_DBGU, (unsigned int)AT91C_ALTERNATE_USART}; +#define MAX_UARTS 1 + +//unsigned int usa[2] = {(unsigned int)AT91C_BASE_DBGU, (unsigned int)AT91C_ALTERNATE_USART}; +unsigned int usa[1] = {(unsigned int)AT91C_BASE_DBGU}; unsigned int us; int port_detected; @@ -34,7 +37,7 @@ void at91_init_uarts(void) AT91F_US0_CfgPIO(); AT91F_US0_CfgPMC(); - for(i=0; i<2; i++) { + for(i=0; i<MAX_UARTS; i++) { us = usa[i]; AT91F_US_ResetRx((AT91PS_USART)us); AT91F_US_ResetTx((AT91PS_USART)us); @@ -74,6 +77,7 @@ int at91_serial_putc(int ch) int at91_serial_getc() { while(1) { +#if 0 if (!port_detected) { if (us == usa[0]) { us = usa[1]; @@ -82,8 +86,11 @@ int at91_serial_getc() us = usa[0]; } } +#endif if(AT91F_US_RxReady((AT91PS_USART)us)) { +#if 0 port_detected = 1; +#endif return((int)AT91F_US_GetChar((AT91PS_USART)us)); } } |