connectTheSignalSlot.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * linux/arch/arm/mach-omap1/pm.c
  3. *
  4. * OMAP Power Management Routines
  5. *
  6. * Original code for the SA11x0:
  7. * Copyright (c) 2001 Cliff Brake <cbrake@accelent.com>
  8. *
  9. * Modified for the PXA250 by Nicolas Pitre:
  10. * Copyright (c) 2002 Monta Vista Software, Inc.
  11. *
  12. * Modified for the OMAP1510 by David Singleton:
  13. * Copyright (c) 2002 Monta Vista Software, Inc.
  14. *
  15. * Cleanup 2004 for OMAP1510/1610 by Dirk Behme <dirk.behme@de.bosch.com>
  16. *
  17. * This program is free software; you can redistribute it and/or modify it
  18. * under the terms of the GNU General Public License as published by the
  19. * Free Software Foundation; either version 2 of the License, or (at your
  20. * option) any later version.
  21. *
  22. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  23. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  24. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  25. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  27. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  28. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  29. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  31. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. *
  33. * You should have received a copy of the GNU General Public License along
  34. * with this program; if not, write to the Free Software Foundation, Inc.,
  35. * 675 Mass Ave, Cambridge, MA 02139, USA.
  36. */
  37. #include <linux/suspend.h>
  38. #include <linux/sched.h>
  39. #include <linux/proc_fs.h>
  40. #include <linux/interrupt.h>
  41. #include <linux/sysfs.h>
  42. #include <linux/module.h>
  43. #include <linux/io.h>
  44. #include <linux/atomic.h>
  45. #include <asm/fncpy.h>
  46. #include <asm/system_misc.h>
  47. #include <asm/irq.h>
  48. #include <asm/mach/time.h>
  49. #include <asm/mach/irq.h>
  50. #include <mach/tc.h>
  51. #include <mach/mux.h>
  52. #include <linux/omap-dma.h>
  53. #include <plat/dmtimer.h>
  54. #include <mach/irqs.h>
  55. #include "iomap.h"
  56. #include "clock.h"
  57. #include "pm.h"
  58. #include "sram.h"
  59. static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE];
  60. static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE];
  61. static unsigned short ulpd_sleep_save[ULPD_SLEEP_SAVE_SIZE];
  62. static unsigned int mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_SIZE];
  63. static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE];
  64. static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE];
  65. #ifdef CONFIG_OMAP_32K_TIMER
  66. static unsigned short enable_dyn_sleep = 1;
  67. static ssize_t idle_show(struct kobject *kobj, struct kobj_attribute *attr,
  68. char *buf)
  69. {
  70. return sprintf(buf, "%hu\n", enable_dyn_sleep);
  71. }
  72. static ssize_t idle_store(struct kobject *kobj, struct kobj_attribute *attr,
  73. const char * buf, size_t n)
  74. {