Skip to contentSkip to conversation

serial driver PMC MSP71xx, kernel linux-mips.git mast er

PATCH Marc St-Jean 2 participants 2 messages Jan 24, 2007 – Jan 25, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 14 lines · Sergei Shtylyov

Hello.

Quoted 9 lines · Marc St-Jean
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

This I would hope you can hide in the platform specific serial_in/serial_out functions. If you write the UART_LCR save it in serial_out(), if you read IER etc.

I couldn't find hooks for platform specific serial_in/out functions.

It's because there are none. :-)

Quoted 1 line

Do you mean using the up->port.iotype's in serial_in/out from 8250.c?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Not sure what Alan meant, but this seems the only option for now.

That's the conclusion I came to. I've rewritten the patch to use

port.type

Quoted 1 line

instead of iotype since one of the fix is SoC and not UART specific.

I guess

I failed to folkow your logic. :-)

No longer matters as I can't use port.type. See next comment.

Quoted 6 lines
Quoted 2 lines

I could use both iotype and type with a test on each for the appropriate bug, what do you recommend?

I think iotype would be enough. You can't pass type for platform
devices
anyway, IIRC (the thing I don't quite like).

I just found that out the hard way, it get's overwritten during autoconfig* and ends up back at PORT_16550A.

I'm now trying to use my own iotype = UPIO_DWAPB and I've added it to all cases that check for UPIO_MEM. However at boot time I'm getting:

	"serial8250: ttyS0 at *unknown* (irq = 27) is a 16550A".

It looks like something outside of 8250.c must be checking for UPIO_MEM, I'm looking into it.

Quoted 17 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

And we might want to add a void * for board specific insanity to

the 8250

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

structures if we really have to so you can hang your brain damage privately off that ?

Sounds good to me, it would give us a location to store the

address of the

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

UART_STATUS_REG required by this UART variant.

I doubt we really need to *store* it somewhere. Isn't it an fixed

offset

Quoted 3 lines
Quoted 1 line

from UART's base (I haven't seen the header)?

Unfortunately it's not a constant offset from the UART in the SoC

register

Quoted 7 lines
    Hm...
Quoted 1 line

space. I've used Alan suggestion and added a classic, on some other

OSes %-|,

Quoted 1 line

void "user" pointer.

Only do not do it under #ifdef.

Understood, getting rid of them is why I started this thread.

Marc

#1 lore raw

Hello.

Quoted 6 lines · Marc St-Jean
Quoted 5 lines
Quoted 2 lines

I could use both iotype and type with a test on each for the appropriate bug, what do you recommend?

I think iotype would be enough. You can't pass type for platform
devices anyway, IIRC (the thing I don't quite like).

Quoted 8 lines

I just found that out the hard way, it get's overwritten during autoconfig* and ends up back at PORT_16550A.

I'm now trying to use my own iotype = UPIO_DWAPB and I've added it to all cases that check for UPIO_MEM. However at boot time I'm getting:

	"serial8250: ttyS0 at *unknown* (irq = 27) is a 16550A".

It looks like something outside of 8250.c must be checking for UPIO_MEM, I'm looking into it.

Yeah, be sure to change serial_core.c as well (whereever you'll see
UPIO_AU/TSI there)... Quite ugly. :-/

WBR, Sergei