public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mandar.nandale@mindteck.com (Mandar Nandale)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 0/2] watchdog  boot status
Date: Thu, 20 Feb 2014 08:02:34 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140220T090204-808@post.gmane.org> (raw)
In-Reply-To: 1327317188-14782-1-git-send-email-shubhrajyoti@ti.com

Shubhrajyoti D <shubhrajyoti <at> ti.com> writes:

> 
> This patch series does the following
> Patch 1:
> Fixes the omap_prcm_get_reset_sources() for omap3/4
> 
> Patch 2:
> Extends the WDIOC_GETBOOTSTATUS to support omap3/4.
> 
> Tested on omap3sdp and omap4sdp.
> 
> Rajendra Nayak (1):
>   ARM: omap: Fix omap_prcm_get_reset_sources() for omap3/4
> 
> Shubhrajyoti D (1):
>   watchdog : omap_wdt : Implement WDIOC_GETBOOTSTATUS for omap3+
> 
>  arch/arm/mach-omap2/prcm.c    |   13 ++++++++-----
>  arch/arm/mach-omap2/prm44xx.h |    3 ---
>  drivers/watchdog/omap_wdt.c   |    2 +-
>  3 files changed, 9 insertions(+), 9 deletions(-)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo <at> vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
Hi , 

    I am trying to get a last reboot reason using WDIOC_GETBOOTSTATUS ioctl
call from application. Previously before applying this patch it was always
returning me non-zero value no matter reboot is caused by watchdog or power
on reset, so i applied this patch and added some prink statements to
omap_wdt.c file and now after applying patch : 
if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap44xx()) this
condition is successfull and omap_prcm_get_reset_sources() function is
getting called and everytime i am getting 0 for ioctl call thus even if
reboot is caused by watchdog it will return me 0 (Power-On-Reset). 
What may be the reasons behind this kind of behaviour?

This is the omap_prcm_get_reset_sources() function from
arch/arm/mach-omap2/prcm.c file in my kernel source :

u32 omap_prcm_get_reset_sources(void)
{
        /* XXX This presumably needs modification for 34XX */
        if (cpu_is_omap24xx() || cpu_is_omap34xx())
                return omap2_prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f;
        if (cpu_is_omap44xx())
                return omap2_prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f;

        return 0;
}

      parent reply	other threads:[~2014-02-20  8:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 11:13 [PATCH RFC 0/2] watchdog boot status Shubhrajyoti D
2012-01-23 11:13 ` [PATCH RFC 1/2] watchdog : omap_wdt : Implement WDIOC_GETBOOTSTATUS for omap3+ Shubhrajyoti D
2012-01-24  5:02   ` Bedia, Vaibhav
2012-01-24  6:10     ` Shubhrajyoti Datta
2012-01-24  6:29       ` Bedia, Vaibhav
2012-01-24  9:33         ` Wolfram Sang
2012-01-24  9:49           ` Shubhrajyoti
2012-01-23 11:13 ` [PATCH 2/2] ARM: omap: Fix omap_prcm_get_reset_sources() for omap3/4 Shubhrajyoti D
2014-02-20  8:02 ` Mandar Nandale [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20140220T090204-808@post.gmane.org \
    --to=mandar.nandale@mindteck.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox