[PATCH] Make Krups javastation work with 2.6.2 [forgot patch :(]

From: Tim Vandermeersch
Date: Wed Feb 11 2004 - 12:24:57 EST


Patch to make kerbel 2.6.2 work with krups javastation.

--
Regards,
Tim Vandermeersch
--- linux-2.6.2_orig/arch/sparc/kernel/pcic.c 2004-02-04 04:43:55.000000000 +0100
+++ linux-2.6.2_hack/arch/sparc/kernel/pcic.c 2004-02-11 17:35:37.000000000 +0100
@@ -35,9 +35,24 @@
#include <asm/timer.h>
#include <asm/uaccess.h>

-
+/*
+ * When using ioremap in igafb.c the address 0x30000000 got mapped
+ * twice wich caused a panic
+ */
+static void __devinit pci_fixup_igafb(struct pci_dev *dev)
+{
+ prom_printf("pci_fixup_igafb();\n");
+ dev->resource[1].start = 1;
+ dev->resource[1].end = 0;
+ dev->resource[1].flags = IORESOURCE_IO;
+}
+
struct pci_fixup pcibios_fixups[] = {
- { 0 }
+ {
+ PCI_FIXUP_HEADER,
+ PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682,
+ pci_fixup_igafb
+ }, { 0 }
};

unsigned int pcic_pin_to_irq(unsigned int pin, char *name);
--- linux-2.6.2_orig/drivers/video/igafb.c 2004-02-04 04:43:56.000000000 +0100
+++ linux-2.6.2_hack/drivers/video/igafb.c 2004-02-11 17:39:58.000000000 +0100
@@ -327,6 +327,7 @@
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
+ .fb_cursor = soft_cursor,
#ifdef __sparc__
.fb_mmap = igafb_mmap,
#endif
@@ -409,7 +410,8 @@
memset(info, 0, size);

par = (struct iga_par *) (info + 1);
-
+
+ info->par = par;

if ((addr = pdev->resource[0].start) == 0) {
printk("igafb_init: no memory start\n");
@@ -447,16 +449,21 @@
*/
if (iga2000) {
igafb_fix.mmio_start = par->frame_buffer_phys | 0x00800000;
- } else {
- igafb_fix.mmio_start = 0x30000000; /* XXX */
- }
- if ((par->io_base = (int) ioremap(igafb_fix.mmio_start, igafb_fix.smem_len)) == 0) {
- printk("igafb_init: can't remap %lx[4K]\n", igafb_fix.mmio_start);
- iounmap((void *)info->screen_base);
- kfree(info);
- return -ENXIO;
- }

+ if ((par->io_base = (int) ioremap(igafb_fix.mmio_start,
+ igafb_fix.smem_len)) == 0) {
+ printk("igafb_init: can't remap %lx[4K]\n",
+ igafb_fix.mmio_start);
+ iounmap((void *)info->screen_base);
+ kfree(info);
+ return -ENXIO;
+ }
+ } else {
+ /* fixup in arch/sparc/kernelpcic.c */
+ par->io_base = pdev->resource[1].start - 1;
+ }
+
+
/*
* Figure mmap addresses from PCI config space.
* We need two regions: for video memory and for I/O ports.
--- linux-2.6.2_orig/drivers/input/serio/i8042-sparcio.h 2004-02-04 04:45:02.000000000 +0100
+++ linux-2.6.2_hack/drivers/input/serio/i8042-sparcio.h 2004-02-11 17:43:17.000000000 +0100
@@ -85,8 +85,10 @@
if (!strcmp(child->prom_name, OBP_PS2KBD_NAME1) ||
!strcmp(child->prom_name, OBP_PS2KBD_NAME2)) {
i8042_kbd_irq = child->irqs[0];
+ /* tested on krups javastation */
kbd_iobase = (unsigned long)
- ioremap(child->resource[0].start, 8);
+ (child->resource[0].start - 0x60);
+ /* ioremap(child->resource[0].start, 8); */
}
if (!strcmp(child->prom_name, OBP_PS2MS_NAME1) ||
!strcmp(child->prom_name, OBP_PS2MS_NAME2))

Attachment: pgp00000.pgp
Description: PGP signature