src: Add required space after "switch"
[coreboot.git] / src / superio / nsc / pc87417 / superio.c
blobbf33d69fb1f43f3c54edc9add98df3dc6fcece2f
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2000 AG Electronics Ltd.
5 * Copyright (C) 2003-2004 Linux Networx
6 * Copyright (C) 2004 Tyan
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
19 #include <arch/io.h>
20 #include <device/device.h>
21 #include <device/pnp.h>
22 #include <string.h>
23 #include <pc80/keyboard.h>
24 #include <stdlib.h>
25 #include "pc87417.h"
27 static void init(struct device *dev)
29 if (!dev->enabled)
30 return;
32 switch (dev->path.pnp.device) {
33 case PC87417_KBCK:
34 pc_keyboard_init(NO_AUX_DEVICE);
35 break;
39 static struct device_operations ops = {
40 .read_resources = pnp_read_resources,
41 .set_resources = pnp_set_resources,
42 .enable_resources = pnp_enable_resources,
43 .enable = pnp_enable,
44 .init = init,
47 static struct pnp_info pnp_dev_info[] = {
48 { NULL, PC87417_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07fa, },
49 { NULL, PC87417_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x04f8, },
50 { NULL, PC87417_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1,
51 0x07f8, },
52 { NULL, PC87417_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
53 { NULL, PC87417_SWC, PNP_IO0 | PNP_IRQ0, 0xfff0, },
54 { NULL, PC87417_KBCM, PNP_IRQ0, },
55 { NULL, PC87417_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07f8, 0x07f8, },
56 { NULL, PC87417_GPIO, PNP_IO0 | PNP_IRQ0, 0xfff8, },
57 { NULL, PC87417_XBUS, PNP_IO0 | PNP_IRQ0, 0xffe0, },
58 { NULL, PC87417_RTC, PNP_IO0 | PNP_IO1, 0xfffe, 0xfffe, },
61 static void enable_dev(struct device *dev)
63 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
66 struct chip_operations superio_nsc_pc87417_ops = {
67 CHIP_NAME("NSC PC87417 Super I/O")
68 .enable_dev = enable_dev,