Commit a14813a3 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/sparc-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 70e52ba1 38150012
......@@ -17,7 +17,7 @@
#include <asm/auxio.h>
/* This cannot be static, as it is referenced in entry.S */
unsigned long auxio_register = 0UL;
void __iomem *auxio_register = 0UL;
enum auxio_type {
AUXIO_TYPE_NODEV,
......@@ -30,7 +30,7 @@ static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
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;
......@@ -49,7 +49,7 @@ static void __auxio_sbus_set(u8 bits_on, u8 bits_off)
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;
......@@ -126,7 +126,8 @@ void __init auxio_probe(void)
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 {
......@@ -142,7 +143,7 @@ void __init auxio_probe(void)
ebus_done:
if (edev) {
auxio_devtype = AUXIO_TYPE_EBUS;
auxio_register = (unsigned long)
auxio_register =
ioremap(edev->resource[0].start, sizeof(u32));
}
}
......
......@@ -1171,7 +1171,7 @@ static void __init tomatillo_register_error_handlers(struct pci_controller_info
prom_halt();
}
bucket = __bucket(irq);
tmp = readl(bucket->imap);
tmp = upa_readl(bucket->imap);
upa_writel(tmp, (pbm->pbm_regs +
schizo_imap_offset(SCHIZO_UE_INO) + 4));
......@@ -1309,7 +1309,7 @@ static void __init schizo_register_error_handlers(struct pci_controller_info *p)
prom_halt();
}
bucket = __bucket(irq);
tmp = readl(bucket->imap);
tmp = upa_readl(bucket->imap);
upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_UE_INO) + 4));
pbm = pbm_for_ino(p, SCHIZO_CE_INO);
......
......@@ -27,7 +27,7 @@
int scons_pwroff = 1;
#ifdef CONFIG_PCI
static unsigned long power_reg = 0UL;
static void __iomem *power_reg;
static DECLARE_WAIT_QUEUE_HEAD(powerd_wait);
static int button_pressed;
......@@ -52,7 +52,7 @@ void machine_power_off(void)
{
if (!serial_console || scons_pwroff) {
#ifdef CONFIG_PCI
if (power_reg != 0UL) {
if (power_reg) {
/* Both register bits seem to have the
* same effect, so until I figure out
* what the difference is...
......@@ -130,8 +130,8 @@ void __init power_init(void)
return;
found:
power_reg = (unsigned long)ioremap(edev->resource[0].start, 0x4);
printk("power: Control reg at %016lx ... ", power_reg);
power_reg = ioremap(edev->resource[0].start, 0x4);
printk("power: Control reg at %p ... ", power_reg);
poweroff_method = machine_halt; /* able to use the standard halt */
if (has_button_interrupt(edev)) {
if (kernel_thread(powerd, NULL, CLONE_FS) < 0) {
......
......@@ -12,7 +12,7 @@ lib-y := PeeCeeI.o copy_page.o clear_page.o strlen.o strncmp.o \
U1memcpy.o U1copy_from_user.o U1copy_to_user.o \
U3memcpy.o U3copy_from_user.o U3copy_to_user.o U3patch.o \
copy_in_user.o user_fixup.o memmove.o \
mcount.o ipcsum.o rwsem.o xor.o find_bit.o delay.o
mcount.o ipcsum.o rwsem.o xor.o find_bit.o delay.o iomap.o
lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o
lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
/*
* Implement the sparc64 iomap interfaces
*/
#include <linux/pci.h>
#include <linux/module.h>
#include <asm/io.h>
/* Create a virtual mapping cookie for an IO port range */
void __iomem *ioport_map(unsigned long port, unsigned int nr)
{
return (void __iomem *) (unsigned long) port;
}
void ioport_unmap(void __iomem *addr)
{
/* Nothing to do */
}
EXPORT_SYMBOL(ioport_map);
EXPORT_SYMBOL(ioport_unmap);
/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
{
unsigned long start = pci_resource_start(dev, bar);
unsigned long len = pci_resource_len(dev, bar);
unsigned long flags = pci_resource_flags(dev, bar);
if (!len || !start)
return NULL;
if (maxlen && len > maxlen)
len = maxlen;
if (flags & IORESOURCE_IO)
return ioport_map(start, len);
if (flags & IORESOURCE_MEM) {
if (flags & IORESOURCE_CACHEABLE)
return ioremap(start, len);
return ioremap_nocache(start, len);
}
/* What? */
return NULL;
}
void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
{
/* nothing to do */
}
EXPORT_SYMBOL(pci_iomap);
EXPORT_SYMBOL(pci_iounmap);
......@@ -33,7 +33,7 @@ extern void fastcall iowrite16(u16, void __iomem *);
extern void fastcall iowrite32(u32, void __iomem *);
/* Create a virtual mapping cookie for an IO port range */
extern void __iomem *ioport_map(unsigned int port, unsigned int nr);
extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
extern void ioport_unmap(void __iomem *);
/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
......
......@@ -53,7 +53,7 @@ struct linux_ebus {
struct ebus_dma_info {
spinlock_t lock;
unsigned long regs;
void __iomem *regs;
unsigned int flags;
#define EBUS_DMA_FLAG_USE_EBDMA_HANDLER 0x00000001
......
This diff is collapsed.
......@@ -24,9 +24,9 @@
* we can do some sanity checks on the low bits, and don't
* need to just take things for granted.
*/
#define PIO_OFFSET 0x10000
#define PIO_MASK 0x0ffff
#define PIO_RESERVED 0x40000
#define PIO_OFFSET 0x10000UL
#define PIO_MASK 0x0ffffUL
#define PIO_RESERVED 0x40000UL
/*
* Ugly macros are a way of life.
......@@ -77,7 +77,7 @@ EXPORT_SYMBOL(iowrite16);
EXPORT_SYMBOL(iowrite32);
/* Create a virtual mapping cookie for an IO port range */
void __iomem *ioport_map(unsigned int port, unsigned int nr)
void __iomem *ioport_map(unsigned long port, unsigned int nr)
{
if (port > PIO_MASK)
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment