From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 2 19:32:43 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B3C22E76 for ; Tue, 2 Jul 2013 19:32:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-oa0-f52.google.com (mail-oa0-f52.google.com [209.85.219.52]) by mx1.freebsd.org (Postfix) with ESMTP id 7E65510F6 for ; Tue, 2 Jul 2013 19:32:43 +0000 (UTC) Received: by mail-oa0-f52.google.com with SMTP id g12so6965751oah.11 for ; Tue, 02 Jul 2013 12:32:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=WJX8nY5FtAUh8XSZVqZRdqmIVL8hRc4NBjKrJ/A0OaQ=; b=Q1ohGeyvYQ+JVDrZ529Q0g7FA2HDFxp/5zJlkedlmBRVGj2PXDcIRYi7xubdeZQy11 8TctV1R45sb5oNsQ1qcfzpSjFfTDMoPEBM78zJ7FjZW5uzLMclwTVLwuyp+dQlJyN3ZA Rfgdq7MiRKI5afE1qOC2ucOGHCxU1RdPb7z3bJHaB6TACnf9pAMk1xloW+DcYMvVjGLs XZyRnOfoQm6UrOBPlTgUbsfeqad9OgbstPvMlKWQ6ie5PflzC09kR2Lp36Bo+nOH6E4F 8PoMTZkFwnxN2bD1BcnZFB7msINcgNH39y5JPXaKKTeRugKQNyUBMWbWsLLob45HBUtT H7Jg== X-Received: by 10.60.54.39 with SMTP id g7mr12329487oep.18.1372793562794; Tue, 02 Jul 2013 12:32:42 -0700 (PDT) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPSA id z2sm6163821obi.3.2013.07.02.12.32.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Jul 2013 12:32:41 -0700 (PDT) Sender: Warner Losh Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Tue, 2 Jul 2013 13:32:37 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <67798E6A-3B0E-4C2F-AD0F-7D3FF3B0A127@bsdimp.com> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> To: Jack Wilborn X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQksKaHqhemMFugQQz4rBa494XvZoGp7aavgto7tqKWEty8AraryGJbjbycNeV3pvA80cA/S Cc: Alexander Motin , Ilya Bakulin , freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2013 19:32:43 -0000 On Jul 2, 2013, at 12:20 PM, Jack Wilborn wrote: > Nice, how do we include this code in our builds? Apply the patches and build a kernel. > How is it invoked? Boot the kernel with a supported SDIO card. > Main > question is that are these structures in an area that is protected so = that > only root can modify them? All this is kernel-level code. > I don't know enough about about SD cards to know if they are alike in = the > communications to them. They are quite similar. SDIO cards are basically SD cards that also have = non-block-sized transfers and interrupt signaling. > I'd like to see more about this and see it in the > test bed to give you more feedback. Having taught C for 15 years, I'm = ok > with reading and understanding the code, but to make it usable is the > bottom line. Nice work, I'm sure it would be an asset to all of us. >=20 > I'm a little groggy about this so if I missed anything, please = overlook > it. I like it! >=20 > Jack >=20 >=20 > On Tue, Jul 2, 2013 at 10:10 AM, Alexander Motin = wrote: >=20 >> On 02.07.2013 17:59, Ilya Bakulin wrote: >>=20 >>> Hi list, >>> I'm currently developing a SDIO driver for the Globalscale = Dreamplug. >>> I have taken SDIO patch for Marvell SoC from [1]. >>> After that I have written some SDIO-related code in = sys/dev/mmc/mmc.c, >>> using OpenBSD SDIO code and the patch from Ben Gray ([2]) as a = starting >>> point. >>>=20 >>> I have taken Warner's wish to have SDIO code in MMC bus into = account, so >>> there >>> is no extra layer of abstraction in my code, SDIO devices will = attach >>> directly >>> to MMC bus. This makes possible to implement combo cards support in = the >>> future, >>> although I don't support them in my code atm. >>>=20 >>> What is already implemented: >>> * SDIO card detection; >>> * CIS reading, both common CIS and individual functions' CIS; >>> * Function enable. >>>=20 >>> My questions, need answers before I can move further: >>> * Where should I store information retrieved from the CIS? The PC Card bus, which also has a CIS, stores it in the slot that it has = for a card. In PC Card land, the CIS is shared between multiple devices, = so we divide things up accordingly. >>> As far as I understand, I should use mmc_ivars structure for = that. >>> But in SDIO case the relationship between MMC bus and SDIO card = is >>> 1:1, >>> and storing the information about the card in mmc_softc sounds = like >>> a good idea -- then I can pass only mmc_softc structure to all >>> functions >>> that need to work with the attached SDIO card. That's quite similar to how we do it for PC Card and CardBus. >> I think SD world is a terrible mess by itself. I would like to not = add >> more. Functions that suppose card access should take card-specific >> structure or device as an argument, not a bus ones. How is it a mess? >> * Should I add any methods to the existing interface files? >>>=20 >>> * Are there any devices on the market that use SDIO interface and = which >>> chipsets are supported in FreeBSD? Any Atheros devices? >>> Adrian, what do you think? >>> I have only Dreamplug with Marvell SDIO-based WLAN chip, that = doesn't >>> have >>> an opensource driver even for Linux... >>>=20 >>=20 >> Recently I've bought EyeFi card hoping it is combined SD+SDIO, but = seems >> like card's WiFi part is completely autonomous and controlled via = file >> access on storage and not really SDIO. Older versions of the card are SDIO. I have one, somewhere. I'll send it = along if I can find it, if you'd like. >> I would try to look for SDIO Bluetooth card. I think such ones still = could >> be found on eBay, and I think there are some specifications for that. >> Though I've never looked inside. There's a standard SDIO Bluetooth interface, so this would be a good = place to start. Warner >> [1] = http://people.freebsd.org/~**raj/misc/mv_sdio.c >>> [2] http://lists.freebsd.org/**pipermail/freebsd-arm/2012-** >>> = June/003543.html >>>=20 >>=20 >> -- >> Alexander Motin >>=20 >> ______________________________**_________________ >> freebsd-arm@freebsd.org mailing list >> = http://lists.freebsd.org/**mailman/listinfo/freebsd-arm >> To unsubscribe, send any mail to = "freebsd-arm-unsubscribe@**freebsd.org >> " >>=20 > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to = "freebsd-embedded-unsubscribe@freebsd.org"