Making the sd reader "semi"-functional w/o booting with card

Discussion in 'Linux' started by cka, Aug 27, 2008.

  1. cka

    cka

    Joined:
    Jul 18, 2008
    Messages:
    8
    Likes Received:
    0
    Stumbled across this gem on the OpenSUSE wiki. It's actually fairly simple, albeit kinda temperamental. Create a new file called 81-mmc-config.rules in /etc/udev/rules.d/ with sudo, and add this to it:

    Code:
    KERNEL=="mmc0", RUN+="/usr/bin/setpci -d 197b:2381 AE=47"
    
    It's kinda touchy in that you have to insert a card, remove it, and insert it again to initialize, and after unmounting a card you have to wait a little while for it to register a new card for whatever reason, but it seems to work -- I could easily have my microsd/sd adapter automount 1 in every 3 or 4 times :lol: . This problem may be why the Linpus kernel has a hacked up sdhci.c/h file. These hiccups are why I haven't added it to the ubuntu wiki yet, I'm certain that some settings can be tweaked to make the thing work better. Also, in theory, this only runs on the right-hand side card reader but it could probably be adapted to work on the storage expansion one as well.

    This also requires the modules pciehp and sdhci to be loaded in /etc/modules.
     
    cka, Aug 27, 2008
    #1
  2. cka

    jss42

    Joined:
    Aug 21, 2008
    Messages:
    14
    Likes Received:
    0
    Great work! This works fine for me. I haven't had to insert/remove/insert (although I've just tried the one card)

    thanks!
     
    jss42, Aug 27, 2008
    #2
  3. cka

    jbernardo

    Joined:
    Aug 17, 2008
    Messages:
    45
    Likes Received:
    0
    From the little work I've done trying to understand the linpus changes to the kernel, the main difference in sdhci.c is that it does the equivalent to the setpci not only on power up but also on resume/suspend - and presumably on card insertion. Since the md drivers have changed between kernel 2.6.23 and 2.6.27, I'm having some problems porting those changes, as well as enabling the ms and xd support. Maybe we can get a kernel hacker interested one of these days...
     
    jbernardo, Aug 31, 2008
    #3
  4. cka

    lornajane

    Joined:
    Aug 23, 2008
    Messages:
    10
    Likes Received:
    0
    I'm trying to avoid hacking (I'm a confident linux user but life is a bit short to go compiling kernels in my book!) but I really would like to be able to get the xd card reader working. If anyone finds any suggestions I will give them a shot - I've still got linpus lite installed to date.
     
    lornajane, Aug 31, 2008
    #4
  5. cka

    jbernardo

    Joined:
    Aug 17, 2008
    Messages:
    45
    Likes Received:
    0
    Unfortunately this solution doesn't work on intrepid. Just tried, then rebooted and tried again, to no avail.
     
    jbernardo, Aug 31, 2008
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.