public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* Boot Loader
@ 2002-12-09  6:05 Erik Christiansen
  2002-12-09  7:43 ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Erik Christiansen @ 2002-12-09  6:05 UTC (permalink / raw)
  To: linuxppc-embedded


G'day,

   Having proved the gnu powerpc-linux toolchain by building and
running a simple program on our custom ppc850SAR board, the next step
seems to be a boot loader.

   Had a look at http://sourceforge.net/projects/u-boot , as recently
mentioned by Jerry Van Baren, but the site states "This Project Has Not
Released Any Files", and the cvs repository link states "Only project
developers can access the CVS tree via this method."

   So, instead, I've downloaded ppcboot-2.0.0., which seems to be the
maiden name of u-boot, anyway.

   Until the U-Boot surfaces, would this be a good way to go, when faced
with a custom board?

Regards,
Erik


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: Executable delay
@ 2003-12-22  9:58 James Bates
  2003-12-22 11:59 ` Boot Loader Kevin A. Sapp
  0 siblings, 1 reply; 8+ messages in thread
From: James Bates @ 2003-12-22  9:58 UTC (permalink / raw)
  To: linuxppc-embedded


Hi All,

I have had my first real poke around the kernel and it looks like I was
correct in saying that any task accessing the DOC drivers was put into an
incorrect state. The code that seemed to do the damage can be found in
drivers/mtd/devices/doc2000.c in the function _DoC_WaitReady().

The problem seems to be the call to cond_resched which is not in slightly
older kernel versions. To fix the bug I reverted this function back to the
code in version 2.4.10 of the kernel.

After making these changes it appears to work perfectly. My question now is.
Have I inadvertently broken something without knowing it.

Kind Regards,

James Bates

PS: My  _DoC_WaitReady is as follows:


/* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */
static int _DoC_WaitReady(struct DiskOnChip *doc)
{
	unsigned long docptr = doc->virtadr;
#ifndef CONFIG_MTD_DOCPROBE_SHORT_TIMEOUTS
	unsigned long timeo = jiffies + (HZ * 10);
#else
	unsigned long timeo = jiffies + 1;
#endif

	DEBUG(MTD_DEBUG_LEVEL3,
	      "_DoC_WaitReady called for out-of-line wait\n");

	/* Out-of-line routine to wait for chip response */
	while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) {
		if (time_after(jiffies, timeo)) {
			DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n");
			return -EIO;
		}
// This is the "new" code from version 2.4.23
//		udelay(1);
//		cond_resched();
// Revert back to old task state management in 2.4.10
		if (current->need_resched) {
			set_current_state(TASK_UNINTERRUPTIBLE);
			schedule_timeout(1);
		}
		else
			udelay(1);
// End of 2.4.10 code
	}

	return 0;
}


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <36E192B5.6C18381B@noaa.gov>]

end of thread, other threads:[~2003-12-22 13:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-09  6:05 Boot Loader Erik Christiansen
2002-12-09  7:43 ` Wolfgang Denk
2002-12-10  7:54   ` Erik Christiansen
  -- strict thread matches above, loose matches on Subject: below --
2003-12-22  9:58 Executable delay James Bates
2003-12-22 11:59 ` Boot Loader Kevin A. Sapp
2003-12-22 13:08   ` Wolfgang Denk
     [not found] <36E192B5.6C18381B@noaa.gov>
1999-03-07  1:04 ` boot loader Cort Dougan
1999-03-08 10:14   ` Gabriel Paubert
1999-03-08 19:33     ` Cort Dougan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox