diff options
author | vojo <joris.van.vossen@sintecs.nl> | 2018-01-29 14:56:18 (GMT) |
---|---|---|
committer | vojo <joris.van.vossen@sintecs.nl> | 2018-01-29 14:56:18 (GMT) |
commit | 0c521ff1a651585741317b4b4dfe99fd242dace2 (patch) | |
tree | c7f872464f0c360a25c5ab925ca06acd102aaecc | |
parent | b07fac8eed8edd5866cb67d5a653599ca5c7b877 (diff) | |
download | u-boot-0c521ff1a651585741317b4b4dfe99fd242dace2.tar.xz |
BCD data reading implemented
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c | 1 | ||||
-rw-r--r-- | board/scalys/grapeboard/board_configuration_data.c | 92 | ||||
-rw-r--r-- | board/scalys/grapeboard/board_configuration_data.h | 2 | ||||
-rw-r--r-- | board/scalys/grapeboard/grapeboard.c | 30 | ||||
-rw-r--r-- | board/scalys/grapeboard/usb_grapeboard.c | 20 | ||||
-rw-r--r-- | configs/grapeboard_qspi_rescue_defconfig | 59 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 7 | ||||
-rw-r--r-- | include/configs/grapeboard.h | 117 |
8 files changed, 206 insertions, 122 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c index ff0903c..56f1174 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1012a_serdes.c @@ -18,6 +18,7 @@ static struct serdes_config serdes1_cfg_tbl[] = { {0x0008, {NONE, NONE, NONE, SATA1} }, {0x3508, {SGMII_FM1_DTSEC1, PCIE1, NONE, SATA1} }, {0x3305, {SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2, NONE, PCIE1} }, + {0x3308, {SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2, NONE, SATA1} }, {0x2205, {SGMII_2500_FM1_DTSEC1, SGMII_2500_FM1_DTSEC2, NONE, PCIE1} }, {0x2305, {SGMII_2500_FM1_DTSEC1, SGMII_FM1_DTSEC2, NONE, PCIE1} }, {0x9508, {TX_CLK, PCIE1, NONE, SATA1} }, diff --git a/board/scalys/grapeboard/board_configuration_data.c b/board/scalys/grapeboard/board_configuration_data.c index bd6a04e..4daff4f 100644 --- a/board/scalys/grapeboard/board_configuration_data.c +++ b/board/scalys/grapeboard/board_configuration_data.c @@ -58,8 +58,6 @@ int add_mac_addressess_to_env(const void* blob) memcpy(mac_address, value, 6); - /* ret = fdtdec_get_byte_array( blob, prop_offset, propname, mac_address, 6 ); */ - if (count) { snprintf(eth_string, sizeof(eth_string), "eth%iaddr", count); } @@ -88,63 +86,34 @@ int add_mac_addressess_to_env(const void* blob) const void* get_boardinfo_rescue_flash(void) { struct ccsr_gpio *pgpio = (void *)(CONFIG_SYS_GPIO2); - struct spi_flash *flash; - uint32_t bcd_data_lenght; + uint32_t bcd_data_length; uint8_t *bcd_data = NULL; uint32_t calculated_crc, received_crc; int dtb_length; int ret = 0; + struct udevice *rescue_flash_dev,*bus_dev; unsigned int bus = 0; unsigned int cs = 0; - unsigned int speed = 10000000; - unsigned int mode = SPI_MODE_0; - -#ifdef CONFIG_DM_SPI_FLASH - struct udevice *new, *bus_dev; - /* In DM mode defaults will be taken from DT */ - speed = 0, mode = 0; -#else - struct spi_flash *new; -#endif + unsigned int speed = 0; + unsigned int mode = 0; /* Change chip select to rescue QSPI NOR flash */ setbits_be32(&pgpio->gpdir, QSPI_MUX_N_MASK); setbits_be32(&pgpio->gpdat, QSPI_MUX_N_MASK); -#ifdef CONFIG_DM_SPI_FLASH - /* Remove the old device, otherwise probe will just be a nop */ - ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new); + ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &rescue_flash_dev); if (!ret) { - device_remove(new, DM_REMOVE_NORMAL); + device_remove(rescue_flash_dev, DM_REMOVE_NORMAL); } - flash = NULL; - ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new); - if (ret) { - printf("Failed to initialize SPI flash at %u:%u (error %d)\n", - bus, cs, ret); - return NULL; - } - - flash = dev_get_uclass_priv(new); -#else - if (flash) - spi_flash_free(flash); - - new = spi_flash_probe(bus, cs, speed, mode); - flash = new; - - if (!new) { - printf("Failed to initialize SPI flash at %u:%u\n", bus, cs); - return NULL; + ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &rescue_flash_dev); + if (ret != 0) { + printf("probe failed\n"); } - flash = new; -#endif - /* Read the last 4 bytes to determine the length of the DTB data */ - ret = spi_flash_read(flash, (BCD_FLASH_SIZE-4), 4, (uint8_t*) &bcd_data_lenght); + ret = spi_flash_read_dm(rescue_flash_dev, (BCD_FLASH_SIZE-4), 4, (uint8_t*) &bcd_data_length); if (ret != 0) { printf("Error reading bcd length\n"); errno = -ENODEV; @@ -152,54 +121,57 @@ const void* get_boardinfo_rescue_flash(void) } /* Convert length from big endianess to architecture endianess */ - bcd_data_lenght = ntohl(bcd_data_lenght); - printf("bcd_data_lenght = %i\n", bcd_data_lenght ); + bcd_data_length = ntohl(bcd_data_length); + printf("bcd_data_lenght = %i\n", bcd_data_length ); - if (bcd_data_lenght > BCD_FLASH_SIZE ) { + if (bcd_data_length > BCD_FLASH_SIZE ) { printf("BCD data length error %02x %02x %02x %02x\n", - ( (uint8_t*) &bcd_data_lenght)[0], - ( (uint8_t*) &bcd_data_lenght)[1], - ( (uint8_t*) &bcd_data_lenght)[2], - ( (uint8_t*) &bcd_data_lenght)[3] ); + ( (uint8_t*) &bcd_data_length)[0], + ( (uint8_t*) &bcd_data_length)[1], + ( (uint8_t*) &bcd_data_length)[2], + ( (uint8_t*) &bcd_data_length)[3] ); errno = -EMSGSIZE; goto err_no_free; } - + /* Allocate, and verify memory for the BCD data */ - bcd_data = (uint8_t*) malloc(bcd_data_lenght); + bcd_data = (uint8_t*) malloc(bcd_data_length); if (bcd_data == NULL) { printf("Error locating memory for BCD data\n"); goto err_no_free; } printf("Allocated memory for BCD data\n"); - + /* Read the DTB BCD data to memory */ - ret = spi_flash_read(flash, (BCD_FLASH_SIZE-bcd_data_lenght), bcd_data_lenght, (uint8_t*) &bcd_data); - printf("Read data from I2C bus\n"); + ret = spi_flash_read_dm(rescue_flash_dev, (BCD_FLASH_SIZE-bcd_data_length), bcd_data_length, (uint8_t*) bcd_data); + printf("Read data from QSPI bus\n"); if (ret != 0) { printf("Error reading complete BCD data from EEPROM\n"); errno = -ENOMEM; goto err_free; } - dtb_length = bcd_data_lenght - BCD_LENGTH_SIZE - BCD_HASH_SIZE; - + dtb_length = bcd_data_length - BCD_LENGTH_SIZE - BCD_HASH_SIZE; + /* Calculate CRC on read DTB data */ calculated_crc = crc32( 0, bcd_data, dtb_length); - + /* Received CRC is packed after the DTB data */ received_crc = *((uint32_t*) &bcd_data[dtb_length]); - + /* Convert CRC from big endianess to architecture endianess */ received_crc = ntohl(received_crc); - + if (calculated_crc != received_crc) { printf("Checksum error. expected %08x, got %08x\n", calculated_crc, received_crc); errno = -EBADMSG; goto err_free; } - + + /* Revert chip select muxing to standard QSPI flash */ + clrbits_be32(&pgpio->gpdat, QSPI_MUX_N_MASK); + /* Everything checked out, return the BCD data. * The caller is expected to free this data */ return bcd_data; @@ -209,7 +181,7 @@ err_free: free(bcd_data); err_no_free: - /* Revert chip select for standard QSPI flash */ + /* Revert chip select muxing to standard QSPI flash */ clrbits_be32(&pgpio->gpdat, QSPI_MUX_N_MASK); return NULL; diff --git a/board/scalys/grapeboard/board_configuration_data.h b/board/scalys/grapeboard/board_configuration_data.h index 5424bf0..f6e253c 100644 --- a/board/scalys/grapeboard/board_configuration_data.h +++ b/board/scalys/grapeboard/board_configuration_data.h @@ -3,7 +3,7 @@ #define BCD_LENGTH_SIZE 4 -#define BCD_FLASH_SIZE 0x800000 /* 8 MBytes */ +#define BCD_FLASH_SIZE 0x100000 /* 1 MBytes */ #define BCD_HASH_SIZE 4 diff --git a/board/scalys/grapeboard/grapeboard.c b/board/scalys/grapeboard/grapeboard.c index 78c5502..bd5e640 100644 --- a/board/scalys/grapeboard/grapeboard.c +++ b/board/scalys/grapeboard/grapeboard.c @@ -31,16 +31,14 @@ #include <../../../include/generated/autoconf.h> #include <usb.h> #include "gpio_grapeboard.h" +#include "board_configuration_data.h" DECLARE_GLOBAL_DATA_PTR; int checkboard(void) { struct ccsr_gpio *pgpio = (void *)(CONFIG_SYS_GPIO2); -#if 0 - const void* bcd_dtc_blob; - int ret; -#endif + int m2_config = 0; int serdes_cfg = get_serdes_protocol(); @@ -50,17 +48,6 @@ int checkboard(void) setbits_be32(&pgpio->gpdir, QSPI_MUX_N_MASK); clrbits_be32(&pgpio->gpdat, QSPI_MUX_N_MASK); -#if 0 /* todo: test */ - bcd_dtc_blob = get_boardinfo_rescue_flash(); - if (bcd_dtc_blob != NULL) { - /* Board Configuration Data is intact, ready for parsing */ - ret = add_mac_addressess_to_env(bcd_dtc_blob); - if (ret != 0) { - printf("Error adding BCD data to environment\n"); - } - } -#endif - /* Configure USB hub */ usb_hx3_hub_init(); @@ -92,6 +79,18 @@ int checkboard(void) int misc_init_r(void) { + const void* bcd_dtc_blob; + int ret; + + bcd_dtc_blob = get_boardinfo_rescue_flash(); + if (bcd_dtc_blob != NULL) { + /* Board Configuration Data is intact, ready for parsing */ + ret = add_mac_addressess_to_env(bcd_dtc_blob); + if (ret != 0) { + printf("Error adding BCD data to environment\n"); + } + } + return 0; } @@ -177,3 +176,4 @@ int ft_board_setup(void *blob, bd_t *bd) return 0; } + diff --git a/board/scalys/grapeboard/usb_grapeboard.c b/board/scalys/grapeboard/usb_grapeboard.c index 6a2ba36..f8fbd59 100644 --- a/board/scalys/grapeboard/usb_grapeboard.c +++ b/board/scalys/grapeboard/usb_grapeboard.c @@ -35,7 +35,7 @@ const uint8_t hx3_settings[5 + HX3_SETTINGS_SIZE] = { 0xf0, /* cdp enabled */ 0x78, /* overcurrent input is active high */ 0x00, /* reserved */ - 0x00, /* USB String descriptors enabled */ + 0x08, /* USB String descriptors enabled (0x08) / disabled (0x00) */ 0x00, 0x00, 0x12, 0x00, 0x2c, 0x66, 0x66, /* USB3.0 TX driver de-emphasis */ @@ -93,14 +93,6 @@ int usb_hx3_hub_init(void) { data += length; } - /* Suspend USB2.0 PHY */ - /*unsigned int val; - - val = in_be32(0x2f0c200); - setbits_be32(0x2f0c200, val & (64 << 24)); - mdelay(10);*/ - - puts("Done!\n"); return 0; } @@ -109,3 +101,13 @@ int usb_hx3_hub_reset(void) { /* USB hub cannot be reset in software without resetting the ls1012a */ return 1; } + +void usb_hub_reset_devices(int port) +{ + /* Todo: fix issue and remove this message and temporary code added in drivers/usb/host/xhci.c at line 777*/ + static bool warning_shown = false; + if (!warning_shown) + printf("Warning: Currently Grapeboard does not support USB 2.0 devices under U-boot until xhci hub configuration error is fixed!\n"); + warning_shown = true; + return; +} diff --git a/configs/grapeboard_qspi_rescue_defconfig b/configs/grapeboard_qspi_rescue_defconfig new file mode 100644 index 0000000..5649f3f --- /dev/null +++ b/configs/grapeboard_qspi_rescue_defconfig @@ -0,0 +1,59 @@ +CONFIG_ARM=y +CONFIG_TARGET_GRAPEBOARD=y +CONFIG_FSL_LS_PPA=y +CONFIG_QSPI_AHB_INIT=y +CONFIG_DEFAULT_DEVICE_TREE="grapeboard" +CONFIG_RESCUE_UBOOT_CONFIG=y +CONFICONFIG_SYS_LS_PPA_FW_ADDR=0x400a0000 +CONFIG_SYS_LS_PFE_FW_ADDR=0x400c0000 +CONFIG_PBL_BINARY_SRC="board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin" + +# CONFIG_SYS_MALLOC_F is not set +CONFIG_FIT_VERBOSE=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT" +CONFIG_QSPI_BOOT=y +CONFIG_BOOTDELAY=10 +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_HUSH_PARSER=y +CONFIG_CMD_GREPENV=y +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DM=y +# CONFIG_BLK is not set +CONFIG_DM_MMC=y +# CONFIG_DM_MMC_OPS is not set +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH=y +CONFIG_NETDEVICES=y +CONFIG_E1000=y +CONFIG_FSL_PFE=y +CONFIG_PHYLIB=y +CONFIG_PHY_TI=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_DM_PCI_COMPAT=y +CONFIG_PCIE_LAYERSCAPE=y +CONFIG_SYS_NS16550=y +CONFIG_DM_SPI=y +CONFIG_FSL_DSPI=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_STORAGE=y +CONFIG_DISTRO_DEFAULTS=y + diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index e64637b..67e29d9 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -773,6 +773,13 @@ static int xhci_submit_root(struct usb_device *udev, unsigned long pipe, tmpbuf[1] |= USB_PORT_STAT_SUPER_SPEED >> 8; break; } + +/* TODO: fix issue and remove the following code. Do not push upstream! */ +#if defined(CONFIG_TARGET_GRAPEBOARD) + if(!(tmpbuf[1] & (USB_PORT_STAT_SUPER_SPEED >> 8))) { + goto unknown; + } +#endif } if (reg & PORT_PE) tmpbuf[0] |= USB_PORT_STAT_ENABLE; diff --git a/include/configs/grapeboard.h b/include/configs/grapeboard.h index 509395f..3a252b6 100644 --- a/include/configs/grapeboard.h +++ b/include/configs/grapeboard.h @@ -22,6 +22,7 @@ #define CONFIG_BOARD_LATE_INIT #define CONFIG_DISPLAY_BOARDINFO_LATE +#define CONFIG_MISC_INIT_R /* Match the following u-boot offsets with the value in the PBI instructions! */ #define CONFIG_U_BOOT_PAD_TO 0x1000 @@ -71,17 +72,21 @@ #define CONFIG_FSL_QSPI #define QSPI0_AMBA_BASE 0x40000000 #define CONFIG_SPI_FLASH_SPANSION +#define CONFIG_SPI_FLASH_SST /* Standard flash */ #define FSL_QSPI_FLASH_SIZE SZ_64M #define FSL_QSPI_FLASH_NUM 1 /* QSPI Environment */ +#define CONFIG_ENV_SIZE 0x40000 /* 256KB */ + #if CONFIG_RESCUE_UBOOT_CONFIG +/* Rescue flash size is at minimum 1MBytes. + * I.e. PBL/U-boot/PPA/PFE/BCD must fit within 0x100000. */ #define CONFIG_ENV_IS_NOWHERE #else #define CONFIG_ENV_OVERWRITE #define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_SIZE 0x40000 /* 256KB */ #define CONFIG_ENV_OFFSET 0x200000 /* 2MB */ #define CONFIG_ENV_SECT_SIZE 0x40000 #endif @@ -140,27 +145,11 @@ #define EMAC2_PHY_ADDR 0x2 #endif -/* -* USB -*/ -/* EHCI Support - disbaled by default */ -/*#define CONFIG_HAS_FSL_DR_USB*/ - -#ifdef CONFIG_HAS_FSL_DR_USB -#define CONFIG_USB_EHCI_FSL -#define CONFIG_USB_ULPI -#define CONFIG_USB_ULPI_VIEWPORT -#define CONFIG_USB_EHCI_HCD -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif - /* USB XHCI */ -/* todo: fix hx3 hub configuration errors */ #define CONFIG_HAS_FSL_XHCI_USB #ifdef CONFIG_HAS_FSL_XHCI_USB #define CONFIG_USB_XHCI_FSL -/*#define CONFIG_USB_XHCI_PCI*/ #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif @@ -232,22 +221,7 @@ "eth1addr=02:00:00:ba:be:02\0" \ "tftp_path=.\0" \ "autoload=no\0" \ - -/* Default flash specific environment variables */ -#if CONFIG_RESCUE_UBOOT_CONFIG -#define CONFIG_EXTRA_ENV_SETTINGS \ - COMMON_UBOOT_CONFIG - /* todo: add recovery variables */ -#undef CONFIG_BOOTCOMMAND -#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) -/* recover from sd card */ -#define CONFIG_BOOTCOMMAND "test" -#endif - -#else /* if CONFIG_STANDARD_UBOOT_CONFIG */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - COMMON_UBOOT_CONFIG \ - "tftp_update_pbl_uboot_qspi_nor=" \ + "update_tftp_uboot_pbl_qspi_nor=" \ "dhcp;" \ "tftp $load_addr $tftp_path/u-boot-pbl.bin;" \ "if test $? = \"0\"; then " \ @@ -255,7 +229,7 @@ "sf erase 0 200000;" \ "sf write $load_addr 0 $filesize;" \ "fi\0" \ - "tftp_update_ppa_qspi_nor=" \ + "update_tftp_ppa_qspi_nor=" \ "dhcp;" \ "tftp $load_addr $tftp_path/ppa.itb;" \ "if test $? = \"0\"; then " \ @@ -263,7 +237,7 @@ "sf erase 240000 40000;" \ "sf write $load_addr 240000 $filesize;" \ "fi\0" \ - "tftp_update_pfe_qspi_nor=" \ + "update_tftp_pfe_qspi_nor=" \ "dhcp;" \ "tftp $load_addr $tftp_path/pfe_fw_sbl.itb;" \ "if test $? = \"0\"; then " \ @@ -271,6 +245,68 @@ "sf erase 280000 40000;" \ "sf write $load_addr 280000 $filesize;" \ "fi\0" \ + "update_usb_uboot_pbl_qspi_nor=" \ + "usb start;" \ + "fatload usb 0:1 $load_addr u-boot-pbl.bin;" \ + "if test $? = \"0\"; then " \ + "sf probe 0:0;" \ + "sf erase 0 200000;" \ + "sf write $load_addr 0 $filesize;" \ + "fi\0" \ + "update_usb_ppa_qspi_nor=" \ + "usb start;" \ + "fatload usb 0:1 $load_addr ppa.itb;" \ + "if test $? = \"0\"; then " \ + "sf probe 0:0;" \ + "sf erase 240000 40000;" \ + "sf write $load_addr 240000 $filesize;" \ + "fi\0" \ + "update_usb_pfe_qspi_nor=" \ + "usb start;" \ + "fatload usb 0:1 $load_addr pfe_fw_sbl.itb;" \ + "if test $? = \"0\"; then " \ + "sf probe 0:0;" \ + "sf erase 280000 40000;" \ + "sf write $load_addr 280000 $filesize;" \ + "fi\0" \ + "update_mmc_uboot_pbl_qspi_nor=" \ + "mmc rescan;" \ + "ext4load mmc 0:1 $load_addr /boot/u-boot-pbl.bin;" \ + "if test $? = \"0\"; then " \ + "sf probe 0:0;" \ + "sf erase 0 200000;" \ + "sf write $load_addr 0 $filesize;" \ + "fi\0" \ + "update_mmc_ppa_qspi_nor=" \ + "mmc rescan;" \ + "ext4load mmc 0:1 $load_addr /boot/ppa.itb;" \ + "if test $? = \"0\"; then " \ + "sf probe 0:0;" \ + "sf erase 240000 40000;" \ + "sf write $load_addr 240000 $filesize;" \ + "fi\0" \ + "update_mmc_pfe_qspi_nor=" \ + "mmc rescan;" \ + "ext4load mmc 0:1 $load_addr /boot/pfe_fw_sbl.itb;" \ + "if test $? = \"0\"; then " \ + "sf probe 0:0;" \ + "sf erase 280000 40000;" \ + "sf write $load_addr 280000 $filesize;" \ + "fi\0" \ + +/* Default flash specific environment variables */ +#if CONFIG_RESCUE_UBOOT_CONFIG +#define CONFIG_EXTRA_ENV_SETTINGS \ + COMMON_UBOOT_CONFIG +#undef CONFIG_BOOTCOMMAND +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) +/* recover from sd card */ +#define CONFIG_BOOTCOMMAND "run update_mmc_uboot_pbl_qspi_nor; run update_mmc_pfe_qspi_nor; run update_mmc_ppa_qspi_nor" +#endif + +#else /* if CONFIG_STANDARD_UBOOT_CONFIG */ +#define CONFIG_EXTRA_ENV_SETTINGS \ + COMMON_UBOOT_CONFIG \ "mmcboot=" \ "ext4load mmc 0:1 $fdt_addr_r /boot/grapeboard.dtb;" \ "ext4load mmc 0:1 $kernel_addr_r /boot/uImage;" \ @@ -278,6 +314,13 @@ "pfe stop;" \ "bootm $kernel_addr_r - $fdt_addr_r;" \ "fi\0" \ + "scsiboot=" \ + "ext4load scsi 0:1 $fdt_addr_r /boot/grapeboard.dtb;" \ + "ext4load scsi 0:1 $kernel_addr_r /boot/uImage;" \ + "if test $? = \"0\"; then " \ + "pfe stop;" \ + "bootm $kernel_addr_r - $fdt_addr_r;" \ + "fi\0" \ "netboot=" \ "dhcp;" \ "tftp $fdt_addr_r $tftp_path/grapeboard.dtb;" \ @@ -291,8 +334,8 @@ #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_BOOTCOMMAND "run mmcboot" #endif -#define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait" \ - "earlycon=uart8250,mmio,0x21c0500 quiet lpj=250000 noinitrd" +#define CONFIG_BOOTARGS "console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 quiet lpj=250000 noinitrd " \ + "root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait" #endif #include <asm/fsl_secure_boot.h> |