|
2015-01-20
, 03:16
|
Posts: 14 |
Thanked: 69 times |
Joined on Jan 2015
@ New Zealand
|
#2
|
int ret; if (gpio_is_valid(pdata->slots[0].switch_pin)) { - if (pdata->slots[0].cover) + if (0 && pdata->slots[0].cover) pdata->slots[0].get_cover_state = omap_hsmmc_get_cover_state; else
|
2015-01-20
, 09:15
|
Posts: 1,808 |
Thanked: 4,272 times |
Joined on Feb 2011
@ Germany
|
#3
|
The Following 8 Users Say Thank You to reinob For This Useful Post: | ||
|
2015-01-20
, 11:54
|
Posts: 14 |
Thanked: 69 times |
Joined on Jan 2015
@ New Zealand
|
#4
|
Oh, I just noted that omap_hsmmc is an actual module (not built-in the kernel), so this parameter could be set in /etc/init.d/ke-recv (and optionally in softupd.rcS).
/* Protect the card while the cover is open */ static void omap_hsmmc_protect_card(struct omap_hsmmc_host *host) { - if (!mmc_slot(host).get_cover_state) + if (1 || !mmc_slot(host).get_cover_state) return; host->reqs_blocked = 0;
|
2015-01-21
, 08:35
|
Posts: 1,808 |
Thanked: 4,272 times |
Joined on Feb 2011
@ Germany
|
#5
|
I'm not sure how it being a module changes it. Personally, I see it as a misfeature, but it should otherwise be configurable through sysfs, which works whether the code providing it is a module or built-in.
I'm not sure about binary module sharing etiquette, but here's the one I'm using with 2.6.28.10-cssu1: https://gist.github.com/Maxdamantus/.../omap_hsmmc.ko
Edit: caveat: with this module as-is, if the SD card is removed, you'll have to reboot before using the slot again. It looks like it does state resetting and stuff when the cover is closed, so someone would need to spend some time doing more than a one-line modification to make it work neatly.
The Following 6 Users Say Thank You to reinob For This Useful Post: | ||
|
2015-01-22
, 16:29
|
Posts: 65 |
Thanked: 42 times |
Joined on Jun 2014
|
#6
|
I'm not sure how it being a module changes it. Personally, I see it as a misfeature, but it should otherwise be configurable through sysfs, which works whether the code providing it is a module or built-in.
Edit: it should probably also be noted that the card isn't actually unmounted when the cover is removed. It won't even be able to continue flushing the writeback cache. It looks like a "safely remove" feature, but it's not.
Anyway, the 2.6.28.10 version of omap_hsmmc is a bit different, but a similarly hacky modification seems to have worked:
I'm not sure about binary module sharing etiquette, but here's the one I'm using with 2.6.28.10-cssu1: https://gist.github.com/Maxdamantus/.../omap_hsmmc.koCode:/* Protect the card while the cover is open */ static void omap_hsmmc_protect_card(struct omap_hsmmc_host *host) { - if (!mmc_slot(host).get_cover_state) + if (1 || !mmc_slot(host).get_cover_state) return; host->reqs_blocked = 0;
Edit: caveat: with this module as-is, if the SD card is removed, you'll have to reboot before using the slot again. It looks like it does state resetting and stuff when the cover is closed, so someone would need to spend some time doing more than a one-line modification to make it work neatly.
The Following User Says Thank You to abdel_95 For This Useful Post: | ||
|
2015-01-22
, 18:06
|
Posts: 1,424 |
Thanked: 2,622 times |
Joined on Jan 2011
@ Touring
|
#7
|
The Following 3 Users Say Thank You to biketool For This Useful Post: | ||
|
2015-01-22
, 20:16
|
Posts: 65 |
Thanked: 42 times |
Joined on Jun 2014
|
#8
|
|
2015-01-22
, 21:43
|
Posts: 14 |
Thanked: 69 times |
Joined on Jan 2015
@ New Zealand
|
#9
|
Hello dear gurus plz i have no programming knowledge but i am eager to have the sd card work on my phone. Plz can u give us who are dummy and are willing to have this a step-by-step tutorial on how to modify the config?.
Thanks in advance for your help
$ uname -r 2.6.28.10-cssu1
The Following User Says Thank You to Maxdamantus For This Useful Post: | ||
|
2015-01-22
, 22:13
|
Posts: 65 |
Thanked: 42 times |
Joined on Jun 2014
|
#10
|
You need to be using the 2.6.28.10-cssu1 kernel for the binary in my previous post:
If you're not using it already, I think installing the `kernel-cssu-flasher` package should do it .. though I don't think you're meant to do this if you're already using u-boot. Someone else might be able to help here, since my own boot setup is fairly unconventional.Code:$ uname -r 2.6.28.10-cssu1
I'd then suggest moving the original module, located at `/lib/modules/2.6.28.10-cssu1/omap_hsmmc.ko` somewhere before replacing it with the one in my earlier post.
I wouldn't really suggest this if you don't understand what's happening, unless the sensor actually doesn't work (so you see the "cover is open" message in dmesg, mentioned by the first poster).
Tags |
memory card, sd card |
|
N900 ROCKS!