From: Andre Heider <a.heider@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 04/10] ARM: bcm2835: cleanup clock registering
Date: Sat, 19 Oct 2013 14:20:49 +0200 [thread overview]
Message-ID: <1382185254-29183-3-git-send-email-a.heider@gmail.com> (raw)
In-Reply-To: <1382185130-28995-1-git-send-email-a.heider@gmail.com>
Sync exposed names while at it.
Signed-off-by: Andre Heider <a.heider@gmail.com>
---
arch/arm/mach-bcm2835/core.c | 31 +++++++------------------------
1 file changed, 7 insertions(+), 24 deletions(-)
diff --git a/arch/arm/mach-bcm2835/core.c b/arch/arm/mach-bcm2835/core.c
index 906e434..6835960 100644
--- a/arch/arm/mach-bcm2835/core.c
+++ b/arch/arm/mach-bcm2835/core.c
@@ -32,37 +32,20 @@
#include <mach/core.h>
#include <linux/amba/bus.h>
-enum brcm_clks {
- dummy, clk_ref_3, clk_ref_1, clks_max
-};
-
-static struct clk *clks[clks_max];
-
static int bcm2835_clk_init(void)
{
- int ret;
-
- clks[dummy] = clk_fixed("dummy", 0);
- clks[clk_ref_3] = clk_fixed("ref3", 3 * 1000 * 1000);
- clks[clk_ref_1] = clk_fixed("ref1", 1 * 1000 * 1000);
+ struct clk *clk;
- ret = clk_register_clkdev(clks[dummy], "apb_pclk", NULL);
- if (ret)
- goto clk_err;
+ clk = clk_fixed("apb_pclk", 0);
+ clk_register_clkdev(clk, "apb_pclk", NULL);
- ret = clk_register_clkdev(clks[clk_ref_3], NULL, "uart0-pl0110");
- if (ret)
- goto clk_err;
+ clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000);
+ clk_register_clkdev(clk, NULL, "uart0-pl0110");
- ret = clk_register_clkdev(clks[clk_ref_1], NULL, "bcm2835-cs");
- if (ret)
- goto clk_err;
+ clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000);
+ clk_register_clkdev(clk, NULL, "bcm2835-cs");
return 0;
-
-clk_err:
- return ret;
-
}
postcore_initcall(bcm2835_clk_init);
--
1.8.3.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-10-19 12:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-19 12:18 [PATCH 00/10] RPi mailbox support Andre Heider
2013-10-19 12:18 ` [PATCH 01/10] ARM: cache: restore cache functions from the PBL Andre Heider
2013-10-19 12:20 ` [PATCH 02/10] ARM: cache: do not crash when the MMU isn't yet setup Andre Heider
2013-10-19 12:20 ` [PATCH 03/10] common: add a macro to align an array on the stack Andre Heider
2013-10-19 12:20 ` Andre Heider [this message]
2013-10-19 12:20 ` [PATCH 05/10] ARM: bcm2835: register the clocksource driver earlier Andre Heider
2013-10-19 12:20 ` [PATCH 06/10] ARM: bcm2835: register the clocksource device earlier Andre Heider
2013-10-19 12:20 ` [PATCH 07/10] ARM: bcm2835: add a mailbox driver for VideoCore Andre Heider
2013-10-19 12:20 ` [PATCH 08/10] ARM: rpi: register a clkdev for the eMMC clock Andre Heider
2013-10-19 12:20 ` [PATCH 09/10] mci: bcm2835: use the registered device clkdev Andre Heider
2013-10-19 12:21 ` [PATCH 10/10] ARM: rpi: use the proper ARM memory size Andre Heider
2013-10-21 8:46 ` [PATCH 00/10] RPi mailbox support Sascha Hauer
2013-10-21 15:32 ` Andre Heider
2013-10-22 13:34 ` Sascha Hauer
2013-10-22 16:57 ` Andre Heider
2013-10-22 21:37 ` Sascha Hauer
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=1382185254-29183-3-git-send-email-a.heider@gmail.com \
--to=a.heider@gmail.com \
--cc=barebox@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox