- better info at booting
git-svn-id: http://moon:8086/svn/mips@14 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -230,18 +230,17 @@ int main(int argc, char *argv[])
|
||||
uint32_t img_size, block_sel;
|
||||
|
||||
volatile uint32_t *pGPIO_DATA = (uint32_t*)SYS_GPIO_0_DATA;
|
||||
volatile uint32_t *pGPIO_DIR = (uint32_t*)SYS_GPIO_0_DIR;
|
||||
volatile uint8_t *pMem;
|
||||
volatile uint32_t *pFlashIO = (uint32_t*)FLASH_BASE_IO; // Flash in uncached area
|
||||
volatile uint32_t *pFlashMem = (uint32_t*)FLASH_BASE_MEM; // Flash in cached area
|
||||
volatile uint32_t *ram32 = (uint32_t*)SDRAM_BASE;
|
||||
uint32_t flash_offset;
|
||||
|
||||
*pGPIO_DIR = GPIO_0_DFLT_DIR;
|
||||
*pGPIO_DATA = GPIO_0_DFLT_DATA;
|
||||
haddr = 0;
|
||||
block_sel = 0x7F & (uint32_t)((*pGPIO_DATA & GPIO_0_DIP) >> GPIO_0_ALIGN_DIP);
|
||||
|
||||
sputs("\nMIPS bootloader\n");
|
||||
// ----------------------------------------------------------
|
||||
if (IS_ERROR(flash_find(&flash, SYS_FLASH_IO)))
|
||||
{
|
||||
@@ -257,7 +256,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!(((*pGPIO_DATA & GPIO_0_BTN) >> GPIO_0_ALIGN_BTN) & 8))
|
||||
{
|
||||
sputs("\n\n");
|
||||
sputs("Loading image from flash at ");print_word(flash_offset);sputs("\n");
|
||||
pImg_hdr = (flash_img_hdr_t*)pFlashIO;
|
||||
if ((pImg_hdr->magic != MAGIC_EL) && (pImg_hdr->magic != MAGIC_EB))
|
||||
{
|
||||
@@ -266,8 +265,6 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
sputs("Booting application from flash (");print_word(flash_offset);sputs(")...");
|
||||
|
||||
ram32 = (uint32_t*)pImg_hdr->target_base;
|
||||
img_size = pImg_hdr->img_size;
|
||||
|
||||
@@ -278,9 +275,7 @@ int main(int argc, char *argv[])
|
||||
for (i=0; i < img_size/4; i++)
|
||||
ram32[i] = pFlashMem[i];
|
||||
|
||||
sputs("done\n");
|
||||
|
||||
sputs("Execute at ");print_word(pImg_hdr->target_base); sputs("\n\n");
|
||||
sputs("Booting from ");print_word(pImg_hdr->target_base);sputs("\n\n");
|
||||
Exec_at((void*)ram32);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user