Serial: AT91: Handle shutdown more safely

Interrupts were being cleaned up late in the shutdown handler, it is possible that an interrupt can occur and schedule a tasklet that runs after the port is cleaned up. A null dereference occured due to this race condition occuring with the following stacktrace:

[<c02092b0>] (atmel_tasklet_func+0x514/0x814) from [<c001fd34>] (tasklet_action+0x70/0xa8)
[<c001fd34>] (tasklet_action+0x70/0xa8) from [<c001f60c>] (__do_softirq+0x90/0x144)
[<c001f60c>] (__do_softirq+0x90/0x144) from [<c001fa18>] (irq_exit+0x40/0x4c)
[<c001fa18>] (irq_exit+0x40/0x4c) from [<c000e298>] (handle_IRQ+0x64/0x84)
[<c000e298>] (handle_IRQ+0x64/0x84) from [<c000d6c0>] (__irq_svc+0x40/0x50)
[<c000d6c0>] (__irq_svc+0x40/0x50) from [<c0208060>] (atmel_rx_dma_release+0x88/0xb8)
[<c0208060>] (atmel_rx_dma_release+0x88/0xb8) from [<c0209740>] (atmel_shutdown+0x104/0x160)
[<c0209740>] (atmel_shutdown+0x104/0x160) from [<c0205e8c>] (uart_port_shutdown+0x2c/0x38)

Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
pinctrl: at91: add drive strength config options

The SAMA5 and SAMA92x5, SAM9G25 and SAM9G35 and others implement the ability to select the output drive strength for pins. The configuration typically allows low, medium and high power modes with predefined current limits. This only reserves 3 bits in the pinctrl config(bits 5,6 and 7) for drive strength. The first bit enables setting the drive strength, the other two bits(6,7) set the drive strength to the specified level which is dependent on the chip.

i.e. A9s:
00 = high
01 = medium
10 = low
11 = reserved/undefined

the A5 does
00 = low
01 = low
10 = medium
11 = high

Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
serial: at91: fix race condition in atmel_serial_remove

The _remove callback could be called when a tasklet is scheduled. tasklet_kill was called inside the function in order to free up any scheduled tasklets. However it was called after uart_remove_one_port which destroys  tty references needed in the port for atmel_tasklet_func. Simply putting the tasklet_kill at the start of the function will prevent this  conflict.

Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
serial: at91: prevent null dereference in tasklet function

Something schedules a tasklet to be scheduled when the uart port is closed. Need to supress the kernel panic for now by checking if the port is NULL or not.

Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
testing

Signed-off-by: Marek Roszko <mark.roszko@gmail.com>