fimc-is: Add exynos_smc() implementation (temporary workaround)
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 8 May 2015 14:35:05 +0000 (16:35 +0200)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:57:03 +0000 (14:57 +0900)
Ported from arch/arm64/kernel/exynos-smc.S, include/linux/smc.h
from LSI kernel.

Change-Id: I94a82210ab1f4cfdeff12b87e51592f8d417a060
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/media/platform/exynos/fimc-is/exynos-smc.S [new file with mode: 0644]

diff --git a/drivers/media/platform/exynos/fimc-is/exynos-smc.S b/drivers/media/platform/exynos/fimc-is/exynos-smc.S
new file mode 100644 (file)
index 0000000..ae1bd45
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics.
+ *
+ * Copied from omap-smc.S Copyright (C) 2010 Texas Instruments, Inc.
+ *
+ * This program is free software,you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/linkage.h>
+#include "smc.h"
+
+/*
+ * Function signature: void exynos_smc(u32 cmd, u32 arg1, u32 arg2, u32 arg3)
+ */
+ENTRY(exynos_smc)
+        dsb     sy
+        smc     #0
+        ret
+ENDPROC(exynos_smc)
+
+ENTRY(exynos_smc_readsfr)
+        stp     x1, x3, [sp, #-16]!
+
+        /* Currently, it supports only 32bit addresses */
+        lsr     w1, w0, #2
+        orr     w1, w1, #SMC_REG_CLASS_SFR_R
+        mov     w0, #SMC_CMD_REG
+        dsb     sy
+        smc     #0
+        ldp     x1, x3, [sp], #16
+        cmp     x0, #0
+        csel    x2, x2, x0, eq
+        str     x2, [x1]
+
+        ret
+ENDPROC(exynos_smc_readsfr)