|
@@ -13,9 +13,16 @@
|
|
|
#include <linux/of.h>
|
|
|
#include <linux/platform_device.h>
|
|
|
|
|
|
-#include "common.h"
|
|
|
+#include "exynos-pmu.h"
|
|
|
#include "regs-pmu.h"
|
|
|
|
|
|
+#define PMU_TABLE_END (-1U)
|
|
|
+
|
|
|
+struct exynos_pmu_conf {
|
|
|
+ unsigned int offset;
|
|
|
+ unsigned int val[NUM_SYS_POWERDOWN];
|
|
|
+};
|
|
|
+
|
|
|
struct exynos_pmu_data {
|
|
|
const struct exynos_pmu_conf *pmu_config;
|
|
|
const struct exynos_pmu_conf *pmu_config_extra;
|
|
@@ -29,8 +36,19 @@ struct exynos_pmu_context {
|
|
|
const struct exynos_pmu_data *pmu_data;
|
|
|
};
|
|
|
|
|
|
+static void __iomem *pmu_base_addr;
|
|
|
static struct exynos_pmu_context *pmu_context;
|
|
|
|
|
|
+static inline void pmu_raw_writel(u32 val, u32 offset)
|
|
|
+{
|
|
|
+ writel_relaxed(val, pmu_base_addr + offset);
|
|
|
+}
|
|
|
+
|
|
|
+static inline u32 pmu_raw_readl(u32 offset)
|
|
|
+{
|
|
|
+ return readl_relaxed(pmu_base_addr + offset);
|
|
|
+}
|
|
|
+
|
|
|
static const struct exynos_pmu_conf exynos4210_pmu_config[] = {
|
|
|
/* { .offset = offset, .val = { AFTR, LPA, SLEEP } */
|
|
|
{ S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } },
|