From owner-freebsd-mobile Fri Apr 2 11: 8:19 1999 Delivered-To: freebsd-mobile@freebsd.org Received: from boreas.isi.edu (boreas.isi.edu [128.9.160.161]) by hub.freebsd.org (Postfix) with ESMTP id 6EB5514E0F for ; Fri, 2 Apr 1999 11:08:14 -0800 (PST) (envelope-from faber@ISI.EDU) Received: from ISI.EDU (vex-e.isi.edu [128.9.160.240]) by boreas.isi.edu (8.8.7/8.8.6) with ESMTP id LAA18797; Fri, 2 Apr 1999 11:07:43 -0800 (PST) Message-Id: <199904021907.LAA18797@boreas.isi.edu> X-Mailer: exmh version 2.0.2 2/24/98 To: Nate Williams Cc: Nick Sayer , freebsd-mobile@FreeBSD.ORG Subject: Re: Any success with CirrusLogic 6729/6730??? In-reply-to: Your message of "Fri, 02 Apr 1999 10:55:11 MST." <199904021755.KAA01627@mt.sri.com> X-Url: http://www.isi.edu/~faber Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 02 Apr 1999 11:07:42 -0800 From: Ted Faber Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Nate Williams wrote: >> I would like to very carefully merge some of the pcic_p.c initialization >> routines from PAO to -current. Or at least try. > >Send them to the mailing list at least for review. OK. :-) Hi Nate! Someone with a 6729 try applying this patch to pcic_p.[ch] (i.e., cd to /sys/pci and do patch < file ) and tell me if it recognizes your card. If it doesn't, send me the dmesg from a verbose boot, and we'll see what we can do. ---------------------------------------------------------------------- Ted Faber faber@isi.edu USC/ISI Computer Scientist http://www.isi.edu/~faber (310) 822-1511 x190 PGP Key: http://www.isi.edu/~faber/pubkey.asc *** pcic_p.c.orig Sun Dec 13 22:32:57 1998 --- pcic_p.c Fri Apr 2 10:56:36 1999 *************** *** 48,53 **** --- 48,54 ---- static void pcic_pci_attach(pcici_t, int); static void pd6832_legacy_init(pcici_t tag, int unit); + static void pd6729_init(pcici_t tag, int unit); static struct pci_device pcic_pci_driver = { "pcic", *************** *** 97,102 **** --- 98,106 ---- case PCI_DEVICE_ID_PCIC_CLPD6832: pd6832_legacy_init(config_id, unit); break; + case PCI_DEVICE_ID_PCIC_CLPD6729: + pd6729_init(config_id, unit); + break; } if (bootverbose) { *************** *** 188,193 **** --- 192,233 ---- /* After initializing 2 sockets, the chip is fully configured */ if (unit == 1) num6832++; + + if (bootverbose) + printf("CardBus: Legacy PC-card 16bit I/O address [0x%x]\n", + io_port); + } + /* + * Set up the CL-PD6729 This routine is called once per PCMCIA socket. + */ + static void + pd6729_init(pcici_t tag, int unit) + { + u_short io_port; /* the io_port to map this slot on */ + static int num6729 = 0; /* The number of 6832s initialized */ + + /* + * Some BIOS leave the legacy address uninitialized. This + * insures that the PD6829 puts itself where the driver will + * look. We assume that multiple 6829's should be laid out + * sequentially. We only initialize the first socket's legacy port, + * the other is a dummy. + */ + io_port = PCIC_INDEX_0 + num6729 * CLPD6729_NUM_REGS; + + /* + * Configure the I/O window to contain CLPD6832_NUM_REGS + * words. + */ + pci_conf_write(tag, CLPD6729_BASE0, io_port | 1); + + /* + * Set default operating mode (I/O port space) + */ + pci_conf_write(tag, PCI_COMMAND_STATUS_REG, CLPD6729_COMMAND_DEFAULTS ); + /* After initializing 2 sockets, the chip is fully configured */ + if (unit == 1) + num6729++; if (bootverbose) printf("CardBus: Legacy PC-card 16bit I/O address [0x%x]\n", *** pcic_p.h.orig Tue Jan 20 13:11:03 1998 --- pcic_p.h Fri Apr 2 10:56:24 1999 *************** *** 52,54 **** --- 52,62 ---- #define CLPD6832_NUM_REGS 2 /* End of CL-PD6832 defines */ + /* CL-PD6729 defines */ + #define CLPD6729_BASE0 0x0010 + + /* Configuration constants */ + #define CLPD6729_COMMAND_DEFAULTS 0x00000041 + #define CLPD6729_NUM_REGS 2 + + /* End of CL-PD6832 defines */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message