forked from Imagelibrary/rtems
2009-10-01 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1445/BSPs * pci/pci.c: Rename pci_[read|write]_config* functions into BSP_pci_[read|write]_config* and make them static.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-10-01 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
PR 1445/BSPs
|
||||||
|
* pci/pci.c: Rename pci_[read|write]_config* functions into
|
||||||
|
BSP_pci_[read|write]_config* and make them static.
|
||||||
|
|
||||||
2009-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2009-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* pci/pci.c: Add prototypes for BusCountPCI(void), init_pci(void).
|
* pci/pci.c: Add prototypes for BusCountPCI(void), init_pci(void).
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ struct pci_res {
|
|||||||
* AT697 pci controller to be able access all slots
|
* AT697 pci controller to be able access all slots
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_read_config_dword(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned int *val) {
|
BSP_pci_read_config_dword(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned int *val) {
|
||||||
|
|
||||||
volatile unsigned int data;
|
volatile unsigned int data;
|
||||||
|
|
||||||
@@ -136,8 +136,8 @@ pci_read_config_dword(unsigned char bus, unsigned char slot, unsigned char funct
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_read_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short *val) {
|
BSP_pci_read_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short *val) {
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
|
||||||
if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER;
|
if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER;
|
||||||
@@ -149,8 +149,8 @@ pci_read_config_word(unsigned char bus, unsigned char slot, unsigned char functi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_read_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char *val) {
|
BSP_pci_read_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char *val) {
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
|
||||||
pci_read_config_dword(bus, slot, function, offset&~3, &v);
|
pci_read_config_dword(bus, slot, function, offset&~3, &v);
|
||||||
@@ -161,8 +161,8 @@ pci_read_config_byte(unsigned char bus, unsigned char slot, unsigned char functi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_write_config_dword(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned int val) {
|
BSP_pci_write_config_dword(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned int val) {
|
||||||
|
|
||||||
if (offset & 3) return PCIBIOS_BAD_REGISTER_NUMBER;
|
if (offset & 3) return PCIBIOS_BAD_REGISTER_NUMBER;
|
||||||
|
|
||||||
@@ -187,8 +187,8 @@ pci_write_config_dword(unsigned char bus, unsigned char slot, unsigned char func
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_write_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short val) {
|
BSP_pci_write_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short val) {
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
|
||||||
if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER;
|
if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER;
|
||||||
@@ -201,8 +201,8 @@ pci_write_config_word(unsigned char bus, unsigned char slot, unsigned char funct
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_write_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char val) {
|
BSP_pci_write_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char val) {
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
|
||||||
pci_read_config_dword(bus, slot, function, offset&~3, &v);
|
pci_read_config_dword(bus, slot, function, offset&~3, &v);
|
||||||
@@ -215,12 +215,12 @@ pci_write_config_byte(unsigned char bus, unsigned char slot, unsigned char funct
|
|||||||
|
|
||||||
|
|
||||||
const pci_config_access_functions pci_access_functions = {
|
const pci_config_access_functions pci_access_functions = {
|
||||||
pci_read_config_byte,
|
BSP_pci_read_config_byte,
|
||||||
pci_read_config_word,
|
BSP_pci_read_config_word,
|
||||||
pci_read_config_dword,
|
BSP_pci_read_config_dword,
|
||||||
pci_write_config_byte,
|
BSP_pci_write_config_byte,
|
||||||
pci_write_config_word,
|
BSP_pci_write_config_word,
|
||||||
pci_write_config_dword
|
BSP_pci_write_config_dword
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_config BSP_pci_configuration = { (volatile unsigned char*)PCI_CONFIG_ADDR,
|
pci_config BSP_pci_configuration = { (volatile unsigned char*)PCI_CONFIG_ADDR,
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
2009-10-01 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
PR 1445/BSPs
|
||||||
|
* pci/pci.c: Rename pci_[read|write]_config* functions into
|
||||||
|
BSP_pci_[read|write]_config* and make them static.
|
||||||
|
|
||||||
2009-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2009-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* pci/pci.c: Add prototypes for BusCountPCI(void), init_pci(void).
|
* pci/pci.c: Add prototypes for BusCountPCI(void), init_pci(void).
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ static inline unsigned int flip_dword (unsigned int l)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_read_config_dword(
|
BSP_pci_read_config_dword(
|
||||||
unsigned char bus,
|
unsigned char bus,
|
||||||
unsigned char slot,
|
unsigned char slot,
|
||||||
unsigned char function,
|
unsigned char function,
|
||||||
@@ -134,8 +134,8 @@ pci_read_config_dword(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_read_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short *val) {
|
BSP_pci_read_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short *val) {
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
|
||||||
if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER;
|
if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER;
|
||||||
@@ -147,8 +147,8 @@ pci_read_config_word(unsigned char bus, unsigned char slot, unsigned char functi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_read_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char *val) {
|
BSP_pci_read_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char *val) {
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
|
||||||
pci_read_config_dword(bus, slot, function, offset&~3, &v);
|
pci_read_config_dword(bus, slot, function, offset&~3, &v);
|
||||||
@@ -159,8 +159,8 @@ pci_read_config_byte(unsigned char bus, unsigned char slot, unsigned char functi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_write_config_dword(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned int val) {
|
BSP_pci_write_config_dword(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned int val) {
|
||||||
|
|
||||||
volatile unsigned int *pci_conf;
|
volatile unsigned int *pci_conf;
|
||||||
unsigned int value;
|
unsigned int value;
|
||||||
@@ -185,8 +185,8 @@ pci_write_config_dword(unsigned char bus, unsigned char slot, unsigned char func
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_write_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short val) {
|
BSP_pci_write_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short val) {
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
|
||||||
if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER;
|
if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER;
|
||||||
@@ -199,8 +199,8 @@ pci_write_config_word(unsigned char bus, unsigned char slot, unsigned char funct
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
pci_write_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char val) {
|
BSP_pci_write_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char val) {
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
|
|
||||||
pci_read_config_dword(bus, slot, function, offset&~3, &v);
|
pci_read_config_dword(bus, slot, function, offset&~3, &v);
|
||||||
@@ -213,12 +213,12 @@ pci_write_config_byte(unsigned char bus, unsigned char slot, unsigned char funct
|
|||||||
|
|
||||||
|
|
||||||
const pci_config_access_functions pci_access_functions = {
|
const pci_config_access_functions pci_access_functions = {
|
||||||
pci_read_config_byte,
|
BSP_pci_read_config_byte,
|
||||||
pci_read_config_word,
|
BSP_pci_read_config_word,
|
||||||
pci_read_config_dword,
|
BSP_pci_read_config_dword,
|
||||||
pci_write_config_byte,
|
BSP_pci_write_config_byte,
|
||||||
pci_write_config_word,
|
BSP_pci_write_config_word,
|
||||||
pci_write_config_dword
|
BSP_pci_write_config_dword
|
||||||
};
|
};
|
||||||
|
|
||||||
pci_config BSP_pci_configuration = { (volatile unsigned char*)PCI_CONFIG_ADDR,
|
pci_config BSP_pci_configuration = { (volatile unsigned char*)PCI_CONFIG_ADDR,
|
||||||
|
|||||||
Reference in New Issue
Block a user