Take a look at the “sdcard” branch at my repo. It only supports reading right now; I am still actively developing this. The initialisation code seems solid so far.
The interesting part about SD Cards is that you are inserting different hardware with each card and they are all not created equally even if they are following the same specifications.