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.

Linux/DRA722: HS200 mode support for eMMC 5.1 on kernel version 3.12

Part Number: DRA722

Tool/software: Linux

Hi,

I want to know if TI kernel 3.12 support HS200 mode of eMMC, and if not is there any patches provided by TI to support HS200 mode on kernel 3.12?

Regards

  • Hi @

    According to the Release notes, the HS200 mode support was added in GLSDK ver. 7.00.00.04:

    which means that it happened when transitioning from 3.12 kernel to 3.14.

    I would suggest if possible to migrate to newer version (current version of PSDKLA is based on 4.14 kernel):

    Or otherwise, as last resort you can check the changes done in the kernel and try to backport them to 3.12, you should look at tag 'glsdk-7.00.00.04' in this git (I am not sure that it will be straightforward task thou):

    Regards,

    Yordan

  • Hi Yordan,

    Thanks for your support! i will try using 3.14 kernel and back-port them to 3.12.

    Regards

  • OK. Let me know if you face any issues.

    Regards,

    Yordan

  • Hi Yordan,

    After back-porting the changes from 3.14 kernel based on TAG "glsdk-7.00.00.04" , I am getting the kernel panic issue as shown below:

    [ 66.477757] Unable to handle kernel NULL pointer dereference at virtual address 00000000
    [ 66.486312] pgd = 80004000
    [ 66.489172] [00000000] *pgd=00000000
    [ 66.492964] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    [ 66.498582] Modules linked in:
    [ 66.501822] CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.12.25-FR06.0 #1
    [ 66.509102] Workqueue: kmmcd mmc_rescan
    [ 66.513166] task: 8c1204c0 ti: 8c134000 task.ti: 8c134000
    [ 66.518883] PC is at omap_hsmmc_irq+0xfc/0x384
    [ 66.523579] LR is at omap_hsmmc_irq+0x2d0/0x384
    [ 66.528364] pc : [<80383924>] lr : [<80383af8>] psr: 20000193
    [ 66.528364] sp : 8c135b68 ip : 8c135b68 fp : 8c135b8c
    [ 66.540530] r10: 00000001 r9 : 8c1d2ef8 r8 : 00000000
    [ 66.546066] r7 : 00000000 r6 : 00018000 r5 : 00000000 r4 : 8c1d2ec0
    [ 66.552990] r3 : 00000000 r2 : 00000000 r1 : ffffff92 r0 : 8c1d2ec0
    [ 66.559913] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
    [ 66.567751] Control: 10c5387d Table: 8000406a DAC: 00000015
    [ 66.573845] Process kworker/u2:0 (pid: 6, stack limit = 0x8c134248)
    [ 66.580483] Stack: (0x8c135b68 to 0x8c136000)
    [ 66.585102] 5b60: 8c37b900 8c009e9c 00000076 fa212000 00000000 00000000
    [ 66.593773] 5b80: 8c135bcc 8c135b90 80082d38 80383834 0000000a 00000001 0000000a 8c009e40
    [ 66.602440] 5ba0: 34373737 8c009e40 8c009e9c 8c37b900 fa212000 00000000 8c1d2ef8 8c134000
    [ 66.611115] 5bc0: 8c135bec 8c135bd0 80082fc0 80082ce8 00000000 8c009e40 8c009e9c 00000000
    [ 66.619780] 5be0: 8c135c04 8c135bf0 80086250 80082f80 00000076 00000076 8c135c1c 8c135c08
    [ 66.628457] 5c00: 80082670 800861cc 000001c0 8068dfe8 8c135c3c 8c135c20 8000f970 8008264c
    [ 66.637131] 5c20: 000000c0 fa21200c 80698f10 8c135c60 8c135c5c 8c135c40 800088a8 8000f934
    [ 66.645797] 5c40: 8048c880 a0000113 ffffffff 8c135c94 8c135cbc 8c135c60 8048d200 8000887c

    .......

    [ 66.905862] Backtrace:
    [ 66.908473] [<80383828>] (omap_hsmmc_irq+0x0/0x384) from [<80082d38>] (handle_irq_event_percpu+0x5c/0x298)
    [ 66.918710] [<80082cdc>] (handle_irq_event_percpu+0x0/0x298) from [<80082fc0>] (handle_irq_event+0x4c/0x6c)
    [ 66.929041] [<80082f74>] (handle_irq_event+0x0/0x6c) from [<80086250>] (handle_fasteoi_irq+0x90/0x14c)
    [ 66.938900] r6:00000000 r5:8c009e9c r4:8c009e40 r3:00000000
    [ 66.944941] [<800861c0>] (handle_fasteoi_irq+0x0/0x14c) from [<80082670>] (generic_handle_irq+0x30/0x40)
    [ 66.954979] r5:00000076 r4:00000076
    [ 66.958795] [<80082640>] (generic_handle_irq+0x0/0x40) from [<8000f970>] (handle_IRQ+0x48/0xa4)
    [ 66.968017] r4:8068dfe8 r3:000001c0
    [ 66.971828] [<8000f928>] (handle_IRQ+0x0/0xa4) from [<800088a8>] (gic_handle_irq+0x38/0x6c)
    [ 66.980676] r6:8c135c60 r5:80698f10 r4:fa21200c r3:000000c0
    [ 66.986714] [<80008870>] (gic_handle_irq+0x0/0x6c) from [<8048d200>] (__irq_svc+0x40/0x70)
    [ 66.995485] Exception stack(0x8c135c60 to 0x8c135ca8)
    [ 67.000846] 5c60: 8071d900 8c135ce0 8004ed7c 8c1204c0 8071d900 a0000113 8c135ce4 8c135ce0
    [ 67.009519] 5c80: 00000000 8c1d2ef8 8c134000 8c135cbc 8c135cc0 8c135ca8 8004ec1c 8048c880
    [ 67.018185] 5ca0: a0000113 ffffffff
    [ 67.021873] r7:8c135c94 r6:ffffffff r5:a0000113 r4:8048c880
    [ 67.027919] [<8048c864>] (_raw_spin_lock_irqsave+0x0/0x68) from [<8004ec1c>] (lock_timer_base+0x30/0x54)
    [ 67.037964] r5:8071d900 r4:8071d900
    [ 67.041775] [<8004ebec>] (lock_timer_base+0x0/0x54) from [<80488870>] (schedule_timeout+0x78/0x1f4)
    [ 67.051362] r7:806920c0 r6:ffff8db1 r5:8c135ce4 r4:000001f4
    [ 67.057402] [<804887f8>] (schedule_timeout+0x0/0x1f4) from [<8048aa54>] (wait_for_common+0xc4/0x158)
    [ 67.067088] [<8048a990>] (wait_for_common+0x0/0x158) from [<8048ab28>] (wait_for_completion_timeout+0x1c/0x20)
    [ 67.077696] [<8048ab0c>] (wait_for_completion_timeout+0x0/0x20) from [<8038216c>] (omap_execute_tuning+0x258/0x804)
    [ 67.088756] [<80381f14>] (omap_execute_tuning+0x0/0x804) from [<803702f8>] (mmc_init_card+0x558/0x1524)
    [ 67.098715] [<8036fda0>] (mmc_init_card+0x0/0x1524) from [<80371590>] (mmc_attach_mmc+0xc0/0x194)
    [ 67.108124] [<803714d0>] (mmc_attach_mmc+0x0/0x194) from [<8036de18>] (mmc_rescan+0x2b4/0x308)
    [ 67.117254] r5:804d6120 r4:8c1d2e00

    [ 67.121069] [<8036db64>] (mmc_rescan+0x0/0x308) from [<8005b8a4>] (process_one_work+0x138/0x41c)
    [ 67.130378] r8:8c0e3c00 r7:8c0e2e00 r6:8c134000 r5:8c1d2e00 r4:8c0d46c0
    r3:8036db64
    [ 67.138735] [<8005b76c>] (process_one_work+0x0/0x41c) from [<8005bd10>] (worker_thread+0x144/0x394)
    [ 67.148331] [<8005bbcc>] (worker_thread+0x0/0x394) from [<80062a30>] (kthread+0xb4/0xc0)
    [ 67.156916] [<8006297c>] (kthread+0x0/0xc0) from [<8000f078>] (ret_from_fork+0x14/0x20)
    [ 67.165392] r7:00000000 r6:00000000 r5:8006297c r4:8c123d20
    [ 67.171431] Code: e594300c e3530000 0a000024 e5942008 (e5922000)
    [ 67.177914] ---[ end trace 507edb7b33e3870f ]---
    [ 67.182816] Kernel panic - not syncing: Fatal exception in interrupt

    Could you help me out?

    Regards

  • Hi

    from the logs, it appears to be kernel crash inside the MMC driver-  but dont have any further inference from the crash logs.

    Can you review the patches that you had back ported from 3.14, and if they have been integrated cleanly 

  • Hi Srirama,

    Thanks for your reply!!

    I verified the changes back-ported and seems fine to me. Since I have very little experience in eMMC so I am not sure if I missed something.

    Let me brief what I have done, I have simply replaced the following files from the kernel 3.14 to 3.12:

    drivers/mmc/host/omap_hsmmc.c

    drivers/mmc/host/omap.c

    drivers/mmc/core/mmc.c

    drivers/mmc/core/core.c

    drivers/mmc/core/bus.c

    drivers/mmc/core//host.c

    and the relevant include files.

    This issue is happening when it is calling omap_execute_tuning function. I am clueless here.

    Would it be feasible for you to list the commits that will be taken from 3.14 branch that has HS200 support to back-port them into 3.12 branch or if feasible could you tell me what is being missed here.

    Thanks again for your support!!

    Regards

  • Hi,

    It won't be easy to list down HS200 only patches, best would be to take all patches in omap_hsmmc driver.

    For proper HS200 support, you have to backport the IODELAY support for MMC also.
    Although this may not be the reason for the crash, but something to keep in mind.

    Could you try below patch to see if it makes any difference?
    http://git.omapzoom.org/?p=kernel/omap.git;a=commit;h=a710a8c9d514ab2ec09242276263ad2a4a7aece8

    Also share the full kernel logs.

    Regards,
    Vishal

  • Hi

    Any updates?

    Regards,
    Vishal

  • Hi,

    I haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Vishal