From: David Cohen <david.a.cohen@linux.intel.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: wim@iguana.be, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org,
linux-watchdog@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk
Subject: Re: [PATCH v4 2/2] x86: intel-mid: add watchdog platform code for Merrifield
Date: Tue, 15 Apr 2014 14:17:22 -0700 [thread overview]
Message-ID: <20140415211722.GA4420@psi-dev26.jf.intel.com> (raw)
In-Reply-To: <20140415211349.GA10245@roeck-us.net>
On Tue, Apr 15, 2014 at 02:13:49PM -0700, Guenter Roeck wrote:
> On Tue, Apr 15, 2014 at 01:09:00PM -0700, David Cohen wrote:
> > On Tue, Apr 15, 2014 at 01:06:06PM -0700, David Cohen wrote:
> > > This patch adds platform code for Intel Merrifield.
> > > Since the watchdog is not part of SFI table, we have no other option but
> > > to manually register watchdog's platform device (argh!).
> > >
> > > Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
> > > ---
> > > arch/x86/platform/intel-mid/device_libs/Makefile | 1 +
> > > .../platform/intel-mid/device_libs/platform_wdt.c | 66 ++++++++++++++++++++++
> > > 2 files changed, 67 insertions(+)
> > > create mode 100644 arch/x86/platform/intel-mid/device_libs/platform_wdt.c
> > >
> > > diff --git a/arch/x86/platform/intel-mid/device_libs/Makefile b/arch/x86/platform/intel-mid/device_libs/Makefile
> > > index 097e7a7940d8..af9307f2cc28 100644
> > > --- a/arch/x86/platform/intel-mid/device_libs/Makefile
> > > +++ b/arch/x86/platform/intel-mid/device_libs/Makefile
> > > @@ -20,3 +20,4 @@ obj-$(subst m,y,$(CONFIG_DRM_MEDFIELD)) += platform_tc35876x.o
> > > obj-$(subst m,y,$(CONFIG_SERIAL_MRST_MAX3110)) += platform_max3111.o
> > > # MISC Devices
> > > obj-$(subst m,y,$(CONFIG_KEYBOARD_GPIO)) += platform_gpio_keys.o
> > > +obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_wdt.o
> > > diff --git a/arch/x86/platform/intel-mid/device_libs/platform_wdt.c b/arch/x86/platform/intel-mid/device_libs/platform_wdt.c
> > > new file mode 100644
> > > index 000000000000..4b0434b54aff
> > > --- /dev/null
> > > +++ b/arch/x86/platform/intel-mid/device_libs/platform_wdt.c
> > > @@ -0,0 +1,66 @@
> > > +/*
> > > + * platform_wdt.c: Watchdog platform library file
> > > + *
> > > + * (C) Copyright 2014 Intel Corporation
> > > + * Author: David Cohen <david.a.cohen@linux.intel.com>
> > > + *
> > > + * This program is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU General Public License
> > > + * as published by the Free Software Foundation; version 2
> > > + * of the License.
> > > + */
> > > +
> > > +#include <linux/init.h>
> > > +#include <linux/interrupt.h>
> > > +#include <linux/platform_device.h>
> > > +#include <linux/platform_data/intel-mid_wdt.h>
> > > +#include <asm/intel-mid.h>
> > > +
> > > +#define TANGIER_EXT_TIMER0_MSI 15
> > > +
> > > +static struct platform_device wdt_dev = {
> > > + .name = "intel_mid_wdt",
> > > + .id = -1,
> > > +};
> > > +
> > > +static int tangier_probe(struct platform_device *pdev)
> > > +{
> > > + int ioapic;
> > > + struct io_apic_irq_attr irq_attr = { 0 };
> > > +
> > > + ioapic = mp_find_ioapic(TANGIER_EXT_TIMER0_MSI);
> >
> > Forgot remove this hardcoded irq number. I'll send v4.1 of this patch.
> >
> > BR, David
> >
> > > + if (ioapic >= 0) {
> > > + int ret;
> > > + irq_attr.ioapic = ioapic;
> > > + irq_attr.ioapic_pin = TANGIER_EXT_TIMER0_MSI;
> > > + irq_attr.trigger = 1;
> > > + irq_attr.polarity = 0; /* Active high */
> > > + ret = io_apic_set_pci_routing(NULL, TANGIER_EXT_TIMER0_MSI,
> > > + &irq_attr);
>
> Here is another one, just in case you missed it.
This one I didn't miss. I checked and it returns dummy error code (-1).
Better to keep the hardcoded value.
Br, David
>
> Guenter
next prev parent reply other threads:[~2014-04-15 21:17 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 20:59 [PATCH 0/2] Initial implementation of Intel MID watchdog driver David Cohen
2014-04-08 20:59 ` [PATCH 1/2] watchdog: add Intel MID watchdog driver support David Cohen
2014-04-08 23:56 ` Randy Dunlap
2014-04-09 17:48 ` David Cohen
2014-04-10 13:51 ` Guenter Roeck
2014-04-10 18:24 ` David Cohen
2014-04-09 0:17 ` Guenter Roeck
2014-04-09 12:41 ` One Thousand Gnomes
2014-04-08 20:59 ` [PATCH 2/2] x86: intel-mid: add watchdog platform code for Merrifield David Cohen
2014-04-09 12:42 ` One Thousand Gnomes
2014-04-09 13:49 ` Alexander Stein
2014-04-09 13:58 ` One Thousand Gnomes
2014-04-09 14:03 ` Alexander Stein
2014-04-09 15:18 ` Guenter Roeck
2014-04-09 16:10 ` Alexander Stein
2014-04-09 17:15 ` Guenter Roeck
2014-04-10 11:08 ` One Thousand Gnomes
2014-04-09 18:00 ` David Cohen
2014-04-10 19:15 ` Guenter Roeck
2014-04-10 19:30 ` David Cohen
2014-04-10 20:35 ` Guenter Roeck
2014-04-10 21:23 ` David Cohen
2014-04-10 22:51 ` Guenter Roeck
2014-04-11 20:50 ` [PATCH v2 0/2] Initial implementation of Intel MID watchdog driver David Cohen
2014-04-11 20:50 ` [PATCH v2 1/2] watchdog: add Intel MID watchdog driver support David Cohen
2014-04-11 20:50 ` [PATCH v2 2/2] x86: intel-mid: add watchdog platform code for Merrifield David Cohen
2014-04-15 18:41 ` [PATCH v3 0/2] Initial implementation of Intel MID watchdog driver David Cohen
2014-04-15 18:41 ` [PATCH v3 1/2] watchdog: add Intel MID watchdog driver support David Cohen
2014-04-15 19:01 ` Guenter Roeck
2014-04-15 19:24 ` David Cohen
2014-04-15 18:41 ` [PATCH v3 2/2] x86: intel-mid: add watchdog platform code for Merrifield David Cohen
2014-04-15 19:09 ` Guenter Roeck
2014-04-15 19:30 ` David Cohen
2014-04-15 20:06 ` [PATCH v4 0/2] Initial implementation of Intel MID watchdog driver David Cohen
2014-04-15 20:06 ` [PATCH v4 1/2] watchdog: add Intel MID watchdog driver support David Cohen
2014-04-16 0:13 ` Guenter Roeck
2014-04-15 20:06 ` [PATCH v4 2/2] x86: intel-mid: add watchdog platform code for Merrifield David Cohen
2014-04-15 20:09 ` David Cohen
2014-04-15 21:13 ` Guenter Roeck
2014-04-15 21:17 ` David Cohen [this message]
2014-04-15 21:35 ` Guenter Roeck
2014-04-15 21:39 ` David Cohen
2014-04-15 22:20 ` [PATCH v4.1 " David Cohen
2014-04-16 0:16 ` Guenter Roeck
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=20140415211722.GA4420@psi-dev26.jf.intel.com \
--to=david.a.cohen@linux.intel.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=wim@iguana.be \
--cc=x86@kernel.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).