From: geomatsi@gmail.com (Sergey Matyukevich)
To: linux-arm-kernel@lists.infradead.org
Subject: AT91SAM9260: How to output PCK0 clock on a GPIO pin
Date: Tue, 1 Sep 2009 00:35:46 +0400 [thread overview]
Message-ID: <20090901003546.14313e09@realm> (raw)
In-Reply-To: <b7beacff65dbf47b5e36c3480ec11085@colcan.ca>
> So are the following statements correct?
>
> 1. The pck0 clock I've been playing with has nothing to do with the
> clock I want on PC6 (TIOB2).
Yes. PCK's (programmable clocks) are assigned to different pins:
PB30, PC1 for PCK0 and to PB31, PC2 for PCK1.
For PCK see ch. 26 of at91sam9260 datasheet.
> 2. I have to use instead the "tc2_clk" as defined in
> arch/arm/mach-at-91/at91sam9260.c.
Yes
> 3. I have to access the TC_CMR register directly to set things up. I
> mean, there are no macros already defined to access these structures.
You have to 'ioremap' required registers and write to those
registers directly using memory-writing macroses iowriteXX.
But at first decide what you need, TIOB or PCK. If you don't need all
the power of Ryan Mallon's pwm driver (see below in the thread) and
all you need is clocking output on GPIO pin, then you might be happy
with PCK. Note that PMC_PCK registers allows several dividers, if
original clock is too high.
Sergey
next prev parent reply other threads:[~2009-08-31 20:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 15:32 AT91SAM9260: How to output PCK0 clock on a GPIO pin Pedro I. Sanchez
2009-08-31 16:58 ` Stephen Munnings
2009-08-31 18:27 ` Pedro I. Sanchez
2009-08-31 18:44 ` Stephen Munnings
2009-08-31 19:02 ` Pedro I. Sanchez
2009-08-31 19:13 ` Stephen Munnings
2009-08-31 19:21 ` Pedro I. Sanchez
2009-08-31 19:33 ` Sergey Matyukevich
2009-08-31 19:58 ` Stephen Munnings
2009-08-31 20:37 ` Pedro I. Sanchez
2009-08-31 20:44 ` Stephen Munnings
2009-08-31 21:09 ` Pedro I. Sanchez
2009-08-31 20:03 ` Pedro I. Sanchez
2009-08-31 20:33 ` Ryan Mallon
2009-08-31 20:46 ` Pedro I. Sanchez
2009-08-31 20:35 ` Sergey Matyukevich [this message]
2009-08-31 21:06 ` Pedro I. Sanchez
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=20090901003546.14313e09@realm \
--to=geomatsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.