View Single Post
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#36
Originally Posted by PowerUser View Post
Milhouse fanoush
I see, control values in registers are really differ to acheive same result.Really asymmetric prop's.Amazing! :\
Actually I was wrong with details about 2.8 voltage, below is the code. While external slot indeed is more fine grained and has wider range, for 2.8-3.0V range it should produce same voltage. I'm not sure what voltage SDHC cards request but you can see it in kernel log when inserting the card.

Code:
        if (slot == 0) {
                if (!power_on)
                        return menelaus_set_vmmc(0);
                switch (1 << vdd) {
                case MMC_VDD_33_34:
                case MMC_VDD_32_33:
                case MMC_VDD_31_32:
                        mV = 3100;
                        break;
                case MMC_VDD_30_31:
                        mV = 3000;
                        break;
                case MMC_VDD_28_29:
                        mV = 2800;
                        break;
                case MMC_VDD_19_20:
                case MMC_VDD_18_19:
                        mV = 1850;
                        break;
                default:
                        BUG();
                }
                return menelaus_set_vmmc(mV);
        } else {
                if (!power_on)
                        return menelaus_set_vdcdc(3, 0);
                switch (1 << vdd) {
                case MMC_VDD_33_34:
                case MMC_VDD_32_33:
                        mV = 3300;
                        break;
                case MMC_VDD_30_31:
                case MMC_VDD_29_30:
                        mV = 3000;
                        break;
                case MMC_VDD_28_29:
                case MMC_VDD_27_28:
                        mV = 2800;
                        break;
                case MMC_VDD_24_25:
                case MMC_VDD_23_24:
                        mV = 2400;
                        break;
                case MMC_VDD_22_23:
                case MMC_VDD_21_22:
                        mV = 2200;
                        break;
                case MMC_VDD_20_21:
                        mV = 2000;
                        break;
                case MMC_VDD_19_20:
                case MMC_VDD_18_19:
                case MMC_VDD_17_18:
                        mV = 2000;
                        break;
                case MMC_VDD_150_155:
                case MMC_VDD_145_150:
                        mV = 1500;
                        break;
                default:
                        BUG();
                }
                return menelaus_set_vdcdc(3, mV);
Originally Posted by PowerUser View Post
One is SDHC in Linux kernel is not ideal.Other is that cards are capable of dying just because power dropped.This is against SDHC specs so card manufacturers are IMHO responsible for releasing flawed products here as well.
Exactly. Cards should not die no matter what. This is bad design. They should simply disconnect from the bus or return error but not become permanently damaged. If this is specific to some brands it may be that all such cards use same SDHC controller chip inside with some buggy hardware or firmware. On the other hand, powering off the slot in the middle of write when going to power saving mode is not good idea either (if this is what Nokia firmware does). Let's wait for updated kernel source. I'm quite interested where the bug is and how they fixed it.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.