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