/* Routine: reuse_atags Description: Reuse atags from previous bootloader. Reuse only only HW build, boot reason, boot mode and nolo  */
static void reuse_atags(void)
/* Routine: reuse_atags Description: Reuse atags from previous bootloader. Reuse only only HW build, boot reason, boot mode and nolo  */
static void reuse_atags(void)
{
	struct tag *t = (struct tag *)gd->bd->bi_boot_params;
	if (t->hdr.tag != ATAG_CORE)
		return;
	if (!boot_reason_ptr || !hw_build_ptr)
		return;
	while (t->hdr.tag != ATAG_NONE) {
		switch (t->hdr.tag) {
		case ATAG_REVISION:
			memset(hw_build_ptr, 0, 12);
			sprintf(hw_build_ptr, "%x", t->u.revision.rev);
			break;
		case ATAG_BOARD:
			reuse_omap_atags((struct tag_omap *)&t->u);
			break;
		default:
			break;
		}
		t = tag_next(t);
	}
}