> > Then you can't select SERIAL_8250 as a module at all, right? > > Correct, unless SERIAL_8250_FOL=n of course.> > > Perhaps you should allow SERIAL_8250_FSL to be a module as well here?> > So changing the bool to a tristate should be the correct option? Can> > you try that?> > Yep, that works also. New patch below. > > This should probably be aced by Paul to ensure he's cool with it being> a module now.

This will still be broken, but in a different place and for differentboards. [The legacy_serial.c won't link for 8250=m on FSL boards.]

I think your original fix was closer to the right one. Let me expandon that. This thing isn't a real stand alone driver. It is an erratafix that is specific to Freescale boards, and only is relevant in fixingmagic SysRQ functionality on the serial console. The Freescale boardsare almost exclusively headless, with a serial console interface tou-boot as the only way to do initial interaction with the board atbootup. So having serial as a module on these boards is largelyacademic. (But if you want modular serial, you still can, and youdont need the errata fix for that.)

So, with all that in mind, I think this is the right fix. I'll launchsome build coverage against it, but it seems straightforward. Thanksfor the report, and sorry for catching pmac in the fallout.

The recent commit "serial: add irq handler for Freescale 16550 errata"would allow Kconfig choices that had 8250 support as a module andyet still try and build in the errata fix non-modular, resultingin build failures for some non-embedded PPC targets.

Since we hook in the errata fix from legacy_serial.c, which isbuilt only for PPC_UDBG_16550, and since the errata is only reallyrelevant for SysRQ on serial console, tighten up the dependenciesto be exactly that.

We'll get coverage on the relevant Freescale boards because theKconfig for their CPU types all select the PPC_UDBG_16550 option,and the defconfigs also all select the 8250_CONSOLE option. Also,the 8250_CONSOLE option has a strict dependency on "SERIAL_8250=y"which resolves the reported problem for non Freescale targets.