[parisc-linux-cvs] 2.4.21-pa10: PCMCIA stuff, sti=off, stifb=off
Helge Deller
deller@gmx.de
Tue, 12 Aug 2003 09:04:07 +0200
--Boundary-00=_nFJO/0QyL599B+l
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Tuesday 12 August 2003 09:01, Helge Deller wrote:
> CVSROOT: /var/cvs
> Module name: linux
> Changes by: deller 03/08/12 01:01:37
>
> Modified files:
> . : Makefile
> arch/parisc : config.in
> arch/parisc/kernel: irq.c
> drivers/video/sti: sticore.c stifb.c
>
> Log message:
> 2.4.21-pa10:
> - include PCMCIA stuff to configuration menus (yes, there is a PARISC
> laptop w/ PCMCIA) - add missing probe_irq_mask() function (untested!!)
> - add "sti=off" kernel parameter to disable all STI drivers (sticon &
> stifb) - add "stifb=off" kernel parameter to disable the stifb driver only
--Boundary-00=_nFJO/0QyL599B+l
Content-Type: text/plain;
charset="iso-8859-1";
name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="diff"
Index: Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.407
diff -u -p -r1.407 Makefile
--- Makefile 5 Aug 2003 07:16:34 -0000 1.407
+++ Makefile 12 Aug 2003 06:58:45 -0000
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 21
-EXTRAVERSION = -pa9
+EXTRAVERSION = -pa10
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
Index: arch/parisc/config.in
===================================================================
RCS file: /var/cvs/linux/arch/parisc/config.in,v
retrieving revision 1.47
diff -u -p -r1.47 config.in
--- arch/parisc/config.in 5 Aug 2003 07:16:34 -0000 1.47
+++ arch/parisc/config.in 12 Aug 2003 06:58:45 -0000
@@ -76,6 +76,14 @@ comment 'General setup'
bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
+if [ "$CONFIG_HOTPLUG" = "y" ] ; then
+ source drivers/pcmcia/Config.in
+ source drivers/hotplug/Config.in
+else
+ define_bool CONFIG_PCMCIA n
+ define_bool CONFIG_HOTPLUG_PCI n
+fi
+
bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
Index: arch/parisc/kernel/irq.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/irq.c,v
retrieving revision 1.60
diff -u -p -r1.60 irq.c
--- arch/parisc/kernel/irq.c 4 Dec 2002 01:05:24 -0000 1.60
+++ arch/parisc/kernel/irq.c 12 Aug 2003 06:58:47 -0000
@@ -776,6 +776,52 @@ unsigned long probe_irq_on(void)
return val;
}
+
+/**
+ * probe_irq_mask - scan a bitmap of interrupt lines
+ * @val: mask of interrupts to consider
+ *
+ * Scan the ISA bus interrupt lines and return a bitmap of
+ * active interrupts. The interrupt probe logic state is then
+ * returned to its previous value.
+ *
+ * Note: we need to scan all the irq's even though we will
+ * only return ISA irq numbers - just so that we reset them
+ * all to a known state.
+ */
+unsigned int probe_irq_mask(unsigned long val)
+{
+ int i;
+ struct irq_region *region;
+ unsigned int mask;
+
+ /* support for irq autoprobing is limited to EISA (irq region 0) */
+ region = irq_region[EISA_IRQ_REGION];
+ if (!EISA_bus || !region)
+ return 0;
+
+ mask = 0;
+ for (i = 0; i < EISA_MAX_IRQS; i++) {
+ unsigned int status;
+
+ spin_lock_irq(&irq_lock);
+ status = region->data.status[i];
+
+ if (status & IRQ_AUTODETECT) {
+ if (i < 16 && !(status & IRQ_WAITING))
+ mask |= 1 << i;
+
+ region->data.status[i] = status & ~IRQ_AUTODETECT;
+ region->ops.disable_irq(region->data.dev,i);
+ }
+ spin_unlock_irq(&irq_lock);
+ }
+ up(&probe_sem);
+
+ return mask & val;
+}
+
+
/*
* Return the one interrupt that triggered (this can
* handle any interrupt source).
Index: drivers/video/sti/sticore.c
===================================================================
RCS file: /var/cvs/linux/drivers/video/sti/sticore.c,v
retrieving revision 1.40
diff -u -p -r1.40 sticore.c
--- drivers/video/sti/sticore.c 27 Jul 2002 22:50:54 -0000 1.40
+++ drivers/video/sti/sticore.c 12 Aug 2003 06:58:47 -0000
@@ -249,12 +249,16 @@ sti_rom_copy(unsigned long base, unsigne
static char default_sti_path[21];
+static int sticore_disabled; /* set to 1 by kernel parameter "sti=off" */
static int __init
sti_setup(char *str)
{
- if (str)
- strncpy (default_sti_path, str, sizeof (default_sti_path));
+ if (!str)
+ strncpy(default_sti_path, str, sizeof (default_sti_path));
+
+ if (strncmp(default_sti_path, "off", 3) == 0)
+ sticore_disabled = 1;
return 0;
}
@@ -264,6 +268,7 @@ sti_setup(char *str)
* parameter sti=<x> which of them will be the initial boot-console.
* <x> is a number between 0 and MAX_STI_ROMS, with 0 as the default
* STI screen.
+ * Alternatively, sti=off disables all STI drivers (sticon and stifb).
*/
__setup("sti=", sti_setup);
@@ -1012,7 +1017,7 @@ struct sti_struct * __init sti_init_roms
{
static int initialized;
- if (initialized)
+ if (initialized || sticore_disabled)
goto out;
printk(KERN_INFO "STI GSC/PCI graphics driver version %s\n",
Index: drivers/video/sti/stifb.c
===================================================================
RCS file: /var/cvs/linux/drivers/video/sti/stifb.c,v
retrieving revision 1.35
diff -u -p -r1.35 stifb.c
--- drivers/video/sti/stifb.c 23 Sep 2002 21:22:59 -0000 1.35
+++ drivers/video/sti/stifb.c 12 Aug 2003 06:58:49 -0000
@@ -39,12 +39,10 @@
*/
/* TODO:
- * - Artist gfx is the only supported chip atm,
* - remove the static fb_info to support multiple cards
- * - remove the completely untested 1bpp mode
+ * - check untested 1bpp mode
* - add support for h/w acceleration
* - add hardware cursor
- * -
*/
@@ -1160,7 +1158,7 @@ stifb_set_disp(struct stifb_info *fb)
}
break;
}
- stifb_blank(0, (struct fb_info *)fb); /* 0=enable screen */
+ stifb_blank(0, &fb->info); /* 0=enable screen */
SETUP_FB(fb);
}
@@ -1444,12 +1442,18 @@ out_err1:
return -ENXIO;
}
+static int stifb_disabled __initdata;
+
int __init
stifb_init(void)
{
struct sti_struct *sti;
int i;
+ if (stifb_disabled) {
+ printk(KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n");
+ return -ENXIO;
+ }
if (sti_init_roms() == NULL)
return -ENXIO; /* no STI cards available */
@@ -1469,7 +1473,7 @@ stifb_init(void)
*/
void __exit
-stifb_cleanup(struct fb_info *info)
+stifb_cleanup(void)
{
// unregister_framebuffer(info);
}
@@ -1482,6 +1486,11 @@ stifb_setup(char *options)
if (!options || !*options)
return 0;
+ if (strncmp(options, "off", 3) == 0) {
+ stifb_disabled = 1;
+ options += 3;
+ }
+
if (strncmp(options, "bpp", 3) == 0) {
options += 3;
for (i = 0; i < MAX_STI_ROMS; i++) {
@@ -1506,5 +1515,5 @@ MODULE_DESCRIPTION("Framebuffer driver f
MODULE_LICENSE("GPL");
MODULE_PARM(bpp, "i");
-MODULE_PARM_DESC(mem, "Bits per pixel (default: 8)");
+MODULE_PARM_DESC(bpp, "Bits per pixel (default: 8)");
--Boundary-00=_nFJO/0QyL599B+l--