X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-sparc64%2Ffloppy.h;h=ca19f80a9b7d96bab4494525abb248cd88e3c7a1;hb=7536d7be7b718f8c5834cbcb7601816562e1b805;hp=4aa0925e1b1b6b784bf83850deb28a0be5b5e449;hpb=b643b0fdbc59cf6bbb086974b29d2571e9e9f646;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index 4aa0925e1b1..ca19f80a9b7 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h @@ -1,7 +1,6 @@ -/* $Id: floppy.h,v 1.32 2001/10/26 17:59:36 davem Exp $ - * asm-sparc64/floppy.h: Sparc specific parts of the Floppy driver. +/* floppy.h: Sparc specific parts of the Floppy driver. * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * * Ultra/PCI support added: Sep 1997 Eddie C. Dost (ecd@skynet.be) @@ -11,6 +10,7 @@ #define __ASM_SPARC64_FLOPPY_H #include +#include #include #include @@ -84,8 +84,6 @@ static struct sun_floppy_ops sun_fdops; #define fd_free_irq() sun_fdops.fd_free_irq() #define fd_eject(drive) sun_fdops.fd_eject(drive) -static int FLOPPY_MOTOR_MASK = 0x10; - /* Super paranoid... */ #undef HAVE_DISABLE_HLT @@ -295,7 +293,6 @@ static int sun_fd_eject(int drive) #ifdef CONFIG_PCI #include -#include #include static struct ebus_dma_info sun_pci_fd_ebus_dma; @@ -560,83 +557,6 @@ static int __init ebus_fdthree_p(struct linux_ebus_device *edev) } #endif -#ifdef CONFIG_PCI -#undef ISA_FLOPPY_WORKS - -#ifdef ISA_FLOPPY_WORKS -static unsigned long __init isa_floppy_init(void) -{ - struct sparc_isa_bridge *isa_br; - struct sparc_isa_device *isa_dev = NULL; - - for_each_isa(isa_br) { - for_each_isadev(isa_dev, isa_br) { - if (!strcmp(isa_dev->prom_node->name, "dma")) { - struct sparc_isa_device *child = - isa_dev->child; - - while (child) { - if (!strcmp(child->prom_node->name, - "floppy")) { - isa_dev = child; - goto isa_done; - } - child = child->next; - } - } - } - } -isa_done: - if (!isa_dev) - return 0; - - /* We could use DMA on devices behind the ISA bridge, but... - * - * There is a slight problem. Normally on x86 kit the x86 processor - * delays I/O port instructions when the ISA bus "dma in progress" - * signal is active. Well, sparc64 systems do not monitor this - * signal thus we would need to block all I/O port accesses in software - * when a dma transfer is active for some device. - */ - - sun_fdc = (struct sun_flpy_controller *)isa_dev->resource.start; - FLOPPY_IRQ = isa_dev->irq; - - sun_fdops.fd_inb = sun_pci_fd_inb; - sun_fdops.fd_outb = sun_pci_fd_outb; - - can_use_virtual_dma = use_virtual_dma = 1; - sun_fdops.fd_enable_dma = sun_fd_enable_dma; - sun_fdops.fd_disable_dma = sun_fd_disable_dma; - sun_fdops.fd_set_dma_mode = sun_fd_set_dma_mode; - sun_fdops.fd_set_dma_addr = sun_fd_set_dma_addr; - sun_fdops.fd_set_dma_count = sun_fd_set_dma_count; - sun_fdops.get_dma_residue = sun_get_dma_residue; - - sun_fdops.fd_request_irq = sun_fd_request_irq; - sun_fdops.fd_free_irq = sun_fd_free_irq; - - /* Floppy eject is manual. Actually, could determine this - * via presence of 'manual' property in OBP node. - */ - sun_fdops.fd_eject = sun_pci_fd_eject; - - fdc_status = (unsigned long) &sun_fdc->status_82077; - FLOPPY_MOTOR_MASK = 0xf0; - - allowed_drive_mask = 0; - sun_floppy_types[0] = 0; - sun_floppy_types[1] = 4; - - sun_pci_broken_drive = 1; - sun_fdops.fd_outb = sun_pci_fd_broken_outb; - - return sun_floppy_types[0]; -} -#endif /* ISA_FLOPPY_WORKS */ - -#endif - static unsigned long __init sun_floppy_init(void) { char state[128]; @@ -670,13 +590,8 @@ static unsigned long __init sun_floppy_init(void) } } ebus_done: - if (!edev) { -#ifdef ISA_FLOPPY_WORKS - return isa_floppy_init(); -#else + if (!edev) return 0; -#endif - } state_prop = of_get_property(edev->prom_node, "status", NULL); if (state_prop && !strncmp(state_prop, "disabled", 8)) @@ -729,7 +644,6 @@ static unsigned long __init sun_floppy_init(void) sun_fdops.fd_eject = sun_pci_fd_eject; fdc_status = (unsigned long) &sun_fdc->status_82077; - FLOPPY_MOTOR_MASK = 0xf0; /* * XXX: Find out on which machines this is really needed.