From owner-freebsd-arm@FreeBSD.ORG Tue Jul 2 17:10:31 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 69C1FC0E; Tue, 2 Jul 2013 17:10:31 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-x233.google.com (mail-bk0-x233.google.com [IPv6:2a00:1450:4008:c01::233]) by mx1.freebsd.org (Postfix) with ESMTP id 9DB761AC6; Tue, 2 Jul 2013 17:10:30 +0000 (UTC) Received: by mail-bk0-f51.google.com with SMTP id ji1so2462051bkc.24 for ; Tue, 02 Jul 2013 10:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=N8FbfpAnhPiIzSiLA+du3iexRP16dXdjqDozpzVkXBg=; b=vuQiKR9sryh2VhVAK5LoCQMFP3hHy/8s5K2CrbzRRF4mK1WmKuVhCOhnDFWtD8C6Of q4zug7Lmzd77J8W5WSZnrnW3J9A+ggfm6NchkI2uAFzjKyQZ0H8rX6/zrFojLqgWp74c l3IDS06f/xmgDXYqPF/DR6csRcomFKuAiYzJNPG28M8qDT6gWjgOG1NlIcF/Q0RQopNn X1f4tlnF8rQ4u/coJbE/qTTL2nZgKp2USYjSbn3jpvS0YQyNaCFdD3tmRab+cklWBYrb +C4/vjnkQeBmd/wbTRSsqs6yTlDUzw9anc48njPz3yCmtXt5RzKNZODUgTuZPwmmcmiH t+Jg== X-Received: by 10.205.3.5 with SMTP id nw5mr4099615bkb.137.1372785029596; Tue, 02 Jul 2013 10:10:29 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPSA id de17sm11798840bkb.5.2013.07.02.10.10.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Jul 2013 10:10:28 -0700 (PDT) Sender: Alexander Motin Message-ID: <51D3097A.8010601@FreeBSD.org> Date: Tue, 02 Jul 2013 20:10:18 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130616 Thunderbird/17.0.6 MIME-Version: 1.0 To: Ilya Bakulin Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug References: <20130702145905.GA1847@olymp.kibab.com> In-Reply-To: <20130702145905.GA1847@olymp.kibab.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2013 17:10:31 -0000 On 02.07.2013 17:59, Ilya Bakulin wrote: > 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. > > 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. > > What is already implemented: > * SDIO card detection; > * CIS reading, both common CIS and individual functions' CIS; > * Function enable. > > My questions, need answers before I can move further: > * Where should I store information retrieved from the CIS? > 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. 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. > * Should I add any methods to the existing interface files? > > * 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... 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. 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. > [1] http://people.freebsd.org/~raj/misc/mv_sdio.c > [2] http://lists.freebsd.org/pipermail/freebsd-arm/2012-June/003543.html -- Alexander Motin