#include <asm/ebus.h>
#include <asm/auxio.h>
-/* This cannot be static, as it is referenced in entry.S */
-unsigned long auxio_register = 0UL;
+/* This cannot be static, as it is referenced in irq.c */
+void __iomem *auxio_register = NULL;
enum auxio_type {
AUXIO_TYPE_NODEV,
};
static enum auxio_type auxio_devtype = AUXIO_TYPE_NODEV;
-static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(auxio_lock);
static void __auxio_sbus_set(u8 bits_on, u8 bits_off)
{
- if(auxio_register) {
+ if (auxio_register) {
unsigned char regval;
unsigned long flags;
unsigned char newval;
static void __auxio_ebus_set(u8 bits_on, u8 bits_off)
{
- if(auxio_register) {
+ if (auxio_register) {
unsigned char regval;
unsigned long flags;
unsigned char newval;
if (sdev) {
auxio_devtype = AUXIO_TYPE_SBUS;
auxio_register = sbus_ioremap(&sdev->resource[0], 0,
- sdev->reg_addrs[0].reg_size, "auxiliaryIO");
+ sdev->reg_addrs[0].reg_size,
+ "auxiliaryIO");
}
#ifdef CONFIG_PCI
else {
ebus_done:
if (edev) {
auxio_devtype = AUXIO_TYPE_EBUS;
- auxio_register = (unsigned long)
+ auxio_register =
ioremap(edev->resource[0].start, sizeof(u32));
}
}