diff options
| author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-08-27 03:35:50 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-08-31 00:51:33 -0400 |
| commit | ed24157ede901608e00f28b4897398a373e1e926 (patch) | |
| tree | 9c925bcaf5adb61084719c93ac579e82e6a169b2 /arch/powerpc/sysdev/qe_lib | |
| parent | e0ad2cd8ff7fb957be867d17d44fb4b7093c91bd (diff) | |
powerpc/qe: Implement qe_alive_during_sleep() helper function
In some CPUs (i.e. MPC8569) QE shuts down completely during sleep,
drivers may want to know that to reinitialize registers and buffer
descriptors.
This patch implements qe_alive_during_sleep() helper function, so far
it just checks if MPC8569-compatible power management controller is
present, which is a sign that QE turns off during sleep.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/powerpc/sysdev/qe_lib')
| -rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 237e3654f48c..464271bea6c9 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
| @@ -65,6 +65,19 @@ static unsigned int qe_num_of_snum; | |||
| 65 | 65 | ||
| 66 | static phys_addr_t qebase = -1; | 66 | static phys_addr_t qebase = -1; |
| 67 | 67 | ||
| 68 | int qe_alive_during_sleep(void) | ||
| 69 | { | ||
| 70 | static int ret = -1; | ||
| 71 | |||
| 72 | if (ret != -1) | ||
| 73 | return ret; | ||
| 74 | |||
| 75 | ret = !of_find_compatible_node(NULL, NULL, "fsl,mpc8569-pmc"); | ||
| 76 | |||
| 77 | return ret; | ||
| 78 | } | ||
| 79 | EXPORT_SYMBOL(qe_alive_during_sleep); | ||
| 80 | |||
| 68 | phys_addr_t get_qe_base(void) | 81 | phys_addr_t get_qe_base(void) |
| 69 | { | 82 | { |
| 70 | struct device_node *qe; | 83 | struct device_node *qe; |
