From owner-freebsd-drivers@FreeBSD.ORG Tue Sep 19 13:54:02 2006 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DD5A16A416 for ; Tue, 19 Sep 2006 13:54:02 +0000 (UTC) (envelope-from mail@sashi.de) Received: from server56.greatnet.de (server56.greatnet.de [83.133.97.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EF6A43D49 for ; Tue, 19 Sep 2006 13:53:56 +0000 (GMT) (envelope-from mail@sashi.de) Received: from [192.168.1.70] (unknown [84.245.168.227]) by server56.greatnet.de (Postfix) with ESMTP id 0BEAC60A7E; Tue, 19 Sep 2006 15:53:51 +0200 (CEST) Message-ID: <450FF6B2.2000908@sashi.de> Date: Tue, 19 Sep 2006 15:54:58 +0200 From: Marian Asokarajan User-Agent: Mozilla Thunderbird 1.0.6 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <450E571A.8030200@sashi.de> <20060918.083758.63053354.imp@bsdimp.com> <20060918.105709.179960957.imp@bsdimp.com> In-Reply-To: <20060918.105709.179960957.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-drivers@freebsd.org Subject: Re: SDHCI Device Driver (first steps) X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2006 13:54:02 -0000 M. Warner Losh wrote: > : : * NOTE: The driver is experimental and might crash your system! > > It crashes mine. I did tweak it a little to make it reconize the host oops. Seems chip 0x8033 doesn't follow specs definied by sdcard.org ?! I got the TI 0x803C by reading out driver details from a windows machine (HP Laptop) in a shopping mall :) > What's the current level? I didn't get it to see insert/remove from > my slot: What do you mean by "current level" ? > There's tests for slots that aren't quite right. It and's with 0x70, > but tests to see > 5, which it always will be if any of the bits are > set. Oops, huge bad mistake :( . Thanks for pointing that out. I forgot the prefix "0x". the line now says: if (sc->firstBARat>0x05 || sc->slots>0x50) ... > The code should use more of the higher level interfaces in > FreeBSD for accessing the pci bus. Could you please give me hint on that ? I thought bus_space_* is already an abstraction of the PCI bus (guess, I realy have to walk through the pccard sources). > The code should stive to be more style(9) compliant. Its style is so > different from the usual as to be difficult to read. I printed out the man pages and had it as my bedtime lecture ;) The code has been now "styled" a bit. I'll later setup a web page with current codefile. for now the code is available at: http://www.sashi.de/downloads/freebsd/sdhci/sdhcidd-current.tbz Regards, Sashi