From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: on duplicating device tree clk constants
Date: Wed, 26 Mar 2014 11:43:16 +0400 [thread overview]
Message-ID: <20140326114316.26869b3b6dd537859df09a20@gmail.com> (raw)
Hi!
Just now I'm working on improvement of device tree support in barebox-mips.
I have examined some existing ARM device trees. I have a clock-related question.
I'll use tegra20 device tree as an example.
We have the include/dt-bindings/clock/tegra20-car.h file with clock numbers defines:
Here is a small part of the file:
#define TEGRA20_CLK_CPU 0
/* 1 */
/* 2 */
#define TEGRA20_CLK_AC97 3
#define TEGRA20_CLK_RTC 4
#define TEGRA20_CLK_TIMER 5
#define TEGRA20_CLK_UARTA 6
At the other hand we have enum tegra20_clks definition in the drivers/clk/tegra/clk-tegra20.c file:
enum tegra20_clks {
cpu, ac97 = 3, rtc, timer, uarta, uartb, gpio, sdmmc2, i2s1 = 11, i2c1,
ndflash, sdmmc1, sdmmc4, twc, pwm, i2s2, epp, gr2d = 21, usbd, isp,
I see that the constants are the same, but they have differrent names.
Can we drop duplicated definitions?
What device tree clock design pattern I have to use for new code?
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2014-03-26 7:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 7:43 Antony Pavlov [this message]
2014-03-26 9:03 ` Lucas Stach
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=20140326114316.26869b3b6dd537859df09a20@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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