blob: 87dd265182f79b43d0c39b746095f75d1c9867eb [file] [log] [blame]
Sven Schnelle071d8352011-03-03 08:29:03 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2011 Sven Schnelle <svens@stackframe.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Sven Schnelle071d8352011-03-03 08:29:03 +000015 */
16
Sven Schnelle071d8352011-03-03 08:29:03 +000017#include <device/device.h>
18#include <device/pnp.h>
Elyes HAOUAS2329a252019-05-15 22:11:18 +020019
Sven Schnelle071d8352011-03-03 08:29:03 +000020#include "pc87384.h"
21
Sven Schnelle071d8352011-03-03 08:29:03 +000022static struct device_operations ops = {
23 .read_resources = pnp_read_resources,
24 .set_resources = pnp_set_resources,
25 .enable_resources = pnp_enable_resources,
26 .enable = pnp_enable,
Sven Schnelle071d8352011-03-03 08:29:03 +000027};
28
29static struct pnp_info pnp_dev_info[] = {
Felix Heldd5292bf2019-01-16 13:23:35 +010030 { NULL, PC87384_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
Felix Heldfaca0bc2017-12-27 22:51:29 +010031 { NULL, PC87384_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8 },
32 { NULL, PC87384_SP2, PNP_IO0 | PNP_IRQ0, 0x07f8 },
33 { NULL, PC87384_GPIO, PNP_IO0 | PNP_IRQ0, 0xfff0 },
Sven Schnelle071d8352011-03-03 08:29:03 +000034};
35
36static void enable_dev(struct device *dev)
37{
Felix Heldfaca0bc2017-12-27 22:51:29 +010038 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
Sven Schnelle071d8352011-03-03 08:29:03 +000039}
40
41struct chip_operations superio_nsc_pc87384_ops = {
42 CHIP_NAME("NSC PC87384 Super I/O")
43 .enable_dev = enable_dev,
44};