Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Bin Meng | 0966130 | 2014-12-12 21:05:25 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com> |
Bin Meng | 0966130 | 2014-12-12 21:05:25 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _SMSC_LPC47M_H_ |
| 7 | #define _SMSC_LPC47M_H_ |
| 8 | |
Bin Meng | df92cee | 2015-08-21 00:18:51 -0700 | [diff] [blame] | 9 | /* I/O address of LPC47M */ |
| 10 | #define LPC47M_IO_PORT 0x2e |
| 11 | |
| 12 | /* Logical device number */ |
| 13 | #define LPC47M_FDC 0 /* Floppy */ |
| 14 | #define LPC47M_SP2 2 /* Serial Port 2 */ |
| 15 | #define LPC47M_PP 3 /* Parallel Port */ |
| 16 | #define LPC47M_SP1 4 /* Serial Port 1 */ |
| 17 | #define LPC47M_KBC 7 /* Keyboard & Mouse */ |
| 18 | #define LPC47M_PME 10 /* Power Control */ |
| 19 | |
Bin Meng | 0966130 | 2014-12-12 21:05:25 +0800 | [diff] [blame] | 20 | /** |
| 21 | * Configure the base I/O port of the specified serial device and enable the |
| 22 | * serial device. |
| 23 | * |
Bin Meng | df92cee | 2015-08-21 00:18:51 -0700 | [diff] [blame] | 24 | * @dev: high 8 bits = super I/O port, low 8 bits = logical device number |
| 25 | * @iobase: processor I/O port address to assign to this serial device |
| 26 | * @irq: processor IRQ number to assign to this serial device |
| 27 | */ |
| 28 | void lpc47m_enable_serial(uint dev, uint iobase, uint irq); |
| 29 | |
| 30 | /** |
| 31 | * Configure the specified keyboard controller device and enable the keyboard |
| 32 | * controller device. |
| 33 | * |
| 34 | * @dev: high 8 bits = Super I/O port, low 8 bits = logical device number |
| 35 | * @irq0: processor IRQ number to assign to keyboard |
| 36 | * @irq1: processor IRQ number to assign to mouse |
Bin Meng | 0966130 | 2014-12-12 21:05:25 +0800 | [diff] [blame] | 37 | */ |
Bin Meng | df92cee | 2015-08-21 00:18:51 -0700 | [diff] [blame] | 38 | void lpc47m_enable_kbc(uint dev, uint irq0, uint irq1); |
Bin Meng | 0966130 | 2014-12-12 21:05:25 +0800 | [diff] [blame] | 39 | |
| 40 | #endif /* _SMSC_LPC47M_H_ */ |