Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH 1/2] tty: serial: Fix build on architecture that does not have ioport | Date | Fri, 11 Mar 2011 08:58:29 +0100 |
| |
On Friday 11 March 2011 06:54:56 Nobuhiro Iwamatsu wrote: > Some CPU's do not have ioport. Therefore, these do not have inX/outX. > Because they define CONFIG_NO_IOPORT, These CPU's use this and do not > use inX/outX. > > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
I like this patch, I had played with something similar before but never got it to the state where I was happy with submitting it. I'd really like to get us to the point where platforms without PCI support do don't need to define inb/outb and can still use all other drivers.
There are two small improvements that I would like to suggest to this patch:
* use #ifdef CONFIG_SERIAL_8250_HUB6 to configure out hub6 support. It's already disabled on most systems, so we can save a bit binary code without making the driver uglier.
* Introduce a new CONFIG_SERIAL_8250_IOPORT symbol and make the normal io_serial_* code depend on that. It can be a silent Kconfig symbol that automatically gets selected in the appropriate cases. I find this clearer than the double negation in "not no ioport". The code that is used in both HUB6 and regular cases can be under this symbol.
Arnd
| |