Skip to content

Commit

Permalink
x86: Set serial port IRQ for SMSC LPC47M
Browse files Browse the repository at this point in the history
For starting a Linux console on the superio serial port under
interrupt mode, the IRQ number must be configured.

Signed-off-by: Jian Luo <[email protected]>
Signed-off-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
  • Loading branch information
lbmeng authored and sjg20 committed Apr 30, 2015
1 parent d21d05f commit 1926883
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions arch/x86/include/asm/ibmpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
#define UART0_BASE 0x3f8
#define UART1_BASE 0x2f8

#define UART0_IRQ 4
#define UART1_IRQ 3

#endif
2 changes: 1 addition & 1 deletion board/intel/crownbay/crownbay.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DECLARE_GLOBAL_DATA_PTR;

int board_early_init_f(void)
{
lpc47m_enable_serial(SERIAL_DEV, UART0_BASE);
lpc47m_enable_serial(SERIAL_DEV, UART0_BASE, UART0_IRQ);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion board/intel/minnowmax/minnowmax.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DECLARE_GLOBAL_DATA_PTR;

int board_early_init_f(void)
{
lpc47m_enable_serial(SERIAL_DEV, UART0_BASE);
lpc47m_enable_serial(SERIAL_DEV, UART0_BASE, UART0_IRQ);

return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/misc/smsc_lpc47m.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ static void pnp_exit_conf_state(u16 dev)
outb(0xaa, port);
}

void lpc47m_enable_serial(u16 dev, u16 iobase)
void lpc47m_enable_serial(u16 dev, u16 iobase, u8 irq)
{
pnp_enter_conf_state(dev);
pnp_set_logical_device(dev);
pnp_set_enable(dev, 0);
pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
pnp_set_irq(dev, PNP_IDX_IRQ0, irq);
pnp_set_enable(dev, 1);
pnp_exit_conf_state(dev);
}
3 changes: 2 additions & 1 deletion include/smsc_lpc47m.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
*
* @dev: High 8 bits = Super I/O port, low 8 bits = logical device number.
* @iobase: Processor I/O port address to assign to this serial device.
* @irq: Processor IRQ number to assign to this serial device.
*/
void lpc47m_enable_serial(u16 dev, u16 iobase);
void lpc47m_enable_serial(u16 dev, u16 iobase, u8 irq);

#endif /* _SMSC_LPC47M_H_ */

0 comments on commit 1926883

Please sign in to comment.