powerpc/qe: Make qe_reset() code path safe for repeated invocation
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Tue, 15 Sep 2009 21:43:52 +0000 (01:43 +0400)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 12 Nov 2009 03:43:13 +0000 (21:43 -0600)
commit0c7b87b0857f0e17be982fd840046444a83c3996
tree4a03a62678cd4725d5216dbf1fb550bed366908b
parentdc2e673dbcbaebdf84c09956b85c3be3a8b7bd02
powerpc/qe: Make qe_reset() code path safe for repeated invocation

For MPC8569 CPUs we'll need to reset QE after each suspend, so make
qe_reset() code path suitable for repeated invocation, that is:

- Don't initialize rheap structures if already initialized;
- Don't allocate muram for SDMA if already allocated, just reinitialize
  registers with previously allocated muram offset;
- Remove __init attributes from qe_reset() and cpm_muram_init();

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/include/asm/qe.h
arch/powerpc/sysdev/cpm_common.c
arch/powerpc/sysdev/qe_lib/qe.c