Add SWIM floppy support for m68k Macs.
Subsystems (3)
PATCH v6 1/1 Add SWIM floppy support for m68k Macs.
It allows to read data from a floppy, but not to write to, and to eject the floppy (useful on our Mac without eject button).
Signed-off-by Laurent Vivier <[email protected]>
---
Changelog:
v2- use platform device infrastructure
v3- some cleanups, probe if chip supports SWIM mode
v4- use platform_device, correct swim_action() and swim_eject()
according swim3 driver.
v5- use a structure for IWM registers (like for SWIM ones)
v6- add __iomem to swim and iwm structures, move SWIM_IO_SIZE to mac/config.c,
replace local_save_flags(flags) and local_irq_disable() by local_irq_save(flags)
arch/m68k/mac/config.c | 44 ++ arch/m68k/mac/via.c | 9 drivers/block/Kconfig | 7 drivers/block/Makefile | 3 drivers/block/swim.c | 995 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/block/swim_asm.S | 247 +++++++++++ 6 files changed, 1305 insertions(+)
arch/m68k/mac/via.c +9 -0
@@ -638,3 +638,12 @@ }return 0 ; } + +void via1_set_head (int head) +{ +if (head ==0 ) + via1[vBufA] &= ~VIA1A_vHeadSel; +else + via1[vBufA] |= VIA1A_vHeadSel; +} +EXPORT_SYMBOL (via1_set_head);
drivers/block/Kconfig +7 -0
@@ -44,6 +44,13 @@ If you have a SWIM-3 (Super Woz Integrated Machine 3; from Apple) floppy controller, say Y here. Most commonly found in PowerMacs. +config BLK_DEV_SWIM + tristate "Support for SWIM Macintosh floppy" + depends on M68K && MAC + help + You should select this option if you want floppy support + and you don't have a II, IIfx, Q900, Q950 or AV series. + config AMIGA_Z2RAM tristate "Amiga Zorro II ramdisk support" depends on ZORRO
drivers/block/Makefile +3 -0
@@ -6,6 +6,7 @@ # obj-$(CONFIG_MAC_FLOPPY) += swim3.o +obj-$(CONFIG_BLK_DEV_SWIM) += swim_mod.o obj-$(CONFIG_BLK_DEV_FD) += floppy.o obj-$(CONFIG_AMIGA_FLOPPY) += amiflop.o obj-$(CONFIG_PS3_DISK) += ps3disk.o
@@ -32,3 +33,5 @@ obj-$(CONFIG_BLK_DEV_HD) += hd.o obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o + +swim_mod-objs := swim.o swim_asm.o
drivers/block/swim.c new file +995 -0
995 lines not on this page · raw message
drivers/block/swim_asm.S new file +247 -0
247 lines not on this page · raw message
arch/m68k/mac/config.c +44 -0
59 lines not on this page · raw message