summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-highbank/include
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-02-16 19:23:45 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-03-03 14:08:44 +0100
commite503b299efbbd49cac43878acb1f901c66c41d3d (patch)
tree890dab2580537a4377ba27d14824665ce39c1012 /arch/arm/mach-highbank/include
parent6ae2455e808cbb51303981fe9d6afb785ea99566 (diff)
downloadbarebox-e503b299efbbd49cac43878acb1f901c66c41d3d.tar.gz
barebox-e503b299efbbd49cac43878acb1f901c66c41d3d.tar.xz
highbank: move register value to include/mach
so the board can use it Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-highbank/include')
-rw-r--r--arch/arm/mach-highbank/include/mach/hardware.h14
-rw-r--r--arch/arm/mach-highbank/include/mach/sysregs.h52
2 files changed, 66 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/include/mach/hardware.h b/arch/arm/mach-highbank/include/mach/hardware.h
new file mode 100644
index 0000000000..db7fff242f
--- /dev/null
+++ b/arch/arm/mach-highbank/include/mach/hardware.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2010-2011 Calxeda, Inc
+ * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
+ *
+ * GPLv2 only
+ */
+
+#ifndef __MACH_HARDWARE_H__
+#define __MACH_HARDWARE_H__
+
+#define HB_SREG_A9_BASE 0xfff3c000
+#define HB_SYSRAM_OPP_TABLE_BASE 0xfff8f000
+
+#endif /* __MACH_HARDWARE_H__ */
diff --git a/arch/arm/mach-highbank/include/mach/sysregs.h b/arch/arm/mach-highbank/include/mach/sysregs.h
new file mode 100644
index 0000000000..c879422194
--- /dev/null
+++ b/arch/arm/mach-highbank/include/mach/sysregs.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2011 Calxeda, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef _MACH_HIGHBANK__SYSREGS_H_
+#define _MACH_HIGHBANK__SYSREGS_H_
+
+#include <io.h>
+
+extern void __iomem *sregs_base;
+
+#define HB_SREG_A9_PWR_REQ 0xf00
+#define HB_SREG_A9_BOOT_STAT 0xf04
+#define HB_SREG_A9_BOOT_DATA 0xf08
+
+#define HB_PWR_SUSPEND 0
+#define HB_PWR_SOFT_RESET 1
+#define HB_PWR_HARD_RESET 2
+#define HB_PWR_SHUTDOWN 3
+
+static inline void hingbank_set_pwr_suspend(void)
+{
+ writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ);
+}
+
+static inline void hingbank_set_pwr_shutdown(void)
+{
+ writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ);
+}
+
+static inline void hingbank_set_pwr_soft_reset(void)
+{
+ writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
+}
+
+static inline void hingbank_set_pwr_hard_reset(void)
+{
+ writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
+}
+
+#endif