[Skyeye-developer] SF.net SVN: skyeye: [329]
skyeye-v1/trunk/arch/arm/mach/ skyeye_mach_at91rm92.c
Michael.Kang
blackfin.kang at gmail.com
Sat Nov 3 19:15:49 CST 2007
Revision: 329
http://skyeye.svn.sourceforge.net/skyeye/?rev=329&view=rev
Author: kangsh
Date: 2007-11-03 04:14:07 -0700 (Sat, 03 Nov 2007)
Log Message:
-----------
Fix a bug in DBGU of at91rm9200, now uboot can receive some char
Modified Paths:
--------------
skyeye-v1/trunk/arch/arm/mach/skyeye_mach_at91rm92.c
Modified: skyeye-v1/trunk/arch/arm/mach/skyeye_mach_at91rm92.c
===================================================================
--- skyeye-v1/trunk/arch/arm/mach/skyeye_mach_at91rm92.c
2007-11-02 15:29:15 UTC (rev 328)
+++ skyeye-v1/trunk/arch/arm/mach/skyeye_mach_at91rm92.c
2007-11-03 11:14:07 UTC (rev 329)
@@ -184,7 +184,7 @@
}
}
}
- if( (((io.dbgu.cr & 0x30) >> 4)) == 0x2) /* If
RX is enabled */
+ if(io.dbgu.cr & 0x10) /* If RXEN is set */
{
/* at the same time we think DBGU is
also waiting to receiving */
io.dbgu.rhr = (int) buf;
@@ -199,8 +199,9 @@
static void
at91rm92_uart_read (u32 offset, u32 * data)
{
- int i = (offset - AT91RM92_UART_BASE) / AT91RM92_UART_SIZE;
- offset = offset - AT91RM92_UART_BASE - i * AT91RM92_UART_SIZE;
+ int i = (offset >> 14) & 0x3;
+ offset = offset & 0xFFF;
+
switch (offset) {
case US_MR:
*data = io.uart[i].mr;
@@ -247,9 +248,10 @@
{
SKYEYE_DBG ("at91rm92_uart_write(0x%x, 0x%x)\n", offset, data);
- int i = (offset - AT91RM92_UART_BASE) / AT91RM92_UART_SIZE;
- offset = offset - AT91RM92_UART_BASE - i * AT91RM92_UART_SIZE;
+ int i = (offset >> 14) & 0x3;
+ offset = offset & 0xFFF;
+
switch (offset) {
case US_CR:
io.uart[i].cr = data;
This was sent by the SourceForge.net collaborative development
platform, the world's largest Open Source development site.
--
www.skyeye.org
More information about the Skyeye-developer
mailing list