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.

emmc driver access from watchdog ISR at kernel level

Hi,

I am planning to read/write to emmc from watchdog ISR (using emmc driver )at kernel level while booting , i.e,before the FileSystem loads , how can i do it .....?

any help/leads would be appreciable.

thank you,

sumit 

  • Hi Sumit,

    I don't know for which SDK 6 or 7 do you interesting and for Sitara board or other, but my answer will be for Sitara335x Starter Kit with sdk7.

    The watchdog isr is located in <>/board-support/linux-3.12.10-ti2013.12.01/drivers/watchdog/omap_wdt.c file and is omap_wdt_interrupt() procedure. But from omap_wdt_probe() I see that the watchdog is not enabled. To be enable you have to execute code about line 357 ret = omap_wdt_start(omap_wdt);. Now this code is not executed because upper if stops this code. You have to modify code that this line is executed also to attend to ISR.

    BR
    Ivan
  • thanks Ivan ,
    i could get the ISR working the point i am stuck at is i am trying to write to emmc from the ISR, i could not get how to do this ...
    I am working with ti-sdk 7.0 on AM335x chip (BBB is my evaluation board) ,if you can guide me "in how can I r/w to emmc from the ISR" it would be realy great.

    thanks,
    sumit
  • hi Ivan,

    I got some technologies like ramoops,mtdoops,pstore ,but the problem is most of them log err msg on mtd(nand)/ flash rather i would like them to be written on emmc .... still stuck

    thanks,
    sumit
  • Hi Sumit,

    It's not a good practice to write to emmc in ISR. Please explain much more your issue but it's good to think about some existing thread to check what you are interesting or initialize some timer event. But to write to emmc is not so easy, this is close to write a new driver.
    If you want to write in ISR and after that the system will rebooted and want to analyze the reason, please see the other way to do this with a persistent ram or persistent trace.

    BR
    Ivan
  • Hi Ivan ,
    thanks for such valuable information.

    i would like to use pstore for storing inf across boot , but as the documentation mention it requires NVRAM which i guess is not avaiable as a seperate entity on BBB.
    I further researched to find that rtc is having 144bytes of nvram , but i would like to know is it possible to use rtc's nvram for non rtc purpose and if yes ,can you plz frwd me some links/docs which helps me in implementing this.

    thanks,
    sumit
  • Hi Sumit,

    I do not know there is such a rtc/nvram driver, but if you want to save kernel log from user space you can make this easiest with: "gmesg > filename" and in this file will save the whole kernel log.

    BR
    Ivan
  • Hi Sumit,

    Please see the driver:
    Location:
    -> Bus options (PCI etc.)
    -> Support for PCI Hotplug (HOTPLUG_PCI [=y])
    -> Compaq PCI Hotplug driver (HOTPLUG_PCI_COMPAQ [=n])

    Alse see the options in:
    -> Device Drivers
    -> Character devices
    /dev/nvram support (NVRAM)

    BR
    Ivan