1/*
2 *	Copyright 2010, Michael Lotz, mmlr@mlotz.ch. All Rights Reserved.
3 *	Distributed under the terms of the MIT License.
4 */
5
6#include <PCI.h>
7#include <PCI_x86.h>
8#include "pci_msi.h"
9
10
11static int32
12pci_arch_module_std_ops(int32 op, ...)
13{
14	switch (op) {
15		case B_MODULE_INIT:
16		{
17			module_info *dummy;
18			status_t result = get_module(B_PCI_MODULE_NAME, &dummy);
19			if (result != B_OK)
20				return result;
21
22			return B_OK;
23		}
24
25		case B_MODULE_UNINIT:
26			put_module(B_PCI_MODULE_NAME);
27			return B_OK;
28	}
29
30	return B_BAD_VALUE;
31}
32
33
34pci_x86_module_info gPCIArchModule = {
35	{
36		B_PCI_X86_MODULE_NAME,
37		0,
38		pci_arch_module_std_ops
39	},
40
41	&pci_get_msi_count,
42	&pci_configure_msi,
43	&pci_unconfigure_msi,
44	&pci_enable_msi,
45	&pci_disable_msi
46};
47