David Gibson [Sun, 2 Oct 2016 23:59:26 +0000 (17:59 -0600)]
libfdt: Fix undefined behaviour in fdt_offset_ptr()
Using pointer arithmetic to generate a pointer outside a known object is,
technically, undefined behaviour in C. Unfortunately, we were using that
in fdt_offset_ptr() to detect overflows.
To fix this we need to do our bounds / overflow checking on the offsets
before constructing pointers from them.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Simon Glass <sjg@chromium.org>
Hannes Schmelzer [Tue, 20 Sep 2016 16:10:43 +0000 (18:10 +0200)]
cmd/fdt: add possibilty to have 'extrasize' on fdt resize
Sometimes devicetree nodes and or properties are added out of the u-boot
console, maybe through some script or manual interaction.
The devicetree as loaded or embedded is quite small, so the devicetree
has to be resized to take up those new nodes/properties.
In original the devicetree was only extended by effective
4 * add_mem_rsv.
With this commit we can add an argument to the "fdt resize" command,
which takes the extrasize to be added.
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Simon Glass <sjg@chromium.org>
Tom Rini [Thu, 13 Oct 2016 12:13:56 +0000 (08:13 -0400)]
Merge branch 'master' of git.denx.de/u-boot-mmc
Tom Rini [Thu, 13 Oct 2016 00:48:43 +0000 (20:48 -0400)]
Merge git://git.denx.de/u-boot-dm
Tom Rini [Wed, 12 Oct 2016 12:32:09 +0000 (08:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Wed, 12 Oct 2016 12:31:08 +0000 (08:31 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Wed, 12 Oct 2016 12:30:46 +0000 (08:30 -0400)]
Merge branch 'master' of git.denx.de/u-boot-sunxi
Tom Rini [Wed, 12 Oct 2016 12:30:38 +0000 (08:30 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Wed, 12 Oct 2016 12:30:08 +0000 (08:30 -0400)]
Merge git://www.denx.de/git/u-boot-marvell
Tom Rini [Wed, 12 Oct 2016 12:29:42 +0000 (08:29 -0400)]
Merge git://git.denx.de/u-boot-fsl-qoriq
Signed-off-by: Tom Rini <trini@konsulko.com>
Conflicts:
include/configs/ls1021aqds.h
include/configs/ls1021atwr.h
Lokesh Vutla [Wed, 12 Oct 2016 01:33:46 +0000 (21:33 -0400)]
common: Add DISPLAY_BOARDINFO
Create a Kconfig entry for DISPLAY_BOARDINFO and make it be the default
in certain architectures. Migrate all config files.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Lokesh Vutla [Sat, 8 Oct 2016 18:41:44 +0000 (14:41 -0400)]
common/Kconfig: Add DISPLAY_CPUINFO
Create a Kconfig entry for DISPLAY_CPUINFO and make it be the default
in certain architectures. Migrate all config files.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Bin Meng [Sun, 9 Oct 2016 11:14:20 +0000 (04:14 -0700)]
x86: Clean up unused macros in the configuration headers
Legacy video driver macros are not needed. Clean them up.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:19 +0000 (04:14 -0700)]
video: Remove legacy VESA and coreboot framebuffer drivers
Now that all x86 boards have been converted to DM video, drop the
legacy drivers.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:18 +0000 (04:14 -0700)]
x86: coreboot: Convert to use DM coreboot video driver
This converts coreboot to use DM framebuffer driver.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:17 +0000 (04:14 -0700)]
dm: video: Don't do anything in alloc_fb() when plat->size is zero
With DM VESA driver on x86 boards, plat->base/size/align are all
zeroes and starting address passed to alloc_fb() happens to be 1MB
aligned, so this routine does not trigger any issue. On QEMU with
U-Boot as coreboot payload, the starting address is within 1MB
range (eg: 0x7fb0000), thus causes failure in video_post_bind().
Actually if plat->size is zero, it makes no sense to do anything
in this routine. Add such check there.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:16 +0000 (04:14 -0700)]
dm: video: Add driver for coreboot framebuffer device
This adds a DM driver for coreboot framebuffer device.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:15 +0000 (04:14 -0700)]
vbe: Make vbe_setup_video_priv() public
vbe_setup_video_priv() might be useful to other drivers.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:14 +0000 (04:14 -0700)]
x86: doc: Correct qfw command example
The kernel load address for zboot should be 0x1000000.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:13 +0000 (04:14 -0700)]
x86: Convert to use DM VESA video driver
At present only chromebook boards are converted to DM video. Other
x86 boards are still using the legacy cfb_console driver. This
switches to use DM version drivers.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:12 +0000 (04:14 -0700)]
dm: video: Output verbose information in vbe_setup_video()
With DM conversion, information like "Video: 1024x768x16" is not
shown anymore. Now add these verbose output back.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:11 +0000 (04:14 -0700)]
dm: video: Add driver for VESA-compatible device
This adds a DM driver for VESA-compatible device.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng [Sun, 9 Oct 2016 11:14:10 +0000 (04:14 -0700)]
x86: doc: Document coreboot framebuffer driver issue on QEMU
For some unknown reason, coreboot framebuffer driver never works on
QEMU since day 1. It seems the driver only works on real hardware.
Document this issue.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Moritz Fischer [Wed, 5 Oct 2016 00:08:08 +0000 (17:08 -0700)]
cmd: cros_ec: Move crosec commands to cmd subdirectory
Move crosec commands from drivers/misc/cros_ec.c to
cmd/cros_ec.c
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Miao Yan <yanmiaobest@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: u-boot@lists.denx.de
Stefan Brüns [Tue, 4 Oct 2016 19:46:35 +0000 (21:46 +0200)]
sandbox/fs: Set correct filetype for unknown filetype
The "hostfs ls" command prefixes each directory entry with either DIR,
LNK or " " if it is a directory, symlink resp. regular file, or
"???" for any other or unknown type.
The latter only works if the type is set correctly, as the entry defaults
to OS_FILET_REG and e.g. socket files show up as regular files.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 1 Oct 2016 20:42:33 +0000 (14:42 -0600)]
sandbox: Use the address in readl/writel() functions
At present these functions do not touch addr, which can raising warnings
about unused variables.
This fixes the following warnings:
sandbox_spl defconfig
drivers/core/regmap.c: In function ‘regmap_read’:
drivers/core/regmap.c:125:12: warning: unused variable ‘ptr’ [-Wunused-variable]
uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE);
^
drivers/core/regmap.c: In function ‘regmap_write’:
drivers/core/regmap.c:134:12: warning: unused variable ‘ptr’ [-Wunused-variable]
uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE);
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 3bfb8cb4 (dm: regmap: Implement simple regmap_read & regmap_write)
Stefan Brüns [Sat, 1 Oct 2016 18:41:42 +0000 (20:41 +0200)]
sandbox/fs: Use readdir instead of deprecated readdir_r
Using readdir_r limits the maximum file name length and may even be
unsafe, and is thus deprecated in since glibc 2.24.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
Stefan Brüns [Sat, 1 Oct 2016 18:41:40 +0000 (20:41 +0200)]
sandbox/fs: Use correct size path name buffer
The readdir linux manpage explicitly states (quoting POSIX.1) that
sizeof(d_name) is not correct for determining the required size, but to
always use strlen. Grow the buffer if needed.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
Stefan Brüns [Sat, 1 Oct 2016 18:41:39 +0000 (20:41 +0200)]
sandbox/fs: Make linking of nodes in os_dirent_ls more obvious
Previously, after reading/creating the second dirent, the second entry
would be chained to the first entry and the first entry would be linked
to head. Instead, immediately link the first entry to head.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
Stefan Brüns [Sat, 1 Oct 2016 18:41:38 +0000 (20:41 +0200)]
sandbox/fs: Free memory allocated by os_dirent_ls
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
Keerthy [Fri, 30 Sep 2016 04:04:03 +0000 (09:34 +0530)]
power: regulator: lp873x: Add regulator support
The driver provides regulator set/get voltage
enable/disable functions for lp873x family of PMICs.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Keerthy [Fri, 30 Sep 2016 04:04:02 +0000 (09:34 +0530)]
power: pmic: lp873x: Add the base pmic support
Add support to bind the regulators/child nodes with the pmic.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Keerthy [Fri, 30 Sep 2016 03:50:47 +0000 (09:20 +0530)]
configs: am57xx_evm_defconfig: Enable CMD_REG option
Enable CMD_REG option.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Keerthy [Fri, 30 Sep 2016 03:50:46 +0000 (09:20 +0530)]
configs: am57xx_evm_defconfig: Enable PALMAS options
Enable palmas PMIC config options.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Keerthy [Fri, 30 Sep 2016 03:50:45 +0000 (09:20 +0530)]
configs: dra7xx_evm_defconfig: Enable PALMAS options
Enable palmas PMIC config options.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Keerthy [Fri, 30 Sep 2016 03:50:44 +0000 (09:20 +0530)]
power: regulator: palmas: Add regulator support
The driver provides regulator set/get voltage
enable/disable functions for palmas family of PMICs.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Keerthy [Fri, 30 Sep 2016 03:50:43 +0000 (09:20 +0530)]
power: pmic: Palmas: Add the base pmic support
Add support to bind the regulators/child nodes with the pmic.
Also adds the pmic i2c based read/write funtions to access pmic
registers.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Keerthy [Fri, 30 Sep 2016 03:50:42 +0000 (09:20 +0530)]
power: regulator: Add ctrl_reg and volt_reg fields for pmic
The ctrl reg contains bit fields to enable and disable regulators,
and volt_reg has the bit fields to configure the voltage values.
The registers are frequently accessed hence make them part
of dm_regulator_uclass_platdata structure.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Keerthy [Thu, 15 Sep 2016 11:34:06 +0000 (17:04 +0530)]
power: regulator: Add support for gpio regulators
Add support for gpio regulators. As of now this driver caters
to gpio regulators with one gpio. Supports setting voltage values to gpio
regulators and retrieving the values.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 1 Oct 2016 20:43:19 +0000 (14:43 -0600)]
dm: mmc: Enable DM_MMC_OPS by default with DM_MMC
These two options go together and it is best to do the conversion in one
step. So enable DM_MMC_OPS by default if DM_MMC is enabled.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 1 Oct 2016 20:43:18 +0000 (14:43 -0600)]
dm: blk: Enable CONFIG_BLK if DM_MMC is enabled
To speed up conversion to CONFIG_BLK, enable it by default when DM_MMC is
enabled.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 26 Sep 2016 03:33:40 +0000 (21:33 -0600)]
x86: mrccache: Fix error handling in mrccache_get_region()
This should return normal errors, not device-tree errors. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:38 +0000 (21:33 -0600)]
x86: Drop unused init_helper functions
Drop init_bd_struct_r() which is no-longer used. Also drop the declaration
for init_func_spi() since this is now handled by generic board init.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:35 +0000 (21:33 -0600)]
x86: ivybridge: Tidy up enable_clock_gating() for 64-bit
Fix the hex case and remove unused brackets. Use ~0U instead of ~0UL to
allow compilation on 64-bit machines.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:34 +0000 (21:33 -0600)]
x86: ivybridge: Fix PCH power setup
At present pch_power_options() has the arguments to writel() around the
wrong way. Fix this and update it to compile on 64-bit machines.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:31 +0000 (21:33 -0600)]
x86: Don't export interrupt handlers with x86_64
We don't have a way of adjusting these at present so it is best to refuse to
export these functions. This can be implemented later if the API is required.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:30 +0000 (21:33 -0600)]
x86: i2c: Fix cast of address to 32-bit value
This gives a build warning on 64-bit x86. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:25 +0000 (21:33 -0600)]
x86: Correct address casts in interrupt code
We should cast an address to unsigned long, not u32.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:24 +0000 (21:33 -0600)]
x86: Correct address casts in cpu code
We should cast an address to unsigned long, not u32.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:23 +0000 (21:33 -0600)]
x86: Allow interrupts to be disabled in 64-bit mode
Update the code to support both 32-bit and 64-bit modes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:21 +0000 (21:33 -0600)]
usb: pci: Fix cast for 64-bit compilation
Fix a cast that causes warnings on 64-bit machines.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:20 +0000 (21:33 -0600)]
tpm: Tidy up use of size_t
We should consistently use %z with size_t, and avoid passing a uint32_t as
a size_t value. Fix these issues to avoid warnings on 64-bit machines.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:11 +0000 (21:33 -0600)]
rtc: Use CONFIG_X86 instead of __I386__
For 64-bit x86, __I386__ should perhaps not be defined. It is not clear from
the definition, but let's use CONFIG_X86 to be sure.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:09 +0000 (21:33 -0600)]
elf: Add the Elf64_Rela type
Add this so that we can support 64-bit relocation on x86.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:07 +0000 (21:33 -0600)]
board_f: Drop the extra fdtdec_prepare_fdt()
This is already called earlier, from fdtdec_setup(), so drop this unnecessary
call from the init sequence.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:06 +0000 (21:33 -0600)]
bios_emulator: Fix cast for 64-bit compilation
Fix a cast that causes warnings on 64-bit machines.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Mon, 26 Sep 2016 03:33:05 +0000 (21:33 -0600)]
Add _image_binary_end section declaration
This is used in some link scripts, so add a declaration for it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:20 +0000 (20:42 -0600)]
dm: x86: Move link to use driver model for video
Update the configuration to use the new driver. Drop the existing plumbing
code and unused header files.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:19 +0000 (20:42 -0600)]
dm: x86: Move samus to use new driver model support
Update the samus driver to avoid the direct call to the video BIOS setup.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:18 +0000 (20:42 -0600)]
x86: Adjust config to support DM_VIDEO
Update the common configuration so that it works correctly when
CONFIG_DM_VIDEO is enabled. This involves dropping the legacy CONFIG_VIDEO
option and changing the stdio device from "vga" to "vidconsole".
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:15 +0000 (20:42 -0600)]
dm: x86: video: Add a driver-model driver for ivybridge graphics
At present we use the legacy vesa driver for graphics. Add a driver which
supports driver model. This can be probed only when needed, removing the
need to start up the display if it is not used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:17 +0000 (20:42 -0600)]
dm: video: Add driver-model support to vesa graphics
Provide a function to run the Vesa BIOS for a given PCI device and obtain
the resulting configuration (e.g. display size) for use by the video
uclass. This makes it easier to write a video driver that uses vesa and
supports driver model.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:16 +0000 (20:42 -0600)]
dm: stdio: Allow lazy probing of video devices
At present all video devices are probed on start-up. It would be better to
probe a device only when it is needed. This can happen if it is referenced
in the stdout environment variable, for example.
Add support for this by searching for a suitable device when needed, probing
it, and finding the stdio device it creates.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:14 +0000 (20:42 -0600)]
x86: video: Fix typo in broadwell Kconfig
'enabled' should be 'enables'. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:13 +0000 (20:42 -0600)]
dm: core: Add a function to get a uclass name
It is useful in debug() statements to display the name of the uclass for a
device. Add a simple function to provide this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:12 +0000 (20:42 -0600)]
list: Add list_last_entry() to find the last entry
We have list_first_entry() but in some cases it is useful to find the last
item added to the list. Add a macro for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:11 +0000 (20:42 -0600)]
Fix return value in trailing_strtoln()
This function should return -1 if there is no trailing integer in the
string. Instead it returns 0. Fix it by checking for this condition at the
start.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:10 +0000 (20:42 -0600)]
x86: Add an accelerated memmove() function
Bring in a faster memmove() from Linux 4.7. This speeds up scrolling on the
display.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 6 Oct 2016 02:42:09 +0000 (20:42 -0600)]
Revert "x86: broadwell: gpio: Remove the codes to set up pin control"
This makes the assumption that setting up pinctrl in cpu_init_r() is safe.
On samus we need GPIOs before relocation in order to support power control.
This commit fixes the following message on boot:
initcall sequence
ffe5c6f4 failed at call
ffe01d3d (err=-1)
### ERROR ### Please RESET the board ###
In any case it seems better to leave init to driver model, so that it can
pick up the GPIO driver when it needs it. Since pinctrl is a dependency of
the GPIO driver, we may as well put the dependency there and avoid these
problems.
This reverts commit
9769e05bcf79939bad23a719982dd1f85a110f3c.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Stefan Roese [Fri, 30 Sep 2016 07:15:59 +0000 (09:15 +0200)]
x86: Fix Linux v4.7+ zimage booting (update bootparam.h)
Booting Linux kernel v4.7+ does not work since Linux kernel commit
974f221c
"x86/boot: Move compressed kernel to the end of the decompression buffer".
This patch adds the latest version of the setup_header struct, adding
"init_size" which is needed since this commit referenced above. With this
patch, booting Linux v4.8-rc8 does work again on x86 boards.
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Stefan Roese [Mon, 26 Sep 2016 08:18:07 +0000 (10:18 +0200)]
x86: baytrail: Add 2nd eMMC controller to the PCI probe list
With this addition, the eMMC device available on the congatec and DFI
BayTrail SoM is detected correctly.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Stefan Roese [Fri, 9 Sep 2016 05:45:49 +0000 (07:45 +0200)]
x86: conga-qeval20-qa3: Add README to explain the console UART options
This patch adds a small README to explain the 2 defconfig files and its
usage for the different console UART options.
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 26 Sep 2016 03:33:10 +0000 (21:33 -0600)]
mmc: Fix cast for 64-bit compilation
Fix a cast that causes warnings on 64-bit machines.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Stephen Warren [Mon, 10 Oct 2016 15:50:55 +0000 (09:50 -0600)]
ARM: tegra: reduce DRAM size mapped into MMU on ARM64
ARM CPUs can architecturally (speculatively) prefetch completely arbitrary
normal memory locations, as defined by the current translation tables. The
current MMU configuration for 64-bit Tegras maps an extremely large range
of addresses as DRAM, well beyond the actual physical maximum DRAM window,
even though U-Boot only needs access to the first 2GB of DRAM; the Tegra
port of U-Boot deliberately limits itself to 2GB of RAM since some HW
modules on at least some 64-bit Tegra SoCs can only access a 32-bit
physical address space. This change reduces the amount of RAM mapped via
the MMU to disallow the CPU from ever speculatively accessing RAM that
U-Boot will definitely not access. This avoids the possibility of the HW
raising SError due to accesses to always-invalid physical addresses.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Marcel Ziswiler [Wed, 28 Sep 2016 09:24:09 +0000 (11:24 +0200)]
colibri_t20: fix usb operation and controller order
Without this patch the following error will be shown:
Colibri T20 # usb start
starting USB...
No controllers found
This patch fixes USB operation and also the controller order as the
CI UDC driver may only be instantiated on the first aka OTG port.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Marcel Ziswiler [Wed, 28 Sep 2016 09:24:08 +0000 (11:24 +0200)]
colibri_t20: fix display configuration
Without this patch the following error will be shown:
stdio_add_devices: Video device failed (ret=-22)
As commit
ec5507707a1d1e84056a6c864338f95f6118d3ca (video: tegra: Move
to using simple-panel and pwm-backlight) states the Colibri T20 needs
updating too which this patch finally attempts doing.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Marcel Ziswiler [Wed, 28 Sep 2016 09:24:07 +0000 (11:24 +0200)]
regulator: fixed: honour optionality of enable gpio
According to the binding documentation the fixed regulator enable GPIO
is optional. However so far registration thereof failed if no enable
GPIO was specified. Fix this by making it entirely optional whether an
enable GPIO is used.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Marcel Ziswiler [Wed, 28 Sep 2016 09:24:06 +0000 (11:24 +0200)]
simple panel: fix spelling of debug message
Fix spelling of debug message from cnnot to cannot.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Marcel Ziswiler [Wed, 28 Sep 2016 09:24:05 +0000 (11:24 +0200)]
tegra: usb gadget: fix ci udc operation if not hostpc capable
The Tegra 2 aka T20 is not host PC capable. Therefore gate the define
CONFIG_CI_UDC_HAS_HOSTPC in tegra-common-usb-gadget.h in case of
CONFIG_TEGRA20.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Josh Marshall [Fri, 30 Sep 2016 05:19:58 +0000 (15:19 +1000)]
sunxi: OLinuXino Lime A20 boards: Use 384 MHz DRAM clock
We have a number of OlinuXino Lime2 boards (both NAND and eMMC versions)
which were experiencing sporadic hangs. After testing with some heavy
benchmarking and help from the Armbian forum, it was pinned down as the
DRAM settings for the board. The default is 480MHz, but this is unstable,
and even the build instructions from the vendor Olimex themselves say to
set the DRAM clock to 384. See line 96 at:
https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-build-3.4.103-release-2/BUILD_DESCRIPTION_A20_Olimex_kernel_3.4.103%2B_Jessie_rel_2.txt
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jens Kuske [Wed, 21 Sep 2016 18:08:30 +0000 (20:08 +0200)]
sunxi: Fix H3 DRAM impedance calibration on rev. A chips
H3 seems to have a silicon bug breaking the impedance calibration.
This is currently worked around in software by multiple steps
combining the results to replace the wrong values.
Revision A chips need a different workaround, which is present in
the vendor bootloader too, but got overlooked in lack of
information and affected boards till now.
This commit adds a simplified version without correction factor,
which would be 1.00 for all known boards anyway.
Signed-off-by: Jens Kuske <jenskuske@gmail.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jaehoon Chung [Sun, 25 Sep 2016 23:10:02 +0000 (08:10 +0900)]
mmc: sdhci: use the generic error number
Use the generic error number instead of meaningless value.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jaehoon Chung [Sun, 25 Sep 2016 23:10:01 +0000 (08:10 +0900)]
mmc: sdhci: use the host version value in sdhci_setup_cfg
"host->version" isn't a SoC specific value.
It doesn't need to get in each SoC drivers.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Jaehoon Chung [Fri, 23 Sep 2016 10:13:16 +0000 (19:13 +0900)]
mmc: dw_mmc: remove the unnecessary arguments for dwmci_setup_cfg
Some arguments don't need to pass to dwmci_setup_cfg.
They are already included in dwmci_host structure.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jaehoon Chung [Fri, 9 Sep 2016 09:23:23 +0000 (18:23 +0900)]
mmc: s5p_sdhci: support the Driver model for Exynos
This patch support the driver model for s5p_sdhci controller.
To support the legacy model, maintained the existing code.
Note: If use the Driver Model, it needs to modify the device-tree.
In future, will update the Device-tree and enable the configuratioin.
(CONFIG_BLK, CONFIG_DM_MMC and CONFING_DM_MMC_OPS)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 1 Oct 2016 20:43:17 +0000 (14:43 -0600)]
dm: mmc: Support erase
At present erase is not suported with CONFIG_DM_OPS. Add it so that MMC
devices can be erased.
Signed-off-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:31 +0000 (13:25 +0900)]
reset: uniphier: add reset controller driver for UniPhier SoCs
This is the initial commit for UniPhier reset controller driver.
Most code was ported from Linux.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:30 +0000 (13:25 +0900)]
reset: declare fdtdec_phandle_args as struct to fix warning
The of_xlate() callback needs to know fdtdec_phandle_args is struct.
Otherwise, the following warning is displayed.
include/reset-uclass.h:40:11: warning: 'struct fdtdec_phandle_args'
declared inside parameter list
struct fdtdec_phandle_args *args);
^
include/reset-uclass.h:40:11: warning: its scope is only this
definition or declaration, which is probably not what you want
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:29 +0000 (13:25 +0900)]
ARM: uniphier: insert udelay() just before support_card_reset_deassert()
As for LD11/LD20, we can no longer rely on the udelay() in the PLL
init functions. udelay(200) is needed here to keep the ethernet
device in the reset state for enough time. Anyway, 200 usec is
quite short for humans, so nobody cares it.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:28 +0000 (13:25 +0900)]
ARM: uniphier: define CONFIG_SMC911X along with CONFIG_MICRO_SUPPORT_CARD
This is an on-board Ethernet device. It has no point if the Micro
Support Card is not available.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:27 +0000 (13:25 +0900)]
ARM: uniphier: enable CONFIG_SYS_NO_FLASH if no CONFIG_MICRO_SUPPORT_CARD
NOR flash devices are seldom used on UniPhier platforms these days.
The only use case I see is the Micro Support Card is connected.
Otherwise, define CONFIG_SYS_NO_FLASH to disable NOR FLASH.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:26 +0000 (13:25 +0900)]
ARM: uniphier: fix typos in a comment block
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:25 +0000 (13:25 +0900)]
ARM: uniphier: add work-around for VBO noise problem
Raise the VDD09 voltage line to 1.0V to suppress VBO noise.
This errata work-around code is needed only for ES1.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:24 +0000 (13:25 +0900)]
ARM: uniphier: update DRAM init code for LD20 SoC (2nd)
- Do not reference CONFIG_DDR_FREQ; now the DDR frequency
is passed from the uniphier_board_data structure
- Constify parameter arrays
- Tidy up cluttered macros
- Lots of code cleanups
- Lots of coding style fixes
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Sat, 8 Oct 2016 04:25:23 +0000 (13:25 +0900)]
ARM: uniphier: enable SSC for DPLL (DRAM PLL) on LD11 SoC
For Electro-Magnetic Compatibility test.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Mon, 26 Sep 2016 04:13:16 +0000 (13:13 +0900)]
ARM: uniphier: do not setup pins for System Bus on NAND boot mode
For LD11 and LD20 SoCs, the System Bus and NAND are multiplexed
in the same I/O pins. When booting from a NAND device, pin-mux
for the System Bus must not be set-up because they are exclusive
with each other.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
York Sun [Tue, 4 Oct 2016 21:33:51 +0000 (14:33 -0700)]
tools: buildman: Add compiler wrapper
Now we can use compiler wrapper such as ccache or distcc for buildman.
Signed-off-by: York Sun <york.sun@nxp.com>
CC: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
York Sun [Tue, 4 Oct 2016 21:33:50 +0000 (14:33 -0700)]
tools: buildman: Remove duplicated code
Signed-off-by: York Sun <york.sun@nxp.com>
CC: Simon Glass <sjg@chromium.org>
Fixed commit subject:
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Paul Burton [Tue, 27 Sep 2016 15:03:58 +0000 (16:03 +0100)]
dtoc: Make integer division python 3.x safe
If we use the '/' operator then python 3.x will produce a float, and
refuse to multiply the string sequence in Conv_name_to_c by it with:
TypeError: can't multiply sequence by non-int of type 'float'
Use the '//' operator instead to enforce that we want integer rather
than floating point division.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Simon Glass <sjg@chromium.org>
Paul Burton [Tue, 27 Sep 2016 15:03:57 +0000 (16:03 +0100)]
dtoc: Decode strings for struct.unpack on python 3.x
On python 3.x struct.unpack will complain if we provide it with a
string since it expects to operate on a bytes object. In order to
satisfy this requirement, encode the string to a bytes object when
running on python 3.x.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Simon Glass <sjg@chromium.org>