]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: uniphier: add GPU(Mali) reset deassert and clk enable
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 15 Sep 2017 12:43:22 +0000 (21:43 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 18 Sep 2017 11:26:18 +0000 (20:26 +0900)
The driver for Linux is out of control of Socionext, so set up
reset / clock in here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/clk/clk-ld20.c
arch/arm/mach-uniphier/clk/clk-pxs3.c

index 5bb560cafe1d2bf4101b706ea09a6ccd7966dfe1..f79fb38535cdffde48967ad50292da063fd13708 100644 (file)
@@ -4,14 +4,26 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#include <linux/bitops.h>
 #include <linux/io.h>
 
 #include "../init.h"
+#include "../sc64-regs.h"
 
 #define SDCTRL_EMMC_HW_RESET   0x59810280
 
 void uniphier_ld20_clk_init(void)
 {
+       u32 tmp;
+
+       tmp = readl(SC_RSTCTRL6);
+       tmp |= BIT(8);                  /* Mali */
+       writel(tmp, SC_RSTCTRL6);
+
+       tmp = readl(SC_CLKCTRL6);
+       tmp |= BIT(8);                  /* Mali */
+       writel(tmp, SC_CLKCTRL6);
+
        /* TODO: use "mmc-pwrseq-emmc" */
        writel(1, SDCTRL_EMMC_HW_RESET);
 }
index 2dee857a18c8d17cd201c7b04f9eeda8bb1620b0..3b9cc626f1414fe5c8e8fbdf6be11db497f1bb2b 100644 (file)
@@ -4,14 +4,26 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#include <linux/bitops.h>
 #include <linux/io.h>
 
 #include "../init.h"
+#include "../sc64-regs.h"
 
 #define SDCTRL_EMMC_HW_RESET   0x59810280
 
 void uniphier_pxs3_clk_init(void)
 {
+       u32 tmp;
+
+       tmp = readl(SC_RSTCTRL6);
+       tmp |= BIT(8);                  /* Mali */
+       writel(tmp, SC_RSTCTRL6);
+
+       tmp = readl(SC_CLKCTRL6);
+       tmp |= BIT(8);                  /* Mali */
+       writel(tmp, SC_CLKCTRL6);
+
        /* TODO: use "mmc-pwrseq-emmc" */
        writel(1, SDCTRL_EMMC_HW_RESET);
 }