summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-iop32x/common.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-09-18 23:10:26 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 10:25:36 +0100
commit3f7e5815f4b774270e6506962de37af85aa9c830 (patch)
tree7e4a2b0d6f8b9f1a21ba7a4eb8baf1a1ec04d4f9 /arch/arm/mach-iop32x/common.c
parent98954df6917cb8f7e65f4f0f79ed641112fcf6b6 (diff)
downloadlinux-3f7e5815f4b774270e6506962de37af85aa9c830.tar.bz2
[ARM] 3817/1: iop3xx: split the iop3xx mach into iop32x and iop33x
Split the iop3xx mach type into iop32x and iop33x -- split the config symbols, and move the code in the mach-iop3xx directory to the mach-iop32x and mach-iop33x directories. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-iop32x/common.c')
-rw-r--r--arch/arm/mach-iop32x/common.c72
1 files changed, 72 insertions, 0 deletions
diff --git a/arch/arm/mach-iop32x/common.c b/arch/arm/mach-iop32x/common.c
new file mode 100644
index 000000000000..8044af6a54e1
--- /dev/null
+++ b/arch/arm/mach-iop32x/common.c
@@ -0,0 +1,72 @@
+/*
+ * arch/arm/mach-iop32x/common.c
+ *
+ * Common routines shared across all IOP3xx implementations
+ *
+ * Author: Deepak Saxena <dsaxena@mvista.com>
+ *
+ * Copyright 2003 (c) MontaVista, Software, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/delay.h>
+#include <asm/hardware.h>
+
+/*
+ * Shared variables
+ */
+unsigned long iop3xx_pcibios_min_io = 0;
+unsigned long iop3xx_pcibios_min_mem = 0;
+
+#ifdef CONFIG_ARCH_EP80219
+#include <linux/kernel.h>
+/*
+ * Default power-off for EP80219
+ */
+
+static inline void ep80219_send_to_pic(__u8 c) {
+}
+
+void ep80219_power_off(void)
+{
+ /*
+ * This function will send a SHUTDOWN_COMPLETE message to the PIC controller
+ * over I2C. We are not using the i2c subsystem since we are going to power
+ * off and it may be removed
+ */
+
+ /* Send the Address byte w/ the start condition */
+ *IOP321_IDBR1 = 0x60;
+ *IOP321_ICR1 = 0xE9;
+ mdelay(1);
+
+ /* Send the START_MSG byte w/ no start or stop condition */
+ *IOP321_IDBR1 = 0x0F;
+ *IOP321_ICR1 = 0xE8;
+ mdelay(1);
+
+ /* Send the SHUTDOWN_COMPLETE Message ID byte w/ no start or stop condition */
+ *IOP321_IDBR1 = 0x03;
+ *IOP321_ICR1 = 0xE8;
+ mdelay(1);
+
+ /* Send an ignored byte w/ stop condition */
+ *IOP321_IDBR1 = 0x00;
+ *IOP321_ICR1 = 0xEA;
+
+ while (1) ;
+}
+
+#include <linux/init.h>
+#include <linux/pm.h>
+
+static int __init ep80219_init(void)
+{
+ pm_power_off = ep80219_power_off;
+ return 0;
+}
+arch_initcall(ep80219_init);
+#endif