summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/core_apecs.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
commit03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch)
tree88db8dba75ae06ba3bad08e42c5e52efc162535c /arch/alpha/kernel/core_apecs.c
parent257730f99381dd26e10b832fce4c94cae7ac1176 (diff)
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'arch/alpha/kernel/core_apecs.c')
-rw-r--r--arch/alpha/kernel/core_apecs.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/arch/alpha/kernel/core_apecs.c b/arch/alpha/kernel/core_apecs.c
index d2633bef1..fa23a4cf6 100644
--- a/arch/alpha/kernel/core_apecs.c
+++ b/arch/alpha/kernel/core_apecs.c
@@ -130,8 +130,7 @@ conf_read(unsigned long addr, unsigned char type1)
unsigned int stat0, value;
unsigned int haxr2 = 0;
- save_flags(flags); /* avoid getting hit by machine check */
- cli();
+ __save_and_cli(flags); /* avoid getting hit by machine check */
DBG(("conf_read(addr=0x%lx, type1=%d)\n", addr, type1));
@@ -201,7 +200,7 @@ conf_read(unsigned long addr, unsigned char type1)
*(vuip)APECS_IOC_HAXR2 = haxr2 & ~1;
mb();
}
- restore_flags(flags);
+ __restore_flags(flags);
return value;
}
@@ -213,8 +212,8 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1)
unsigned int stat0;
unsigned int haxr2 = 0;
- save_flags(flags); /* avoid getting hit by machine check */
- cli();
+ __save_and_cli(flags); /* avoid getting hit by machine check */
+
/* Reset status register to avoid losing errors. */
stat0 = *(vuip)APECS_IOC_DCSR;
@@ -270,18 +269,17 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1)
*(vuip)APECS_IOC_HAXR2 = haxr2 & ~1;
mb();
}
- restore_flags(flags);
+ __restore_flags(flags);
}
int
-apecs_pcibios_read_config_byte (u8 bus, u8 device_fn, u8 where, u8 *value)
+apecs_hose_read_config_byte (u8 bus, u8 device_fn, u8 where, u8 *value,
+ struct linux_hose_info *hose)
{
unsigned long addr = APECS_CONF;
unsigned long pci_addr;
unsigned char type1;
- *value = 0xff;
-
if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -293,16 +291,13 @@ apecs_pcibios_read_config_byte (u8 bus, u8 device_fn, u8 where, u8 *value)
}
int
-apecs_pcibios_read_config_word (u8 bus, u8 device_fn, u8 where, u16 *value)
+apecs_hose_read_config_word (u8 bus, u8 device_fn, u8 where, u16 *value,
+ struct linux_hose_info *hose)
{
unsigned long addr = APECS_CONF;
unsigned long pci_addr;
unsigned char type1;
- *value = 0xffff;
-
- if (where & 0x1)
- return PCIBIOS_BAD_REGISTER_NUMBER;
if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -313,15 +308,13 @@ apecs_pcibios_read_config_word (u8 bus, u8 device_fn, u8 where, u16 *value)
}
int
-apecs_pcibios_read_config_dword (u8 bus, u8 device_fn, u8 where, u32 *value)
+apecs_hose_read_config_dword (u8 bus, u8 device_fn, u8 where, u32 *value,
+ struct linux_hose_info *hose)
{
unsigned long addr = APECS_CONF;
unsigned long pci_addr;
unsigned char type1;
- *value = 0xffffffff;
- if (where & 0x3)
- return PCIBIOS_BAD_REGISTER_NUMBER;
if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -331,7 +324,8 @@ apecs_pcibios_read_config_dword (u8 bus, u8 device_fn, u8 where, u32 *value)
}
int
-apecs_pcibios_write_config_byte (u8 bus, u8 device_fn, u8 where, u8 value)
+apecs_hose_write_config_byte (u8 bus, u8 device_fn, u8 where, u8 value,
+ struct linux_hose_info *hose)
{
unsigned long addr = APECS_CONF;
unsigned long pci_addr;
@@ -346,7 +340,8 @@ apecs_pcibios_write_config_byte (u8 bus, u8 device_fn, u8 where, u8 value)
}
int
-apecs_pcibios_write_config_word (u8 bus, u8 device_fn, u8 where, u16 value)
+apecs_hose_write_config_word (u8 bus, u8 device_fn, u8 where, u16 value,
+ struct linux_hose_info *hose)
{
unsigned long addr = APECS_CONF;
unsigned long pci_addr;
@@ -361,7 +356,8 @@ apecs_pcibios_write_config_word (u8 bus, u8 device_fn, u8 where, u16 value)
}
int
-apecs_pcibios_write_config_dword (u8 bus, u8 device_fn, u8 where, u32 value)
+apecs_hose_write_config_dword (u8 bus, u8 device_fn, u8 where, u32 value,
+ struct linux_hose_info *hose)
{
unsigned long addr = APECS_CONF;
unsigned long pci_addr;