1
2
3
4
5
6
7
8
9
10
11
12#include <common.h>
13#include <command.h>
14
15#include <asm/blackfin.h>
16#include <asm/mach-common/bits/bootrom.h>
17
18int do_spibootldr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
19{
20 s32 addr;
21
22
23 if (argc < 2)
24 addr = 0;
25 else
26 addr = simple_strtoul(argv[1], NULL, 16);
27
28 printf("## Booting ldr image at SPI offset 0x%x ...\n", addr);
29
30 return bfrom_SpiBoot(addr, BFLAG_PERIPHERAL | 4, 0, NULL);
31}
32
33U_BOOT_CMD(spibootldr, 2, 0, do_spibootldr,
34 "boot ldr image from spi",
35 "[offset]\n"
36 " - boot ldr image stored at offset into spi\n");
37