From cb9eff097831007afb30d64373f29d99825d0068 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 12 Feb 2009 05:03:36 +0000 Subject: net: new user space API for time stamping of incoming and outgoing packets User space can request hardware and/or software time stamping. Reporting of the result(s) via a new control message is enabled separately for each field in the message because some of the fields may require additional computation and thus cause overhead. User space can tell the different kinds of time stamps apart and choose what suits its needs. When a TX timestamp operation is requested, the TX skb will be cloned and the clone will be time stamped (in hardware or software) and added to the socket error queue of the skb, if the skb has a socket associated with it. The actual TX timestamp will reach userspace as a RX timestamp on the cloned packet. If timestamping is requested and no timestamping is done in the device driver (potentially this may use hardware timestamping), it will be done in software after the device's start_hard_xmit routine. Signed-off-by: Patrick Ohly Signed-off-by: David S. Miller --- arch/m68k/include/asm/socket.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/m68k') diff --git a/arch/m68k/include/asm/socket.h b/arch/m68k/include/asm/socket.h index dbc64e92c41..ca87f938b03 100644 --- a/arch/m68k/include/asm/socket.h +++ b/arch/m68k/include/asm/socket.h @@ -54,4 +54,7 @@ #define SO_MARK 36 +#define SO_TIMESTAMPING 37 +#define SCM_TIMESTAMPING SO_TIMESTAMPING + #endif /* _ASM_SOCKET_H */ -- cgit v1.2.3 From 612bfc9e630e3f7a4f3be1325eac28de8b8970af Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 30 Oct 2008 21:17:47 +0100 Subject: m68k: Add install target This patch enables the use of "make install" on m68k architecture to copy kernel to /boot. Signed-off-by: Laurent Vivier Signed-off-by: Geert Uytterhoeven --- arch/m68k/Makefile | 3 +++ arch/m68k/install.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 arch/m68k/install.sh (limited to 'arch/m68k') diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index 8133dbc4496..570d85c3f97 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile @@ -117,3 +117,6 @@ endif archclean: rm -f vmlinux.gz vmlinux.bz2 + +install: + sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)" diff --git a/arch/m68k/install.sh b/arch/m68k/install.sh new file mode 100644 index 00000000000..9c6bae6112e --- /dev/null +++ b/arch/m68k/install.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 1995 by Linus Torvalds +# +# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin +# +# "make install" script for m68k architecture +# +# Arguments: +# $1 - kernel version +# $2 - kernel image file +# $3 - kernel map file +# $4 - default install path (blank if root directory) +# + +verify () { + if [ ! -f "$1" ]; then + echo "" 1>&2 + echo " *** Missing file: $1" 1>&2 + echo ' *** You need to run "make" before "make install".' 1>&2 + echo "" 1>&2 + exit 1 + fi +} + +# Make sure the files actually exist +verify "$2" +verify "$3" + +# User may have a custom install script + +if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi +if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi + +# Default install - same as make zlilo + +if [ -f $4/vmlinuz ]; then + mv $4/vmlinuz $4/vmlinuz.old +fi + +if [ -f $4/System.map ]; then + mv $4/System.map $4/System.old +fi + +cat $2 > $4/vmlinuz +cp $3 $4/System.map + +sync -- cgit v1.2.3 From 7ad93b42bd135641ddc2c298f030132aca7aeca3 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 6 Nov 2008 20:57:41 +0100 Subject: m68k: mac - Add a new entry in mac_model to identify the floppy controller type. This patch adds a field "floppy_type" which can take the following values: MAC_FLOPPY_IWM for an IWM based mac MAC_FLOPPY_SWIM_ADDR1 for a SWIM based mac with controller at VIA1 + 0x1E000 MAC_FLOPPY_SWIM_ADDR2 for a SWIM based mac with controller at VIA1 + 0x16000 MAC_FLOPPY_IOP for an IOP based mac MAC_FLOPPY_AV for an AV based mac Signed-off-by: Laurent Vivier Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/macintosh.h | 7 ++ arch/m68k/mac/config.c | 163 +++++++++++++++++++++++++------------- 2 files changed, 116 insertions(+), 54 deletions(-) (limited to 'arch/m68k') diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index 05309f7e3d0..50db3591ca1 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h @@ -34,6 +34,7 @@ struct mac_model char scc_type; char ether_type; char nubus_type; + char floppy_type; }; #define MAC_ADB_NONE 0 @@ -71,6 +72,12 @@ struct mac_model #define MAC_NO_NUBUS 0 #define MAC_NUBUS 1 +#define MAC_FLOPPY_IWM 0 +#define MAC_FLOPPY_SWIM_ADDR1 1 +#define MAC_FLOPPY_SWIM_ADDR2 2 +#define MAC_FLOPPY_SWIM_IOP 3 +#define MAC_FLOPPY_AV 4 + /* * Gestalt numbers */ diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 98b6bcfb37b..3a1c0b2862e 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -224,7 +224,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_II, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_IWM }, /* @@ -239,7 +240,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_II, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_IWM }, { .ident = MAC_MODEL_IIX, .name = "IIx", @@ -247,7 +249,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_II, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_IICX, .name = "IIcx", @@ -255,7 +258,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_II, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_SE30, .name = "SE/30", @@ -263,7 +267,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_II, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, /* @@ -280,7 +285,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_IIFX, .name = "IIfx", @@ -288,7 +294,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_IOP, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_IOP }, { .ident = MAC_MODEL_IISI, .name = "IIsi", @@ -296,7 +303,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_IIVI, .name = "IIvi", @@ -304,7 +312,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_IIVX, .name = "IIvx", @@ -312,7 +321,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, /* @@ -326,7 +336,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_CCL, .name = "Color Classic", @@ -334,7 +345,9 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS}, + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 + }, /* * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi @@ -347,7 +360,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_LCII, .name = "LC II", @@ -355,7 +369,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_LCIII, .name = "LC III", @@ -363,7 +378,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, /* @@ -383,7 +399,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_Q605_ACC, .name = "Quadra 605", @@ -391,7 +408,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_Q610, .name = "Quadra 610", @@ -400,7 +418,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_Q630, .name = "Quadra 630", @@ -410,7 +429,8 @@ static struct mac_model mac_data_table[] = { .ide_type = MAC_IDE_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_Q650, .name = "Quadra 650", @@ -419,7 +439,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, /* The Q700 does have a NS Sonic */ { @@ -430,7 +451,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA2, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_Q800, .name = "Quadra 800", @@ -439,7 +461,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_Q840, .name = "Quadra 840AV", @@ -448,7 +471,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA3, .scc_type = MAC_SCC_PSC, .ether_type = MAC_ETHER_MACE, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_AV }, { .ident = MAC_MODEL_Q900, .name = "Quadra 900", @@ -457,7 +481,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA2, .scc_type = MAC_SCC_IOP, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_IOP }, { .ident = MAC_MODEL_Q950, .name = "Quadra 950", @@ -466,7 +491,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA2, .scc_type = MAC_SCC_IOP, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_IOP }, /* @@ -480,7 +506,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_P475, .name = "Performa 475", @@ -488,7 +515,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_P475F, .name = "Performa 475", @@ -496,7 +524,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_P520, .name = "Performa 520", @@ -504,7 +533,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_P550, .name = "Performa 550", @@ -512,7 +542,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, /* These have the comm slot, and therefore the possibility of SONIC ethernet */ { @@ -523,7 +554,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_II, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_P588, .name = "Performa 588", @@ -533,7 +565,8 @@ static struct mac_model mac_data_table[] = { .ide_type = MAC_IDE_QUADRA, .scc_type = MAC_SCC_II, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_TV, .name = "TV", @@ -541,7 +574,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_P600, .name = "Performa 600", @@ -549,7 +583,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, /* @@ -565,7 +600,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_C650, .name = "Centris 650", @@ -574,7 +610,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR1 }, { .ident = MAC_MODEL_C660, .name = "Centris 660AV", @@ -583,7 +620,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_QUADRA3, .scc_type = MAC_SCC_PSC, .ether_type = MAC_ETHER_MACE, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_AV }, /* @@ -599,7 +637,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB145, .name = "PowerBook 145", @@ -607,7 +646,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB150, .name = "PowerBook 150", @@ -616,7 +656,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_OLD, .ide_type = MAC_IDE_PB, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB160, .name = "PowerBook 160", @@ -624,7 +665,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB165, .name = "PowerBook 165", @@ -632,7 +674,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB165C, .name = "PowerBook 165c", @@ -640,7 +683,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB170, .name = "PowerBook 170", @@ -648,7 +692,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB180, .name = "PowerBook 180", @@ -656,7 +701,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB180C, .name = "PowerBook 180c", @@ -664,7 +710,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_QUADRA, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB190, .name = "PowerBook 190", @@ -673,7 +720,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_OLD, .ide_type = MAC_IDE_BABOON, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB520, .name = "PowerBook 520", @@ -682,7 +730,8 @@ static struct mac_model mac_data_table[] = { .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .ether_type = MAC_ETHER_SONIC, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, /* @@ -702,7 +751,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB230, .name = "PowerBook Duo 230", @@ -710,7 +760,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB250, .name = "PowerBook Duo 250", @@ -718,7 +769,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB270C, .name = "PowerBook Duo 270c", @@ -726,7 +778,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB280, .name = "PowerBook Duo 280", @@ -734,7 +787,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, { .ident = MAC_MODEL_PB280C, .name = "PowerBook Duo 280c", @@ -742,7 +796,8 @@ static struct mac_model mac_data_table[] = { .via_type = MAC_VIA_IIci, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, - .nubus_type = MAC_NUBUS + .nubus_type = MAC_NUBUS, + .floppy_type = MAC_FLOPPY_SWIM_ADDR2 }, /* -- cgit v1.2.3 From 8852ecd97488249ca7fe2c0d3eb44cae95886881 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Sat, 15 Nov 2008 16:10:10 +0100 Subject: m68k: mac - Add SWIM floppy support 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 Signed-off-by: Geert Uytterhoeven --- arch/m68k/mac/config.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ arch/m68k/mac/via.c | 9 +++++++++ 2 files changed, 53 insertions(+) (limited to 'arch/m68k') diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 3a1c0b2862e..be017984a45 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -22,6 +22,7 @@ /* keyb */ #include #include +#include #define BOOTINFO_COMPAT_1_0 #include @@ -43,6 +44,10 @@ #include #include +/* platform device info */ + +#define SWIM_IO_SIZE 0x2000 /* SWIM IO resource size */ + /* Mac bootinfo struct */ struct mac_booter_data mac_bi_data; @@ -870,3 +875,42 @@ static void mac_get_model(char *str) strcpy(str, "Macintosh "); strcat(str, macintosh_config->name); } + +static struct resource swim_resources[1]; + +static struct platform_device swim_device = { + .name = "swim", + .id = -1, + .num_resources = ARRAY_SIZE(swim_resources), + .resource = swim_resources, +}; + +static struct platform_device *mac_platform_devices[] __initdata = { + &swim_device +}; + +int __init mac_platform_init(void) +{ + u8 *swim_base; + + switch (macintosh_config->floppy_type) { + case MAC_FLOPPY_SWIM_ADDR1: + swim_base = (u8 *)(VIA1_BASE + 0x1E000); + break; + case MAC_FLOPPY_SWIM_ADDR2: + swim_base = (u8 *)(VIA1_BASE + 0x16000); + break; + default: + return 0; + } + + swim_resources[0].name = "swim-regs"; + swim_resources[0].start = (resource_size_t)swim_base; + swim_resources[0].end = (resource_size_t)(swim_base + SWIM_IO_SIZE); + swim_resources[0].flags = IORESOURCE_MEM; + + return platform_add_devices(mac_platform_devices, + ARRAY_SIZE(mac_platform_devices)); +} + +arch_initcall(mac_platform_init); diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index 7d97ba54536..11bce3cb648 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c @@ -645,3 +645,12 @@ int via_irq_pending(int irq) } 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); -- cgit v1.2.3 From 4b2873ba0bda7dc747cde8b6c7dc6c0b01ea6213 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Thu, 26 Mar 2009 09:48:45 +0100 Subject: m68k: irq_node.handler() should return irqreturn_t commit b5dc7840b3ebe9c7967dd8ba73db957767009ff9 ("m68k: introduce irq controller") reverted the return type of struct irq_node.handler() from irqreturn_t to int. Change it back to irqreturn_t, else it will give a compiler warning when irqreturn_t is turned into an enum in the near future: | arch/m68k/kernel/ints.c:231: warning: assignment from incompatible pointer type Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/irq_mm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/m68k') diff --git a/arch/m68k/include/asm/irq_mm.h b/arch/m68k/include/asm/irq_mm.h index 226bfc0f21b..0cab42cad79 100644 --- a/arch/m68k/include/asm/irq_mm.h +++ b/arch/m68k/include/asm/irq_mm.h @@ -3,6 +3,7 @@ #include #include +#include #include /* @@ -80,7 +81,7 @@ struct pt_regs; * interrupt source (if it supports chaining). */ typedef struct irq_node { - int (*handler)(int, void *); + irqreturn_t (*handler)(int, void *); void *dev_id; struct irq_node *next; unsigned long flags; -- cgit v1.2.3