preliminaryDataProcessing.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * OMAP4 PRM module functions
  3. *
  4. * Copyright (C) 2011-2012 Texas Instruments, Inc.
  5. * Copyright (C) 2010 Nokia Corporation
  6. * Benoît Cousson
  7. * Paul Walmsley
  8. * Rajendra Nayak <rnayak@ti.com>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/delay.h>
  16. #include <linux/errno.h>
  17. #include <linux/err.h>
  18. #include <linux/io.h>
  19. #include "soc.h"
  20. #include "iomap.h"
  21. #include "common.h"
  22. #include "vp.h"
  23. #include "prm44xx.h"
  24. #include "prm-regbits-44xx.h"
  25. #include "prcm44xx.h"
  26. #include "prminst44xx.h"
  27. #include "powerdomain.h"
  28. /* Static data */
  29. static const struct omap_prcm_irq omap4_prcm_irqs[] = {
  30. OMAP_PRCM_IRQ("wkup", 0, 0),
  31. OMAP_PRCM_IRQ("io", 9, 1),
  32. };
  33. static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
  34. .ack = OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
  35. .mask = OMAP4_PRM_IRQENABLE_MPU_OFFSET,
  36. .nr_regs = 2,
  37. .irqs = omap4_prcm_irqs,
  38. .nr_irqs = ARRAY_SIZE(omap4_prcm_irqs),
  39. .irq = 11 + OMAP44XX_IRQ_GIC_START,
  40. .read_pending_irqs = &omap44xx_prm_read_pending_irqs,
  41. .ocp_barrier = &omap44xx_prm_ocp_barrier,
  42. .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen,
  43. .restore_irqen = &omap44xx_prm_restore_irqen,
  44. };
  45. /*
  46. * omap44xx_prm_reset_src_map - map from bits in the PRM_RSTST
  47. * hardware register (which are specific to OMAP44xx SoCs) to reset
  48. * source ID bit shifts (which is an OMAP SoC-independent
  49. * enumeration)
  50. */
  51. static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
  52. { OMAP4430_GLOBAL_WARM_SW_RST_SHIFT,
  53. OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT },
  54. { OMAP4430_GLOBAL_COLD_RST_SHIFT,
  55. OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT },
  56. { OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT,