> -----Original Message----- > From: linux-omap-owner@xxxxxxxxxxxxxxx > [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of > Woodruff, Richard > Sent: 2009年6月19日 2:55 > To: Mike Chan; Kevin Hilman > Cc: linux-omap@xxxxxxxxxxxxxxx; Mike Chan > Subject: RE: [PATCH -pm 1/2] SDRC: check for stuck DLL state > machine and kick > > Mike, > > >From: Mike Chan [mailto:mike@xxxxxxxxxxx] > >Sent: Thursday, June 18, 2009 1:42 PM > > > > > >+ /* Kick DLL state machine if lock not started */ > >+kick_dll: > >+ ldr r4, sdrc_dlla_ctrl /* get dlla addr */ > >+ ldr r5, [r4] /* grab value */ > >+ mov r6, r5 /* save value */ > > > >Richard, could this be done in one instruction, eliminating > the need for the r5 >temporary register? Or was this done > intentionally? > > Its on purpose I suppose, perhaps there is an optimization. > > Above I want to make sure I restore the value I came in with > for dlla_ctrl. I save off value in r5 for this. > > Below I clear and set dllidle bit. I don't take the time to > figure out if it was set or not coming into function. I > saved off value in r5 to allow for this. It is legal for it > to be set or cleared in normal operation. > > The below set/clear needs to happen as 2 writes. The 3rd > write is a restore. You could be mindful of input value and > perhaps not do a 3rd write but my guess is that will take > more code then it saves. > > >+ orr r6, r6, #0x10 /* dllidle on */ > >+ str r6, [r4] > >+ dsb > >+ bic r6, #0x10 /* dllidle off */ > >+ str r6, [r4] > >+ dsb > >+ str r6, [r4] /* restore old value */ Richard, I think here it should be: str r5, [r4], not r6. I modifed this when I was verifying your patch. > >+ b wait_dll_lock_timed > >+ > > Regards, > Richard W. > -- > To unsubscribe from this list: send the line "unsubscribe > linux-omap" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html