#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <asm/vr41xx/giu.h>
#include <asm/vr41xx/tb0219.h>
MODULE_AUTHOR("Yoichi Yuasa <yuasa@linux-mips.org>");
MODULE_DESCRIPTION("TANBAC TB0219 base board driver");
module_param(major, int, 0);
MODULE_PARM_DESC(major, "Major device number");
static void (*old_machine_restart)(char *command);
static void __iomem *tb0219_base;
static DEFINE_SPINLOCK(tb0219_lock);
#define tb0219_read(offset) readw(tb0219_base + (offset))
#define tb0219_write(offset, value) writew((value), tb0219_base + (offset))
#define TB0219_START 0x0a000000UL
#define TB0219_SIZE 0x20UL
#define TB0219_GPIO_INPUT 0x02
#define TB0219_GPIO_OUTPUT 0x04
#define TB0219_DIP_SWITCH 0x06
#define TB0219_RESET 0x0e
#define TB0219_PCI_SLOT1_IRQ_STATUS 0x10
#define TB0219_PCI_SLOT2_IRQ_STATUS 0x12
#define TB0219_PCI_SLOT3_IRQ_STATUS 0x14