1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
/* $Id$
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* MIPS implementation of PCI BIOS services for PCI support.
*
* Copyright (C) 1997, 1998 Ralf Baechle
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/types.h>
#include <asm/pci.h>
#ifdef CONFIG_PCI
struct pci_ops *pci_ops;
/*
* BIOS32 replacement.
*/
__initfunc(void pcibios_init(void))
{
}
/*
* Following the generic parts of the MIPS BIOS32 code.
*/
int pcibios_present (void)
{
return pci_ops != NULL;
}
/*
* The functions below are machine specific and must be reimplented for
* each PCI chipset configuration. We just run the hook to the machine
* specific implementation.
*/
void pcibios_fixup (void)
{
return pci_ops->pcibios_fixup();
}
int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned char *val)
{
return pci_ops->pcibios_read_config_byte(bus, dev_fn, where, val);
}
int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned short *val)
{
return pci_ops->pcibios_read_config_word(bus, dev_fn, where, val);
}
int pcibios_read_config_dword (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned int *val)
{
return pci_ops->pcibios_read_config_dword(bus, dev_fn, where, val);
}
int pcibios_write_config_byte (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned char val)
{
return pci_ops->pcibios_write_config_byte(bus, dev_fn, where, val);
}
int pcibios_write_config_word (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned short val)
{
return pci_ops->pcibios_write_config_word(bus, dev_fn, where, val);
}
int pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned int val)
{
return pci_ops->pcibios_write_config_dword(bus, dev_fn, where, val);
}
__initfunc(char *pcibios_setup(char *str))
{
return str;
}
#endif /* defined(CONFIG_PCI) */
|