[U-Boot] U-boot hangs on boot time

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

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.
participants (2)
-
Jean-Christophe PLAGNIOL-VILLARD
-
John Smith