Skip to contentSkip to conversation

Physical addresses fix for au1x00 serial driver

PATCH In review Rodolfo Giometti 2 participants 5 messages May 4, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Physical addresses fix for au1x00 serial driver

Hello,

here:

http://ftp.enneenne.com/pub/misc/au1100-patches/linux/patch-au1x00-serial-phys-addr

a little patch (against «linux-2.6.16-stable» branch and tested on au1100 based board) to fix the addresses specification for the serial driver. With this patch at boot time we get:

Serial: 8250/16550 driver $Revision: 1.90 $ 3 ports, IRQ sharing disabled serial8250.7: ttyS0 at MMIO 0x11100000 (irq = 0) is a 16550A serial8250.7: ttyS1 at MMIO 0x11200000 (irq = 1) is a 16550A serial8250.7: ttyS2 at MMIO 0x11400000 (irq = 3) is a 16550A

and into procfs we read:

   wwpc:~# cat /proc/iomem                                                         
   10100000-10200000 : au1xxx-ohci.0                                               
   10500000-1050ffff : eth-base                                                    
   10520000-10520003 : eth-mac                                                     
   11100000-1110001f : serial                                                      
   11200000-1120001f : serial                                                      
   11400000-1140001f : serial                                                      
   wwpc:~# cat /proc/tty/driver/serial                                             
   serinfo:1.0 driver revision:                                                    
   0: uart:16550A port:11100000 irq:0 tx:3905 rx:39 RTS|CTS|DTR|DSR|CD|RI          
   1: uart:16550A port:11200000 irq:1 tx:0 rx:0 CTS|DSR|CD|RI                      
   2: uart:16550A port:11400000 irq:3 tx:0 rx:0 CTS|DSR|CD|RI                      

Ciao,

Rodolfo

Signature · 4 lines
GNU/Linux Solutions                  e-mail:    [email protected]
Linux Device Driver                             [email protected]
Embedded Systems                     		[email protected]
UNIX programming                     phone:     +39 349 2432127
#1 lore raw

Hello.

Quoted 4 lines · Rodolfo Giometti

here:

   http://ftp.enneenne.com/pub/misc/au1100-patches/linux/patch-au1x00-serial-phys-addr
Quoted 8 lines

a little patch (against «linux-2.6.16-stable» branch and tested on au1100 based board) to fix the addresses specification for the serial driver. With this patch at boot time we get:

   Serial: 8250/16550 driver $Revision: 1.90 $ 3 ports, IRQ sharing disabled       
   serial8250.7: ttyS0 at MMIO 0x11100000 (irq = 0) is a 16550A                    
   serial8250.7: ttyS1 at MMIO 0x11200000 (irq = 1) is a 16550A                    
   serial8250.7: ttyS2 at MMIO 0x11400000 (irq = 3) is a 16550A                    

I have already noticed and fixed this. The fix is in Andrew Morton's tree
(unpublished yet). See this msg for the patch:

http://www.linux-mips.org/archives/linux-mips/2006-04/msg00029.html

Quoted 13 lines
   wwpc:~# cat /proc/iomem 
   10100000-10200000 : au1xxx-ohci.0 

   10500000-1050ffff : eth-base 

   10520000-10520003 : eth-mac 

   11100000-1110001f : serial 

   11200000-1120001f : serial 

   11400000-1140001f : serial 

This is not quite correct. The UARTs take up 1 MB of memory each.

Quoted 3 lines

Ciao,

Rodolfo

WBR, Sergei

#2 lore raw
Quoted 5 lines · Sergei Shtylyov

I have already noticed and fixed this. The fix is in Andrew Morton's tree (unpublished yet). See this msg for the patch:

http://www.linux-mips.org/archives/linux-mips/2006-04/msg00029.html

I see. :)

Quoted 1 line

This is not quite correct. The UARTs take up 1 MB of memory each.

Yes, in my patch is missing this part:

           switch (up->port.iotype) {
   +       case UPIO_AU:
   +               size = 0x100000;
   +               /* fall thru */
           case UPIO_MEM:
                   if (!up->port.mapbase)

Are you already working on 8250_early for au1x00? I'm quite ready for the patch. :)

Ciao,

Rodolfo

Signature · 4 lines
GNU/Linux Solutions                  e-mail:    [email protected]
Linux Device Driver                             [email protected]
Embedded Systems                     		[email protected]
UNIX programming                     phone:     +39 349 2432127
#3 lore raw
Quoted 1 line · Rodolfo Giometti
Quoted 1 line

This is not quite correct. The UARTs take up 1 MB of memory each.

The patch:

   diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
   index 8365d5b..3473e7a 100644
   --- a/drivers/serial/8250.c
   +++ b/drivers/serial/8250.c
   @@ -1935,8 +1935,10 @@ static int serial8250_request_std_resour
    	int ret = 0;
    	switch (up->port.iotype) {
   -	case UPIO_MEM:
    	case UPIO_AU:
   +		size = 0x100000;
   +		/* fall thru */
   +	case UPIO_MEM:
    		if (!up->port.mapbase)
    			break;

I'll merge this patch with my previous one ASAP...

Ciao,

Rodolfo

Signature · 4 lines
GNU/Linux Solutions                  e-mail:    [email protected]
Linux Device Driver                             [email protected]
Embedded Systems                     		[email protected]
UNIX programming                     phone:     +39 349 2432127
#4 lore raw

Hello.

Quoted 20 lines · Rodolfo Giometti
Quoted 1 line
Quoted 1 line

This is not quite correct. The UARTs take up 1 MB of memory each.

The patch:

   diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
   index 8365d5b..3473e7a 100644
   --- a/drivers/serial/8250.c
   +++ b/drivers/serial/8250.c
   @@ -1935,8 +1935,10 @@ static int serial8250_request_std_resour
    	int ret = 0;
    	switch (up->port.iotype) {
   -	case UPIO_MEM:
    	case UPIO_AU:
   +		size = 0x100000;
   +		/* fall thru */
   +	case UPIO_MEM:
    		if (!up->port.mapbase)
    			break;
Quoted 1 line

I'll merge this patch with my previous one ASAP...

Better just use my patch. There's no sense in calling ioremp() on UART
addresses.

Quoted 3 lines

Ciao,

Rodolfo

WBR, Sergei