Skip to content

Commit 46d2293

Browse files
Anton Vorontsovkumargala
authored andcommitted
powerpc/qe: QE also shuts down on MPC8568
It appears that QE shuts down on all MPC85xx CPUs (i.e. MPC8568 and MPC8569) and thus needs reset upon resume. So modify qe_alive_during_sleep() to account that. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
1 parent 0c7b87b commit 46d2293

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

  • arch/powerpc

‎arch/powerpc/include/asm/qe.h‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,28 @@ int qe_get_snum(void);
154154
void qe_put_snum(u8 snum);
155155
unsigned int qe_get_num_of_risc(void);
156156
unsigned int qe_get_num_of_snums(void);
157-
int qe_alive_during_sleep(void);
157+
158+
static inline int qe_alive_during_sleep(void)
159+
{
160+
/*
161+
* MPC8568E reference manual says:
162+
*
163+
* "...power down sequence waits for all I/O interfaces to become idle.
164+
* In some applications this may happen eventually without actively
165+
* shutting down interfaces, but most likely, software will have to
166+
* take steps to shut down the eTSEC, QUICC Engine Block, and PCI
167+
* interfaces before issuing the command (either the write to the core
168+
* MSR[WE] as described above or writing to POWMGTCSR) to put the
169+
* device into sleep state."
170+
*
171+
* MPC8569E reference manual has a similar paragraph.
172+
*/
173+
#ifdef CONFIG_PPC_85xx
174+
return 0;
175+
#else
176+
return 1;
177+
#endif
178+
}
158179

159180
/* we actually use cpm_muram implementation, define this for convenience */
160181
#define qe_muram_init cpm_muram_init

‎arch/powerpc/sysdev/qe_lib/qe.c‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,6 @@ static unsigned int qe_num_of_snum;
6565

6666
static phys_addr_t qebase = -1;
6767

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-
8168
phys_addr_t get_qe_base(void)
8269
{
8370
struct device_node *qe;

0 commit comments

Comments
 (0)