All of lore.kernel.org
 help / color / mirror / Atom feed
From: viresh kumar <viresh.linux@gmail.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: "wim@iguana.be" <wim@iguana.be>,
	"spear-devel@list.st.com" <spear-devel@list.st.com>,
	"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Pawel Moll <Pawel.Moll@arm.com>,
	Viresh Kumar <viresh.kumar@st.com>
Subject: Re: [PATCH V2] watchdog: mpcore: Add DT probing support for ARM mpcore watchdog
Date: Mon, 23 Apr 2012 21:03:03 +0530	[thread overview]
Message-ID: <CAOh2x=n5Zm9MR5twDY-CUA-ppE9ADXrg25XCT5RKM++v6=tcpA@mail.gmail.com> (raw)
In-Reply-To: <4F9573B8.9050607@arm.com>

On 4/23/12, Marc Zyngier <marc.zyngier@arm.com> wrote:
> On 23/04/12 15:21, viresh kumar wrote:
>> On 4/23/12, Marc Zyngier <marc.zyngier@arm.com> wrote:
>>> Ah, that explains why it worked. I suppose you do have additional
>>> patches that fix the IRQ request bit?
>>
>> Missed this earlier. That patchset is in review currently and have
>> already fixed that. :)
>
> Right. Please post that patch as a prerequisite for any other change.

Haah!! I misread your question. I don't know how, but i thought you are
asking me to fix this address for SPEAr (My SoC). And that patch set
is currently in review.

I didn't get this IRQ request bit thing? Can you please explain.

>>> Given that no in-tree platform seem to be using this watchdog (at least
>>> a quick grep didn't reveal anything), I'd be inclined to simply change
>>> the offset in smp_twd.h and let them break.
>>
>> Even i can't find any users of it. :)
>>
>> @Wim: Please apply following patch before this one.
>
> Probably it would be better to keep everything in a single series,
> including the above IRQ fixes. It would surely make things easier for
> the maintainer and other people who are reviewing the changes you're
> making to the driver.

Even i would like to keep related patches in a single set. But i am doubtful
about this IRQ thing.

>> Here we go:
>>
>> From: Viresh Kumar <viresh.kumar@st.com>
>> Date: Mon, 23 Apr 2012 19:39:47 +0530
>> Subject: [PATCH] ARM: SMP_TWD: WDOG: Start registers from 0x00 instead of
>>  0x20
>>
>> TWD_WDOG is at offset 0x20 from TWD base address. Current register
>> offsets
>> contain this extra 0x20 offset, i.e. users were required to pass base
>> address of
>> TWD instead of WDOG to WDOG driver.
>>
>> Change this, so that users can pass base address of WDOG to WDOG driver
>> instead
>> of TWD module. For this, subtract 0x20 from offsets of WDOG registers.
>>
>> This could break any current users of TWD_WDOG, but i couldn't find any
>> users of
>> this driver in current Linux tree. So, haven't fixed any platform code. If
>> some
>> platforms are broken please report to me, so that we can get them fixed in
>> this
>> patch only.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
>> ---
>>  arch/arm/include/asm/smp_twd.h |   17 +++++++++++------
>>  1 files changed, 11 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/smp_twd.h
>> b/arch/arm/include/asm/smp_twd.h
>> index 57857d1..ff3f67e 100644
>> --- a/arch/arm/include/asm/smp_twd.h
>> +++ b/arch/arm/include/asm/smp_twd.h
>> @@ -6,12 +6,17 @@
>>  #define TWD_TIMER_CONTROL		0x08
>>  #define TWD_TIMER_INTSTAT		0x0C
>>
>> -#define TWD_WDOG_LOAD			0x20
>> -#define TWD_WDOG_COUNTER		0x24
>> -#define TWD_WDOG_CONTROL		0x28
>> -#define TWD_WDOG_INTSTAT		0x2C
>> -#define TWD_WDOG_RESETSTAT		0x30
>> -#define TWD_WDOG_DISABLE		0x34
>> +/*
>> + * TWD_WDOG is at offset 0x20 from TWD base address. Following register
>> offsets
>> + * doesn't contain this extra 0x20 offset, i.e. users of TWD_WDOG
>> must pass base
>> + * address of WDOG to WDOG driver instead of TWD module.
>> + */
>> +#define TWD_WDOG_LOAD			0x00
>> +#define TWD_WDOG_COUNTER		0x04
>> +#define TWD_WDOG_CONTROL		0x08
>> +#define TWD_WDOG_INTSTAT		0x0C
>> +#define TWD_WDOG_RESETSTAT		0x10
>> +#define TWD_WDOG_DISABLE		0x14
>>
>>  #define TWD_WDOG_LOAD_MIN		0x00000000
>>  #define TWD_WDOG_LOAD_MAX		0xFFFFFFFF
>>
>
> Now that we made it that far, why not moving the TWD_WDOG_* #defines to
> the driver itself? Nobody else should care about it anyway...

I thought of it too, but then left it. I thought this is done purposefully.
Will move it once i get your concern on IRQ stuff.

--
viresh

WARNING: multiple messages have this Message-ID (diff)
From: viresh.linux@gmail.com (viresh kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2] watchdog: mpcore: Add DT probing support for ARM mpcore watchdog
Date: Mon, 23 Apr 2012 21:03:03 +0530	[thread overview]
Message-ID: <CAOh2x=n5Zm9MR5twDY-CUA-ppE9ADXrg25XCT5RKM++v6=tcpA@mail.gmail.com> (raw)
In-Reply-To: <4F9573B8.9050607@arm.com>

On 4/23/12, Marc Zyngier <marc.zyngier@arm.com> wrote:
> On 23/04/12 15:21, viresh kumar wrote:
>> On 4/23/12, Marc Zyngier <marc.zyngier@arm.com> wrote:
>>> Ah, that explains why it worked. I suppose you do have additional
>>> patches that fix the IRQ request bit?
>>
>> Missed this earlier. That patchset is in review currently and have
>> already fixed that. :)
>
> Right. Please post that patch as a prerequisite for any other change.

Haah!! I misread your question. I don't know how, but i thought you are
asking me to fix this address for SPEAr (My SoC). And that patch set
is currently in review.

I didn't get this IRQ request bit thing? Can you please explain.

>>> Given that no in-tree platform seem to be using this watchdog (at least
>>> a quick grep didn't reveal anything), I'd be inclined to simply change
>>> the offset in smp_twd.h and let them break.
>>
>> Even i can't find any users of it. :)
>>
>> @Wim: Please apply following patch before this one.
>
> Probably it would be better to keep everything in a single series,
> including the above IRQ fixes. It would surely make things easier for
> the maintainer and other people who are reviewing the changes you're
> making to the driver.

Even i would like to keep related patches in a single set. But i am doubtful
about this IRQ thing.

>> Here we go:
>>
>> From: Viresh Kumar <viresh.kumar@st.com>
>> Date: Mon, 23 Apr 2012 19:39:47 +0530
>> Subject: [PATCH] ARM: SMP_TWD: WDOG: Start registers from 0x00 instead of
>>  0x20
>>
>> TWD_WDOG is at offset 0x20 from TWD base address. Current register
>> offsets
>> contain this extra 0x20 offset, i.e. users were required to pass base
>> address of
>> TWD instead of WDOG to WDOG driver.
>>
>> Change this, so that users can pass base address of WDOG to WDOG driver
>> instead
>> of TWD module. For this, subtract 0x20 from offsets of WDOG registers.
>>
>> This could break any current users of TWD_WDOG, but i couldn't find any
>> users of
>> this driver in current Linux tree. So, haven't fixed any platform code. If
>> some
>> platforms are broken please report to me, so that we can get them fixed in
>> this
>> patch only.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
>> ---
>>  arch/arm/include/asm/smp_twd.h |   17 +++++++++++------
>>  1 files changed, 11 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/smp_twd.h
>> b/arch/arm/include/asm/smp_twd.h
>> index 57857d1..ff3f67e 100644
>> --- a/arch/arm/include/asm/smp_twd.h
>> +++ b/arch/arm/include/asm/smp_twd.h
>> @@ -6,12 +6,17 @@
>>  #define TWD_TIMER_CONTROL		0x08
>>  #define TWD_TIMER_INTSTAT		0x0C
>>
>> -#define TWD_WDOG_LOAD			0x20
>> -#define TWD_WDOG_COUNTER		0x24
>> -#define TWD_WDOG_CONTROL		0x28
>> -#define TWD_WDOG_INTSTAT		0x2C
>> -#define TWD_WDOG_RESETSTAT		0x30
>> -#define TWD_WDOG_DISABLE		0x34
>> +/*
>> + * TWD_WDOG is at offset 0x20 from TWD base address. Following register
>> offsets
>> + * doesn't contain this extra 0x20 offset, i.e. users of TWD_WDOG
>> must pass base
>> + * address of WDOG to WDOG driver instead of TWD module.
>> + */
>> +#define TWD_WDOG_LOAD			0x00
>> +#define TWD_WDOG_COUNTER		0x04
>> +#define TWD_WDOG_CONTROL		0x08
>> +#define TWD_WDOG_INTSTAT		0x0C
>> +#define TWD_WDOG_RESETSTAT		0x10
>> +#define TWD_WDOG_DISABLE		0x14
>>
>>  #define TWD_WDOG_LOAD_MIN		0x00000000
>>  #define TWD_WDOG_LOAD_MAX		0xFFFFFFFF
>>
>
> Now that we made it that far, why not moving the TWD_WDOG_* #defines to
> the driver itself? Nobody else should care about it anyway...

I thought of it too, but then left it. I thought this is done purposefully.
Will move it once i get your concern on IRQ stuff.

--
viresh

  reply	other threads:[~2012-04-23 15:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 14:42 [PATCH] watchdog: mpcore: Add DT bindings for ARM mpcore watchdog Viresh Kumar
2012-04-20 14:42 ` Viresh Kumar
2012-04-21  8:32 ` Pawel Moll
2012-04-21  8:32   ` Pawel Moll
2012-04-21 11:41 ` [PATCH V2] watchdog: mpcore: Add DT probing support " Viresh Kumar
2012-04-21 11:41   ` Viresh Kumar
2012-04-23  8:36   ` Marc Zyngier
2012-04-23  8:36     ` Marc Zyngier
2012-04-23 11:35     ` viresh kumar
2012-04-23 11:35       ` viresh kumar
2012-04-23 12:15       ` Marc Zyngier
2012-04-23 12:15         ` Marc Zyngier
2012-04-23 12:21         ` viresh kumar
2012-04-23 12:21           ` viresh kumar
2012-04-23 14:21         ` viresh kumar
2012-04-23 14:21           ` viresh kumar
2012-04-23 15:22           ` Marc Zyngier
2012-04-23 15:22             ` Marc Zyngier
2012-04-23 15:33             ` viresh kumar [this message]
2012-04-23 15:33               ` viresh kumar
2012-04-23 15:49               ` Marc Zyngier
2012-04-23 15:49                 ` Marc Zyngier
2012-04-23 16:01                 ` viresh kumar
2012-04-23 16:01                   ` viresh kumar
2012-04-23 16:12                   ` Marc Zyngier
2012-04-23 16:12                     ` Marc Zyngier
2012-04-23 16:16                     ` viresh kumar
2012-04-23 16:16                       ` viresh kumar
2012-04-23 16:26                       ` Marc Zyngier
2012-04-23 16:26                         ` Marc Zyngier
2012-04-24 10:25                         ` Viresh Kumar
2012-04-24 10:25                           ` Viresh Kumar

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='CAOh2x=n5Zm9MR5twDY-CUA-ppE9ADXrg25XCT5RKM++v6=tcpA@mail.gmail.com' \
    --to=viresh.linux@gmail.com \
    --cc=Pawel.Moll@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=spear-devel@list.st.com \
    --cc=viresh.kumar@st.com \
    --cc=wim@iguana.be \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.