[PATCH] Keys: Add request-key process documentation
[firewire-audio.git] / arch / arm / mach-iop3xx / common.c
blobfdeeef489a73592039c605ed55a2156ac277801f
1 /*
2 * arch/arm/mach-iop3xx/common.c
4 * Common routines shared across all IOP3xx implementations
6 * Author: Deepak Saxena <dsaxena@mvista.com>
8 * Copyright 2003 (c) MontaVista, Software, Inc.
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
15 #include <linux/config.h>
16 #include <linux/delay.h>
17 #include <asm/hardware.h>
20 * Shared variables
22 unsigned long iop3xx_pcibios_min_io = 0;
23 unsigned long iop3xx_pcibios_min_mem = 0;
25 #ifdef CONFIG_ARCH_EP80219
26 #include <linux/kernel.h>
28 * Default power-off for EP80219
31 static inline void ep80219_send_to_pic(__u8 c) {
34 void ep80219_power_off(void)
37 * This function will send a SHUTDOWN_COMPLETE message to the PIC controller
38 * over I2C. We are not using the i2c subsystem since we are going to power
39 * off and it may be removed
42 /* Send the Address byte w/ the start condition */
43 *IOP321_IDBR1 = 0x60;
44 *IOP321_ICR1 = 0xE9;
45 mdelay(1);
47 /* Send the START_MSG byte w/ no start or stop condition */
48 *IOP321_IDBR1 = 0x0F;
49 *IOP321_ICR1 = 0xE8;
50 mdelay(1);
52 /* Send the SHUTDOWN_COMPLETE Message ID byte w/ no start or stop condition */
53 *IOP321_IDBR1 = 0x03;
54 *IOP321_ICR1 = 0xE8;
55 mdelay(1);
57 /* Send an ignored byte w/ stop condition */
58 *IOP321_IDBR1 = 0x00;
59 *IOP321_ICR1 = 0xEA;
61 while (1) ;
64 #include <linux/init.h>
65 #include <linux/pm.h>
67 static int __init ep80219_init(void)
69 pm_power_off = ep80219_power_off;
70 return 0;
72 arch_initcall(ep80219_init);
73 #endif