Port-ofppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ofppc isa support



Hi! all,


I fix isa(4) support for ofw.  ofw not initialized bus_space for isa.
It tested on my ofppc(PegasosII).

I will fix at this weekend.

Thanks,
--
kiyohara
  Next will test ieee1394 on this machine.
  Connect to OPENBLOCKS266 with fwip(4).

Index: ofw_consinit.c
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/oea/ofw_consinit.c,v
retrieving revision 1.9
diff -u -r1.9 ofw_consinit.c
--- ofw_consinit.c      10 Mar 2010 18:36:05 -0000      1.9
+++ ofw_consinit.c      10 Mar 2010 18:42:38 -0000
@@ -219,9 +219,9 @@
                return;
        }
 
-#if NAKBD > 0
        memset(name, 0, sizeof(name));
        OF_getprop(OF_parent(node), "name", name, sizeof(name));
+#if NAKBD > 0
        if (strcmp(name, "adb") == 0) {
                printf("console keyboard type: ADB\n");
                akbd_cnattach();
@@ -229,8 +229,6 @@
        }
 #endif
 #if NADBKBD > 0
-       memset(name, 0, sizeof(name));
-       OF_getprop(OF_parent(node), "name", name, sizeof(name));
        if (strcmp(name, "adb") == 0) {
                printf("console keyboard type: ADB\n");
                adbkbd_cnattach();
@@ -238,9 +236,7 @@
        }
 #endif
 #if NPCKBC > 0
-       memset(name, 0, sizeof(name));
-       OF_getprop(OF_parent(node), "name", name, sizeof(name));
-       if (strcmp(name, "keyboard") == 0) {
+       if (strcmp(name, "isa") == 0) {
                printf("console keyboard type: PC Keyboard\n");
                pckbc_cnattach(&genppc_isa_io_space_tag, IO_KBD, KBCMDP,
                    PCKBC_KBD_SLOT);
Index: ofwoea_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/oea/ofwoea_machdep.c,v
retrieving revision 1.19
diff -u -r1.19 ofwoea_machdep.c
--- ofwoea_machdep.c    10 Mar 2010 18:36:05 -0000      1.19
+++ ofwoea_machdep.c    10 Mar 2010 18:42:38 -0000
@@ -167,6 +167,8 @@
                            sizeof(model_name));
                model_init();
        }
+       /* Initialize bus_space */
+       ofwoea_bus_space_init();
 
        ofwoea_consinit();
 
@@ -583,6 +585,10 @@
                 */
                if (range == -1) {
                        /* we found a rangeless isa bus */
+                       if (iomem == RANGE_IO)
+                               size = 0x10000;
+                       else
+                               size = 0x1000000;
                }
                DPRINTF("found isa stuff\n");
                for (i=0; i < range; i++)
@@ -595,7 +601,10 @@
                                        DPRINTF("found IO\n");
                                        tag->pbs_offset = list[i].addr;
                                        tag->pbs_limit = size;
-                                       error = bus_space_init(tag, name, NULL, 
0);
+                                       error = bus_space_init(tag, name,
+                                           ex_storage[exmap],
+                                           sizeof(ex_storage[exmap]));
+                                       exmap++;
                                        return error;
                                }
                } else {
@@ -605,7 +614,10 @@
                                        DPRINTF("found mem\n");
                                        tag->pbs_offset = list[i].addr;
                                        tag->pbs_limit = size;
-                                       error = bus_space_init(tag, name, NULL, 
0);
+                                       error = bus_space_init(tag, name,
+                                           ex_storage[exmap],
+                                           sizeof(ex_storage[exmap]));
+                                       exmap++;
                                        return error;
                                }
                }


Home | Main Index | Thread Index | Old Index