[parisc-linux-cvs] fix for 715 and 712 boot-problems with 2.4.6 kernel
Helge Deller
deller@gmx.de
Sun, 8 Jul 2001 14:46:36 +0200
This patch makes the 2.4.6 kernel bootable on the 715 and 712
series machines and still works on the c3k:
EXTRAVERSION = -pa5
- reordered entries in the Makefiles
- added named initializers to some irq_region_ops structs
- changed lots of direct calls to module_init()'s and __initcall()'s
- #undef FBCONDEBUG again
- some other code cleanups
Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/Makefile,v
retrieving revision 1.87
diff -u -r1.87 Makefile
--- Makefile 2001/07/07 06:45:56 1.87
+++ Makefile 2001/07/08 12:28:33
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 6
-EXTRAVERSION = -pa4
+EXTRAVERSION = -pa5
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
Index: arch/parisc/kernel/Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/Makefile,v
retrieving revision 1.35
diff -u -r1.35 Makefile
--- Makefile 2001/06/23 06:51:16 1.35
+++ Makefile 2001/07/08 12:28:34
@@ -21,9 +21,10 @@
obj- :=
obj-y += cache.o pacache.o setup.o traps.o time.o irq.o \
- syscall.o entry.o sys_parisc.o firmware.o ptrace.o hardware.o \
- inventory.o drivers.o semaphore.o pa7300lc.o pci-dma.o \
- signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o
+ pa7300lc.o pci-dma.o syscall.o entry.o sys_parisc.o \
+ firmware.o ptrace.o hardware.o inventory.o drivers.o \
+ semaphore.o signal.o hpmc.o real2.o parisc_ksyms.o \
+ unaligned.o
export-objs := parisc_ksyms.o
Index: arch/parisc/kernel/iosapic.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/iosapic.c,v
retrieving revision 1.25
diff -u -r1.25 iosapic.c
--- iosapic.c 2001/06/24 12:25:22 1.25
+++ iosapic.c 2001/07/08 12:28:35
@@ -942,10 +942,10 @@
static struct irq_region_ops iosapic_irq_ops = {
- iosapic_disable_irq,
- iosapic_enable_irq,
- iosapic_mask_irq,
- iosapic_unmask_irq
+ disable_irq: iosapic_disable_irq,
+ enable_irq: iosapic_enable_irq,
+ mask_irq: iosapic_mask_irq,
+ unmask_irq: iosapic_unmask_irq
};
Index: arch/parisc/kernel/superio.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/superio.c,v
retrieving revision 1.4
diff -u -r1.4 superio.c
--- superio.c 2001/07/06 03:44:50 1.4
+++ superio.c 2001/07/08 12:28:37
@@ -310,10 +310,10 @@
}
static struct irq_region_ops superio_irq_ops = {
- disable_irq: superio_disable_irq,
- enable_irq: superio_enable_irq,
- mask_irq: superio_mask_irq,
- unmask_irq: superio_unmask_irq
+ disable_irq: superio_disable_irq,
+ enable_irq: superio_enable_irq,
+ mask_irq: superio_mask_irq,
+ unmask_irq: superio_unmask_irq
};
static unsigned short expected_device[3] = {
Index: drivers/char/hp_psaux.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/char/hp_psaux.c,v
retrieving revision 1.8
diff -u -r1.8 hp_psaux.c
--- hp_psaux.c 2001/06/27 20:40:51 1.8
+++ hp_psaux.c 2001/07/08 12:28:38
@@ -542,8 +542,10 @@
{ 0, }
};
-int __init gsc_ps2_init (void)
+static int __init gsc_ps2_init(void)
{
- register_driver(lasi_psaux_drivers_for);
- return 0;
+ return register_driver(lasi_psaux_drivers_for);
}
+
+module_init(gsc_ps2_init);
+
Index: drivers/gsc/busdevice.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/busdevice.c,v
retrieving revision 1.20
diff -u -r1.20 busdevice.c
--- busdevice.c 2001/05/16 17:30:04 1.20
+++ busdevice.c 2001/07/08 12:28:40
@@ -184,10 +184,10 @@
}
struct irq_region_ops busdev_irq_ops = {
- busdev_disable_irq, /* disable_irq */
- busdev_enable_irq, /* enable_irq */
- busdev_mask_irq, /* void (* mask_irq)(void *dev, int irq) */
- busdev_unmask_irq /* void (* unmask_irq)(void *dev, int irq) */
+ disable_irq: busdev_disable_irq,
+ enable_irq: busdev_enable_irq,
+ mask_irq: busdev_mask_irq,
+ unmask_irq: busdev_unmask_irq
};
@@ -239,38 +239,21 @@
/*
- * Initialize all controller chips (LASI/ASP/WAX) and attached devices.
+ * Initialize all main controller chips (LASI/ASP/WAX/EISA)
*/
-extern void register_lan_drivers(void);
-extern void register_hil_drivers(void);
-extern int lasi_psaux_init(void);
-extern int gsc_ps2_init(void);
+extern void register_wax_driver(void);
+extern void register_wax_eisa_driver(void);
-
-int __init busdevices_init(void)
+void __init busdevices_init(void)
{
register_driver(busdev_drivers_for);
-
+
#ifdef CONFIG_GSC_WAX
register_wax_driver();
-#endif
-
-#ifdef CONFIG_GSC_PS2
- gsc_ps2_init(); /* PS aux driver */
-#endif
-
-#ifdef CONFIG_HIL
- register_hil_drivers(); /* Human Interface Loop driver */
#endif
-
-#ifdef CONFIG_STI_CONSOLE
- sticonsole_init(); /* STI text console */
-#endif
-
-#ifdef CONFIG_LASI_82596
- register_lan_drivers(); /* LASI/ASP LAN (i82596) */
+
+#ifdef CONFIG_WAX_EISA
+ register_wax_eisa_driver();
#endif
-
- return 0;
}
Index: drivers/gsc/dino.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/dino.c,v
retrieving revision 1.29
diff -u -r1.29 dino.c
--- dino.c 2001/06/20 20:24:34 1.29
+++ dino.c 2001/07/08 12:28:41
@@ -145,9 +145,7 @@
DRIVER_CHECK_SVERSION + DRIVER_CHECK_HWTYPE,
"Dino", "J2240 (bridge mode)", (void *) dino_driver_callback},
- {0,0,0,0,0,0,
- 0,
- (char *) NULL,(char *) NULL,(void *) NULL}
+ { 0, }
};
@@ -462,10 +460,10 @@
static struct irq_region_ops dino_irq_ops = {
- dino_mask_irq,
- dino_enable_irq,
- dino_mask_irq, /* void (* mask_irq)(void *dev, int irq) */
- dino_unmask_irq /* void (* unmask_irq)(void *dev, int irq) */
+ disable_irq: dino_mask_irq, /* ??? */
+ enable_irq: dino_enable_irq,
+ mask_irq: dino_mask_irq,
+ unmask_irq: dino_unmask_irq
};
Index: drivers/gsc/hil.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/hil.c,v
retrieving revision 1.4
diff -u -r1.4 hil.c
--- hil.c 2001/02/28 01:09:47 1.4
+++ hil.c 2001/07/08 12:28:41
@@ -57,8 +57,11 @@
{ 0 }
};
-void __init
+static int __init
register_hil_drivers(void)
{
- register_driver(hil_drivers_for);
+ return register_driver(hil_drivers_for);
}
+
+module_init(register_hil_drivers);
+
Index: drivers/gsc/lan.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/lan.c,v
retrieving revision 1.7
diff -u -r1.7 lan.c
--- lan.c 2001/02/28 01:09:47 1.7
+++ lan.c 2001/07/08 12:28:41
@@ -76,8 +76,11 @@
{ 0 }
};
-void __init
+static int __init
register_lan_drivers(void)
{
- register_driver(lan_drivers_for);
+ return register_driver(lan_drivers_for);
}
+
+module_init(register_lan_drivers);
+
Index: drivers/gsc/serial.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/serial.c,v
retrieving revision 1.13
diff -u -r1.13 serial.c
--- serial.c 2001/06/26 06:39:23 1.13
+++ serial.c 2001/07/08 12:28:41
@@ -49,6 +49,7 @@
if (serial_line_nr == 1)
printk(KERN_INFO "This kernel was compiled without WAX support, but apparently you will need to\n"
"enable WAX support in order to use the 2nd serial port (ttyS1) on this machine.\n");
+ else
#endif
printk(KERN_WARNING "IRQ not found for serial device at 0x%p\n", d->hpa);
return -ENODEV;
Index: drivers/gsc/wax.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/wax.c,v
retrieving revision 1.7
diff -u -r1.7 wax.c
--- wax.c 2001/03/04 18:39:41 1.7
+++ wax.c 2001/07/08 12:28:41
@@ -24,22 +24,9 @@
#include "busdevice.h"
-
#define WAX_GSC_IRQ 7 /* Hardcoded Interrupt for GSC */
#define WAX_GSC_NMI_IRQ 29
-static struct pa_iodc_driver wax_driver_for[] = {
- {HPHW_BA, 0x0, 0, 0x0008e, 0, 0,
- DRIVER_CHECK_HWTYPE + DRIVER_CHECK_SVERSION,
- "Wax", "generic", (void *) wax_init_chip},
- {0}
-};
-
-void __init register_wax_driver(void)
-{
- register_driver(wax_driver_for);
-}
-
static int wax_find_irq(struct busdevice *lasi_dev, struct hp_device *dev)
{
int irq;
@@ -92,10 +79,6 @@
*/
}
-#ifdef CONFIG_WAX_EISA
-void __init register_wax_eisa_driver(void);
-#endif
-
int __init
wax_init_chip(struct hp_device *d, struct pa_iodc_driver *dri)
{
@@ -147,13 +130,22 @@
#ifdef CONFIG_HIL
request_irq( (wax->busdev_region->data.irqbase) + WAX_GSC_NMI_IRQ,
&wax_hil_nmi, 0, "wax_hil_nmi", NULL);
- printk("%s: HIL Keyboard-NMI registered.\n", wax->name);
+ printk(KERN_INFO "%s: HIL Keyboard-NMI registered.\n", wax->name);
#endif
-#ifdef CONFIG_WAX_EISA
- register_wax_eisa_driver();
-#endif
-
return ret;
+}
+
+
+static struct pa_iodc_driver wax_driver_for[] = {
+ {HPHW_BA, 0x0, 0, 0x0008e, 0, 0,
+ DRIVER_CHECK_HWTYPE + DRIVER_CHECK_SVERSION,
+ "Wax", "generic", (void *) wax_init_chip},
+ { 0, }
+};
+
+int __init register_wax_driver(void)
+{
+ return register_driver(wax_driver_for);
}
Index: drivers/gsc/wax_eisa.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/wax_eisa.c,v
retrieving revision 1.4
diff -u -r1.4 wax_eisa.c
--- wax_eisa.c 2001/06/20 20:24:34 1.4
+++ wax_eisa.c 2001/07/08 12:28:41
@@ -38,18 +38,6 @@
*/
-static int wax_eisa_driver_init(struct hp_device *d, struct pa_iodc_driver *dri);
-
-static struct pa_iodc_driver wax_eisa_drivers_for[] = {
- {HPHW_BA, 0x01B, 0, 0x0008e, 0x0, 0x0, /* 0x8e is WAX, not WAX EISA! Maybe 0x90 ?? */
- DRIVER_CHECK_HWTYPE + DRIVER_CHECK_SVERSION,
- "Wax EISA BA", "generic", (void *) wax_eisa_driver_init},
- {HPHW_BA, 0x01B, 0, 0x00076, 0x0, 0x0,
- DRIVER_CHECK_HWTYPE + DRIVER_CHECK_SVERSION,
- "Wax EISA BA", "generic", (void *) wax_eisa_driver_init},
- { 0, }
-};
-
#define WAX_EISA_OUT(type, size) \
static void wax_out##type (struct pci_hba_data *hba, u16 addr, u##size d) \
{ \
@@ -68,6 +56,9 @@
WAX_EISA_OUT(w,16)
WAX_EISA_OUT(l,32)
+#undef WAX_EISA_OUT
+
+
#define WAX_EISA_IN(type, size) \
static u##size wax_in##type (struct pci_hba_data *hba, u16 addr) \
{ \
@@ -87,6 +78,9 @@
WAX_EISA_IN(w,16)
WAX_EISA_IN(l,32)
+#undef WAX_EISA_IN
+
+
static struct pci_port_ops wax_port_ops = {
inb: wax_inb,
inw: wax_inw,
@@ -109,12 +103,6 @@
static struct wax_eisa_device *eisa_dev;
-void __init
-register_wax_eisa_driver(void)
-{
- register_driver(wax_eisa_drivers_for);
-}
-
static int __init
wax_eisa_driver_init(struct hp_device *d, struct pa_iodc_driver *dri) {
@@ -160,5 +148,24 @@
EISA_bus = 1;
return 0;
+}
+
+
+
+static struct pa_iodc_driver wax_eisa_drivers_for[] = {
+ {HPHW_BA, 0x01B, 0, 0x0008e, 0x0, 0x0, /* 0x8e is WAX, not WAX EISA! Maybe 0x90 ?? */
+ DRIVER_CHECK_HWTYPE + DRIVER_CHECK_SVERSION,
+ "Wax EISA BA", "generic", (void *) wax_eisa_driver_init},
+ {HPHW_BA, 0x01B, 0, 0x00076, 0x0, 0x0,
+ DRIVER_CHECK_HWTYPE + DRIVER_CHECK_SVERSION,
+ "Wax EISA BA", "generic", (void *) wax_eisa_driver_init},
+ { 0, }
+};
+
+
+int __init
+register_wax_eisa_driver(void)
+{
+ return register_driver(wax_eisa_drivers_for);
}
Index: drivers/video/fbcon.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/fbcon.c,v
retrieving revision 1.8
diff -u -r1.8 fbcon.c
--- fbcon.c 2001/07/05 21:37:47 1.8
+++ fbcon.c 2001/07/08 12:28:52
@@ -54,7 +54,7 @@
* more details.
*/
-#define FBCONDEBUG
+#undef FBCONDEBUG
#include <linux/config.h>
#include <linux/module.h>
Index: drivers/video/sti/Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile 2001/06/17 21:21:15 1.2
+++ Makefile 2001/07/08 12:28:52
@@ -7,12 +7,12 @@
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
-export-objs := sticon.o sticore.o stifb.o
+export-objs := sticore.o sticon.o stifb.o
# Each configuration option enables a list of files.
-obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o
-obj-$(CONFIG_FB_STI) += sticon.o sticore.o stifb.o
+obj-$(CONFIG_FB_STI) += sticore.o stifb.o
+obj-$(CONFIG_STI_CONSOLE) += sticore.o sticon.o
include $(TOPDIR)/Rules.make
Index: drivers/video/sti/sticon.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticon.c,v
retrieving revision 1.16
diff -u -r1.16 sticon.c
--- sticon.c 2001/06/28 01:50:25 1.16
+++ sticon.c 2001/07/08 12:28:52
@@ -56,7 +56,6 @@
/* Software scrollback */
-static int sticon_softback_size = 32768;
static unsigned long softback_buf, softback_curr;
static unsigned long softback_in;
static unsigned long /* softback_top, */ softback_end;
@@ -263,6 +262,8 @@
return 1;
case 1: /* normal blanking */
default: /* VESA blanking */
+ if (vga_is_gfx)
+ return 0;
sticon_set_origin(c);
sti_clear(default_sti, 0,0, c->vc_rows, c->vc_cols, BLANK);
return 1;
@@ -390,22 +391,12 @@
int __init sticonsole_init(void)
{
- printk(KERN_INFO "\n");
- printk(KERN_INFO "sticonsole_init: searching for STI ROMs\n");
+ printk(KERN_INFO "%s: searching for STI ROMs\n", __FUNCTION__);
if (sti_init_roms()) {
- take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1);
+ register_console(&sti_con);
return 0;
} else
return -ENODEV;
}
-
-/* sticonsole_init() is called as early as possible directly after
- * the initialisation of the busdevices. Because of that we don't want
- * another initialisation with module_init() if this drivers isn't
- * compiled as module
- */
-
-#ifdef MODULE
-module_init(sticonsole_init)
-#endif
+module_init(sticonsole_init);
Index: drivers/video/sti/stifb.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/stifb.c,v
retrieving revision 1.17
diff -u -r1.17 stifb.c
--- stifb.c 2001/06/27 14:07:09 1.17
+++ stifb.c 2001/07/08 12:28:54
@@ -1007,7 +1007,7 @@
fb_set_var: fbgen_set_var,
fb_get_cmap: fbgen_get_cmap,
fb_set_cmap: fbgen_set_cmap,
-// fb_pan_display: fbgen_pan_display,
+ fb_pan_display: fbgen_pan_display,
// fb_ioctl: xxxfb_ioctl, /* optional */
};
@@ -1047,7 +1047,7 @@
fb_info.line_length = 2048; /* default */
fb_info.smem_len = PTR_STI(fb_info.sti->glob_cfg)->total_y *
fb_info.line_length;
- fb_info.screen_base = REGION_BASE(fb_info,1);
+ fb_info.screen_base = (void*) REGION_BASE(fb_info,1);
/* Reject any device not in the NGLE family */
/* FIXME: At this stage only Artist fb is supported! */
@@ -1128,6 +1128,10 @@
return 0;
}
+#ifdef MODULE
+module_init(stifb_init);
+#endif
+
/*
* Cleanup
@@ -1148,7 +1152,4 @@
return 0;
}
-#ifdef MODULE
-module_init(stifb_init);
__setup("stifb=", stifb_setup);
-#endif