linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/7] share sa1100 rtc driver to arch-mmp
Date: Thu, 23 Feb 2012 21:32:30 +0800	[thread overview]
Message-ID: <CAN1soZyL=659A2gLp_tLKaUTnBkLi1w0NgVq4SD4in1JE1v4VA@mail.gmail.com> (raw)
In-Reply-To: <20120223104937.GP22562@n2100.arm.linux.org.uk>

On Thu, Feb 23, 2012 at 6:49 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Thu, Feb 23, 2012 at 06:22:23PM +0800, Haojian Zhuang wrote:
>> On Thu, Feb 23, 2012 at 6:00 PM, Russell King - ARM Linux
>> <linux@arm.linux.org.uk> wrote:
>> > On Thu, Feb 23, 2012 at 05:45:20PM +0800, Haojian Zhuang wrote:
>> >> On Thu, Feb 23, 2012 at 4:52 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>> >> > The behaviour should be as before, the config should be able to choose between
>> >> > rtc-pxa and rtc-sa1100 for a pxa27x based board. For sharpsl_pm, I suppose the
>> >> > rtc-sa1100 will be chosen in the .config, and for mioa701, it will be
>> >> > rtc-pxa.
>> >> >
>> >> > Just to clear, I'm against removing "resources, clock" from pxa27x platform code
>> >> > which would break rtc-pxa driver on pxa27x. Now I don't care if you're talking
>> >> > about changing some "defconfigs".
>> >> >
>> >>
>> >> How about to move the rtc-sa1100 or rtc-pxa device register from
>> >> pxa27x.c to board file? Then we'll be both happy.
>> >
>> > How about stopping thinking about "one or other" and start thinking "both" ?
>> > The RTC library can and does cope with more than one RTC, and each RTC is
>> > exposed uniquely to userspace. ?So there shouldn't be any problem in keeping
>> > both around, or even registering both together.
>> >
>> > You just have to make sure you don't use both of them together as their
>> > open functions will want to claim the same IRQ. ?That's not really a
>> > problem because that should provide exclusivity between the two.
>>
>> Resource is bind with platform device. We'll meet resource conflict if
>> we register them both.
>
> Ok, in that case we need patch 3 split up such that we can move forward
> and get some of the build errors fixed.
>
> That probably means that the first half of patch 3 should be providing the
> IRQs and only the IRQs to the driver, and the driver making use of that
> information. ?Nothing more than that - not even the differing register
> offsets.
>
> The next stage would be to introduce the different device names, and use
> that to chose the different register layouts - but still using a hard coded
> base address. ?That will involve adding a new define for this to both
> arch/arm/mach-sa1100/include/mach/SA-1100.h and
> arch/arm/mach-pxa/include/mach/regs-rtc.h. ?At the same time, this patch
> should move the register definitions from those headers into the sa1100 RTC
> driver, and get rid of the virtual address definitions for these registers.

OK. I can keep the hard coded register definition and format patch right now.
The rtc register base of arch-sa1100, arch-pxa, arch-mmp are
different. It means
that I need use #ifdef CONFIG_ARCH to distinguish different arch. But I have a
question that removing #ifdef CONFIG_ARCH in driver code is our
target, isn't it?

>
> The clocking issues can also be sorted out as well without solving the base
> address issue - and that gets most of this patch set ready for merging
> without causing Robert any problems.
>
> I would like to see this ASAP so that the current build regression with
> PXA can be fixed.

OK. I'll move the clock operation in open()/close() function.

  parent reply	other threads:[~2012-02-23 13:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21  9:04 [PATCH 0/7] share sa1100 rtc driver to arch-mmp Haojian Zhuang
2012-02-21  9:04 ` [PATCH 1/7] rtc: sa1100: remove periodic code Haojian Zhuang
2012-02-21  9:04 ` [PATCH 2/7] rtc: sa1100: remove verification code of alarm Haojian Zhuang
2012-02-21  9:04 ` [PATCH 3/7] rtc: sa1100: use ioremap to map registers Haojian Zhuang
2012-02-22 12:33   ` Arnd Bergmann
2012-02-22 23:58   ` Russell King - ARM Linux
2012-02-23  0:55     ` Haojian Zhuang
2012-02-23  3:28   ` [PATCH v2 " Haojian Zhuang
2012-02-23 10:26     ` Russell King - ARM Linux
2012-02-21  9:04 ` [PATCH 4/7] ARM: sa1100: clean up of the clock support Haojian Zhuang
2012-02-22 12:31   ` Arnd Bergmann
2012-02-23 10:32   ` Russell King - ARM Linux
2012-02-21  9:04 ` [PATCH 5/7] ARM: pxa: add rtc dummy clock Haojian Zhuang
2012-02-21  9:04 ` [PATCH 6/7] rtc: sa1100: enable clk support Haojian Zhuang
2012-02-22 12:29   ` Arnd Bergmann
2012-02-22 13:16     ` Haojian Zhuang
2012-02-22 13:20     ` Russell King - ARM Linux
2012-02-22 13:47       ` Arnd Bergmann
2012-02-23 10:34   ` Russell King - ARM Linux
2012-02-23 10:40     ` Haojian Zhuang
2012-02-23 10:54       ` Russell King - ARM Linux
2012-02-21  9:04 ` [PATCH 7/7] ARM: mmp: enable rtc Haojian Zhuang
     [not found]   ` <1329815642.22876.YahooMailNeo@web162001.mail.bf1.yahoo.com>
2012-02-21  9:15     ` [HELP REQUIRED] : Andorid FIQ Debugger Porting issue on Kernel2.6.36 PINTU KUMAR
2012-02-21 15:37 ` [PATCH 0/7] share sa1100 rtc driver to arch-mmp Jean-Christophe PLAGNIOL-VILLARD
2012-02-21 15:54   ` Nicolas Ferre
2012-02-22 12:39 ` Arnd Bergmann
2012-02-22 13:22   ` Haojian Zhuang
2012-02-22 13:49     ` Arnd Bergmann
2012-02-22 15:37       ` Haojian Zhuang
2012-02-22 16:38         ` Robert Jarzmik
2012-02-23  0:51           ` Haojian Zhuang
2012-02-23  8:52             ` Robert Jarzmik
2012-02-23  9:45               ` Haojian Zhuang
2012-02-23 10:00                 ` Russell King - ARM Linux
2012-02-23 10:22                   ` Haojian Zhuang
2012-02-23 10:49                     ` Russell King - ARM Linux
2012-02-23 10:59                       ` Russell King - ARM Linux
2012-02-23 13:32                       ` Haojian Zhuang [this message]
2012-02-23 14:04                         ` Russell King - ARM Linux
2012-02-23  0:01 ` Russell King - ARM Linux

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='CAN1soZyL=659A2gLp_tLKaUTnBkLi1w0NgVq4SD4in1JE1v4VA@mail.gmail.com' \
    --to=haojian.zhuang@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).