preliminaryDataProcessing.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * OMAP4 CM instance functions
  3. *
  4. * Copyright (C) 2009 Nokia Corporation
  5. * Copyright (C) 2008-2011 Texas Instruments, Inc.
  6. * Paul Walmsley
  7. * Rajendra Nayak <rnayak@ti.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. *
  13. * This is needed since CM instances can be in the PRM, PRCM_MPU, CM1,
  14. * or CM2 hardware modules. For example, the EMU_CM CM instance is in
  15. * the PRM hardware module. What a mess...
  16. */
  17. #include <linux/kernel.h>
  18. #include <linux/types.h>
  19. #include <linux/errno.h>
  20. #include <linux/err.h>
  21. #include <linux/io.h>
  22. #include "iomap.h"
  23. #include "common.h"
  24. #include "clockdomain.h"
  25. #include "cm.h"
  26. #include "cm1_44xx.h"
  27. #include "cm2_44xx.h"
  28. #include "cm44xx.h"
  29. #include "cminst44xx.h"
  30. #include "cm-regbits-34xx.h"
  31. #include "cm-regbits-44xx.h"
  32. #include "prcm44xx.h"
  33. #include "prm44xx.h"
  34. #include "prcm_mpu44xx.h"
  35. #include "prcm-common.h"
  36. /*
  37. * CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield:
  38. *
  39. * 0x0 func: Module is fully functional, including OCP
  40. * 0x1 trans: Module is performing transition: wakeup, or sleep, or sleep
  41. * abortion
  42. * 0x2 idle: Module is in Idle mode (only OCP part). It is functional if
  43. * using separate functional clock
  44. * 0x3 disabled: Module is disabled and cannot be accessed
  45. *
  46. */
  47. #define CLKCTRL_IDLEST_FUNCTIONAL 0x0
  48. #define CLKCTRL_IDLEST_INTRANSITION 0x1
  49. #define CLKCTRL_IDLEST_INTERFACE_IDLE 0x2
  50. #define CLKCTRL_IDLEST_DISABLED 0x3
  51. static void __iomem *_cm_bases[OMAP4_MAX_PRCM_PARTITIONS];
  52. /**
  53. * omap_cm_base_init - Populates the cm partitions
  54. *
  55. * Populates the base addresses of the _cm_bases