This is the same method as used in the serial driver. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>