[PATCH] SDIO support for Globalscale Dreamplug
Warner Losh
imp at bsdimp.com
Tue Jul 2 19:32:43 UTC 2013
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.
>
> I'm a little groggy about this so if I missed anything, please overlook
> it. I like it!
>
> Jack
>
>
> On Tue, Jul 2, 2013 at 10:10 AM, Alexander Motin <mav at freebsd.org> wrote:
>
>> 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?
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?
>>>
>>> * 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.
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<http://people.freebsd.org/~raj/misc/mv_sdio.c>
>>> [2] http://lists.freebsd.org/**pipermail/freebsd-arm/2012-**
>>> June/003543.html<http://lists.freebsd.org/pipermail/freebsd-arm/2012-June/003543.html>
>>>
>>
>> --
>> Alexander Motin
>>
>> ______________________________**_________________
>> freebsd-arm at freebsd.org mailing list
>> http://lists.freebsd.org/**mailman/listinfo/freebsd-arm<http://lists.freebsd.org/mailman/listinfo/freebsd-arm>
>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@**freebsd.org<freebsd-arm-unsubscribe at freebsd.org>
>> "
>>
> _______________________________________________
> freebsd-embedded at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to "freebsd-embedded-unsubscribe at freebsd.org"
More information about the freebsd-embedded
mailing list