linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Nick <ndroogh@rogers.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: DTS question - MPC5200b
Date: Wed, 13 Feb 2008 09:49:06 +1100	[thread overview]
Message-ID: <20080212224906.GA21230@localhost.localdomain> (raw)
In-Reply-To: <47B1D943.6020708@rogers.com>

On Tue, Feb 12, 2008 at 12:37:07PM -0500, Nick wrote:
> Hi,
> 
> I need some help.  I am trying to access timer 7 on the MPC5200B 
> processor.  I have the DTS file setup like this

Others have addressed the most salient points, but some general
corrections for your device tree..

>         gpt@670 {    // General Purpose Timer
>           device_type = "gpt";

device_type shouldn't be here.

>             compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
>             cell-index = <7>;

You probably don't want cell-index.  cell-index should *only* be used
when there is some global register somewhere that's indexed by the
cell number.

>             reg = <670 10>;
>             interrupts = <1 10 0>;
>             interrupt-parent = <&mpc5200_pic>;
>         };
> 
> I have timers 0 to 6 defined the same way except the cell-index reflects 
> the timer number.

Presumably 'reg' is different for each, as well.

> In my platform file where I am doing my board setup, I tried the  following.
> 
> timer7 = mpc52xx_find_and_map ("mpc5200b-gpt");
> 
> How do I specify the timer based on the cell-index?

You don't.  As Grant explains, use reg instead.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

      parent reply	other threads:[~2008-02-12 22:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12 17:37 DTS question - MPC5200b Nick
2008-02-12 18:07 ` Jarno Manninen
2008-02-12 19:47   ` Grant Likely
2008-02-12 18:28 ` Grant Likely
2008-02-12 22:49 ` David Gibson [this message]

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=20080212224906.GA21230@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ndroogh@rogers.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).