[kernel] r12310 - in dists/sid/linux-2.6/debian/patches: bugfix/m68k/2.6.26 series

Stephen Marenka smarenka at alioth.debian.org
Tue Oct 14 19:00:40 UTC 2008


Author: smarenka
Date: Tue Oct 14 19:00:38 2008
New Revision: 12310

Log:
more m68k/mac patches

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/fbcon-remove-broken-mac-vbl-handler.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-baboon-interrupt-enable-disable.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-macfb-do-not-overflow-fix-id.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-reinstate-rtc.diff
Modified:
   dists/sid/linux-2.6/debian/patches/series/1-extra

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/fbcon-remove-broken-mac-vbl-handler.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/fbcon-remove-broken-mac-vbl-handler.diff	Tue Oct 14 19:00:38 2008
@@ -0,0 +1,148 @@
+From fthain at telegraphics.com.au Tue Oct  7 14:05:42 2008
+Date: Tue, 7 Oct 2008 22:58:17 +1100 (EST)
+From: Finn Thain <fthain at telegraphics.com.au>
+To: Geert Uytterhoeven <geert at linux-m68k.org>
+Cc: linux-m68k at vger.kernel.org
+Subject: [PATCH] fbcon: remove broken mac vbl handler
+
+
+Remove the Mac VBL interrupt code as it doesn't work properly and
+doesn't bring any benefit when fixed. Also remove unused
+DEFAULT_CURSOR_BLINK_RATE macro and irqres variable.
+
+Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
+
+---
+ drivers/video/console/fbcon.c |   75 +-----------------------------------------
+ 1 file changed, 3 insertions(+), 72 deletions(-)
+
+--- a/drivers/video/console/fbcon.c
++++ b/drivers/video/console/fbcon.c
+@@ -81,9 +81,6 @@
+ #ifdef CONFIG_ATARI
+ #include <asm/atariints.h>
+ #endif
+-#ifdef CONFIG_MAC
+-#include <asm/macints.h>
+-#endif
+ #if defined(__mc68000__)
+ #include <asm/machdep.h>
+ #include <asm/setup.h>
+@@ -160,8 +157,6 @@ static int fbcon_set_origin(struct vc_da
+ 
+ /* # VBL ints between cursor state changes */
+ #define ATARI_CURSOR_BLINK_RATE		(42)
+-#define MAC_CURSOR_BLINK_RATE		(32)
+-#define DEFAULT_CURSOR_BLINK_RATE	(20)
+ 
+ static int vbl_cursor_cnt;
+ static int fbcon_cursor_noblink;
+@@ -210,19 +205,6 @@ static void fbcon_start(void);
+ static void fbcon_exit(void);
+ static struct device *fbcon_device;
+ 
+-#ifdef CONFIG_MAC
+-/*
+- * On the Macintoy, there may or may not be a working VBL int. We need to probe
+- */
+-static int vbl_detected;
+-
+-static irqreturn_t fb_vbl_detect(int irq, void *dummy)
+-{
+-	vbl_detected++;
+-	return IRQ_HANDLED;
+-}
+-#endif
+-
+ #ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION
+ static inline void fbcon_set_rotation(struct fb_info *info)
+ {
+@@ -421,7 +403,7 @@ static void fb_flashcursor(struct work_s
+ 	release_console_sem();
+ }
+ 
+-#if defined(CONFIG_ATARI) || defined(CONFIG_MAC)
++#ifdef CONFIG_ATARI
+ static int cursor_blink_rate;
+ static irqreturn_t fb_vbl_handler(int irq, void *dev_id)
+ {
+@@ -949,9 +931,7 @@ static const char *fbcon_startup(void)
+ 	struct fb_info *info = NULL;
+ 	struct fbcon_ops *ops;
+ 	int rows, cols;
+-	int irqres;
+ 
+-	irqres = 1;
+ 	/*
+ 	 *  If num_registered_fb is zero, this is a call for the dummy part.
+ 	 *  The frame buffer devices weren't initialized yet.
+@@ -1040,56 +1020,11 @@ static const char *fbcon_startup(void)
+ #ifdef CONFIG_ATARI
+ 	if (MACH_IS_ATARI) {
+ 		cursor_blink_rate = ATARI_CURSOR_BLINK_RATE;
+-		irqres =
+-		    request_irq(IRQ_AUTO_4, fb_vbl_handler,
++		(void)request_irq(IRQ_AUTO_4, fb_vbl_handler,
+ 				IRQ_TYPE_PRIO, "framebuffer vbl",
+ 				info);
+ 	}
+-#endif				/* CONFIG_ATARI */
+-
+-#ifdef CONFIG_MAC
+-	/*
+-	 * On a Macintoy, the VBL interrupt may or may not be active. 
+-	 * As interrupt based cursor is more reliable and race free, we 
+-	 * probe for VBL interrupts.
+-	 */
+-	if (MACH_IS_MAC) {
+-		int ct = 0;
+-		/*
+-		 * Probe for VBL: set temp. handler ...
+-		 */
+-		irqres = request_irq(IRQ_MAC_VBL, fb_vbl_detect, 0,
+-				     "framebuffer vbl", info);
+-		vbl_detected = 0;
+-
+-		/*
+-		 * ... and spin for 20 ms ...
+-		 */
+-		while (!vbl_detected && ++ct < 1000)
+-			udelay(20);
+-
+-		if (ct == 1000)
+-			printk
+-			    ("fbcon_startup: No VBL detected, using timer based cursor.\n");
+-
+-		free_irq(IRQ_MAC_VBL, fb_vbl_detect);
+-
+-		if (vbl_detected) {
+-			/*
+-			 * interrupt based cursor ok
+-			 */
+-			cursor_blink_rate = MAC_CURSOR_BLINK_RATE;
+-			irqres =
+-			    request_irq(IRQ_MAC_VBL, fb_vbl_handler, 0,
+-					"framebuffer vbl", info);
+-		} else {
+-			/*
+-			 * VBL not detected: fall through, use timer based cursor
+-			 */
+-			irqres = 1;
+-		}
+-	}
+-#endif				/* CONFIG_MAC */
++#endif /* CONFIG_ATARI */
+ 
+ 	fbcon_add_cursor_timer(info);
+ 	fbcon_has_exited = 0;
+@@ -3544,10 +3479,6 @@ static void fbcon_exit(void)
+ #ifdef CONFIG_ATARI
+ 	free_irq(IRQ_AUTO_4, fb_vbl_handler);
+ #endif
+-#ifdef CONFIG_MAC
+-	if (MACH_IS_MAC && vbl_detected)
+-		free_irq(IRQ_MAC_VBL, fb_vbl_handler);
+-#endif
+ 
+ 	kfree((void *)softback_buf);
+ 	softback_buf = 0UL;

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-baboon-interrupt-enable-disable.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-baboon-interrupt-enable-disable.diff	Tue Oct 14 19:00:38 2008
@@ -0,0 +1,134 @@
+From fthain at telegraphics.com.au Mon Oct  6 14:38:39 2008
+Date: Mon, 6 Oct 2008 23:29:50 +1100 (EST)
+From: Finn Thain <fthain at telegraphics.com.au>
+To: Geert Uytterhoeven <geert at linux-m68k.org>
+Cc: linux-m68k at vger.kernel.org
+Subject: [PATCH] mac baboon interrupt enable/disable
+
+
+No-one seems to know how to mask individual baboon interrupts, so we just 
+mask the umbrella IRQ. This will work as long as only the IDE driver uses 
+the baboon chip (it can't deadlock). Use mac_enable_irq/mac_disable_irq 
+rather than enable_irq/disable_irq because the latter routines count the 
+depth of nested calls which triggers a warning and call trace because 
+IRQ_NUBUS_C is enabled twice in a row (once when the baboon handler is 
+registered, and once when the IDE IRQ is registered).
+
+Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
+
+---
+ arch/m68k/mac/baboon.c  |   42 +++++++++++++++++++++++++++++++-----------
+ arch/m68k/mac/macints.c |    8 ++++----
+ 2 files changed, 35 insertions(+), 15 deletions(-)
+
+--- a/arch/m68k/mac/baboon.c
++++ b/arch/m68k/mac/baboon.c
+@@ -18,11 +18,14 @@
+ #include <asm/macints.h>
+ #include <asm/mac_baboon.h>
+ 
+-/* #define DEBUG_BABOON */
+ /* #define DEBUG_IRQS */
+ 
++extern void mac_enable_irq(unsigned int);
++extern void mac_disable_irq(unsigned int);
++
+ int baboon_present;
+ static volatile struct baboon *baboon;
++static unsigned char baboon_disabled;
+ 
+ #if 0
+ extern int macide_ack_intr(struct ata_channel *);
+@@ -88,34 +91,51 @@ static irqreturn_t baboon_irq(int irq, v
+ 
+ void __init baboon_register_interrupts(void)
+ {
+-	request_irq(IRQ_NUBUS_C, baboon_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
+-		    "baboon", (void *) baboon);
++	baboon_disabled = 0;
++	request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon);
+ }
+ 
+-void baboon_irq_enable(int irq) {
++/*
++ * The means for masking individual baboon interrupts remains a mystery, so
++ * enable the umbrella interrupt only when no baboon interrupt is disabled.
++ */
++
++void baboon_irq_enable(int irq)
++{
++	int irq_idx = IRQ_IDX(irq);
++
+ #ifdef DEBUG_IRQUSE
+ 	printk("baboon_irq_enable(%d)\n", irq);
+ #endif
+-	/* FIXME: figure out how to mask and unmask baboon interrupt sources */
+-	enable_irq(IRQ_NUBUS_C);
++
++	baboon_disabled &= ~(1 << irq_idx);
++	if (!baboon_disabled)
++		mac_enable_irq(IRQ_NUBUS_C);
+ }
+ 
+-void baboon_irq_disable(int irq) {
++void baboon_irq_disable(int irq)
++{
++	int irq_idx = IRQ_IDX(irq);
++
+ #ifdef DEBUG_IRQUSE
+ 	printk("baboon_irq_disable(%d)\n", irq);
+ #endif
+-	disable_irq(IRQ_NUBUS_C);
++
++	baboon_disabled |= 1 << irq_idx;
++	if (baboon_disabled)
++		mac_disable_irq(IRQ_NUBUS_C);
+ }
+ 
+-void baboon_irq_clear(int irq) {
+-	int irq_idx	= IRQ_IDX(irq);
++void baboon_irq_clear(int irq)
++{
++	int irq_idx = IRQ_IDX(irq);
+ 
+ 	baboon->mb_ifr &= ~(1 << irq_idx);
+ }
+ 
+ int baboon_irq_pending(int irq)
+ {
+-	int irq_idx	= IRQ_IDX(irq);
++	int irq_idx = IRQ_IDX(irq);
+ 
+ 	return baboon->mb_ifr & (1 << irq_idx);
+ }
+--- a/arch/m68k/mac/macints.c
++++ b/arch/m68k/mac/macints.c
+@@ -214,8 +214,8 @@ irqreturn_t mac_debug_handler(int, void 
+ 
+ /* #define DEBUG_MACINTS */
+ 
+-static void mac_enable_irq(unsigned int irq);
+-static void mac_disable_irq(unsigned int irq);
++void mac_enable_irq(unsigned int irq);
++void mac_disable_irq(unsigned int irq);
+ 
+ static struct irq_controller mac_irq_controller = {
+ 	.name		= "mac",
+@@ -274,7 +274,7 @@ void __init mac_init_IRQ(void)
+  * These routines are just dispatchers to the VIA/OSS/PSC routines.
+  */
+ 
+-static void mac_enable_irq(unsigned int irq)
++void mac_enable_irq(unsigned int irq)
+ {
+ 	int irq_src = IRQ_SRC(irq);
+ 
+@@ -307,7 +307,7 @@ static void mac_enable_irq(unsigned int 
+ 	}
+ }
+ 
+-static void mac_disable_irq(unsigned int irq)
++void mac_disable_irq(unsigned int irq)
+ {
+ 	int irq_src = IRQ_SRC(irq);
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-macfb-do-not-overflow-fix-id.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-macfb-do-not-overflow-fix-id.diff	Tue Oct 14 19:00:38 2008
@@ -0,0 +1,236 @@
+From fthain at telegraphics.com.au Sun Oct 12 02:26:41 2008
+Date: Sun, 12 Oct 2008 11:17:20 +1100 (EST)
+From: Finn Thain <fthain at telegraphics.com.au>
+To: Geert Uytterhoeven <geert at linux-m68k.org>
+Cc: Andreas Schwab <schwab at suse.de>, Brad Boyer <flar at allandria.com>, linux-m68k at vger.kernel.org
+Subject: Re: [PATCH] macfb string handling, take 3
+
+
+Don't overflow the 16-character fb_fix_screeninfo id string (fixes some 
+console erasing and blanking artifacts). Have the ID default to "Unknown" 
+on machines with no built-in video and no nubus devices. Check for 
+fb_alloc_cmap failure.
+
+Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
+
+---
+ drivers/video/macfb.c |   74 +++++++++++++++++++++++---------------------------
+ 1 file changed, 35 insertions(+), 39 deletions(-)
+
+--- a/drivers/video/macfb.c
++++ b/drivers/video/macfb.c
+@@ -163,7 +163,6 @@ static struct fb_var_screeninfo macfb_de
+ };
+ 
+ static struct fb_fix_screeninfo macfb_fix = {
+-	.id	= "Macintosh ",
+ 	.type	= FB_TYPE_PACKED_PIXELS,
+ 	.accel	= FB_ACCEL_NONE,
+ };
+@@ -759,22 +758,22 @@ static int __init macfb_init(void)
+ 
+ 		switch(ndev->dr_hw) {
+ 		case NUBUS_DRHW_APPLE_MDC:
+-			strcat( macfb_fix.id, "Display Card" );
++			strcpy(macfb_fix.id, "Mac Disp. Card");
+ 			macfb_setpalette = mdc_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+ 			break;
+ 		case NUBUS_DRHW_APPLE_TFB:
+-			strcat( macfb_fix.id, "Toby" );
++			strcpy(macfb_fix.id, "Toby");
+ 			macfb_setpalette = toby_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+ 			break;
+ 		case NUBUS_DRHW_APPLE_JET:
+-			strcat( macfb_fix.id, "Jet");
++			strcpy(macfb_fix.id, "Jet");
+ 			macfb_setpalette = jet_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+ 			break;			
+ 		default:
+-			strcat( macfb_fix.id, "Generic NuBus" );
++			strcpy(macfb_fix.id, "Generic NuBus");
+ 			break;
+ 		}
+ 	}
+@@ -785,21 +784,11 @@ static int __init macfb_init(void)
+ 	if (!video_is_nubus)
+ 		switch( mac_bi_data.id )
+ 		{
+-			/* These don't have onboard video.  Eventually, we may
+-			   be able to write separate framebuffer drivers for
+-			   them (tobyfb.c, hiresfb.c, etc, etc) */
+-		case MAC_MODEL_II:
+-		case MAC_MODEL_IIX:
+-		case MAC_MODEL_IICX:
+-		case MAC_MODEL_IIFX:
+-			strcat( macfb_fix.id, "Generic NuBus" );
+-			break;
+-
+ 			/* Valkyrie Quadras */
+ 		case MAC_MODEL_Q630:
+ 			/* I'm not sure about this one */
+ 		case MAC_MODEL_P588:
+-			strcat( macfb_fix.id, "Valkyrie built-in" );
++			strcpy(macfb_fix.id, "Valkyrie");
+ 			macfb_setpalette = valkyrie_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+ 			valkyrie_cmap_regs = ioremap(DAC_BASE, 0x1000);
+@@ -822,7 +811,7 @@ static int __init macfb_init(void)
+ 		case MAC_MODEL_Q700:
+ 		case MAC_MODEL_Q900:
+ 		case MAC_MODEL_Q950:
+-			strcat( macfb_fix.id, "DAFB built-in" );
++			strcpy(macfb_fix.id, "DAFB");
+ 			macfb_setpalette = dafb_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+ 			dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000);
+@@ -830,7 +819,7 @@ static int __init macfb_init(void)
+ 
+ 			/* LC II uses the V8 framebuffer */
+ 		case MAC_MODEL_LCII:
+-			strcat( macfb_fix.id, "V8 built-in" );
++			strcpy(macfb_fix.id, "V8");
+ 			macfb_setpalette = v8_brazil_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+ 			v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
+@@ -842,7 +831,7 @@ static int __init macfb_init(void)
+ 		case MAC_MODEL_IIVI:
+ 		case MAC_MODEL_IIVX:
+ 		case MAC_MODEL_P600:
+-			strcat( macfb_fix.id, "Brazil built-in" );
++			strcpy(macfb_fix.id, "Brazil");
+ 			macfb_setpalette = v8_brazil_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+ 			v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
+@@ -859,7 +848,7 @@ static int __init macfb_init(void)
+ 		case MAC_MODEL_P460:
+ 			macfb_setpalette = v8_brazil_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+-			strcat( macfb_fix.id, "Sonora built-in" );
++			strcpy(macfb_fix.id, "Sonora");
+ 			v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
+ 			break;
+ 
+@@ -870,7 +859,7 @@ static int __init macfb_init(void)
+ 		case MAC_MODEL_IISI:
+ 			macfb_setpalette = rbv_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+-			strcat( macfb_fix.id, "RBV built-in" );
++			strcpy(macfb_fix.id, "RBV");
+ 			rbv_cmap_regs = ioremap(DAC_BASE, 0x1000);
+ 			break;
+ 
+@@ -879,7 +868,7 @@ static int __init macfb_init(void)
+ 		case MAC_MODEL_C660:
+ 			macfb_setpalette = civic_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+-			strcat( macfb_fix.id, "Civic built-in" );
++			strcpy(macfb_fix.id, "Civic");
+ 			civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
+ 			break;
+ 
+@@ -900,7 +889,7 @@ static int __init macfb_init(void)
+ 				v8_brazil_cmap_regs =
+ 					ioremap(DAC_BASE, 0x1000);
+ 			}
+-			strcat( macfb_fix.id, "LC built-in" );
++			strcpy(macfb_fix.id, "LC");
+ 			break;
+ 			/* We think this may be like the LC II */
+ 		case MAC_MODEL_CCL:
+@@ -910,18 +899,18 @@ static int __init macfb_init(void)
+ 				v8_brazil_cmap_regs =
+ 					ioremap(DAC_BASE, 0x1000);
+ 			}
+-			strcat( macfb_fix.id, "Color Classic built-in" );
++			strcpy(macfb_fix.id, "Color Classic");
+ 			break;
+ 
+ 			/* And we *do* mean "weirdos" */
+ 		case MAC_MODEL_TV:
+-			strcat( macfb_fix.id, "Mac TV built-in" );
++			strcpy(macfb_fix.id, "Mac TV");
+ 			break;
+ 
+ 			/* These don't have colour, so no need to worry */
+ 		case MAC_MODEL_SE30:
+ 		case MAC_MODEL_CLII:
+-			strcat( macfb_fix.id, "Monochrome built-in" );
++			strcpy(macfb_fix.id, "Monochrome");
+ 			break;
+ 
+ 			/* Powerbooks are particularly difficult.  Many of
+@@ -934,7 +923,7 @@ static int __init macfb_init(void)
+ 		case MAC_MODEL_PB140:
+ 		case MAC_MODEL_PB145:
+ 		case MAC_MODEL_PB170:
+-			strcat( macfb_fix.id, "DDC built-in" );
++			strcpy(macfb_fix.id, "DDC");
+ 			break;
+ 
+ 			/* Internal is GSC, External (if present) is ViSC */
+@@ -944,13 +933,13 @@ static int __init macfb_init(void)
+ 		case MAC_MODEL_PB180:
+ 		case MAC_MODEL_PB210:
+ 		case MAC_MODEL_PB230:
+-			strcat( macfb_fix.id, "GSC built-in" );
++			strcpy(macfb_fix.id, "GSC");
+ 			break;
+ 
+ 			/* Internal is TIM, External is ViSC */
+ 		case MAC_MODEL_PB165C:
+ 		case MAC_MODEL_PB180C:
+-			strcat( macfb_fix.id, "TIM built-in" );
++			strcpy(macfb_fix.id, "TIM");
+ 			break;
+ 
+ 			/* Internal is CSC, External is Keystone+Ariel. */
+@@ -962,12 +951,12 @@ static int __init macfb_init(void)
+ 		case MAC_MODEL_PB280C:
+ 			macfb_setpalette = csc_setpalette;
+ 			macfb_defined.activate = FB_ACTIVATE_NOW;
+-			strcat( macfb_fix.id, "CSC built-in" );
++			strcpy(macfb_fix.id, "CSC");
+ 			csc_cmap_regs = ioremap(CSC_BASE, 0x1000);
+ 			break;
+ 		
+ 		default:
+-			strcat( macfb_fix.id, "Unknown/Unsupported built-in" );
++			strcpy(macfb_fix.id, "Unknown");
+ 			break;
+ 		}
+ 
+@@ -977,16 +966,23 @@ static int __init macfb_init(void)
+ 	fb_info.pseudo_palette	= pseudo_palette;
+ 	fb_info.flags		= FBINFO_DEFAULT;
+ 
+-	fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
++	err = fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
++	if (err)
++		goto fail_unmap;
+ 	
+ 	err = register_framebuffer(&fb_info);
+-	if (!err)
+-		printk("fb%d: %s frame buffer device\n",
+-		       fb_info.node, fb_info.fix.id);
+-	else {
+-		iounmap(fb_info.screen_base);
+-		iounmap_macfb();
+-	}
++	if (err)
++		goto fail_dealloc;
++
++	printk("fb%d: %s frame buffer device\n",
++	       fb_info.node, fb_info.fix.id);
++	return 0;
++
++fail_dealloc:
++	fb_dealloc_cmap(&fb_info.cmap);
++fail_unmap:
++	iounmap(fb_info.screen_base);
++	iounmap_macfb();
+ 	return err;
+ }
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-reinstate-rtc.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.26/mac-reinstate-rtc.diff	Tue Oct 14 19:00:38 2008
@@ -0,0 +1,82 @@
+From fthain at telegraphics.com.au Mon Oct  6 15:21:37 2008
+Date: Mon, 6 Oct 2008 23:25:59 +1100 (EST)
+From: Finn Thain <fthain at telegraphics.com.au>
+To: Geert Uytterhoeven <geert at linux-m68k.org>
+Cc: linux-m68k at vger.kernel.org
+Subject: [PATCH] reinstate mac rtc
+
+
+Reinstate the Mac hardware clock for CUDA ADB and Mac II ADB models.
+It doesn't work properly on Mac IIsi ADB and PMU ADB yet, so leave them 
+out.
+
+Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
+
+---
+ arch/m68k/mac/config.c |    3 ---
+ arch/m68k/mac/misc.c   |   16 ++++++++++------
+ 2 files changed, 10 insertions(+), 9 deletions(-)
+
+--- a/arch/m68k/mac/config.c
++++ b/arch/m68k/mac/config.c
+@@ -162,10 +162,7 @@ void __init config_mac(void)
+ 	mach_init_IRQ = mac_init_IRQ;
+ 	mach_get_model = mac_get_model;
+ 	mach_gettimeoffset = mac_gettimeoffset;
+-#warning move to adb/via init
+-#if 0
+ 	mach_hwclk = mac_hwclk;
+-#endif
+ 	mach_set_clock_mmss = mac_set_clock_mmss;
+ 	mach_reset = mac_reset;
+ 	mach_halt = mac_poweroff;
+--- a/arch/m68k/mac/misc.c
++++ b/arch/m68k/mac/misc.c
+@@ -93,7 +93,7 @@ static void cuda_write_pram(int offset, 
+ #define cuda_write_pram NULL
+ #endif
+ 
+-#ifdef CONFIG_ADB_PMU68K
++#if 0 /* def CONFIG_ADB_PMU68K */
+ static long pmu_read_time(void)
+ {
+ 	struct adb_request req;
+@@ -148,7 +148,7 @@ static void pmu_write_pram(int offset, _
+ #define pmu_write_pram NULL
+ #endif
+ 
+-#ifdef CONFIG_ADB_MACIISI
++#if 0 /* def CONFIG_ADB_MACIISI */
+ extern int maciisi_request(struct adb_request *req,
+ 			void (*done)(struct adb_request *), int nbytes, ...);
+ 
+@@ -717,13 +717,18 @@ int mac_hwclk(int op, struct rtc_time *t
+ 		unmktime(now, 0,
+ 			 &t->tm_year, &t->tm_mon, &t->tm_mday,
+ 			 &t->tm_hour, &t->tm_min, &t->tm_sec);
++#if 0
+ 		printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n",
+-			t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
++			t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
++			t->tm_hour, t->tm_min, t->tm_sec);
++#endif
+ 	} else { /* write */
++#if 0
+ 		printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n",
+-			t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
++			t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
++			t->tm_hour, t->tm_min, t->tm_sec);
++#endif
+ 
+-#if 0	/* it trashes my rtc */
+ 		now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
+ 			     t->tm_hour, t->tm_min, t->tm_sec);
+ 
+@@ -742,7 +747,6 @@ int mac_hwclk(int op, struct rtc_time *t
+ 		case MAC_ADB_IISI:
+ 			maciisi_write_time(now);
+ 		}
+-#endif
+ 	}
+ 	return 0;
+ }

Modified: dists/sid/linux-2.6/debian/patches/series/1-extra
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/1-extra	(original)
+++ dists/sid/linux-2.6/debian/patches/series/1-extra	Tue Oct 14 19:00:38 2008
@@ -92,3 +92,9 @@
 # fix dual scsi busses and a problem with xorg (per fthain)
 + bugfix/m68k/2.6.26/mac-esp-fix-for-quadras-with-two-esp-chips.diff arch=m68k
 
++ bugfix/m68k/2.6.26/mac-reinstate-rtc.diff arch=m68k
++ bugfix/m68k/2.6.26/mac-macfb-do-not-overflow-fix-id.diff arch=m68k
++ bugfix/m68k/2.6.26/fbcon-remove-broken-mac-vbl-handler.diff arch=m68k
+#+ bugfix/m68k/2.6.26/baboon-fixup.diff arch=m68k
++ bugfix/m68k/2.6.26/mac-baboon-interrupt-enable-disable.diff arch=m68k
+



More information about the Kernel-svn-changes mailing list