blob: 14bd059d860bb2e44a01268835d309fb1ecab25b [file] [log] [blame]
Felix Held3f3eca92020-01-23 17:12:32 +01001/* SPDX-License-Identifier: GPL-2.0-or-later */
2/* This file is part of the coreboot project. */
Sven Schnelle071d8352011-03-03 08:29:03 +00003
Sven Schnelle071d8352011-03-03 08:29:03 +00004#include <device/device.h>
5#include <device/pnp.h>
Elyes HAOUAS2329a252019-05-15 22:11:18 +02006
Sven Schnelle071d8352011-03-03 08:29:03 +00007#include "pc87384.h"
8
Sven Schnelle071d8352011-03-03 08:29:03 +00009static struct device_operations ops = {
10 .read_resources = pnp_read_resources,
11 .set_resources = pnp_set_resources,
12 .enable_resources = pnp_enable_resources,
13 .enable = pnp_enable,
Sven Schnelle071d8352011-03-03 08:29:03 +000014};
15
16static struct pnp_info pnp_dev_info[] = {
Felix Heldd5292bf2019-01-16 13:23:35 +010017 { NULL, PC87384_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
Felix Heldfaca0bc2017-12-27 22:51:29 +010018 { NULL, PC87384_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8 },
19 { NULL, PC87384_SP2, PNP_IO0 | PNP_IRQ0, 0x07f8 },
20 { NULL, PC87384_GPIO, PNP_IO0 | PNP_IRQ0, 0xfff0 },
Sven Schnelle071d8352011-03-03 08:29:03 +000021};
22
23static void enable_dev(struct device *dev)
24{
Felix Heldfaca0bc2017-12-27 22:51:29 +010025 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
Sven Schnelle071d8352011-03-03 08:29:03 +000026}
27
28struct chip_operations superio_nsc_pc87384_ops = {
29 CHIP_NAME("NSC PC87384 Super I/O")
30 .enable_dev = enable_dev,
31};