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.

DM8148 rtc

Hi friends!
My custom board on DM8148 hasn't rtc chip, so kernel time started always from 2001-01-01 00:00:00

>> omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)

Please let me know when I can forward this base to 2014-07-01.

  • Marat,

    Marat Shchuchinsky said:

    >> omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)

    Please let me know when I can forward this base to 2014-07-01.

    From what I understand, you need to hardcode the below value (which should never change):

    omap_rtc omap_rtc: setting system clock to 2014-07-01 00:00:00 UTC (946684800)

    If this is what you need, you can modify the linux kernel as below:

    linux-psp/drivers/rtc/hctosys.c

    static int __init rtc_hctosys(void)
    {

    /*dev_info(rtc->dev.parent,
            "setting system clock to "
            "%d-%02d-%02d %02d:%02d:%02d UTC (%u)\n",
            tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
            tm.tm_hour, tm.tm_min, tm.tm_sec,
            (unsigned int) tv.tv_sec);*/
        
        dev_info(rtc->dev.parent,
            "setting system clock to "
            "%d-%02d-%02d %02d:%02d:%02d UTC (%u)\n",
            114 + 1900, 6 + 1, tm.tm_mday,
            tm.tm_hour, tm.tm_min, tm.tm_sec,
            (unsigned int) tv.tv_sec);

    }

    Then save, build new kernel and use it.

    See also the below e2e thread:

    http://e2e.ti.com/support/embedded/linux/f/354/t/136732.aspx

    Regards,
    Pavel

  • Thank you very much