--- cy_pci.c.old	Mon Aug 31 23:06:29 1998
+++ cy_pci.c	Fri Sep 18 01:02:55 1998
@@ -37,6 +37,9 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
+#ifdef NEW_CONFIG
+#include <sys/device.h>
+#endif
 #include <vm/vm.h>
 #include <vm/pmap.h>
 
@@ -44,12 +47,26 @@
 
 #include <pci/cy_pcireg.h>
 
+#ifdef NEW_CONFIG
+static int cy_pci_match __P((struct device *, struct cfdata *, void *));
+static void cy_pci_attach __P((struct device *, struct device *, void *));
+#else
 static char *cy_probe		__P((pcici_t, pcidi_t));
 static void cy_attach		__P((pcici_t, int));
+#endif
 
 extern int cyattach_common(void *, int); /* Not exactly correct */
 extern void cyintr(int);
 
+#ifndef NEW_CONFIG
+struct cy_pci_softc {
+	struct  device cy_pci_dev;
+};
+
+struct cfattach cy_pci_ca = {
+	sizeof(struct cy_pci_softc), 1, NULL, cy_pci_match, cy_pci_attach,
+};
+#else
 static u_long cy_count;
 
 static struct pci_device cy_device = {
@@ -60,29 +77,34 @@
         NULL
 };
 DATA_SET(pcidevice_set, cy_device);
+#endif
 
-static char *
-cy_probe(config_id, device_id)
-	pcici_t config_id;
-	pcidi_t device_id;
+static int
+cy_pci_match (struct device *parent, struct cfdata *match, void *aux)
 {
+	struct pci_attach_args *pa = aux;
+	pcici_t config_id = pa->pa_tag;
+	pcidi_t device_id = pa->pa_type;
+
 	if ((device_id & 0xffff) == CY_VENDORID_CYCLADES &&
 	    ((device_id >> 16) == CY_DEVICEID_CYCLOM_Y_1 ||
 	     (device_id >> 16) == CY_DEVICEID_CYCLOM_Y_2))
-		return ("Cyclades Cyclom-Y Serial Adapter");
-	return NULL;
+		return (1);
+	return (0);
 }
 
 static void
-cy_attach(config_id, unit)
-	pcici_t config_id;
-	int unit;
+cy_pci_attach (struct device *parent, struct device *self, void *aux)
 {
+	struct pci_attach_args *pa = aux;
+	pcici_t config_id = pa->pa_tag;
+	int unit = self->dv_unit;
 	vm_offset_t paddr;
 	void *vaddr;
 	u_int32_t ioport;
 	int adapter;
 
+	printf (": Cyclades Cyclom-Y Serial Adapter\n")
 	ioport = (u_int32_t) pci_conf_read(config_id, CY_PCI_BASE_ADDR1) & ~0x3;
 	paddr = pci_conf_read(config_id, CY_PCI_BASE_ADDR2) & ~0xf;
 #if 0

