linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbou@mail.ru>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH 6/7] mpc83xx: timer driver for PM wakeup
Date: Sat, 27 Oct 2007 14:46:07 +0400	[thread overview]
Message-ID: <20071027104607.GA2303@zarina> (raw)
In-Reply-To: <20071023212502.GE30959@loki.buserror.net>

Hi Scott,

On Tue, Oct 23, 2007 at 04:25:02PM -0500, Scott Wood wrote:
> This is a driver for the mpc83xx's GTM4 timer.  It's functionality
> is limited to providing a wakeup source for suspend-to-RAM.
> 
> Signed-off-by: Scott Wood <scottwood@freescale.com>

I think you can use dev_err(&dev->dev

> +static int __devinit gtm_probe(struct of_device *dev,
> +                               const struct of_device_id *match)
> +{
> +	struct device_node *np = dev->node;
> +	struct resource res;
> +	int ret = 0;
> +	u32 busfreq = fsl_get_sys_freq();
> +	struct gtm_priv *priv;
> +
> +	if (busfreq == 0) {
> +		printk(KERN_ERR "gtm: No bus frequency in device tree.\n");

here

> +		return -ENODEV;
> +	}
> +
> +	priv = kmalloc(sizeof(struct gtm_priv), GFP_KERNEL);
> +	if (!priv)
> +		return -ENOMEM;
> +
> +	spin_lock_init(&priv->lock);
> +	dev_set_drvdata(&dev->dev, priv);
> +
> +	ret = of_address_to_resource(np, 0, &res);
> +	if (ret)
> +		goto out;
> +
> +	priv->irq = irq_of_parse_and_map(np, 0);
> +	if (priv->irq == NO_IRQ) {
> +		printk(KERN_ERR "mpc83xx-gtm exists in device tree "
> +		                "without an IRQ.\n");

and here.

Thanks,

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

  reply	other threads:[~2007-10-27 10:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-23 21:24 [PATCH 1/7] Implement arch disable/enable irq hooks Scott Wood
2007-10-23 21:24 ` [PATCH 2/7] pm: Add TLF_SLEEPING hack to delay interrupt delivery when waking from sleep Scott Wood
2007-10-23 21:24 ` [PATCH 3/7] Add 6xx-style HID0_SLEEP support Scott Wood
2007-10-23 21:24 ` [PATCH 4/7] fsl_soc: Factor fsl_get_sys_freq() out of the wdt init Scott Wood
2007-10-23 21:25 ` [PATCH 5/7] mpc83xx: Power Management support Scott Wood
2007-10-23 21:25 ` [PATCH 6/7] mpc83xx: timer driver for PM wakeup Scott Wood
2007-10-27 10:46   ` Anton Vorontsov [this message]
2007-10-23 21:25 ` [PATCH 7/7] gianfar: Add flags for magic packet and MDIO Scott Wood
2007-10-23 21:33 ` [PATCH 1/7] Implement arch disable/enable irq hooks Josh Boyer
2007-10-23 21:34   ` Scott Wood
2007-10-23 22:45     ` Josh Boyer
2007-10-25 18:01 ` Scott Wood
2008-04-25 12:57 ` Guennadi Liakhovetski
2008-04-28 20:33   ` Scott Wood
2008-04-29  4:44     ` Paul Mackerras
2008-04-29  5:04       ` Paul Mackerras
2008-04-30 10:33       ` Guennadi Liakhovetski
2008-04-30 22:17         ` Paul Mackerras
2008-04-30 17:22       ` Scott Wood
2008-04-30 21:01         ` Segher Boessenkool
2008-04-30 21:07           ` Scott Wood

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=20071027104607.GA2303@zarina \
    --to=cbou@mail.ru \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=scottwood@freescale.com \
    /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).