ppc4xx_pm.c 924 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #include <linux/config.h>
  13. #include <linux/init.h>
  14. #include <asm/ibm4xx.h>
  15. void __init
  16. ppc4xx_pm_init(void)
  17. {
  18. unsigned int value = 0;
  19. /* turn off unused hardware to save power */
  20. #ifdef CONFIG_405GP
  21. value |= CPM_DCP; /* CodePack */
  22. #endif
  23. #if !defined(CONFIG_IBM_OCP_GPIO)
  24. value |= CPM_GPIO0;
  25. #endif
  26. #if !defined(CONFIG_PPC405_I2C_ADAP)
  27. value |= CPM_IIC0;
  28. #ifdef CONFIG_STB03xxx
  29. value |= CPM_IIC1;
  30. #endif
  31. #endif
  32. #if !defined(CONFIG_405_DMA)
  33. value |= CPM_DMA;
  34. #endif
  35. mtdcr(DCRN_CPMFR, value);
  36. }