From: "Dale Farnsworth" <dale@farnsworth.org>
To: galak@kernel.crashing.org, Linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] [POWERPC] Add interrupt resource for RTC CMOS driver
Date: 17 Aug 2007 09:32:55 -0700 [thread overview]
Message-ID: <20070817163255.26694.qmail@farnsworth.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0708170002400.21006@blarg.am.freescale.net>
> The RTC CMOS driver expects the interrupt to be a resource of the platform
> device. Use a fixed interrupt value of 8 since on PPC if we are using this
> its off an i8259 which we ensure has interrupt numbers 0..15.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/sysdev/rtc_cmos_setup.c | 15 +++++++++++----
> 1 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/rtc_cmos_setup.c
> b/arch/powerpc/sysdev/rtc_cmos_setup.c
> index e276048..1d2be7d 100644
> --- a/arch/powerpc/sysdev/rtc_cmos_setup.c
> +++ b/arch/powerpc/sysdev/rtc_cmos_setup.c
> @@ -20,14 +20,16 @@ static int __init add_rtc(void)
> {
> struct device_node *np;
> struct platform_device *pd;
> - struct resource res;
> + struct resource res[2];
> int ret;
>
> + memset(&res, 0, sizeof(res));
> +
> np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00");
> if (!np)
> return -ENODEV;
>
> - ret = of_address_to_resource(np, 0, &res);
> + ret = of_address_to_resource(np, 0, &res[0]);
> of_node_put(np);
> if (ret)
> return ret;
> @@ -36,11 +38,16 @@ static int __init add_rtc(void)
> * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the
> * address provided by the device node matches.
> */
> - if (res.start != RTC_PORT(0))
> + if (res[0].start != RTC_PORT(0))
> return -EINVAL;
>
> + res[1].start = 8;
Please add a comment to the source code (similar to that in changelog)
explaining the reason for the 8.
-Dale Farnsworth
next prev parent reply other threads:[~2007-08-17 16:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 5:03 [PATCH] [POWERPC] Add interrupt resource for RTC CMOS driver Kumar Gala
2007-08-17 16:32 ` Dale Farnsworth [this message]
2007-08-17 18:26 ` Kumar Gala
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=20070817163255.26694.qmail@farnsworth.org \
--to=dale@farnsworth.org \
--cc=Linuxppc-dev@ozlabs.org \
--cc=galak@kernel.crashing.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).