Commit Graph

8486 Commits

Author SHA1 Message Date
Simon Glass
27a1961d0b rockchip: jerry: Enable the Chrome OS EC
Turn on the EC and enable the keyboard.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:36 -07:00
Simon Glass
5ddf5d7705 rockchip: clk: Make rkclk_get_clk() SoC-specific
The current method assumes that clocks are numbered from 0 and we can
determine a clock by its number. It is safer to use an ID in the clock's
platform data to avoid the situation where another clock is bound before
the one we expect.

Move the existing code into rk3036 since it still works there. Add a new
implementation for rk3288.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:35 -07:00
Simon Glass
a49dc0a914 rockchip: reset: Use the rk_clr/setreg() interface
Use this function in preference to the macro.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:35 -07:00
Simon Glass
0906995bf3 rockchip: sdram: Use the rk_clr/setreg() interface
Use this function in preference to the macro.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:35 -07:00
Simon Glass
64b7faa7f9 rockchip: clock: Add a function to find a clock by ID
The current approach of using uclass_get_device() is error-prone. Another
clock (for example a fixed-clock) may cause it to break. Add a function that
does a proper search.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:34 -07:00
Simon Glass
f4adc9a504 rockchip: jerry: Disable pmic-int-1 setup to avoid a hang
This hangs when activated (by probing the PMIC). Disable it for now until we
understand the root cause.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:34 -07:00
Simon Glass
79d020ee74 rockchip: Use pwrseq for MMC start-up on jerry
This is defined in the device tree in Linux. Copy over the settings so that
this can be used instead of hard-coding the reset line.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:34 -07:00
Simon Glass
a4275f5e52 rockchip: Convert the PMU IOMUX registers into an array
This is easier to deal with when using generic code since it allows us to
use a register index instead of naming each register.

Adjust it, adding an enum to improve readability.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:34 -07:00
Simon Glass
1e724f8ea8 rockchip: Avoid using MMC code when not booting from MMC
This saves some code space in SPL which is useful on jerry.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:34 -07:00
Jeffy Chen
f7ee071a22 ARM: bootm: Try to use relocated ramdisk
After boot_ramdisk_high(), ramdisk would be relocated to
initrd_start & initrd_end, so use them instead of rd_start & rd_end.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-21 20:03:59 -07:00
Tom Rini
6905f4d3c7 Merge git://git.denx.de/u-boot-dm 2016-01-21 11:49:49 -05:00
Tom Rini
45fe3809b9 Merge branch 'master' of git://git.denx.de/u-boot-i2c; branch 'master' of git://git.denx.de/u-boot-nds32 2016-01-21 09:12:22 -05:00
Jelle van der Waa
9d0826879e sunxi: Add support for the I2C controller which is part of the PRCM
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
[hdegoede@redhat.com: Minor cleanups]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

applied with fixing 2 checkpatch warnings:
WARNING: please, no space before tabs

Signed-off-by: Heiko Schocher <hs@denx.de>
2016-01-21 07:30:01 +01:00
rick
b19cc6bf21 nds32: Fix compile error.
Fix compile error with gcc 4.9.3

Signed-off-by: rick <rick@andestech.com>
Cc: Andes <uboot@andestech.com>
2016-01-21 10:41:43 +08:00
Simon Glass
3c97c4fb52 dm: video: test: Add tests for the video uclass
Add tests that check that the video console is working correcty. Also check
that text output produces the expected result. Test coverage includes
character output, wrapping and scrolling.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
2016-01-20 19:10:16 -07:00
Simon Glass
3ade5bc4dc dm: video: sandbox: Convert sandbox to use driver model for video
Now that driver model support is available, convert sandbox over to use it.
We can remove a few of the special hooks that sandbox currently has.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
2016-01-20 19:10:16 -07:00
Bin Meng
665ac00c98 arm: ls1021atwr: Enable driver model lpuart serial driver
Convert ls1021atwr_nor_lpuart to driver model support. As a start,
enable lpuart serial port driver.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alison Wang <alison.wang@nxp.com>
Tested-by: Alison Wang <alison.wang@nxp.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-01-20 19:10:15 -07:00
Bin Meng
8b67761437 arm: ls1021atwr: Split off board device tree
Move /chosen node out of the board device tree.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-01-20 19:10:14 -07:00
Bin Meng
f833cd6279 arm: ls1021atwr: Convert to driver model and enable serial support
Convert ls1021atwr_nor to driver model support. As a start, enable
ns16550 serial port driver.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-01-20 19:10:14 -07:00
Mugunthan V N
87a2127f9f arm: dts: dra7-evm: add tick-timer to chosen node
Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-20 19:06:22 -07:00
Mugunthan V N
6c3401ad86 arm: dts: dra72-evm: add tick-timer to chosen node
Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-20 19:06:22 -07:00
Mugunthan V N
d3e25aed73 arm: dts: am335x-evm: add tick-timer to chosen node
Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-20 19:06:22 -07:00
Mugunthan V N
c7bd870462 arm: dts: am335x-boneblack: add tick-timer to chosen node
Specify which timer to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-20 19:06:21 -07:00
Mugunthan V N
ff9e612651 arm: dts: am437x-gp-evm: add tick-timer to chosen node
Specify which timer to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-20 19:06:21 -07:00
Mugunthan V N
34afc6148a arm: dts: am437x-sk-evm: add tick-timer to chosen node
Specify which timer to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-20 19:06:21 -07:00
Mugunthan V N
28a6c01187 arm: omap-common: do not build timer when CONFIG_TIMER defined
To prepare timer driver to DM/DT conversion do not build the
exiting timer driver when CONFIG_TIMER is defined. But since
omap's SPL doesn't support DM yet so built timer driver only for
SPL build when CONFIG_TIMER is defined.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-20 19:06:21 -07:00
Vikas Manocha
0a61ee880c stm32: move stm32 specific code to mach-stm32
This patch moves stm32 sources at one place, with this armv7m now contains
only generic stuff.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2016-01-20 10:19:41 -05:00
Ladislav Michl
bfb7cc3340 armv7: Add missing newline after OMAP die ID
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
2016-01-20 10:19:38 -05:00
Masahiro Yamada
61a4392a36 m68k: M54418TWR: drop board/freescale/m54418twr/config.mk
The board/freescale/m54418twr/config.mk defined TEXT_BASE, which has
the same value as CONFIG_SYS_TEXT_BASE.  The TEXT_BASE is referenced
by two files:
 - arch/m68k/cpu/mcf5445x/start.S and include/
 - include/configs/M54418TWR.h

Replace the references with CONFIG_SYS_TEXT_BASE and delete
board/freescale/m54418twr/config.mk.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Angelo Dureghello <angelo at sysam.it>
2016-01-20 10:19:34 -05:00
Heiko Schocher
1d48ca69e5 arm, ubifs: fix gcc5.x compiler warning
compiling U-Boot for openrd_base_defconfig with
gcc 5.x shows the following warning:

  CC      fs/ubifs/super.o
In file included from fs/ubifs/ubifs.h:35:0,
                 from fs/ubifs/super.c:37:
fs/ubifs/super.c: In function 'atomic_inc':
./arch/arm/include/asm/atomic.h:55:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
fs/ubifs/super.c: In function 'atomic_dec':
./arch/arm/include/asm/atomic.h:64:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
  CC      fs/ubifs/sb.o
[...]
  CC      fs/ubifs/lpt.o
In file included from include/linux/bitops.h:123:0,
                 from include/common.h:20,
                 from include/ubi_uboot.h:17,
                 from fs/ubifs/ubifs.h:37,
                 from fs/ubifs/lpt.c:35:
fs/ubifs/lpt.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
  CC      fs/ubifs/lpt_commit.o
In file included from include/linux/bitops.h:123:0,
                 from include/common.h:20,
                 from include/ubi_uboot.h:17,
                 from fs/ubifs/ubifs.h:37,
                 from fs/ubifs/lpt_commit.c:26:
fs/ubifs/lpt_commit.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
  CC      fs/ubifs/scan.o
  CC      fs/ubifs/lprops.o
  CC      fs/ubifs/tnc.o
In file included from include/linux/bitops.h:123:0,
                 from include/common.h:20,
                 from include/ubi_uboot.h:17,
                 from fs/ubifs/ubifs.h:37,
                 from fs/ubifs/tnc.c:30:
fs/ubifs/tnc.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
  CC      fs/ubifs/tnc_misc.o

Fix it.

Signed-off-by: Heiko Schocher <hs@denx.de>
2016-01-20 10:03:58 -05:00
Masahiro Yamada
048c61d674 ARM: uniphier: remove unneeded if conditionals
The if block does the same as the else block does.  The conditional
is not necessary at all.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-20 08:40:33 +09:00
Masahiro Yamada
faefef9994 ARM: uniphier: move UMC register macros to umc-regs.h
The umc-proxstream2.c defiens the same macros as in umc-regs.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-20 08:40:22 +09:00
Masahiro Yamada
d649fb8aef ARM: uniphier: set active ways to really enable outer cache
Each way must be unlocked to make it effective.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-20 08:40:11 +09:00
Masahiro Yamada
6d95778283 ARM: uniphier: fix range invalidate for outer cache
If invalidate operation is invoked against a cache-unaliged region,
the both ends of the region should be flushed, not invalidated.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-20 08:40:02 +09:00
Masahiro Yamada
5407735935 ARM: uniphier: factor out outer cache sync as a helper function
Avoid repeating the same code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-20 08:39:52 +09:00
Masahiro Yamada
cefca48ca7 ARM: uniphier: refactor outer cache operation slightly
Improve readability without changing the behavior.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-20 08:39:42 +09:00
Sergey Temerkhanov
746f985add armv8: cavium: Add ThunderX 88xx board definition
This commit adds basic Cavium ThunderX 88xx board definitions and support.

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
[trini: Drop CONFIG_SYS_GENERIC_BOARD define]
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-01-19 22:25:56 +00:00
Sergey Temerkhanov
1674bd1a77 armv8: cavium: Add the device tree for ThunderX
This commit adds the FDT for the ThunderX family of SoCs

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>

Reviewed-by: Simon Glass <sjg@chromium.org>
2016-01-19 22:25:37 +00:00
Sergey Temerkhanov
a5b9fa30ce armv8: Add Secure Monitor/Hypervisor Call (SMC/HVC) infrastructure
This commit adds functions issuing calls to secure monitor or
hypervisore. This allows using services such as Power State
Coordination Interface (PSCI) provided by firmware, e.g. ARM
Trusted Firmware (ATF)

The SMC call can destroy all registers declared temporary by the
calling conventions. The clobber list is "x0..x17" because of
this

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
2016-01-19 22:25:36 +00:00
Sergey Temerkhanov
94f7ff36e5 armv8: New MMU setup code allowing to use 48+ bits PA/VA
This patch adds code which sets up 2-level page tables on ARM64 thus
extending available VA space. CPUs implementing 64k translation
granule are able to use direct PA-VA mapping of the whole 48 bit
address space.
It also adds the ability to reset the SCTRL register at the very beginning
of execution to avoid interference from stale mappings set up by early
firmware/loaders/etc.

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
2016-01-19 22:25:36 +00:00
Sergey Temerkhanov
ba5648cd91 armv8: Add read_mpidr() function
This patch adds the read_mpidr() function which returns the
MPIDR_EL1 register value

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>

Reviewed-by: Simon Glass <sjg@chromium.org>
2016-01-19 22:25:35 +00:00
Bin Meng
6071cd62d5 x86: quark: Fix boot breakage
With driver model timer conversion, quark based board does not boot
any more as mdelay() is called during quark_pcie_early_init() which
is before driver model gets initialized. Fix this breakage.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-01-19 08:32:23 -05:00
Tom Rini
5b8031ccb4 Add more SPDX-License-Identifier tags
In a number of places we had wordings of the GPL (or LGPL in a few
cases) license text that were split in such a way that it wasn't caught
previously.  Convert all of these to the correct SPDX-License-Identifier
tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
2016-01-19 08:31:21 -05:00
Tom Rini
b57843e688 Merge branch 'master' of git://git.denx.de/u-boot-mips 2016-01-16 21:45:31 -05:00
Daniel Schwierzeck
0e0efb40b8 MIPS: implement bit manipulating I/O accessors
Add support for functions clrbits_X(), setbits_X() and clrsetbits_X()
on MIPS.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2016-01-16 21:06:46 +01:00
Daniel Schwierzeck
898582bdee MIPS: fix SPDX license identifier in remaining arch header files
Add a SPDX license identifier to MIPS header files where it is
still missing.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2016-01-16 21:06:46 +01:00
Daniel Schwierzeck
a3ab2ae7f6 MIPS: sync processor and register definitions with linux-4.4
Update definitions for processor, registers as well as assemby
macros.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2016-01-16 21:06:46 +01:00
Daniel Schwierzeck
23ff8633fd MIPS: sync I/O related header files with linux-4.4
Mainly sync asm/io.h to get a working ioremap() implementation
as well as the full set of I/O accessors. Pull in additional
header files to make this work.

Furthermore port over the directory 'arch/mips/include/asm/mach-generic/'
with contains default definitions for I/O and memory spaces and default
implementations for mapping those spaces. All files in that directory
can be overwritten by a SoC/machine.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2016-01-16 21:06:46 +01:00
Daniel Schwierzeck
f53830e74e MIPS: kconfig: add option for MIPS_L1_CACHE_SHIFT
Add Kconfig symbol for L1 cache shift like the kernel does.
The value of CONFIG_SYS_CACHELINE_SIZE is not a reliable source
for ARCH_DMA_MINALIGN anymore, because it is optional on MIPS.
If CONFIG_SYS_CACHELINE_SIZE is not defined by a board, the
cache sizes are automatically detected and ARCH_DMA_MINALIGN
would be set to 128 Bytes.

The default value for CONFIG_MIPS_L1_CACHE_SHIFT is 5 which
corresponds to 32 Bytes. All current MIPS boards already used
that value. While on it, fix the Malta board to use a value of 6
like the kernel port does.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2016-01-16 21:06:46 +01:00
Daniel Schwierzeck
0315a28909 MIPS: Kconfig: optimize gcc -march and -mtune setup
Move setup of -march to arch/mips/Makefile and follow the design on ARM.
Also add a possibility to chose specific CPU tune options.

Signed-off-by: Wills Wang <wills.wang@live.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2016-01-16 21:06:46 +01:00