Simon Glass [Wed, 15 Apr 2015 03:03:34 +0000 (21:03 -0600)]
tegra124: clock: Add display clocks and functions
Add functions to provide access to the display clocks on Tegra124 including
setting the clock rate for an EDP display.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:33 +0000 (21:03 -0600)]
tegra: clock: Split the clock source code into a separate function
Create a function which sets the source clock for a peripheral, given
the number of mux bits to adjust. This can then be used more generally.
For now, don't export it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:32 +0000 (21:03 -0600)]
tegra: clock: Add checking for invalid clock IDs
The get_pll() function can do the wrong thing if passed values that are
out of range. Add checks for this and add a function which can return
a 'simple' PLL. This can be defined by SoCs with their own clocks.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:31 +0000 (21:03 -0600)]
tegra: config: Use CONFIG_LCD to detect LCD presence
Instead of CONFIG_VIDEO_TEGRA, use CONFIG_LCD to determine whether an LCD
is present. Tegra124 uses a different driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:30 +0000 (21:03 -0600)]
tegra124: dts: Add host1x node to provide display information
This peripheral is required to get the LCD display running. Add it to
tegra124 and also bring in the binding file from Linux 3.18
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:29 +0000 (21:03 -0600)]
tegra: nyan-big: Add LCD PMIC init and board ID
Add required setup for the LCD display, and a function to provide the
board ID. This requires GPIOs to be available prior to relocation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:28 +0000 (21:03 -0600)]
tegra: Add support for setting up a as3722 PMIC
Add support for this PMIC which is used on some Tegra124 boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:27 +0000 (21:03 -0600)]
tegra: Provide a function to allow LCD PMIC setup
Some LCDs require a PMIC to be set up - add a function for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:26 +0000 (21:03 -0600)]
power: Export register access functions from as3722
With the full PMIC framework we may be able to avoid this. But for now
we need access to the PMIC.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:25 +0000 (21:03 -0600)]
tegra: Add a board ID function
Add a way of displaying a numeric board ID on start-up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:24 +0000 (21:03 -0600)]
tegra: Move checkboard() into the board code
This is only used by Nvidia boards, so move it into nvidia/common to
simplify things.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:23 +0000 (21:03 -0600)]
tegra: pwm: Allow the clock rate to be left as is
When enabling a PWM, allow the existing clock rate and source to stand
unchanged.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:22 +0000 (21:03 -0600)]
tegra: Move the pwm into tegra-common
This is needed for tegra124 also, so make it common and add a header file
for tegra124.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:21 +0000 (21:03 -0600)]
fdt: Add binding decode function for display-timings
This is useful for display parameters. Add a simple decode function to read
from this device tree node.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:20 +0000 (21:03 -0600)]
dm: gpio: Add error handling and a function to claim vector GPIOs
gpio_get_values_as_int() should return an error if something goes wrong.
Also provide gpio_claim_vector(), a function to request the GPIOs and set
them to input mode. Otherwise callers have to do this themselves.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Simon Glass [Wed, 15 Apr 2015 03:03:19 +0000 (21:03 -0600)]
dm: core: Sort the uclasses
Sort uclasses into alphabetical order and tidy up the comments.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Joe Hershberger [Tue, 12 May 2015 19:46:24 +0000 (14:46 -0500)]
Clean all defconfigs with savedefconfig
In order to reduce merge conflicts and to maintain the simplest possible
defconfig files, we should be using the savedefconfig feature of Kconfig
every time a new feature is added. This keeps the defconfig settings to
a minimum (only those things not default) and keeps them in the same
order as the Kconfig options.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
Joe Hershberger [Tue, 12 May 2015 19:46:23 +0000 (14:46 -0500)]
arch: Make board selection choices optional
By making the board selections optional, every defconfig will include
the board selection when running savedefconfig so if a new board is
added to the top of the list of choices the former top's defconfig will
still be correct.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 10 May 2015 20:01:48 +0000 (16:01 -0400)]
Revert "stm32f4: fix serial output"
As per the author, we don't need this patch really since the other patch
"stm32f4: fix serial output" superseded it.
This reverts commit
85e5f5b7a7f8d889271f94791606cde62d81d53f.
Signed-off-by: Tom Rini <trini@konsulko.com>
Joe Hershberger [Tue, 21 Apr 2015 22:02:42 +0000 (17:02 -0500)]
kconfig: Move REGEX to Kconfig
Having this as a Kconfig allows it to be a dependent feature.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Stefan Roese [Thu, 7 May 2015 11:00:23 +0000 (13:00 +0200)]
ppc4xx: Remove sc3 board
As this board seems to be unmaintained for quite some time, and its
not moved to the generic board ingrastructure, lets remove it.
This will also enable us to remove the CONFIG_AUTOBOOT_DELAY_STR2
and CONFIG_AUTOBOOT_STOP_STR2 macros, as this sc3 board is the
only one using one of this macros. A removal patch will follow
soon.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Juergen Beisert <jbeisert@eurodsn.de>
Acked-by: Heiko Schocher <hs@denx.de>
Vikas Manocha [Wed, 6 May 2015 18:46:29 +0000 (11:46 -0700)]
serial: fdt: add device tree support for pl01x
This patch adds device tree support for arm pl010/pl011 driver.
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Acked-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Tue, 5 May 2015 17:23:53 +0000 (12:23 -0500)]
Fix broken verify functionality in crc32 command
Introduced in change
d20a40de9db07de1f1f06a79a4da1cdda5379b75
"Roll crc32 into hash infrastructure"
The crc32 command with no -v expects an optional 3rd argument to be an
address to store the result in. With the -v switch, the last argument
is a crc, not an address. In the case where -v is set, we should set the
HASH_FLAG_ENV flag since that will first look for the value to be a
digest value, which matches the expected API for the crc32 command.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger [Tue, 5 May 2015 17:23:52 +0000 (12:23 -0500)]
Fix inconsistency of VERIFY defines in cmd_mem
Introduced in change
d20a40de9db07de1f1f06a79a4da1cdda5379b75
"Roll crc32 into hash infrastructure"
Use a consistent define to enable the verify feature in crc32 command.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Du Huanpeng [Mon, 4 May 2015 13:26:53 +0000 (06:26 -0700)]
Makefile: add a symbol link tags for ctags
Signed-off-by: Du Huanpeng <u74147@gmail.com>
Vikas Manocha [Sun, 3 May 2015 21:10:35 +0000 (14:10 -0700)]
stv0991: use fdt for serial port platform data
This patch ignores the serial port static platform data at compilation time
in case of device tree control.
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Vikas Manocha [Sun, 3 May 2015 21:10:34 +0000 (14:10 -0700)]
stv0991: fdt: add stv0991 device tree
This patch adds device tree for the ST Micro stv0991 board & enables
device tree control. Progressively device tree support for the drivers
being used will also be added.
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Arun Bharadwaj [Tue, 28 Apr 2015 23:55:30 +0000 (16:55 -0700)]
overo: Fix regression introduced in a6b541b
U-Boot has been broken on Overo boards since commit
a6b541b09022acb6f7c2754100ae26bd44eed1d9.
This is because the gd pointer is not set early enough anymore,
such that the i2c_set_bus_num in get_board_revision can safely
execute. This results in a console hang at SPL and the boot does
not proceed.
This piece of code is anyway necessary only for really old Overo
boards with revision numbers <= 2410 and not required for the newer
boards. For these older boards, u-boot v2014.10 still works fine.
Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
Arun Bharadwaj [Tue, 28 Apr 2015 23:55:29 +0000 (16:55 -0700)]
overo: Split overo.c into spl.c, common.c and overo.c
This separates the SPL-specific code from the u-boot-specific code for
the Overo board following the discussion at
http://lists.denx.de/pipermail/u-boot/2015-April/211622.html
The code is split up into spl.c, overo.c and common.c (which
has the code common to both)
Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
Ash Charles [Tue, 28 Apr 2015 23:17:54 +0000 (16:17 -0700)]
omap3: overo: Allow boot with kernel in UBI rootfs
If regular NAND booting fails to find a valid uImage in the
kernel partition in NAND, try to boot using a zImage and dtb found
in a UBI volume in the rootfs partition. This is the NAND analog
of mmc zImage booting for device-tree based kernels.
Signed-off-by: Ash Charles <ashcharles@gmail.com>
Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
Ash Charles [Tue, 28 Apr 2015 23:17:53 +0000 (16:17 -0700)]
omap3: overo: Use software BCH8 ECC for NAND
Overo COMs have NAND flash that requires 4-bit ECC or better except for
the first sector which can use 1-bit ECC. The boot ROM expects to load
a payload from NAND written using 1-bit hardware-based ECC. In short,
write SPL to NAND something like this (4 times for redundancy):
#> nandecc hw
#> nand write ${loadaddr} 0x0 ${filesize}
#> nand write ${loadaddr} 0x20000 ${filesize}
#> nand write ${loadaddr} 0x40000 ${filesize}
#> nand write ${loadaddr} 0x60000 ${filesize}
Then, switch back to software-based BCH8 for everything else:
#> nandecc sw bch8
After [1], enlarge the max size of the SPL so the BCH code can fit.
[1] https://www.mail-archive.com/u-boot@lists.denx.de/msg163912.html
Signed-off-by: Ash Charles <ashcharles@gmail.com>
Ash Charles [Tue, 28 Apr 2015 23:17:52 +0000 (16:17 -0700)]
overo: Add support for Palo35 expansion board
Signed-off-by: Ash Charles <ashcharles@gmail.com>
Arun Bharadwaj [Tue, 28 Apr 2015 23:17:51 +0000 (16:17 -0700)]
omap3: overo: Add DTS support for TobiDuo expansion
Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
Signed-off-by: Ash Charles <ashcharles@gmail.com>
Ash Charles [Tue, 28 Apr 2015 23:17:50 +0000 (16:17 -0700)]
omap3: overo: Set the Arbor43C 'expansionname'
The Gumstix Arbor43C expansion board [1] uses a customized device tree
file. When this expansion board is detected, load this file.
[1] https://store.gumstix.com/index.php/products/635/
Signed-off-by: Ash Charles <ashcharles@gmail.com>
Peter Howard [Tue, 28 Apr 2015 23:05:57 +0000 (09:05 +1000)]
davinci: restore CONFIG_SPL=y to configs/omapl138_lcdk_defconfig
Signed-off-by: Peter Howard <phoward@gme.net.au>
maxin.john@enea.com [Mon, 27 Apr 2015 23:44:58 +0000 (01:44 +0200)]
cmd_part: fix usage text
Fix the usage info from:
part part uuid <interface> <dev>:<part>
to
part uuid <interface> <dev>:<part>
Signed-off-by: Maxin B. John <maxin.john@enea.com>
Reviewed-By: Sjoerd Simons <sjoerd.simons@collabora.co.uk
kunhuahuang [Mon, 27 Apr 2015 19:01:19 +0000 (03:01 +0800)]
stm32f4: add serial print port
Add the stm32F4 board's serial ports support.
User can use it easily.
The user only need to edit the number of the usart.
The patch also fix the serial print out.
Last, this version of patch fix the first patch checkpatch.pl error.
Thanks to Kamil Lulko.
Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
kunhuahuang [Mon, 27 Apr 2015 18:25:45 +0000 (02:25 +0800)]
stm32f4: fix serial output
This patch fix the serial output.
The source is from Kamil Lulko's "stm32f429-discovery board support"
Thanks, Varcain. I learned a lot.
Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
Paul Kocialkowski [Mon, 27 Apr 2015 08:20:23 +0000 (10:20 +0200)]
spl: spl_mmc: Partition raw boot mode for eMMC
This adds support for providing a partition number instead of a sector for eMMC.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Paul Kocialkowski [Mon, 27 Apr 2015 08:20:22 +0000 (10:20 +0200)]
spl: spl_mmc: Clearer structure in spl_mmc_load_image and cosmetics
This refactors spl_mmc_load_image to use a switch/case structure and easier
to understand spl_start_uboot checks. This also introduces some more automatic
fallback on the next mmc boot mode as long as it keeps failing.
Lines that go beyond 80 chars are also reduced by reducing the number of tabs.
Debug and error strings are refctored to match a common style.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
[trini: Fix a thinko in the SPL_EXT_SUPPORT + SPL_OS conversion, make part be
__maybe_unused]
Signed-off-by: Tom Rini <trini@konsulko.com>
Axel Lin [Sun, 26 Apr 2015 02:32:36 +0000 (10:32 +0800)]
gpio: stm32_gpio: Use clrsetbits_le32() at appropriate places
Use clrsetbits_le32() to replace clrbits_le32() + setbits_le32().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Hannes Petermaier [Fri, 24 Apr 2015 12:49:39 +0000 (14:49 +0200)]
board/BuR/common: rename "usbupdate" environment to "usbscript"
usbupdate in real does allways load some script from usb-storage and execute
it, on all B&R targets.
So we do following 2 things:
- rename it to what it really does
- move it from boards to common environment
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Hannes Petermaier [Fri, 24 Apr 2015 12:49:38 +0000 (14:49 +0200)]
board/BuR/common: remove BMP_DISPLAY from tseries board
Since we display in future the splash screen out of linux-os, we don't need
this support anymore within the common section.
But kwb-target is still using BMP_DISPLAY feature, so we move the related
from the common section into the target-specific.
Also the default environment of tseries will be adapted to this.
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Hannes Petermaier [Fri, 24 Apr 2015 12:49:37 +0000 (14:49 +0200)]
board/BuR/tseries: Add simplefb support
Since the used AM3352 SoC doesn't have GPU it isn't allways necessary to build
in complete drm-stuff into linux kernel. In very small applications only we use
the simple-framebuffer.
So we have 2 use-cases:
- device operating on drm-driver (let simplefb node disabled)
- device operating on simplefb-driver (activate simplefb node and reserve mem)
The decision is made by means of "simplefb" environment variable.
simplefb = 0
we don't enable the (maybe) existing simplefb node and all the rest around
display is up to the linux-kernel. We just disable the backlight, beceause we
do not want see the flicker during take over of drm-driver.
simplefb = 1
we enable the (maybe) existing simplefb node and reserve framebuffers size
in memory.
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Hannes Petermaier [Fri, 24 Apr 2015 12:49:36 +0000 (14:49 +0200)]
board/BuR/tseries: remove unnary CONFIG_LCD_NOSTDOUT
the CONFIG_LCD_NOSTDOUT feature never had become mainline in uboot due to the
fact that the problem of "not writing out whole console to lcd" can be solved
with another way.
So we remove this unnary define.
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Hannes Petermaier [Fri, 24 Apr 2015 12:49:35 +0000 (14:49 +0200)]
board/BuR/tseries: take usage of CONFIG_LCD_ROTATION
We take use of the new LCD_ROTATION feature.
The information about how the display is rotated is taken from B&R specific
(/factory-settings/rotation) information in the devicetree.
The information there is stored as string (cw, ud, ccw, none) since starting
support of this devices and cannot be changed, so we have to convert it into
none = 0
cw = 1
ud = 2
ccw = 3
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Maxime Ripard [Fri, 24 Apr 2015 10:53:12 +0000 (12:53 +0200)]
image: android: handle default kernel address
The two tools that create android boot images, mkbootimg and the fastboot
client, set the kernel address by default to 0x10008000.
U-boot always honors this field, and will try to relocate the kernel to
whatever value is set in the header, which won't be mapped to the actual RAM on
most platforms, resulting in the kernel obviously not booting.
All the targets in U-Boot right now will download the android boot image to
CONFIG_SYS_LOAD_ADDR, which means that it will already have been downloaded to
some location that is suitable for execution.
In order to have the kernel booting even with the default boot image kernel
address, if that address is used, just execute the kernel where it is.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Pavel Machek [Thu, 23 Apr 2015 07:10:36 +0000 (09:10 +0200)]
Remove non-working address from MAINTAINER
I checked with Detlev, and sadly removing that maintainers entry is
right thing to do.
Signed-off-by: Pavel Machek <pavel@denx.de>
Jörg Krause [Wed, 22 Apr 2015 19:36:22 +0000 (21:36 +0200)]
Fix musl build
This patch fixes cross-compiling U-Boot tools with the musl C library:
* including <sys/types.h> is needed for ulong
* defining _GNU_SOURCE is needed for loff_t
Tested for target at91sam9261ek_dataflash_cs3.
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Tom Rini <trini@konsulko.com>
Stefan Roese [Thu, 12 Mar 2015 10:22:46 +0000 (11:22 +0100)]
misc: led: Add PCA9551 LED driver
This patch adds a driver for the PCA9551 LED controller.
Originated-by: Timo Herbrecher <t.herbrecher@gateware.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Cc: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Sat, 25 Apr 2015 21:53:10 +0000 (18:53 -0300)]
README: fix typo in 'currently'
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Cooper Jr., Franklin [Tue, 21 Apr 2015 12:51:04 +0000 (07:51 -0500)]
ti: am335x/am437x/omap5 devices: Unify network environment variables
Across several devices network environment variables are duplicated.
Move these variables to a common include file which insures the environment
variables are reused and insures devices across product lines share the same
values.
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 8 May 2015 14:46:59 +0000 (10:46 -0400)]
Merge git://git.denx.de/u-boot-dm
Dinh Nguyen [Thu, 7 May 2015 22:37:12 +0000 (17:37 -0500)]
git-mailrc: add Dinh Nguyen as a contact for SoCFPGA
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Masahiro Yamada [Tue, 21 Apr 2015 03:08:32 +0000 (12:08 +0900)]
git-mailrc: add Marek as SOCFPGA maintainer
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Tue, 21 Apr 2015 11:38:23 +0000 (20:38 +0900)]
ARM: socfpga: abolish CONFIG_SOCFPGA
Replace CONFIG_SOCFPGA with CONFIG_ARCH_SOCFPGA.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Tue, 21 Apr 2015 11:38:22 +0000 (20:38 +0900)]
ARM: socfpga: move SoC headers to mach-socfpga/include/mach
Move headers to mach-socfpga as well.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Tue, 21 Apr 2015 11:38:21 +0000 (20:38 +0900)]
ARM: socfpga: move SoC sources to mach-socfpga
Our recent trend is to collect SoC files into arch/arm/mach-(SOC).
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Tue, 21 Apr 2015 11:38:20 +0000 (20:38 +0900)]
ARM: socfpga: move board select into mach-socfpga/Kconfig
Switch to a more standard way of board select; put the SoC select
into arch/arm/Kconfig and move the board select menu under
arch/arm/mach-socfpga/Kconfig.
Also, consolidate SYS_BOARD, SYS_VENDOR, SYS_SOC, SYS_CONFIG_NAME.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Tue, 21 Apr 2015 11:38:19 +0000 (20:38 +0900)]
ARM: socfpga: remove redundant config.mk
Because all the SOCFPGA boards define CONFIG_SPL_FRAMEWORK
(see include/configs/socfpga_common.h), u-boot.img is automatically
added to the target image list by the top Makefile.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Tue, 21 Apr 2015 11:38:18 +0000 (20:38 +0900)]
ARM: socfpga: do not add board directory to header search path
The compiler option "-Iboard/$(VENDOR)/$(BOARD)" just exists here
for iocsr_config.c to be able to include iocsr_config.h.
Use "..." instead of <...> to include a header in the same directory.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Haikun.Wang@freescale.com [Wed, 6 May 2015 02:37:43 +0000 (10:37 +0800)]
dm: sf: Update default name of spi flash in structure udevice
Default name of spi flash like this "0:0", update it to "spi_flash@0:0".
Signed-off-by: Haikun Wang <haikun.wang@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 25 Mar 2015 18:23:07 +0000 (12:23 -0600)]
dm: usb: exynos: Drop legacy USB code
Drop the code that doesn't use driver model for USB.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 2 May 2015 15:25:03 +0000 (09:25 -0600)]
sandbox: Enable time unit test command
Enable this command for sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 2 May 2015 15:25:02 +0000 (09:25 -0600)]
test: Add a simple time test
Sometimes the time functions are incorrect due to bad time support on a
board. Add a unit test which tries to detect this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Sjoerd Simons [Thu, 30 Apr 2015 20:16:09 +0000 (22:16 +0200)]
sandbox: Don't try distro_bootcmd by default
For the distro_bootcmds to succeed on the sandbox a bit of setup is
required (e.g. network configured or host image bound), so running them
by default isn't that useful.
Add a -b/--boot command to the sandbox binary, which triggers the
distro_bootcmds to run after the other command-line commands.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
Hans de Goede [Tue, 5 May 2015 21:56:14 +0000 (23:56 +0200)]
usb: ohci: Don't log an error on interrupt packet timeout
Interrupts transfers timing out is normal, so do not log an error for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:13 +0000 (23:56 +0200)]
usb: ohci: Add proper cache flushing / invalidating for non cache coherent cpus
Add proper cache flushing / invalidating for non cache coherent cpus, for now
only enable this for new (driver-model) usb code to avoid regressions.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:12 +0000 (23:56 +0200)]
usb: ohci: Fix ctrl in messages with a data-len of 0
Fix taken from the Linux kernel ohci driver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:11 +0000 (23:56 +0200)]
usb: ohci: Move static func and var declarations from ohci.h to ohci-hcd.c
Non static function and variable declarations do not belong in a .h file.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:10 +0000 (23:56 +0200)]
usb: ohci: Remove unnecessary phcca variable
This is a preparation patch for adding driver-model support.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:09 +0000 (23:56 +0200)]
usb: ohci: Move the td array struct to inside the ohci_dev struct
This is a preparation patch for adding driver-model support.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:08 +0000 (23:56 +0200)]
usb: ohci: Move the ohci_dev struct to inside the main ohci struct
This is a preparation patch for adding driver-model support.
Note we do keep ohci_dev as a separate struct so that we can later add
support for interrupt-queues which requires allocating a separate ohci_dev
per interrupt-queue.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:07 +0000 (23:56 +0200)]
usb: ohci: Pass around a pointer to ohci_t rather then accessing global vars
This is a preparation patch for adding driver-model support.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:06 +0000 (23:56 +0200)]
usb: ohci: Remove unused devgone global variable
devgone is never assigned a value, so the one comparisson reading it will
never be true, and devgone can be completely removed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 21:56:04 +0000 (23:56 +0200)]
usb: Fix maxpacketsize for first descriptor read for low-speed usb devs
This fixes descriptor reading of lowspeed devices through ohci not working.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Hans de Goede [Tue, 5 May 2015 09:54:35 +0000 (11:54 +0200)]
dm: usb: Set desc_before_addr from ehci dm code
Without this usb-1 device descriptors do not get read properly.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Hans de Goede [Tue, 5 May 2015 09:54:34 +0000 (11:54 +0200)]
dm: usb: Fix finding of first upstream usb-2 hub in the ehci dm code
The ehci driver model code for finding the first upstream usb-2 hub before
this commit has a number of issues:
1) "if (!ttdev->speed != USB_SPEED_HIGH)" does not work because the '!'
takes presedence over the '!=' this should simply be
"if (ttdev->speed == USB_SPEED_HIGH)"
2) It makes ttdev point to the first upstream usb-2 hub, but ttdev should
point to the last usb-1 device before the first usb-2 hub (when going
upstream from the device), as ttdev is used to find the port of the
first usb-2 hub to which the the last usb-1 device is connected.
3) parent_devnum however should be set to the devnum of the first usb-2
hub, so we need to keep pointers around to both usb_device structs.
To complicate things further during enumeration usb_device.dev will point
to the parent udevice, where as during normal use it will point to
the actual udevice, we must handle both cases correctly.
This commit fixes all this making usb-1 devices attached to usb-2 hubs,
including usb-1 devices attached to usb-1 hubs attached to usb-2 hubs, work.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Hans de Goede [Tue, 5 May 2015 09:54:33 +0000 (11:54 +0200)]
dm: usb: Use usb_get_bus in dm ehci code
Use usb_get_bus in dm ehci code rather then re-implementing it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Hans de Goede [Tue, 5 May 2015 09:54:32 +0000 (11:54 +0200)]
dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device
Currently we copy over a number of usb_device values stored in the on stack
struct usb_device probed in usb_scan_device() to the final driver-model managed
struct usb_device in usb_child_pre_probe() through usb_device_platdata, and
then call usb_select_config() to fill in the rest.
There are 3 problems with this approach:
1) It does not fill in enough fields before calling usb_select_config(),
specifically it does not fill in ep0's maxpacketsize causing a div by zero
exception in the ehci driver.
2) It unnecessarily redoes a number of usb requests making usb probing slower
3) Calling usb_select_config() a second time fails on some usb-1 devices
plugged into usb-2 hubs, causing u-boot to not recognize these devices.
This commit fixes these issues by removing (*) the usb_select_config() call
from usb_child_pre_probe(), and instead of copying over things field by field
through usb_device_platdata, store a pointer to the in stack usb_device
(which is still valid when usb_child_pre_probe() gets called) and copy
over the entire struct.
*) Except for devices which are explictly instantiated through device-tree
rather then discovered through usb_scan_device() such as emulated usb devices
in the sandbox.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Hans de Goede [Tue, 5 May 2015 09:54:31 +0000 (11:54 +0200)]
dm: usb: Make usb_get_bus easier to use for callers
Make usb_get_bus easier to use for callers, by directly returning the bus
rather then returning it via a pass-by-ref argument.
This also removes the error checking from the current callers, as
we already have an assert() for bus not being NULL in usb_get_bus().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Hans de Goede [Mon, 4 May 2015 19:33:26 +0000 (21:33 +0200)]
dm: usb: Do not use bus->seq before device_probe(bus)
Do not use bus->seq before device_probe(bus), as bus->seq is not set until
after the device_probe() call. This fixes u-boot printing: "USB-1: " for
each bus it scans.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Axel Lin [Sun, 26 Apr 2015 03:05:38 +0000 (11:05 +0800)]
dm: i2c-gpio: Remove redundant dm_gpio_set_value() call
dm_gpio_set_dir_flags() will also set gpio output value when switching to
gpio output. So it's not necessary to call dm_gpio_set_value() after
dm_gpio_set_dir_flags() call.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:31 +0000 (12:37 -0600)]
dm: rtc: Add tests for real-time clocks
Add some simple tests to verify that the RTC uclass works correctly in
U-Boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:30 +0000 (12:37 -0600)]
dm: test: dts: Sort the aliases in the test device tree file
Sort these aliases to avoid confusion as to what is present.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Simon Glass [Mon, 20 Apr 2015 18:37:29 +0000 (12:37 -0600)]
dm: rtc: sandbox: Enable real-time clock support
Enable real-time-clock support in sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:28 +0000 (12:37 -0600)]
dm: sandbox: dts: Add a real-time clock attached to I2C
Add an emulated RTC device for sandbox, so that the 'date' command can be
used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:27 +0000 (12:37 -0600)]
dm: net: rtc: Support using driver model for rtc in sntp
When setting the date, support driver model RTC also.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Simon Glass [Mon, 20 Apr 2015 18:37:26 +0000 (12:37 -0600)]
dm: rtc: Convert 'date' command to support driver model
Adjust this command so that it supports using driver model for I2C, i.e.
CONFIG_DM_I2C. This will permit it to be used in sandbox also.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:25 +0000 (12:37 -0600)]
dm: rtc: sandbox: Add a driver for the sandbox I2C RTC
Add a driver which communicates with the sandbox I2C emulation RTC device
and permits it to be used in U-Boot. This driver is very simple - it just
reads and writes selected I2C registers in the device.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:24 +0000 (12:37 -0600)]
dm: rtc: sandbox: Add an emulated I2C RTC device
Add a sandbox I2C emulation device which emulates a real-time clock. The
clock works off an offset from the current system time, and supports setting
and getting the clock, as well as access to byte-width regisers in the RTC.
It does not support changing the system time.
This device can be used for testing the 'date' command on sandbox, as well
as the RTC uclass.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:23 +0000 (12:37 -0600)]
dm: rtc: Add a uclass for real-time clocks
Add a uclass for real-time clocks which support getting the current time,
setting it and resetting the chip to a known-working state. Some RTCs have
additional registers which can be used to store settings, so also provide
an interface to these.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:22 +0000 (12:37 -0600)]
dm: sandbox: Add os_localtime() to obtain the system time
Add a function to read the system time into U-Boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:21 +0000 (12:37 -0600)]
dm: rtc: Split structure definition into its own file
Move the definition of struct rtc_time into a separate file so that sandbox
can include it without requiring common.h and the like.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:20 +0000 (12:37 -0600)]
dm: Remove unnecessary types in bcd.h
We don't need to use u8, and if we avoid it, it isn't so much of a problem
that rtc.h includes this header. With this change we can include rtc.h from
sandbox files.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:19 +0000 (12:37 -0600)]
dm: rtc: Rename mktime() and reduce the number of parameters
Most callers unpack the structure and pass each member. It seems better to
pass the whole structure instead, as with the C library. Also add an rtc_
prefix.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Simon Glass [Mon, 20 Apr 2015 18:37:18 +0000 (12:37 -0600)]
dm: rtc: Rename to_tm() to rtc_to_tm() and add error code
Rename this function so that it is clear that it is provided by the RTC.
Also return an error when it cannot function as expected. This is unlikely
to occur since it works for dates since 1752 and many RTCs do not support
such old dates. Still it is better to be accurate.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Simon Glass [Mon, 20 Apr 2015 18:37:17 +0000 (12:37 -0600)]
dm: rtc: Rename gregorian day function
Change this function name to something more descriptive. Also return a
failure code if it cannot calculate a correct value.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Simon Glass [Mon, 20 Apr 2015 18:37:16 +0000 (12:37 -0600)]
fdt: Correct warning in fdt_setup_simplefb_node()
Adjust the printf() string to avoid a warning on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 20 Apr 2015 18:37:15 +0000 (12:37 -0600)]
dm: i2c: Add an explicit test mode to the sandbox I2C driver
At present this driver has a few test features. They are needed for running
the driver model unit tests but are confusing and unnecessary if using
sandbox at the command line. Add a flag to enable the test mode, and don't
enable it by default.
Signed-off-by: Simon Glass <sjg@chromium.org>