]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/ppc/syslib/ppc4xx_pm.c
Linux-2.6.12-rc2
[mirror_ubuntu-artful-kernel.git] / arch / ppc / syslib / ppc4xx_pm.c
1 /*
2 * Author: Armin Kuster <akuster@mvista.com>
3 *
4 * 2002 (c) MontaVista, Software, Inc. This file is licensed under
5 * the terms of the GNU General Public License version 2. This program
6 * is licensed "as is" without any warranty of any kind, whether express
7 * or implied.
8 *
9 * This an attempt to get Power Management going for the IBM 4xx processor.
10 * This was derived from the ppc4xx._setup.c file
11 */
12
13 #include <linux/config.h>
14 #include <linux/init.h>
15
16 #include <asm/ibm4xx.h>
17
18 void __init
19 ppc4xx_pm_init(void)
20 {
21
22 unsigned int value = 0;
23
24 /* turn off unused hardware to save power */
25 #ifdef CONFIG_405GP
26 value |= CPM_DCP; /* CodePack */
27 #endif
28
29 #if !defined(CONFIG_IBM_OCP_GPIO)
30 value |= CPM_GPIO0;
31 #endif
32
33 #if !defined(CONFIG_PPC405_I2C_ADAP)
34 value |= CPM_IIC0;
35 #ifdef CONFIG_STB03xxx
36 value |= CPM_IIC1;
37 #endif
38 #endif
39
40
41 #if !defined(CONFIG_405_DMA)
42 value |= CPM_DMA;
43 #endif
44
45 mtdcr(DCRN_CPMFR, value);
46
47 }