Commit 4b6e1fda authored by Tom Rini's avatar Tom Rini
parents 27bec5c1 341392dd
...@@ -1066,7 +1066,7 @@ The following options need to be configured: ...@@ -1066,7 +1066,7 @@ The following options need to be configured:
CONFIG_CMD_RUN run command in env variable CONFIG_CMD_RUN run command in env variable
CONFIG_CMD_SANDBOX * sb command to access sandbox features CONFIG_CMD_SANDBOX * sb command to access sandbox features
CONFIG_CMD_SAVES * save S record dump CONFIG_CMD_SAVES * save S record dump
CONFIG_CMD_SCSI * SCSI Support CONFIG_SCSI * SCSI Support
CONFIG_CMD_SDRAM * print SDRAM configuration information CONFIG_CMD_SDRAM * print SDRAM configuration information
(requires CONFIG_CMD_I2C) (requires CONFIG_CMD_I2C)
CONFIG_CMD_SETGETDCR Support for DCR Register access CONFIG_CMD_SETGETDCR Support for DCR Register access
...@@ -1254,7 +1254,7 @@ The following options need to be configured: ...@@ -1254,7 +1254,7 @@ The following options need to be configured:
CONFIG_MTD_PARTITIONS Memory Technology Device partition table. CONFIG_MTD_PARTITIONS Memory Technology Device partition table.
If IDE or SCSI support is enabled (CONFIG_CMD_IDE or If IDE or SCSI support is enabled (CONFIG_CMD_IDE or
CONFIG_CMD_SCSI) you must configure support for at CONFIG_SCSI) you must configure support for at
least one non-MTD partition type as well. least one non-MTD partition type as well.
- IDE Reset method: - IDE Reset method:
......
...@@ -67,7 +67,7 @@ void dev_stor_init(void) ...@@ -67,7 +67,7 @@ void dev_stor_init(void)
specs[ENUM_SATA].type = DEV_TYP_STOR | DT_STOR_SATA; specs[ENUM_SATA].type = DEV_TYP_STOR | DT_STOR_SATA;
specs[ENUM_SATA].name = "sata"; specs[ENUM_SATA].name = "sata";
#endif #endif
#if defined(CONFIG_CMD_SCSI) #if defined(CONFIG_SCSI)
specs[ENUM_SCSI].max_dev = CONFIG_SYS_SCSI_MAX_DEVICE; specs[ENUM_SCSI].max_dev = CONFIG_SYS_SCSI_MAX_DEVICE;
specs[ENUM_SCSI].enum_started = 0; specs[ENUM_SCSI].enum_started = 0;
specs[ENUM_SCSI].enum_ended = 0; specs[ENUM_SCSI].enum_ended = 0;
......
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
}; };
soft-spi { soft-spi {
compatible = "u-boot,soft-spi"; compatible = "spi-gpio";
cs-gpio = <&gpy4 3 0>; cs-gpios = <&gpy4 3 0>;
sclk-gpio = <&gpy3 1 0>; gpio-sck = <&gpy3 1 0>;
mosi-gpio = <&gpy3 3 0>; gpio-mosi = <&gpy3 3 0>;
miso-gpio = <&gpy3 0 0>; gpio-miso = <&gpy3 0 0>;
spi-delay-us = <1>; spi-delay-us = <1>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -40,10 +40,6 @@ ...@@ -40,10 +40,6 @@
nvidia,panel = <&lcd_panel>; nvidia,panel = <&lcd_panel>;
}; };
}; };
dc@54240000 {
status = "disabled";
};
}; };
/* This is not used in U-Boot, but is expected to be in kernel .dts */ /* This is not used in U-Boot, but is expected to be in kernel .dts */
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
/* SATA */ /* SATA */
#define AHCI_BASE_ADDR (CONFIG_SYS_IMMR + 0x02200000) #define AHCI_BASE_ADDR (CONFIG_SYS_IMMR + 0x02200000)
#define CONFIG_BOARD_LATE_INIT #define CONFIG_BOARD_LATE_INIT
#define CONFIG_CMD_SCSI #define CONFIG_SCSI
#define CONFIG_LIBATA #define CONFIG_LIBATA
#define CONFIG_SCSI_AHCI #define CONFIG_SCSI_AHCI
#define CONFIG_SCSI_AHCI_PLAT #define CONFIG_SCSI_AHCI_PLAT
......
...@@ -372,14 +372,29 @@ _start: ...@@ -372,14 +372,29 @@ _start:
move.l %d0, (%a1) move.l %d0, (%a1)
move.l %d0, (%a2) move.l %d0, (%a2)
/* set stackpointer to end of internal ram to get some stackspace for /* put relocation table address to a5 */
the first c-code */ move.l #__got_start, %a5
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp
clr.l %sp@- /* setup stack initially on top of internal static ram */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
/*
* if configured, malloc_f arena will be reserved first,
* then (and always) gd struct space will be reserved
*/
move.l %sp, -(%sp)
bsr board_init_f_alloc_reserve
/* update stack and frame-pointers */
move.l %d0, %sp
move.l %sp, %fp
move.l #__got_start, %a5 /* put relocation table address to a5 */ /* initialize reserved area */
move.l %d0, -(%sp)
bsr board_init_f_init_reserve
bsr cpu_init_f /* run low-level CPU init code (from flash) */ bsr cpu_init_f /* run low-level CPU init code (from flash) */
clr.l %sp@-
bsr board_init_f /* run low-level board init code (from flash) */ bsr board_init_f /* run low-level board init code (from flash) */
/* board_init_f() does not return */ /* board_init_f() does not return */
......
...@@ -134,17 +134,34 @@ _start: ...@@ -134,17 +134,34 @@ _start:
move.l %d0, (%a1) move.l %d0, (%a1)
move.l %d0, (%a2) move.l %d0, (%a2)
/* set stackpointer to end of internal ram to get some stackspace for the /* put relocation table address to a5 */
first c-code */ move.l #__got_start, %a5
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp
clr.l %sp@-
move.l #__got_start, %a5 /* put relocation table address to a5 */ /* setup stack initially on top of internal static ram */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
/*
* if configured, malloc_f arena will be reserved first,
* then (and always) gd struct space will be reserved
*/
move.l %sp, -(%sp)
move.l #board_init_f_alloc_reserve, %a1
jsr (%a1)
/* update stack and frame-pointers */
move.l %d0, %sp
move.l %sp, %fp
/* initialize reserved area */
move.l %d0, -(%sp)
move.l #board_init_f_init_reserve, %a1
jsr (%a1)
/* run low-level CPU init code (from flash) */ /* run low-level CPU init code (from flash) */
move.l #cpu_init_f, %a1 move.l #cpu_init_f, %a1
jsr (%a1) jsr (%a1)
/* run low-level board init code (from flash) */ /* run low-level board init code (from flash) */
clr.l %sp@-
move.l #board_init_f, %a1 move.l #board_init_f, %a1
jsr (%a1) jsr (%a1)
......
...@@ -192,16 +192,34 @@ _after_flashbar_copy: ...@@ -192,16 +192,34 @@ _after_flashbar_copy:
move.l %d0, (%a1) move.l %d0, (%a1)
move.l %d0, (%a2) move.l %d0, (%a2)
/* set stackpointer to end of internal ram to get some stackspace for the first c-code */ /* put relocation table address to a5 */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp move.l #__got_start, %a5
clr.l %sp@-
move.l #__got_start, %a5 /* put relocation table address to a5 */ /* setup stack initially on top of internal static ram */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
/*
* if configured, malloc_f arena will be reserved first,
* then (and always) gd struct space will be reserved
*/
move.l %sp, -(%sp)
move.l #board_init_f_alloc_reserve, %a1
jsr (%a1)
/* update stack and frame-pointers */
move.l %d0, %sp
move.l %sp, %fp
/* initialize reserved area */
move.l %d0, -(%sp)
move.l #board_init_f_init_reserve, %a1
jsr (%a1)
/* run low-level CPU init code (from flash) */ /* run low-level CPU init code (from flash) */
move.l #cpu_init_f, %a1 move.l #cpu_init_f, %a1
jsr (%a1) jsr (%a1)
/* run low-level board init code (from flash) */ /* run low-level board init code (from flash) */
clr.l %sp@-
move.l #board_init_f, %a1 move.l #board_init_f, %a1
jsr (%a1) jsr (%a1)
......
...@@ -142,7 +142,7 @@ int cpu_init_r(void) ...@@ -142,7 +142,7 @@ int cpu_init_r(void)
return 0; return 0;
} }
void uart_port_conf(void) void uart_port_conf(int port)
{ {
} }
......
...@@ -126,21 +126,32 @@ _start: ...@@ -126,21 +126,32 @@ _start:
move.l %d0, (%a1) move.l %d0, (%a1)
move.l %d0, (%a2) move.l %d0, (%a2)
/* put relocation table address to a5 */
move.l #__got_start, %a5
/* setup stack initially on top of internal static ram */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
/* /*
* set stackpointer to internal sram end - 80 * if configured, malloc_f arena will be reserved first,
* (global data struct size + some bytes) * then (and always) gd struct space will be reserved
* get some stackspace for the first c-code,
*/ */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp move.l %sp, -(%sp)
clr.l %sp@- bsr board_init_f_alloc_reserve
/* put relocation table address to a5 */ /* update stack and frame-pointers */
move.l #__got_start, %a5 move.l %d0, %sp
move.l %sp, %fp
/* initialize reserved area */
move.l %d0, -(%sp)
bsr board_init_f_init_reserve
/* run low-level CPU init code (from flash) */ /* run low-level CPU init code (from flash) */
bsr cpu_init_f bsr cpu_init_f
/* run low-level board init code (from flash) */ /* run low-level board init code (from flash) */
clr.l %sp@-
bsr board_init_f bsr board_init_f
/* board_init_f() does not return */ /* board_init_f() does not return */
......
...@@ -148,17 +148,34 @@ _start: ...@@ -148,17 +148,34 @@ _start:
move.l %d0, (%a1) move.l %d0, (%a1)
move.l %d0, (%a2) move.l %d0, (%a2)
/* set stackpointer to end of internal ram to get some stackspace for the /* put relocation table address to a5 */
first c-code */ move.l #__got_start, %a5
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp
clr.l %sp@-
move.l #__got_start, %a5 /* put relocation table address to a5 */ /* setup stack initially on top of internal static ram */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
/*
* if configured, malloc_f arena will be reserved first,
* then (and always) gd struct space will be reserved
*/
move.l %sp, -(%sp)
move.l #board_init_f_alloc_reserve, %a1
jsr (%a1)
/* update stack and frame-pointers */
move.l %d0, %sp
move.l %sp, %fp
/* initialize reserved area */
move.l %d0, -(%sp)
move.l #board_init_f_init_reserve, %a1
jsr (%a1)
/* run low-level CPU init code (from flash) */ /* run low-level CPU init code (from flash) */
move.l #cpu_init_f, %a1 move.l #cpu_init_f, %a1
jsr (%a1) jsr (%a1)
/* run low-level board init code (from flash) */ /* run low-level board init code (from flash) */
clr.l %sp@-
move.l #board_init_f, %a1 move.l #board_init_f, %a1
jsr (%a1) jsr (%a1)
......
...@@ -657,17 +657,34 @@ _start: ...@@ -657,17 +657,34 @@ _start:
movec %d0, %RAMBAR1 movec %d0, %RAMBAR1
#endif #endif
/* set stackpointer to end of internal ram to get some stackspace for /* put relocation table address to a5 */
the first c-code */ move.l #__got_start, %a5
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp
clr.l %sp@- /* setup stack initially on top of internal static ram */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
move.l #__got_start, %a5 /* put relocation table address to a5 */ /*
* if configured, malloc_f arena will be reserved first,
* then (and always) gd struct space will be reserved
*/
move.l %sp, -(%sp)
move.l #board_init_f_alloc_reserve, %a1
jsr (%a1)
/* update stack and frame-pointers */
move.l %d0, %sp
move.l %sp, %fp
/* initialize reserved area */
move.l %d0, -(%sp)
move.l #board_init_f_init_reserve, %a1
jsr (%a1)
/* run low-level CPU init code (from flash) */ /* run low-level CPU init code (from flash) */
move.l #cpu_init_f, %a1 move.l #cpu_init_f, %a1
jsr (%a1) jsr (%a1)
/* run low-level board init code (from flash) */ /* run low-level board init code (from flash) */
clr.l %sp@-
move.l #board_init_f, %a1 move.l #board_init_f, %a1
jsr (%a1) jsr (%a1)
......
...@@ -141,14 +141,29 @@ _start: ...@@ -141,14 +141,29 @@ _start:
move.l %d0, (%a1) move.l %d0, (%a1)
move.l %d0, (%a2) move.l %d0, (%a2)
/* set stackpointer to end of internal ram to get some stackspace for the /* put relocation table address to a5 */
first c-code */ move.l #__got_start, %a5
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp
clr.l %sp@-
move.l #__got_start, %a5 /* put relocation table address to a5 */ /* setup stack initially on top of internal static ram */
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
/*
* if configured, malloc_f arena will be reserved first,
* then (and always) gd struct space will be reserved
*/
move.l %sp, -(%sp)
bsr board_init_f_alloc_reserve
/* update stack and frame-pointers */
move.l %d0, %sp
move.l %sp, %fp
/* initialize reserved area */
move.l %d0, -(%sp)
bsr board_init_f_init_reserve
jbsr cpu_init_f /* run low-level CPU init code (from flash) */ jbsr cpu_init_f /* run low-level CPU init code (from flash) */
clr.l %sp@-
jbsr board_init_f /* run low-level board init code (from flash) */ jbsr board_init_f /* run low-level board init code (from flash) */
/* board_init_f() does not return */ /* board_init_f() does not return */
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
#ifndef _ASM_CONFIG_H_ #ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
#define CONFIG_SYS_GENERIC_GLOBAL_DATA
#define CONFIG_NEEDS_MANUAL_RELOC #define CONFIG_NEEDS_MANUAL_RELOC
#define CONFIG_LMB #define CONFIG_LMB
......
...@@ -56,6 +56,21 @@ void outl(unsigned int value, unsigned int addr); ...@@ -56,6 +56,21 @@ void outl(unsigned int value, unsigned int addr);
void outw(unsigned int value, unsigned int addr); void outw(unsigned int value, unsigned int addr);
void outb(unsigned int value, unsigned int addr); void outb(unsigned int value, unsigned int addr);
static inline void _insw(volatile u16 *port, void *buf, int ns)
{
}
static inline void _outsw(volatile u16 *port, const void *buf, int ns)
{
}
#define insw(port, buf, ns) _insw((u16 *)port, buf, ns)
#define outsw(port, buf, ns) _outsw((u16 *)port, buf, ns)
/* For systemace.c */
#define out16(addr, val)
#define in16(addr) 0
#include <iotrace.h> #include <iotrace.h>
#include <asm/types.h> #include <asm/types.h>
......
...@@ -47,6 +47,9 @@ source "arch/x86/cpu/queensbay/Kconfig" ...@@ -47,6 +47,9 @@ source "arch/x86/cpu/queensbay/Kconfig"
# architecture-specific options below # architecture-specific options below
config AHCI
default y
config SYS_MALLOC_F_LEN config SYS_MALLOC_F_LEN
default 0x800 default 0x800
......
...@@ -261,7 +261,7 @@ static const struct udevice_id broadwell_ahci_ids[] = { ...@@ -261,7 +261,7 @@ static const struct udevice_id broadwell_ahci_ids[] = {
U_BOOT_DRIVER(ahci_broadwell_drv) = { U_BOOT_DRIVER(ahci_broadwell_drv) = {
.name = "ahci_broadwell", .name = "ahci_broadwell",
.id = UCLASS_DISK, .id = UCLASS_AHCI,
.of_match = broadwell_ahci_ids, .of_match = broadwell_ahci_ids,
.ofdata_to_platdata = broadwell_sata_ofdata_to_platdata, .ofdata_to_platdata = broadwell_sata_ofdata_to_platdata,
.probe = broadwell_sata_probe, .probe = broadwell_sata_probe,
......
...@@ -58,7 +58,7 @@ int cpu_common_init(void) ...@@ -58,7 +58,7 @@ int cpu_common_init(void)
return -ENODEV; return -ENODEV;
/* Cause the SATA device to do its early init */ /* Cause the SATA device to do its early init */
uclass_first_device(UCLASS_DISK, &dev); uclass_first_device(UCLASS_AHCI, &dev);
return 0; return 0;
} }
......
...@@ -162,7 +162,7 @@ static int bd82x6x_probe(struct udevice *dev) ...@@ -162,7 +162,7 @@ static int bd82x6x_probe(struct udevice *dev)
return 0; return 0;
/* Cause the SATA device to do its init */ /* Cause the SATA device to do its init */
uclass_first_device(UCLASS_DISK, &dev); uclass_first_device(UCLASS_AHCI, &dev);
ret = syscon_get_by_driver_data(X86_SYSCON_GMA, &gma_dev); ret = syscon_get_by_driver_data(X86_SYSCON_GMA, &gma_dev);
if (ret) if (ret)
......
...@@ -233,7 +233,7 @@ static const struct udevice_id bd82x6x_ahci_ids[] = { ...@@ -233,7 +233,7 @@ static const struct udevice_id bd82x6x_ahci_ids[] = {
U_BOOT_DRIVER(ahci_ivybridge_drv) = { U_BOOT_DRIVER(ahci_ivybridge_drv) = {
.name = "ahci_ivybridge", .name = "ahci_ivybridge",
.id = UCLASS_DISK, .id = UCLASS_AHCI,
.of_match = bd82x6x_ahci_ids, .of_match = bd82x6x_ahci_ids,
.probe = bd82x6x_sata_probe, .probe = bd82x6x_sata_probe,
}; };
...@@ -105,7 +105,7 @@ static int load_rescue_image(ulong addr) ...@@ -105,7 +105,7 @@ static int load_rescue_image(ulong addr)
/* Detect storage device */ /* Detect storage device */
for (devno = 0; devno < USB_MAX_STOR_DEV; devno++) { for (devno = 0; devno < USB_MAX_STOR_DEV; devno++) {
stor_dev = usb_stor_get_dev(devno); stor_dev = blk_get_devnum_by_type(IF_TYPE_USB, devno);
if (stor_dev->type != DEV_TYPE_UNKNOWN) if (stor_dev->type != DEV_TYPE_UNKNOWN)
break; break;
} }
......
...@@ -32,8 +32,8 @@ Changed files: ...@@ -32,8 +32,8 @@ Changed files:
- include/cmd_bsp.h added PIP405 commands definitions - include/cmd_bsp.h added PIP405 commands definitions
- include/cmd_condefs.h added Floppy and SCSI support - include/cmd_condefs.h added Floppy and SCSI support
- include/cmd_disk.h changed to work with block device description - include/cmd_disk.h changed to work with block device description
- include/config_LANTEC.h excluded CONFIG_CMD_FDC and CONFIG_CMD_SCSI - include/config_LANTEC.h excluded CONFIG_CMD_FDC and CONFIG_SCSI
- include/config_hymod.h excluded CONFIG_CMD_FDC and CONFIG_CMD_SCSI - include/config_hymod.h excluded CONFIG_CMD_FDC and CONFIG_SCSI
- include/flash.h added INTEL_ID_28F320C3T 0x88C488C4 - include/flash.h added INTEL_ID_28F320C3T 0x88C488C4
- include/i2c.h added "defined(CONFIG_PIP405)" - include/i2c.h added "defined(CONFIG_PIP405)"
- include/image.h added IH_OS_U_BOOT, IH_TYPE_FIRMWARE - include/image.h added IH_OS_U_BOOT, IH_TYPE_FIRMWARE
...@@ -86,7 +86,7 @@ section "Changes". ...@@ -86,7 +86,7 @@ section "Changes".
New Commands: New Commands:
------------- -------------
CONFIG_CMD_SCSI SCSI Support CONFIG_SCSI SCSI Support
CONFIG_CMF_FDC Floppy disk support CONFIG_CMF_FDC Floppy disk support
IDE additions: IDE additions:
......
...@@ -4,3 +4,10 @@ S: Maintained ...@@ -4,3 +4,10 @@ S: Maintained
F: board/sandbox/ F: board/sandbox/
F: include/configs/sandbox.h F: include/configs/sandbox.h
F: configs/sandbox_defconfig F: configs/sandbox_defconfig
SANDBOX_NOBLK BOARD
M: Simon Glass <sjg@chromium.org>
S: Maintained
F: board/sandbox/
F: include/configs/sandbox.h
F: configs/sandbox_noblk_defconfig
...@@ -112,7 +112,7 @@ obj-$(CONFIG_CMD_REMOTEPROC) += remoteproc.o ...@@ -112,7 +112,7 @@ obj-$(CONFIG_CMD_REMOTEPROC) += remoteproc.o
obj-$(CONFIG_SANDBOX) += host.o obj-$(CONFIG_SANDBOX) += host.o
obj-$(CONFIG_CMD_SATA) += sata.o obj-$(CONFIG_CMD_SATA) += sata.o
obj-$(CONFIG_CMD_SF) += sf.o obj-$(CONFIG_CMD_SF) += sf.o
obj-$(CONFIG_CMD_SCSI) += scsi.o obj-$(CONFIG_SCSI) += scsi.o
obj-$(CONFIG_CMD_SHA1SUM) += sha1sum.o obj-$(CONFIG_CMD_SHA1SUM) += sha1sum.o
obj-$(CONFIG_CMD_SETEXPR) += setexpr.o obj-$(CONFIG_CMD_SETEXPR) += setexpr.o
obj-$(CONFIG_CMD_SOFTSWITCH) += softswitch.o obj-$(CONFIG_CMD_SOFTSWITCH) += softswitch.o
...@@ -155,12 +155,6 @@ obj-$(CONFIG_CMD_PMIC) += pmic.o ...@@ -155,12 +155,6 @@ obj-$(CONFIG_CMD_PMIC) += pmic.o
obj-$(CONFIG_CMD_REGULATOR) += regulator.o obj-$(CONFIG_CMD_REGULATOR) += regulator.o
endif # !CONFIG_SPL_BUILD endif # !CONFIG_SPL_BUILD
ifdef CONFIG_SPL_BUILD
ifdef CONFIG_SPL_SATA_SUPPORT
obj-$(CONFIG_CMD_SCSI) += scsi.o
endif
endif # CONFIG_SPL_BUILD
obj-$(CONFIG_CMD_BLOB) += blob.o obj-$(CONFIG_CMD_BLOB) += blob.o
# core command # core command
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <command.h> #include <command.h>
#include <part.h> #include <part.h>
#if defined(CONFIG_CMD_IDE) || defined(CONFIG_CMD_SCSI) || \ #if defined(CONFIG_CMD_IDE) || defined(CONFIG_SCSI) || \
defined(CONFIG_USB_STORAGE) defined(CONFIG_USB_STORAGE)
int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
char *const argv[]) char *const argv[])
......
This diff is collapsed.
...@@ -314,12 +314,14 @@ static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag, ...@@ -314,12 +314,14 @@ static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
} }
/* Switch to the RPMB partition */ /* Switch to the RPMB partition */
original_part = mmc->block_dev.hwpart; original_part = mmc->block_dev.hwpart;
if (mmc_select_hwpart(curr_device, MMC_PART_RPMB) != 0) if (blk_select_hwpart_devnum(IF_TYPE_MMC, curr_device, MMC_PART_RPMB) !=
0)
return CMD_RET_FAILURE; return CMD_RET_FAILURE;
ret = cp->cmd(cmdtp, flag, argc, argv); ret = cp->cmd(cmdtp, flag, argc, argv);
/* Return to original partition */ /* Return to original partition */
if (mmc_select_hwpart(curr_device, original_part) != 0) if (blk_select_hwpart_devnum(IF_TYPE_MMC, curr_device, original_part) !=
0)
return CMD_RET_FAILURE; return CMD_RET_FAILURE;
return ret; return ret;
} }
...@@ -346,7 +348,7 @@ static int do_mmc_read(cmd_tbl_t *cmdtp, int flag, ...@@ -346,7 +348,7 @@ static int do_mmc_read(cmd_tbl_t *cmdtp, int flag,
printf("\nMMC read: dev # %d, block # %d, count %d ... ", printf("\nMMC read: dev # %d, block # %d, count %d ... ",
curr_device, blk, cnt); curr_device, blk, cnt);
n = blk_dread(&mmc->block_dev, blk, cnt, addr); n = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, addr);
/* flush cache after read */ /* flush cache after read */
flush_cache((ulong)addr, cnt * 512); /* FIXME */ flush_cache((ulong)addr, cnt * 512); /* FIXME */
printf("%d blocks read: %s\n", n, (n == cnt) ? "OK" : "ERROR"); printf("%d blocks read: %s\n", n, (n == cnt) ? "OK" : "ERROR");
...@@ -378,7 +380,7 @@ static int do_mmc_write(cmd_tbl_t *cmdtp, int flag, ...@@ -378,7 +380,7 @@ static int do_mmc_write(cmd_tbl_t *cmdtp, int flag,
printf("Error: card is write protected!\n"); printf("Error: card is write protected!\n");
return CMD_RET_FAILURE; return CMD_RET_FAILURE;
} }
n = blk_dwrite(&mmc->block_dev, blk, cnt, addr); n = blk_dwrite(mmc_get_blk_desc(mmc), blk, cnt, addr);
printf("%d blocks written: %s\n", n, (n == cnt) ? "OK" : "ERROR"); printf("%d blocks written: %s\n", n, (n == cnt) ? "OK" : "ERROR");