File tree Expand file tree Collapse file tree
platform/baytrail/include/platform Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ static void irq_handler(void *arg)
126126int ipc_pmc_send_msg (uint32_t message )
127127{
128128 uint32_t ipclpesch ;
129- uint32_t irq_mask ;
129+ int try = 0 ;
130130
131131 trace_ipc ("SMs" );
132132
@@ -138,22 +138,23 @@ int ipc_pmc_send_msg(uint32_t message)
138138 return - EAGAIN ;
139139 }
140140
141- /* disable all interrupts except for SCU */
142- irq_mask = arch_interrupt_disable_mask (~(1 << IRQ_NUM_EXT_PMC ));
143-
144141 /* send the new message */
145142 shim_write (SHIM_IPCLPESCL , 0 );
146143 shim_write (SHIM_IPCLPESCH , SHIM_IPCLPESCH_BUSY | message );
147144
148- /* now wait for clock change */
149- wait_for_interrupt (0 );
150-
151- /* enable other IRQs */
152- arch_interrupt_enable_mask (irq_mask );
153-
154145 /* check status */
155146 ipclpesch = shim_read (SHIM_IPCLPESCH );
156147
148+ while (ipclpesch & SHIM_IPCLPESCH_BUSY ) {
149+ /* now wait for clock change */
150+ idelay (PLATFORM_LPE_DELAY );
151+ ipclpesch = shim_read (SHIM_IPCLPESCH );
152+
153+ try ++ ;
154+ if (try > 10 )
155+ break ;
156+ }
157+
157158 /* did command succeed */
158159 if (ipclpesch & SHIM_IPCLPESCH_BUSY ) {
159160 trace_ipc_error ("ePf" );
Original file line number Diff line number Diff line change @@ -102,6 +102,9 @@ struct sof;
102102/* DSP default delay in cycles */
103103#define PLATFORM_DEFAULT_DELAY 12
104104
105+ /* DSP LPE delay in cycles */
106+ #define PLATFORM_LPE_DELAY 2000
107+
105108/* Platform defined panic code */
106109static inline void platform_panic (uint32_t p )
107110{
You can’t perform that action at this time.
0 commit comments