* [U-Boot] U-boot hangs on boot time
@ 2009-01-05 11:39 John Smith
2009-01-05 12:40 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 2+ messages in thread
From: John Smith @ 2009-01-05 11:39 UTC (permalink / raw)
To: u-boot
Hey all,
?
my u-boot-1.1.1 hangs while booting, as follow is the message got from the serial:
------------------------------------------------------
U-Boot 1.1.6 (Jan 5 2009 - 18:37:55)
DRAM:?? 8MB
Flash:???? 2MB
?
------------------------------------------------------
after some tests by tracing the sequences of the funtions, I found that the u-boot hangs while comming? to this funtion:
device_register (&dev),? which is a subfuntion? of drv_system_init ();
and I look into device_register(&dev):
int device_register (device_t * dev)
{
ListInsertItem (devlist, dev, LIST_END);
return 0;
}
as follow are two invoid funtions copy from the devices.c.
int ListInsertItem (list_t list, void *ptrToItem, int itemPosition)
{
return ListInsertItems (list, ptrToItem, itemPosition, 1);
}
int ListInsertItems (list_t list, void *ptrToItems, int firstItemPosition,
?????? int numItemsToInsert)
{
int numItems = (*list)->numItems;
if (firstItemPosition == numItems + 1)
? firstItemPosition = LIST_END;
else if (firstItemPosition > numItems)
? return 0;
if ((*list)->numItems >= (*list)->listSize) {
? if (!ExpandListSpace (list, -numItemsToInsert))
?? return 0;
}
if (firstItemPosition == LIST_START) {
? if (numItems == 0) {
?? /* special case for empty list */
?? firstItemPosition = LIST_END;
? } else {
?? firstItemPosition = 1;
? }
}
if (firstItemPosition == LIST_END) { /* add at the end of the list */
? if (ptrToItems)
?? memcpy (ITEMPTR (list, numItems), ptrToItems,
???? (*list)->itemSize * numItemsToInsert);
? else
?? memset (ITEMPTR (list, numItems), 0,
???? (*list)->itemSize * numItemsToInsert);
? (*list)->numItems += numItemsToInsert;
} else {???? /* move part of list up to make room for new item */
? memmove (ITEMPTR (list, firstItemPosition - 1 + numItemsToInsert),
??? ITEMPTR (list, firstItemPosition - 1),
??? (numItems + 1 - firstItemPosition) * (*list)->itemSize);
? if (ptrToItems)
?? memmove (ITEMPTR (list, firstItemPosition - 1), ptrToItems,
????? (*list)->itemSize * numItemsToInsert);
? else
?? memset (ITEMPTR (list, firstItemPosition - 1), 0,
???? (*list)->itemSize * numItemsToInsert);
? (*list)->numItems += numItemsToInsert;
}
return 1;
}
Most strange thing is sometimes it runs very well.
My board is S3C44B0...
?
Any help is appreciated.
?
John
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot] U-boot hangs on boot time
2009-01-05 11:39 [U-Boot] U-boot hangs on boot time John Smith
@ 2009-01-05 12:40 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-01-05 12:40 UTC (permalink / raw)
To: u-boot
On 03:39 Mon 05 Jan , John Smith wrote:
> Hey all,
> ?
> my u-boot-1.1.1 hangs while booting, as follow is the message got from the serial:
1.1.1 is really really old please update to the last release or the current
git
> ------------------------------------------------------
> U-Boot 1.1.6 (Jan 5 2009 - 18:37:55)
> DRAM:?? 8MB
> Flash:???? 2MB
> ?
> ------------------------------------------------------
> after some tests by tracing the sequences of the funtions, I found that the u-boot hangs while comming? to this funtion:
please also note that this code has been remove and rework
Best Regards;
J.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-05 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-05 11:39 [U-Boot] U-boot hangs on boot time John Smith
2009-01-05 12:40 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox