| b4857aa9 | 02-Dec-2015 |
Simon Glass <sjg@chromium.org> |
spl: mmc: Unify non/driver model spl_mmc_find_device()
It is risky to have two different functions with much the same code. Future authors may update one but not the other. It is hard to see which p
spl: mmc: Unify non/driver model spl_mmc_find_device()
It is risky to have two different functions with much the same code. Future authors may update one but not the other. It is hard to see which parts are the same and which are different.
Unify the functions and drop the differences that are not really needed.
Note that one puts() becomes printf() as Tom mentioned that this does not affect image size:
https://patchwork.ozlabs.org/patch/537276/
Note: It would be better to have an empty printf() and avoid the #ifdef for CONFIG_SPL_LIBCOMMON_SUPPORT.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Michal Simek <michal.simek@xilinx.com>
show more ...
|
| 99c7a51a | 02-Dec-2015 |
Simon Glass <sjg@chromium.org> |
spl: mmc: Rename 'mmc' variable to 'mmcp'
The 'p' suffix makes it more obvious that we are dealing with a pointer to a (pointer) value that will be returned to its caller.
Signed-off-by: Simon Glas
spl: mmc: Rename 'mmc' variable to 'mmcp'
The 'p' suffix makes it more obvious that we are dealing with a pointer to a (pointer) value that will be returned to its caller.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Nikita Kiryanov <nikita@compulab.co.il> Tested-by: Michal Simek <michal.simek@xilinx.com>
show more ...
|
| d773a008 | 02-Dec-2015 |
Simon Glass <sjg@chromium.org> |
spl: mmc: Fix compiler warning with CONFIG_DM_MMC
Since commit 4188ba3 we get the following warning on rockchip boards:
common/spl/spl_mmc.c:31:24: warning: ‘mmc’ may be used uninitialized in this
spl: mmc: Fix compiler warning with CONFIG_DM_MMC
Since commit 4188ba3 we get the following warning on rockchip boards:
common/spl/spl_mmc.c:31:24: warning: ‘mmc’ may be used uninitialized in this function [-Wmaybe-uninitialized] count = mmc->block_dev.block_read(0, sector, 1, header); ^ common/spl/spl_mmc.c:251:14: note: ‘mmc’ was declared here struct mmc *mmc;
Correct this by move the variable init earlier.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
show more ...
|
| c6bb23c8 | 27-Nov-2015 |
Peng Fan <Peng.Fan@freescale.com> |
common: cli_hush: avoid memory leak
Need to free memory avoid memory leak, when error.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <
common: cli_hush: avoid memory leak
Need to free memory avoid memory leak, when error.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
show more ...
|
| 63ce348d | 26-Nov-2015 |
Stefan Roese <sr@denx.de> |
common/Makefile: Compile fdt_support is enabled in SPL
When CONFIG_SPL_OF_TRANSLATE is enabled fdt_support.c needs to get compiled. Otherwise fdt_translate_address() is missing which is needed in de
common/Makefile: Compile fdt_support is enabled in SPL
When CONFIG_SPL_OF_TRANSLATE is enabled fdt_support.c needs to get compiled. Otherwise fdt_translate_address() is missing which is needed in dev_get_addr().
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 746da1bd | 26-Nov-2015 |
Peng Fan <Peng.Fan@freescale.com> |
common: miiphyutil: avoid memory leak
The following code will alloc memory for new_dev and ldev: " new_dev = mdio_alloc(); ldev = malloc(sizeof(*ldev)); " Either new_dev or ldev is NULL, directly re
common: miiphyutil: avoid memory leak
The following code will alloc memory for new_dev and ldev: " new_dev = mdio_alloc(); ldev = malloc(sizeof(*ldev)); " Either new_dev or ldev is NULL, directly return, but this may leak memory. So before return, using free(ldev) and mdio_free(new_dev) to avoid leaking memory, also free can handle NULL pointer.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 678e9316 | 25-Nov-2015 |
Peng Fan <Peng.Fan@freescale.com> |
common: mmc: unsigned char compared against 0
"enable" is unsigned char type and its value will not be negative, so discard "enable < 0".
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Diego
common: mmc: unsigned char compared against 0
"enable" is unsigned char type and its value will not be negative, so discard "enable < 0".
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Diego Santa Cruz <Diego.SantaCruz@spinetix.com> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| d39449b1 | 24-Nov-2015 |
Peng Fan <Peng.Fan@freescale.com> |
common: miiphyutil: no need to check name of mii_dev
The entry name of mii_dev is an array not pointer, so no need to check.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Joe Hershberger <jo
common: miiphyutil: no need to check name of mii_dev
The entry name of mii_dev is an array not pointer, so no need to check.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 2ea47be0 | 24-Nov-2015 |
Peng Fan <Peng.Fan@freescale.com> |
common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY
If condition of "(load == image_start || load == image_data)" is true, should use "fdt_addr = load;", but not "fdt_blob = (char *)image_da
common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY
If condition of "(load == image_start || load == image_data)" is true, should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;", or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);" at the end of the switch case.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Simon Glass <sjg@chromium.org> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Max Krummenacher <max.krummenacher@toradex.com> Cc: Marek Vasut <marex@denx.de> Cc: Suriyan Ramasami <suriyan.r@gmail.com> Cc: Paul Kocialkowski <contact@paulk.fr> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| aa722529 | 24-Nov-2015 |
Peng Fan <Peng.Fan@freescale.com> |
common: cli_hush: avoid dead code
Condition "(value == NULL && ++value == NULL)" actully will always return false.
Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect such expre
common: cli_hush: avoid dead code
Condition "(value == NULL && ++value == NULL)" actully will always return false.
Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect such expression "c=". To "c=", *(value + 1) is 0, so directly return -1, but not continue.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Rabin Vincent <rabin@rab.in> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 9eed48c8 | 04-Dec-2015 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of http://git.denx.de/u-boot-sparc |
| 1e85ccec | 23-Nov-2015 |
Francois Retief <fgretief@spaceteq.co.za> |
sparc: Update PROM initialization code for generic board
Fixed the prom_relocate() function in start.S file by reserving memory in the board_init_f sequence and saving the offset to the __prom_start
sparc: Update PROM initialization code for generic board
Fixed the prom_relocate() function in start.S file by reserving memory in the board_init_f sequence and saving the offset to the __prom_start_reloc variable. This value is used as the destination when relocating the PROM.
Add the prom_init() function to the end of the board_init_r sequence.
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
show more ...
|
| c97088c3 | 28-Oct-2015 |
Francois Retief <fgretief@spaceteq.co.za> |
sparc: Update cpu_init.c to use generic timer infrastructure
Introduce the CONFIG_SYS_TIMER_* macros in include/asm/config.h to make use of the generic timer infrastructure in lib/time.c.
Created a
sparc: Update cpu_init.c to use generic timer infrastructure
Introduce the CONFIG_SYS_TIMER_* macros in include/asm/config.h to make use of the generic timer infrastructure in lib/time.c.
Created a timer_init() function to initialize the timer hardware and update the #ifdef in board_init_f to allow this function to be called during the start-up sequence.
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
show more ...
|
| e17c5200 | 28-Oct-2015 |
Francois Retief <fgretief@spaceteq.co.za> |
sparc: Initial ground work for generic board initialization
Initial ground work in preperation for generic board initialization code for the SPARC architecture.
Signed-off-by: Francois Retief <fgre
sparc: Initial ground work for generic board initialization
Initial ground work in preperation for generic board initialization code for the SPARC architecture.
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
show more ...
|
| f5bcfe15 | 02-Dec-2015 |
Anatolij Gustschin <agust@denx.de> |
Revert "LCD: Add an option to skip registration as an stdio output"
This reverts commit 05bfe1321024e2ae0039dc16f17d2165610fb4fd.
As discussed on the list, we already have the needed functionality
Revert "LCD: Add an option to skip registration as an stdio output"
This reverts commit 05bfe1321024e2ae0039dc16f17d2165610fb4fd.
As discussed on the list, we already have the needed functionality by defining CONFIG_SYS_CONSOLE_IS_IN_ENV, CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE and adding custom overwrite_console() in the board code.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
show more ...
|
| cab24b34 | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Convert 'pci' command to driver model
Adjust this command to use the correct PCI functions, instead of the compatibility layer.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: B
dm: pci: Convert 'pci' command to driver model
Adjust this command to use the correct PCI functions, instead of the compatibility layer.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| c4f32bb2 | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
pci: Move PCI header output code into its own function
We want to share this code with the driver model version, so put it in a separate function.
Signed-off-by: Simon Glass <sjg@chromium.org> Revi
pci: Move PCI header output code into its own function
We want to share this code with the driver model version, so put it in a separate function.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 32ec5b34 | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
pci: Use a separate 'dev' variable for the PCI device
In the 'pci' command, add a separate variable to hold the PCI device. When this code is converted to driver model, this variable will be used to
pci: Use a separate 'dev' variable for the PCI device
In the 'pci' command, add a separate variable to hold the PCI device. When this code is converted to driver model, this variable will be used to hold a struct udevice instead.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 72ef5b60 | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
pci: Use common functions to read/write config
Currently we use switch() and access PCI configuration via several functions, one for each data size. Adjust the code to use generic functions, where t
pci: Use common functions to read/write config
Currently we use switch() and access PCI configuration via several functions, one for each data size. Adjust the code to use generic functions, where the data size is a parameter.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| c2be0700 | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
pci: Tidy up function comments in cmd_pci.c
The function comments use an old style and some are incorrect. Update them.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn
pci: Tidy up function comments in cmd_pci.c
The function comments use an old style and some are incorrect. Update them.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 49f835fd | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Reorder functions in cmd_pci.c
Before converting this to driver model, reorder the code to avoid forward function declarations.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: B
dm: pci: Reorder functions in cmd_pci.c
Before converting this to driver model, reorder the code to avoid forward function declarations.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| 07a58870 | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
pci: Refactor the pciinfo() function
This function uses macros to output data. It seems better to use a table of registers rather than macro-based code generation. It also reduces the code/data size
pci: Refactor the pciinfo() function
This function uses macros to output data. It seems better to use a table of registers rather than macro-based code generation. It also reduces the code/data size by 2KB on ARM.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| ca7de76d | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
pci: Use a separate variable for the bus number
At present in do_pci(), bdf can either mean a bus number or a PCI bus number. Use separate variables instead to reduce confusion.
Signed-off-by: Simo
pci: Use a separate variable for the bus number
At present in do_pci(), bdf can either mean a bus number or a PCI bus number. Use separate variables instead to reduce confusion.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| bfa4191e | 27-Nov-2015 |
Simon Glass <sjg@chromium.org> |
pci: Use a common return in command processing
Adjust the commands to return from the same place.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> |
| 871bc923 | 20-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Avoid a driver model build error with CONFIG_CMD_PCI_ENUM
This is not supported with driver model, so print a message instead of generating a build error. Rescanning PCI is not yet implemen
dm: pci: Avoid a driver model build error with CONFIG_CMD_PCI_ENUM
This is not supported with driver model, so print a message instead of generating a build error. Rescanning PCI is not yet implemented.
This function will be implemented later once some additional PCI driver model improvements are merged. It was confirmed on the mailing list that no one on the tegra side will miss this feature, so it is disabled for tegra.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|