Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / arch / sparc / include / asm / floppy_32.h
index ae3f00b..86666f7 100644 (file)
@@ -6,6 +6,9 @@
 #ifndef __ASM_SPARC_FLOPPY_H
 #define __ASM_SPARC_FLOPPY_H
 
+#include <linux/of.h>
+#include <linux/of_device.h>
+
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
@@ -301,7 +304,8 @@ static struct linux_prom_registers fd_regs[2];
 static int sun_floppy_init(void)
 {
        char state[128];
-       int tnode, fd_node, num_regs;
+       phandle tnode, fd_node;
+       int num_regs;
        struct resource r;
 
        use_virtual_dma = 1;
@@ -343,7 +347,7 @@ static int sun_floppy_init(void)
        r.flags = fd_regs[0].which_io;
        r.start = fd_regs[0].phys_addr;
        sun_fdc = (struct sun_flpy_controller *)
-           sbus_ioremap(&r, 0, fd_regs[0].reg_size, "floppy");
+           of_ioremap(&r, 0, fd_regs[0].reg_size, "floppy");
 
        /* Last minute sanity check... */
        if(sun_fdc->status_82072 == 0xff) {
@@ -385,4 +389,15 @@ static int sparc_eject(void)
 
 #define EXTRA_FLOPPY_PARAMS
 
+static DEFINE_SPINLOCK(dma_spin_lock);
+
+#define claim_dma_lock() \
+({     unsigned long flags; \
+       spin_lock_irqsave(&dma_spin_lock, flags); \
+       flags; \
+})
+
+#define release_dma_lock(__flags) \
+       spin_unlock_irqrestore(&dma_spin_lock, __flags);
+
 #endif /* !(__ASM_SPARC_FLOPPY_H) */