[PATCH 1/2] spi: bcm2835: add spi-bcm2835aux driver for the auxiliar spi1 and spi2

Martin Sperl kernel at martin.sperl.org
Sun Jul 5 06:11:52 PDT 2015


> On 05.07.2015, at 20:37, Noralf Trønnes <noralf at tronnes.org> wrote:
> 
> I have looked closer at the 8250 serial driver, and in fact it has a
> framework for writing 8250 like drivers. This makes it easy to extend
> it to include support for the mini uart.
> drivers/tty/serial/8250/8250_dw.c is an example of a driver that
> overrides the interrupt handler. So a 8250_bcm2835.c can easily be
> made with interrupt sharing as you suggest (and aux enabling). But
> this means that the irq status register has to be included in the
> syscon regmap as well.

With the Module parameter share_irqs=1 the stock 8250 driver will
request a shared irq, but you can also control it via:
CONFIG_SERIAL_8250_SHARE_IRQ

As for regmap support - the driver only uses the status register of
the uart so it does not need access to the shared interrupt flag register.
(If no irq condition is detected then IRQ_NoNE is returned and the
Shared irq system will call the next irq handler in the list)

So all that is left to do is enabling the uart device in the aux-enable
registers using regmap and then the uart can get used.

Martin


More information about the linux-rpi-kernel mailing list