Commit 19268834fb208a7deb43f9a00b034e0c6abab3cd

Authored by Bin Meng
Committed by Simon Glass
1 parent d21d05f19a

x86: Set serial port IRQ for SMSC LPC47M

For starting a Linux console on the superio serial port under
interrupt mode, the IRQ number must be configured.

Signed-off-by: Jian Luo <jian.luo4@boschrexroth.de>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>

Showing 5 changed files with 9 additions and 4 deletions Side-by-side Diff

arch/x86/include/asm/ibmpc.h
... ... @@ -21,5 +21,8 @@
21 21 #define UART0_BASE 0x3f8
22 22 #define UART1_BASE 0x2f8
23 23  
  24 +#define UART0_IRQ 4
  25 +#define UART1_IRQ 3
  26 +
24 27 #endif
board/intel/crownbay/crownbay.c
... ... @@ -16,7 +16,7 @@
16 16  
17 17 int board_early_init_f(void)
18 18 {
19   - lpc47m_enable_serial(SERIAL_DEV, UART0_BASE);
  19 + lpc47m_enable_serial(SERIAL_DEV, UART0_BASE, UART0_IRQ);
20 20  
21 21 return 0;
22 22 }
board/intel/minnowmax/minnowmax.c
... ... @@ -16,7 +16,7 @@
16 16  
17 17 int board_early_init_f(void)
18 18 {
19   - lpc47m_enable_serial(SERIAL_DEV, UART0_BASE);
  19 + lpc47m_enable_serial(SERIAL_DEV, UART0_BASE, UART0_IRQ);
20 20  
21 21 return 0;
22 22 }
drivers/misc/smsc_lpc47m.c
... ... @@ -22,12 +22,13 @@
22 22 outb(0xaa, port);
23 23 }
24 24  
25   -void lpc47m_enable_serial(u16 dev, u16 iobase)
  25 +void lpc47m_enable_serial(u16 dev, u16 iobase, u8 irq)
26 26 {
27 27 pnp_enter_conf_state(dev);
28 28 pnp_set_logical_device(dev);
29 29 pnp_set_enable(dev, 0);
30 30 pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
  31 + pnp_set_irq(dev, PNP_IDX_IRQ0, irq);
31 32 pnp_set_enable(dev, 1);
32 33 pnp_exit_conf_state(dev);
33 34 }
include/smsc_lpc47m.h
... ... @@ -13,8 +13,9 @@
13 13 *
14 14 * @dev: High 8 bits = Super I/O port, low 8 bits = logical device number.
15 15 * @iobase: Processor I/O port address to assign to this serial device.
  16 + * @irq: Processor IRQ number to assign to this serial device.
16 17 */
17   -void lpc47m_enable_serial(u16 dev, u16 iobase);
  18 +void lpc47m_enable_serial(u16 dev, u16 iobase, u8 irq);
18 19  
19 20 #endif /* _SMSC_LPC47M_H_ */