Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
U
uboot-imx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Librem5
uboot-imx
Commits
88033d73
Commit
88033d73
authored
Mar 14, 2016
by
Tom Rini
Browse files
Options
Browse Files
Download
Plain Diff
Merge
git://git.denx.de/u-boot-dm
parents
9f0f432c
608e399f
Changes
121
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
121 changed files
with
1737 additions
and
1021 deletions
+1737
-1021
api/api.c
api/api.c
+1
-1
api/api_storage.c
api/api_storage.c
+14
-12
arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
+1
-1
arch/nios2/cpu/cpu.c
arch/nios2/cpu/cpu.c
+1
-3
arch/x86/cpu/interrupts.c
arch/x86/cpu/interrupts.c
+1
-1
arch/x86/cpu/ivybridge/cpu.c
arch/x86/cpu/ivybridge/cpu.c
+5
-9
arch/x86/cpu/ivybridge/gma.c
arch/x86/cpu/ivybridge/gma.c
+3
-3
arch/x86/cpu/ivybridge/sata.c
arch/x86/cpu/ivybridge/sata.c
+1
-3
arch/x86/cpu/ivybridge/sdram.c
arch/x86/cpu/ivybridge/sdram.c
+1
-3
arch/x86/lib/mpspec.c
arch/x86/lib/mpspec.c
+1
-1
board/cm5200/fwupdate.c
board/cm5200/fwupdate.c
+2
-2
board/mpl/pip405/README
board/mpl/pip405/README
+2
-2
board/sunxi/board.c
board/sunxi/board.c
+2
-2
cmd/bmp.c
cmd/bmp.c
+4
-8
cmd/cbfs.c
cmd/cbfs.c
+3
-2
cmd/cramfs.c
cmd/cramfs.c
+0
-5
cmd/disk.c
cmd/disk.c
+6
-6
cmd/fat.c
cmd/fat.c
+6
-6
cmd/gpt.c
cmd/gpt.c
+5
-5
cmd/host.c
cmd/host.c
+10
-3
cmd/ide.c
cmd/ide.c
+22
-22
cmd/mmc.c
cmd/mmc.c
+2
-2
cmd/mmc_spi.c
cmd/mmc_spi.c
+2
-2
cmd/part.c
cmd/part.c
+12
-12
cmd/read.c
cmd/read.c
+5
-5
cmd/reiser.c
cmd/reiser.c
+6
-6
cmd/sata.c
cmd/sata.c
+11
-11
cmd/scsi.c
cmd/scsi.c
+12
-12
cmd/tpm.c
cmd/tpm.c
+2
-2
cmd/unzip.c
cmd/unzip.c
+2
-2
cmd/usb.c
cmd/usb.c
+5
-7
cmd/usb_mass_storage.c
cmd/usb_mass_storage.c
+5
-5
cmd/zfs.c
cmd/zfs.c
+5
-5
common/env_fat.c
common/env_fat.c
+6
-6
common/fb_mmc.c
common/fb_mmc.c
+17
-16
common/spl/spl_ext.c
common/spl/spl_ext.c
+5
-7
common/spl/spl_fat.c
common/spl/spl_fat.c
+4
-4
common/spl/spl_mmc.c
common/spl/spl_mmc.c
+1
-1
common/spl/spl_sata.c
common/spl/spl_sata.c
+1
-1
common/spl/spl_usb.c
common/spl/spl_usb.c
+1
-1
common/usb_storage.c
common/usb_storage.c
+205
-71
disk/part.c
disk/part.c
+79
-151
disk/part_amiga.c
disk/part_amiga.c
+28
-19
disk/part_dos.c
disk/part_dos.c
+38
-28
disk/part_efi.c
disk/part_efi.c
+56
-45
disk/part_iso.c
disk/part_iso.c
+41
-31
disk/part_mac.c
disk/part_mac.c
+34
-24
drivers/block/Kconfig
drivers/block/Kconfig
+11
-0
drivers/block/Makefile
drivers/block/Makefile
+2
-0
drivers/block/blk-uclass.c
drivers/block/blk-uclass.c
+175
-0
drivers/block/dwc_ahsata.c
drivers/block/dwc_ahsata.c
+2
-2
drivers/block/pata_bfin.c
drivers/block/pata_bfin.c
+1
-1
drivers/block/sandbox.c
drivers/block/sandbox.c
+140
-26
drivers/block/systemace.c
drivers/block/systemace.c
+6
-6
drivers/core/simple-bus.c
drivers/core/simple-bus.c
+1
-0
drivers/core/uclass.c
drivers/core/uclass.c
+13
-0
drivers/dfu/dfu_mmc.c
drivers/dfu/dfu_mmc.c
+2
-2
drivers/gpio/rk_gpio.c
drivers/gpio/rk_gpio.c
+1
-3
drivers/misc/altera_sysid.c
drivers/misc/altera_sysid.c
+1
-3
drivers/mmc/arm_pl180_mmci.c
drivers/mmc/arm_pl180_mmci.c
+1
-1
drivers/mmc/mmc.c
drivers/mmc/mmc.c
+7
-7
drivers/mmc/mmc_private.h
drivers/mmc/mmc_private.h
+4
-4
drivers/mmc/mmc_write.c
drivers/mmc/mmc_write.c
+4
-4
drivers/mmc/mxsmmc.c
drivers/mmc/mxsmmc.c
+12
-12
drivers/mmc/omap_hsmmc.c
drivers/mmc/omap_hsmmc.c
+2
-2
drivers/mmc/sdhci.c
drivers/mmc/sdhci.c
+1
-1
drivers/pci/pci-uclass.c
drivers/pci/pci-uclass.c
+1
-3
drivers/pci/pci_auto_common.c
drivers/pci/pci_auto_common.c
+17
-34
drivers/power/regulator/regulator-uclass.c
drivers/power/regulator/regulator-uclass.c
+1
-1
drivers/serial/serial-uclass.c
drivers/serial/serial-uclass.c
+3
-2
drivers/serial/serial_arc.c
drivers/serial/serial_arc.c
+0
-3
drivers/serial/serial_lpuart.c
drivers/serial/serial_lpuart.c
+0
-6
drivers/serial/serial_mxc.c
drivers/serial/serial_mxc.c
+4
-4
drivers/serial/serial_pxa.c
drivers/serial/serial_pxa.c
+4
-4
drivers/serial/serial_s3c24x0.c
drivers/serial/serial_s3c24x0.c
+4
-4
drivers/serial/usbtty.c
drivers/serial/usbtty.c
+4
-3
drivers/timer/timer-uclass.c
drivers/timer/timer-uclass.c
+1
-3
drivers/video/vidconsole-uclass.c
drivers/video/vidconsole-uclass.c
+2
-4
fs/ext4/dev.c
fs/ext4/dev.c
+24
-30
fs/ext4/ext4_common.c
fs/ext4/ext4_common.c
+9
-18
fs/ext4/ext4fs.c
fs/ext4/ext4fs.c
+1
-1
fs/fat/fat.c
fs/fat/fat.c
+9
-9
fs/fat/fat_write.c
fs/fat/fat_write.c
+2
-3
fs/fs.c
fs/fs.c
+4
-4
fs/reiserfs/dev.c
fs/reiserfs/dev.c
+14
-19
fs/sandbox/sandboxfs.c
fs/sandbox/sandboxfs.c
+2
-2
fs/ubifs/ubifs.c
fs/ubifs/ubifs.c
+2
-2
fs/zfs/dev.c
fs/zfs/dev.c
+16
-19
fs/zfs/zfs.c
fs/zfs/zfs.c
+1
-1
include/blk.h
include/blk.h
+248
-0
include/common.h
include/common.h
+1
-1
include/configs/UCP1020.h
include/configs/UCP1020.h
+0
-1
include/configs/km/keymile-common.h
include/configs/km/keymile-common.h
+0
-1
include/configs/sandbox.h
include/configs/sandbox.h
+6
-1
include/debug_uart.h
include/debug_uart.h
+3
-1
include/dm/uclass-id.h
include/dm/uclass-id.h
+1
-0
include/dm/uclass.h
include/dm/uclass.h
+13
-2
include/ext4fs.h
include/ext4fs.h
+3
-3
include/fat.h
include/fat.h
+2
-2
include/ide.h
include/ide.h
+5
-13
include/mmc.h
include/mmc.h
+1
-1
include/part.h
include/part.h
+186
-122
include/reiserfs.h
include/reiserfs.h
+1
-1
include/sandboxblockdev.h
include/sandboxblockdev.h
+3
-1
include/sandboxfs.h
include/sandboxfs.h
+1
-1
include/sata.h
include/sata.h
+1
-1
include/spl.h
include/spl.h
+6
-4
include/systemace.h
include/systemace.h
+1
-1
include/ubifs_uboot.h
include/ubifs_uboot.h
+1
-1
include/usb.h
include/usb.h
+1
-1
include/usb_mass_storage.h
include/usb_mass_storage.h
+1
-1
include/zfs_common.h
include/zfs_common.h
+2
-2
lib/fdtdec.c
lib/fdtdec.c
+3
-2
lib/gunzip.c
lib/gunzip.c
+1
-1
lib/tpm.c
lib/tpm.c
+3
-3
test/dm/usb.c
test/dm/usb.c
+5
-3
tools/buildman/control.py
tools/buildman/control.py
+2
-1
tools/buildman/toolchain.py
tools/buildman/toolchain.py
+36
-14
tools/fdtgrep.c
tools/fdtgrep.c
+10
-4
tools/patman/patchstream.py
tools/patman/patchstream.py
+1
-1
tools/patman/patman.py
tools/patman/patman.py
+2
-1
No files found.
api/api.c
View file @
88033d73
...
...
@@ -189,7 +189,7 @@ static int API_get_timer(va_list ap)
*
* - net: ð_device struct address from list pointed to by eth_devices
*
* - storage:
block_dev_desc_t
struct address from &ide_dev_desc[n],
* - storage:
struct blk_desc
struct address from &ide_dev_desc[n],
* &scsi_dev_desc[n] and similar tables
*
****************************************************************************/
...
...
api/api_storage.c
View file @
88033d73
...
...
@@ -103,10 +103,10 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
int
i
;
block_dev_desc_t
*
dd
;
struct
blk_desc
*
dd
;
if
(
first
)
{
di
->
cookie
=
(
void
*
)
get_dev
(
specs
[
type
].
name
,
0
);
di
->
cookie
=
(
void
*
)
blk_
get_dev
(
specs
[
type
].
name
,
0
);
if
(
di
->
cookie
==
NULL
)
return
0
;
else
...
...
@@ -119,7 +119,8 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
}
else
{
for
(
i
=
0
;
i
<
specs
[
type
].
max_dev
;
i
++
)
if
(
di
->
cookie
==
(
void
*
)
get_dev
(
specs
[
type
].
name
,
i
))
{
if
(
di
->
cookie
==
(
void
*
)
blk_get_dev
(
specs
[
type
].
name
,
i
))
{
/* previous cookie found -- advance to the
* next device, if possible */
...
...
@@ -129,7 +130,8 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
break
;
}
di
->
cookie
=
(
void
*
)
get_dev
(
specs
[
type
].
name
,
i
);
di
->
cookie
=
(
void
*
)
blk_get_dev
(
specs
[
type
].
name
,
i
);
if
(
di
->
cookie
==
NULL
)
return
0
;
else
...
...
@@ -148,7 +150,7 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
di
->
type
=
specs
[
type
].
type
;
if
(
di
->
cookie
!=
NULL
)
{
dd
=
(
block_dev_desc_t
*
)
di
->
cookie
;
dd
=
(
struct
blk_desc
*
)
di
->
cookie
;
if
(
dd
->
type
==
DEV_TYPE_UNKNOWN
)
{
debugf
(
"device instance exists, but is not active.."
);
found
=
0
;
...
...
@@ -166,15 +168,15 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
/*
* returns: ENUM_IDE, ENUM_USB etc. based on
block_dev_desc_t
* returns: ENUM_IDE, ENUM_USB etc. based on
struct blk_desc
*/
static
int
dev_stor_type
(
block_dev_desc_t
*
dd
)
static
int
dev_stor_type
(
struct
blk_desc
*
dd
)
{
int
i
,
j
;
for
(
i
=
ENUM_IDE
;
i
<
ENUM_MAX
;
i
++
)
for
(
j
=
0
;
j
<
specs
[
i
].
max_dev
;
j
++
)
if
(
dd
==
get_dev
(
specs
[
i
].
name
,
j
))
if
(
dd
==
blk_
get_dev
(
specs
[
i
].
name
,
j
))
return
i
;
return
ENUM_MAX
;
...
...
@@ -308,12 +310,12 @@ int dev_enum_storage(struct device_info *di)
return
0
;
}
static
int
dev_stor_is_valid
(
int
type
,
block_dev_desc_t
*
dd
)
static
int
dev_stor_is_valid
(
int
type
,
struct
blk_desc
*
dd
)
{
int
i
;
for
(
i
=
0
;
i
<
specs
[
type
].
max_dev
;
i
++
)
if
(
dd
==
get_dev
(
specs
[
type
].
name
,
i
))
if
(
dd
==
blk_
get_dev
(
specs
[
type
].
name
,
i
))
if
(
dd
->
type
!=
DEV_TYPE_UNKNOWN
)
return
1
;
...
...
@@ -328,7 +330,7 @@ int dev_open_stor(void *cookie)
if
(
type
==
ENUM_MAX
)
return
API_ENODEV
;
if
(
dev_stor_is_valid
(
type
,
(
block_dev_desc_t
*
)
cookie
))
if
(
dev_stor_is_valid
(
type
,
(
struct
blk_desc
*
)
cookie
))
return
0
;
return
API_ENODEV
;
...
...
@@ -348,7 +350,7 @@ int dev_close_stor(void *cookie)
lbasize_t
dev_read_stor
(
void
*
cookie
,
void
*
buf
,
lbasize_t
len
,
lbastart_t
start
)
{
int
type
;
block_dev_desc_t
*
dd
=
(
block_dev_desc_t
*
)
cookie
;
struct
blk_desc
*
dd
=
(
struct
blk_desc
*
)
cookie
;
if
((
type
=
dev_stor_type
(
dd
))
==
ENUM_MAX
)
return
0
;
...
...
arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
View file @
88033d73
...
...
@@ -756,7 +756,7 @@ static int veyron_init(struct dram_info *priv)
struct
udevice
*
pmic
;
int
ret
;
ret
=
uclass_first_device
(
UCLASS_PMIC
,
&
pmic
);
ret
=
uclass_first_device
_err
(
UCLASS_PMIC
,
&
pmic
);
if
(
ret
)
return
ret
;
...
...
arch/nios2/cpu/cpu.c
View file @
88033d73
...
...
@@ -63,11 +63,9 @@ int arch_cpu_init_dm(void)
struct
udevice
*
dev
;
int
ret
;
ret
=
uclass_first_device
(
UCLASS_CPU
,
&
dev
);
ret
=
uclass_first_device
_err
(
UCLASS_CPU
,
&
dev
);
if
(
ret
)
return
ret
;
if
(
!
dev
)
return
-
ENODEV
;
gd
->
ram_size
=
CONFIG_SYS_SDRAM_SIZE
;
#ifndef CONFIG_ROM_STUBS
...
...
arch/x86/cpu/interrupts.c
View file @
88033d73
...
...
@@ -249,7 +249,7 @@ int interrupt_init(void)
int
ret
;
/* Try to set up the interrupt router, but don't require one */
ret
=
uclass_first_device
(
UCLASS_IRQ
,
&
dev
);
ret
=
uclass_first_device
_err
(
UCLASS_IRQ
,
&
dev
);
if
(
ret
&&
ret
!=
-
ENODEV
)
return
ret
;
...
...
arch/x86/cpu/ivybridge/cpu.c
View file @
88033d73
...
...
@@ -104,9 +104,9 @@ int arch_cpu_init_dm(void)
/* TODO(sjg@chromium.org): Get rid of gd->hose */
gd
->
hose
=
hose
;
ret
=
uclass_first_device
(
UCLASS_LPC
,
&
dev
);
if
(
!
dev
)
return
-
ENODEV
;
ret
=
uclass_first_device
_err
(
UCLASS_LPC
,
&
dev
);
if
(
ret
)
return
ret
;
/*
* We should do as little as possible before the serial console is
...
...
@@ -210,11 +210,9 @@ int print_cpuinfo(void)
/* Early chipset init required before RAM init can work */
uclass_first_device
(
UCLASS_NORTHBRIDGE
,
&
dev
);
ret
=
uclass_first_device
(
UCLASS_LPC
,
&
lpc
);
ret
=
uclass_first_device
_err
(
UCLASS_LPC
,
&
lpc
);
if
(
ret
)
return
ret
;
if
(
!
dev
)
return
-
ENODEV
;
/* Cause the SATA device to do its early init */
uclass_first_device
(
UCLASS_DISK
,
&
dev
);
...
...
@@ -236,11 +234,9 @@ int print_cpuinfo(void)
post_code
(
POST_EARLY_INIT
);
/* Enable SPD ROMs and DDR-III DRAM */
ret
=
uclass_first_device
(
UCLASS_I2C
,
&
dev
);
ret
=
uclass_first_device
_err
(
UCLASS_I2C
,
&
dev
);
if
(
ret
)
return
ret
;
if
(
!
dev
)
return
-
ENODEV
;
/* Prepare USB controller early in S3 resume */
if
(
boot_mode
==
PEI_BOOT_RESUME
)
...
...
arch/x86/cpu/ivybridge/gma.c
View file @
88033d73
...
...
@@ -812,9 +812,9 @@ int gma_func0_init(struct udevice *dev)
writew
(
0x0010
,
RCB_REG
(
DISPBDF
));
setbits_le32
(
RCB_REG
(
FD2
),
PCH_ENABLE_DBDF
);
ret
=
uclass_first_device
(
UCLASS_NORTHBRIDGE
,
&
nbridge
);
if
(
!
nbridge
)
return
-
ENODEV
;
ret
=
uclass_first_device
_err
(
UCLASS_NORTHBRIDGE
,
&
nbridge
);
if
(
ret
)
return
ret
;
rev
=
bridge_silicon_revision
(
nbridge
);
sandybridge_setup_graphics
(
nbridge
,
dev
);
...
...
arch/x86/cpu/ivybridge/sata.c
View file @
88033d73
...
...
@@ -229,11 +229,9 @@ static int bd82x6x_sata_probe(struct udevice *dev)
struct
udevice
*
pch
;
int
ret
;
ret
=
uclass_first_device
(
UCLASS_PCH
,
&
pch
);
ret
=
uclass_first_device
_err
(
UCLASS_PCH
,
&
pch
);
if
(
ret
)
return
ret
;
if
(
!
pch
)
return
-
ENODEV
;
if
(
!
(
gd
->
flags
&
GD_FLG_RELOC
))
bd82x6x_sata_enable
(
dev
);
...
...
arch/x86/cpu/ivybridge/sdram.c
View file @
88033d73
...
...
@@ -736,11 +736,9 @@ int dram_init(void)
struct
udevice
*
dev
,
*
me_dev
;
int
ret
;
ret
=
uclass_first_device
(
UCLASS_NORTHBRIDGE
,
&
dev
);
ret
=
uclass_first_device
_err
(
UCLASS_NORTHBRIDGE
,
&
dev
);
if
(
ret
)
return
ret
;
if
(
!
dev
)
return
-
ENODEV
;
ret
=
syscon_get_by_driver_data
(
X86_SYSCON_ME
,
&
me_dev
);
if
(
ret
)
return
ret
;
...
...
arch/x86/lib/mpspec.c
View file @
88033d73
...
...
@@ -297,7 +297,7 @@ static int mptable_add_intsrc(struct mp_config_table *mc,
const
u32
*
cell
;
int
i
,
ret
;
ret
=
uclass_first_device
(
UCLASS_IRQ
,
&
dev
);
ret
=
uclass_first_device
_err
(
UCLASS_IRQ
,
&
dev
);
if
(
ret
&&
ret
!=
-
ENODEV
)
{
debug
(
"%s: Cannot find irq router node
\n
"
,
__func__
);
return
ret
;
...
...
board/cm5200/fwupdate.c
View file @
88033d73
...
...
@@ -81,7 +81,7 @@ static int load_rescue_image(ulong addr)
char
dev
[
7
];
char
addr_str
[
16
];
char
*
const
argv
[
6
]
=
{
"fatload"
,
"usb"
,
dev
,
addr_str
,
nxri
,
NULL
};
block_dev_desc_t
*
stor_dev
=
NULL
;
struct
blk_desc
*
stor_dev
=
NULL
;
cmd_tbl_t
*
bcmd
;
/* Get name of firmware directory */
...
...
@@ -117,7 +117,7 @@ static int load_rescue_image(ulong addr)
/* Detect partition */
for
(
partno
=
-
1
,
i
=
0
;
i
<
6
;
i
++
)
{
if
(
get_partition
_info
(
stor_dev
,
i
,
&
info
)
==
0
)
{
if
(
part_get
_info
(
stor_dev
,
i
,
&
info
)
==
0
)
{
if
(
fat_register_device
(
stor_dev
,
i
)
==
0
)
{
/* Check if rescue image is present */
FW_DEBUG
(
"Looking for firmware directory '%s'"
...
...
board/mpl/pip405/README
View file @
88033d73
...
...
@@ -217,8 +217,8 @@ Added files:
Block device changes:
---------------------
To allow the use of dos_part.c, mac_part.c and iso_part.c, the parameter
bl
ock_dev
_desc will be used when accessing the functions in these files. The block
device descriptor (bl
ock_dev
_desc) contains a pointer to the read routine of the
bl
k
_desc will be used when accessing the functions in these files. The block
device descriptor (bl
k
_desc) contains a pointer to the read routine of the
device, which will be used to read blocks from the device.
Renamed function ide_print to dev_print and moved it to the file disk/part.c to use
it for IDE ATAPI and SCSI devices.
...
...
board/sunxi/board.c
View file @
88033d73
...
...
@@ -337,8 +337,8 @@ int board_mmc_init(bd_t *bis)
if
(
!
sunxi_mmc_has_egon_boot_signature
(
mmc0
)
&&
sunxi_mmc_has_egon_boot_signature
(
mmc1
))
{
/* Booting from emmc / mmc2, swap */
mmc0
->
block_dev
.
dev
=
1
;
mmc1
->
block_dev
.
dev
=
0
;
mmc0
->
block_dev
.
dev
num
=
1
;
mmc1
->
block_dev
.
dev
num
=
0
;
}
#endif
...
...
cmd/bmp.c
View file @
88033d73
...
...
@@ -246,18 +246,14 @@ int bmp_display(ulong addr, int x, int y)
addr
=
map_to_sysmem
(
bmp
);
#ifdef CONFIG_DM_VIDEO
ret
=
uclass_first_device
(
UCLASS_VIDEO
,
&
dev
);
ret
=
uclass_first_device
_err
(
UCLASS_VIDEO
,
&
dev
);
if
(
!
ret
)
{
if
(
!
dev
)
ret
=
-
ENODEV
;
if
(
!
ret
)
{
bool
align
=
false
;
bool
align
=
false
;
# ifdef CONFIG_SPLASH_SCREEN_ALIGN
align
=
true
;
align
=
true
;
# endif
/* CONFIG_SPLASH_SCREEN_ALIGN */
ret
=
video_bmp_display
(
dev
,
addr
,
x
,
y
,
align
);
}
ret
=
video_bmp_display
(
dev
,
addr
,
x
,
y
,
align
);
}
#elif defined(CONFIG_LCD)
ret
=
lcd_display_bitmap
(
addr
,
x
,
y
);
...
...
cmd/cbfs.c
View file @
88033d73
...
...
@@ -103,7 +103,7 @@ int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
printf
(
" size type name
\n
"
);
printf
(
"------------------------------------------
\n
"
);
while
(
file
)
{
u32
type
=
file_cbfs_type
(
file
);
int
type
=
file_cbfs_type
(
file
);
char
*
type_name
=
NULL
;
const
char
*
filename
=
file_cbfs_name
(
file
);
...
...
@@ -140,7 +140,8 @@ int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
case
CBFS_COMPONENT_CMOS_LAYOUT
:
type_name
=
"cmos layout"
;
break
;
case
-
1UL
:
case
-
1
:
case
0
:
type_name
=
"null"
;
break
;
}
...
...
cmd/cramfs.c
View file @
88033d73
...
...
@@ -29,7 +29,6 @@
# define DEBUGF(fmt, args...)
#endif
#ifdef CONFIG_CRAMFS_CMDLINE
#include <flash.h>
#ifdef CONFIG_SYS_NO_FLASH
...
...
@@ -201,7 +200,3 @@ U_BOOT_CMD(
"[ directory ]
\n
"
" - list files in a directory.
\n
"
);
#endif
/* #ifdef CONFIG_CRAMFS_CMDLINE */
/***************************************************/
cmd/disk.c
View file @
88033d73
...
...
@@ -20,7 +20,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
image_header_t
*
hdr
;
#endif
block_dev_desc_t
*
dev_desc
;
struct
blk_desc
*
dev_desc
;
#if CONFIG_IS_ENABLED(FIT)
const
void
*
fit_hdr
=
NULL
;
...
...
@@ -38,14 +38,14 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
bootstage_mark
(
BOOTSTAGE_ID_IDE_BOOT_DEVICE
);
part
=
get_device_and_partition
(
intf
,
(
argc
==
3
)
?
argv
[
2
]
:
NULL
,
part
=
blk_get_device_part_str
(
intf
,
(
argc
==
3
)
?
argv
[
2
]
:
NULL
,
&
dev_desc
,
&
info
,
1
);
if
(
part
<
0
)
{
bootstage_error
(
BOOTSTAGE_ID_IDE_TYPE
);
return
1
;
}
dev
=
dev_desc
->
dev
;
dev
=
dev_desc
->
dev
num
;
bootstage_mark
(
BOOTSTAGE_ID_IDE_TYPE
);
printf
(
"
\n
Loading from %s device %d, partition %d: "
...
...
@@ -56,7 +56,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
", Block Size: %ld
\n
"
,
info
.
start
,
info
.
size
,
info
.
blksz
);
if
(
dev_desc
->
block_
read
(
dev_desc
,
info
.
start
,
1
,
(
ulong
*
)
addr
)
!=
1
)
{
if
(
blk_d
read
(
dev_desc
,
info
.
start
,
1
,
(
ulong
*
)
addr
)
!=
1
)
{
printf
(
"** Read error on %d:%d
\n
"
,
dev
,
part
);
bootstage_error
(
BOOTSTAGE_ID_IDE_PART_READ
);
return
1
;
...
...
@@ -100,8 +100,8 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
cnt
/=
info
.
blksz
;
cnt
-=
1
;
if
(
dev_desc
->
block_
read
(
dev_desc
,
info
.
start
+
1
,
cnt
,
(
ulong
*
)(
addr
+
info
.
blksz
))
!=
cnt
)
{
if
(
blk_d
read
(
dev_desc
,
info
.
start
+
1
,
cnt
,
(
ulong
*
)(
addr
+
info
.
blksz
))
!=
cnt
)
{
printf
(
"** Read error on %d:%d
\n
"
,
dev
,
part
);
bootstage_error
(
BOOTSTAGE_ID_IDE_READ
);
return
1
;
...
...
cmd/fat.c
View file @
88033d73
...
...
@@ -69,7 +69,7 @@ static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
char
*
const
argv
[])
{
int
dev
,
part
;
block_dev_desc_t
*
dev_desc
;
struct
blk_desc
*
dev_desc
;
disk_partition_t
info
;
if
(
argc
<
2
)
{
...
...
@@ -77,11 +77,11 @@ static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
return
0
;
}
part
=
get_device_and_partition
(
argv
[
1
],
argv
[
2
],
&
dev_desc
,
&
info
,
1
);
part
=
blk_get_device_part_str
(
argv
[
1
],
argv
[
2
],
&
dev_desc
,
&
info
,
1
);
if
(
part
<
0
)
return
1
;
dev
=
dev_desc
->
dev
;
dev
=
dev_desc
->
dev
num
;
if
(
fat_set_blk_dev
(
dev_desc
,
&
info
)
!=
0
)
{
printf
(
"
\n
** Unable to use %s %d:%d for fatinfo **
\n
"
,
argv
[
1
],
dev
,
part
);
...
...
@@ -105,7 +105,7 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag,
int
ret
;
unsigned
long
addr
;
unsigned
long
count
;
block_dev_desc_t
*
dev_desc
=
NULL
;
struct
blk_desc
*
dev_desc
=
NULL
;
disk_partition_t
info
;
int
dev
=
0
;
int
part
=
1
;
...
...
@@ -114,11 +114,11 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag,
if
(
argc
<
5
)
return
cmd_usage
(
cmdtp
);
part
=
get_device_and_partition
(
argv
[
1
],
argv
[
2
],
&
dev_desc
,
&
info
,
1
);
part
=
blk_get_device_part_str
(
argv
[
1
],
argv
[
2
],
&
dev_desc
,
&
info
,
1
);
if
(
part
<
0
)
return
1
;
dev
=
dev_desc
->
dev
;
dev
=
dev_desc
->
dev
num
;
if
(
fat_set_blk_dev
(
dev_desc
,
&
info
)
!=
0
)
{
printf
(
"
\n
** Unable to use %s %d:%d for fatwrite **
\n
"
,
...
...
cmd/gpt.c
View file @
88033d73
...
...
@@ -168,7 +168,7 @@ static bool found_key(const char *str, const char *key)
* @return - zero on success, otherwise error
*
*/
static
int
set_gpt_info
(
block_dev_desc_t
*
dev_desc
,
static
int
set_gpt_info
(
struct
blk_desc
*
dev_desc
,
const
char
*
str_part
,
char
**
str_disk_guid
,
disk_partition_t
**
partitions
,
...
...
@@ -328,7 +328,7 @@ err:
return
errno
;
}
static
int
gpt_default
(
block_dev_desc_t
*
blk_dev_desc
,
const
char
*
str_part
)
static
int
gpt_default
(
struct
blk_desc
*
blk_dev_desc
,
const
char
*
str_part
)
{
int
ret
;
char
*
str_disk_guid
;
...
...
@@ -356,7 +356,7 @@ static int gpt_default(block_dev_desc_t *blk_dev_desc, const char *str_part)
return
ret
;
}
static
int
gpt_verify
(
block_dev_desc_t
*
blk_dev_desc
,
const
char
*
str_part
)
static
int
gpt_verify
(
struct
blk_desc
*
blk_dev_desc
,
const
char
*
str_part
)
{
ALLOC_CACHE_ALIGN_BUFFER_PAD
(
gpt_header
,
gpt_head
,
1
,
blk_dev_desc
->
blksz
);
...
...
@@ -408,7 +408,7 @@ static int do_gpt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int
ret
=
CMD_RET_SUCCESS
;
int
dev
=
0
;
char
*
ep
;
block_dev_desc_t
*
blk_dev_desc
=
NULL
;
struct
blk_desc
*
blk_dev_desc
=
NULL
;
if
(
argc
<
4
||
argc
>
5
)
return
CMD_RET_USAGE
;
...
...
@@ -418,7 +418,7 @@ static int do_gpt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
printf
(
"'%s' is not a number
\n
"
,
argv
[
3
]);
return
CMD_RET_USAGE
;
}
blk_dev_desc
=
get_dev
(
argv
[
2
],
dev
);
blk_dev_desc
=
blk_
get_dev
(
argv
[
2
],
dev
);
if
(
!
blk_dev_desc
)
{
printf
(
"%s: %s dev %d NOT available
\n
"
,
__func__
,
argv
[
2
],
dev
);
...
...
cmd/host.c
View file @
88033d73
...
...
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <dm.h>
#include <fs.h>
#include <part.h>
#include <sandboxblockdev.h>
...
...
@@ -67,7 +68,7 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
int
dev
;
printf
(
"%3s %12s %s
\n
"
,
"dev"
,
"blocks"
,
"path"
);
for
(
dev
=
min_dev
;
dev
<=
max_dev
;
dev
++
)
{
block_dev_desc_t
*
blk_dev
;
struct
blk_desc
*
blk_dev
;
int
ret
;
printf
(
"%3d "
,
dev
);
...
...
@@ -80,7 +81,13 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
continue
;
}
struct
host_block_dev
*
host_dev
=
blk_dev
->
priv
;
struct
host_block_dev
*
host_dev
;
#ifdef CONFIG_BLK
host_dev
=
dev_get_priv
(
blk_dev
->
bdev
);
#else
host_dev
=
blk_dev
->
priv
;
#endif
printf
(
"%12lu %s
\n
"
,
(
unsigned
long
)
blk_dev
->
lba
,
host_dev
->
filename
);
}
...
...
@@ -92,7 +99,7 @@ static int do_host_dev(cmd_tbl_t *cmdtp, int flag, int argc,
{
int
dev
;
char
*
ep
;
block_dev_desc_t
*
blk_dev
;
struct
blk_desc
*
blk_dev
;
int
ret
;
if
(
argc
<
1
||
argc
>
3
)
...
...
cmd/ide.c
View file @
88033d73
...
...
@@ -10,6 +10,7 @@
*/
#include <common.h>
#include <blk.h>
#include <config.h>
#include <watchdog.h>
#include <command.h>
...
...
@@ -53,7 +54,7 @@ ulong ide_bus_offset[CONFIG_SYS_IDE_MAXBUS] = {
static
int
ide_bus_ok
[
CONFIG_SYS_IDE_MAXBUS
];
block_dev_desc_t
ide_dev_desc
[
CONFIG_SYS_IDE_MAXDEVICE
];
struct
blk_desc
ide_dev_desc
[
CONFIG_SYS_IDE_MAXDEVICE
];
/* ------------------------------------------------------------------------- */
#ifdef CONFIG_IDE_RESET
...
...
@@ -62,7 +63,7 @@ static void ide_reset (void);
#define ide_reset()
/* dummy */
#endif
static
void
ide_ident
(
block_dev_desc_t
*
dev_desc
);
static
void
ide_ident
(
struct
blk_desc
*
dev_desc
);
static
uchar
ide_wait
(
int
dev
,
ulong
t
);
#define IDE_TIME_OUT 2000
/* 2 sec timeout */
...
...
@@ -78,8 +79,8 @@ static void ident_cpy (unsigned char *dest, unsigned char *src, unsigned int len
#endif
#ifdef CONFIG_ATAPI
static
void
atapi_inquiry
(
block_dev_desc_t
*
dev_desc
);
static
ulong
atapi_read
(
block_dev_desc_t
*
block_dev
,
lbaint_t
blknr
,
static
void
atapi_inquiry
(
struct
blk_desc
*
dev_desc
);
static
ulong
atapi_read
(
struct
blk_desc
*
block_dev
,
lbaint_t
blknr
,
lbaint_t
blkcnt
,
void
*
buffer
);
#endif
...
...
@@ -137,7 +138,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
++
ok
;
if
(
dev
)
putc
(
'\n'
);
p
rint_par
t
(
&
ide_dev_desc
[
dev
]);
p
art_prin
t
(
&
ide_dev_desc
[
dev
]);
}
}
if
(
!
ok
)
{
...
...
@@ -171,7 +172,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
int
dev
=
(
int
)
simple_strtoul
(
argv
[
2
],
NULL
,
10
);
if
(
ide_dev_desc
[
dev
].
part_type
!=
PART_TYPE_UNKNOWN
)
{
p
rint_par
t
(
&
ide_dev_desc
[
dev
]);
p
art_prin
t
(
&
ide_dev_desc
[
dev
]);
}
else
{
printf
(
"
\n
IDE device %d not available
\n
"
,
dev
);
...
...
@@ -187,7 +188,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
if
(
strcmp
(
argv
[
1
],
"read"
)
==
0
)
{
ulong
addr
=
simple_strtoul
(
argv
[
2
],
NULL
,
16
);
ulong
cnt
=
simple_strtoul
(
argv
[
4
],
NULL
,
16
);
block_dev_desc_t
*
dev_desc
;
struct
blk_desc
*
dev_desc
;
ulong
n
;
#ifdef CONFIG_SYS_64BIT_LBA
...
...
@@ -203,8 +204,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
#endif
dev_desc
=
&
ide_dev_desc
[
curr_device
];
n
=
dev_desc
->
block_read
(
dev_desc
,
blk
,
cnt
,
(
ulong
*
)
addr
);
n
=
blk_dread
(
dev_desc
,
blk
,
cnt
,
(
ulong
*
)
addr
);
/* flush cache after read */
flush_cache
(
addr
,
cnt
*
ide_dev_desc
[
curr_device
].
blksz
);
...
...
@@ -418,7 +418,7 @@ void ide_init(void)
int
led
=
(
IDE_BUS
(
i
)
==
0
)
?
LED_IDE1
:
LED_IDE2
;
ide_dev_desc
[
i
].
type
=
DEV_TYPE_UNKNOWN
;
ide_dev_desc
[
i
].
if_type
=
IF_TYPE_IDE
;
ide_dev_desc
[
i
].
dev
=
i
;
ide_dev_desc
[
i
].
dev
num
=
i
;
ide_dev_desc
[
i
].
part_type
=
PART_TYPE_UNKNOWN
;
ide_dev_desc
[
i
].
blksz
=
0
;
ide_dev_desc
[
i
].
log2blksz
=
...
...
@@ -435,7 +435,7 @@ void ide_init(void)
if
((
ide_dev_desc
[
i
].
lba
>
0
)
&&
(
ide_dev_desc
[
i
].
blksz
>
0
))
{
/* initialize partition type */
init_par
t
(
&
ide_dev_desc
[
i
]);
part_ini
t
(
&
ide_dev_desc
[
i
]);
if
(
curr_device
<
0
)
curr_device
=
i
;
}
...
...
@@ -446,7 +446,7 @@ void ide_init(void)
/* ------------------------------------------------------------------------- */
#ifdef CONFIG_PARTITIONS
block_dev_desc_t
*
ide_get_dev
(
int
dev
)
struct
blk_desc
*
ide_get_dev
(
int
dev
)
{
return
(
dev
<
CONFIG_SYS_IDE_MAXDEVICE
)
?
&
ide_dev_desc
[
dev
]
:
NULL
;
}
...
...
@@ -541,7 +541,7 @@ __weak void ide_input_data(int dev, ulong *sect_buf, int words)
/* -------------------------------------------------------------------------
*/
static
void
ide_ident
(
block_dev_desc_t
*
dev_desc
)
static
void
ide_ident
(
struct
blk_desc
*
dev_desc
)
{
unsigned
char
c
;
hd_driveid_t
iop
;
...
...
@@ -551,7 +551,7 @@ static void ide_ident(block_dev_desc_t *dev_desc)
#endif
int
device
;
device
=
dev_desc
->
dev
;
device
=
dev_desc
->
dev
num
;
printf
(
" Device %d: "
,
device
);
ide_led
(
DEVICE_LED
(
device
),
1
);
/* LED on */
...
...
@@ -713,10 +713,10 @@ static void ide_ident(block_dev_desc_t *dev_desc)
/* ------------------------------------------------------------------------- */
ulong
ide_read
(
block_dev_desc_t
*
block_dev
,
lbaint_t
blknr
,
lbaint_t
blkcnt
,
ulong
ide_read
(
struct
blk_desc
*
block_dev
,
lbaint_t
blknr
,
lbaint_t
blkcnt
,
void
*
buffer
)
{
int
device
=
block_dev
->
dev
;
int
device
=
block_dev
->
dev
num
;
ulong
n
=
0
;
unsigned
char
c
;
unsigned
char
pwrsave
=
0
;
/* power save */
...
...
@@ -839,10 +839,10 @@ IDE_READ_E:
/* ------------------------------------------------------------------------- */
ulong
ide_write
(
block_dev_desc_t
*
block_dev
,
lbaint_t
blknr
,
lbaint_t
blkcnt
,
ulong
ide_write
(
struct
blk_desc
*
block_dev
,
lbaint_t
blknr
,
lbaint_t
blkcnt
,
const
void
*
buffer
)
{
int
device
=
block_dev
->
dev
;
int
device
=
block_dev
->
dev
num
;
ulong
n
=
0
;
unsigned
char
c
;
...
...
@@ -1301,14 +1301,14 @@ error:
}
static
void
atapi_inquiry
(
block_dev_desc_t
*
dev_desc
)
static
void
atapi_inquiry
(
struct
blk_desc
*
dev_desc
)
{
unsigned
char
ccb
[
12
];
/* Command descriptor block */
unsigned
char
iobuf
[
64
];
/* temp buf */
unsigned
char
c
;
int
device
;
device
=
dev_desc
->
dev
;
device
=
dev_desc
->
dev
num
;
dev_desc
->
type
=
DEV_TYPE_UNKNOWN
;
/* not yet valid */
dev_desc
->
block_read
=
atapi_read
;
...
...
@@ -1394,10 +1394,10 @@ static void atapi_inquiry(block_dev_desc_t *dev_desc)
#define ATAPI_READ_BLOCK_SIZE 2048
/* assuming CD part */
#define ATAPI_READ_MAX_BLOCK (ATAPI_READ_MAX_BYTES/ATAPI_READ_BLOCK_SIZE)
ulong
atapi_read
(
block_dev_desc_t
*
block_dev
,
lbaint_t
blknr
,
lbaint_t
blkcnt
,
ulong
atapi_read
(
struct
blk_desc
*
block_dev
,
lbaint_t
blknr
,
lbaint_t
blkcnt
,
void
*
buffer
)
{
int
device
=
block_dev
->
dev
;
int
device
=
block_dev
->
dev
num
;
ulong
n
=
0
;
unsigned
char
ccb
[
12
];
/* Command descriptor block */
ulong
cnt
;
...
...
cmd/mmc.c
View file @
88033d73
...
...
@@ -424,7 +424,7 @@ static int do_mmc_rescan(cmd_tbl_t *cmdtp, int flag,
static
int
do_mmc_part
(
cmd_tbl_t
*
cmdtp
,
int
flag
,
int
argc
,
char
*
const
argv
[])
{
block_dev_desc_t
*
mmc_dev
;
struct
blk_desc
*
mmc_dev
;
struct
mmc
*
mmc
;
mmc
=
init_mmc_device
(
curr_device
,
false
);
...
...
@@ -433,7 +433,7 @@ static int do_mmc_part(cmd_tbl_t *cmdtp, int flag,
mmc_dev
=
mmc_get_dev
(
curr_device
);
if
(
mmc_dev
!=
NULL
&&
mmc_dev
->
type
!=
DEV_TYPE_UNKNOWN
)
{
p
rint_par
t
(
mmc_dev
);
p
art_prin
t
(
mmc_dev
);
return
CMD_RET_SUCCESS
;
}
...
...
cmd/mmc_spi.c
View file @
88033d73
...
...
@@ -72,8 +72,8 @@ static int do_mmc_spi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
printf
(
"Failed to create MMC Device
\n
"
);
return
1
;