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

Forum just for Ubuntu chat

Moderators: glibdud, janss

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

Postby cka » Wed Aug 27, 2008 2:06 pm

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: Select all
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
 
Posts: 8
Joined: Fri Jul 18, 2008 8:16 am

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

Postby jss42 » Wed Aug 27, 2008 2:44 pm

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
 
Posts: 14
Joined: Thu Aug 21, 2008 9:15 am

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

Postby jbernardo » Sun Aug 31, 2008 8:02 am

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
 
Posts: 45
Joined: Sun Aug 17, 2008 9:17 pm

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

Postby lornajane » Sun Aug 31, 2008 11:30 am

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
 
Posts: 10
Joined: Sat Aug 23, 2008 6:01 pm

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

Postby jbernardo » Sun Aug 31, 2008 5:11 pm

Unfortunately this solution doesn't work on intrepid. Just tried, then rebooted and tried again, to no avail.
jbernardo
 
Posts: 45
Joined: Sun Aug 17, 2008 9:17 pm


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 3 guests