This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

mmc_device address is over written by mmc->f_min

hi all,

Iam porting ti-sdk-am335x-evm-05.06 code to our custom board our board is hanging the problem iam facing is

once I enter the function    omap_mmc_init(int dev_index)

reason of hanging:  based on my observation in function in from omap_mmc_init()  present in omap_hsmmc.c
before calling mmc_register(); function  their is an assignment takes place to mmc structure declared in mmc.h.
that is
 mmc->fmin = 400000; 

that is overwritting the address present in mmc_devices structure inside a function
which is a  double linked list structure. that contains address of previous and  next nodes. 
In my case this assignment causing mmc_devices->previous to been overwrriten by mmc->fmin  before entring into function list_add_tail();  present in file  include/linux/list.h.
 
That is address is replaced by value 400000 which will become invalid address. cause the process to hang.

if any solution please mailto:krishnegowda.c@3i-corporation.com

thanks all,

krishnegowda.c

  • There is a bug in the omap hs_mmc code.  You're using mmc2, right?  This only happens when initializing mmc2, I think.  I made a change somewhere...but I need to find it...

    Can you confirm this only happens when trying initialize mmc2?

  • Yes, I found my fix.  The hs_mmc code only handles the first two mmcs properly, then does something bogus if you send it the third.  You need to add a case statement to handle the third mmc bus.  See the attached patch and let me know if it helps you.

    As far as I know none of the eval kits use this MMC bus, so the TI devs properly haven't run into the problem much.

    Index: linux-3.2.0-psp05.06.00.00/arch/arm/mach-omap2/hsmmc.c
    ===================================================================
    --- linux-3.2.0-psp05.06.00.00/arch/arm/mach-omap2/hsmmc.c      (revision 3)
    +++ linux-3.2.0-psp05.06.00.00/arch/arm/mach-omap2/hsmmc.c      (revision 12)
    @@ -402,6 +402,8 @@
                    }
                    break;
            case 2:
    +               /* FALLTHROUGH */
    +       case 3:
                    if (cpu_is_omap3517() || cpu_is_omap3505())
                            mmc->slots[0].set_power = am35x_hsmmc2_set_power;
     
    @@ -414,8 +416,7 @@
                            c->caps &= ~MMC_CAP_8_BIT_DATA;
                            c->caps |= MMC_CAP_4_BIT_DATA;
                    }
    -               /* FALLTHROUGH */
    -       case 3:
    +
                    if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
                            /* off-chip level shifting, or none */
                            mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
    

  • dear sir,

    thanks for your concern, regarding mmc iam using mmc0 and the code Iam reffering is in the path mentioned below

    ti-sdk-am335x-evm/board/board-support/u-boot-2012.10-psp05.06.00/drivers/mmc/mm.c

    that is before uboot is read from mmc iam facing this problem.

    thanks & regards,

    krishnegowda.c

  • I am running into a similar problem. Did you ever get this resolved