Skip to content

Commit

Permalink
tty: xuartps: Don't write IRQ disable register to enable interrupts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Soren Brinkmann authored and Greg Kroah-Hartman committed Apr 24, 2014
1 parent 35dc5a5 commit b494a5f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/tty/serial/xilinx_uartps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,11 +1085,7 @@ static void xuartps_console_write(struct console *co, const char *s,

xuartps_writel(ctrl, XUARTPS_CR_OFFSET);

/* restore interrupt state, it seems like there may be a h/w bug
* in that the interrupt enable register should not need to be
* written based on the data sheet
*/
xuartps_writel(~imr, XUARTPS_IDR_OFFSET);
/* restore interrupt state */
xuartps_writel(imr, XUARTPS_IER_OFFSET);

if (locked)
Expand Down

0 comments on commit b494a5f

Please sign in to comment.