summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@linaro.org>2015-04-24 02:09:21 +0300
committerLaurent Pinchart <laurent.pinchart@linaro.org>2015-04-28 21:02:58 +0300
commita1bdbf57f7cb83f4816f2c78f4694eded7a43dbd (patch)
tree260f5362fcdc9edfe7b59c5e2209abf75008fda1
parente49bf06aa9c2f698a6e7d86adc02bd27651aae60 (diff)
[HACK] arm64: mmp: Register clkdev for the camera sensor
The SC2 MCLK clocks can't be referenced from DT due to lack of DT support in the PXA1928 clock driver. Register a clkdev entry for the camera sensor in board code in the meantime. Signed-off-by: Laurent Pinchart <laurent.pinchart@linaro.org> Acked-By: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
-rw-r--r--arch/arm64/mach/mmpx-dt.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm64/mach/mmpx-dt.c b/arch/arm64/mach/mmpx-dt.c
index 4af3c266ebd7..1cdcbc49e17d 100644
--- a/arch/arm64/mach/mmpx-dt.c
+++ b/arch/arm64/mach/mmpx-dt.c
@@ -9,6 +9,8 @@
* publishhed by the Free Software Foundation.
*/
+#include <linux/clk.h>
+#include <linux/clkdev.h>
#include <linux/io.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
@@ -271,10 +273,22 @@ static void __init pxa1928_reserve(void)
static void __init mmpx_dt_init_machine(void)
{
+ struct clk *clk;
+
/* init clk */
pxa1928_clk_init(APB_PHYS_BASE, AXI_PHYS_BASE,
AUD_PHYS_BASE, AUD_PHYS_BASE2);
+ /*
+ * HACK: Register the clkdev entry for the camera sensor until we can
+ * reference clocks from DT.
+ */
+ clk = clk_get(NULL, "SC2MCLK");
+ if (!IS_ERR(clk)) {
+ clk_register_clkdev(clk, NULL, "2-003c");
+ clk_put(clk);
+ }
+
of_platform_populate(NULL, of_default_bus_match_table,
mmpx_auxdata_lookup, &platform_bus);
}