From 867ef4c9154c1df840ad6fa3d177b00b3c5730e4 Mon Sep 17 00:00:00 2001 From: "Christian T. Steigies" Date: Tue, 8 Jan 2008 22:54:40 +0000 Subject: [PATCH] Update patches from linux-m68k CVS svn path=/dists/trunk/linux-2.6/; revision=10087 --- debian/changelog | 5 +- debian/patches/bugfix/m68k/143-ioext.diff | 1352 ---- debian/patches/bugfix/m68k/149-mc68681.diff | 146 - debian/patches/bugfix/m68k/152-pci.diff | 21 - .../bugfix/m68k/{ => 2.6.24}/130-adbraw.diff | 18 +- .../bugfix/m68k/{ => 2.6.24}/133-arch.diff | 11 +- .../m68k/{ => 2.6.24}/134-atari-fat.diff | 21 +- .../bugfix/m68k/{ => 2.6.24}/141-ide.diff | 5 +- .../m68k/{ => 2.6.24}/633-atari_scc.diff | 12 +- ...i-hades-pci-balance-iomap-and-iounmap.diff | 100 + .../m68k/2.6.24/dio-ARRAY_SIZE-cleanup.diff | 34 + .../m68k/2.6.24/m68k-ARRAY_SIZE-cleanup.diff | 23 + .../m68k/2.6.24/m68k-cc-cross-prefix.diff | 35 + .../bugfix/m68k/2.6.24/m68k-initrd-fix.diff | 52 + ...8k-kill-arch-m68k-amiga-amiga_ksyms-c.diff | 217 + ...8k-kill-arch-m68k-atari-atari_ksyms-c.diff | 238 + .../m68k-kill-arch-m68k-hp300-ksyms-c.diff | 35 + .../m68k-kill-arch-m68k-mac-mac_ksyms-c.diff | 56 + ...ill-arch-m68k-mvme16x-mvme16x_ksyms-c.diff | 51 + ...nubus-card-definitions-and-a-typo-fix.diff | 28 + .../mac68k-macii-adb-comment-correction.diff | 23 + .../mac68k-remove-dead-MAC_ADBKEYCODES.diff | 50 + .../m68k/2.6.24/mac68k-remove-dead-code.diff | 35 + ...nubus-kill-drivers-nubus-nubus_syms-c.diff | 188 + debian/patches/bugfix/m68k/357-mac89x0.diff | 177 - debian/patches/bugfix/m68k/448-ide.diff | 23 - debian/patches/bugfix/m68k/478-serial.diff | 30 - .../patches/bugfix/m68k/577-module-arch.diff | 37 - .../bugfix/m68k/600-task_thread_info.diff | 43 - .../patches/bugfix/m68k/611-module_fixup.diff | 214 - debian/patches/bugfix/m68k/618-discontig.diff | 868 --- .../bugfix/m68k/630-extern-cleanup.diff | 34 - .../bugfix/m68k/630-extern-cleanup.diff.1 | 26 - .../patches/bugfix/m68k/631-thread_stack.diff | 117 - .../patches/bugfix/m68k/634-atari_scsi.diff | 228 - .../patches/bugfix/m68k/635-atari_input.diff | 1162 ---- debian/patches/bugfix/m68k/636-atafb.diff | 5530 --------------- debian/patches/bugfix/m68k/add-termios2.diff | 374 -- .../m68k/amiga-a2065-ariadne-stats.diff | 42 - .../bugfix/m68k/ask-m68k-io.h-missing.diff | 57 - debian/patches/bugfix/m68k/atari-aranym.diff | 542 -- .../patches/bugfix/m68k/atari-ethernec.diff | 1106 --- debian/patches/bugfix/m68k/atari-rom-isa.diff | 340 - .../bugfix/m68k/atari-scsi-compile-fixes.diff | 340 - .../bugfix/m68k/atari-scsi-reformat.diff | 5903 ----------------- .../bugfix/m68k/atari_NCR5380-work.diff | 31 - .../m68k/debian-2.6.21-2-atari-scsi.diff | 295 - .../bugfix/m68k/debian-2.6.21-2-rom-isa.diff | 84 - .../disable-mac-broken-config-options.diff | 21 - .../patches/bugfix/m68k/dmasound_paula.diff | 11 - debian/patches/bugfix/m68k/early-param.diff | 468 -- .../m68k/ethernec-kill-ETHERNEC_USE_POLL.diff | 76 - debian/patches/bugfix/m68k/ethernec-work.diff | 46 - .../m68k/falconide_intr_lock-ratelimit.diff | 22 - .../m68k/falconide_intr_lock-reentrant.diff | 41 - .../patches/bugfix/m68k/hilkbd-warning.diff | 21 - debian/patches/bugfix/m68k/irq_lockdep.diff | 30 - .../bugfix/m68k/kmap_atomic-inline.diff | 30 - .../bugfix/m68k/m68k-53c700-cleanups.diff | 186 - .../patches/bugfix/m68k/m68k-53c700-scsi.diff | 1155 ---- .../m68k-amiga-z2ram-kill-TRUE-FALSE.diff | 27 - .../m68k/m68k-arbitary-speed-tty-support.diff | 68 - debian/patches/bugfix/m68k/m68k-as.patch | 308 - ...do-not-include-RODATA-in-text-segment.diff | 36 - .../patches/bugfix/m68k/m68k-generic-io.diff | 234 - .../m68k/m68k-linux-gnu-crosscompile.diff | 20 - .../bugfix/m68k/m68k-mvme-scsi-rename.diff | 348 - .../m68k/m68k-page.h-needs-compiler.h.diff | 20 - debian/patches/bugfix/m68k/m68k-reformat.diff | 4818 -------------- .../m68k/m68k-scsi-Kconfig-hickups.diff | 29 - .../m68k/m68k-undefined-module_fixup.diff | 60 - debian/patches/bugfix/m68k/m68k-use-_AC.diff | 43 - .../bugfix/m68k/mac68k-cuda-adb-fixes.diff | 176 - .../m68k/mac68k-finish_irq_cleanup.diff | 162 - .../bugfix/m68k/mac68k-irq-plan-e.diff | 270 - .../patches/bugfix/m68k/mac68k-irq-prep.diff | 375 -- .../bugfix/m68k/mac68k-macii-adb-fixes.diff | 873 --- .../bugfix/m68k/mac68k-macmace-fixes.diff | 951 --- .../m68k/mac68k-macsonic-via-alt-mapping.diff | 194 - ...c68k-patch_A-mac68k_cvs_nubus_defines.diff | 222 - ...c68k-patch_B-mac68k_cvs_DP8390_update.diff | 398 -- .../m68k/mac68k-patch_d-via-alt-mapping.diff | 30 - .../m68k/mac68k-remove-unused-adb-header.diff | 92 - .../mac68k-revert-remaining-irq-damage.diff | 80 - .../bugfix/m68k/mac68k-sonic-fixes.diff | 106 - .../bugfix/m68k/nfeth-virt_to_phys.diff | 19 - .../m68k/pmu_queue_request-conflict.diff | 32 - .../patches/bugfix/m68k/split-amiga7xx.diff | 709 -- .../patches/bugfix/m68k/sun3-3x-cg3-bw2.diff | 887 --- .../patches/bugfix/m68k/sun3-3x-serial.diff | 486 -- debian/patches/bugfix/m68k/sun3-numints.diff | 23 - .../m68k/unnecessary-m68k_memoffset.diff | 30 - .../bugfix/m68k/via-pmu68k-dead-code.diff | 263 - .../m68k/zorro-module-device-table.diff | 205 - .../m68k/zorro-resource_size_t-warnings.diff | 50 - .../m68k/zorro_config_attr-read-only.diff | 21 - debian/patches/series/1~experimental.1-extra | 20 + 97 files changed, 1218 insertions(+), 33933 deletions(-) delete mode 100644 debian/patches/bugfix/m68k/143-ioext.diff delete mode 100644 debian/patches/bugfix/m68k/149-mc68681.diff delete mode 100644 debian/patches/bugfix/m68k/152-pci.diff rename debian/patches/bugfix/m68k/{ => 2.6.24}/130-adbraw.diff (71%) rename debian/patches/bugfix/m68k/{ => 2.6.24}/133-arch.diff (73%) rename debian/patches/bugfix/m68k/{ => 2.6.24}/134-atari-fat.diff (86%) rename debian/patches/bugfix/m68k/{ => 2.6.24}/141-ide.diff (89%) rename debian/patches/bugfix/m68k/{ => 2.6.24}/633-atari_scc.diff (99%) create mode 100644 debian/patches/bugfix/m68k/2.6.24/atari-hades-pci-balance-iomap-and-iounmap.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/dio-ARRAY_SIZE-cleanup.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/m68k-ARRAY_SIZE-cleanup.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/m68k-cc-cross-prefix.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/m68k-initrd-fix.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-amiga-amiga_ksyms-c.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-atari-atari_ksyms-c.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-hp300-ksyms-c.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-mac-mac_ksyms-c.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-mvme16x-mvme16x_ksyms-c.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/mac68k-add-nubus-card-definitions-and-a-typo-fix.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/mac68k-macii-adb-comment-correction.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/mac68k-remove-dead-MAC_ADBKEYCODES.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/mac68k-remove-dead-code.diff create mode 100644 debian/patches/bugfix/m68k/2.6.24/nubus-kill-drivers-nubus-nubus_syms-c.diff delete mode 100644 debian/patches/bugfix/m68k/357-mac89x0.diff delete mode 100644 debian/patches/bugfix/m68k/448-ide.diff delete mode 100644 debian/patches/bugfix/m68k/478-serial.diff delete mode 100644 debian/patches/bugfix/m68k/577-module-arch.diff delete mode 100644 debian/patches/bugfix/m68k/600-task_thread_info.diff delete mode 100644 debian/patches/bugfix/m68k/611-module_fixup.diff delete mode 100644 debian/patches/bugfix/m68k/618-discontig.diff delete mode 100644 debian/patches/bugfix/m68k/630-extern-cleanup.diff delete mode 100644 debian/patches/bugfix/m68k/630-extern-cleanup.diff.1 delete mode 100644 debian/patches/bugfix/m68k/631-thread_stack.diff delete mode 100644 debian/patches/bugfix/m68k/634-atari_scsi.diff delete mode 100644 debian/patches/bugfix/m68k/635-atari_input.diff delete mode 100644 debian/patches/bugfix/m68k/636-atafb.diff delete mode 100644 debian/patches/bugfix/m68k/add-termios2.diff delete mode 100644 debian/patches/bugfix/m68k/amiga-a2065-ariadne-stats.diff delete mode 100644 debian/patches/bugfix/m68k/ask-m68k-io.h-missing.diff delete mode 100644 debian/patches/bugfix/m68k/atari-aranym.diff delete mode 100644 debian/patches/bugfix/m68k/atari-ethernec.diff delete mode 100644 debian/patches/bugfix/m68k/atari-rom-isa.diff delete mode 100644 debian/patches/bugfix/m68k/atari-scsi-compile-fixes.diff delete mode 100644 debian/patches/bugfix/m68k/atari-scsi-reformat.diff delete mode 100644 debian/patches/bugfix/m68k/atari_NCR5380-work.diff delete mode 100644 debian/patches/bugfix/m68k/debian-2.6.21-2-atari-scsi.diff delete mode 100644 debian/patches/bugfix/m68k/debian-2.6.21-2-rom-isa.diff delete mode 100644 debian/patches/bugfix/m68k/disable-mac-broken-config-options.diff delete mode 100644 debian/patches/bugfix/m68k/dmasound_paula.diff delete mode 100644 debian/patches/bugfix/m68k/early-param.diff delete mode 100644 debian/patches/bugfix/m68k/ethernec-kill-ETHERNEC_USE_POLL.diff delete mode 100644 debian/patches/bugfix/m68k/ethernec-work.diff delete mode 100644 debian/patches/bugfix/m68k/falconide_intr_lock-ratelimit.diff delete mode 100644 debian/patches/bugfix/m68k/falconide_intr_lock-reentrant.diff delete mode 100644 debian/patches/bugfix/m68k/hilkbd-warning.diff delete mode 100644 debian/patches/bugfix/m68k/irq_lockdep.diff delete mode 100644 debian/patches/bugfix/m68k/kmap_atomic-inline.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-53c700-cleanups.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-53c700-scsi.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-amiga-z2ram-kill-TRUE-FALSE.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-arbitary-speed-tty-support.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-as.patch delete mode 100644 debian/patches/bugfix/m68k/m68k-do-not-include-RODATA-in-text-segment.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-generic-io.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-linux-gnu-crosscompile.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-mvme-scsi-rename.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-page.h-needs-compiler.h.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-reformat.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-scsi-Kconfig-hickups.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-undefined-module_fixup.diff delete mode 100644 debian/patches/bugfix/m68k/m68k-use-_AC.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-cuda-adb-fixes.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-finish_irq_cleanup.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-irq-plan-e.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-irq-prep.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-macii-adb-fixes.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-macmace-fixes.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-macsonic-via-alt-mapping.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-patch_A-mac68k_cvs_nubus_defines.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-patch_B-mac68k_cvs_DP8390_update.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-patch_d-via-alt-mapping.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-remove-unused-adb-header.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-revert-remaining-irq-damage.diff delete mode 100644 debian/patches/bugfix/m68k/mac68k-sonic-fixes.diff delete mode 100644 debian/patches/bugfix/m68k/nfeth-virt_to_phys.diff delete mode 100644 debian/patches/bugfix/m68k/pmu_queue_request-conflict.diff delete mode 100644 debian/patches/bugfix/m68k/split-amiga7xx.diff delete mode 100644 debian/patches/bugfix/m68k/sun3-3x-cg3-bw2.diff delete mode 100644 debian/patches/bugfix/m68k/sun3-3x-serial.diff delete mode 100644 debian/patches/bugfix/m68k/sun3-numints.diff delete mode 100644 debian/patches/bugfix/m68k/unnecessary-m68k_memoffset.diff delete mode 100644 debian/patches/bugfix/m68k/via-pmu68k-dead-code.diff delete mode 100644 debian/patches/bugfix/m68k/zorro-module-device-table.diff delete mode 100644 debian/patches/bugfix/m68k/zorro-resource_size_t-warnings.diff delete mode 100644 debian/patches/bugfix/m68k/zorro_config_attr-read-only.diff diff --git a/debian/changelog b/debian/changelog index 7b0922fbf..d7e73e79c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -59,7 +59,10 @@ linux-2.6 (2.6.24~rc7-1~experimental.1) UNRELEASED; urgency=low * [mips/mipsel] Remove QEMU flavour, as the Malta platform is now correctly emulated in QEMU. - -- maximilian attems Mon, 07 Jan 2008 17:28:08 +0100 + [ Christian T. Steigies ] + * [m68k]: Update patches from linux-m68k CVS + + -- Christian T. Steigies Tue, 8 Jan 2008 22:16:26 +0100 linux-2.6 (2.6.23-1~experimental.1) UNRELEASED; urgency=low diff --git a/debian/patches/bugfix/m68k/143-ioext.diff b/debian/patches/bugfix/m68k/143-ioext.diff deleted file mode 100644 index 01c02d095..000000000 --- a/debian/patches/bugfix/m68k/143-ioext.diff +++ /dev/null @@ -1,1352 +0,0 @@ -To: linus, alan -Cc: lkml -Subject: [PATCH] Amiga GVP I/O Extender PLIP - -From: Linux/m68k legacy - -Add a PLIP driver for the Amiga GVP I/O Extender's parallel port - ---- - drivers/char/16c552.h | 165 +++++++ - drivers/char/ioext.h | 107 ++++ - drivers/char/plip_ioext.c | 1057 ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 1329 insertions(+) - ---- /dev/null -+++ linux-m68k-2.6.21/drivers/char/16c552.h -@@ -0,0 +1,165 @@ -+/* -+ * Definitions for the 16c552 DACE -+ * (dual-asynchronous-communications-element) used on the GVP -+ * IO-Extender. -+ * -+ * Basically this is two 16c550 uarts's and a parallel port, which is -+ * why the serial definitions should be valid for the 16c550 uart -+ * aswell. -+ * -+ * Data was taken from National Semiconductors duart 16c552 -+ * data-sheets and the Texas Instruments DACE 16c552 data-sheets (the -+ * NS version of the chip is _non_ standard and their data-sheets did -+ * cost me several wasted hours of work). -+ * -+ * This file is (C) 1995 Jes Sorensen (jds@kom.auc.dk) -+ * -+ * Moved from drivers/char/ to include/linux/, because it's useful -+ * on more than just the one card. I'm using it on the hp300 DCA -+ * serial driver, for example. -+ * -- Peter Maydell 05/1998 -+ */ -+ -+#ifndef _16C552_H_ -+#define _16C552_H_ -+ -+/* Serial stuff */ -+ -+struct uart_16c550 { -+ volatile u_char skip0; -+ volatile u_char RBR; -+ volatile u_char skip1; -+ volatile u_char IER; -+ volatile u_char skip2; -+ volatile u_char IIR; -+ volatile u_char skip3; -+ volatile u_char LCR; -+ volatile u_char skip4; -+ volatile u_char MCR; -+ volatile u_char skip5; -+ volatile u_char LSR; -+ volatile u_char skip6; -+ volatile u_char MSR; -+ volatile u_char skip7; -+ volatile u_char SCR; -+}; -+ -+#define THR RBR -+#define FCR IIR -+#define DLL RBR -+#define DLM IER -+#define AFR IIR -+ -+/* -+ * Bit-defines for the various registers. -+ */ -+ -+ -+/* IER */ -+ -+#define ERDAI (1<<0) -+#define ETHREI (1<<1) -+#define ELSI (1<<2) -+#define EMSI (1<<3) -+ -+/* IIR - Interrupt Ident. Register */ -+ -+#define IRQ_PEND (1<<0) /* NOTE: IRQ_PEND=0 implies irq pending */ -+#define IRQ_ID1 (1<<1) -+#define IRQ_ID2 (1<<2) -+#define IRQ_ID3 (1<<3) -+#define FIFO_ENA0 (1<<6) /* Both these are set when FCR(1<<0)=1 */ -+#define FIFO_ENA1 (1<<7) -+ -+#define IRQ_RLS (IRQ_ID1 | IRQ_ID2) -+#define IRQ_RDA (IRQ_ID2) -+#define IRQ_CTI (IRQ_ID2 | IRQ_ID3) -+#define IRQ_THRE (IRQ_ID1) -+#define IRQ_MS 0 -+ -+/* FCR - FIFO Control Register */ -+ -+#define FIFO_ENA (1<<0) -+#define RCVR_FIFO_RES (1<<1) -+#define XMIT_FIFO_RES (1<<2) -+#define DMA_MODE_SEL (1<<3) -+#define RCVR_TRIG_LSB (1<<6) -+#define RCVR_TRIG_MSB (1<<7) -+ -+#define FIFO_TRIG_1 0x00 -+#define FIFO_TRIG_4 RCVR_TRIG_LSB -+#define FIFO_TRIG_8 RCVR_TRIG_MSB -+#define FIFO_TRIG_14 RCVR_TRIG_LSB|RCVR_TRIG_MSB -+ -+/* LCR - Line Control Register */ -+ -+#define WLS0 (1<<0) -+#define WLS1 (1<<1) -+#define STB (1<<2) -+#define PEN (1<<3) -+#define EPS (1<<4) -+#define STICK_PARITY (1<<5) -+#define SET_BREAK (1<<6) -+#define DLAB (1<<7) -+ -+#define data_5bit 0x00 -+#define data_6bit 0x01 -+#define data_7bit 0x02 -+#define data_8bit 0x03 -+ -+ -+/* MCR - Modem Control Register */ -+ -+#define DTR (1<<0) -+#define RTS (1<<1) -+#define OUT1 (1<<2) -+#define OUT2 (1<<3) -+#define LOOP (1<<4) -+ -+/* LSR - Line Status Register */ -+ -+#define DR (1<<0) -+#define OE (1<<1) -+#define PE (1<<2) -+#define FE (1<<3) -+#define BI (1<<4) -+#define THRE (1<<5) -+#define TEMT (1<<6) -+#define RCVR_FIFO_ERR (1<<7) -+ -+/* MSR - Modem Status Register */ -+ -+#define DCTS (1<<0) -+#define DDSR (1<<1) -+#define TERI (1<<2) -+#define DDCD (1<<3) -+#define CTS (1<<4) -+#define DSR (1<<5) -+#define RING_I (1<<6) -+#define DCD (1<<7) -+ -+/* AFR - Alternate Function Register */ -+ -+#define CONCUR_WRITE (1<<0) -+#define BAUDOUT (1<<1) -+#define RXRDY (1<<2) -+ -+/* Parallel stuff */ -+ -+/* -+ * Unfortunately National Semiconductors did not supply the -+ * specifications for the parallel port in the chip :-( -+ * TI succed though, so here they are :-) -+ * -+ * Defines for the bits can be found by including -+ */ -+struct IOEXT_par { -+ volatile u_char skip0; -+ volatile u_char DATA; -+ volatile u_char skip1; -+ volatile u_char STATUS; -+ volatile u_char skip2; -+ volatile u_char CTRL; -+}; -+ -+#endif ---- /dev/null -+++ linux-m68k-2.6.21/drivers/char/ioext.h -@@ -0,0 +1,107 @@ -+/* -+ * Shared data structure for GVP IO-Extender support. -+ * -+ * Merge of ioext.h and ser_ioext.h -+ */ -+#ifndef _IOEXT_H_ -+#define _IOEXT_H_ -+ -+#include -+ -+#include "16c552.h" -+ -+#define MAX_IOEXT 5 /* -+ * The maximum number of io-extenders is 5, as you -+ * can't have more than 5 ZII boards in any Amiga. -+ */ -+ -+#define UART_CLK 7372800 -+ -+#define IOEXT_BAUD_BASE (UART_CLK / 16) -+ -+#define IOEXT_MAX_LINES 2 -+ -+#define IOEXT_PAR_PLIP 0x0001 -+#define IOEXT_PAR_LP 0x0002 -+ -+ -+/* -+ * Macros for the serial driver. -+ */ -+#define curruart(info) ((struct uart_16c550 *)(info->port)) -+ -+#define ser_DTRon(info) curruart(info)->MCR |= DTR -+#define ser_RTSon(info) curruart(info)->MCR |= RTS -+#define ser_DTRoff(info) curruart(info)->MCR &= ~DTR -+#define ser_RTSoff(info) curruart(info)->MCR &= ~RTS -+ -+ -+/* -+ * CNTR defines (copied from the GVP SCSI-driver file gvp11.h -+ */ -+#define GVP_BUSY (1<<0) -+#define GVP_IRQ_PEND (1<<1) -+#define GVP_IRQ_ENA (1<<3) -+#define GVP_DIR_WRITE (1<<4) -+ -+ -+/* -+ * CTRL defines -+ */ -+#define PORT0_MIDI (1<<0) /* CLR = DRIVERS SET = MIDI */ -+#define PORT1_MIDI (1<<1) /* CLR = DRIVERS SET = MIDI */ -+#define PORT0_DRIVER (1<<2) /* CLR = RS232, SET = MIDI */ -+#define PORT1_DRIVER (1<<3) /* CLR = RS232, SET = MIDI */ -+#define IRQ_SEL (1<<4) /* CLR = INT2, SET = INT6 */ -+#define ROM_BANK_SEL (1<<5) /* CLR = LOW 32K, SET = HIGH 32K */ -+#define PORT0_CTRL (1<<6) /* CLR = RTSx or RXRDYx, SET = RTSx ONLY */ -+#define PORT1_CTRL (1<<7) /* CLR = RTSx or RXRDYx, SET = RTSx ONLY */ -+ -+ -+/* -+ * This is the struct describing the registers on the IO-Extender. -+ * NOTE: The board uses a dual uart (16c552), which should be equal to -+ * two 16c550 uarts. -+ */ -+typedef struct { -+ char gap0[0x41]; -+ volatile unsigned char CNTR; /* GVP DMAC CNTR (status register) */ -+ char gap1[0x11e]; -+ struct uart_16c550 uart0; /* The first uart */ -+ char gap2[0xf0]; -+ struct uart_16c550 uart1; /* The second uart */ -+ char gap3[0xf0]; -+ struct IOEXT_par par; /* The parallel port */ -+ char gap4[0xfb]; -+ volatile unsigned char CTRL; /* The control-register on the board */ -+} IOEXT_struct; -+ -+ -+typedef struct { -+ int num_uarts; -+ int line[IOEXT_MAX_LINES]; -+ volatile struct uart_16c550 *uart[IOEXT_MAX_LINES]; -+ IOEXT_struct *board; -+ int spurious_count; -+ unsigned char par_use; /* IOEXT_PAR_xxx */ -+#if defined(CONFIG_GVPIOEXT_PLIP) || defined(CONFIG_GVPIOEXT_PLIP_MODULE) -+ struct nt_device *dev; -+#endif -+#if defined(CONFIG_GVPIOEXT_LP) || defined(CONFIG_GVPIOEXT_LP_MODULE) -+ struct lp_struct *lp_table; -+ int lp_dev; -+ int lp_interrupt; -+#endif -+} IOExtInfoType; -+ -+/* Number of detected boards. */ -+extern int ioext_num; -+extern IOExtInfoType ioext_info[MAX_IOEXT]; -+ -+void ioext_plip_interrupt(struct net_device *dev, int *spurious_count); -+void ioext_lp_interrupt(int dev, int *spurious_count); -+ -+extern struct net_device ioext_dev_plip[3]; -+extern struct lp_struct ioext_lp_table[1]; -+ -+#endif ---- /dev/null -+++ linux-m68k-2.6.21/drivers/char/plip_ioext.c -@@ -0,0 +1,1057 @@ -+/* -+ * plip_ioext: A parallel port "network" driver for GVP IO-Extender. -+ * -+ * Authors: See drivers/net/plip.c -+ * IO-Extender version by Steve Bennett, -+ * -+ * This driver is for use with a 5-bit cable (LapLink (R) cable). -+ */ -+ -+static const char *version = "NET3 PLIP version 2.2/m68k"; -+ -+#define __NO_VERSION__ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+/*#include */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "ioext.h" -+ -+#define DEBUG 0 -+ -+/* Map 'struct device *' to our control structure */ -+#define PLIP_DEV(DEV) (&ioext_info[(DEV)->irq]) -+ -+/************************************************************************ -+** -+** PLIP definitions -+** -+************************************************************************* -+*/ -+ -+/* Use 0 for production, 1 for verification, >2 for debug */ -+#ifndef NET_DEBUG -+#define NET_DEBUG 2 -+#endif -+static unsigned int net_debug = NET_DEBUG; -+ -+/* In micro second */ -+#define PLIP_DELAY_UNIT 1 -+ -+/* Connection time out = PLIP_TRIGGER_WAIT * PLIP_DELAY_UNIT usec */ -+#define PLIP_TRIGGER_WAIT 500 -+ -+/* Nibble time out = PLIP_NIBBLE_WAIT * PLIP_DELAY_UNIT usec */ -+#define PLIP_NIBBLE_WAIT 3000 -+ -+#define PAR_DATA(dev) ((dev)->base_addr+0) -+#define PAR_STATUS(dev) ((dev)->base_addr+2) -+#define PAR_CONTROL(dev) ((dev)->base_addr+4) -+ -+static void enable_par_irq(struct device *dev, int on); -+static int plip_init(struct device *dev); -+ -+/* Bottom halfs */ -+static void plip_kick_bh(struct device *dev); -+static void plip_bh(struct device *dev); -+ -+/* Functions for DEV methods */ -+static int plip_rebuild_header(struct sk_buff *skb); -+static int plip_tx_packet(struct sk_buff *skb, struct device *dev); -+static int plip_open(struct device *dev); -+static int plip_close(struct device *dev); -+static struct enet_statistics *plip_get_stats(struct device *dev); -+static int plip_config(struct device *dev, struct ifmap *map); -+static int plip_ioctl(struct device *dev, struct ifreq *ifr, int cmd); -+ -+enum plip_connection_state { -+ PLIP_CN_NONE=0, -+ PLIP_CN_RECEIVE, -+ PLIP_CN_SEND, -+ PLIP_CN_CLOSING, -+ PLIP_CN_ERROR -+}; -+ -+enum plip_packet_state { -+ PLIP_PK_DONE=0, -+ PLIP_PK_TRIGGER, -+ PLIP_PK_LENGTH_LSB, -+ PLIP_PK_LENGTH_MSB, -+ PLIP_PK_DATA, -+ PLIP_PK_CHECKSUM -+}; -+ -+enum plip_nibble_state { -+ PLIP_NB_BEGIN, -+ PLIP_NB_1, -+ PLIP_NB_2, -+}; -+ -+struct plip_local { -+ enum plip_packet_state state; -+ enum plip_nibble_state nibble; -+ union { -+ struct { -+#if defined(__LITTLE_ENDIAN) -+ unsigned char lsb; -+ unsigned char msb; -+#elif defined(__BIG_ENDIAN) -+ unsigned char msb; -+ unsigned char lsb; -+#else -+#error "Please fix the endianness defines in " -+#endif -+ } b; -+ unsigned short h; -+ } length; -+ unsigned short byte; -+ unsigned char checksum; -+ unsigned char data; -+ struct sk_buff *skb; -+}; -+ -+struct net_local { -+ struct enet_statistics enet_stats; -+ struct tq_struct immediate; -+ struct tq_struct deferred; -+ struct plip_local snd_data; -+ struct plip_local rcv_data; -+ unsigned long trigger; -+ unsigned long nibble; -+ enum plip_connection_state connection; -+ unsigned short timeout_count; -+ char is_deferred; -+ int (*orig_rebuild_header)(struct sk_buff *skb); -+}; -+ -+struct device ioext_dev_plip[] = { -+ { -+ "plip0", -+ 0, 0, 0, 0, /* memory */ -+ 0, 0, /* base, irq */ -+ 0, 0, 0, NULL, plip_init -+ }, -+ { -+ "plip1", -+ 0, 0, 0, 0, /* memory */ -+ 0, 0, /* base, irq */ -+ 0, 0, 0, NULL, plip_init -+ }, -+ { -+ "plip2", -+ 0, 0, 0, 0, /* memory */ -+ 0, 0, /* base, irq */ -+ 0, 0, 0, NULL, plip_init -+ } -+}; -+ -+/* -+ * Check for and handle an interrupt for this PLIP device. -+ * -+ */ -+void ioext_plip_interrupt(struct device *dev, int *spurious_count) -+{ -+ struct net_local *nl; -+ struct plip_local *rcv; -+ unsigned char c0; -+ unsigned long flags; -+ -+ nl = (struct net_local *)dev->priv; -+ rcv = &nl->rcv_data; -+ -+ c0 = z_readb(PAR_STATUS(dev)); -+ -+ if (dev->interrupt) { -+ return; -+ } -+ -+ if ((c0 & 0xf8) != 0xc0) { -+ /* Not for us */ -+ ++*spurious_count; -+ return; -+ } -+ -+ *spurious_count = 0; -+ dev->interrupt = 1; -+ -+ local_irq_save(flags); -+ -+ switch (nl->connection) { -+ case PLIP_CN_CLOSING: -+ dev->tbusy = 0; -+ case PLIP_CN_NONE: -+ case PLIP_CN_SEND: -+ dev->last_rx = jiffies; -+ rcv->state = PLIP_PK_TRIGGER; -+ nl->connection = PLIP_CN_RECEIVE; -+ nl->timeout_count = 0; -+ queue_task(&nl->immediate, &tq_immediate); -+ mark_bh(IMMEDIATE_BH); -+ local_irq_restore(flags); -+#if 0 -+ printk("%s: receive irq in SEND/NONE/CLOSING (%d) ok\n", -+ dev->name, nl->connection); -+#endif -+ break; -+ -+ case PLIP_CN_RECEIVE: -+ local_irq_restore(flags); -+ printk("%s: receive interrupt when receiving packet\n", -+ dev->name); -+ break; -+ -+ case PLIP_CN_ERROR: -+ local_irq_restore(flags); -+ printk("%s: receive interrupt in error state\n", dev->name); -+ break; -+ } -+} -+ -+ -+/* Bottom half handler for the delayed request. -+ This routine is kicked by do_timer(). -+ Request `plip_bh' to be invoked. */ -+static void -+plip_kick_bh(struct device *dev) -+{ -+ struct net_local *nl = (struct net_local *)dev->priv; -+ -+ if (nl->is_deferred) { -+ queue_task(&nl->immediate, &tq_immediate); -+ mark_bh(IMMEDIATE_BH); -+ } -+} -+ -+/* Forward declarations of internal routines */ -+static int plip_none(struct device *, struct net_local *, -+ struct plip_local *, struct plip_local *); -+static int plip_receive_packet(struct device *, struct net_local *, -+ struct plip_local *, struct plip_local *); -+static int plip_send_packet(struct device *, struct net_local *, -+ struct plip_local *, struct plip_local *); -+static int plip_connection_close(struct device *, struct net_local *, -+ struct plip_local *, struct plip_local *); -+static int plip_error(struct device *, struct net_local *, -+ struct plip_local *, struct plip_local *); -+static int plip_bh_timeout_error(struct device *dev, struct net_local *nl, -+ struct plip_local *snd, -+ struct plip_local *rcv, -+ int error); -+ -+#define OK 0 -+#define TIMEOUT 1 -+#define ERROR 2 -+ -+typedef int (*plip_func)(struct device *dev, struct net_local *nl, -+ struct plip_local *snd, struct plip_local *rcv); -+ -+static plip_func connection_state_table[] = -+{ -+ plip_none, -+ plip_receive_packet, -+ plip_send_packet, -+ plip_connection_close, -+ plip_error -+}; -+ -+/* -+** enable_par_irq() -+** -+** Enable or disable parallel irq for 'dev' according to 'on'. -+** -+** It is NOT possible to disable only the parallel irq. -+** So we disable the board interrupt instead. This means that -+** during reception of a PLIP packet, no serial interrupts can -+** happen. Sorry. -+*/ -+static void enable_par_irq(struct device *dev, int on) -+{ -+ if (on) { -+ PLIP_DEV(dev)->board->CNTR |= GVP_IRQ_ENA; -+ } -+ else { -+ PLIP_DEV(dev)->board->CNTR &= ~GVP_IRQ_ENA; -+ } -+} -+ -+/* Bottom half handler of PLIP. */ -+static void -+plip_bh(struct device *dev) -+{ -+ struct net_local *nl = (struct net_local *)dev->priv; -+ struct plip_local *snd = &nl->snd_data; -+ struct plip_local *rcv = &nl->rcv_data; -+ plip_func f; -+ int r; -+ -+ nl->is_deferred = 0; -+ f = connection_state_table[nl->connection]; -+ if ((r = (*f)(dev, nl, snd, rcv)) != OK -+ && (r = plip_bh_timeout_error(dev, nl, snd, rcv, r)) != OK) { -+ nl->is_deferred = 1; -+ queue_task(&nl->deferred, &tq_timer); -+ } -+} -+ -+static int -+plip_bh_timeout_error(struct device *dev, struct net_local *nl, -+ struct plip_local *snd, struct plip_local *rcv, -+ int error) -+{ -+ unsigned char c0; -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if (nl->connection == PLIP_CN_SEND) { -+ -+ if (error != ERROR) { /* Timeout */ -+ nl->timeout_count++; -+ if ((snd->state == PLIP_PK_TRIGGER -+ && nl->timeout_count <= 10) -+ || nl->timeout_count <= 3) { -+ local_irq_restore(flags); -+ /* Try again later */ -+ return TIMEOUT; -+ } -+ c0 = z_readb(PAR_STATUS(dev)); -+ printk(KERN_INFO "%s: transmit timeout(%d,%02x)\n", -+ dev->name, snd->state, c0); -+ } -+ nl->enet_stats.tx_errors++; -+ nl->enet_stats.tx_aborted_errors++; -+ } else if (nl->connection == PLIP_CN_RECEIVE) { -+ if (rcv->state == PLIP_PK_TRIGGER) { -+ /* Transmission was interrupted. */ -+ local_irq_restore(flags); -+ return OK; -+ } -+ if (error != ERROR) { /* Timeout */ -+ if (++nl->timeout_count <= 3) { -+ local_irq_restore(flags); -+ /* Try again later */ -+ return TIMEOUT; -+ } -+ c0 = z_readb(PAR_STATUS(dev)); -+ printk(KERN_INFO "%s: receive timeout(%d,%02x)\n", -+ dev->name, rcv->state, c0); -+ } -+ nl->enet_stats.rx_dropped++; -+ } -+ rcv->state = PLIP_PK_DONE; -+ if (rcv->skb) { -+ kfree_skb(rcv->skb); -+ rcv->skb = NULL; -+ } -+ snd->state = PLIP_PK_DONE; -+ if (snd->skb) { -+ dev_kfree_skb(snd->skb); -+ snd->skb = NULL; -+ } -+ enable_par_irq(dev, 0); -+ dev->tbusy = 1; -+ nl->connection = PLIP_CN_ERROR; -+ z_writeb(0x00, PAR_DATA(dev)); -+ local_irq_restore(flags); -+ -+ return TIMEOUT; -+} -+ -+static int -+plip_none(struct device *dev, struct net_local *nl, -+ struct plip_local *snd, struct plip_local *rcv) -+{ -+ return OK; -+} -+ -+/* PLIP_RECEIVE --- receive a byte(two nibbles) -+ Returns OK on success, TIMEOUT on timeout */ -+inline static int -+plip_receive(struct device *dev, unsigned short nibble_timeout, -+ enum plip_nibble_state *ns_p, unsigned char *data_p) -+{ -+ unsigned char c0, c1; -+ unsigned int cx; -+ -+ switch (*ns_p) { -+ case PLIP_NB_BEGIN: -+ cx = nibble_timeout; -+ while (1) { -+ c0 = z_readb(PAR_STATUS(dev)); -+ udelay(PLIP_DELAY_UNIT); -+ if ((c0 & 0x80) == 0) { -+ c1 = z_readb(PAR_STATUS(dev)); -+ if (c0 == c1) -+ break; -+ } -+ if (--cx == 0) -+ return TIMEOUT; -+ } -+#if 0 -+ printk("received first nybble: %02X -> %02X\n", -+ c0, (c0 >> 3) & 0x0F); -+#endif -+ *data_p = (c0 >> 3) & 0x0f; -+ z_writeb(0x10, PAR_DATA(dev)); /* send ACK */ -+ *ns_p = PLIP_NB_1; -+ -+ case PLIP_NB_1: -+ cx = nibble_timeout; -+ while (1) { -+ c0 = z_readb(PAR_STATUS(dev)); -+ udelay(PLIP_DELAY_UNIT); -+ if (c0 & 0x80) { -+ c1 = z_readb(PAR_STATUS(dev)); -+ if (c0 == c1) -+ break; -+ } -+ if (--cx == 0) -+ return TIMEOUT; -+ } -+#if 0 -+ printk("received second nybble: %02X -> %02X\n", -+ c0, (c0 << 1) & 0xF0); -+#endif -+ *data_p |= (c0 << 1) & 0xf0; -+ z_writeb(0x00, PAR_DATA(dev)); /* send ACK */ -+ *ns_p = PLIP_NB_BEGIN; -+ case PLIP_NB_2: -+ break; -+ } -+ return OK; -+} -+ -+/* PLIP_RECEIVE_PACKET --- receive a packet */ -+static int -+plip_receive_packet(struct device *dev, struct net_local *nl, -+ struct plip_local *snd, struct plip_local *rcv) -+{ -+ unsigned short nibble_timeout = nl->nibble; -+ unsigned char *lbuf; -+ unsigned long flags; -+ -+ switch (rcv->state) { -+ case PLIP_PK_TRIGGER: -+ enable_par_irq(dev, 0); -+ dev->interrupt = 0; -+ z_writeb(0x01, PAR_DATA(dev)); /* send ACK */ -+ if (net_debug > 2) -+ printk(KERN_DEBUG "%s: receive start\n", dev->name); -+ rcv->state = PLIP_PK_LENGTH_LSB; -+ rcv->nibble = PLIP_NB_BEGIN; -+ -+ case PLIP_PK_LENGTH_LSB: -+ if (snd->state != PLIP_PK_DONE) { -+ if (plip_receive(dev, nl->trigger, -+ &rcv->nibble, &rcv->length.b.lsb)) { -+ /* collision, here dev->tbusy == 1 */ -+ rcv->state = PLIP_PK_DONE; -+ nl->is_deferred = 1; -+ nl->connection = PLIP_CN_SEND; -+ queue_task(&nl->deferred, &tq_timer); -+ enable_par_irq(dev, 1); -+ return OK; -+ } -+ } else { -+ if (plip_receive(dev, nibble_timeout, -+ &rcv->nibble, &rcv->length.b.lsb)) -+ return TIMEOUT; -+ } -+ rcv->state = PLIP_PK_LENGTH_MSB; -+ -+ case PLIP_PK_LENGTH_MSB: -+ if (plip_receive(dev, nibble_timeout, -+ &rcv->nibble, &rcv->length.b.msb)) -+ return TIMEOUT; -+ if (rcv->length.h > dev->mtu + dev->hard_header_len -+ || rcv->length.h < 8) { -+ printk(KERN_INFO "%s: bogus packet size %d.\n", -+ dev->name, rcv->length.h); -+ return ERROR; -+ } -+ /* Malloc up new buffer. */ -+ rcv->skb = dev_alloc_skb(rcv->length.h); -+ if (rcv->skb == NULL) { -+ printk(KERN_INFO "%s: Memory squeeze.\n", dev->name); -+ return ERROR; -+ } -+ skb_put(rcv->skb,rcv->length.h); -+ rcv->skb->dev = dev; -+ rcv->state = PLIP_PK_DATA; -+ rcv->byte = 0; -+ rcv->checksum = 0; -+ -+ case PLIP_PK_DATA: -+ lbuf = rcv->skb->data; -+ do -+ if (plip_receive(dev, nibble_timeout, -+ &rcv->nibble, &lbuf[rcv->byte])) -+ return TIMEOUT; -+ while (++rcv->byte < rcv->length.h); -+ do -+ rcv->checksum += lbuf[--rcv->byte]; -+ while (rcv->byte); -+ rcv->state = PLIP_PK_CHECKSUM; -+ -+ case PLIP_PK_CHECKSUM: -+ if (plip_receive(dev, nibble_timeout, -+ &rcv->nibble, &rcv->data)) -+ return TIMEOUT; -+ if (rcv->data != rcv->checksum) { -+ nl->enet_stats.rx_crc_errors++; -+ if (net_debug) -+ printk(KERN_INFO "%s: checksum error\n", -+ dev->name); -+ return ERROR; -+ } -+ rcv->state = PLIP_PK_DONE; -+ -+ case PLIP_PK_DONE: -+ /* Inform the upper layer for the arrival of a packet. */ -+ rcv->skb->protocol=eth_type_trans(rcv->skb, dev); -+ netif_rx(rcv->skb); -+ nl->enet_stats.rx_packets++; -+ rcv->skb = NULL; -+ if (net_debug > 2) -+ printk(KERN_DEBUG "%s: receive end\n", dev->name); -+ -+ /* Close the connection. */ -+ z_writeb (0x00, PAR_DATA(dev)); -+ -+ local_irq_save(flags); -+ if (snd->state != PLIP_PK_DONE) { -+ nl->connection = PLIP_CN_SEND; -+ local_irq_restore(flags); -+ queue_task(&nl->immediate, &tq_immediate); -+ mark_bh(IMMEDIATE_BH); -+ enable_par_irq(dev, 1); -+ return OK; -+ } else { -+ nl->connection = PLIP_CN_NONE; -+ local_irq_restore(flags); -+ enable_par_irq(dev, 1); -+ return OK; -+ } -+ } -+ return OK; -+} -+ -+/* PLIP_SEND --- send a byte (two nibbles) -+ Returns OK on success, TIMEOUT when timeout */ -+inline static int -+plip_send(struct device *dev, unsigned short nibble_timeout, -+ enum plip_nibble_state *ns_p, unsigned char data) -+{ -+ unsigned char c0; -+ unsigned int cx; -+ -+ switch (*ns_p) { -+ case PLIP_NB_BEGIN: -+ z_writeb((data & 0x0f), PAR_DATA(dev)); -+ *ns_p = PLIP_NB_1; -+ -+ case PLIP_NB_1: -+ z_writeb(0x10 | (data & 0x0f), PAR_DATA(dev)); -+ cx = nibble_timeout; -+ while (1) { -+ c0 = z_readb(PAR_STATUS(dev)); -+ if ((c0 & 0x80) == 0) -+ break; -+ if (--cx == 0) -+ return TIMEOUT; -+ udelay(PLIP_DELAY_UNIT); -+ } -+ z_writeb(0x10 | (data >> 4), PAR_DATA(dev)); -+ *ns_p = PLIP_NB_2; -+ -+ case PLIP_NB_2: -+ z_writeb((data >> 4), PAR_DATA(dev)); -+ cx = nibble_timeout; -+ while (1) { -+ c0 = z_readb(PAR_STATUS(dev)); -+ if (c0 & 0x80) -+ break; -+ if (--cx == 0) -+ return TIMEOUT; -+ udelay(PLIP_DELAY_UNIT); -+ } -+ *ns_p = PLIP_NB_BEGIN; -+ return OK; -+ } -+ return OK; -+} -+ -+/* PLIP_SEND_PACKET --- send a packet */ -+static int -+plip_send_packet(struct device *dev, struct net_local *nl, -+ struct plip_local *snd, struct plip_local *rcv) -+{ -+ unsigned short nibble_timeout = nl->nibble; -+ unsigned char *lbuf; -+ unsigned char c0; -+ unsigned int cx; -+ unsigned long flags; -+ -+ if (snd->skb == NULL || (lbuf = snd->skb->data) == NULL) { -+ printk(KERN_INFO "%s: send skb lost\n", dev->name); -+ snd->state = PLIP_PK_DONE; -+ snd->skb = NULL; -+ return ERROR; -+ } -+ -+ if (snd->length.h == 0) { -+ return OK; -+ } -+ -+ switch (snd->state) { -+ case PLIP_PK_TRIGGER: -+ if ((z_readb(PAR_STATUS(dev)) & 0xf8) != 0x80) -+ return TIMEOUT; -+ -+ /* Trigger remote rx interrupt. */ -+ z_writeb(0x08, PAR_DATA(dev)); -+ cx = nl->trigger; -+ while (1) { -+ udelay(PLIP_DELAY_UNIT); -+ local_irq_save(flags); -+ if (nl->connection == PLIP_CN_RECEIVE) { -+ local_irq_restore(flags); -+ /* interrupted */ -+ nl->enet_stats.collisions++; -+ if (net_debug > 1) -+ printk(KERN_INFO "%s: collision.\n", -+ dev->name); -+ return OK; -+ } -+ c0 = z_readb(PAR_STATUS(dev)); -+ if (c0 & 0x08) { -+ enable_par_irq(dev, 0); -+ if (net_debug > 2) -+ printk(KERN_DEBUG "%s: send start\n", -+ dev->name); -+ snd->state = PLIP_PK_LENGTH_LSB; -+ snd->nibble = PLIP_NB_BEGIN; -+ nl->timeout_count = 0; -+ local_irq_restore(flags); -+ break; -+ } -+ local_irq_restore(flags); -+ if (--cx == 0) { -+ z_writeb(0x00, PAR_DATA(dev)); -+ return TIMEOUT; -+ } -+ } -+ -+ case PLIP_PK_LENGTH_LSB: -+ if (plip_send(dev, nibble_timeout, -+ &snd->nibble, snd->length.b.lsb)) -+ return TIMEOUT; -+ snd->state = PLIP_PK_LENGTH_MSB; -+ -+ case PLIP_PK_LENGTH_MSB: -+ if (plip_send(dev, nibble_timeout, -+ &snd->nibble, snd->length.b.msb)) -+ return TIMEOUT; -+ snd->state = PLIP_PK_DATA; -+ snd->byte = 0; -+ snd->checksum = 0; -+ -+ case PLIP_PK_DATA: -+ do -+ if (plip_send(dev, nibble_timeout, -+ &snd->nibble, lbuf[snd->byte])) -+ return TIMEOUT; -+ while (++snd->byte < snd->length.h); -+ do -+ snd->checksum += lbuf[--snd->byte]; -+ while (snd->byte); -+ snd->state = PLIP_PK_CHECKSUM; -+ -+ case PLIP_PK_CHECKSUM: -+ if (plip_send(dev, nibble_timeout, -+ &snd->nibble, snd->checksum)) -+ return TIMEOUT; -+ -+ dev_kfree_skb(snd->skb); -+ nl->enet_stats.tx_packets++; -+ snd->state = PLIP_PK_DONE; -+ -+ case PLIP_PK_DONE: -+ /* Close the connection */ -+ z_writeb (0x00, PAR_DATA(dev)); -+ snd->skb = NULL; -+ if (net_debug > 2) -+ printk(KERN_DEBUG "%s: send end\n", dev->name); -+ nl->connection = PLIP_CN_CLOSING; -+ nl->is_deferred = 1; -+ queue_task(&nl->deferred, &tq_timer); -+ enable_par_irq(dev, 1); -+ return OK; -+ } -+ return OK; -+} -+ -+static int -+plip_connection_close(struct device *dev, struct net_local *nl, -+ struct plip_local *snd, struct plip_local *rcv) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if (nl->connection == PLIP_CN_CLOSING) { -+ nl->connection = PLIP_CN_NONE; -+ dev->tbusy = 0; -+ mark_bh(NET_BH); -+ } -+ local_irq_restore(flags); -+ return OK; -+} -+ -+/* PLIP_ERROR --- wait till other end settled */ -+static int -+plip_error(struct device *dev, struct net_local *nl, -+ struct plip_local *snd, struct plip_local *rcv) -+{ -+ unsigned char status; -+ -+ status = z_readb(PAR_STATUS(dev)); -+ if ((status & 0xf8) == 0x80) { -+ if (net_debug > 2) -+ printk(KERN_DEBUG "%s: reset interface.\n", dev->name); -+ nl->connection = PLIP_CN_NONE; -+ dev->tbusy = 0; -+ dev->interrupt = 0; -+ enable_par_irq(dev, 1); -+ mark_bh(NET_BH); -+ } else { -+ nl->is_deferred = 1; -+ queue_task(&nl->deferred, &tq_timer); -+ } -+ -+ return OK; -+} -+ -+/* We don't need to send arp, for plip is point-to-point. */ -+static int -+plip_rebuild_header(struct sk_buff *skb) -+{ -+ struct device *dev = skb->dev; -+ struct net_local *nl = (struct net_local *)dev->priv; -+ struct ethhdr *eth = (struct ethhdr *)skb->data; -+ int i; -+ -+ if ((dev->flags & IFF_NOARP)==0) -+ return nl->orig_rebuild_header(skb); -+ -+ if (eth->h_proto != __constant_htons(ETH_P_IP) -+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) -+ && eth->h_proto != __constant_htons(ETH_P_IPV6) -+#endif -+ ) { -+ printk(KERN_ERR "plip_rebuild_header: Don't know how to resolve type %d addresses?\n", (int)eth->h_proto); -+ memcpy(eth->h_source, dev->dev_addr, dev->addr_len); -+ return 0; -+ } -+ -+ for (i=0; i < ETH_ALEN - sizeof(u32); i++) -+ eth->h_dest[i] = 0xfc; -+#if 0 -+ *(u32 *)(eth->h_dest+i) = dst; -+#else -+ /* Do not want to include net/route.h here. -+ * In any case, it is TOP of silliness to emulate -+ * hardware addresses on PtP link. --ANK -+ */ -+ *(u32 *)(eth->h_dest+i) = 0; -+#endif -+ return 0; -+} -+ -+static int -+plip_tx_packet(struct sk_buff *skb, struct device *dev) -+{ -+ struct net_local *nl = (struct net_local *)dev->priv; -+ struct plip_local *snd = &nl->snd_data; -+ unsigned long flags; -+ -+ if (dev->tbusy) -+ return 1; -+ -+ if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) { -+ printk(KERN_ERR "%s: Transmitter access conflict.\n", -+ dev->name); -+ return 1; -+ } -+ -+ if (skb->len > dev->mtu + dev->hard_header_len) { -+ printk(KERN_ERR "%s: packet too big, %d.\n", -+ dev->name, (int)skb->len); -+ dev->tbusy = 0; -+ return 0; -+ } -+ -+ if (net_debug > 2) -+ printk(KERN_DEBUG "%s: send request\n", dev->name); -+ -+ local_irq_save(flags); -+ dev->trans_start = jiffies; -+ snd->skb = skb; -+ snd->length.h = skb->len; -+ snd->state = PLIP_PK_TRIGGER; -+ if (nl->connection == PLIP_CN_NONE) { -+ nl->connection = PLIP_CN_SEND; -+ nl->timeout_count = 0; -+ } -+ queue_task(&nl->immediate, &tq_immediate); -+ mark_bh(IMMEDIATE_BH); -+ local_irq_restore(flags); -+ -+ return 0; -+} -+ -+/* Open/initialize the board. This is called (in the current kernel) -+ sometime after booting when the 'ifconfig' program is run. -+ -+ */ -+static int -+plip_open(struct device *dev) -+{ -+ struct net_local *nl = (struct net_local *)dev->priv; -+ struct in_device *in_dev; -+ -+#if defined(CONFIG_GVPIOEXT_LP) || defined(CONFIG_GVPIOEXT_LP_MODULE) -+ /* Yes, there is a race condition here. Fix it later */ -+ if (PLIP_DEV(dev)->par_use & IOEXT_PAR_LP) { -+ /* Can't open if lp is in use */ -+#if DEBUG -+ printk("par is in use by lp\n"); -+#endif -+ return(-EBUSY); -+ } -+#endif -+ PLIP_DEV(dev)->par_use |= IOEXT_PAR_PLIP; -+ -+#if DEBUG -+ printk("plip_open(): sending 00 to data port\n"); -+#endif -+ -+ /* Clear the data port. */ -+ z_writeb (0x00, PAR_DATA(dev)); -+ -+#if DEBUG -+ printk("plip_open(): sent\n"); -+#endif -+ -+ /* Initialize the state machine. */ -+ nl->rcv_data.state = nl->snd_data.state = PLIP_PK_DONE; -+ nl->rcv_data.skb = nl->snd_data.skb = NULL; -+ nl->connection = PLIP_CN_NONE; -+ nl->is_deferred = 0; -+ -+ /* Fill in the MAC-level header. -+ (ab)Use "dev->broadcast" to store point-to-point MAC address. -+ -+ PLIP doesn't have a real mac address, but we need to create one -+ to be DOS compatible. */ -+ memset(dev->dev_addr, 0xfc, ETH_ALEN); -+ memset(dev->broadcast, 0xfc, ETH_ALEN); -+ -+ if ((in_dev=dev->ip_ptr) != NULL) { -+ /* -+ * Any address will do - we take the first -+ */ -+ struct in_ifaddr *ifa=in_dev->ifa_list; -+ if (ifa != NULL) { -+ memcpy(dev->dev_addr+2, &ifa->ifa_local, 4); -+ memcpy(dev->broadcast+2, &ifa->ifa_address, 4); -+ } -+ } -+ -+ dev->interrupt = 0; -+ dev->start = 1; -+ dev->tbusy = 0; -+ -+ MOD_INC_USE_COUNT; -+ -+ /* Enable rx interrupt. */ -+ enable_par_irq(dev, 1); -+ -+ return 0; -+} -+ -+/* The inverse routine to plip_open (). */ -+static int -+plip_close(struct device *dev) -+{ -+ struct net_local *nl = (struct net_local *)dev->priv; -+ struct plip_local *snd = &nl->snd_data; -+ struct plip_local *rcv = &nl->rcv_data; -+ unsigned long flags; -+ -+ dev->tbusy = 1; -+ dev->start = 0; -+ local_irq_save(flags); -+ nl->is_deferred = 0; -+ nl->connection = PLIP_CN_NONE; -+ local_irq_restore(flags); -+ z_writeb(0x00, PAR_DATA(dev)); -+ -+ snd->state = PLIP_PK_DONE; -+ if (snd->skb) { -+ dev_kfree_skb(snd->skb); -+ snd->skb = NULL; -+ } -+ rcv->state = PLIP_PK_DONE; -+ if (rcv->skb) { -+ kfree_skb(rcv->skb); -+ rcv->skb = NULL; -+ } -+ -+ PLIP_DEV(dev)->par_use &= ~IOEXT_PAR_PLIP; -+ -+ MOD_DEC_USE_COUNT; -+ return 0; -+} -+ -+static struct enet_statistics * -+plip_get_stats(struct device *dev) -+{ -+ struct net_local *nl = (struct net_local *)dev->priv; -+ struct enet_statistics *r = &nl->enet_stats; -+ -+ return r; -+} -+ -+static int -+plip_config(struct device *dev, struct ifmap *map) -+{ -+ if (dev->flags & IFF_UP) -+ return -EBUSY; -+ -+ printk(KERN_INFO "%s: This interface is autodetected (ignored).\n", -+ dev->name); -+ -+ return 0; -+} -+ -+static int -+plip_ioctl(struct device *dev, struct ifreq *rq, int cmd) -+{ -+ struct net_local *nl = (struct net_local *) dev->priv; -+ struct plipconf *pc = (struct plipconf *) &rq->ifr_data; -+ -+ switch(pc->pcmd) { -+ case PLIP_GET_TIMEOUT: -+ pc->trigger = nl->trigger; -+ pc->nibble = nl->nibble; -+ break; -+ case PLIP_SET_TIMEOUT: -+ nl->trigger = pc->trigger; -+ nl->nibble = pc->nibble; -+ break; -+ default: -+ return -EOPNOTSUPP; -+ } -+ return 0; -+} -+ -+/* -+ * Detect and initialize all IO-Extenders in this system. -+ * -+ * Both PLIP and serial devices are configured. -+ */ -+int plip_init(struct device *dev) -+{ -+ IOEXT_struct *board; -+ struct net_local *nl; -+ -+ if (ioext_num == 0) { -+ printk(KERN_INFO "%s\n", version); -+ } -+ -+ board = PLIP_DEV(dev)->board; -+ dev->base_addr = (unsigned long)&board->par.DATA; -+ -+ /* Cheat and use irq to index into our table */ -+ dev->irq = ioext_num; -+ -+ printk(KERN_INFO "%s: IO-Extender parallel port at 0x%08lX\n", dev->name, dev->base_addr); -+ -+ /* Fill in the generic fields of the device structure. */ -+ ether_setup(dev); -+ -+ /* Then, override parts of it */ -+ dev->hard_start_xmit = plip_tx_packet; -+ dev->open = plip_open; -+ dev->stop = plip_close; -+ dev->get_stats = plip_get_stats; -+ dev->set_config = plip_config; -+ dev->do_ioctl = plip_ioctl; -+ dev->tx_queue_len = 10; -+ dev->flags = IFF_POINTOPOINT|IFF_NOARP; -+ -+ /* Set the private structure */ -+ dev->priv = kmalloc(sizeof (struct net_local), GFP_KERNEL); -+ if (dev->priv == NULL) { -+ printk(KERN_ERR "%s: out of memory\n", dev->name); -+ return -ENOMEM; -+ } -+ memset(dev->priv, 0, sizeof(struct net_local)); -+ nl = (struct net_local *) dev->priv; -+ -+ nl->orig_rebuild_header = dev->rebuild_header; -+ dev->rebuild_header = plip_rebuild_header; -+ -+ /* Initialize constants */ -+ nl->trigger = PLIP_TRIGGER_WAIT; -+ nl->nibble = PLIP_NIBBLE_WAIT; -+ -+ /* Initialize task queue structures */ -+ nl->immediate.next = NULL; -+ nl->immediate.sync = 0; -+ nl->immediate.routine = (void *)(void *)plip_bh; -+ nl->immediate.data = dev; -+ -+ nl->deferred.next = NULL; -+ nl->deferred.sync = 0; -+ nl->deferred.routine = (void *)(void *)plip_kick_bh; -+ nl->deferred.data = dev; -+ -+ /* Don't enable interrupts yet */ -+ -+ return 0; -+} diff --git a/debian/patches/bugfix/m68k/149-mc68681.diff b/debian/patches/bugfix/m68k/149-mc68681.diff deleted file mode 100644 index eaad1204f..000000000 --- a/debian/patches/bugfix/m68k/149-mc68681.diff +++ /dev/null @@ -1,146 +0,0 @@ -To: linus, alan -Cc: lkml -Subject: [PATCH] MC68681 DUART - -From: Linux/m68k legacy - -MC68681 DUART register definitions for the Amiga MultiFace III serial driver. - ---- - drivers/char/mc68681.h | 131 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 131 insertions(+) - ---- /dev/null -+++ linux-m68k-2.6.21/drivers/char/mc68681.h -@@ -0,0 +1,131 @@ -+#ifndef _MC68681_H_ -+#define _MC68681_H_ -+ -+/* -+ * This describes an MC68681 DUART. It has almost only overlayed registers, which -+ * the structure very ugly. -+ * Note that the ri-register isn't really a register of the duart but a kludge of bsc -+ * to make the ring indicator available. -+ * -+ * The data came from the MFC-31-Developer Kit (from Ralph Seidel, -+ * zodiac@darkness.gun.de) and the data sheet of Phillip's clone device (SCN68681) -+ * (from Richard Hirst, srh@gpt.co.uk) -+ * -+ * 11.11.95 copyright Joerg Dorchain (dorchain@mpi-sb.mpg.de) -+ * -+ */ -+ -+struct duarthalf { -+union { -+volatile u_char mr1; /* rw */ -+volatile u_char mr2; /* rw */ -+} mr; -+volatile u_char ri; /* special, read */ -+union { -+volatile u_char sr; /* read */ -+volatile u_char csr; /* write */ -+} sr_csr; -+u_char pad1; -+volatile u_char cr; /* write */ -+u_char pad2; -+union { -+volatile u_char rhr; /* read */ -+volatile u_char thr; /* write */ -+} hr; -+u_char pad3; -+}; -+ -+struct duart { -+struct duarthalf pa; -+union { -+volatile u_char ipcr; /* read */ -+volatile u_char acr; /* write */ -+} ipcr_acr; -+u_char pad1; -+union { -+volatile u_char isr; /* read */ -+volatile u_char imr; /* write */ -+} ir; -+u_char pad2; -+volatile u_char ctu; -+u_char pad3; -+volatile u_char ctl; -+u_char pad4; -+struct duarthalf pb; -+volatile u_char ivr; -+u_char pad5; -+union { -+volatile u_char ipr; /* read */ -+volatile u_char opcr; /* write */ -+} ipr_opcr; -+u_char pad6; -+union { -+volatile u_char start; /* read */ -+volatile u_char sopc; /* write */ -+} start_sopc; -+u_char pad7; -+union { -+volatile u_char stop; /* read */ -+volatile u_char ropc; /* write */ -+} stop_ropc; -+u_char pad8; -+}; -+ -+#define MR1_BITS 3 -+#define MR1_5BITS 0 -+#define MR1_6BITS 1 -+#define MR1_7BITS 2 -+#define MR1_8BITS 3 -+ -+#define MR1_PARITY_ODD 4 -+ -+#define MR1_PARITY 24 -+#define MR1_PARITY_WITH 0 -+#define MR1_PARITY_FORCE 8 -+#define MR1_PARITY_NO 16 -+#define MR1_PARITY_MULTIDROP 24 -+ -+#define MR1_ERROR_BLOCK 32 -+#define MR1_FFULL_IRQ 64 -+#define MR1_RxRTS_ON 128 -+ -+#define MR2_STOPS 15 -+#define MR2_1STOP 7 -+#define MR2_2STOP 15 -+ -+#define MR2_CTS_ON 16 -+#define MR2_TxRTS_ON 32 -+ -+#define MR2_MODE 192 -+#define MR2_NORMAL 0 -+#define MR2_ECHO 64 -+#define MR2_LOCALLOOP 128 -+#define MR2_REMOTELOOP 192 -+ -+#define CR_RXCOMMAND 3 -+#define CR_NONE 0 -+#define CR_RX_ON 1 -+#define CR_RX_OFF 2 -+#define CR_TXCOMMAND 12 -+#define CR_TX_ON 4 -+#define CR_TX_OFF 8 -+#define CR_MISC 112 -+#define CR_RESET_MR 16 -+#define CR_RESET_RX 32 -+#define CR_RESET_TX 48 -+#define CR_RESET_ERR 64 -+#define CR_RESET_BREAK 80 -+#define CR_START_BREAK 96 -+#define CR_STOP_BREAK 112 -+ -+#define SR_RXRDY 1 -+#define SR_FFULL 2 -+#define SR_TXRDY 4 -+#define SR_TXEMPT 8 -+#define SR_OVERRUN 16 -+#define SR_PARITY 32 -+#define SR_FRAMING 64 -+#define SR_BREAK 128 -+ -+ -+#endif diff --git a/debian/patches/bugfix/m68k/152-pci.diff b/debian/patches/bugfix/m68k/152-pci.diff deleted file mode 100644 index 71e738b66..000000000 --- a/debian/patches/bugfix/m68k/152-pci.diff +++ /dev/null @@ -1,21 +0,0 @@ -To: linus, alan -Cc: lkml -Subject: [PATCH] M68k PCI - -First steps in making m68k PCI support compilable again - ---- - arch/m68k/kernel/bios32.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- linux-m68k-2.6.21.orig/arch/m68k/kernel/bios32.c -+++ linux-m68k-2.6.21/arch/m68k/kernel/bios32.c -@@ -284,7 +284,7 @@ static void __init layout_bus(struct pci - - DBG_DEVS(("layout_bus: starting bus %d\n", bus->number)); - -- if (!bus->devices && !bus->children) -+ if (list_empty(&bus->devices) && list_empty(&bus->children)) - return; - - /* diff --git a/debian/patches/bugfix/m68k/130-adbraw.diff b/debian/patches/bugfix/m68k/2.6.24/130-adbraw.diff similarity index 71% rename from debian/patches/bugfix/m68k/130-adbraw.diff rename to debian/patches/bugfix/m68k/2.6.24/130-adbraw.diff index 2cabbd468..8a98fdaa3 100644 --- a/debian/patches/bugfix/m68k/130-adbraw.diff +++ b/debian/patches/bugfix/m68k/2.6.24/130-adbraw.diff @@ -5,15 +5,14 @@ Subject: [PATCH] ADB raw packets From: Linux/m68k legacy ADB: add support for raw packets - --- - drivers/macintosh/adb.c | 8 +++++--- + drivers/macintosh/adb.c | 7 ++++--- include/linux/adb.h | 1 + - 2 files changed, 6 insertions(+), 3 deletions(-) + 2 files changed, 5 insertions(+), 3 deletions(-) ---- linux-m68k-2.6.21.orig/drivers/macintosh/adb.c -+++ linux-m68k-2.6.21/drivers/macintosh/adb.c -@@ -478,13 +478,15 @@ adb_request(struct adb_request *req, voi +--- a/drivers/macintosh/adb.c ++++ b/drivers/macintosh/adb.c +@@ -448,13 +448,14 @@ adb_request(struct adb_request *req, voi use_sreq = 1; } else use_sreq = 0; @@ -26,14 +25,13 @@ ADB: add support for raw packets va_start(list, nbytes); - for (i = 0; i < nbytes; ++i) - req->data[i+1] = va_arg(list, int); -+ while (i < req->nbytes) { ++ while (i < req->nbytes) + req->data[i++] = va_arg(list, int); -+ } va_end(list); if (flags & ADBREQ_NOSEND) ---- linux-m68k-2.6.21.orig/include/linux/adb.h -+++ linux-m68k-2.6.21/include/linux/adb.h +--- a/include/linux/adb.h ++++ b/include/linux/adb.h @@ -76,6 +76,7 @@ struct adb_driver { #define ADBREQ_REPLY 1 /* expect reply */ #define ADBREQ_SYNC 2 /* poll until done */ diff --git a/debian/patches/bugfix/m68k/133-arch.diff b/debian/patches/bugfix/m68k/2.6.24/133-arch.diff similarity index 73% rename from debian/patches/bugfix/m68k/133-arch.diff rename to debian/patches/bugfix/m68k/2.6.24/133-arch.diff index 2ef342af6..3a885d37f 100644 --- a/debian/patches/bugfix/m68k/133-arch.diff +++ b/debian/patches/bugfix/m68k/2.6.24/133-arch.diff @@ -5,15 +5,14 @@ Local m68k changes, _NEVER_ to be submitted upstream: - Append `-m68k' to EXTRAVERSION Signed-off-by: Geert Uytterhoeven for m68k CVS only - --- Makefile | 2 +- localversion.m68k | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) ---- linux-m68k-2.6.21.orig/Makefile -+++ linux-m68k-2.6.21/Makefile -@@ -182,7 +182,7 @@ SUBARCH := $(shell uname -m | sed -e s/i +--- a/Makefile ++++ b/Makefile +@@ -190,7 +190,7 @@ SUBARCH := $(shell uname -m | sed -e s/i # Default value for CROSS_COMPILE is not to prefix executables # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile @@ -22,7 +21,3 @@ Signed-off-by: Geert Uytterhoeven for m68k CVS only CROSS_COMPILE ?= # Architecture as present in compile.h ---- /dev/null -+++ linux-m68k-2.6.21/localversion.m68k -@@ -0,0 +1 @@ -+-m68k diff --git a/debian/patches/bugfix/m68k/134-atari-fat.diff b/debian/patches/bugfix/m68k/2.6.24/134-atari-fat.diff similarity index 86% rename from debian/patches/bugfix/m68k/134-atari-fat.diff rename to debian/patches/bugfix/m68k/2.6.24/134-atari-fat.diff index 5ce087b90..f80bc9f31 100644 --- a/debian/patches/bugfix/m68k/134-atari-fat.diff +++ b/debian/patches/bugfix/m68k/2.6.24/134-atari-fat.diff @@ -5,13 +5,12 @@ Subject: [PATCH] Atari FAT updates From: Linux/m68k legacy Add support for the Atari-variant of the FAT filesystem - --- fs/fat/inode.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) ---- linux-m68k-2.6.21.orig/fs/fat/inode.c -+++ linux-m68k-2.6.21/fs/fat/inode.c +--- a/fs/fat/inode.c ++++ b/fs/fat/inode.c @@ -17,6 +17,7 @@ #include #include @@ -20,16 +19,16 @@ Add support for the Atari-variant of the FAT filesystem #include #include #include -@@ -852,7 +853,7 @@ enum { +@@ -847,7 +848,7 @@ enum { Opt_check_n, Opt_check_r, Opt_check_s, Opt_uid, Opt_gid, - Opt_umask, Opt_dmask, Opt_fmask, Opt_codepage, Opt_nocase, + Opt_umask, Opt_dmask, Opt_fmask, Opt_codepage, Opt_usefree, Opt_nocase, Opt_quiet, Opt_showexec, Opt_debug, Opt_immutable, - Opt_dots, Opt_nodots, + Opt_dots, Opt_nodots, Opt_atari_no, Opt_atari_yes, Opt_charset, Opt_shortname_lower, Opt_shortname_win95, Opt_shortname_winnt, Opt_shortname_mixed, Opt_utf8_no, Opt_utf8_yes, Opt_uni_xl_no, Opt_uni_xl_yes, Opt_nonumtail_no, Opt_nonumtail_yes, -@@ -877,6 +878,9 @@ static match_table_t fat_tokens = { +@@ -873,6 +874,9 @@ static match_table_t fat_tokens = { {Opt_showexec, "showexec"}, {Opt_debug, "debug"}, {Opt_immutable, "sys_immutable"}, @@ -39,21 +38,21 @@ Add support for the Atari-variant of the FAT filesystem {Opt_obsolate, "conv=binary"}, {Opt_obsolate, "conv=text"}, {Opt_obsolate, "conv=auto"}, -@@ -952,6 +956,13 @@ static int parse_options(char *options, +@@ -948,6 +952,13 @@ static int parse_options(char *options, opts->utf8 = opts->unicode_xlate = 0; opts->numtail = 1; - opts->nocase = 0; + opts->usefree = opts->nocase = 0; + opts->atari = 0; + +#ifdef CONFIG_ATARI -+ if(MACH_IS_ATARI) ++ if (MACH_IS_ATARI) + /* make Atari GEMDOS format the default if machine is an Atari */ + opts->atari = 1; +#endif *debug = 0; if (!options) -@@ -1000,6 +1011,12 @@ static int parse_options(char *options, +@@ -999,6 +1010,12 @@ static int parse_options(char *options, case Opt_immutable: opts->sys_immutable = 1; break; @@ -66,7 +65,7 @@ Add support for the Atari-variant of the FAT filesystem case Opt_uid: if (match_int(&args[0], &option)) return 0; -@@ -1336,8 +1353,31 @@ int fat_fill_super(struct super_block *s +@@ -1335,8 +1352,31 @@ int fat_fill_super(struct super_block *s total_clusters = (total_sectors - sbi->data_start) / sbi->sec_per_clus; diff --git a/debian/patches/bugfix/m68k/141-ide.diff b/debian/patches/bugfix/m68k/2.6.24/141-ide.diff similarity index 89% rename from debian/patches/bugfix/m68k/141-ide.diff rename to debian/patches/bugfix/m68k/2.6.24/141-ide.diff index b4537dc69..fba332ce8 100644 --- a/debian/patches/bugfix/m68k/141-ide.diff +++ b/debian/patches/bugfix/m68k/2.6.24/141-ide.diff @@ -5,13 +5,12 @@ Subject: [PATCH] M68k IDE updates From: Linux/m68k legacy M68k IDE updates: Add m68k-isms to the generic ide_fix_driveid() - --- drivers/ide/ide-iops.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ---- linux-m68k-2.6.21.orig/drivers/ide/ide-iops.c -+++ linux-m68k-2.6.21/drivers/ide/ide-iops.c +--- a/drivers/ide/ide-iops.c ++++ b/drivers/ide/ide-iops.c @@ -313,6 +313,23 @@ void ide_fix_driveid (struct hd_driveid int i; u16 *stringcast; diff --git a/debian/patches/bugfix/m68k/633-atari_scc.diff b/debian/patches/bugfix/m68k/2.6.24/633-atari_scc.diff similarity index 99% rename from debian/patches/bugfix/m68k/633-atari_scc.diff rename to debian/patches/bugfix/m68k/2.6.24/633-atari_scc.diff index 66a74f2bf..bcd72c84e 100644 --- a/debian/patches/bugfix/m68k/633-atari_scc.diff +++ b/debian/patches/bugfix/m68k/2.6.24/633-atari_scc.diff @@ -23,21 +23,21 @@ Signed-off-by: Geert Uytterhoeven drivers/char/atari_scc.c | 1701 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1702 insertions(+) ---- linux-2.6-2.6.21.orig/drivers/char/Makefile 2007-05-17 17:59:28.000000000 +0200 -+++ linux-2.6-2.6.21/drivers/char/Makefile 2007-05-17 18:00:10.000000000 +0200 -@@ -30,6 +30,7 @@ +--- a/drivers/char/Makefile ++++ b/drivers/char/Makefile +@@ -30,6 +30,7 @@ obj-$(CONFIG_DIGIEPCA) += epca.o + obj-$(CONFIG_SPECIALIX) += specialix.o obj-$(CONFIG_MOXA_INTELLIO) += moxa.o - obj-$(CONFIG_SIBYTE_SB1250_DUART) += sb1250_duart.o obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o +obj-$(CONFIG_ATARI_SCC) += atari_scc.o generic_serial.o obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o obj-$(CONFIG_MOXA_SMARTIO) += mxser.o obj-$(CONFIG_MOXA_SMARTIO_NEW) += mxser_new.o --- /dev/null -+++ linux-m68k-2.6.21/drivers/char/atari_scc.c ++++ b/drivers/char/atari_scc.c @@ -0,0 +1,1701 @@ +/* -+ * drivers/char/atari_scc.c: Atari TT/Falcon Am8530 SCC serial ports implementation. ++ * Atari TT/Falcon Am8530 SCC serial ports implementation. + * + * Copyright 2005 Michael Schmitz + * diff --git a/debian/patches/bugfix/m68k/2.6.24/atari-hades-pci-balance-iomap-and-iounmap.diff b/debian/patches/bugfix/m68k/2.6.24/atari-hades-pci-balance-iomap-and-iounmap.diff new file mode 100644 index 000000000..caa555e06 --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/atari-hades-pci-balance-iomap-and-iounmap.diff @@ -0,0 +1,100 @@ +Subject: m68k: Balance ioremap and iounmap in m68k/atari/hades-pci.c + +From: Roel Kluin <12o3l@tiscali.nl> + +m68k: Balance ioremap and iounmap in m68k/atari/hades-pci.c + +Signed-off-by: Roel Kluin <12o3l@tiscali.nl> +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/atari/hades-pci.c | 56 +++++++++++++++++++++----------------------- + 1 file changed, 27 insertions(+), 29 deletions(-) + +--- a/arch/m68k/atari/hades-pci.c ++++ b/arch/m68k/atari/hades-pci.c +@@ -376,8 +376,8 @@ struct pci_bus_info * __init init_hades_ + */ + + bus = kzalloc(sizeof(struct pci_bus_info), GFP_KERNEL); +- if (!bus) +- return NULL; ++ if (unlikely(!bus)) ++ goto iounmap_base_virt; + + /* + * Claim resources. The m68k has no separate I/O space, both +@@ -385,43 +385,25 @@ struct pci_bus_info * __init init_hades_ + * the I/O resources are requested in memory space as well. + */ + +- if (request_resource(&iomem_resource, &config_space) != 0) +- { +- kfree(bus); +- return NULL; +- } +- +- if (request_resource(&iomem_resource, &io_space) != 0) +- { +- release_resource(&config_space); +- kfree(bus); +- return NULL; +- } ++ if (unlikely(request_resource(&iomem_resource, &config_space) != 0)) ++ goto free_bus; ++ ++ if (unlikely(request_resource(&iomem_resource, &io_space) != 0)) ++ goto release_config_space; + + bus->mem_space.start = HADES_MEM_BASE; + bus->mem_space.end = HADES_MEM_BASE + HADES_MEM_SIZE - 1; + bus->mem_space.name = pci_mem_name; + #if 1 +- if (request_resource(&iomem_resource, &bus->mem_space) != 0) +- { +- release_resource(&io_space); +- release_resource(&config_space); +- kfree(bus); +- return NULL; +- } ++ if (unlikely(request_resource(&iomem_resource, &bus->mem_space) != 0)) ++ goto release_io_space; + #endif + bus->io_space.start = pci_io_base_virt; + bus->io_space.end = pci_io_base_virt + HADES_VIRT_IO_SIZE - 1; + bus->io_space.name = pci_io_name; + #if 1 +- if (request_resource(&ioport_resource, &bus->io_space) != 0) +- { +- release_resource(&bus->mem_space); +- release_resource(&io_space); +- release_resource(&config_space); +- kfree(bus); +- return NULL; +- } ++ if (unlikely(request_resource(&ioport_resource, &bus->io_space) != 0)) ++ goto release_bus_mem_space; + #endif + /* + * Set hardware dependent functions. +@@ -438,5 +420,21 @@ struct pci_bus_info * __init init_hades_ + tt_mfp.active_edge &= ~0x27; + + return bus; ++ ++release_bus_mem_space: ++ release_resource(&bus->mem_space); ++release_io_space: ++ release_resource(&io_space); ++release_config_space: ++ release_resource(&config_space); ++free_bus: ++ kfree(bus); ++iounmap_base_virt: ++ iounmap((void *)pci_io_base_virt); ++ ++ for (i = 0; i < N_SLOTS; i++) ++ iounmap((void *)pci_conf_base_virt[i]); ++ ++ return NULL; + } + #endif diff --git a/debian/patches/bugfix/m68k/2.6.24/dio-ARRAY_SIZE-cleanup.diff b/debian/patches/bugfix/m68k/2.6.24/dio-ARRAY_SIZE-cleanup.diff new file mode 100644 index 000000000..30d82b123 --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/dio-ARRAY_SIZE-cleanup.diff @@ -0,0 +1,34 @@ +Subject: dio: ARRAY_SIZE() cleanup + +From: Alejandro Martinez Ruiz + +dio: ARRAY_SIZE() cleanup + +[Geert: eliminate NUMNAMES, as suggested by Richard Knutsson ] + +Signed-off-by: Alejandro Martinez Ruiz +Signed-off-by: Geert Uytterhoeven +--- + drivers/dio/dio.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/dio/dio.c ++++ b/drivers/dio/dio.c +@@ -88,8 +88,6 @@ static struct dioname names[] = + #undef DIONAME + #undef DIOFBNAME + +-#define NUMNAMES (sizeof(names) / sizeof(struct dioname)) +- + static const char *unknowndioname + = "unknown DIO board -- please email !"; + +@@ -97,7 +95,7 @@ static const char *dio_getname(int id) + { + /* return pointer to a constant string describing the board with given ID */ + unsigned int i; +- for (i = 0; i < NUMNAMES; i++) ++ for (i = 0; i < ARRAY_SIZE(names); i++) + if (names[i].id == id) + return names[i].name; + diff --git a/debian/patches/bugfix/m68k/2.6.24/m68k-ARRAY_SIZE-cleanup.diff b/debian/patches/bugfix/m68k/2.6.24/m68k-ARRAY_SIZE-cleanup.diff new file mode 100644 index 000000000..da75446f1 --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/m68k-ARRAY_SIZE-cleanup.diff @@ -0,0 +1,23 @@ +Subject: m68k: ARRAY_SIZE() cleanup + +From: Alejandro Martinez Ruiz + +m68k: ARRAY_SIZE() cleanup + +Signed-off-by: Alejandro Martinez Ruiz +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/amiga/amisound.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/m68k/amiga/amisound.c ++++ b/arch/m68k/amiga/amisound.c +@@ -21,7 +21,7 @@ static const signed char sine_data[] = { + 0, 39, 75, 103, 121, 127, 121, 103, 75, 39, + 0, -39, -75, -103, -121, -127, -121, -103, -75, -39 + }; +-#define DATA_SIZE (sizeof(sine_data)/sizeof(sine_data[0])) ++#define DATA_SIZE ARRAY_SIZE(sine_data) + + #define custom amiga_custom + diff --git a/debian/patches/bugfix/m68k/2.6.24/m68k-cc-cross-prefix.diff b/debian/patches/bugfix/m68k/2.6.24/m68k-cc-cross-prefix.diff new file mode 100644 index 000000000..b9afee74c --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/m68k-cc-cross-prefix.diff @@ -0,0 +1,35 @@ +Subject: m68k: Use cc-cross-prefix + +From: Geert Uytterhoeven + +m68k: Use cc-cross-prefix + +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/Makefile | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +--- a/arch/m68k/Makefile ++++ b/arch/m68k/Makefile +@@ -13,16 +13,15 @@ + # Copyright (C) 1994 by Hamish Macdonald + # + +-# test for cross compiling +-COMPILE_ARCH = $(shell uname -m) +- + # override top level makefile + AS += -m68020 + LDFLAGS := -m m68kelf + LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds +-ifneq ($(COMPILE_ARCH),$(ARCH)) +- # prefix for cross-compiling binaries +- CROSS_COMPILE = m68k-linux-gnu- ++ifneq ($(SUBARCH),$(ARCH)) ++ ifeq ($(CROSS_COMPILE),) ++ CROSS_COMPILE := $(call cc-cross-prefix, \ ++ m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) ++ endif + endif + + ifdef CONFIG_SUN3 diff --git a/debian/patches/bugfix/m68k/2.6.24/m68k-initrd-fix.diff b/debian/patches/bugfix/m68k/2.6.24/m68k-initrd-fix.diff new file mode 100644 index 000000000..f4a9d458f --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/m68k-initrd-fix.diff @@ -0,0 +1,52 @@ +Subject: initrd: Fix virtual/physical mix-up in overwrite test + +From: Geert Uytterhoeven + +On recent kernels, I get the following error when using an initrd: + +| initrd overwritten (0x00b78000 < 0x07668000) - disabling it. + +My Amiga 4000 has 12 MiB of RAM at physical address 0x07400000 (virtual +0x00000000). +The initrd is located at the end of RAM: 0x00b78000 - 0x00c00000 (virtual). +The overwrite test compares the (virtual) initrd location to the (physical) +first available memory location, which fails. + +This patch converts initrd_start to a page frame number, so it can be safely +compared with min_low_pfn. + +Before the introduction of discontiguous memory support on m68k +(12d810c1b8c2b913d48e629e2b5c01d105029839), min_low_pfn was just left +untouched by the m68k-specific code (zero, I guess), and everything worked +fine. + +Signed-off-by: Geert Uytterhoeven +--- +On several platforms, initrd_below_start_ok is set to 1: + +| arch/mips/kernel/setup.c: initrd_below_start_ok = 1; +| arch/parisc/mm/init.c: initrd_below_start_ok = 1; +| arch/powerpc/kernel/prom.c: initrd_below_start_ok = 1; +| arch/ppc/platforms/hdpu.c: initrd_below_start_ok = 1; +| arch/xtensa/kernel/setup.c: initrd_below_start_ok = 1; + +Some of these may be workarounds for this bug. Please check. + + init/main.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/init/main.c ++++ b/init/main.c +@@ -598,9 +598,10 @@ asmlinkage void __init start_kernel(void + + #ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start && !initrd_below_start_ok && +- initrd_start < min_low_pfn << PAGE_SHIFT) { ++ page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) { + printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - " +- "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT); ++ "disabling it.\n", ++ page_to_pfn(virt_to_page(initrd_start)), min_low_pfn); + initrd_start = 0; + } + #endif diff --git a/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-amiga-amiga_ksyms-c.diff b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-amiga-amiga_ksyms-c.diff new file mode 100644 index 000000000..30dc819ba --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-amiga-amiga_ksyms-c.diff @@ -0,0 +1,217 @@ +Subject: m68k: kill arch/m68k/amiga/amiga_ksyms.c + +From: Adrian Bunk + +m68k: kill arch/m68k/amiga/amiga_ksyms.c + +EXPORT_SYMBOL's belong to the actual code. + +Signed-off-by: Adrian Bunk +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/amiga/Makefile | 2 +- + arch/m68k/amiga/amiga_ksyms.c | 33 --------------------------------- + arch/m68k/amiga/amisound.c | 3 +++ + arch/m68k/amiga/chipram.c | 7 +++++++ + arch/m68k/amiga/config.c | 12 ++++++++++++ + arch/m68k/amiga/pcmcia.c | 9 +++++++++ + 6 files changed, 32 insertions(+), 34 deletions(-) + +--- a/arch/m68k/amiga/Makefile ++++ b/arch/m68k/amiga/Makefile +@@ -2,6 +2,6 @@ + # Makefile for Linux arch/m68k/amiga source directory + # + +-obj-y := config.o amiints.o cia.o chipram.o amisound.o amiga_ksyms.o ++obj-y := config.o amiints.o cia.o chipram.o amisound.o + + obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o +--- a/arch/m68k/amiga/amiga_ksyms.c ++++ /dev/null +@@ -1,33 +0,0 @@ +-#include +-#include +-#include +-#include +-#include +-#include +- +-extern volatile u_short amiga_audio_min_period; +-extern u_short amiga_audio_period; +- +-/* +- * Add things here when you find the need for it. +- */ +-EXPORT_SYMBOL(amiga_model); +-EXPORT_SYMBOL(amiga_chipset); +-EXPORT_SYMBOL(amiga_hw_present); +-EXPORT_SYMBOL(amiga_eclock); +-EXPORT_SYMBOL(amiga_colorclock); +-EXPORT_SYMBOL(amiga_chip_alloc); +-EXPORT_SYMBOL(amiga_chip_free); +-EXPORT_SYMBOL(amiga_chip_avail); +-EXPORT_SYMBOL(amiga_chip_size); +-EXPORT_SYMBOL(amiga_audio_period); +-EXPORT_SYMBOL(amiga_audio_min_period); +- +-#ifdef CONFIG_AMIGA_PCMCIA +- EXPORT_SYMBOL(pcmcia_reset); +- EXPORT_SYMBOL(pcmcia_copy_tuple); +- EXPORT_SYMBOL(pcmcia_program_voltage); +- EXPORT_SYMBOL(pcmcia_access_speed); +- EXPORT_SYMBOL(pcmcia_write_enable); +- EXPORT_SYMBOL(pcmcia_write_disable); +-#endif +--- a/arch/m68k/amiga/amisound.c ++++ b/arch/m68k/amiga/amisound.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -31,6 +32,7 @@ static const signed char sine_data[] = { + */ + + volatile unsigned short amiga_audio_min_period = 124; /* Default for pre-OCS */ ++EXPORT_SYMBOL(amiga_audio_min_period); + + #define MAX_PERIOD (65535) + +@@ -40,6 +42,7 @@ volatile unsigned short amiga_audio_min_ + */ + + unsigned short amiga_audio_period = MAX_PERIOD; ++EXPORT_SYMBOL(amiga_audio_period); + + static unsigned long clock_constant; + +--- a/arch/m68k/amiga/chipram.c ++++ b/arch/m68k/amiga/chipram.c +@@ -13,10 +13,13 @@ + #include + #include + #include ++#include ++ + #include + #include + + unsigned long amiga_chip_size; ++EXPORT_SYMBOL(amiga_chip_size); + + static struct resource chipram_res = { + .name = "Chip RAM", .start = CHIP_PHYSADDR +@@ -67,6 +70,7 @@ void *amiga_chip_alloc(unsigned long siz + #endif + return (void *)ZTWO_VADDR(res->start); + } ++EXPORT_SYMBOL(amiga_chip_alloc); + + + /* +@@ -120,6 +124,7 @@ void amiga_chip_free(void *ptr) + } + printk("amiga_chip_free: trying to free nonexistent region at %p\n", ptr); + } ++EXPORT_SYMBOL(amiga_chip_free); + + + unsigned long amiga_chip_avail(void) +@@ -129,3 +134,5 @@ unsigned long amiga_chip_avail(void) + #endif + return chipavail; + } ++EXPORT_SYMBOL(amiga_chip_avail); ++ +--- a/arch/m68k/amiga/config.c ++++ b/arch/m68k/amiga/config.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -36,13 +37,24 @@ + #include + + unsigned long amiga_model; ++EXPORT_SYMBOL(amiga_model); ++ + unsigned long amiga_eclock; ++EXPORT_SYMBOL(amiga_eclock); ++ + unsigned long amiga_masterclock; ++ + unsigned long amiga_colorclock; ++EXPORT_SYMBOL(amiga_colorclock); ++ + unsigned long amiga_chipset; ++EXPORT_SYMBOL(amiga_chipset); ++ + unsigned char amiga_vblank; + unsigned char amiga_psfreq; ++ + struct amiga_hw_present amiga_hw_present; ++EXPORT_SYMBOL(amiga_hw_present); + + static char s_a500[] __initdata = "A500"; + static char s_a500p[] __initdata = "A500+"; +--- a/arch/m68k/amiga/pcmcia.c ++++ b/arch/m68k/amiga/pcmcia.c +@@ -15,6 +15,8 @@ + #include + #include + #include ++#include ++ + #include + #include + +@@ -30,6 +32,7 @@ void pcmcia_reset(void) + while (time_before(jiffies, reset_start_time + 1*HZ/100)); + b = gayle_reset; + } ++EXPORT_SYMBOL(pcmcia_reset); + + + /* copy a tuple, including tuple header. return nb bytes copied */ +@@ -61,6 +64,7 @@ int pcmcia_copy_tuple(unsigned char tupl + + return 0; + } ++EXPORT_SYMBOL(pcmcia_copy_tuple); + + void pcmcia_program_voltage(int voltage) + { +@@ -84,6 +88,7 @@ void pcmcia_program_voltage(int voltage) + gayle.config = cfg_byte; + + } ++EXPORT_SYMBOL(pcmcia_program_voltage); + + void pcmcia_access_speed(int speed) + { +@@ -101,13 +106,17 @@ void pcmcia_access_speed(int speed) + cfg_byte = (cfg_byte & 0xf3) | s; + gayle.config = cfg_byte; + } ++EXPORT_SYMBOL(pcmcia_access_speed); + + void pcmcia_write_enable(void) + { + gayle.cardstatus = GAYLE_CS_WR|GAYLE_CS_DA; + } ++EXPORT_SYMBOL(pcmcia_write_enable); + + void pcmcia_write_disable(void) + { + gayle.cardstatus = 0; + } ++EXPORT_SYMBOL(pcmcia_write_disable); ++ diff --git a/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-atari-atari_ksyms-c.diff b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-atari-atari_ksyms-c.diff new file mode 100644 index 000000000..55a0c3e8f --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-atari-atari_ksyms-c.diff @@ -0,0 +1,238 @@ +Subject: m68k: kill arch/m68k/atari/atari_ksyms.c + +From: Adrian Bunk + +m68k: kill arch/m68k/atari/atari_ksyms.c + +EXPORT_SYMBOL's belong to the actual code. + +Signed-off-by: Adrian Bunk +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/atari/Makefile | 2 +- + arch/m68k/atari/ataints.c | 3 +++ + arch/m68k/atari/atari_ksyms.c | 35 ----------------------------------- + arch/m68k/atari/atasound.c | 2 ++ + arch/m68k/atari/config.c | 11 +++++++++++ + arch/m68k/atari/debug.c | 6 ++++++ + arch/m68k/atari/stdma.c | 5 +++++ + arch/m68k/atari/stram.c | 3 +++ + 8 files changed, 31 insertions(+), 36 deletions(-) + +--- a/arch/m68k/atari/Makefile ++++ b/arch/m68k/atari/Makefile +@@ -3,7 +3,7 @@ + # + + obj-y := config.o time.o debug.o ataints.o stdma.o \ +- atasound.o stram.o atari_ksyms.o ++ atasound.o stram.o + + ifeq ($(CONFIG_PCI),y) + obj-$(CONFIG_HADES) += hades-pci.o +--- a/arch/m68k/atari/ataints.c ++++ b/arch/m68k/atari/ataints.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -446,6 +447,7 @@ unsigned long atari_register_vme_int(voi + free_vme_vec_bitmap |= 1 << i; + return VME_SOURCE_BASE + i; + } ++EXPORT_SYMBOL(atari_register_vme_int); + + + void atari_unregister_vme_int(unsigned long irq) +@@ -455,5 +457,6 @@ void atari_unregister_vme_int(unsigned l + free_vme_vec_bitmap &= ~(1 << irq); + } + } ++EXPORT_SYMBOL(atari_unregister_vme_int); + + +--- a/arch/m68k/atari/atari_ksyms.c ++++ /dev/null +@@ -1,35 +0,0 @@ +-#include +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-extern void atari_microwire_cmd( int cmd ); +-extern int atari_MFP_init_done; +-extern int atari_SCC_init_done; +-extern int atari_SCC_reset_done; +- +-EXPORT_SYMBOL(atari_mch_cookie); +-EXPORT_SYMBOL(atari_mch_type); +-EXPORT_SYMBOL(atari_hw_present); +-EXPORT_SYMBOL(atari_switches); +-EXPORT_SYMBOL(atari_dont_touch_floppy_select); +-EXPORT_SYMBOL(atari_register_vme_int); +-EXPORT_SYMBOL(atari_unregister_vme_int); +-EXPORT_SYMBOL(stdma_lock); +-EXPORT_SYMBOL(stdma_release); +-EXPORT_SYMBOL(stdma_others_waiting); +-EXPORT_SYMBOL(stdma_islocked); +-EXPORT_SYMBOL(atari_stram_alloc); +-EXPORT_SYMBOL(atari_stram_free); +- +-EXPORT_SYMBOL(atari_MFP_init_done); +-EXPORT_SYMBOL(atari_SCC_init_done); +-EXPORT_SYMBOL(atari_SCC_reset_done); +- +-EXPORT_SYMBOL(atari_microwire_cmd); +--- a/arch/m68k/atari/atasound.c ++++ b/arch/m68k/atari/atasound.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -43,6 +44,7 @@ void atari_microwire_cmd (int cmd) + while( tt_microwire.mask != 0x7ff) + ; + } ++EXPORT_SYMBOL(atari_microwire_cmd); + + + /* PSG base frequency */ +--- a/arch/m68k/atari/config.c ++++ b/arch/m68k/atari/config.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -43,10 +44,20 @@ + #include + + u_long atari_mch_cookie; ++EXPORT_SYMBOL(atari_mch_cookie); ++ + u_long atari_mch_type; ++EXPORT_SYMBOL(atari_mch_type); ++ + struct atari_hw_present atari_hw_present; ++EXPORT_SYMBOL(atari_hw_present); ++ + u_long atari_switches; ++EXPORT_SYMBOL(atari_switches); ++ + int atari_dont_touch_floppy_select; ++EXPORT_SYMBOL(atari_dont_touch_floppy_select); ++ + int atari_rtc_year_offset; + + /* local function prototypes */ +--- a/arch/m68k/atari/debug.c ++++ b/arch/m68k/atari/debug.c +@@ -15,17 +15,23 @@ + #include + #include + #include ++#include + + #include + #include + + /* Flag that Modem1 port is already initialized and used */ + int atari_MFP_init_done; ++EXPORT_SYMBOL(atari_MFP_init_done); ++ + /* Flag that Modem1 port is already initialized and used */ + int atari_SCC_init_done; ++EXPORT_SYMBOL(atari_SCC_init_done); ++ + /* Can be set somewhere, if a SCC master reset has already be done and should + * not be repeated; used by kgdb */ + int atari_SCC_reset_done; ++EXPORT_SYMBOL(atari_SCC_reset_done); + + static struct console atari_console_driver = { + .name = "debug", +--- a/arch/m68k/atari/stdma.c ++++ b/arch/m68k/atari/stdma.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -91,6 +92,7 @@ void stdma_lock(irq_handler_t handler, v + stdma_isr_data = data; + local_irq_restore(flags); + } ++EXPORT_SYMBOL(stdma_lock); + + + /* +@@ -117,6 +119,7 @@ void stdma_release(void) + + local_irq_restore(flags); + } ++EXPORT_SYMBOL(stdma_release); + + + /* +@@ -134,6 +137,7 @@ int stdma_others_waiting(void) + { + return waitqueue_active(&stdma_wait); + } ++EXPORT_SYMBOL(stdma_others_waiting); + + + /* +@@ -155,6 +159,7 @@ int stdma_islocked(void) + { + return stdma_locked; + } ++EXPORT_SYMBOL(stdma_islocked); + + + /* +--- a/arch/m68k/atari/stram.c ++++ b/arch/m68k/atari/stram.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -208,6 +209,7 @@ void *atari_stram_alloc(long size, const + } + return( addr ); + } ++EXPORT_SYMBOL(atari_stram_alloc); + + void atari_stram_free( void *addr ) + +@@ -237,6 +239,7 @@ void atari_stram_free( void *addr ) + printk( KERN_ERR "atari_stram_free: cannot free block at %p " + "(called from %p)\n", addr, __builtin_return_address(0) ); + } ++EXPORT_SYMBOL(atari_stram_free); + + + /* ------------------------------------------------------------------------ */ diff --git a/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-hp300-ksyms-c.diff b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-hp300-ksyms-c.diff new file mode 100644 index 000000000..7caf28ba6 --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-hp300-ksyms-c.diff @@ -0,0 +1,35 @@ +Subject: m68k: kill arch/m68k/hp300/ksyms.c + +From: Adrian Bunk + +m68k: kill arch/m68k/hp300/ksyms.c + +It was empty. + +Signed-off-by: Adrian Bunk +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/hp300/Makefile | 2 +- + arch/m68k/hp300/ksyms.c | 9 --------- + 2 files changed, 1 insertion(+), 10 deletions(-) + +--- a/arch/m68k/hp300/Makefile ++++ b/arch/m68k/hp300/Makefile +@@ -2,4 +2,4 @@ + # Makefile for Linux arch/m68k/hp300 source directory + # + +-obj-y := ksyms.o config.o time.o reboot.o ++obj-y := config.o time.o reboot.o +--- a/arch/m68k/hp300/ksyms.c ++++ /dev/null +@@ -1,9 +0,0 @@ +-/* +- * linux/arch/m68k/hp300/ksyms.c +- * +- * Copyright (C) 1998 Philip Blundell +- * +- * This file contains the HP300-specific kernel symbols. None yet. :-) +- */ +- +-#include diff --git a/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-mac-mac_ksyms-c.diff b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-mac-mac_ksyms-c.diff new file mode 100644 index 000000000..607b9270c --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-mac-mac_ksyms-c.diff @@ -0,0 +1,56 @@ +Subject: m68k: kill arch/m68k/mac/mac_ksyms.c + +From: Adrian Bunk + +m68k: kill arch/m68k/mac/mac_ksyms.c + +EXPORT_SYMBOL's belong to the actual code. + +Signed-off-by: Adrian Bunk +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/mac/Makefile | 2 +- + arch/m68k/mac/mac_ksyms.c | 8 -------- + arch/m68k/mac/via.c | 5 ++++- + 3 files changed, 5 insertions(+), 10 deletions(-) + +--- a/arch/m68k/mac/Makefile ++++ b/arch/m68k/mac/Makefile +@@ -3,4 +3,4 @@ + # + + obj-y := config.o bootparse.o macints.o iop.o via.o oss.o psc.o \ +- baboon.o macboing.o debug.o misc.o mac_ksyms.o ++ baboon.o macboing.o debug.o misc.o +--- a/arch/m68k/mac/mac_ksyms.c ++++ /dev/null +@@ -1,8 +0,0 @@ +-#include +-#include +-#include +- +-/* Says whether we're using A/UX interrupts or not */ +-extern int via_alt_mapping; +- +-EXPORT_SYMBOL(via_alt_mapping); +--- a/arch/m68k/mac/via.c ++++ b/arch/m68k/mac/via.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -41,7 +42,9 @@ volatile __u8 *via1, *via2; + /* See note in mac_via.h about how this is possibly not useful */ + volatile long *via_memory_bogon=(long *)&via_memory_bogon; + #endif +-int rbv_present, via_alt_mapping; ++int rbv_present; ++int via_alt_mapping; ++EXPORT_SYMBOL(via_alt_mapping); + __u8 rbv_clear; + + /* diff --git a/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-mvme16x-mvme16x_ksyms-c.diff b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-mvme16x-mvme16x_ksyms-c.diff new file mode 100644 index 000000000..c9e2520b7 --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/m68k-kill-arch-m68k-mvme16x-mvme16x_ksyms-c.diff @@ -0,0 +1,51 @@ +Subject: m68k: kill arch/m68k/mvme16x/mvme16x_ksyms.c + +From: Adrian Bunk + +m68k: kill arch/m68k/mvme16x/mvme16x_ksyms.c + +EXPORT_SYMBOL's belong to the actual code. + +Signed-off-by: Adrian Bunk +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/mvme16x/Makefile | 2 +- + arch/m68k/mvme16x/config.c | 2 ++ + arch/m68k/mvme16x/mvme16x_ksyms.c | 6 ------ + 3 files changed, 3 insertions(+), 7 deletions(-) + +--- a/arch/m68k/mvme16x/Makefile ++++ b/arch/m68k/mvme16x/Makefile +@@ -2,4 +2,4 @@ + # Makefile for Linux arch/m68k/mvme16x source directory + # + +-obj-y := config.o rtc.o mvme16x_ksyms.o ++obj-y := config.o rtc.o +--- a/arch/m68k/mvme16x/config.c ++++ b/arch/m68k/mvme16x/config.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -58,6 +59,7 @@ static irq_handler_t tick_handler; + + + unsigned short mvme16x_config; ++EXPORT_SYMBOL(mvme16x_config); + + + int mvme16x_parse_bootinfo(const struct bi_record *bi) +--- a/arch/m68k/mvme16x/mvme16x_ksyms.c ++++ /dev/null +@@ -1,6 +0,0 @@ +-#include +-#include +-#include +-#include +- +-EXPORT_SYMBOL(mvme16x_config); diff --git a/debian/patches/bugfix/m68k/2.6.24/mac68k-add-nubus-card-definitions-and-a-typo-fix.diff b/debian/patches/bugfix/m68k/2.6.24/mac68k-add-nubus-card-definitions-and-a-typo-fix.diff new file mode 100644 index 000000000..f197b5181 --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/mac68k-add-nubus-card-definitions-and-a-typo-fix.diff @@ -0,0 +1,28 @@ +Subject: mac68k: add nubus card definitions and a typo fix + +From: Finn Thain + +Add some new card definitions and fix a typo (from Eugen Paiuc). + +Signed-off-by: Finn Thain +Signed-off-by: Geert Uytterhoeven +--- + include/linux/nubus.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/include/linux/nubus.h ++++ b/include/linux/nubus.h +@@ -132,10 +132,12 @@ enum nubus_drhw { + NUBUS_DRHW_RDIUS_DCGX = 0x027C, /* Radius DirectColor/GX */ + NUBUS_DRHW_RDIUS_PC8 = 0x0291, /* Radius PrecisionColor 8 */ + NUBUS_DRHW_LAPIS_PCS8 = 0x0292, /* Lapis ProColorServer 8 */ +- NUBUS_DRHW_RASTER_24LXI = 0x02A0, /* RasterOps 8/24 XLi */ ++ NUBUS_DRHW_RASTER_24XLI = 0x02A0, /* RasterOps 8/24 XLi */ + NUBUS_DRHW_RASTER_PBPGT = 0x02A5, /* RasterOps PaintBoard Prism GT */ + NUBUS_DRHW_EMACH_FSX = 0x02AE, /* E-Machines Futura SX */ ++ NUBUS_DRHW_RASTER_24XLTV = 0x02B7, /* RasterOps 24XLTV */ + NUBUS_DRHW_SMAC_THUND24 = 0x02CB, /* SuperMac Thunder/24 */ ++ NUBUS_DRHW_SMAC_THUNDLGHT = 0x03D9, /* SuperMac ThunderLight */ + NUBUS_DRHW_RDIUS_PC24XP = 0x0406, /* Radius PrecisionColor 24Xp */ + NUBUS_DRHW_RDIUS_PC24X = 0x040A, /* Radius PrecisionColor 24X */ + NUBUS_DRHW_RDIUS_PC8XJ = 0x040B, /* Radius PrecisionColor 8XJ */ diff --git a/debian/patches/bugfix/m68k/2.6.24/mac68k-macii-adb-comment-correction.diff b/debian/patches/bugfix/m68k/2.6.24/mac68k-macii-adb-comment-correction.diff new file mode 100644 index 000000000..4636db20e --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/mac68k-macii-adb-comment-correction.diff @@ -0,0 +1,23 @@ +Subject: mac68k: macii adb comment correction + +From: Finn Thain + +Corrects a mistake I made in a comment. + +Signed-off-by: Finn Thain +Signed-off-by: Geert Uytterhoeven +--- + drivers/macintosh/via-macii.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/macintosh/via-macii.c ++++ b/drivers/macintosh/via-macii.c +@@ -111,7 +111,7 @@ static enum macii_state { + static struct adb_request *current_req; /* first request struct in the queue */ + static struct adb_request *last_req; /* last request struct in the queue */ + static unsigned char reply_buf[16]; /* storage for autopolled replies */ +-static unsigned char *reply_ptr; /* next byte in req->data or reply_buf */ ++static unsigned char *reply_ptr; /* next byte in reply_buf or req->reply */ + static int reading_reply; /* store reply in reply_buf else req->reply */ + static int data_index; /* index of the next byte to send from req->data */ + static int reply_len; /* number of bytes received in reply_buf or req->reply */ diff --git a/debian/patches/bugfix/m68k/2.6.24/mac68k-remove-dead-MAC_ADBKEYCODES.diff b/debian/patches/bugfix/m68k/2.6.24/mac68k-remove-dead-MAC_ADBKEYCODES.diff new file mode 100644 index 000000000..41835d8a2 --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/mac68k-remove-dead-MAC_ADBKEYCODES.diff @@ -0,0 +1,50 @@ +Subject: mac68k: remove dead MAC_ADBKEYCODES + +From: Stanislav Brabec + +It seems, that current kernel source code contains no traces of +MAC_ADBKEYCODES and no reference to keyboard_sends_linux_keycodes any +more. + +Attached patch removes them from configuration files. + +Signed-off-by: Stanislav Brabec +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/Kconfig | 14 -------------- + arch/m68k/configs/mac_defconfig | 1 - + 2 files changed, 15 deletions(-) + +--- a/arch/m68k/Kconfig ++++ b/arch/m68k/Kconfig +@@ -582,20 +582,6 @@ config MAC_HID + depends on INPUT_ADBHID + default y + +-config MAC_ADBKEYCODES +- bool "Support for ADB raw keycodes" +- depends on INPUT_ADBHID +- help +- This provides support for sending raw ADB keycodes to console +- devices. This is the default up to 2.4.0, but in future this may be +- phased out in favor of generic Linux keycodes. If you say Y here, +- you can dynamically switch via the +- /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes +- sysctl and with the "keyboard_sends_linux_keycodes=" kernel +- argument. +- +- If unsure, say Y here. +- + config ADB_KEYBOARD + bool "Support for ADB keyboard (old driver)" + depends on MAC && !INPUT_ADBHID +--- a/arch/m68k/configs/mac_defconfig ++++ b/arch/m68k/configs/mac_defconfig +@@ -678,7 +678,6 @@ CONFIG_LOGO_MAC_CLUT224=y + # + CONFIG_MAC_SCC=y + CONFIG_MAC_HID=y +-CONFIG_MAC_ADBKEYCODES=y + CONFIG_SERIAL_CONSOLE=y + + # diff --git a/debian/patches/bugfix/m68k/2.6.24/mac68k-remove-dead-code.diff b/debian/patches/bugfix/m68k/2.6.24/mac68k-remove-dead-code.diff new file mode 100644 index 000000000..10fa5e643 --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/mac68k-remove-dead-code.diff @@ -0,0 +1,35 @@ +Subject: mac68k: remove dead code + +From: Finn Thain + +Remove dead code. + +Signed-off-by: Finn Thain +Signed-off-by: Geert Uytterhoeven +--- + arch/m68k/mac/config.c | 2 -- + include/asm-m68k/macintosh.h | 2 -- + 2 files changed, 4 deletions(-) + +--- a/arch/m68k/mac/config.c ++++ b/arch/m68k/mac/config.c +@@ -58,8 +58,6 @@ extern struct mem_info m68k_memory[NUM_M + + extern struct mem_info m68k_ramdisk; + +-extern char m68k_command_line[CL_SIZE]; +- + void *mac_env; /* Loaded by the boot asm */ + + /* The phys. video addr. - might be bogus on some machines */ +--- a/include/asm-m68k/macintosh.h ++++ b/include/asm-m68k/macintosh.h +@@ -14,8 +14,6 @@ extern void mac_init_IRQ(void); + extern int mac_irq_pending(unsigned int); + extern void mac_identify(void); + extern void mac_report_hardware(void); +-extern void mac_debugging_penguin(int); +-extern void mac_boom(int); + + /* + * Floppy driver magic hook - probably shouldnt be here diff --git a/debian/patches/bugfix/m68k/2.6.24/nubus-kill-drivers-nubus-nubus_syms-c.diff b/debian/patches/bugfix/m68k/2.6.24/nubus-kill-drivers-nubus-nubus_syms-c.diff new file mode 100644 index 000000000..f1d66514a --- /dev/null +++ b/debian/patches/bugfix/m68k/2.6.24/nubus-kill-drivers-nubus-nubus_syms-c.diff @@ -0,0 +1,188 @@ +Subject: nubus: kill drivers/nubus/nubus_syms.c + +From: Adrian Bunk + +nubus: kill drivers/nubus/nubus_syms.c + +EXPORT_SYMBOL's belong to the actual code. + +Signed-off-by: Adrian Bunk +Signed-off-by: Geert Uytterhoeven +--- + drivers/nubus/Makefile | 1 - + drivers/nubus/nubus.c | 13 +++++++++++++ + drivers/nubus/nubus_syms.c | 28 ---------------------------- + drivers/nubus/proc.c | 4 ++++ + 4 files changed, 17 insertions(+), 29 deletions(-) + +--- a/drivers/nubus/Makefile ++++ b/drivers/nubus/Makefile +@@ -4,5 +4,4 @@ + + obj-y := nubus.o + +-obj-$(CONFIG_MODULES) += nubus_syms.o + obj-$(CONFIG_PROC_FS) += proc.o +--- a/drivers/nubus/nubus.c ++++ b/drivers/nubus/nubus.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -186,6 +187,7 @@ void nubus_get_rsrc_mem(void *dest, cons + len--; + } + } ++EXPORT_SYMBOL(nubus_get_rsrc_mem); + + void nubus_get_rsrc_str(void *dest, const struct nubus_dirent* dirent, + int len) +@@ -200,6 +202,7 @@ void nubus_get_rsrc_str(void *dest, cons + len--; + } + } ++EXPORT_SYMBOL(nubus_get_rsrc_str); + + int nubus_get_root_dir(const struct nubus_board* board, + struct nubus_dir* dir) +@@ -209,6 +212,7 @@ int nubus_get_root_dir(const struct nubu + dir->mask = board->lanes; + return 0; + } ++EXPORT_SYMBOL(nubus_get_root_dir); + + /* This is a slyly renamed version of the above */ + int nubus_get_func_dir(const struct nubus_dev* dev, +@@ -219,6 +223,7 @@ int nubus_get_func_dir(const struct nubu + dir->mask = dev->board->lanes; + return 0; + } ++EXPORT_SYMBOL(nubus_get_func_dir); + + int nubus_get_board_dir(const struct nubus_board* board, + struct nubus_dir* dir) +@@ -237,6 +242,7 @@ int nubus_get_board_dir(const struct nub + return -1; + return 0; + } ++EXPORT_SYMBOL(nubus_get_board_dir); + + int nubus_get_subdir(const struct nubus_dirent *ent, + struct nubus_dir *dir) +@@ -246,6 +252,7 @@ int nubus_get_subdir(const struct nubus_ + dir->mask = ent->mask; + return 0; + } ++EXPORT_SYMBOL(nubus_get_subdir); + + int nubus_readdir(struct nubus_dir *nd, struct nubus_dirent *ent) + { +@@ -274,12 +281,14 @@ int nubus_readdir(struct nubus_dir *nd, + ent->mask = nd->mask; + return 0; + } ++EXPORT_SYMBOL(nubus_readdir); + + int nubus_rewinddir(struct nubus_dir* dir) + { + dir->ptr = dir->base; + return 0; + } ++EXPORT_SYMBOL(nubus_rewinddir); + + /* Driver interface functions, more or less like in pci.c */ + +@@ -303,6 +312,7 @@ nubus_find_device(unsigned short categor + } + return NULL; + } ++EXPORT_SYMBOL(nubus_find_device); + + struct nubus_dev* + nubus_find_type(unsigned short category, +@@ -320,6 +330,7 @@ nubus_find_type(unsigned short category, + } + return NULL; + } ++EXPORT_SYMBOL(nubus_find_type); + + struct nubus_dev* + nubus_find_slot(unsigned int slot, +@@ -335,6 +346,7 @@ nubus_find_slot(unsigned int slot, + } + return NULL; + } ++EXPORT_SYMBOL(nubus_find_slot); + + int + nubus_find_rsrc(struct nubus_dir* dir, unsigned char rsrc_type, +@@ -346,6 +358,7 @@ nubus_find_rsrc(struct nubus_dir* dir, u + } + return -1; + } ++EXPORT_SYMBOL(nubus_find_rsrc); + + /* Initialization functions - decide which slots contain stuff worth + looking at, and print out lots and lots of information from the +--- a/drivers/nubus/nubus_syms.c ++++ /dev/null +@@ -1,28 +0,0 @@ +-/* Exported symbols for NuBus services +- +- (c) 1999 David Huggins-Daines */ +- +-#include +-#include +-#include +- +-#ifdef CONFIG_PROC_FS +-EXPORT_SYMBOL(nubus_proc_attach_device); +-EXPORT_SYMBOL(nubus_proc_detach_device); +-#endif +- +-MODULE_LICENSE("GPL"); +- +-EXPORT_SYMBOL(nubus_find_device); +-EXPORT_SYMBOL(nubus_find_type); +-EXPORT_SYMBOL(nubus_find_slot); +-EXPORT_SYMBOL(nubus_get_root_dir); +-EXPORT_SYMBOL(nubus_get_board_dir); +-EXPORT_SYMBOL(nubus_get_func_dir); +-EXPORT_SYMBOL(nubus_readdir); +-EXPORT_SYMBOL(nubus_find_rsrc); +-EXPORT_SYMBOL(nubus_rewinddir); +-EXPORT_SYMBOL(nubus_get_subdir); +-EXPORT_SYMBOL(nubus_get_rsrc_mem); +-EXPORT_SYMBOL(nubus_get_rsrc_str); +- +--- a/drivers/nubus/proc.c ++++ b/drivers/nubus/proc.c +@@ -22,6 +22,8 @@ + #include + #include + #include ++#include ++ + #include + #include + +@@ -140,6 +142,7 @@ int nubus_proc_attach_device(struct nubu + + return 0; + } ++EXPORT_SYMBOL(nubus_proc_attach_device); + + /* FIXME: this is certainly broken! */ + int nubus_proc_detach_device(struct nubus_dev *dev) +@@ -154,6 +157,7 @@ int nubus_proc_detach_device(struct nubu + } + return 0; + } ++EXPORT_SYMBOL(nubus_proc_detach_device); + + void __init proc_bus_nubus_add_devices(void) + { diff --git a/debian/patches/bugfix/m68k/357-mac89x0.diff b/debian/patches/bugfix/m68k/357-mac89x0.diff deleted file mode 100644 index 6827b6698..000000000 --- a/debian/patches/bugfix/m68k/357-mac89x0.diff +++ /dev/null @@ -1,177 +0,0 @@ -Subject: [PATCH] m68k: Mac89x0 Ethernet netif updates -Cc: Jeff Garzik , netdev@vger.kernel.org - -From: Matthias Urlichs - -Macintosh CS89x0 Ethernet: Netif updates -Addition of netif_stop_queue() before transmission by Michael Schmitz - -Signed-off-by: Geert Uytterhoeven ---- - drivers/net/Kconfig | 2 - - drivers/net/mac89x0.c | 90 +++++++++++++++++--------------------------------- - 2 files changed, 33 insertions(+), 59 deletions(-) - ---- linux-m68k-2.6.21.orig/drivers/net/Kconfig -+++ linux-m68k-2.6.21/drivers/net/Kconfig -@@ -311,7 +311,7 @@ config MAC8390 - - config MAC89x0 - tristate "Macintosh CS89x0 based ethernet cards" -- depends on NET_ETHERNET && MAC && BROKEN -+ depends on NET_ETHERNET && MAC - ---help--- - Support for CS89x0 chipset based Ethernet cards. If you have a - Nubus or LC-PDS network (Ethernet) card of this type, say Y and ---- linux-m68k-2.6.21.orig/drivers/net/mac89x0.c -+++ linux-m68k-2.6.21/drivers/net/mac89x0.c -@@ -128,7 +128,7 @@ struct net_local { - extern void reset_chip(struct net_device *dev); - #endif - static int net_open(struct net_device *dev); --static int net_send_packet(struct sk_buff *skb, struct net_device *dev); -+static int net_send_packet(struct sk_buff *skb, struct net_device *dev); - static irqreturn_t net_interrupt(int irq, void *dev_id); - static void set_multicast_list(struct net_device *dev); - static void net_rx(struct net_device *dev); -@@ -374,56 +374,38 @@ net_open(struct net_device *dev) - static int - net_send_packet(struct sk_buff *skb, struct net_device *dev) - { -- if (dev->tbusy) { -- /* If we get here, some higher level has decided we are broken. -- There should really be a "kick me" function call instead. */ -- int tickssofar = jiffies - dev->trans_start; -- if (tickssofar < 5) -- return 1; -- if (net_debug > 0) printk("%s: transmit timed out, %s?\n", dev->name, -- tx_done(dev) ? "IRQ conflict" : "network cable problem"); -- /* Try to restart the adaptor. */ -- dev->tbusy=0; -- dev->trans_start = jiffies; -- } -- -- /* Block a timer-based transmit from overlapping. This could better be -- done with atomic_swap(1, dev->tbusy), but set_bit() works as well. */ -- if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) -- printk("%s: Transmitter access conflict.\n", dev->name); -- else { -- struct net_local *lp = netdev_priv(dev); -- unsigned long flags; -- -- if (net_debug > 3) -- printk("%s: sent %d byte packet of type %x\n", -- dev->name, skb->len, -- (skb->data[ETH_ALEN+ETH_ALEN] << 8) -- | skb->data[ETH_ALEN+ETH_ALEN+1]); -- -- /* keep the upload from being interrupted, since we -- ask the chip to start transmitting before the -- whole packet has been completely uploaded. */ -- local_irq_save(flags); -- -- /* initiate a transmit sequence */ -- writereg(dev, PP_TxCMD, lp->send_cmd); -- writereg(dev, PP_TxLength, skb->len); -- -- /* Test to see if the chip has allocated memory for the packet */ -- if ((readreg(dev, PP_BusST) & READY_FOR_TX_NOW) == 0) { -- /* Gasp! It hasn't. But that shouldn't happen since -- we're waiting for TxOk, so return 1 and requeue this packet. */ -- local_irq_restore(flags); -- return 1; -- } -+ struct net_local *lp = netdev_priv(dev); -+ unsigned long flags; - -- /* Write the contents of the packet */ -- memcpy_toio(dev->mem_start + PP_TxFrame, skb->data, skb->len+1); -+ if (net_debug > 3) -+ printk("%s: sent %d byte packet of type %x\n", -+ dev->name, skb->len, -+ (skb->data[ETH_ALEN+ETH_ALEN] << 8) -+ | skb->data[ETH_ALEN+ETH_ALEN+1]); -+ -+ /* keep the upload from being interrupted, since we -+ ask the chip to start transmitting before the -+ whole packet has been completely uploaded. */ -+ local_irq_save(flags); -+ netif_stop_queue(dev); - -+ /* initiate a transmit sequence */ -+ writereg(dev, PP_TxCMD, lp->send_cmd); -+ writereg(dev, PP_TxLength, skb->len); -+ -+ /* Test to see if the chip has allocated memory for the packet */ -+ if ((readreg(dev, PP_BusST) & READY_FOR_TX_NOW) == 0) { -+ /* Gasp! It hasn't. But that shouldn't happen since -+ we're waiting for TxOk, so return 1 and requeue this packet. */ - local_irq_restore(flags); -- dev->trans_start = jiffies; -+ return 1; - } -+ -+ /* Write the contents of the packet */ -+ memcpy((void *)(dev->mem_start + PP_TxFrame), skb->data, skb->len+1); -+ -+ local_irq_restore(flags); -+ dev->trans_start = jiffies; - dev_kfree_skb (skb); - - return 0; -@@ -441,9 +423,6 @@ static irqreturn_t net_interrupt(int irq - printk ("net_interrupt(): irq %d for unknown device.\n", irq); - return IRQ_NONE; - } -- if (dev->interrupt) -- printk("%s: Re-entering the interrupt handler.\n", dev->name); -- dev->interrupt = 1; - - ioaddr = dev->base_addr; - lp = netdev_priv(dev); -@@ -464,8 +443,7 @@ static irqreturn_t net_interrupt(int irq - break; - case ISQ_TRANSMITTER_EVENT: - lp->stats.tx_packets++; -- dev->tbusy = 0; -- mark_bh(NET_BH); /* Inform upper layers. */ -+ netif_wake_queue(dev); - if ((status & TX_OK) == 0) lp->stats.tx_errors++; - if (status & TX_LOST_CRS) lp->stats.tx_carrier_errors++; - if (status & TX_SQE_ERROR) lp->stats.tx_heartbeat_errors++; -@@ -479,8 +457,7 @@ static irqreturn_t net_interrupt(int irq - That shouldn't happen since we only ever - load one packet. Shrug. Do the right - thing anyway. */ -- dev->tbusy = 0; -- mark_bh(NET_BH); /* Inform upper layers. */ -+ netif_wake_queue(dev); - } - if (status & TX_UNDERRUN) { - if (net_debug > 0) printk("%s: transmit underrun\n", dev->name); -@@ -497,7 +474,6 @@ static irqreturn_t net_interrupt(int irq - break; - } - } -- dev->interrupt = 0; - return IRQ_HANDLED; - } - -@@ -532,7 +508,7 @@ net_rx(struct net_device *dev) - skb_put(skb, length); - skb->dev = dev; - -- memcpy_fromio(skb->data, dev->mem_start + PP_RxFrame, length); -+ memcpy(skb->data, (void *)(dev->mem_start + PP_RxFrame), length); - - if (net_debug > 3)printk("%s: received %d byte packet of type %x\n", - dev->name, length, -@@ -611,8 +587,6 @@ static void set_multicast_list(struct ne - static int set_mac_address(struct net_device *dev, void *addr) - { - int i; -- if (dev->start) -- return -EBUSY; - printk("%s: Setting MAC address to ", dev->name); - for (i = 0; i < 6; i++) - printk(" %2.2x", dev->dev_addr[i] = ((unsigned char *)addr)[i]); diff --git a/debian/patches/bugfix/m68k/448-ide.diff b/debian/patches/bugfix/m68k/448-ide.diff deleted file mode 100644 index 8d4c0aec0..000000000 --- a/debian/patches/bugfix/m68k/448-ide.diff +++ /dev/null @@ -1,23 +0,0 @@ -To: linus, akpm, B.Zolnierkiewicz@elka.pw.edu.pl -Cc: lkml -Subject: [PATCH] m68k IDE compiler bug - -From: Roman Zippel - -IDE: Avoid compiler bug in gcc 3.2 (from Roman Zippel) - ---- - include/linux/ide.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- linux-m68k-2.6.21.orig/include/linux/ide.h -+++ linux-m68k-2.6.21/include/linux/ide.h -@@ -513,7 +513,7 @@ typedef union { - * sense_key : Sense key of the last failed packet command - */ - typedef union { -- unsigned all :8; -+ u8 all; - struct { - #if defined(__LITTLE_ENDIAN_BITFIELD) - unsigned ili :1; diff --git a/debian/patches/bugfix/m68k/478-serial.diff b/debian/patches/bugfix/m68k/478-serial.diff deleted file mode 100644 index efa2d962d..000000000 --- a/debian/patches/bugfix/m68k/478-serial.diff +++ /dev/null @@ -1,30 +0,0 @@ -To: linus, akpm -Cc: lkml -Subject: [PATCH] M68k SERIAL_PORT_DFNS only if CONFIG_ISA - -From: Kars de Jong - -M68k serial: Only define SERIAL_PORT_DFNS when CONFIG_ISA is defined. Otherwise -the first 4 slots in the 8250 driver are unavailable on non-ISA machines. - -Signed-off-by: Kars de Jong -Signed-off-by: Geert Uytterhoeven - ---- - include/asm-m68k/serial.h | 2 ++ - 1 file changed, 2 insertions(+) - ---- linux-m68k-2.6.21.orig/include/asm-m68k/serial.h -+++ linux-m68k-2.6.21/include/asm-m68k/serial.h -@@ -25,9 +25,11 @@ - #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF - #endif - -+#ifdef CONFIG_ISA - #define SERIAL_PORT_DFNS \ - /* UART CLK PORT IRQ FLAGS */ \ - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ -+#endif diff --git a/debian/patches/bugfix/m68k/577-module-arch.diff b/debian/patches/bugfix/m68k/577-module-arch.diff deleted file mode 100644 index 10e6823bb..000000000 --- a/debian/patches/bugfix/m68k/577-module-arch.diff +++ /dev/null @@ -1,37 +0,0 @@ -Subject: [PATCH] Allow arch to initialize arch field of the module structure - -From: Roman Zippel - -This will later allow an arch to add module specific information via -linker generated tables instead of poking directly in the module object -structure. - -Signed-off-by: Roman Zippel -Signed-off-by: Geert Uytterhoeven ---- - include/linux/module.h | 3 +++ - scripts/mod/modpost.c | 1 + - 2 files changed, 4 insertions(+) - ---- linux-m68k-2.6.21.orig/include/linux/module.h -+++ linux-m68k-2.6.21/include/linux/module.h -@@ -356,6 +356,9 @@ struct module - keeping pointers to this stuff */ - char *args; - }; -+#ifndef MODULE_ARCH_INIT -+#define MODULE_ARCH_INIT {} -+#endif - - /* FIXME: It'd be nice to isolate modules during init, too, so they - aren't used before they (may) fail. But presently too much code ---- linux-m68k-2.6.21.orig/scripts/mod/modpost.c -+++ linux-m68k-2.6.21/scripts/mod/modpost.c -@@ -1249,6 +1249,7 @@ static void add_header(struct buffer *b, - buf_printf(b, "#ifdef CONFIG_MODULE_UNLOAD\n" - " .exit = cleanup_module,\n" - "#endif\n"); -+ buf_printf(b, " .arch = MODULE_ARCH_INIT,\n"); - buf_printf(b, "};\n"); - } - diff --git a/debian/patches/bugfix/m68k/600-task_thread_info.diff b/debian/patches/bugfix/m68k/600-task_thread_info.diff deleted file mode 100644 index 7ea927520..000000000 --- a/debian/patches/bugfix/m68k/600-task_thread_info.diff +++ /dev/null @@ -1,43 +0,0 @@ -Subject: [PATCH] Wrap access to thread_info - -From: Roman Zippel - -Wrap direct thread_info access - -Signed-off-by: Roman Zippel -Signed-off-by: Geert Uytterhoeven ---- - kernel/mutex.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- linux-m68k-2.6.21.orig/kernel/mutex.c -+++ linux-m68k-2.6.21/kernel/mutex.c -@@ -133,7 +133,7 @@ __mutex_lock_common(struct mutex *lock, - - debug_mutex_lock_common(lock, &waiter); - mutex_acquire(&lock->dep_map, subclass, 0, _RET_IP_); -- debug_mutex_add_waiter(lock, &waiter, task->thread_info); -+ debug_mutex_add_waiter(lock, &waiter, task_thread_info(task)); - - /* add waiting tasks to the end of the waitqueue (FIFO): */ - list_add_tail(&waiter.list, &lock->wait_list); -@@ -159,7 +159,7 @@ __mutex_lock_common(struct mutex *lock, - */ - if (unlikely(state == TASK_INTERRUPTIBLE && - signal_pending(task))) { -- mutex_remove_waiter(lock, &waiter, task->thread_info); -+ mutex_remove_waiter(lock, &waiter, task_thread_info(task)); - mutex_release(&lock->dep_map, 1, _RET_IP_); - spin_unlock_mutex(&lock->wait_lock, flags); - -@@ -175,8 +175,8 @@ __mutex_lock_common(struct mutex *lock, - } - - /* got the lock - rejoice! */ -- mutex_remove_waiter(lock, &waiter, task->thread_info); -- debug_mutex_set_owner(lock, task->thread_info); -+ mutex_remove_waiter(lock, &waiter, task_thread_info(task)); -+ debug_mutex_set_owner(lock, task_thread_info(task)); - - /* set it to 0 if there are no waiters left: */ - if (likely(list_empty(&lock->wait_list))) diff --git a/debian/patches/bugfix/m68k/611-module_fixup.diff b/debian/patches/bugfix/m68k/611-module_fixup.diff deleted file mode 100644 index 94aa02f46..000000000 --- a/debian/patches/bugfix/m68k/611-module_fixup.diff +++ /dev/null @@ -1,214 +0,0 @@ -Subject: [PATCH] m68k: runtime patching infrastructure - -From: Roman Zippel - -Add the basic infrastructure to allow runtime patching of kernel and -modules to optimize a few functions with parameters, which are only -calculated once during bootup and are otherwise constant. -Use this for the conversion between virtual and physical addresses. - -Signed-off-by: Roman Zippel -Signed-off-by: Geert Uytterhoeven ---- - arch/m68k/Makefile | 1 + - arch/m68k/kernel/module.c | 24 +++++++++++++++++++++++- - arch/m68k/kernel/module.lds | 7 +++++++ - arch/m68k/kernel/vmlinux-std.lds | 5 +++++ - arch/m68k/kernel/vmlinux-sun3.lds | 5 +++++ - arch/m68k/mm/motorola.c | 3 +++ - include/asm-m68k/module.h | 33 ++++++++++++++++++++++++++++++++- - include/asm-m68k/page.h | 29 ++++++++++++++++++++++++++--- - 8 files changed, 102 insertions(+), 5 deletions(-) - ---- linux-m68k-2.6.21.orig/arch/m68k/Makefile -+++ linux-m68k-2.6.21/arch/m68k/Makefile -@@ -19,6 +19,7 @@ COMPILE_ARCH = $(shell uname -m) - # override top level makefile - AS += -m68020 - LDFLAGS := -m m68kelf -+LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds - ifneq ($(COMPILE_ARCH),$(ARCH)) - # prefix for cross-compiling binaries - CROSS_COMPILE = m68k-linux-gnu- ---- linux-m68k-2.6.21.orig/arch/m68k/kernel/module.c -+++ linux-m68k-2.6.21/arch/m68k/kernel/module.c -@@ -1,3 +1,9 @@ -+/* -+ * 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. -+ */ -+ - #include - #include - #include -@@ -116,10 +122,26 @@ int apply_relocate_add(Elf32_Shdr *sechd - return 0; - } - -+void module_fixup(struct module *mod, struct m68k_fixup_info *start, -+ struct m68k_fixup_info *end) -+{ -+ struct m68k_fixup_info *fixup; -+ -+ for (fixup = start; fixup < end; fixup++) { -+ switch (fixup->type) { -+ case m68k_fixup_memoffset: -+ *(u32 *)fixup->addr = m68k_memoffset; -+ break; -+ } -+ } -+} -+ - int module_finalize(const Elf_Ehdr *hdr, - const Elf_Shdr *sechdrs, -- struct module *me) -+ struct module *mod) - { -+ module_fixup(mod, mod->arch.fixup_start, mod->arch.fixup_end); -+ - return 0; - } - ---- /dev/null -+++ linux-m68k-2.6.21/arch/m68k/kernel/module.lds -@@ -0,0 +1,7 @@ -+SECTIONS { -+ .m68k_fixup : { -+ __start_fixup = .; -+ *(.m68k_fixup) -+ __stop_fixup = .; -+ } -+} ---- linux-m68k-2.6.21.orig/arch/m68k/kernel/vmlinux-std.lds -+++ linux-m68k-2.6.21/arch/m68k/kernel/vmlinux-std.lds -@@ -60,6 +60,11 @@ SECTIONS - __con_initcall_start = .; - .con_initcall.init : { *(.con_initcall.init) } - __con_initcall_end = .; -+ .m68k_fixup : { -+ __start_fixup = .; -+ *(.m68k_fixup) -+ __stop_fixup = .; -+ } - SECURITY_INIT - #ifdef CONFIG_BLK_DEV_INITRD - . = ALIGN(8192); ---- linux-m68k-2.6.21.orig/arch/m68k/kernel/vmlinux-sun3.lds -+++ linux-m68k-2.6.21/arch/m68k/kernel/vmlinux-sun3.lds -@@ -54,6 +54,11 @@ __init_begin = .; - __con_initcall_start = .; - .con_initcall.init : { *(.con_initcall.init) } - __con_initcall_end = .; -+ .m68k_fixup : { -+ __start_fixup = .; -+ *(.m68k_fixup) -+ __stop_fixup = .; -+ } - SECURITY_INIT - #ifdef CONFIG_BLK_DEV_INITRD - . = ALIGN(8192); ---- linux-m68k-2.6.21.orig/arch/m68k/mm/motorola.c -+++ linux-m68k-2.6.21/arch/m68k/mm/motorola.c -@@ -222,6 +222,9 @@ void __init paging_init(void) - pgprot_val(protection_map[i]) |= _PAGE_CACHE040; - } - -+ module_fixup(NULL, __start_fixup, __stop_fixup); -+ flush_icache(); -+ - /* - * Map the physical memory available into the kernel virtual - * address space. It may allocate some memory for page ---- linux-m68k-2.6.21.orig/include/asm-m68k/module.h -+++ linux-m68k-2.6.21/include/asm-m68k/module.h -@@ -1,7 +1,38 @@ - #ifndef _ASM_M68K_MODULE_H - #define _ASM_M68K_MODULE_H --struct mod_arch_specific { }; -+ -+struct mod_arch_specific { -+ struct m68k_fixup_info *fixup_start, *fixup_end; -+}; -+ -+#define MODULE_ARCH_INIT { \ -+ .fixup_start = __start_fixup, \ -+ .fixup_end = __stop_fixup, \ -+} -+ - #define Elf_Shdr Elf32_Shdr - #define Elf_Sym Elf32_Sym - #define Elf_Ehdr Elf32_Ehdr -+ -+ -+enum m68k_fixup_type { -+ m68k_fixup_memoffset, -+}; -+ -+struct m68k_fixup_info { -+ enum m68k_fixup_type type; -+ void *addr; -+}; -+ -+#define m68k_fixup(type, addr) \ -+ " .section \".m68k_fixup\",\"aw\"\n" \ -+ " .long " #type "," #addr "\n" \ -+ " .previous\n" -+ -+extern struct m68k_fixup_info __start_fixup[], __stop_fixup[]; -+ -+struct module; -+extern void module_fixup(struct module *mod, struct m68k_fixup_info *start, -+ struct m68k_fixup_info *end); -+ - #endif /* _ASM_M68K_MODULE_H */ ---- linux-m68k-2.6.21.orig/include/asm-m68k/page.h -+++ linux-m68k-2.6.21/include/asm-m68k/page.h -@@ -27,6 +27,8 @@ - - #ifndef __ASSEMBLY__ - -+#include -+ - #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) - #define free_user_page(page, addr) free_page(addr) - -@@ -114,14 +116,35 @@ typedef struct { unsigned long pgprot; } - - #ifndef __ASSEMBLY__ - -+extern unsigned long m68k_memoffset; -+ - #ifndef CONFIG_SUN3 - - #define WANT_PAGE_VIRTUAL - #ifdef CONFIG_SINGLE_MEMORY_CHUNK --extern unsigned long m68k_memoffset; - --#define __pa(vaddr) ((unsigned long)(vaddr)+m68k_memoffset) --#define __va(paddr) ((void *)((unsigned long)(paddr)-m68k_memoffset)) -+static inline unsigned long ___pa(void *vaddr) -+{ -+ unsigned long paddr; -+ asm ( -+ "1: addl #0,%0\n" -+ m68k_fixup(%c2, 1b+2) -+ : "=r" (paddr) -+ : "0" (vaddr), "i" (m68k_fixup_memoffset)); -+ return paddr; -+} -+#define __pa(vaddr) ___pa((void *)(vaddr)) -+static inline void *__va(unsigned long paddr) -+{ -+ void *vaddr; -+ asm ( -+ "1: subl #0,%0\n" -+ m68k_fixup(%c2, 1b+2) -+ : "=r" (vaddr) -+ : "0" (paddr), "i" (m68k_fixup_memoffset)); -+ return vaddr; -+} -+ - #else - #define __pa(vaddr) virt_to_phys((void *)(vaddr)) - #define __va(paddr) phys_to_virt((unsigned long)(paddr)) diff --git a/debian/patches/bugfix/m68k/618-discontig.diff b/debian/patches/bugfix/m68k/618-discontig.diff deleted file mode 100644 index ef8ec464f..000000000 --- a/debian/patches/bugfix/m68k/618-discontig.diff +++ /dev/null @@ -1,868 +0,0 @@ -To: linus, akpm -Cc: lkml -Subject: [PATCH] m68k: Discontinuous memory support - -From: Roman Zippel - -Fix support for discontinuous memory - -Signed-off-by: Roman Zippel -Signed-off-by: Geert Uytterhoeven ---- - arch/m68k/Kconfig | 13 +++ - arch/m68k/kernel/module.c | 3 - arch/m68k/kernel/setup.c | 37 ++--------- - arch/m68k/mm/init.c | 119 +++++++++++++++++++++++------------- - arch/m68k/mm/memory.c | 73 ---------------------- - arch/m68k/mm/motorola.c | 102 +++++++++++++++++++++--------- - arch/m68k/sun3/config.c | 2 - include/asm-m68k/mmzone.h | 9 ++ - include/asm-m68k/module.h | 1 - include/asm-m68k/motorola_pgtable.h | 10 +-- - include/asm-m68k/page.h | 52 ++++++++++++--- - include/asm-m68k/pgalloc.h | 3 - include/asm-m68k/pgtable.h | 17 ----- - include/asm-m68k/sun3_pgtable.h | 4 - - include/asm-m68k/virtconvert.h | 48 +++----------- - mm/page_alloc.c | 2 - 16 files changed, 247 insertions(+), 248 deletions(-) - ---- linux-m68k-2.6.21.orig/arch/m68k/Kconfig -+++ linux-m68k-2.6.21/arch/m68k/Kconfig -@@ -355,8 +355,9 @@ config RMW_INSNS - adventurous. - - config SINGLE_MEMORY_CHUNK -- bool "Use one physical chunk of memory only" -- depends on ADVANCED && !SUN3 -+ bool "Use one physical chunk of memory only" if ADVANCED && !SUN3 -+ default y if SUN3 -+ select NEED_MULTIPLE_NODES - help - Ignore all but the first contiguous chunk of physical memory for VM - purposes. This will save a few bytes kernel size and may speed up -@@ -377,6 +378,14 @@ config 060_WRITETHROUGH - is hardwired on. The 53c710 SCSI driver is known to suffer from - this problem. - -+config ARCH_DISCONTIGMEM_ENABLE -+ def_bool !SINGLE_MEMORY_CHUNK -+ -+config NODES_SHIFT -+ int -+ default "3" -+ depends on !SINGLE_MEMORY_CHUNK -+ - source "mm/Kconfig" - - endmenu ---- linux-m68k-2.6.21.orig/arch/m68k/kernel/module.c -+++ linux-m68k-2.6.21/arch/m68k/kernel/module.c -@@ -132,6 +132,9 @@ void module_fixup(struct module *mod, st - case m68k_fixup_memoffset: - *(u32 *)fixup->addr = m68k_memoffset; - break; -+ case m68k_fixup_vnode_shift: -+ *(u16 *)fixup->addr += m68k_virt_to_node_shift; -+ break; - } - } - } ---- linux-m68k-2.6.21.orig/arch/m68k/kernel/setup.c -+++ linux-m68k-2.6.21/arch/m68k/kernel/setup.c -@@ -60,14 +60,12 @@ extern unsigned long availmem; - int m68k_num_memory; - int m68k_realnum_memory; - EXPORT_SYMBOL(m68k_realnum_memory); --#ifdef CONFIG_SINGLE_MEMORY_CHUNK - unsigned long m68k_memoffset; - EXPORT_SYMBOL(m68k_memoffset); --#endif - struct mem_info m68k_memory[NUM_MEMINFO]; - EXPORT_SYMBOL(m68k_memory); - --static struct mem_info m68k_ramdisk; -+struct mem_info m68k_ramdisk; - - static char m68k_command_line[CL_SIZE]; - -@@ -208,9 +206,6 @@ static void __init m68k_parse_bootinfo(c - void __init setup_arch(char **cmdline_p) - { - extern int _etext, _edata, _end; --#ifndef CONFIG_SUN3 -- unsigned long endmem, startmem; --#endif - int i; - - /* The bootinfo is located right after the kernel bss */ -@@ -320,30 +315,16 @@ void __init setup_arch(char **cmdline_p) - panic("No configuration setup"); - } - --#ifndef CONFIG_SUN3 -- startmem= m68k_memory[0].addr; -- endmem = startmem + m68k_memory[0].size; -- high_memory = (void *)PAGE_OFFSET; -- for (i = 0; i < m68k_num_memory; i++) { -- m68k_memory[i].size &= MASK_256K; -- if (m68k_memory[i].addr < startmem) -- startmem = m68k_memory[i].addr; -- if (m68k_memory[i].addr+m68k_memory[i].size > endmem) -- endmem = m68k_memory[i].addr+m68k_memory[i].size; -- high_memory += m68k_memory[i].size; -- } -- -- availmem += init_bootmem_node(NODE_DATA(0), availmem >> PAGE_SHIFT, -- startmem >> PAGE_SHIFT, endmem >> PAGE_SHIFT); -- -- for (i = 0; i < m68k_num_memory; i++) -- free_bootmem(m68k_memory[i].addr, m68k_memory[i].size); -- -- reserve_bootmem(m68k_memory[0].addr, availmem - m68k_memory[0].addr); -+ paging_init(); - -+#ifndef CONFIG_SUN3 -+ for (i = 1; i < m68k_num_memory; i++) -+ free_bootmem_node(NODE_DATA(i), m68k_memory[i].addr, -+ m68k_memory[i].size); - #ifdef CONFIG_BLK_DEV_INITRD - if (m68k_ramdisk.size) { -- reserve_bootmem(m68k_ramdisk.addr, m68k_ramdisk.size); -+ reserve_bootmem_node(__virt_to_node(phys_to_virt(m68k_ramdisk.addr)), -+ m68k_ramdisk.addr, m68k_ramdisk.size); - initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr); - initrd_end = initrd_start + m68k_ramdisk.size; - printk("initrd: %08lx - %08lx\n", initrd_start, initrd_end); -@@ -362,8 +343,6 @@ void __init setup_arch(char **cmdline_p) - - #endif /* !CONFIG_SUN3 */ - -- paging_init(); -- - /* set ISA defs early as possible */ - #if defined(CONFIG_ISA) && defined(MULTI_ISA) - #if defined(CONFIG_Q40) ---- linux-m68k-2.6.21.orig/arch/m68k/mm/init.c -+++ linux-m68k-2.6.21/arch/m68k/mm/init.c -@@ -7,6 +7,7 @@ - * to motorola.c and sun3mmu.c - */ - -+#include - #include - #include - #include -@@ -31,6 +32,37 @@ - - DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); - -+static bootmem_data_t __initdata bootmem_data[MAX_NUMNODES]; -+ -+pg_data_t pg_data_map[MAX_NUMNODES]; -+EXPORT_SYMBOL(pg_data_map); -+ -+int m68k_virt_to_node_shift; -+ -+#ifndef CONFIG_SINGLE_MEMORY_CHUNK -+pg_data_t *pg_data_table[65]; -+EXPORT_SYMBOL(pg_data_table); -+#endif -+ -+void m68k_setup_node(int node) -+{ -+#ifndef CONFIG_SINGLE_MEMORY_CHUNK -+ struct mem_info *info = m68k_memory + node; -+ int i, end; -+ -+ i = (unsigned long)phys_to_virt(info->addr) >> __virt_to_node_shift(); -+ end = (unsigned long)phys_to_virt(info->addr + info->size - 1) >> __virt_to_node_shift(); -+ for (; i <= end; i++) { -+ if (pg_data_table[i]) -+ printk("overlap at %u for chunk %u\n", i, node); -+ pg_data_table[i] = pg_data_map + node; -+ } -+#endif -+ pg_data_map[node].bdata = bootmem_data + node; -+ node_set_online(node); -+} -+ -+ - /* - * ZERO_PAGE is a special page that is used for zero-initialized - * data and COW. -@@ -40,52 +72,51 @@ void *empty_zero_page; - - void show_mem(void) - { -- unsigned long i; -- int free = 0, total = 0, reserved = 0, shared = 0; -- int cached = 0; -- -- printk("\nMem-info:\n"); -- show_free_areas(); -- printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); -- i = max_mapnr; -- while (i-- > 0) { -- total++; -- if (PageReserved(mem_map+i)) -- reserved++; -- else if (PageSwapCache(mem_map+i)) -- cached++; -- else if (!page_count(mem_map+i)) -- free++; -- else -- shared += page_count(mem_map+i) - 1; -- } -- printk("%d pages of RAM\n",total); -- printk("%d free pages\n",free); -- printk("%d reserved pages\n",reserved); -- printk("%d pages shared\n",shared); -- printk("%d pages swap cached\n",cached); -+ pg_data_t *pgdat; -+ int free = 0, total = 0, reserved = 0, shared = 0; -+ int cached = 0; -+ int i; -+ -+ printk("\nMem-info:\n"); -+ show_free_areas(); -+ printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); -+ for_each_online_pgdat(pgdat) { -+ for (i = 0; i < pgdat->node_spanned_pages; i++) { -+ struct page *page = pgdat->node_mem_map + i; -+ total++; -+ if (PageReserved(page)) -+ reserved++; -+ else if (PageSwapCache(page)) -+ cached++; -+ else if (!page_count(page)) -+ free++; -+ else -+ shared += page_count(page) - 1; -+ } -+ } -+ printk("%d pages of RAM\n",total); -+ printk("%d free pages\n",free); -+ printk("%d reserved pages\n",reserved); -+ printk("%d pages shared\n",shared); -+ printk("%d pages swap cached\n",cached); - } - - extern void init_pointer_table(unsigned long ptable); - - /* References to section boundaries */ - --extern char _text, _etext, _edata, __bss_start, _end; --extern char __init_begin, __init_end; -+extern char _text[], _etext[]; -+extern char __init_begin[], __init_end[]; - - extern pmd_t *zero_pgtable; - - void __init mem_init(void) - { -+ pg_data_t *pgdat; - int codepages = 0; - int datapages = 0; - int initpages = 0; -- unsigned long tmp; --#ifndef CONFIG_SUN3 - int i; --#endif -- -- max_mapnr = num_physpages = (((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT); - - #ifdef CONFIG_ATARI - if (MACH_IS_ATARI) -@@ -93,19 +124,25 @@ void __init mem_init(void) - #endif - - /* this will put all memory onto the freelists */ -- totalram_pages = free_all_bootmem(); -- -- for (tmp = PAGE_OFFSET ; tmp < (unsigned long)high_memory; tmp += PAGE_SIZE) { -- if (PageReserved(virt_to_page(tmp))) { -- if (tmp >= (unsigned long)&_text -- && tmp < (unsigned long)&_etext) -+ totalram_pages = num_physpages = 0; -+ for_each_online_pgdat(pgdat) { -+ num_physpages += pgdat->node_present_pages; -+ -+ totalram_pages += free_all_bootmem_node(pgdat); -+ for (i = 0; i < pgdat->node_spanned_pages; i++) { -+ struct page *page = pgdat->node_mem_map + i; -+ char *addr = page_to_virt(page); -+ -+ if (!PageReserved(page)) -+ continue; -+ if (addr >= _text && -+ addr < _etext) - codepages++; -- else if (tmp >= (unsigned long) &__init_begin -- && tmp < (unsigned long) &__init_end) -+ else if (addr >= __init_begin && -+ addr < __init_end) - initpages++; - else - datapages++; -- continue; - } - } - -@@ -124,7 +161,7 @@ void __init mem_init(void) - - printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n", - (unsigned long)nr_free_pages() << (PAGE_SHIFT-10), -- max_mapnr << (PAGE_SHIFT-10), -+ totalram_pages << (PAGE_SHIFT-10), - codepages << (PAGE_SHIFT-10), - datapages << (PAGE_SHIFT-10), - initpages << (PAGE_SHIFT-10)); ---- linux-m68k-2.6.21.orig/arch/m68k/mm/memory.c -+++ linux-m68k-2.6.21/arch/m68k/mm/memory.c -@@ -127,67 +127,6 @@ int free_pointer_table (pmd_t *ptable) - return 0; - } - --#ifdef DEBUG_INVALID_PTOV --int mm_inv_cnt = 5; --#endif -- --#ifndef CONFIG_SINGLE_MEMORY_CHUNK --/* -- * The following two routines map from a physical address to a kernel -- * virtual address and vice versa. -- */ --unsigned long mm_vtop(unsigned long vaddr) --{ -- int i=0; -- unsigned long voff = (unsigned long)vaddr - PAGE_OFFSET; -- -- do { -- if (voff < m68k_memory[i].size) { --#ifdef DEBUGPV -- printk ("VTOP(%p)=%lx\n", vaddr, -- m68k_memory[i].addr + voff); --#endif -- return m68k_memory[i].addr + voff; -- } -- voff -= m68k_memory[i].size; -- } while (++i < m68k_num_memory); -- -- /* As a special case allow `__pa(high_memory)'. */ -- if (voff == 0) -- return m68k_memory[i-1].addr + m68k_memory[i-1].size; -- -- return -1; --} --EXPORT_SYMBOL(mm_vtop); -- --unsigned long mm_ptov (unsigned long paddr) --{ -- int i = 0; -- unsigned long poff, voff = PAGE_OFFSET; -- -- do { -- poff = paddr - m68k_memory[i].addr; -- if (poff < m68k_memory[i].size) { --#ifdef DEBUGPV -- printk ("PTOV(%lx)=%lx\n", paddr, poff + voff); --#endif -- return poff + voff; -- } -- voff += m68k_memory[i].size; -- } while (++i < m68k_num_memory); -- --#ifdef DEBUG_INVALID_PTOV -- if (mm_inv_cnt > 0) { -- mm_inv_cnt--; -- printk("Invalid use of phys_to_virt(0x%lx) at 0x%p!\n", -- paddr, __builtin_return_address(0)); -- } --#endif -- return -1; --} --EXPORT_SYMBOL(mm_ptov); --#endif -- - /* invalidate page in both caches */ - static inline void clear040(unsigned long paddr) - { -@@ -354,15 +293,3 @@ void cache_push (unsigned long paddr, in - } - EXPORT_SYMBOL(cache_push); - --#ifndef CONFIG_SINGLE_MEMORY_CHUNK --int mm_end_of_chunk (unsigned long addr, int len) --{ -- int i; -- -- for (i = 0; i < m68k_num_memory; i++) -- if (m68k_memory[i].addr + m68k_memory[i].size == addr + len) -- return 1; -- return 0; --} --EXPORT_SYMBOL(mm_end_of_chunk); --#endif ---- linux-m68k-2.6.21.orig/arch/m68k/mm/motorola.c -+++ linux-m68k-2.6.21/arch/m68k/mm/motorola.c -@@ -43,6 +43,12 @@ unsigned long mm_cachebits; - EXPORT_SYMBOL(mm_cachebits); - #endif - -+/* size of memory already mapped in head.S */ -+#define INIT_MAPPED_SIZE (4UL<<20) -+ -+extern unsigned long availmem; -+extern struct mem_info m68k_ramdisk; -+ - static pte_t * __init kernel_page_table(void) - { - pte_t *ptablep; -@@ -98,19 +104,20 @@ static pmd_t * __init kernel_ptr_table(v - return last_pgtable; - } - --static unsigned long __init --map_chunk (unsigned long addr, long size) -+static void __init map_node(int node) - { - #define PTRTREESIZE (256*1024) - #define ROOTTREESIZE (32*1024*1024) -- static unsigned long virtaddr = PAGE_OFFSET; -- unsigned long physaddr; -+ unsigned long physaddr, virtaddr, size; - pgd_t *pgd_dir; - pmd_t *pmd_dir; - pte_t *pte_dir; - -- physaddr = (addr | m68k_supervisor_cachemode | -- _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY); -+ size = m68k_memory[node].size; -+ physaddr = m68k_memory[node].addr; -+ virtaddr = (unsigned long)phys_to_virt(physaddr); -+ physaddr |= m68k_supervisor_cachemode | -+ _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY; - if (CPU_IS_040_OR_060) - physaddr |= _PAGE_GLOBAL040; - -@@ -190,8 +197,6 @@ map_chunk (unsigned long addr, long size - #ifdef DEBUG - printk("\n"); - #endif -- -- return virtaddr; - } - - /* -@@ -200,15 +205,16 @@ map_chunk (unsigned long addr, long size - */ - void __init paging_init(void) - { -- int chunk; -- unsigned long mem_avail = 0; - unsigned long zones_size[MAX_NR_ZONES] = { 0, }; -+ unsigned long min_addr, max_addr; -+ unsigned long addr, size, end; -+ int i; - - #ifdef DEBUG - { - extern unsigned long availmem; -- printk ("start of paging_init (%p, %lx, %lx, %lx)\n", -- kernel_pg_dir, availmem, start_mem, end_mem); -+ printk ("start of paging_init (%p, %lx)\n", -+ kernel_pg_dir, availmem); - } - #endif - -@@ -222,27 +228,62 @@ void __init paging_init(void) - pgprot_val(protection_map[i]) |= _PAGE_CACHE040; - } - -+ min_addr = m68k_memory[0].addr; -+ max_addr = min_addr + m68k_memory[0].size; -+ for (i = 1; i < m68k_num_memory;) { -+ if (m68k_memory[i].addr < min_addr) { -+ printk("Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n", -+ m68k_memory[i].addr, m68k_memory[i].size); -+ printk("Fix your bootloader or use a memfile to make use of this area!\n"); -+ m68k_num_memory--; -+ memmove(m68k_memory + i, m68k_memory + i + 1, -+ (m68k_num_memory - i) * sizeof(struct mem_info)); -+ continue; -+ } -+ addr = m68k_memory[i].addr + m68k_memory[i].size; -+ if (addr > max_addr) -+ max_addr = addr; -+ i++; -+ } -+ m68k_memoffset = min_addr - PAGE_OFFSET; -+ m68k_virt_to_node_shift = fls(max_addr - min_addr - 1) - 6; -+ - module_fixup(NULL, __start_fixup, __stop_fixup); - flush_icache(); - -+ high_memory = phys_to_virt(max_addr); -+ -+ min_low_pfn = availmem >> PAGE_SHIFT; -+ max_low_pfn = max_addr >> PAGE_SHIFT; -+ -+ for (i = 0; i < m68k_num_memory; i++) { -+ addr = m68k_memory[i].addr; -+ end = addr + m68k_memory[i].size; -+ m68k_setup_node(i); -+ availmem = PAGE_ALIGN(availmem); -+ availmem += init_bootmem_node(NODE_DATA(i), -+ availmem >> PAGE_SHIFT, -+ addr >> PAGE_SHIFT, -+ end >> PAGE_SHIFT); -+ } -+ - /* - * Map the physical memory available into the kernel virtual -- * address space. It may allocate some memory for page -- * tables and thus modify availmem. -+ * address space. First initialize the bootmem allocator with -+ * the memory we already mapped, so map_node() has something -+ * to allocate. - */ -+ addr = m68k_memory[0].addr; -+ size = m68k_memory[0].size; -+ free_bootmem_node(NODE_DATA(0), availmem, min(INIT_MAPPED_SIZE, size) - (availmem - addr)); -+ map_node(0); -+ if (size > INIT_MAPPED_SIZE) -+ free_bootmem_node(NODE_DATA(0), addr + INIT_MAPPED_SIZE, size - INIT_MAPPED_SIZE); - -- for (chunk = 0; chunk < m68k_num_memory; chunk++) { -- mem_avail = map_chunk (m68k_memory[chunk].addr, -- m68k_memory[chunk].size); -- -- } -+ for (i = 1; i < m68k_num_memory; i++) -+ map_node(i); - - flush_tlb_all(); --#ifdef DEBUG -- printk ("memory available is %ldKB\n", mem_avail >> 10); -- printk ("start_mem is %#lx\nvirtual_end is %#lx\n", -- start_mem, end_mem); --#endif - - /* - * initialize the bad page table and bad page to point -@@ -259,14 +300,11 @@ void __init paging_init(void) - #ifdef DEBUG - printk ("before free_area_init\n"); - #endif -- zones_size[ZONE_DMA] = (mach_max_dma_address < (unsigned long)high_memory ? -- (mach_max_dma_address+1) : (unsigned long)high_memory); -- zones_size[ZONE_NORMAL] = (unsigned long)high_memory - zones_size[0]; -- -- zones_size[ZONE_DMA] = (zones_size[ZONE_DMA] - PAGE_OFFSET) >> PAGE_SHIFT; -- zones_size[ZONE_NORMAL] >>= PAGE_SHIFT; -- -- free_area_init(zones_size); -+ for (i = 0; i < m68k_num_memory; i++) { -+ zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT; -+ free_area_init_node(i, pg_data_map + i, zones_size, -+ m68k_memory[i].addr >> PAGE_SHIFT, NULL); -+ } - } - - extern char __init_begin, __init_end; ---- linux-m68k-2.6.21.orig/arch/m68k/sun3/config.c -+++ linux-m68k-2.6.21/arch/m68k/sun3/config.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -127,6 +128,7 @@ void __init sun3_bootmem_alloc(unsigned - high_memory = (void *)memory_end; - availmem = memory_start; - -+ m68k_setup_node(0); - availmem += init_bootmem_node(NODE_DATA(0), start_page, 0, num_pages); - availmem = (availmem + (PAGE_SIZE-1)) & PAGE_MASK; - ---- /dev/null -+++ linux-m68k-2.6.21/include/asm-m68k/mmzone.h -@@ -0,0 +1,9 @@ -+#ifndef _ASM_M68K_MMZONE_H_ -+#define _ASM_M68K_MMZONE_H_ -+ -+extern pg_data_t pg_data_map[]; -+ -+#define NODE_DATA(nid) (&pg_data_map[nid]) -+#define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map) -+ -+#endif /* _ASM_M68K_MMZONE_H_ */ ---- linux-m68k-2.6.21.orig/include/asm-m68k/module.h -+++ linux-m68k-2.6.21/include/asm-m68k/module.h -@@ -17,6 +17,7 @@ struct mod_arch_specific { - - enum m68k_fixup_type { - m68k_fixup_memoffset, -+ m68k_fixup_vnode_shift, - }; - - struct m68k_fixup_info { ---- linux-m68k-2.6.21.orig/include/asm-m68k/motorola_pgtable.h -+++ linux-m68k-2.6.21/include/asm-m68k/motorola_pgtable.h -@@ -130,7 +130,7 @@ static inline void pgd_set(pgd_t *pgdp, - #define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROTNONE)) - #define pte_clear(mm,addr,ptep) ({ pte_val(*(ptep)) = 0; }) - --#define pte_page(pte) (mem_map + ((unsigned long)(__va(pte_val(pte)) - PAGE_OFFSET) >> PAGE_SHIFT)) -+#define pte_page(pte) virt_to_page(__va(pte_val(pte))) - #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) - #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) - -@@ -143,7 +143,7 @@ static inline void pgd_set(pgd_t *pgdp, - while (--__i >= 0) \ - *__ptr++ = 0; \ - }) --#define pmd_page(pmd) (mem_map + ((unsigned long)(__va(pmd_val(pmd)) - PAGE_OFFSET) >> PAGE_SHIFT)) -+#define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd))) - - - #define pgd_none(pgd) (!pgd_val(pgd)) -@@ -223,10 +223,10 @@ static inline pte_t *pte_offset_kernel(p - return (pte_t *)__pmd_page(*pmdp) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); - } - --#define pte_offset_map(pmdp,address) ((pte_t *)kmap(pmd_page(*pmdp)) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) -+#define pte_offset_map(pmdp,address) ((pte_t *)__pmd_page(*pmdp) + (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) - #define pte_offset_map_nested(pmdp, address) pte_offset_map(pmdp, address) --#define pte_unmap(pte) kunmap(pte) --#define pte_unmap_nested(pte) kunmap(pte) -+#define pte_unmap(pte) ((void)0) -+#define pte_unmap_nested(pte) ((void)0) - - /* - * Allocate and free page tables. The xxx_kernel() versions are ---- linux-m68k-2.6.21.orig/include/asm-m68k/page.h -+++ linux-m68k-2.6.21/include/asm-m68k/page.h -@@ -121,7 +121,6 @@ extern unsigned long m68k_memoffset; - #ifndef CONFIG_SUN3 - - #define WANT_PAGE_VIRTUAL --#ifdef CONFIG_SINGLE_MEMORY_CHUNK - - static inline unsigned long ___pa(void *vaddr) - { -@@ -133,7 +132,7 @@ static inline unsigned long ___pa(void * - : "0" (vaddr), "i" (m68k_fixup_memoffset)); - return paddr; - } --#define __pa(vaddr) ___pa((void *)(vaddr)) -+#define __pa(vaddr) ___pa((void *)(vaddr)) - static inline void *__va(unsigned long paddr) - { - void *vaddr; -@@ -145,11 +144,6 @@ static inline void *__va(unsigned long p - return vaddr; - } - --#else --#define __pa(vaddr) virt_to_phys((void *)(vaddr)) --#define __va(paddr) phys_to_virt((unsigned long)(paddr)) --#endif -- - #else /* !CONFIG_SUN3 */ - /* This #define is a horrible hack to suppress lots of warnings. --m */ - #define __pa(x) ___pa((unsigned long)(x)) -@@ -184,11 +178,47 @@ static inline void *__va(unsigned long x - #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) - #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) - --#define virt_to_page(kaddr) (mem_map + (((unsigned long)(kaddr)-PAGE_OFFSET) >> PAGE_SHIFT)) --#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) -+extern int m68k_virt_to_node_shift; -+ -+#ifdef CONFIG_SINGLE_MEMORY_CHUNK -+#define __virt_to_node(addr) (&pg_data_map[0]) -+#else -+extern struct pglist_data *pg_data_table[]; -+ -+static inline __attribute_const__ int __virt_to_node_shift(void) -+{ -+ int shift; -+ -+ asm ( -+ "1: moveq #0,%0\n" -+ m68k_fixup(%c1, 1b) -+ : "=d" (shift) -+ : "i" (m68k_fixup_vnode_shift)); -+ return shift; -+} -+ -+#define __virt_to_node(addr) (pg_data_table[(unsigned long)(addr) >> __virt_to_node_shift()]) -+#endif - --#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn)) --#define page_to_pfn(page) virt_to_pfn(page_to_virt(page)) -+#define virt_to_page(addr) ({ \ -+ pfn_to_page(virt_to_pfn(addr)); \ -+}) -+#define page_to_virt(page) ({ \ -+ pfn_to_virt(page_to_pfn(page)); \ -+}) -+ -+#define pfn_to_page(pfn) ({ \ -+ unsigned long __pfn = (pfn); \ -+ struct pglist_data *pgdat; \ -+ pgdat = __virt_to_node((unsigned long)pfn_to_virt(__pfn)); \ -+ pgdat->node_mem_map + (__pfn - pgdat->node_start_pfn); \ -+}) -+#define page_to_pfn(_page) ({ \ -+ struct page *__p = (_page); \ -+ struct pglist_data *pgdat; \ -+ pgdat = &pg_data_map[page_to_nid(__p)]; \ -+ ((__p) - pgdat->node_mem_map) + pgdat->node_start_pfn; \ -+}) - - #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) - #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn)) ---- linux-m68k-2.6.21.orig/include/asm-m68k/pgalloc.h -+++ linux-m68k-2.6.21/include/asm-m68k/pgalloc.h -@@ -8,11 +8,12 @@ - #include - - -- - #ifdef CONFIG_SUN3 - #include - #else - #include - #endif - -+extern void m68k_setup_node(int node); -+ - #endif /* M68K_PGALLOC_H */ ---- linux-m68k-2.6.21.orig/include/asm-m68k/pgtable.h -+++ linux-m68k-2.6.21/include/asm-m68k/pgtable.h -@@ -107,22 +107,7 @@ extern void *empty_zero_page; - /* 64-bit machines, beware! SRB. */ - #define SIZEOF_PTR_LOG2 2 - --/* -- * Check if the addr/len goes up to the end of a physical -- * memory chunk. Used for DMA functions. -- */ --#ifdef CONFIG_SINGLE_MEMORY_CHUNK --/* -- * It makes no sense to consider whether we cross a memory boundary if -- * we support just one physical chunk of memory. -- */ --static inline int mm_end_of_chunk(unsigned long addr, int len) --{ -- return 0; --} --#else --int mm_end_of_chunk (unsigned long addr, int len); --#endif -+#define mm_end_of_chunk(addr, len) 0 - - extern void kernel_set_cachemode(void *addr, unsigned long size, int cmode); - ---- linux-m68k-2.6.21.orig/include/asm-m68k/sun3_pgtable.h -+++ linux-m68k-2.6.21/include/asm-m68k/sun3_pgtable.h -@@ -132,8 +132,8 @@ static inline void pte_clear (struct mm_ - #define pfn_pte(pfn, pgprot) \ - ({ pte_t __pte; pte_val(__pte) = pfn | pgprot_val(pgprot); __pte; }) - --#define pte_page(pte) (mem_map+((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT)) --#define pmd_page(pmd) (mem_map+((__pmd_page(pmd) - PAGE_OFFSET) >> PAGE_SHIFT)) -+#define pte_page(pte) virt_to_page(__pte_page(pte)) -+#define pmd_page(pmd) virt_to_page(__pmd_page(pmd)) - - - static inline int pmd_none2 (pmd_t *pmd) { return !pmd_val (*pmd); } ---- linux-m68k-2.6.21.orig/include/asm-m68k/virtconvert.h -+++ linux-m68k-2.6.21/include/asm-m68k/virtconvert.h -@@ -8,56 +8,34 @@ - #ifdef __KERNEL__ - - #include -+#include - #include - #include - --#ifdef CONFIG_AMIGA --#include --#endif -- - /* - * Change virtual addresses to physical addresses and vv. - */ --#ifndef CONFIG_SUN3 --extern unsigned long mm_vtop(unsigned long addr) __attribute_const__; --extern unsigned long mm_ptov(unsigned long addr) __attribute_const__; --#else --static inline unsigned long mm_vtop(unsigned long vaddr) --{ -- return __pa(vaddr); --} -- --static inline unsigned long mm_ptov(unsigned long paddr) --{ -- return (unsigned long)__va(paddr); --} --#endif -- --#ifdef CONFIG_SINGLE_MEMORY_CHUNK --static inline unsigned long virt_to_phys(void *vaddr) --{ -- return (unsigned long)vaddr - PAGE_OFFSET + m68k_memory[0].addr; --} -- --static inline void * phys_to_virt(unsigned long paddr) --{ -- return (void *)(paddr - m68k_memory[0].addr + PAGE_OFFSET); --} --#else - static inline unsigned long virt_to_phys(void *address) - { -- return mm_vtop((unsigned long)address); -+ return __pa(address); - } - - static inline void *phys_to_virt(unsigned long address) - { -- return (void *) mm_ptov(address); -+ return __va(address); - } --#endif - - /* Permanent address of a page. */ --#define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT)) --#define page_to_phys(page) virt_to_phys((void *)__page_address(page)) -+#ifdef CONFIG_SINGLE_MEMORY_CHUNK -+#define page_to_phys(page) \ -+ __pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT)) -+#else -+#define page_to_phys(page) ({ \ -+ struct pglist_data *pgdat; \ -+ pgdat = pg_data_table[page_to_nid(page)]; \ -+ page_to_pfn(page) << PAGE_SHIFT; \ -+}) -+#endif - - /* - * IO bus memory addresses are 1:1 with the physical address, ---- linux-m68k-2.6.21.orig/mm/page_alloc.c -+++ linux-m68k-2.6.21/mm/page_alloc.c -@@ -2713,7 +2713,7 @@ static void __init alloc_node_mem_map(st - map = alloc_bootmem_node(pgdat, size); - pgdat->node_mem_map = map + (pgdat->node_start_pfn - start); - } --#ifdef CONFIG_FLATMEM -+#ifndef CONFIG_NEED_MULTIPLE_NODES - /* - * With no DISCONTIG, the global mem_map is just set as node 0's - */ diff --git a/debian/patches/bugfix/m68k/630-extern-cleanup.diff b/debian/patches/bugfix/m68k/630-extern-cleanup.diff deleted file mode 100644 index 823760cee..000000000 --- a/debian/patches/bugfix/m68k/630-extern-cleanup.diff +++ /dev/null @@ -1,34 +0,0 @@ -To: linus, akpm -Cc: lkml -Subject: [PATCH] m68k: Kill superfluous externs - -Kill a few superfluous extern declarations. - -Signed-off-by: Geert Uytterhoeven ---- - arch/m68k/mm/motorola.c | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - ---- linux-m68k-2.6.21.orig/arch/m68k/mm/motorola.c -+++ linux-m68k-2.6.21/arch/m68k/mm/motorola.c -@@ -47,7 +47,6 @@ EXPORT_SYMBOL(mm_cachebits); - #define INIT_MAPPED_SIZE (4UL<<20) - - extern unsigned long availmem; --extern struct mem_info m68k_ramdisk; - - static pte_t * __init kernel_page_table(void) - { -@@ -211,11 +210,7 @@ void __init paging_init(void) - int i; - - #ifdef DEBUG -- { -- extern unsigned long availmem; -- printk ("start of paging_init (%p, %lx)\n", -- kernel_pg_dir, availmem); -- } -+ printk ("start of paging_init (%p, %lx)\n", kernel_pg_dir, availmem); - #endif - - /* Fix the cache mode in the page descriptors for the 680[46]0. */ diff --git a/debian/patches/bugfix/m68k/630-extern-cleanup.diff.1 b/debian/patches/bugfix/m68k/630-extern-cleanup.diff.1 deleted file mode 100644 index 4ac6c567d..000000000 --- a/debian/patches/bugfix/m68k/630-extern-cleanup.diff.1 +++ /dev/null @@ -1,26 +0,0 @@ -To: linus, akpm -Cc: lkml -Subject: [PATCH] m68k: Kill superfluous externs - -Kill a few superfluous extern declarations. - -Signed-off-by: Geert Uytterhoeven ---- - arch/m68k/mm/motorola.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - ---- a/arch/m68k/mm/motorola.c -+++ b/arch/m68k/mm/motorola.c -@@ -210,11 +210,7 @@ void __init paging_init(void) - int i; - - #ifdef DEBUG -- { -- extern unsigned long availmem; -- printk ("start of paging_init (%p, %lx)\n", -- kernel_pg_dir, availmem); -- } -+ printk ("start of paging_init (%p, %lx)\n", kernel_pg_dir, availmem); - #endif - - /* Fix the cache mode in the page descriptors for the 680[46]0. */ diff --git a/debian/patches/bugfix/m68k/631-thread_stack.diff b/debian/patches/bugfix/m68k/631-thread_stack.diff deleted file mode 100644 index 71342f24a..000000000 --- a/debian/patches/bugfix/m68k/631-thread_stack.diff +++ /dev/null @@ -1,117 +0,0 @@ -To: linus, akpm -Cc: lkml -Subject: [PATCH] Thread stack abstractions - -From: Roman Zippel - -Thread stack abstractions: - - Move thread_info into task_struct - - Adapt thread_info initialization - - Abstract thread_info access - - Thread_info field becomes stack - - Change get_task_struct/put_task_struct into inline functions - - Move task_struct into - -Signed-off-by: Roman Zippel - ---- - include/asm-m68k/thread_info.h | 12 ++++++------ - include/linux/init_task.h | 2 +- - include/linux/sched.h | 3 ++- - kernel/fork.c | 10 +++++----- - 4 files changed, 14 insertions(+), 13 deletions(-) - ---- linux-m68k-2.6.21.orig/include/asm-m68k/thread_info.h -+++ linux-m68k-2.6.21/include/asm-m68k/thread_info.h -@@ -26,24 +26,24 @@ struct thread_info { - - /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */ - #if PAGE_SHIFT == 13 /* 8k machines */ --#define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,0)) --#define free_thread_info(ti) free_pages((unsigned long)(ti),0) -+#define alloc_thread_stack(tsk) ((void *)__get_free_pages(GFP_KERNEL,0)) -+#define free_thread_stack(ti) free_pages((unsigned long)(ti),0) - #else /* otherwise assume 4k pages */ --#define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,1)) --#define free_thread_info(ti) free_pages((unsigned long)(ti),1) -+#define alloc_thread_stack(tsk) ((void *)__get_free_pages(GFP_KERNEL,1)) -+#define free_thread_stack(ti) free_pages((unsigned long)(ti),1) - #endif /* PAGE_SHIFT == 13 */ - - #define init_thread_info (init_task.thread.info) - #define init_stack (init_thread_union.stack) - - #define task_thread_info(tsk) (&(tsk)->thread.info) --#define task_stack_page(tsk) ((void *)(tsk)->thread_info) -+#define task_stack_page(tsk) ((void *)(tsk)->stack) - #define current_thread_info() task_thread_info(current) - - #define __HAVE_THREAD_FUNCTIONS - - #define setup_thread_stack(p, org) ({ \ -- *(struct task_struct **)(p)->thread_info = (p); \ -+ *(struct task_struct **)(p)->stack = (p); \ - task_thread_info(p)->task = (p); \ - }) - ---- linux-m68k-2.6.21.orig/include/linux/init_task.h -+++ linux-m68k-2.6.21/include/linux/init_task.h -@@ -95,7 +95,7 @@ extern struct group_info init_groups; - #define INIT_TASK(tsk) \ - { \ - .state = 0, \ -- .thread_info = &init_thread_info, \ -+ .stack = &init_stack, \ - .usage = ATOMIC_INIT(2), \ - .flags = 0, \ - .lock_depth = -1, \ ---- linux-m68k-2.6.21.orig/include/linux/sched.h -+++ linux-m68k-2.6.21/include/linux/sched.h -@@ -799,7 +799,8 @@ struct prio_array; - - struct task_struct { - volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ -- struct thread_info *thread_info; -+ //struct thread_info *thread_info; -+ void *stack; - atomic_t usage; - unsigned long flags; /* per process flags, defined below */ - unsigned long ptrace; ---- linux-m68k-2.6.21.orig/kernel/fork.c -+++ linux-m68k-2.6.21/kernel/fork.c -@@ -106,7 +106,7 @@ static struct kmem_cache *mm_cachep; - - void free_task(struct task_struct *tsk) - { -- free_thread_info(tsk->thread_info); -+ free_thread_stack(tsk->stack); - rt_mutex_debug_task_free(tsk); - free_task_struct(tsk); - } -@@ -161,7 +161,7 @@ void __init fork_init(unsigned long memp - static struct task_struct *dup_task_struct(struct task_struct *orig) - { - struct task_struct *tsk; -- struct thread_info *ti; -+ void *stack; - - prepare_to_copy(orig); - -@@ -169,14 +169,14 @@ static struct task_struct *dup_task_stru - if (!tsk) - return NULL; - -- ti = alloc_thread_info(tsk); -- if (!ti) { -+ stack = alloc_thread_stack(tsk); -+ if (!stack) { - free_task_struct(tsk); - return NULL; - } - - *tsk = *orig; -- tsk->thread_info = ti; -+ tsk->stack = stack; - setup_thread_stack(tsk, orig); - - #ifdef CONFIG_CC_STACKPROTECTOR diff --git a/debian/patches/bugfix/m68k/634-atari_scsi.diff b/debian/patches/bugfix/m68k/634-atari_scsi.diff deleted file mode 100644 index af3401833..000000000 --- a/debian/patches/bugfix/m68k/634-atari_scsi.diff +++ /dev/null @@ -1,228 +0,0 @@ -Cc: James E.J. Bottomley , - linux-scsi@vger.kernel.org -Subject: [PATCH] m68k: Atari SCSI revival - -From: Michael Schmitz - -SCSI should be working on a TT (but someone should really try!) but causes -trouble on a Falcon (as in: it ate a filesystem of mine) at least when -used concurrently with IDE. I have the notion it's because locking of the -ST-DMA interrupt by IDE is broken in 2.6 (the IDE driver always complains -about trying to release an already-released ST-DMA). Needs more work, but -that's on the IDE or m68k interrupt side rather than SCSI. - -Signed-off-by: Michael Schmitz -Signed-off-by: Roman Zippel -Signed-off-by: Geert Uytterhoeven ---- - drivers/scsi/Kconfig | 2 - - drivers/scsi/atari_NCR5380.c | 52 ++++++++++++++++++++++++++++++++++++++----- - drivers/scsi/atari_scsi.c | 10 +++----- - drivers/scsi/atari_scsi.h | 30 +++++++++++++++++++++--- - 4 files changed, 77 insertions(+), 17 deletions(-) - ---- linux-m68k-2.6.21.orig/drivers/scsi/Kconfig -+++ linux-m68k-2.6.21/drivers/scsi/Kconfig -@@ -1649,7 +1649,7 @@ config OKTAGON_SCSI - - config ATARI_SCSI - tristate "Atari native SCSI support" -- depends on ATARI && SCSI && BROKEN -+ depends on ATARI && SCSI - select SCSI_SPI_ATTRS - ---help--- - If you have an Atari with built-in NCR5380 SCSI controller (TT, ---- linux-m68k-2.6.21.orig/drivers/scsi/atari_NCR5380.c -+++ linux-m68k-2.6.21/drivers/scsi/atari_NCR5380.c -@@ -264,7 +264,7 @@ static struct scsi_host_template *the_te - (struct NCR5380_hostdata *)(in)->hostdata - #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) - --#define NEXT(cmd) ((Scsi_Cmnd *)((cmd)->host_scribble)) -+#define NEXT(cmd) ((cmd)->host_scribble) - #define NEXTADDR(cmd) ((Scsi_Cmnd **)&((cmd)->host_scribble)) - - #define HOSTNO instance->host_no -@@ -716,7 +716,7 @@ static void NCR5380_print_status (struct - printk("NCR5380_print_status: no memory for print buffer\n"); - return; - } -- len = NCR5380_proc_info(pr_bfr, &start, 0, PAGE_SIZE, HOSTNO, 0); -+ len = NCR5380_proc_info(instance, pr_bfr, &start, 0, PAGE_SIZE, 0); - pr_bfr[len] = 0; - printk("\n%s\n", pr_bfr); - free_page((unsigned long) pr_bfr); -@@ -878,6 +878,46 @@ static int NCR5380_init (struct Scsi_Hos - } - - /* -+ * our own old-style timeout update -+ */ -+/* -+ * The strategy is to cause the timer code to call scsi_times_out() -+ * when the soonest timeout is pending. -+ * The arguments are used when we are queueing a new command, because -+ * we do not want to subtract the time used from this time, but when we -+ * set the timer, we want to take this value into account. -+ */ -+ -+int atari_scsi_update_timeout(Scsi_Cmnd * SCset, int timeout) -+{ -+ int rtn; -+ -+ /* -+ * We are using the new error handling code to actually register/deregister -+ * timers for timeout. -+ */ -+ -+ if (!timer_pending(&SCset->eh_timeout)) { -+ rtn = 0; -+ } else { -+ rtn = SCset->eh_timeout.expires - jiffies; -+ } -+ -+ if (timeout == 0) { -+ del_timer(&SCset->eh_timeout); -+ SCset->eh_timeout.data = (unsigned long) NULL; -+ SCset->eh_timeout.expires = 0; -+ } else { -+ if (SCset->eh_timeout.data != (unsigned long) NULL) -+ del_timer(&SCset->eh_timeout); -+ SCset->eh_timeout.data = (unsigned long) SCset; -+ SCset->eh_timeout.expires = jiffies + timeout; -+ add_timer(&SCset->eh_timeout); -+ } -+ return rtn; -+} -+ -+/* - * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd, - * void (*done)(Scsi_Cmnd *)) - * -@@ -902,7 +942,7 @@ int NCR5380_queue_command (Scsi_Cmnd *cm - Scsi_Cmnd *tmp; - int oldto; - unsigned long flags; -- extern int update_timeout(Scsi_Cmnd * SCset, int timeout); -+ // extern int update_timeout(Scsi_Cmnd * SCset, int timeout); - - #if (NDEBUG & NDEBUG_NO_WRITE) - switch (cmd->cmnd[0]) { -@@ -978,9 +1018,9 @@ int NCR5380_queue_command (Scsi_Cmnd *cm - * alter queues and touch the lock. - */ - if (!IS_A_TT()) { -- oldto = update_timeout(cmd, 0); -+ oldto = atari_scsi_update_timeout(cmd, 0); - falcon_get_lock(); -- update_timeout(cmd, oldto); -+ atari_scsi_update_timeout(cmd, oldto); - } - if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) { - LIST(cmd, hostdata->issue_queue); -@@ -1435,7 +1475,7 @@ static int NCR5380_select (struct Scsi_H - local_irq_restore(flags); - - /* Wait for arbitration logic to complete */ --#if NCR_TIMEOUT -+#if defined(NCR_TIMEOUT) - { - unsigned long timeout = jiffies + 2*NCR_TIMEOUT; - ---- linux-m68k-2.6.21.orig/drivers/scsi/atari_scsi.c -+++ linux-m68k-2.6.21/drivers/scsi/atari_scsi.c -@@ -395,7 +395,7 @@ static irqreturn_t scsi_tt_intr (int irq - - #endif /* REAL_DMA */ - -- NCR5380_intr (0, 0, 0); -+ NCR5380_intr(0, 0); - - #if 0 - /* To be sure the int is not masked */ -@@ -461,7 +461,7 @@ static irqreturn_t scsi_falcon_intr (int - - #endif /* REAL_DMA */ - -- NCR5380_intr (0, 0, 0); -+ NCR5380_intr(0, 0); - return IRQ_HANDLED; - } - -@@ -557,11 +557,11 @@ static void falcon_get_lock( void ) - - local_irq_save(flags); - -- while( !in_interrupt() && falcon_got_lock && stdma_others_waiting() ) -+ while (!in_irq() && falcon_got_lock && stdma_others_waiting()) - sleep_on( &falcon_fairness_wait ); - - while (!falcon_got_lock) { -- if (in_interrupt()) -+ if (in_irq()) - panic( "Falcon SCSI hasn't ST-DMA lock in interrupt" ); - if (!falcon_trying_lock) { - falcon_trying_lock = 1; -@@ -763,7 +763,6 @@ int atari_scsi_detect (struct scsi_host_ - return( 1 ); - } - --#ifdef MODULE - int atari_scsi_release (struct Scsi_Host *sh) - { - if (IS_A_TT()) -@@ -772,7 +771,6 @@ int atari_scsi_release (struct Scsi_Host - atari_stram_free (atari_dma_buffer); - return 1; - } --#endif - - void __init atari_scsi_setup(char *str, int *ints) - { ---- linux-m68k-2.6.21.orig/drivers/scsi/atari_scsi.h -+++ linux-m68k-2.6.21/drivers/scsi/atari_scsi.h -@@ -21,11 +21,7 @@ - int atari_scsi_detect (struct scsi_host_template *); - const char *atari_scsi_info (struct Scsi_Host *); - int atari_scsi_reset (Scsi_Cmnd *, unsigned int); --#ifdef MODULE - int atari_scsi_release (struct Scsi_Host *); --#else --#define atari_scsi_release NULL --#endif - - /* The values for CMD_PER_LUN and CAN_QUEUE are somehow arbitrary. Higher - * values should work, too; try it! (but cmd_per_lun costs memory!) */ -@@ -63,6 +59,32 @@ int atari_scsi_release (struct Scsi_Host - #define NCR5380_dma_xfer_len(i,cmd,phase) \ - atari_dma_xfer_len(cmd->SCp.this_residual,cmd,((phase) & SR_IO) ? 0 : 1) - -+/* former generic SCSI error handling stuff */ -+ -+#define SCSI_ABORT_SNOOZE 0 -+#define SCSI_ABORT_SUCCESS 1 -+#define SCSI_ABORT_PENDING 2 -+#define SCSI_ABORT_BUSY 3 -+#define SCSI_ABORT_NOT_RUNNING 4 -+#define SCSI_ABORT_ERROR 5 -+ -+#define SCSI_RESET_SNOOZE 0 -+#define SCSI_RESET_PUNT 1 -+#define SCSI_RESET_SUCCESS 2 -+#define SCSI_RESET_PENDING 3 -+#define SCSI_RESET_WAKEUP 4 -+#define SCSI_RESET_NOT_RUNNING 5 -+#define SCSI_RESET_ERROR 6 -+ -+#define SCSI_RESET_SYNCHRONOUS 0x01 -+#define SCSI_RESET_ASYNCHRONOUS 0x02 -+#define SCSI_RESET_SUGGEST_BUS_RESET 0x04 -+#define SCSI_RESET_SUGGEST_HOST_RESET 0x08 -+ -+#define SCSI_RESET_BUS_RESET 0x100 -+#define SCSI_RESET_HOST_RESET 0x200 -+#define SCSI_RESET_ACTION 0xff -+ - /* Debugging printk definitions: - * - * ARB -> arbitration diff --git a/debian/patches/bugfix/m68k/635-atari_input.diff b/debian/patches/bugfix/m68k/635-atari_input.diff deleted file mode 100644 index 2aed8c8c8..000000000 --- a/debian/patches/bugfix/m68k/635-atari_input.diff +++ /dev/null @@ -1,1162 +0,0 @@ -Cc: Dmitry Torokhov , - linux-input@atrey.karlin.mff.cuni.cz -Subject: [PATCH] m68k: Atari keyboard and mouse support. - -From: Michael Schmitz - -Atari keyboard and mouse support. -(reformating and Kconfig fixes by Roman Zippel) - -Signed-off-by: Michael Schmitz -Signed-off-by: Roman Zippel -Signed-off-by: Geert Uytterhoeven ---- - arch/m68k/Kconfig | 3 - arch/m68k/atari/Makefile | 1 - arch/m68k/atari/atakeyb.c | 730 +++++++++++++++++++++++++++++++++++++++ - drivers/input/keyboard/Kconfig | 11 - drivers/input/keyboard/Makefile | 1 - drivers/input/keyboard/atakbd.c | 134 +++++++ - drivers/input/mouse/Kconfig | 11 - drivers/input/mouse/Makefile | 1 - drivers/input/mouse/atarimouse.c | 160 ++++++++ - include/asm-m68k/atarikb.h | 6 - include/linux/input.h | 1 - 11 files changed, 1059 insertions(+) - ---- linux-m68k-2.6.21.orig/arch/m68k/Kconfig -+++ linux-m68k-2.6.21/arch/m68k/Kconfig -@@ -409,6 +409,9 @@ config STRAM_PROC - help - Say Y here to report ST-RAM usage statistics in /proc/stram. - -+config ATARI_KBD_CORE -+ bool -+ - config HEARTBEAT - bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || MAC ||Q40 - default y if !AMIGA && !APOLLO && !ATARI && !MAC && !Q40 && HP300 ---- linux-m68k-2.6.21.orig/arch/m68k/atari/Makefile -+++ linux-m68k-2.6.21/arch/m68k/atari/Makefile -@@ -8,3 +8,4 @@ obj-y := config.o time.o debug.o ataint - ifeq ($(CONFIG_PCI),y) - obj-$(CONFIG_HADES) += hades-pci.o - endif -+obj-$(CONFIG_ATARI_KBD_CORE) += atakeyb.o ---- /dev/null -+++ linux-m68k-2.6.21/arch/m68k/atari/atakeyb.c -@@ -0,0 +1,730 @@ -+/* -+ * linux/atari/atakeyb.c -+ * -+ * Atari Keyboard driver for 680x0 Linux -+ * -+ * 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. -+ */ -+ -+/* -+ * Atari support by Robert de Vries -+ * enhanced by Bjoern Brauel and Roman Hodek -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static void atakeyb_rep(unsigned long ignore); -+extern unsigned int keymap_count; -+ -+/* Hook for MIDI serial driver */ -+void (*atari_MIDI_interrupt_hook) (void); -+/* Hook for mouse driver */ -+void (*atari_mouse_interrupt_hook) (char *); -+/* Hook for keyboard inputdev driver */ -+void (*atari_input_keyboard_interrupt_hook) (unsigned char, char); -+/* Hook for mouse inputdev driver */ -+void (*atari_input_mouse_interrupt_hook) (char *); -+ -+/* variables for IKBD self test: */ -+ -+/* state: 0: off; >0: in progress; >1: 0xf1 received */ -+static volatile int ikbd_self_test; -+/* timestamp when last received a char */ -+static volatile unsigned long self_test_last_rcv; -+/* bitmap of keys reported as broken */ -+static unsigned long broken_keys[128/(sizeof(unsigned long)*8)] = { 0, }; -+ -+#define BREAK_MASK (0x80) -+ -+/* -+ * ++roman: The following changes were applied manually: -+ * -+ * - The Alt (= Meta) key works in combination with Shift and -+ * Control, e.g. Alt+Shift+a sends Meta-A (0xc1), Alt+Control+A sends -+ * Meta-Ctrl-A (0x81) ... -+ * -+ * - The parentheses on the keypad send '(' and ')' with all -+ * modifiers (as would do e.g. keypad '+'), but they cannot be used as -+ * application keys (i.e. sending Esc O c). -+ * -+ * - HELP and UNDO are mapped to be F21 and F24, resp, that send the -+ * codes "\E[M" and "\E[P". (This is better than the old mapping to -+ * F11 and F12, because these codes are on Shift+F1/2 anyway.) This -+ * way, applications that allow their own keyboard mappings -+ * (e.g. tcsh, X Windows) can be configured to use them in the way -+ * the label suggests (providing help or undoing). -+ * -+ * - Console switching is done with Alt+Fx (consoles 1..10) and -+ * Shift+Alt+Fx (consoles 11..20). -+ * -+ * - The misc. special function implemented in the kernel are mapped -+ * to the following key combinations: -+ * -+ * ClrHome -> Home/Find -+ * Shift + ClrHome -> End/Select -+ * Shift + Up -> Page Up -+ * Shift + Down -> Page Down -+ * Alt + Help -> show system status -+ * Shift + Help -> show memory info -+ * Ctrl + Help -> show registers -+ * Ctrl + Alt + Del -> Reboot -+ * Alt + Undo -> switch to last console -+ * Shift + Undo -> send interrupt -+ * Alt + Insert -> stop/start output (same as ^S/^Q) -+ * Alt + Up -> Scroll back console (if implemented) -+ * Alt + Down -> Scroll forward console (if implemented) -+ * Alt + CapsLock -> NumLock -+ * -+ * ++Andreas: -+ * -+ * - Help mapped to K_HELP -+ * - Undo mapped to K_UNDO (= K_F246) -+ * - Keypad Left/Right Parenthesis mapped to new K_PPAREN[LR] -+ */ -+ -+static u_short ataplain_map[NR_KEYS] __initdata = { -+ 0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, -+ 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf008, 0xf009, -+ 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69, -+ 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73, -+ 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b, -+ 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76, -+ 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf200, -+ 0xf703, 0xf020, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, -+ 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf200, 0xf200, 0xf114, -+ 0xf603, 0xf200, 0xf30b, 0xf601, 0xf200, 0xf602, 0xf30a, 0xf200, -+ 0xf600, 0xf200, 0xf115, 0xf07f, 0xf200, 0xf200, 0xf200, 0xf200, -+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, -+ 0xf200, 0xf1ff, 0xf11b, 0xf312, 0xf313, 0xf30d, 0xf30c, 0xf307, -+ 0xf308, 0xf309, 0xf304, 0xf305, 0xf306, 0xf301, 0xf302, 0xf303, -+ 0xf300, 0xf310, 0xf30e, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, -+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200 -+}; -+ -+typedef enum kb_state_t { -+ KEYBOARD, AMOUSE, RMOUSE, JOYSTICK, CLOCK, RESYNC -+} KB_STATE_T; -+ -+#define IS_SYNC_CODE(sc) ((sc) >= 0x04 && (sc) <= 0xfb) -+ -+typedef struct keyboard_state { -+ unsigned char buf[6]; -+ int len; -+ KB_STATE_T state; -+} KEYBOARD_STATE; -+ -+KEYBOARD_STATE kb_state; -+ -+#define DEFAULT_KEYB_REP_DELAY (HZ/4) -+#define DEFAULT_KEYB_REP_RATE (HZ/25) -+ -+/* These could be settable by some ioctl() in future... */ -+static unsigned int key_repeat_delay = DEFAULT_KEYB_REP_DELAY; -+static unsigned int key_repeat_rate = DEFAULT_KEYB_REP_RATE; -+ -+static unsigned char rep_scancode; -+static struct timer_list atakeyb_rep_timer = { -+ .function = atakeyb_rep, -+}; -+ -+static void atakeyb_rep(unsigned long ignore) -+{ -+ /* Disable keyboard for the time we call handle_scancode(), else a race -+ * in the keyboard tty queue may happen */ -+ atari_disable_irq(IRQ_MFP_ACIA); -+ del_timer(&atakeyb_rep_timer); -+ -+ /* A keyboard int may have come in before we disabled the irq, so -+ * double-check whether rep_scancode is still != 0 */ -+ if (rep_scancode) { -+ init_timer(&atakeyb_rep_timer); -+ atakeyb_rep_timer.expires = jiffies + key_repeat_rate; -+ add_timer(&atakeyb_rep_timer); -+ -+ //handle_scancode(rep_scancode, 1); -+ if (atari_input_keyboard_interrupt_hook) -+ atari_input_keyboard_interrupt_hook(rep_scancode, 1); -+ } -+ -+ atari_enable_irq(IRQ_MFP_ACIA); -+} -+ -+ -+/* ++roman: If a keyboard overrun happened, we can't tell in general how much -+ * bytes have been lost and in which state of the packet structure we are now. -+ * This usually causes keyboards bytes to be interpreted as mouse movements -+ * and vice versa, which is very annoying. It seems better to throw away some -+ * bytes (that are usually mouse bytes) than to misinterpret them. Therefor I -+ * introduced the RESYNC state for IKBD data. In this state, the bytes up to -+ * one that really looks like a key event (0x04..0xf2) or the start of a mouse -+ * packet (0xf8..0xfb) are thrown away, but at most 2 bytes. This at least -+ * speeds up the resynchronization of the event structure, even if maybe a -+ * mouse movement is lost. However, nothing is perfect. For bytes 0x01..0x03, -+ * it's really hard to decide whether they're mouse or keyboard bytes. Since -+ * overruns usually occur when moving the Atari mouse rapidly, they're seen as -+ * mouse bytes here. If this is wrong, only a make code of the keyboard gets -+ * lost, which isn't too bad. Loosing a break code would be disastrous, -+ * because then the keyboard repeat strikes... -+ */ -+ -+static irqreturn_t atari_keyboard_interrupt(int irq, void *dummy) -+{ -+ u_char acia_stat; -+ int scancode; -+ int break_flag; -+ -+repeat: -+ if (acia.mid_ctrl & ACIA_IRQ) -+ if (atari_MIDI_interrupt_hook) -+ atari_MIDI_interrupt_hook(); -+ acia_stat = acia.key_ctrl; -+ /* check out if the interrupt came from this ACIA */ -+ if (!((acia_stat | acia.mid_ctrl) & ACIA_IRQ)) -+ return IRQ_HANDLED; -+ -+ if (acia_stat & ACIA_OVRN) { -+ /* a very fast typist or a slow system, give a warning */ -+ /* ...happens often if interrupts were disabled for too long */ -+ printk(KERN_DEBUG "Keyboard overrun\n"); -+ scancode = acia.key_data; -+ /* Turn off autorepeating in case a break code has been lost */ -+ del_timer(&atakeyb_rep_timer); -+ rep_scancode = 0; -+ if (ikbd_self_test) -+ /* During self test, don't do resyncing, just process the code */ -+ goto interpret_scancode; -+ else if (IS_SYNC_CODE(scancode)) { -+ /* This code seem already to be the start of a new packet or a -+ * single scancode */ -+ kb_state.state = KEYBOARD; -+ goto interpret_scancode; -+ } else { -+ /* Go to RESYNC state and skip this byte */ -+ kb_state.state = RESYNC; -+ kb_state.len = 1; /* skip max. 1 another byte */ -+ goto repeat; -+ } -+ } -+ -+ if (acia_stat & ACIA_RDRF) { -+ /* received a character */ -+ scancode = acia.key_data; /* get it or reset the ACIA, I'll get it! */ -+ tasklet_schedule(&keyboard_tasklet); -+ interpret_scancode: -+ switch (kb_state.state) { -+ case KEYBOARD: -+ switch (scancode) { -+ case 0xF7: -+ kb_state.state = AMOUSE; -+ kb_state.len = 0; -+ break; -+ -+ case 0xF8: -+ case 0xF9: -+ case 0xFA: -+ case 0xFB: -+ kb_state.state = RMOUSE; -+ kb_state.len = 1; -+ kb_state.buf[0] = scancode; -+ break; -+ -+ case 0xFC: -+ kb_state.state = CLOCK; -+ kb_state.len = 0; -+ break; -+ -+ case 0xFE: -+ case 0xFF: -+ kb_state.state = JOYSTICK; -+ kb_state.len = 1; -+ kb_state.buf[0] = scancode; -+ break; -+ -+ case 0xF1: -+ /* during self-test, note that 0xf1 received */ -+ if (ikbd_self_test) { -+ ++ikbd_self_test; -+ self_test_last_rcv = jiffies; -+ break; -+ } -+ /* FALL THROUGH */ -+ -+ default: -+ break_flag = scancode & BREAK_MASK; -+ scancode &= ~BREAK_MASK; -+ if (ikbd_self_test) { -+ /* Scancodes sent during the self-test stand for broken -+ * keys (keys being down). The code *should* be a break -+ * code, but nevertheless some AT keyboard interfaces send -+ * make codes instead. Therefore, simply ignore -+ * break_flag... -+ */ -+ int keyval = plain_map[scancode], keytyp; -+ -+ set_bit(scancode, broken_keys); -+ self_test_last_rcv = jiffies; -+ keyval = plain_map[scancode]; -+ keytyp = KTYP(keyval) - 0xf0; -+ keyval = KVAL(keyval); -+ -+ printk(KERN_WARNING "Key with scancode %d ", scancode); -+ if (keytyp == KT_LATIN || keytyp == KT_LETTER) { -+ if (keyval < ' ') -+ printk("('^%c') ", keyval + '@'); -+ else -+ printk("('%c') ", keyval); -+ } -+ printk("is broken -- will be ignored.\n"); -+ break; -+ } else if (test_bit(scancode, broken_keys)) -+ break; -+ -+#if 0 // FIXME; hangs at boot -+ if (break_flag) { -+ del_timer(&atakeyb_rep_timer); -+ rep_scancode = 0; -+ } else { -+ del_timer(&atakeyb_rep_timer); -+ rep_scancode = scancode; -+ atakeyb_rep_timer.expires = jiffies + key_repeat_delay; -+ add_timer(&atakeyb_rep_timer); -+ } -+#endif -+ -+ // handle_scancode(scancode, !break_flag); -+ if (atari_input_keyboard_interrupt_hook) -+ atari_input_keyboard_interrupt_hook((unsigned char)scancode, !break_flag); -+ break; -+ } -+ break; -+ -+ case AMOUSE: -+ kb_state.buf[kb_state.len++] = scancode; -+ if (kb_state.len == 5) { -+ kb_state.state = KEYBOARD; -+ /* not yet used */ -+ /* wake up someone waiting for this */ -+ } -+ break; -+ -+ case RMOUSE: -+ kb_state.buf[kb_state.len++] = scancode; -+ if (kb_state.len == 3) { -+ kb_state.state = KEYBOARD; -+ if (atari_mouse_interrupt_hook) -+ atari_mouse_interrupt_hook(kb_state.buf); -+ } -+ break; -+ -+ case JOYSTICK: -+ kb_state.buf[1] = scancode; -+ kb_state.state = KEYBOARD; -+#ifdef FIXED_ATARI_JOYSTICK -+ atari_joystick_interrupt(kb_state.buf); -+#endif -+ break; -+ -+ case CLOCK: -+ kb_state.buf[kb_state.len++] = scancode; -+ if (kb_state.len == 6) { -+ kb_state.state = KEYBOARD; -+ /* wake up someone waiting for this. -+ But will this ever be used, as Linux keeps its own time. -+ Perhaps for synchronization purposes? */ -+ /* wake_up_interruptible(&clock_wait); */ -+ } -+ break; -+ -+ case RESYNC: -+ if (kb_state.len <= 0 || IS_SYNC_CODE(scancode)) { -+ kb_state.state = KEYBOARD; -+ goto interpret_scancode; -+ } -+ kb_state.len--; -+ break; -+ } -+ } -+ -+#if 0 -+ if (acia_stat & ACIA_CTS) -+ /* cannot happen */; -+#endif -+ -+ if (acia_stat & (ACIA_FE | ACIA_PE)) { -+ printk("Error in keyboard communication\n"); -+ } -+ -+ /* handle_scancode() can take a lot of time, so check again if -+ * some character arrived -+ */ -+ goto repeat; -+} -+ -+/* -+ * I write to the keyboard without using interrupts, I poll instead. -+ * This takes for the maximum length string allowed (7) at 7812.5 baud -+ * 8 data 1 start 1 stop bit: 9.0 ms -+ * If this takes too long for normal operation, interrupt driven writing -+ * is the solution. (I made a feeble attempt in that direction but I -+ * kept it simple for now.) -+ */ -+void ikbd_write(const char *str, int len) -+{ -+ u_char acia_stat; -+ -+ if ((len < 1) || (len > 7)) -+ panic("ikbd: maximum string length exceeded"); -+ while (len) { -+ acia_stat = acia.key_ctrl; -+ if (acia_stat & ACIA_TDRE) { -+ acia.key_data = *str++; -+ len--; -+ } -+ } -+} -+ -+/* Reset (without touching the clock) */ -+void ikbd_reset(void) -+{ -+ static const char cmd[2] = { 0x80, 0x01 }; -+ -+ ikbd_write(cmd, 2); -+ -+ /* -+ * if all's well code 0xF1 is returned, else the break codes of -+ * all keys making contact -+ */ -+} -+ -+/* Set mouse button action */ -+void ikbd_mouse_button_action(int mode) -+{ -+ char cmd[2] = { 0x07, mode }; -+ -+ ikbd_write(cmd, 2); -+} -+ -+/* Set relative mouse position reporting */ -+void ikbd_mouse_rel_pos(void) -+{ -+ static const char cmd[1] = { 0x08 }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Set absolute mouse position reporting */ -+void ikbd_mouse_abs_pos(int xmax, int ymax) -+{ -+ char cmd[5] = { 0x09, xmax>>8, xmax&0xFF, ymax>>8, ymax&0xFF }; -+ -+ ikbd_write(cmd, 5); -+} -+ -+/* Set mouse keycode mode */ -+void ikbd_mouse_kbd_mode(int dx, int dy) -+{ -+ char cmd[3] = { 0x0A, dx, dy }; -+ -+ ikbd_write(cmd, 3); -+} -+ -+/* Set mouse threshold */ -+void ikbd_mouse_thresh(int x, int y) -+{ -+ char cmd[3] = { 0x0B, x, y }; -+ -+ ikbd_write(cmd, 3); -+} -+ -+/* Set mouse scale */ -+void ikbd_mouse_scale(int x, int y) -+{ -+ char cmd[3] = { 0x0C, x, y }; -+ -+ ikbd_write(cmd, 3); -+} -+ -+/* Interrogate mouse position */ -+void ikbd_mouse_pos_get(int *x, int *y) -+{ -+ static const char cmd[1] = { 0x0D }; -+ -+ ikbd_write(cmd, 1); -+ -+ /* wait for returning bytes */ -+} -+ -+/* Load mouse position */ -+void ikbd_mouse_pos_set(int x, int y) -+{ -+ char cmd[6] = { 0x0E, 0x00, x>>8, x&0xFF, y>>8, y&0xFF }; -+ -+ ikbd_write(cmd, 6); -+} -+ -+/* Set Y=0 at bottom */ -+void ikbd_mouse_y0_bot(void) -+{ -+ static const char cmd[1] = { 0x0F }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Set Y=0 at top */ -+void ikbd_mouse_y0_top(void) -+{ -+ static const char cmd[1] = { 0x10 }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Resume */ -+void ikbd_resume(void) -+{ -+ static const char cmd[1] = { 0x11 }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Disable mouse */ -+void ikbd_mouse_disable(void) -+{ -+ static const char cmd[1] = { 0x12 }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Pause output */ -+void ikbd_pause(void) -+{ -+ static const char cmd[1] = { 0x13 }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Set joystick event reporting */ -+void ikbd_joystick_event_on(void) -+{ -+ static const char cmd[1] = { 0x14 }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Set joystick interrogation mode */ -+void ikbd_joystick_event_off(void) -+{ -+ static const char cmd[1] = { 0x15 }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Joystick interrogation */ -+void ikbd_joystick_get_state(void) -+{ -+ static const char cmd[1] = { 0x16 }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+#if 0 -+/* This disables all other ikbd activities !!!! */ -+/* Set joystick monitoring */ -+void ikbd_joystick_monitor(int rate) -+{ -+ static const char cmd[2] = { 0x17, rate }; -+ -+ ikbd_write(cmd, 2); -+ -+ kb_state.state = JOYSTICK_MONITOR; -+} -+#endif -+ -+/* some joystick routines not in yet (0x18-0x19) */ -+ -+/* Disable joysticks */ -+void ikbd_joystick_disable(void) -+{ -+ static const char cmd[1] = { 0x1A }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Time-of-day clock set */ -+void ikbd_clock_set(int year, int month, int day, int hour, int minute, int second) -+{ -+ char cmd[7] = { 0x1B, year, month, day, hour, minute, second }; -+ -+ ikbd_write(cmd, 7); -+} -+ -+/* Interrogate time-of-day clock */ -+void ikbd_clock_get(int *year, int *month, int *day, int *hour, int *minute, int second) -+{ -+ static const char cmd[1] = { 0x1C }; -+ -+ ikbd_write(cmd, 1); -+} -+ -+/* Memory load */ -+void ikbd_mem_write(int address, int size, char *data) -+{ -+ panic("Attempt to write data into keyboard memory"); -+} -+ -+/* Memory read */ -+void ikbd_mem_read(int address, char data[6]) -+{ -+ char cmd[3] = { 0x21, address>>8, address&0xFF }; -+ -+ ikbd_write(cmd, 3); -+ -+ /* receive data and put it in data */ -+} -+ -+/* Controller execute */ -+void ikbd_exec(int address) -+{ -+ char cmd[3] = { 0x22, address>>8, address&0xFF }; -+ -+ ikbd_write(cmd, 3); -+} -+ -+/* Status inquiries (0x87-0x9A) not yet implemented */ -+ -+/* Set the state of the caps lock led. */ -+void atari_kbd_leds(unsigned int leds) -+{ -+ char cmd[6] = {32, 0, 4, 1, 254 + ((leds & 4) != 0), 0}; -+ -+ ikbd_write(cmd, 6); -+} -+ -+/* -+ * The original code sometimes left the interrupt line of -+ * the ACIAs low forever. I hope, it is fixed now. -+ * -+ * Martin Rogge, 20 Aug 1995 -+ */ -+ -+static int atari_keyb_done = 0; -+ -+int __init atari_keyb_init(void) -+{ -+ if (atari_keyb_done) -+ return 0; -+ -+ /* setup key map */ -+ memcpy(key_maps[0], ataplain_map, sizeof(plain_map)); -+ -+ kb_state.state = KEYBOARD; -+ kb_state.len = 0; -+ -+ request_irq(IRQ_MFP_ACIA, atari_keyboard_interrupt, IRQ_TYPE_SLOW, -+ "keyboard/mouse/MIDI", atari_keyboard_interrupt); -+ -+ atari_turnoff_irq(IRQ_MFP_ACIA); -+ do { -+ /* reset IKBD ACIA */ -+ acia.key_ctrl = ACIA_RESET | -+ (atari_switches & ATARI_SWITCH_IKBD) ? ACIA_RHTID : 0; -+ (void)acia.key_ctrl; -+ (void)acia.key_data; -+ -+ /* reset MIDI ACIA */ -+ acia.mid_ctrl = ACIA_RESET | -+ (atari_switches & ATARI_SWITCH_MIDI) ? ACIA_RHTID : 0; -+ (void)acia.mid_ctrl; -+ (void)acia.mid_data; -+ -+ /* divide 500kHz by 64 gives 7812.5 baud */ -+ /* 8 data no parity 1 start 1 stop bit */ -+ /* receive interrupt enabled */ -+ /* RTS low (except if switch selected), transmit interrupt disabled */ -+ acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RIE) | -+ ((atari_switches & ATARI_SWITCH_IKBD) ? -+ ACIA_RHTID : ACIA_RLTID); -+ -+ acia.mid_ctrl = ACIA_DIV16 | ACIA_D8N1S | -+ (atari_switches & ATARI_SWITCH_MIDI) ? ACIA_RHTID : 0; -+ -+ /* make sure the interrupt line is up */ -+ } while ((mfp.par_dt_reg & 0x10) == 0); -+ -+ /* enable ACIA Interrupts */ -+ mfp.active_edge &= ~0x10; -+ atari_turnon_irq(IRQ_MFP_ACIA); -+ -+ ikbd_self_test = 1; -+ ikbd_reset(); -+ /* wait for a period of inactivity (here: 0.25s), then assume the IKBD's -+ * self-test is finished */ -+ self_test_last_rcv = jiffies; -+ while (time_before(jiffies, self_test_last_rcv + HZ/4)) -+ barrier(); -+ /* if not incremented: no 0xf1 received */ -+ if (ikbd_self_test == 1) -+ printk(KERN_ERR "WARNING: keyboard self test failed!\n"); -+ ikbd_self_test = 0; -+ -+ ikbd_mouse_disable(); -+ ikbd_joystick_disable(); -+ -+#ifdef FIXED_ATARI_JOYSTICK -+ atari_joystick_init(); -+#endif -+ -+ // flag init done -+ atari_keyb_done = 1; -+ return 0; -+} -+ -+ -+int atari_kbdrate(struct kbd_repeat *k) -+{ -+ if (k->delay > 0) { -+ /* convert from msec to jiffies */ -+ key_repeat_delay = (k->delay * HZ + 500) / 1000; -+ if (key_repeat_delay < 1) -+ key_repeat_delay = 1; -+ } -+ if (k->period > 0) { -+ key_repeat_rate = (k->period * HZ + 500) / 1000; -+ if (key_repeat_rate < 1) -+ key_repeat_rate = 1; -+ } -+ -+ k->delay = key_repeat_delay * 1000 / HZ; -+ k->period = key_repeat_rate * 1000 / HZ; -+ -+ return 0; -+} -+ -+int atari_kbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode) -+{ -+#ifdef CONFIG_MAGIC_SYSRQ -+ /* ALT+HELP pressed? */ -+ if ((keycode == 98) && ((shift_state & 0xff) == 8)) -+ *keycodep = 0xff; -+ else -+#endif -+ *keycodep = keycode; -+ return 1; -+} ---- linux-m68k-2.6.21.orig/drivers/input/keyboard/Kconfig -+++ linux-m68k-2.6.21/drivers/input/keyboard/Kconfig -@@ -164,6 +164,17 @@ config KEYBOARD_AMIGA - To compile this driver as a module, choose M here: the - module will be called amikbd. - -+config KEYBOARD_ATARI -+ tristate "Atari keyboard" -+ depends on ATARI -+ select ATARI_KBD_CORE -+ help -+ Say Y here if you are running Linux on any Atari and have a keyboard -+ attached. -+ -+ To compile this driver as a module, choose M here: the -+ module will be called atakbd. -+ - config KEYBOARD_HIL_OLD - tristate "HP HIL keyboard support (simple driver)" - depends on GSC || HP300 ---- linux-m68k-2.6.21.orig/drivers/input/keyboard/Makefile -+++ linux-m68k-2.6.21/drivers/input/keyboard/Makefile -@@ -9,6 +9,7 @@ obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd - obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o - obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o - obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o -+obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o - obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o - obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o - obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o ---- /dev/null -+++ linux-m68k-2.6.21/drivers/input/keyboard/atakbd.c -@@ -0,0 +1,134 @@ -+/* -+ * atakbd.c -+ * -+ * Copyright (c) 2005 Michael Schmitz -+ * -+ * Based on amikbd.c, which is -+ * -+ * Copyright (c) 2000-2001 Vojtech Pavlik -+ * -+ * Based on the work of: -+ * Hamish Macdonald -+ */ -+ -+/* -+ * Atari keyboard driver for Linux/m68k -+ * -+ * The low level init and interrupt stuff is handled in arch/mm68k/atari/atakeyb.c -+ * (the keyboard ACIA also handles the mouse and joystick data, and the keyboard -+ * interrupt is shared with the MIDI ACIA so MIDI data also get handled there). -+ * This driver only deals with handing key events off to the input layer. -+ */ -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Should you need to contact me, the author, you can do so either by -+ * e-mail - mail your message to , or by paper mail: -+ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+MODULE_AUTHOR("Michael Schmitz "); -+MODULE_DESCRIPTION("Atari keyboard driver"); -+MODULE_LICENSE("GPL"); -+ -+static unsigned char atakbd_keycode[0x72]; -+ -+static struct input_dev *atakbd_dev; -+ -+static void atakbd_interrupt(unsigned char scancode, char down) -+{ -+ -+ if (scancode < 0x72) { /* scancodes < 0xf2 are keys */ -+ -+ // report raw events here? -+ -+ scancode = atakbd_keycode[scancode]; -+ -+ if (scancode == KEY_CAPSLOCK) { /* CapsLock is a toggle switch key on Amiga */ -+ input_report_key(atakbd_dev, scancode, 1); -+ input_report_key(atakbd_dev, scancode, 0); -+ input_sync(atakbd_dev); -+ } else { -+ input_report_key(atakbd_dev, scancode, down); -+ input_sync(atakbd_dev); -+ } -+ } else /* scancodes >= 0xf2 are mouse data, most likely */ -+ printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode); -+ -+ return; -+} -+ -+static int __init atakbd_init(void) -+{ -+ int i; -+ -+ if (!ATARIHW_PRESENT(ST_MFP)) -+ return -EIO; -+ -+ // TODO: request_mem_region if not done in arch code -+ -+ if (!(atakbd_dev = input_allocate_device())) -+ return -ENOMEM; -+ -+ // need to init core driver if not already done so -+ if (atari_keyb_init()) -+ return -ENODEV; -+ -+ atakbd_dev->name = "Atari Keyboard"; -+ atakbd_dev->phys = "atakbd/input0"; -+ atakbd_dev->id.bustype = BUS_ATARI; -+ atakbd_dev->id.vendor = 0x0001; -+ atakbd_dev->id.product = 0x0001; -+ atakbd_dev->id.version = 0x0100; -+ -+ atakbd_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); -+ atakbd_dev->keycode = atakbd_keycode; -+ atakbd_dev->keycodesize = sizeof(unsigned char); -+ atakbd_dev->keycodemax = ARRAY_SIZE(atakbd_keycode); -+ -+ for (i = 1; i < 0x72; i++) { -+ atakbd_keycode[i] = i; -+ set_bit(atakbd_keycode[i], atakbd_dev->keybit); -+ } -+ -+ input_register_device(atakbd_dev); -+ -+ atari_input_keyboard_interrupt_hook = atakbd_interrupt; -+ -+ printk(KERN_INFO "input: %s at IKBD ACIA\n", atakbd_dev->name); -+ -+ return 0; -+} -+ -+static void __exit atakbd_exit(void) -+{ -+ atari_input_keyboard_interrupt_hook = NULL; -+ input_unregister_device(atakbd_dev); -+} -+ -+module_init(atakbd_init); -+module_exit(atakbd_exit); ---- linux-m68k-2.6.21.orig/drivers/input/mouse/Kconfig -+++ linux-m68k-2.6.21/drivers/input/mouse/Kconfig -@@ -96,6 +96,17 @@ config MOUSE_AMIGA - To compile this driver as a module, choose M here: the - module will be called amimouse. - -+config MOUSE_ATARI -+ tristate "Atari mouse" -+ depends on ATARI -+ select ATARI_KBD_CORE -+ help -+ Say Y here if you have an Atari and want its native mouse -+ supported by the kernel. -+ -+ To compile this driver as a module, choose M here: the -+ module will be called atarimouse. -+ - config MOUSE_RISCPC - tristate "Acorn RiscPC mouse" - depends on ARCH_ACORN ---- linux-m68k-2.6.21.orig/drivers/input/mouse/Makefile -+++ linux-m68k-2.6.21/drivers/input/mouse/Makefile -@@ -5,6 +5,7 @@ - # Each configuration option enables a list of files. - - obj-$(CONFIG_MOUSE_AMIGA) += amimouse.o -+obj-$(CONFIG_MOUSE_ATARI) += atarimouse.o - obj-$(CONFIG_MOUSE_RISCPC) += rpcmouse.o - obj-$(CONFIG_MOUSE_INPORT) += inport.o - obj-$(CONFIG_MOUSE_LOGIBM) += logibm.o ---- /dev/null -+++ linux-m68k-2.6.21/drivers/input/mouse/atarimouse.c -@@ -0,0 +1,160 @@ -+/* -+ * Atari mouse driver for Linux/m68k -+ * -+ * Copyright (c) 2005 Michael Schmitz -+ * -+ * Based on: -+ * Amiga mouse driver for Linux/m68k -+ * -+ * Copyright (c) 2000-2002 Vojtech Pavlik -+ * -+ */ -+/* -+ * The low level init and interrupt stuff is handled in arch/mm68k/atari/atakeyb.c -+ * (the keyboard ACIA also handles the mouse and joystick data, and the keyboard -+ * interrupt is shared with the MIDI ACIA so MIDI data also get handled there). -+ * This driver only deals with handing key events off to the input layer. -+ * -+ * Largely based on the old: -+ * -+ * Atari Mouse Driver for Linux -+ * by Robert de Vries (robert@and.nl) 19Jul93 -+ * -+ * 16 Nov 1994 Andreas Schwab -+ * Compatibility with busmouse -+ * Support for three button mouse (shamelessly stolen from MiNT) -+ * third button wired to one of the joystick directions on joystick 1 -+ * -+ * 1996/02/11 Andreas Schwab -+ * Module support -+ * Allow multiple open's -+ * -+ * Converted to use new generic busmouse code. 5 Apr 1998 -+ * Russell King -+ */ -+ -+ -+/* -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 as published by -+ * the Free Software Foundation -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+MODULE_AUTHOR("Michael Schmitz "); -+MODULE_DESCRIPTION("Atari mouse driver"); -+MODULE_LICENSE("GPL"); -+ -+static int mouse_threshold[2] = {2,2}; -+ -+#ifdef __MODULE__ -+MODULE_PARM(mouse_threshold, "2i"); -+#endif -+#ifdef FIXED_ATARI_JOYSTICK -+extern int atari_mouse_buttons; -+#endif -+static int atamouse_used = 0; -+ -+static struct input_dev *atamouse_dev; -+ -+static void atamouse_interrupt(char *buf) -+{ -+ int buttons, dx, dy; -+ -+/* ikbd_mouse_disable(); */ -+ -+ buttons = (buf[0] & 1) | ((buf[0] & 2) << 1); -+#ifdef FIXED_ATARI_JOYSTICK -+ buttons |= atari_mouse_buttons & 2; -+ atari_mouse_buttons = buttons; -+#endif -+/* ikbd_mouse_rel_pos(); */ -+ -+ /* only relative events get here */ -+ dx = buf[1]; -+ dy = -buf[2]; -+ -+ input_report_rel(atamouse_dev, REL_X, dx); -+ input_report_rel(atamouse_dev, REL_Y, dy); -+ -+ input_report_key(atamouse_dev, BTN_LEFT, buttons & 0x1); -+ input_report_key(atamouse_dev, BTN_MIDDLE, buttons & 0x2); -+ input_report_key(atamouse_dev, BTN_RIGHT, buttons & 0x4); -+ -+ input_sync(atamouse_dev); -+ -+ return; -+} -+ -+static int atamouse_open(struct input_dev *dev) -+{ -+ if (atamouse_used++) -+ return 0; -+ -+#ifdef FIXED_ATARI_JOYSTICK -+ atari_mouse_buttons = 0; -+#endif -+ ikbd_mouse_y0_top(); -+ ikbd_mouse_thresh(mouse_threshold[0], mouse_threshold[1]); -+ ikbd_mouse_rel_pos(); -+ atari_input_mouse_interrupt_hook = atamouse_interrupt; -+ return 0; -+} -+ -+static void atamouse_close(struct input_dev *dev) -+{ -+ if (!--atamouse_used) { -+ ikbd_mouse_disable(); -+ atari_mouse_interrupt_hook = NULL; -+ } -+} -+ -+static int __init atamouse_init(void) -+{ -+ if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP)) -+ return -ENODEV; -+ -+ if (!(atamouse_dev = input_allocate_device())) -+ return -ENOMEM; -+ -+ if (!(atari_keyb_init())) -+ return -ENODEV; -+ -+ atamouse_dev->name = "Atari mouse"; -+ atamouse_dev->phys = "atamouse/input0"; -+ atamouse_dev->id.bustype = BUS_ATARI; -+ atamouse_dev->id.vendor = 0x0001; -+ atamouse_dev->id.product = 0x0002; -+ atamouse_dev->id.version = 0x0100; -+ -+ atamouse_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); -+ atamouse_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); -+ atamouse_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); -+ atamouse_dev->open = atamouse_open; -+ atamouse_dev->close = atamouse_close; -+ -+ input_register_device(atamouse_dev); -+ -+ printk(KERN_INFO "input: %s at keyboard ACIA\n", atamouse_dev->name); -+ return 0; -+} -+ -+static void __exit atamouse_exit(void) -+{ -+ input_unregister_device(atamouse_dev); -+} -+ -+module_init(atamouse_init); -+module_exit(atamouse_exit); ---- linux-m68k-2.6.21.orig/include/asm-m68k/atarikb.h -+++ linux-m68k-2.6.21/include/asm-m68k/atarikb.h -@@ -36,5 +36,11 @@ void ikbd_joystick_disable(void); - extern void (*atari_MIDI_interrupt_hook) (void); - /* Hook for mouse driver */ - extern void (*atari_mouse_interrupt_hook) (char *); -+/* Hook for keyboard inputdev driver */ -+extern void (*atari_input_keyboard_interrupt_hook) (unsigned char, char); -+/* Hook for mouse inputdev driver */ -+extern void (*atari_input_mouse_interrupt_hook) (char *); -+ -+int atari_keyb_init(void); - - #endif /* _LINUX_ATARIKB_H */ ---- linux-m68k-2.6.21.orig/include/linux/input.h -+++ linux-m68k-2.6.21/include/linux/input.h -@@ -676,6 +676,7 @@ struct input_absinfo { - #define BUS_I2C 0x18 - #define BUS_HOST 0x19 - #define BUS_GSC 0x1A -+#define BUS_ATARI 0x1B - - /* - * Values describing the status of a force-feedback effect diff --git a/debian/patches/bugfix/m68k/636-atafb.diff b/debian/patches/bugfix/m68k/636-atafb.diff deleted file mode 100644 index da79fd9df..000000000 --- a/debian/patches/bugfix/m68k/636-atafb.diff +++ /dev/null @@ -1,5530 +0,0 @@ -Cc: Antonino Daplas , - James Simmons , - linux-fbdev-devel@lists.sourceforge.net -Subject: [PATCH] m68k: Atari fb revival - -From: Michael Schmitz - -Update the atari fb to 2.6 by Michael Schmitz, -Reformatting and rewrite of bit plane functions by Roman Zippel, -A few more fixes by Geert Uytterhoeven. - -Signed-off-by: Michael Schmitz -Signed-off-by: Roman Zippel -Signed-off-by: Geert Uytterhoeven ---- - drivers/video/Kconfig | 5 - drivers/video/Makefile | 3 - drivers/video/atafb.c | 2799 +++++++++++++++++++++-------------------- - drivers/video/atafb.h | 36 - drivers/video/atafb_iplan2p2.c | 293 ++++ - drivers/video/atafb_iplan2p4.c | 308 ++++ - drivers/video/atafb_iplan2p8.c | 345 +++++ - drivers/video/atafb_mfb.c | 112 + - drivers/video/atafb_utils.h | 400 +++++ - 9 files changed, 2986 insertions(+), 1315 deletions(-) - ---- linux-m68k-2.6.21.orig/drivers/video/Kconfig -+++ linux-m68k-2.6.21/drivers/video/Kconfig -@@ -389,7 +389,10 @@ config FB_ARC - - config FB_ATARI - bool "Atari native chipset support" -- depends on (FB = y) && ATARI && BROKEN -+ depends on (FB = y) && ATARI -+ select FB_CFB_FILLRECT -+ select FB_CFB_COPYAREA -+ select FB_CFB_IMAGEBLIT - help - This is the frame buffer device driver for the builtin graphics - chipset found in Ataris. ---- linux-m68k-2.6.21.orig/drivers/video/Makefile -+++ linux-m68k-2.6.21/drivers/video/Makefile -@@ -63,7 +63,8 @@ obj-$(CONFIG_FB_TCX) += tcx - obj-$(CONFIG_FB_LEO) += leo.o sbuslib.o - obj-$(CONFIG_FB_SGIVW) += sgivwfb.o - obj-$(CONFIG_FB_ACORN) += acornfb.o --obj-$(CONFIG_FB_ATARI) += atafb.o -+obj-$(CONFIG_FB_ATARI) += atafb.o c2p.o atafb_mfb.o \ -+ atafb_iplan2p2.o atafb_iplan2p4.o atafb_iplan2p8.o - obj-$(CONFIG_FB_MAC) += macfb.o - obj-$(CONFIG_FB_HGA) += hgafb.o - obj-$(CONFIG_FB_IGA) += igafb.o ---- linux-m68k-2.6.21.orig/drivers/video/atafb.c -+++ linux-m68k-2.6.21/drivers/video/atafb.c -@@ -2,7 +2,7 @@ - * linux/drivers/video/atafb.c -- Atari builtin chipset frame buffer device - * - * Copyright (C) 1994 Martin Schaller & Roman Hodek -- * -+ * - * 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. -@@ -70,14 +70,8 @@ - #include - #include - --#include