Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1 | /* |
Paul Walmsley | a5ffef6 | 2011-09-14 16:01:21 -0600 | [diff] [blame] | 2 | * OMAP2/3 clockdomain common data |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 3 | * |
Paul Walmsley | a5ffef6 | 2011-09-14 16:01:21 -0600 | [diff] [blame] | 4 | * Copyright (C) 2008-2011 Texas Instruments, Inc. |
Paul Walmsley | 98fa3d8 | 2010-01-26 20:13:13 -0700 | [diff] [blame] | 5 | * Copyright (C) 2008-2010 Nokia Corporation |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 6 | * |
Paul Walmsley | dc0b3a7 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 7 | * Paul Walmsley, Jouni Högander |
Paul Walmsley | 55ed969 | 2010-01-26 20:12:59 -0700 | [diff] [blame] | 8 | * |
| 9 | * This file contains clockdomains and clockdomain wakeup/sleep |
| 10 | * dependencies for the OMAP2/3 chips. Some notes: |
| 11 | * |
| 12 | * A useful validation rule for struct clockdomain: Any clockdomain |
| 13 | * referenced by a wkdep_srcs or sleepdep_srcs array must have a |
| 14 | * dep_bit assigned. So wkdep_srcs/sleepdep_srcs are really just |
| 15 | * software-controllable dependencies. Non-software-controllable |
| 16 | * dependencies do exist, but they are not encoded below (yet). |
| 17 | * |
| 18 | * 24xx does not support programmable sleep dependencies (SLEEPDEP) |
| 19 | * |
| 20 | * The overly-specific dep_bit names are due to a bit name collision |
| 21 | * with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift |
| 22 | * value are the same for all powerdomains: 2 |
| 23 | * |
| 24 | * XXX should dep_bit be a mask, so we can test to see if it is 0 as a |
| 25 | * sanity check? |
| 26 | * XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 27 | */ |
| 28 | |
Abhijit Pagare | 1a42272 | 2010-01-26 20:12:54 -0700 | [diff] [blame] | 29 | /* |
| 30 | * To-Do List |
| 31 | * -> Port the Sleep/Wakeup dependencies for the domains |
| 32 | * from the Power domain framework |
| 33 | */ |
| 34 | |
Paul Walmsley | dc0b3a7 | 2010-12-21 20:01:20 -0700 | [diff] [blame] | 35 | #include <linux/kernel.h> |
| 36 | #include <linux/io.h> |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 37 | |
Paul Walmsley | 1540f214 | 2010-12-21 21:05:15 -0700 | [diff] [blame] | 38 | #include "clockdomain.h" |
Paul Walmsley | 59fb659 | 2010-12-21 15:30:55 -0700 | [diff] [blame] | 39 | #include "prm2xxx_3xxx.h" |
| 40 | #include "cm2xxx_3xxx.h" |
Rajendra Nayak | 74bea6b | 2010-12-21 20:01:17 -0700 | [diff] [blame] | 41 | #include "cm-regbits-24xx.h" |
| 42 | #include "cm-regbits-34xx.h" |
| 43 | #include "cm-regbits-44xx.h" |
| 44 | #include "prm-regbits-24xx.h" |
| 45 | #include "prm-regbits-34xx.h" |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 46 | |
| 47 | /* |
Paul Walmsley | 55ed969 | 2010-01-26 20:12:59 -0700 | [diff] [blame] | 48 | * Clockdomain dependencies for wkdeps/sleepdeps |
| 49 | * |
| 50 | * XXX Hardware dependencies (e.g., dependencies that cannot be |
| 51 | * changed in software) are not included here yet, but should be. |
| 52 | */ |
| 53 | |
Paul Walmsley | 55ed969 | 2010-01-26 20:12:59 -0700 | [diff] [blame] | 54 | /* Wakeup dependency source arrays */ |
| 55 | |
Paul Walmsley | a5ffef6 | 2011-09-14 16:01:21 -0600 | [diff] [blame] | 56 | /* 2xxx-specific possible dependencies */ |
| 57 | |
| 58 | /* 2xxx PM_WKDEP_GFX: CORE, MPU, WKUP */ |
| 59 | struct clkdm_dep gfx_24xx_wkdeps[] = { |
| 60 | { .clkdm_name = "core_l3_clkdm" }, |
| 61 | { .clkdm_name = "core_l4_clkdm" }, |
| 62 | { .clkdm_name = "mpu_clkdm" }, |
| 63 | { .clkdm_name = "wkup_clkdm" }, |
Paul Walmsley | a260170 | 2010-01-26 20:12:59 -0700 | [diff] [blame] | 64 | { NULL }, |
| 65 | }; |
| 66 | |
Paul Walmsley | a5ffef6 | 2011-09-14 16:01:21 -0600 | [diff] [blame] | 67 | /* 2xxx PM_WKDEP_DSP: CORE, MPU, WKUP */ |
| 68 | struct clkdm_dep dsp_24xx_wkdeps[] = { |
| 69 | { .clkdm_name = "core_l3_clkdm" }, |
| 70 | { .clkdm_name = "core_l4_clkdm" }, |
| 71 | { .clkdm_name = "mpu_clkdm" }, |
| 72 | { .clkdm_name = "wkup_clkdm" }, |
Paul Walmsley | 55ed969 | 2010-01-26 20:12:59 -0700 | [diff] [blame] | 73 | { NULL }, |
| 74 | }; |
| 75 | |
Paul Walmsley | 55ed969 | 2010-01-26 20:12:59 -0700 | [diff] [blame] | 76 | |
| 77 | /* |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 78 | * OMAP2/3-common clockdomains |
Paul Walmsley | d37f1a1 | 2008-09-10 10:47:36 -0600 | [diff] [blame] | 79 | * |
| 80 | * Even though the 2420 has a single PRCM module from the |
| 81 | * interconnect's perspective, internally it does appear to have |
| 82 | * separate PRM and CM clockdomains. The usual test case is |
| 83 | * sys_clkout/sys_clkout2. |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 84 | */ |
| 85 | |
| 86 | /* This is an implicit clockdomain - it is never defined as such in TRM */ |
Paul Walmsley | a5ffef6 | 2011-09-14 16:01:21 -0600 | [diff] [blame] | 87 | struct clockdomain wkup_common_clkdm = { |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 88 | .name = "wkup_clkdm", |
Paul Walmsley | 5b74c67 | 2009-02-03 02:10:03 -0700 | [diff] [blame] | 89 | .pwrdm = { .name = "wkup_pwrdm" }, |
Paul Walmsley | 55ed969 | 2010-01-26 20:12:59 -0700 | [diff] [blame] | 90 | .dep_bit = OMAP_EN_WKUP_SHIFT, |
Paul Walmsley | 006c7f1 | 2012-07-04 05:22:53 -0600 | [diff] [blame] | 91 | .flags = CLKDM_ACTIVE_WITH_MPU, |
Paul Walmsley | 801954d | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 92 | }; |