1
0
Fork 0
Commit Graph

34252 Commits (746da1bd42aa5ecc47898399514c9c76d0329706)

Author SHA1 Message Date
Peng Fan 746da1bd42 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>
2015-12-05 18:22:24 -05:00
Peng Fan 678e9316d4 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>
2015-12-05 18:22:24 -05:00
Marek Vasut 9f8edb7651 eeprom: Zap CONFIG_SYS_I2C_MULTI_EEPROMS
This symbol is no longer used anywhere, remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Heiko Schocher <hs@denx.de>
2015-12-05 18:22:24 -05:00
Vagrant Cascadian 1b25e586cb Fix typo: firstly -> first.
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Acked-by: Marek Vasut <marex@denx.de>
2015-12-05 18:22:23 -05:00
Vagrant Cascadian 3f42dc87b4 Fix typo: commmand -> command.
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2015-12-05 18:22:21 -05:00
Wolfgang Denk e5d3078622 mpc8xx: remove stale "lwmon" files
Commit acc2372d "mpc8xx: remove lwmon board support" removed support
for the MPC823 based "lwmon" board, but left some board specific POST
files.  This patch cleans up and removes the now unused files.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2015-12-05 18:22:16 -05:00
Peng Fan d39449b110 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>
2015-12-05 18:22:15 -05:00
Peng Fan 2ea47be02f 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>
2015-12-05 18:22:15 -05:00
Peng Fan aa72252963 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>
2015-12-05 18:22:14 -05:00
Peng Fan bc3c89b130 common: bootm: check return value of strict_strtoul
Before continue, check return value of strict_strtoul.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-12-05 18:22:12 -05:00
Tom Rini 9eed48c8be Merge branch 'master' of http://git.denx.de/u-boot-sparc 2015-12-04 17:50:34 -05:00
Tom Rini a85670e40d Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2015-12-04 08:21:28 -05:00
Francois Retief 7a4fb11b85 sparc: Remove non-generic board init files: board.c, time.c
Remove the board.c and time.c files and all associated non-generic board
initialization code.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:50 +02:00
Daniel Hellstrom f376c42f3b sparc: leon3: Added busy wait function, made wait_ms() work when IRQ is disabled
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2015-12-03 13:15:49 +02:00
Daniel Hellstrom 6c4359aa72 sparc: leon3: Added CPU count and frequency detection.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2015-12-03 13:15:49 +02:00
Daniel Hellstrom 36594a1dfb sparc: Removed USB stop from linux bootm, arch-independent bootm stop USB
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2015-12-03 13:15:49 +02:00
Francois Retief 78536bc4d3 sparc: Use microseconds instead of ticks for timeout
We now use the generic delay method which specifies the timeout as
microseconds instead of ticks.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:49 +02:00
Francois Retief 4c547754f5 sparc: Add CONFIG_DISPLAY_BOARDINFO variable to all LEON boards
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:49 +02:00
Francois Retief 1e85ccec53 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>
2015-12-03 13:15:49 +02:00
Francois Retief c97088c3cf 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>
2015-12-03 13:15:49 +02:00
Francois Retief c837901bf1 sparc: leon2: Updates for generic board initialization
Reworked the LEON2 start.S code to call board_init_f function at startup.
Also implemented the relocate_code function in assembly to relocate the
monitor and setup the stack pointer before calling relocated board_init_r.

Add the CONFIG_SYS_GENERIC_BOARD variable to all the LEON2 boards.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:49 +02:00
Francois Retief a62bba15b5 sparc: leon3: Updates for generic board initialization
Reworked the LEON3 start.S code to call board_init_f function at startup.
Also implemented the relocate_code function in assembly to relocate the
monitor and setup the stack pointer before calling relocated board_init_r.

Add the CONFIG_SYS_GENERIC_BOARD variable to all the LEON3 boards.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:49 +02:00
Daniel Hellstrom cb31eaa4b3 sparc: leon3: Clear all unused GPTIMER registers.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2015-12-03 13:15:49 +02:00
Francois Retief 574be25ea1 sparc: leon3: Move ambapp_bus_init() call to arch_cpu_init() function
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:49 +02:00
Francois Retief d67269ba70 sparc: leon3: Move snoop detection from startup.S to arch_cpu_init()
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:48 +02:00
Francois Retief e17c5200c7 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>
2015-12-03 13:15:48 +02:00
Francois Retief a5b629a33e sparc: Fix whitespace in cpu/leon2/cpu_init.c
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:48 +02:00
Francois Retief c2b37a0d55 sparc: leon3: Updated serial driver to use CONFIG_CONS_INDEX
Updated the LEON3 serial driver to make use of the CONFIG_CONS_INDEX
option to select which serial port the console will use.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:48 +02:00
Daniel Hellstrom ff0b9b77c2 sparc: Serial baud rate register support multiple buses with different frequency
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2015-12-03 13:15:48 +02:00
Francois Retief 58e5585625 sparc: leon3: Clear GD_FLAG_SERIAL_READY flag on AMBA failure
Clear the GD_FLG_SERIAL_READY flag on AMBA P&P lookup failure so that the
panic function can use DEBUG_UART driver. drivers/serial/serial.c set this
flag before calling this function, preventing DEBUG_UART code from running.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:48 +02:00
Daniel Hellstrom f33f888d0e sparc: Added function that checks if IRQ is on or off
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2015-12-03 13:15:48 +02:00
Francois Retief be7357a6cc sparc: Remove version_string variable from start.S file
Remove the version_string variable from start.S file. A weak variable
is also set in the cmd_version.c file. No need for architecture override.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:48 +02:00
Francois Retief 52789143a2 sparc: Move SYS_SPARC_NWINDOWS to Kconfig
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
2015-12-03 13:15:48 +02:00
Anatolij Gustschin f5bcfe151e Revert "LCD: Add an option to skip registration as an stdio output"
This reverts commit 05bfe13210.

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>
2015-12-02 15:46:58 +01:00
Tom Rini be30dfbabb iocon: Disable FIT_VERBOSE
In order to fit into image constraints again, remove this feature.

Signed-off-by: Tom Rini <trini@konsulko.com>
2015-12-01 15:49:42 -05:00
Marek Vasut a80a999c9b arm: imx6: novena: Enable extfs support in SPL
Simple patch to enable support for extfs filesystem in SPL,
this is useful to those who want to avoid vfat like plague.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2015-12-01 16:11:08 +01:00
Marek Vasut 18e02ffe5e arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions
The following patch changed the PFUZE100 swbst register bit definitions
and broke PMIC configuration on multiple boards, at least on the novena
and gw_ventana. This patch fixes it.

commit 8fa46350a4
Author: Peng Fan <Peng.Fan@freescale.com>
Date:   Fri Aug 7 16:43:45 2015 +0800

    power: regulator: add pfuze100 support

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Peng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Vagrant Cascadian <vagrant@aikidev.net>
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
Reviewed-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
2015-12-01 16:09:51 +01:00
Sjoerd Simons 00ea76e800 rockchip: Explicitly set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN
Now that u-boot relocates the malloc area in SPL to SDRAM, with the
malloc area sitting below the SPL_STACK_R_ADDR the
SPL_STACK_R_MALLOC_SIMPLE_LEN needs to be set explicitly for
rockchip as its SPL_STACK_R_ADDR (512kb) is smaller then
STACK_R_MALLOC_SIMPLE_LEN (1Mb).

Using the same value as SYS_MALLOC_F_LEN (8kb) is enough to load u-boot
from SD card.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-01 08:07:22 -07:00
Sjoerd Simons d76a0119c7 Revert "rockchip: Reconfigure the malloc based to point to system memory"
This patch was merged shortly before the v2015.10 as a minimal fix for
booting on rockchip. Now that the patch series from Hans to do the
relocation in generic code has been merged it can be dropped.

This reverts commit b1f492ca9e.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-01 08:07:22 -07:00
Ariel D'Alessandro cd3187d6b2 rockchip: move SYS_MALLOC_SIMPLE to mach-rockchip Kconfig
Commit 1eb0c03c21 added
SPL_SYS_MALLOC_SIMPLE Kconfig option and changed the way it is
evaluated.

Thus, the definitions of CONFIG_SYS_MALLOC_SIMPLE in rk3***_common.h
board configs are now incorrect because CONFIG_SPL_BUILD is enabled so
CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) will look for SPL_SYS_MALLOC_SIMPLE
instead of SYS_MALLOC_SIMPLE.

This commit fix this enabling SPL_SYS_MALLOC_SIMPLE with the new Kconfig
option by default in rockchip-mach.

Signed-off-by: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-01 08:07:22 -07:00
huang lin 1d5a69684e rockchip: doc: show packet rk3036 uboot image
show how to packet rk3036 uboot image and boot from SD

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Series-to: u-boot
Series-version: 8
Series-cc: Lin Huang <hl@rock-chips.com>
2015-12-01 08:07:22 -07:00
Jeffy Chen 3641339eff rockchip: Add support for rk's second level loader
The Rockchip boot ROM could load & run an initial spl loader,
and continue to load a second level boot-loader(which stored
right after the initial loader) when it returns.
Modify idblock generation code to support it.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-01 08:07:22 -07:00
Jeffy Chen 6ae5860942 rockchip: Add max spl size & spl header configs
Our chips may have different max spl size and spl header, so
we need to add configs for that.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Dropped CONFIG_ROCKCHIP_MAX_SPL_SIZE from rk3288_common.h,
Added $(if...) to tools/Makefile to fix widespread build breakage
Signed-off-by: Simon Glass <sjg@chromium.org>

Series-changes: 8
- Drop CONFIG_ROCKCHIP_MAX_SPL_SIZE from rk3288_common.h,
- Add $(if...) to tools/Makefile to fix widespread build breakage
2015-12-01 08:07:22 -07:00
huang lin d8b597823b rockchip: Add basic support for evb-rk3036 board
This add some basic files required to allow the board to dispaly
serial message and can run command(mmc info etc)

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Moved board Kconfig fragment from previous patch into this one to fix
build error:
Signed-off-by: Simon Glass <sjg@chromium.org>

Series-changes: 8
- moved board Kconfig fragment from previous patch into this one
2015-12-01 08:07:22 -07:00
huang lin be1d5e0388 rockchip: rk3036: Add core Soc start-up code
rk3036 only 4K size SRAM for SPL, so only support
timer, uart, sdram driver in SPL stage, when finish
initial sdram, back to bootrom.And in rk3036 sdmmc and
debug uart use same iomux, so if you want to boot from
sdmmc, you must disable debug uart.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Fixed build error for chromebook_jerry, firefly-rk3288:
Signed-off-by: Simon Glass <sjg@chromium.org>

Series-changes: 8
- Fix build error for chromebook_jerry, firefly-rk3288
2015-12-01 08:07:22 -07:00
huang lin 53c45f0ca2 rockchip: add rk3036 sdram driver
add rk3036 sdram driver so we can set up sdram in SPL

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-01 08:07:22 -07:00
huang lin 07d8d35a61 rockchip: add early uart driver
add early uart driver so we can print debug message in
SPL stage

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-01 08:07:22 -07:00
huang lin 2863724831 rockchip: mmc: get the fifo mode and fifo depth property from dts
rk3036 mmc do not have internal dma, so we use fifo mode when read
and write data, we get the fifo mode and fifo depth property from
dts, pass to dw_mmc driver.

Signed-off-by: Lin Huang <hl@rock-chips.com>
2015-12-01 08:07:22 -07:00
huang lin ace2198b7c rockchip: mmc: use non-removable property to distinguish emmc and sdcard register
emmc and sdcard have different register address, use non-removeable property
to distinguish them.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-01 08:07:22 -07:00
huang lin a65f51b978 mmc: dw_mmc: support fifo mode in dwc mmc driver
some soc(rk3036 etc) use dw_mmc but do not have internal dma,
so we implement fifo mode to read and write data.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-12-01 08:07:22 -07:00