linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jhovold@gmail.com (Johan Hovold)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] v2 rtc-at91rm9200: add support for at91sam9x5
Date: Wed, 22 May 2013 11:55:45 +0200	[thread overview]
Message-ID: <20130522095545.GA11420@localhost> (raw)
In-Reply-To: <519BF353.2060800@interlog.com>

On Tue, May 21, 2013 at 06:21:07PM -0400, Douglas Gilbert wrote:
> An unspecified number of SoCs from the Atmel's
> at91sam9x5 family including the at91sam9g25 have a
> broken AT91_RTC_IMR (interrupt mask) register which
> always returns zero.
> 
> If this bug can be neutralized, then the existing
> rtc-at91rm9200 driver will work. On the other hand,
> leaving this bug in place, and starting the RTC
> causes unhandled interrupts which result in the
> "SYS" interrupt being disabled. And that takes down
> several other interrupts wired or-ed through the
> SYS interrupt including the DBG port.
> 
> This is the second version of this patch, and is
> against lk 3.10.0-rc2 .

Your patch is almost identical to the one I submitted about two months
ago in this thread:

	https://lkml.org/lkml/2013/4/3/166

except that you do not use DT to the detect SoCs with broken IMR. (Your
patch is also lacking the register-read-back heuristic to make sure the
interrupts have been disabled before you update the mask.)

Are there sam9x5 SoCs with non-broken RTC_IMR which would prevent us
from using DT for detection? If so, I'd rather see your test for
broken-IMR implemented on top of my implementation.

Thanks,
Johan

> ChangeLog:
>     - checks in probe() function if AT91_RTC_IMR is broken.
>       If so, uses a shadow imr
>     - apart from that check, SoCs with a good IMR register
>       take the same paths through rtc-at91rm9200.c as before
>     - SoCs with a broken IMR take a spinlock while changing
>       the state of IER or IDR (and the shadow), mainly to
>       disable interrupts **.

      reply	other threads:[~2013-05-22  9:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 22:21 [PATCH] v2 rtc-at91rm9200: add support for at91sam9x5 Douglas Gilbert
2013-05-22  9:55 ` Johan Hovold [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=20130522095545.GA11420@localhost \
    --to=jhovold@gmail.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;
as well as URLs for NNTP newsgroup(s).