Fix:
cmd_flash.c:355:32: warning: 'info' may be used uninitialized in this
function [-Wuninitialized]
cmd_flash.c:354:10: warning: 'sect_first' may be used uninitialized in
this function [-Wuninitialized]
cmd_flash.c:354:10: warning: 'sect_last' may be used uninitialized in
this function [-Wuninitialized]
cmd_flash.c: In function 'do_protect':
cmd_flash.c:540:9: warning: 'info' may be used uninitialized in this
function [-Wuninitialized]
cmd_flash.c:538:9: warning: 'sect_first' may be used uninitialized in
this function [-Wuninitialized]
cmd_flash.c:538:9: warning: 'sect_last' may be used uninitialized in
this function [-Wuninitialized]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Fix:
cmd_i2c.c: In function 'do_i2c_add_bus':
cmd_i2c.c:1212:19: warning: variable 'dev' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Sandbox wants to support commands which use memory. The map_physmen()
call provides this feature, so should be used more consistently in
U-Boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Matthias Weisser <weisserm@arcor.de>
Fix:
cmd_ide.c: In function 'ide_ident':
cmd_ide.c:988:6: warning: variable 'do_retry' set but not used
[-Wunused-but-set-variable]
Delete the unused variable.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Make file acceptable to checkpatch.
This is only a basic clean up to the extend possible without any real
changes to the source code. Warnings due to line over 80 characters
were accepted because these affect only printf()s with user visible
strings. No attempts were made to fix warnings about volatile and
externs - these need a more thorough cleanup.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
usb_storage.c: In function ‘us_one_transfer’:
usb_storage.c:377:7: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:389:6: warning: format ‘%d’ expects argument of type ‘int’, but
argument 2 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:394:6: warning: format ‘%d’ expects argument of type ‘int’, but
argument 2 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_BBB_reset’:
usb_storage.c:442:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:448:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:454:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_CB_reset’:
usb_storage.c:482:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_CB_comdat’:
usb_storage.c:572:3: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:584:4: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_BBB_transport’:
usb_storage.c:782:3: warning: format ‘%d’ expects argument of type ‘int’, but
argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_CB_transport’:
usb_storage.c:807:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:830:3: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:857:3: warning: format ‘%d’ expects argument of type ‘int’, but
argument 2 has type ‘long unsigned int’ [-Wformat]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Remy Bohmer <linux@bohmer.net>
usb_storage.c: In function ‘usb_stor_CB_reset’:
usb_storage.c:466:6: warning: variable ‘result’ set but not used
[-Wunused-but-set-variable]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
cmd_ide.c: In function ‘ide_read’:
cmd_ide.c:1227:2: warning: format ‘%LX’ expects argument of type ‘long long
unsigned int’, but argument 3 has type ‘lbaint_t’ [-Wformat]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
usb.c: In function ‘usb_parse_config’:
usb.c:331:17: warning: variable ‘ch’ set but not used
[-Wunused-but-set-variable]
usb.c: In function ‘usb_hub_port_connect_change’:
usb.c:1123:29: warning: variable ‘portchange’ set but not used
[-Wunused-but-set-variable]
usb.c: In function ‘usb_hub_configure’:
usb.c:1183:25: warning: variable ‘hubsts’ set but not used
[-Wunused-but-set-variable]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
FAT library now uses malloc() and free(). But SPL doesn't
have heap until now. Setup a heap in SDRAM to fix this issue.
However this increases SPL footprint beyond the available SRAM
budget. So, compile out some fancy features in the SDARM init
bring back footprint under control
CC: Sandeep Paulraj <s-paulraj@ti.com>
CC: Wolfgang Denk <wd@denx.de>
Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
For files like the drivers/serial/serial.c, it must include the
platform file, as the CONFIG_SYS_NS16550_COM1 must reference to
the definition in the platform definition files.
Include the platform definition file in the config file, so that it
would decouple the dependence for the driver files.
Signed-off-by: Lei Wen <leiwen@marvell.com>
This is a better name for this protocol. Also remove the typedef to keep
checkpatch happy, and move zeroing of NetBootFileXferSize a little
earlier since TFTPPUT will need to change this.
Signed-off-by: Simon Glass <sjg@chromium.org>
It seems we put numbers and addresses into environment variables a lot.
We should have some functions to do this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Some Davinci processors supports the Application
Image Script (AIS) boot process. The patch adds the generation
of the AIS image inside the mkimage tool to make possible
to generate a bootable U-boot without external tools
(TI Davinci AIS Generator).
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
This is not an uncommon operation in U-Boot, so let's put it in a common
function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
In commit fa28bd2eef patch v1 was applied
instead of v2. This is an incremental patch to update that commit
to version 2.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Our boards rely on dtt for initialization of fan hardware.
dtt_init() was implemented to be called form board specific code.
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Remove MK_STR from places that consume CONFIG_BOOTFILE to force all definitions to be string literals.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Remove MK_STR from places that consume CONFIG_ROOTPATH to force all definitions to be string literals.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
This avoids the following checkpatch warning in later patches:
ERROR: "(foo*)" should be "(foo *)"
ERROR: space required before the open brace '{'
ERROR: space prohibited before that close parenthesis ')'
ERROR: spaces required around that '||' (ctx:WxV)
WARNING: space prohibited between function name and open parenthesis '('
WARNING: line over 80 characters
This fixes all the white-space warnings/errors in my subsequent patch,
and within this current patch. A number of other checkpatch warnings
and errors are still present in this patch itself, but are beyond simple
whitespace fixes, so are not solved by this patch.
v2: New patch
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
The print_str() helper function for cmd_bdinfo can print any string, but it
is only used to print MHz values. Replace it with print_mhz() that takes
a number and converts it to a string internally.
Signed-off-by: Timur Tabi <timur@freescale.com>
Add common function fdt_set_node_status() to assist in various locations
that we set a nodes status. This function utilizes the status values
that are part of the EPAPR spec (on power.org).
fdt_set_status_by_alias() is based on fdt_set_node_status() but uses an
alias string to identify the node to update.
We also add some shortcut functions to help the common cases of setting
"okay" and "disabled":
fdt_status_okay()
fdt_status_disabled()
fdt_status_okay_by_alias()
fdt_status_disabled_by_alias()
Finally, we fixup the corenet_ds ethernet code which previously had
a function by the same name that can be replaced with the new helpers.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
This adds sandbox architecture support to bootm, although it is probably
not useful to load sandbox code into the address space and execute it.
This change at least make the file build correctly on 64-bit machines.
Signed-off-by: Simon Glass <sjg@chromium.org>
This is required for the bdinfo command to work.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fix syntax error.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Add pxe command, which is intended to mimic PXELINUX functionality.
'pxe get' uses tftp to retrieve a file based on UUID, MAC address or IP
address. 'pxe boot' interprets the contents of PXELINUX config like file
to boot using a specific initrd, kernel and kernel command line.
This patch also adds a README.pxe file - see it for more details on the
pxe command.
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
This will be used first by the pxe code, but is intended to be
generic and reusable for other jobs in U-boot.
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
The command auto-completion does not work on architectures relying
on CONFIG_NEEDS_MANUAL_RELOC like MIPS. Cause is the missing function
pointer fixup for cmd_tbl_t::complete function in fixup_cmdtable().
This patch adds the missing pointer fixup in case of CONFIG_AUTO_COMPLETE
is defined.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
The device tree compiler, dtc, can use "phandle" and/or "linux,phandle"
properties to specify the phandle for any node. By default, it uses
both, but "linux,phandle" is deprecated. One day, we'd like to stop using
"linux,phandle", but U-boot needs to support both properties equally
first.
fdt_alloc_phandle() generates a unique phandle, but it was only checking
the "linux,phandle" properties. Instead, we use fdt_get_phandle(),
which checks both properties automatically. This ensures that we
support dtbs that only use "phandle".
The side-effect is that fdt_alloc_phandle() now takes twice as long, since
it has to check for two properties instead of one in each node that it
searches.
Signed-off-by: Timur Tabi <timur@freescale.com>
fdt_create_phandle() was ignoring errors from fdt_set_phandle(). If an
error occurs, print an error message and return 0, which is an invalid
phandle. We also need to change the return type for fdt_create_phandle()
to indicate that it cannot return an error code.
Signed-off-by: Timur Tabi <timur@freescale.com>
Fix:
usb.c: In function 'usb_parse_config':
usb.c:331:17: warning: variable 'ch' set but not used [-Wunused-but-set-variable]
usb.c: In function 'usb_hub_port_connect_change':
usb.c:1123:29: warning: variable 'portchange' set but not used [-Wunused-but-set-variable]
usb.c: In function 'usb_hub_configure':
usb.c:1183:25: warning: variable 'hubsts' set but not used [-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Acked-by: Remy Bohmer <linux@bohmer.net>
Fix:
cmd_usb.c: In function 'usb_show_tree_graph':
cmd_usb.c:284:29: warning: variable 'port' set but not used [-Wunused-but-set-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Acked-by: Remy Bohmer <linux@bohmer.net>
Fix:
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable]
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:225:6: warning: unused variable 'devices_found'
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable]
[-Wunused-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>