General Mac OS X Discussion General Apple and Mac OS X Discussion

Reply
 
LinkBack Thread Tools Display Modes
  (#21) Old
CyG CyG is offline
Senior Member
 
Posts: 233
Join Date: Nov 2008
Default Re: SD Card slot - Brainstorming a solution - 11-11-2008, 04:29 AM

I have a similar (and even cheaper product) which works perfectly well but it's not as cool or as compact as being able to use the slot.


Dell Mini 9 | Mac OS X 10.6.6 | BIOS A04 | NBI '51 | 16 SSD | 2 GB RAM | BT
Reply With Quote
  (#22) Old
Member
 
Posts: 88
Join Date: Nov 2008
Default Some life from the SD slot - 11-12-2008, 12:54 AM

I figured from the Linux code that the SD slot that it was a standard interface. So, after some Googling, I found this driver with source code for a different Inspiron's sdhc slot: http://forum.insanelymac.com/index.php?showtopic=62711

First, I downloaded PCI Utils and ran lspci -nn to get the vendor ID and device ID of the slot.

After changing the PCI vendor ID to 0x197b (JMicron) and Device ID to 0x2381 (SD Host Controller), that translated to a PCI match string of 0x2381197b. I loaded the kernel extension and, LIFE! It was able to read the header of a 1GB card. It didn't end up mounting it and it doesn't show up in /dev. Something is definitely wrong because kextunload fails. However, if it can read the header, presumably a bit of debugging should fix it. Not sure if I'll be able to do this myself, but I'm going to give it a whirl. I've written many device drivers, but they're for Irix and Linux not MacOS....
Reply With Quote
  (#23) Old
Guru
 
Posts: 1,744
Join Date: Sep 2008
Location: Olalla, WA
Send a message via AIM to UnaClocker Send a message via Yahoo to UnaClocker
Default Re: SD Card slot - Brainstorming a solution - 11-12-2008, 01:03 AM

Very cool! Thanks for the information, keep us posted.


Tired of wondering if your Mini9 is doing ANYTHING? - Add a HDD Activity LED
Reply With Quote
  (#24) Old
Junior Member
 
Posts: 28
Join Date: Oct 2008
Default Re: SD Card slot - Brainstorming a solution - 11-12-2008, 05:18 AM

awesome news!!!!!!!!!!!!!!!!!!!!!
Reply With Quote
  (#25) Old
Senior Member
 
Posts: 218
Join Date: Oct 2008
Default Re: SD Card slot - Brainstorming a solution - 11-12-2008, 05:47 AM

Think I might have something almost working using this. I will have more time tomorrow to mess with it but this is definitely close.
Reply With Quote
  (#26) Old
Senior Member
 
jeffburg's Avatar
 
Posts: 371
Join Date: Oct 2008
Location: San Francisco
Send a message via AIM to jeffburg
Default Re: SD Card slot - Brainstorming a solution - 11-12-2008, 05:59 AM

Quote:
Originally Posted by Type11
Think I might have something almost working using this. I will have more time tomorrow to mess with it but this is definitely close.
... the anticipation


-Jeff
Mini9 Black/32GB RunCore/1GB/BT/Leopard
2.4GHz Aluminum iMac/320GB/4GB/Leopard
1.83GHz White iMac/150GB/1.5GB/Leopard Server
733MHz PowerMac G4 40GB/512MB/Tiger Server
500MHz PowerBook G3 40GB/1GB/Tiger
25MHz NeXT Cube 750MB/16MB/NeXTSTEP 3.3
Reply With Quote
  (#27) Old
Member
 
Posts: 59
Join Date: Oct 2008
Location: Barrie, ON, Canada
Send a message via ICQ to loonix Send a message via AIM to loonix Send a message via MSN to loonix Send a message via Yahoo to loonix
Default Re: SD Card slot - Brainstorming a solution - 11-12-2008, 06:00 AM

Quote:
Originally Posted by Type11
Think I might have something almost working using this. I will have more time tomorrow to mess with it but this is definitely close.
As always, you the man ;-)


---------------------------------------------------
AR aka. loonix
---------------------------------------------------
Dell 9 mini - OSX (Type 11 method) 10.5.6
Reply With Quote
  (#28) Old
Member
 
Posts: 79
Join Date: Oct 2008
Location: Sedalia, CO
Default Re: SD Card slot - Brainstorming a solution - 11-12-2008, 07:19 AM

Very exciting news.. Thanks again for all this great work..

I think many of us would love to contribute for your time and energy...

Thanks again and yes, you are the man!! :-)


-ed-
Reply With Quote
  (#29) Old
Member
 
Posts: 88
Join Date: Nov 2008
Default Working Read Only Driver!! - 11-12-2008, 08:47 AM

Ok, here is a working READ ONLY sd card driver. I have disabled write mode (it kernel panics) so it *should* work for you. It handles card insertion and removal. It's not the zippiest thing in the world - I need to get it to use DMA and interrupts to fix that. I ported the exceptions for the JMicron host controller from 2.6 linux/drivers/mmc/host/sdhci.c to the driver I got from InsanelyMac. For some reason the JMicron code has been removed from current Linux (2.6.23).

WARNING: The driver will hang if you use an SDHC card so normal cards only right now.

For anyone else debugging this, there are two problems with the existing driver that need to be fixed to get read mode working. 1) The driver doesn't correctly set the Timeout control register before performing a transfer. 2) The host controller (according to the Linux driver) must have a command and data reset before every command. I also had to reset interrupt flags before checking them.
Attached Files
File Type: gz IOSDHCIBlockDevice.kext.tar.gz (13.8 KB, 147 views)
Reply With Quote
  (#30) Old
Guru
 
Posts: 1,744
Join Date: Sep 2008
Location: Olalla, WA
Send a message via AIM to UnaClocker Send a message via Yahoo to UnaClocker
Default Re: SD Card slot - Brainstorming a solution - 11-12-2008, 09:31 AM

This is freaking SWEET! Now we are making some serious progress. Thank you!


Tired of wondering if your Mini9 is doing ANYTHING? - Add a HDD Activity LED
Reply With Quote
Reply

« Trimmer Program? | iMovie work on mini 9? What apps are you using? »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Copyright © 2008-2011 MyDellMini.com.