Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit hwinfo
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Wed, 15 Aug 2007 20:24:35 +0200
  • Message-id: <20070815182435.6B247678332@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package hwinfo
checked in at Wed Aug 15 20:24:35 CEST 2007.

--------
--- hwinfo/hwinfo.changes       2007-08-08 16:53:06.000000000 +0200
+++ /mounts/work_src_done/STABLE/hwinfo/hwinfo.changes  2007-08-15 12:53:31.000000000 +0200
@@ -1,0 +2,10 @@
+Wed Aug 15 12:53:09 CEST 2007 - snwint@xxxxxxx
+
+- olh: generate fake EDID for known powermacs (#299202)
+- adjusted help text (#299770)
+- get wlan interfaces right (#298365)
+- ppc: support ttyPSC0 console (#259923)
+- ppc: EFIKA support (#263773)
+- updated X11 data
+
+-------------------------------------------------------------------

Old:
----
  hwinfo-13.42.tar.bz2

New:
----
  hwinfo-13.44.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hwinfo.spec ++++++
--- /var/tmp/diff_new_pack.H12006/_old  2007-08-15 20:24:13.000000000 +0200
+++ /var/tmp/diff_new_pack.H12006/_new  2007-08-15 20:24:13.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package hwinfo (Version 13.42)
+# spec file for package hwinfo (Version 13.44)
 #
 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # This file and all modifications and additions to the pristine
@@ -20,9 +20,9 @@
 PreReq:         /sbin/ldconfig %insserv_prereq %fillup_prereq
 Autoreqprov:    on
 Summary:        Hardware Library
-Version:        13.42
+Version:        13.44
 Release:        1
-Source:         hwinfo-13.42.tar.bz2
+Source:         hwinfo-13.44.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -89,6 +89,13 @@
 %doc doc/libhd/html
 
 %changelog
+* Wed Aug 15 2007 - snwint@xxxxxxx
+- olh: generate fake EDID for known powermacs (#299202)
+- adjusted help text (#299770)
+- get wlan interfaces right (#298365)
+- ppc: support ttyPSC0 console (#259923)
+- ppc: EFIKA support (#263773)
+- updated X11 data
 * Wed Aug 08 2007 - uli@xxxxxxx
 - s390: handle missing CCW device attributes
 * Mon Jul 30 2007 - snwint@xxxxxxx

++++++ hwinfo-13.42.tar.bz2 -> hwinfo-13.44.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/Changelog new/hwinfo-13.44/Changelog
--- old/hwinfo-13.42/Changelog  2007-08-08 16:30:39.000000000 +0200
+++ new/hwinfo-13.44/Changelog  2007-08-15 12:37:19.000000000 +0200
@@ -1,6 +1,17 @@
+15/8/2007:     v13.44
+       - adjusted help text (#299770)
+       - get wlan interfaces right (#298365)
+       - ppc: support ttyPSC0 console (#259923)
+       - ppc: EFIKA support (#263773)
+       - updated X11 data
+
+10/8/2007:     v13.43
+       - updated X11 data
+       - olh: generate fake EDID for known powermacs (#299202)
+
 8/8/2007:      v13.42
        - s390: handle missing CCW device attributes

+
 30/7/2007:     v13.41
        - olh: add ppc sound card (#295614)
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/hwinfo.c new/hwinfo-13.44/hwinfo.c
--- old/hwinfo-13.42/hwinfo.c   2007-08-08 15:44:00.000000000 +0200
+++ new/hwinfo-13.44/hwinfo.c   2007-08-13 16:15:49.000000000 +0200
@@ -794,11 +794,13 @@
     "  --dump-db n    dump hardware data base, 0: external, 1: internal\n"
     "  --hw_item      probe for hw_item\n"
     "  hw_item is one of:\n"
-    "    all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu,\n"
-    "    disk, dsl, dvb, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn,\n"
-    "    joystick, keyboard, memory, modem, monitor, mouse, netcard, network,\n"
-    "    partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, scanner, scsi, smp,\n"
-    "    sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl, vbe, wlan, zip\n\n"
+    "   all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard,\n"
+    "   cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub,\n"
+    "   ide, isapnp, isdn, joystick, keyboard, memory, modem, monitor, mouse,\n"
+    "   netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer,\n"
+    "   scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl,\n"
+    "   vbe, wlan, zip\n"
+    "\n"
     "  Note: debug info is shown only in the log file. (If you specify a\n"
     "  log file the debug level is implicitly set to a reasonable value.)\n"
   );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/hd/hd.h new/hwinfo-13.44/src/hd/hd.h
--- old/hwinfo-13.42/src/hd/hd.h        2007-08-08 15:44:30.000000000 +0200
+++ new/hwinfo-13.44/src/hd/hd.h        2007-08-15 12:28:45.000000000 +0200
@@ -1181,6 +1181,83 @@
   unsigned char *edid;                  /**< 128 bytes */
 } devtree_t;
 
+enum pmac_model {
+       AAPL_3400,
+       AAPL_3500,
+       AAPL_7200,
+       AAPL_7300,
+       AAPL_7500,
+       AAPL_8500,
+       AAPL_9500,
+       AAPL_Gossamer,
+       AAPL_PowerBook1998,
+       AAPL_PowerMac_G3,
+       AAPL_ShinerESB,
+       AAPL_e407,
+       AAPL_e411,
+       PowerBook1_1,
+       PowerBook2_1,
+       PowerBook2_2,
+       PowerBook3_1,
+       PowerBook3_2,
+       PowerBook3_3,
+       PowerBook3_4,
+       PowerBook3_5,
+       PowerBook4_1,
+       PowerBook4_2,
+       PowerBook4_3,
+       PowerBook5_1,
+       PowerBook5_2,
+       PowerBook5_3,
+       PowerBook5_4,
+       PowerBook5_5,
+       PowerBook5_6,
+       PowerBook5_7,
+       PowerBook5_8,
+       PowerBook5_9,
+       PowerBook6_1,
+       PowerBook6_2,
+       PowerBook6_3,
+       PowerBook6_4,
+       PowerBook6_5,
+       PowerBook6_7,
+       PowerBook6_8,
+       PowerMac1_1,
+       PowerMac1_2,
+       PowerMac10_1,
+       PowerMac11_2,
+       PowerMac12_1,
+       PowerMac2_1,
+       PowerMac2_2,
+       PowerMac3_1,
+       PowerMac3_2,
+       PowerMac3_3,
+       PowerMac3_4,
+       PowerMac3_5,
+       PowerMac3_6,
+       PowerMac4_1,
+       PowerMac4_2,
+       PowerMac4_4,
+       PowerMac5_1,
+       PowerMac6_1,
+       PowerMac6_3,
+       PowerMac6_4,
+       PowerMac7_2,
+       PowerMac7_3,
+       PowerMac8_1,
+       PowerMac9_1,
+       RackMac1_1,
+       RackMac1_2,
+       RackMac3_1,
+       iMac_1,
+};
+/**
+ * @brief PowerMac model matching
+ */
+struct pmac_mb_def {
+  enum pmac_model model;
+  const char *string;
+};
 
 /**
  * @brief Device/CU model numbers for S/390
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/hd/kbd.c new/hwinfo-13.44/src/hd/kbd.c
--- old/hwinfo-13.42/src/hd/kbd.c       2006-11-21 13:47:54.000000000 +0100
+++ new/hwinfo-13.44/src/hd/kbd.c       2007-08-15 12:26:10.000000000 +0200
@@ -148,13 +148,19 @@
       ADD2LOG(DEV_CONSOLE ": major %u, minor %u\n", tty_major, tty_minor);
     }
 
-    if(tty_major == 229 /* iseries hvc */) {
+    if (0)
+           ;
+#ifdef __powerpc__
+    else if(tty_major == 229 /* iseries hvc */) {
       if (tty_minor >= 128) {
         str_printf(&dev, 0, "hvsi%u", tty_minor-128);
       } else {
         str_printf(&dev, 0, "hvc%u", tty_minor);
       }
+    } else if (tty_major == 204 /* SERIAL_PSC_MAJOR */ && tty_minor == 148 /* SERIAL_PSC_MINOR */) {
+        str_printf(&dev, 0, "ttyPSC0"); /* EFIKA5K2 */
     }
+#endif /* __powerpc__ */
     else if(!ioctl(fd, TIOCGSERIAL, &ser_info)) {
       ADD2LOG("serial console at line %d\n", ser_info.line);
       str_printf(&dev, 0, "ttyS%d", ser_info.line);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/hd/net.c new/hwinfo-13.44/src/hd/net.c
--- old/hwinfo-13.42/src/hd/net.c       2007-08-08 15:43:56.000000000 +0200
+++ new/hwinfo-13.44/src/hd/net.c       2007-08-15 12:20:55.000000000 +0200
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <ctype.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <inttypes.h>
@@ -152,77 +153,6 @@
       get_driverinfo(hd_data, hd);
     }
 
-    hd_card = NULL;
-
-    if(sf_dev) {
-      hd->sysfs_device_link = new_str(hd_sysfs_id(sf_dev)); 
-
-      hd_card = hd_find_sysfs_id(hd_data, hd_sysfs_id(sf_dev));
-      if(hd_card) {
-        hd->attached_to = hd_card->idx;
-
-        /* for cards with strange pci classes */
-        hd_set_hw_class(hd_card, hw_network_ctrl);
-
-        /* add hw addr to network card */
-        if(res1) {
-          u = 0;
-          for(res = hd_card->res; res; res = res->next) {
-            if(
-              res->any.type == res_hwaddr &&
-              !strcmp(res->hwaddr.addr, res1->hwaddr.addr)
-            ) {
-              u = 1;
-              break;
-            }
-          }
-          if(!u) {
-            res = new_mem(sizeof *res);
-            res->hwaddr.type = res_hwaddr;
-            res->hwaddr.addr = new_str(res1->hwaddr.addr);
-            add_res_entry(&hd_card->res, res);
-          }
-        }
-        /* add interface names */
-        add_if_name(hd_card, hd);
-      }
-    }
-
-    if(!hd_card && hw_addr) {
-      /* try to find card based on hwaddr (for prom-based cards) */
-
-      for(hd_card = hd_data->hd; hd_card; hd_card = hd_card->next) {
-        if(
-          hd_card->base_class.id != bc_network ||
-          hd_card->sub_class.id != 0
-        ) continue;
-        for(res = hd_card->res; res; res = res->next) {
-          if(
-            res->any.type == res_hwaddr &&
-            !strcmp(hw_addr, res->hwaddr.addr)
-          ) break;
-        }
-        if(res) {
-          hd->attached_to = hd_card->idx;
-          break;
-        }
-      }
-    }
-
-    hw_addr = free_mem(hw_addr);
-
-#if 0
-    "ctc"    sc_nif_ctc
-    "iucv"   sc_nif_iucv
-    "hsi"    sc_nif_hsi
-    "qeth"   sc_nif_qeth
-    "escon"  sc_nif_escon
-    "myri"   sc_nif_myrinet
-    "wlan"   sc_nif_wlan
-    "xp"     sc_nif_xp
-    "usb"    sc_nif_usb
-#endif
-
     switch(if_type) {
       case ARPHRD_ETHER:       /* eth */
         hd->sub_class.id = sc_nif_ethernet;
@@ -244,6 +174,8 @@
         hd->sub_class.id = sc_nif_fc;
         break;
 #endif
+      default:
+        hd->sub_class.id = sc_nif_other;
     }
 
     if(!strcmp(hd->unix_dev_name, "lo")) {
@@ -302,9 +234,74 @@
       hd->slot = u;
     }
     /* ##### add more interface names here */
+    else {
+      for(s = hd->unix_dev_name; *s; s++) if(isdigit(*s)) break;
+      if(*s && (u = strtoul(s, &s, 10), !*s)) {
+        hd->slot = u;
+      }
+    }
 
     hd->bus.id = bus_none;
 
+    hd_card = NULL;
+
+    if(sf_dev) {
+      hd->sysfs_device_link = new_str(hd_sysfs_id(sf_dev)); 
+
+      hd_card = hd_find_sysfs_id(hd_data, hd_sysfs_id(sf_dev));
+      if(hd_card) {
+        hd->attached_to = hd_card->idx;
+
+        /* for cards with strange pci classes */
+        hd_set_hw_class(hd_card, hw_network_ctrl);
+
+        /* add hw addr to network card */
+        if(res1) {
+          u = 0;
+          for(res = hd_card->res; res; res = res->next) {
+            if(
+              res->any.type == res_hwaddr &&
+              !strcmp(res->hwaddr.addr, res1->hwaddr.addr)
+            ) {
+              u = 1;
+              break;
+            }
+          }
+          if(!u) {
+            res = new_mem(sizeof *res);
+            res->hwaddr.type = res_hwaddr;
+            res->hwaddr.addr = new_str(res1->hwaddr.addr);
+            add_res_entry(&hd_card->res, res);
+          }
+        }
+        /* add interface names */
+        add_if_name(hd_card, hd);
+      }
+    }
+
+    if(!hd_card && hw_addr) {
+      /* try to find card based on hwaddr (for prom-based cards) */
+
+      for(hd_card = hd_data->hd; hd_card; hd_card = hd_card->next) {
+        if(
+          hd_card->base_class.id != bc_network ||
+          hd_card->sub_class.id != 0
+        ) continue;
+        for(res = hd_card->res; res; res = res->next) {
+          if(
+            res->any.type == res_hwaddr &&
+            !strcmp(hw_addr, res->hwaddr.addr)
+          ) break;
+        }
+        if(res) {
+          hd->attached_to = hd_card->idx;
+          break;
+        }
+      }
+    }
+
+    hw_addr = free_mem(hw_addr);
+
     /* fix card type */
     if(hd_card) {
       if(
@@ -731,12 +728,23 @@
  */
 void add_if_name(hd_t *hd_card, hd_t *hd)
 {
+  str_list_t *sl0;
+
   if(hd->unix_dev_name) {
     if(!search_str_list(hd_card->unix_dev_names, hd->unix_dev_name)) {
-      add_str_list(&hd_card->unix_dev_names, hd->unix_dev_name);
-    }
-    if(!hd_card->unix_dev_name) {
-      hd_card->unix_dev_name = new_str(hd->unix_dev_name);
+      if(hd->sub_class.id == sc_nif_other) {
+        /* add at end */
+        add_str_list(&hd_card->unix_dev_names, hd->unix_dev_name);
+      }
+      else {
+        /* add at top */
+        sl0 = new_mem(sizeof *sl0);
+        sl0->next = hd_card->unix_dev_names;
+        sl0->str = new_str(hd->unix_dev_name);
+        hd_card->unix_dev_names = sl0;
+      }
+      free_mem(hd_card->unix_dev_name);
+      hd_card->unix_dev_name = new_str(hd_card->unix_dev_names->str);
     }
   }
 }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/hd/pci.c new/hwinfo-13.44/src/hd/pci.c
--- old/hwinfo-13.42/src/hd/pci.c       2007-08-08 15:43:56.000000000 +0200
+++ new/hwinfo-13.44/src/hd/pci.c       2007-08-15 12:34:41.000000000 +0200
@@ -52,6 +52,7 @@
 static void hd_read_xen(hd_data_t *hd_data);
 static void hd_read_ps3_system_bus(hd_data_t *hd_data);
 static void hd_read_platform(hd_data_t *hd_data);
+static void hd_read_of_platform(hd_data_t *hd_data);
 static void add_xen_network(hd_data_t *hd_data);
 static void add_xen_storage(hd_data_t *hd_data);
 
@@ -93,6 +94,9 @@
   
   PROGRESS(7, 0, "platform");
   hd_read_platform(hd_data);
+
+  PROGRESS(8, 0, "of_platform");
+  hd_read_of_platform(hd_data);
 }
 
 
@@ -803,7 +807,100 @@
   free_str_list(sf_bus);
 }
 
+/*
+ * Get platform data from sysfs.
+ */
+void hd_read_of_platform(hd_data_t *hd_data)
+{
+  char *s, *modalias;
+  str_list_t *sf_bus, *sf_bus_e;
+  hd_t *hd;
+  char *sf_dev;
+
+  sf_bus = reverse_str_list(read_dir("/sys/bus/of_platform/devices", 'l'));
+
+  if(!sf_bus) {
+    ADD2LOG("sysfs: no such bus: of_platform\n");
+    return;
+  }
 
+  for(sf_bus_e = sf_bus; sf_bus_e; sf_bus_e = sf_bus_e->next) {
+    sf_dev = new_str(hd_read_sysfs_link("/sys/bus/of_platform/devices", sf_bus_e->str));
+    ADD2LOG(
+      "  of_platform device: name = %s\n    path = %s\n",
+      sf_bus_e->str, hd_sysfs_id(sf_dev)
+    );
+    if((modalias = get_sysfs_attr_by_path(sf_dev, "modalias"))) {
+      int len = strlen(modalias);
+      if (len > 0 && modalias[len - 1] == '\n')
+             modalias[len - 1] = '\0';
+      ADD2LOG("    modalias = \"%s\"\n", modalias);
+      if (0) ;
+      else if (strstr(modalias, "Cmpc5200-fec")) {
+               /* EFIKA52K network */
+          hd = add_hd_entry(hd_data, __LINE__, 0);
+
+          hd->vendor.id = MAKE_ID(TAG_PCI, 0x1957); /* Freescale */
+          hd->base_class.id = bc_network;
+          hd->sub_class.id = 0;     /* ethernet */
+          str_printf(&hd->device.name, 0, "mpc5200 Ethernet %d", hd->slot);
+
+          hd->modalias = new_str(modalias);
+
+          hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
+          hd->sysfs_bus_id = new_str(sf_bus_e->str);
+          s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
+          if(s) add_str_list(&hd->drivers, s);
+      } else if (strstr(modalias, "Cmpc5200-ata")) {
+               /* EFIKA52K SATA */
+          hd = add_hd_entry(hd_data, __LINE__, 0);
+
+          hd->vendor.id = MAKE_ID(TAG_PCI, 0x1957); /* Freescale */
+          hd->base_class.id = bc_storage;
+          hd->sub_class.id = sc_sto_ide;    /* 2.5" disk */
+          str_printf(&hd->device.name, 0, "mpc5200 SATA %d", hd->slot);
+
+          hd->modalias = new_str(modalias);
+
+          hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
+          hd->sysfs_bus_id = new_str(sf_bus_e->str);
+          s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
+          if(s) add_str_list(&hd->drivers, s);
+      } else if (strstr(modalias, "Cmpc5200-psc-ac97")) {
+               /* EFIKA52K sound */
+          hd = add_hd_entry(hd_data, __LINE__, 0);
+
+          hd->vendor.id = MAKE_ID(TAG_PCI, 0x1957); /* Freescale */
+          hd->base_class.id = bc_multimedia;
+          hd->sub_class.id = sc_multi_audio;
+          str_printf(&hd->device.name, 0, "mpc5200 AC97 %d", hd->slot);
+
+          hd->modalias = new_str(modalias);
+
+          hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
+          hd->sysfs_bus_id = new_str(sf_bus_e->str);
+          s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
+          if(s) add_str_list(&hd->drivers, s);
+      } else if (strstr(modalias, "Cmpc5200-usb")) {
+               /* EFIKA52K USB */
+          hd = add_hd_entry(hd_data, __LINE__, 0);
+
+          hd->vendor.id = MAKE_ID(TAG_PCI, 0x1957); /* Freescale */
+          hd->base_class.id = bc_serial;
+          str_printf(&hd->device.name, 0, "mpc5200 USB %d", hd->slot);
+
+          hd->modalias = new_str(modalias);
+
+          hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
+          hd->sysfs_bus_id = new_str(sf_bus_e->str);
+          s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
+          if(s) add_str_list(&hd->drivers, s);
+      }
+    }
+    free_mem(sf_dev);
+  }
+  free_str_list(sf_bus);
+}
 
 /*
  * Get ps3 data from sysfs.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/hd/prom.c new/hwinfo-13.44/src/hd/prom.c
--- old/hwinfo-13.42/src/hd/prom.c      2007-08-08 15:43:56.000000000 +0200
+++ new/hwinfo-13.44/src/hd/prom.c      2007-08-10 16:04:21.000000000 +0200
@@ -36,6 +36,82 @@
 
 static unsigned veth_cnt, vscsi_cnt;
 static unsigned snd_aoa_layout_id;
+static enum pmac_model model;
+static devtree_t *devtree_edid;
+
+static const struct pmac_mb_def pmac_mb[] = {
+#ifndef __powerpc64__
+       { iMac_1,       "iMac,1" },   /* iMac (first generation) */
+       { AAPL_3400,    "AAPL,3400/2400" },   /* PowerBook 3400 */
+       { AAPL_3500,    "AAPL,3500" },        /* PowerBook 3500 */
+       { AAPL_7200,    "AAPL,7200" },        /* PowerMac 7200 */
+       { AAPL_7300,    "AAPL,7300" },        /* PowerMac 7200/7300 */
+       { AAPL_7500,    "AAPL,7500" },        /* PowerMac 7500 */
+       { AAPL_8500,    "AAPL,8500" },        /* PowerMac 8500/8600 */
+       { AAPL_9500,    "AAPL,9500" },        /* PowerMac 9500/9600 */
+       { AAPL_Gossamer,        "AAPL,Gossamer" },    /* PowerMac G3 (Gossamer) */
+       { AAPL_PowerBook1998,   "AAPL,PowerBook1998" },       /* PowerBook Wallstreet */
+       { AAPL_PowerMac_G3,     "AAPL,PowerMac G3" }, /* PowerMac G3 (Silk) */
+       { AAPL_ShinerESB,       "AAPL,ShinerESB" },   /* Apple Network Server */
+       { AAPL_e407,    "AAPL,e407" },        /* Alchemy */
+       { AAPL_e411,    "AAPL,e411" },        /* Gazelle */
+       { PowerBook1_1, "PowerBook1,1" },     /* PowerBook 101 (Lombard) */
+       { PowerBook2_1, "PowerBook2,1" },     /* iBook (first generation) */
+       { PowerBook2_2, "PowerBook2,2" },     /* iBook FireWire */
+       { PowerBook3_1, "PowerBook3,1" },     /* PowerBook Pismo */
+       { PowerBook3_2, "PowerBook3,2" },     /* PowerBook Titanium */
+       { PowerBook3_3, "PowerBook3,3" },     /* PowerBook Titanium II */
+       { PowerBook3_4, "PowerBook3,4" },     /* PowerBook Titanium III */
+       { PowerBook3_5, "PowerBook3,5" },     /* PowerBook Titanium IV */
+       { PowerBook4_1, "PowerBook4,1" },     /* iBook 2 */
+       { PowerBook4_2, "PowerBook4,2" },     /* iBook 2 */
+       { PowerBook4_3, "PowerBook4,3" },     /* iBook 2 rev. 2 */
+       { PowerBook5_1, "PowerBook5,1" },     /* PowerBook G4 17" */
+       { PowerBook5_2, "PowerBook5,2" },     /* PowerBook G4 15" */
+       { PowerBook5_3, "PowerBook5,3" },     /* PowerBook G4 17" */
+       { PowerBook5_4, "PowerBook5,4" },     /* PowerBook G4 15" */
+       { PowerBook5_5, "PowerBook5,5" },     /* PowerBook G4 17" */
+       { PowerBook5_6, "PowerBook5,6" },     /* PowerBook G4 15" */
+       { PowerBook5_7, "PowerBook5,7" },     /* PowerBook G4 17" */
+       { PowerBook5_8, "PowerBook5,8" },     /* PowerBook G4 15" */
+       { PowerBook5_9, "PowerBook5,9" },     /* PowerBook G4 17" */
+       { PowerBook6_1, "PowerBook6,1" },     /* PowerBook G4 12" */
+       { PowerBook6_2, "PowerBook6,2" },     /* PowerBook G4 */
+       { PowerBook6_3, "PowerBook6,3" },     /* iBook G4 */
+       { PowerBook6_4, "PowerBook6,4" },     /* PowerBook G4 12" */
+       { PowerBook6_5, "PowerBook6,5" },     /* iBook G4 */
+       { PowerBook6_7, "PowerBook6,7" },     /* iBook G4 */
+       { PowerBook6_8, "PowerBook6,8" },     /* PowerBook G4 12" */
+       { PowerMac1_1,  "PowerMac1,1" },      /* Blue&White G3 */
+       { PowerMac1_2,  "PowerMac1,2" },      /* PowerMac G4 PCI Graphics */
+       { PowerMac2_1,  "PowerMac2,1" },      /* iMac FireWire */
+       { PowerMac2_2,  "PowerMac2,2" },      /* iMac FireWire */
+       { PowerMac3_1,  "PowerMac3,1" },      /* PowerMac G4 AGP Graphics */
+       { PowerMac3_2,  "PowerMac3,2" },      /* PowerMac G4 AGP Graphics */
+       { PowerMac3_3,  "PowerMac3,3" },      /* PowerMac G4 AGP Graphics */
+       { PowerMac3_4,  "PowerMac3,4" },      /* PowerMac G4 Silver */
+       { PowerMac3_5,  "PowerMac3,5" },      /* PowerMac G4 Silver */
+       { PowerMac3_6,  "PowerMac3,6" },      /* PowerMac G4 Windtunnel */
+       { PowerMac4_1,  "PowerMac4,1" },      /* iMac "Flower Power" */
+       { PowerMac4_2,  "PowerMac4,2" },      /* Flat panel iMac */
+       { PowerMac4_4,  "PowerMac4,4" },      /* eMac */
+       { PowerMac5_1,  "PowerMac5,1" },      /* PowerMac G4 Cube */
+       { PowerMac6_1,  "PowerMac6,1" },      /* Flat panel iMac */
+       { PowerMac6_3,  "PowerMac6,3" },      /* Flat panel iMac */
+       { PowerMac6_4,  "PowerMac6,4" },      /* eMac */
+       { RackMac1_1,   "RackMac1,1" },       /* XServe */
+       { RackMac1_2,   "RackMac1,2" },       /* XServe rev. 2 */
+#endif /* __powerpc64__ */
+       { PowerMac7_2,  "PowerMac7,2" },      /* PowerMac G5 */
+       { PowerMac7_3,  "PowerMac7,3" },      /* PowerMac G5 */
+       { PowerMac8_1,  "PowerMac8,1" },      /* iMac G5 */
+       { PowerMac9_1,  "PowerMac9,1" },      /* PowerMac G5 */
+       { PowerMac10_1, "PowerMac10,1" },     /* Mac mini */
+       { PowerMac11_2, "PowerMac11,2" },     /* PowerMac G5 Dual Core */
+       { PowerMac12_1, "PowerMac12,1" },     /* iMac G5 (iSight) */
+       { RackMac3_1,   "RackMac3,1" },       /* XServe G5 */
+       { }
+};
 
 int detect_smp_prom(hd_data_t *hd_data)
 {
@@ -51,8 +127,211 @@
   return cpus > 1 ? cpus : 0;
 }
 
-static void prom_add_pmac_devices(hd_data_t *hd_data)
-{
+#define HSYNCP (( 1 << 1 ))
+#define HSYNCM (( 1 << 2 ))
+#define VSYNCP (( 1 << 3 ))
+#define VSYNCM (( 1 << 4 ))
+
+struct modelist {
+       unsigned short clock;
+       unsigned short width, height;
+       unsigned short hblank, hsync_ofs, hsync;
+       unsigned short vblank, vsync_ofs, vsync;
+       unsigned short flags;
+       unsigned char e0x23, e0x24;
+       unsigned char min_hsync, max_hsync;
+       unsigned char min_vsync, max_vsync;
+};
+
+static const struct modelist mode_800x600_60 = {
+       .clock = 39955 / 10,
+       .width = 800,
+       .height = 600,
+       .hblank = 256,
+       .hsync_ofs = 56,
+       .hsync = 128,
+       .vblank = 23,
+       .vsync_ofs = 1,
+       .vsync = 4,
+       .e0x23 = (1 << 0),
+};
+static const struct modelist mode_1024x768_60 = {
+       .clock = 65000 / 10,
+       .width = 1024,
+       .height = 768,
+       .hblank = 320,
+       .hsync_ofs = 40,
+       .hsync = 136,
+       .vblank = 29,
+       .vsync_ofs = 3,
+       .vsync = 6,
+       .e0x24 = (1 << 3),
+};
+/* Modeline "1024x768-74" 80.71  1024 1080 1192 1360  768 769 772 802 +hsync +vsync */
+static const struct modelist mode_1024x768_75 = {
+       .clock = 80711 / 10,
+       .width = 1024,
+       .height = 768,
+       .hblank = 336,
+       .hsync_ofs = 56,
+       .hsync = 112,
+       .vblank = 34,
+       .vsync_ofs = 1,
+       .vsync = 3,
+       .flags = VSYNCP | HSYNCP,
+       .e0x24 = (1 << 1),
+       .min_vsync = 74,
+       .max_vsync = 116,
+       .min_hsync = 59,
+       .max_hsync = 60,
+};
+/* Modeline "800x600-94" 63.89  800 848 936 1072  600 601 604 634 +vsync +hsync */
+static const struct modelist mode_800x600_94 = {
+       .clock = 63890 / 10,
+       .width = 800,
+       .height = 600,
+       .hblank = 272,
+       .hsync_ofs = 48,
+       .hsync = 88,
+       .vblank = 34,
+       .vsync_ofs = 1,
+       .vsync = 3,
+       .flags = VSYNCP | HSYNCP,
+};
+/* Modeline "640x480-116" 50.56  640 680 744 848  480 481 484 514 +vsync +hsync */
+static const struct modelist mode_640x480_116 = {
+       .clock = 50560 / 10,
+       .width = 640,
+       .height = 480,
+       .hblank = 208,
+       .hsync_ofs = 20,
+       .hsync = 64,
+       .vblank = 34,
+       .vsync_ofs = 1,
+       .vsync = 3,
+       .flags = VSYNCP | HSYNCP,
+};
+
+static void prom_add_first_detailed_timing(unsigned char *e, unsigned short width_mm, unsigned short height_mm, const struct modelist *m)
+{
+       unsigned char i;
+       i = 0x36;
+       e[i + 0] = e[i + 1] = e[i + 2] = 0;
+       e[i + 3] = 0xfd;
+       e[i + 5] = m->min_vsync;
+       e[i + 6] = m->max_vsync;
+       e[i + 7] = m->min_hsync;
+       e[i + 8] = m->max_hsync;
+}
+static void prom_add_detailed_timing(int num, unsigned char *e, unsigned short width_mm, unsigned short height_mm, const struct modelist *m)
+{
+       unsigned char i;
+       i = 0x36 + (num * 0x12);
+       e[i + 0] = (m->clock) & 0x00ff;
+       e[i + 1] = ((m->clock) & 0xff00) >> 8;
+       e[i + 2] = m->width & 0x00ff;
+       e[i + 4] |= ((m->width & 0x0f00) >> 8) << 4;
+       e[i + 5] = m->height & 0x00ff;
+       e[i + 7] |= ((m->height & 0x0f00) >> 8) << 4;
+       e[i + 12] |= width_mm & 0x00ff;
+       e[i + 14] |= ((width_mm & 0x0f00) >> 8) << 4;
+       e[i + 13] |= height_mm & 0x00ff;
+       e[i + 14] |= (height_mm & 0x0f00) >> 8;
+       e[i + 3] = m->hblank & 0x00ff;
+       e[i + 4] |= (m->hblank & 0x0f01) >> 8;
+       e[i + 8] = m->hsync_ofs & 0x00ff;
+       e[i + 11] |= ((m->hsync_ofs & 0x0300) >> 8) << 2;
+       e[i + 9] = m->hsync & 0x00ff;
+       e[i + 11] |= (m->hsync & 0x0300) >> 8;
+       e[i + 6] = m->vblank & 0x00ff;
+       e[i + 7] |= (m->vblank & 0x0f00) >> 8;
+       e[i + 10] |= (m->vsync_ofs & 0x000f) << 4;
+       e[i + 11] |= ((m->vsync_ofs & 0x0030) >> 4) << 2;
+       e[i + 10] |= m->vsync & 0x000f;
+       e[i + 11] |= (m->vsync & 0x0030) >> 4;
+       if (m->flags) {
+               e[i + 17] |= 3 << 3;
+               if (m->flags & HSYNCP)
+                       e[i + 17] |= 0x4;
+               if (m->flags & HSYNCM)
+                       e[i + 17] &= ~0x4;
+               if (m->flags & VSYNCP)
+                       e[i + 17] |= 0x2;
+               if (m->flags & VSYNCM)
+                       e[i + 17] &= ~0x2;
+       }
+}
+
+static void prom_add_edid_data(int model)
+{
+       unsigned char e[0x80];
+       unsigned short width_mm, height_mm, crt_imac;
+       const struct modelist *m;
+       memset(e, 0, sizeof(e));
+       width_mm = height_mm = crt_imac = 0;
+       m = NULL;
+       switch (model) {
+       case PowerBook2_1:      /* mach64 */
+       case PowerBook2_2:      /* r128 */
+               width_mm = 247;
+               height_mm = 186;
+               m = &mode_800x600_60;
+               break;
+       case AAPL_PowerBook1998:        /* mach64 */
+       case PowerBook1_1:      /* r128 */
+       case PowerBook3_1:      /* r128 */
+               width_mm = 286;
+               height_mm = 214;
+               m = &mode_1024x768_60;
+               break;
+       case iMac_1:            /* mach64 */
+       case PowerMac2_1:       /* r128 */
+       case PowerMac2_2:       /* r128 */
+       case PowerMac4_1:       /* r128 */
+               crt_imac = 1;
+               width_mm = 286;
+               height_mm = 212;
+               m = &mode_1024x768_75;
+               break;
+       case AAPL_3400: /* 800x600 chipsfb */
+       case AAPL_3500: /* 800x600 chipsfb */
+       default:
+               return;
+       };
+       e[0x12] = 0x01;
+       e[0x13] = 0x03;
+       e[0x08] = 0x06;         /* high vendor Apple */
+       e[0x09] = 0x10;         /* low */
+       e[0x0a] = (unsigned char)model; /* low */
+       e[0x0b] = 0x42;         /* high device */
+       if (m->e0x23)
+               e[0x23] = m->e0x23;
+       if (m->e0x24)
+               e[0x24] = m->e0x24;
+       prom_add_first_detailed_timing(e, width_mm, height_mm, m);
+       prom_add_detailed_timing(1, e, width_mm, height_mm, m);
+       if (crt_imac && 0) {
+               prom_add_detailed_timing(2, e, width_mm, height_mm, &mode_800x600_94);
+               prom_add_detailed_timing(3, e, width_mm, height_mm, &mode_640x480_116);
+       }
+       if (!devtree_edid->edid)
+               devtree_edid->edid = malloc(sizeof(e));
+       memcpy(devtree_edid->edid, e, sizeof(e));
+}
+
+static void prom_add_pmac_devices(hd_data_t *hd_data, const unsigned char *buf)
+{
+       const struct pmac_mb_def *m = pmac_mb;
+
+       while (m->string) {
+               if (strcmp(buf, m->string) == 0) {
+                       model = m->model;
+                       break;
+               }
+               m++;
+       }
+       if (model)
+               prom_add_edid_data(model);
        hd_t *hd;
        hd = add_hd_entry(hd_data, __LINE__, 0);
        hd->bus.id = bus_none;
@@ -85,6 +364,13 @@
   PROGRESS(1, 0, "devtree");
 
   read_devtree(hd_data);
+  if((f = fopen(PROC_PROM "/compatible", "r"))) {
+    if(fread(buf, 1, sizeof(buf), f) > 2) {
+      if(memmem(buf, sizeof(buf),"MacRISC", 7))
+         prom_add_pmac_devices(hd_data, buf);
+    }
+    fclose(f);
+  }
   if(hd_data->debug) dump_devtree_data(hd_data);
   add_devices(hd_data);
 
@@ -107,13 +393,6 @@
 
     fclose(f);
   }
-  if((f = fopen(PROC_PROM "/compatible", "r"))) {
-    if(fread(buf, 1, sizeof(buf), f) > 2) {
-      if(memmem(buf, sizeof(buf),"MacRISC", 7))
-             prom_add_pmac_devices(hd_data);
-    }
-    fclose(f);
-  }
 
 }
 
@@ -240,6 +519,8 @@
   read_int(path, "subsystem-id", &devtree->subdevice_id);
   read_int(path, "revision-id", &devtree->revision_id);
 
+  if(devtree_edid == NULL && devtree->device_type && strcmp(devtree->device_type, "display") == 0)
+    devtree_edid = devtree;
   read_mem(path, "EDID", &devtree->edid, 0x80);
   if(!devtree->edid) read_mem(path, "DFP,EDID", &devtree->edid, 0x80);
   if(!devtree->edid) read_mem(path, "LCD,EDID", &devtree->edid, 0x80);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/ids/src/x11.amd64 new/hwinfo-13.44/src/ids/src/x11.amd64
--- old/hwinfo-13.42/src/ids/src/x11.amd64      2007-08-08 15:43:52.000000000 +0200
+++ new/hwinfo-13.44/src/ids/src/x11.amd64      2007-08-15 12:32:04.000000000 +0200
@@ -3394,6 +3394,11 @@
 +driver.xfree          4|nv
 
  vendor.id             pci 0x10de
+&device.id         pci 0x03d0
++device.name           GeForce 6100 nForce 430
++driver.xfree          4|nv
+
+ vendor.id             pci 0x10de
 &device.id         pci 0x0400
 +device.name           GeForce 8600 GTS
 +driver.xfree          4|nv
@@ -3921,6 +3926,14 @@
 
  vendor.id             pci 0x8086
 &device.id         pci 0x27a2
+&subvendor.id              pci 0x10cf
+&subdevice.id              pci 0x137a
++subdevice.name                945 GM FSC Lifebook E8110
++driver.xfree          4|i810
++driver.xfree          4|i810|3d||dri
+
+ vendor.id             pci 0x8086
+&device.id         pci 0x27a2
 &subvendor.id              pci 0x1734
 &subdevice.id              pci 0x10ad
 +subdevice.name                945 GM (FSC Amilo Si1520)
@@ -4000,6 +4013,14 @@
 
  vendor.id             pci 0x8086
 &device.id         pci 0x3582
+&subvendor.id              pci 0x1025
+&subdevice.id              pci 0x0035
++subdevice.name                855 GM Travelmate 661
++driver.xfree          4|i810
++driver.xfree          4|i810|3d
+
+ vendor.id             pci 0x8086
+&device.id         pci 0x3582
 &subvendor.id              pci 0x1584
 &subdevice.id              pci 0x9500
 +subdevice.name                855 GM
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/ids/src/x11.i386 new/hwinfo-13.44/src/ids/src/x11.i386
--- old/hwinfo-13.42/src/ids/src/x11.i386       2007-08-08 15:43:53.000000000 +0200
+++ new/hwinfo-13.44/src/ids/src/x11.i386       2007-08-15 12:32:05.000000000 +0200
@@ -3394,6 +3394,11 @@
 +driver.xfree          4|nv
 
  vendor.id             pci 0x10de
+&device.id         pci 0x03d0
++device.name           GeForce 6100 nForce 430
++driver.xfree          4|nv
+
+ vendor.id             pci 0x10de
 &device.id         pci 0x0400
 +device.name           GeForce 8600 GTS
 +driver.xfree          4|nv
@@ -3921,6 +3926,14 @@
 
  vendor.id             pci 0x8086
 &device.id         pci 0x27a2
+&subvendor.id              pci 0x10cf
+&subdevice.id              pci 0x137a
++subdevice.name                945 GM FSC Lifebook E8110
++driver.xfree          4|i810
++driver.xfree          4|i810|3d||dri
+
+ vendor.id             pci 0x8086
+&device.id         pci 0x27a2
 &subvendor.id              pci 0x1734
 &subdevice.id              pci 0x10ad
 +subdevice.name                945 GM (FSC Amilo Si1520)
@@ -4000,6 +4013,14 @@
 
  vendor.id             pci 0x8086
 &device.id         pci 0x3582
+&subvendor.id              pci 0x1025
+&subdevice.id              pci 0x0035
++subdevice.name                855 GM Travelmate 661
++driver.xfree          4|i810
++driver.xfree          4|i810|3d
+
+ vendor.id             pci 0x8086
+&device.id         pci 0x3582
 &subvendor.id              pci 0x1584
 &subdevice.id              pci 0x9500
 +subdevice.name                855 GM
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/ids/src/x11.ia64 new/hwinfo-13.44/src/ids/src/x11.ia64
--- old/hwinfo-13.42/src/ids/src/x11.ia64       2007-08-08 15:43:53.000000000 +0200
+++ new/hwinfo-13.44/src/ids/src/x11.ia64       2007-08-15 12:32:06.000000000 +0200
@@ -3017,6 +3017,11 @@
 +driver.xfree          4|nv
 
  vendor.id             pci 0x10de
+&device.id         pci 0x03d0
++device.name           GeForce 6100 nForce 430
++driver.xfree          4|nv
+
+ vendor.id             pci 0x10de
 &device.id         pci 0x0400
 +device.name           GeForce 8600 GTS
 +driver.xfree          4|nv
@@ -3536,6 +3541,12 @@
 
  vendor.id             pci 0x8086
 &device.id         pci 0x27a2
+&subvendor.id              pci 0x10cf
+&subdevice.id              pci 0x137a
++subdevice.name                945 GM FSC Lifebook E8110
+
+ vendor.id             pci 0x8086
+&device.id         pci 0x27a2
 &subvendor.id              pci 0x1734
 &subdevice.id              pci 0x10ad
 +subdevice.name                945 GM (FSC Amilo Si1520)
@@ -3603,6 +3614,13 @@
 
  vendor.id             pci 0x8086
 &device.id         pci 0x3582
+&subvendor.id              pci 0x1025
+&subdevice.id              pci 0x0035
++subdevice.name                855 GM Travelmate 661
++driver.xfree          4|i810
+
+ vendor.id             pci 0x8086
+&device.id         pci 0x3582
 &subvendor.id              pci 0x1584
 &subdevice.id              pci 0x9500
 +subdevice.name                855 GM
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/src/ids/src/x11.ppc new/hwinfo-13.44/src/ids/src/x11.ppc
--- old/hwinfo-13.42/src/ids/src/x11.ppc        2007-08-08 15:43:53.000000000 +0200
+++ new/hwinfo-13.44/src/ids/src/x11.ppc        2007-08-15 12:32:06.000000000 +0200
@@ -2850,6 +2850,11 @@
 +driver.xfree          4|nv
 
  vendor.id             pci 0x10de
+&device.id         pci 0x03d0
++device.name           GeForce 6100 nForce 430
++driver.xfree          4|nv
+
+ vendor.id             pci 0x10de
 &device.id         pci 0x0400
 +device.name           GeForce 8600 GTS
 +driver.xfree          4|nv
@@ -3404,6 +3409,13 @@
 
  vendor.id             pci 0x8086
 &device.id         pci 0x3582
+&subvendor.id              pci 0x1025
+&subdevice.id              pci 0x0035
++subdevice.name                855 GM Travelmate 661
++driver.xfree          4|i810
+
+ vendor.id             pci 0x8086
+&device.id         pci 0x3582
 &subvendor.id              pci 0x1584
 &subdevice.id              pci 0x9500
 +subdevice.name                855 GM
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hwinfo-13.42/VERSION new/hwinfo-13.44/VERSION
--- old/hwinfo-13.42/VERSION    2007-08-08 16:30:43.000000000 +0200
+++ new/hwinfo-13.44/VERSION    2007-08-15 12:21:46.000000000 +0200
@@ -1 +1 @@
-13.42
+13.44


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >