Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: xuartps: Don't write IRQ disable register to enable interrupts

A comment states, that, according to the data sheet, to enable
interrupts the disable register should be written, but the enable
register could be left untouched. And it suspsects a HW bug requiring
to write both.
Reviewing the data sheet, these statements seem wrong. Just as one would
expect. Writing to the enable/disable register enables/disables
interrupts.
Hence the misleading comment and needless write to the disable register
are removed from the enable sequence.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Soren Brinkmann and committed by
Greg Kroah-Hartman
b494a5fa 35dc5a53

+1 -5
+1 -5
drivers/tty/serial/xilinx_uartps.c
··· 1085 1085 1086 1086 xuartps_writel(ctrl, XUARTPS_CR_OFFSET); 1087 1087 1088 - /* restore interrupt state, it seems like there may be a h/w bug 1089 - * in that the interrupt enable register should not need to be 1090 - * written based on the data sheet 1091 - */ 1092 - xuartps_writel(~imr, XUARTPS_IDR_OFFSET); 1088 + /* restore interrupt state */ 1093 1089 xuartps_writel(imr, XUARTPS_IER_OFFSET); 1094 1090 1095 1091 if (locked)