]> git.karo-electronics.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
10 years agoMakefile: use u-boot.map for binary_size_check
Chris Packham [Thu, 24 Jul 2014 05:27:07 +0000 (17:27 +1200)]
Makefile: use u-boot.map for binary_size_check

u-boot.map is generated automatically by the compiler and more
importantly can handle addresses >4GB.

10 years agoMakefile: use $(shell ...) for determining file_size
Chris Packham [Thu, 24 Jul 2014 00:44:25 +0000 (12:44 +1200)]
Makefile: use $(shell ...) for determining file_size

file_size was being calculated using back-ticks but map_size uses
$(shell ...). Update the file_size calculation to use $(shell ...).

From: Jeroen Hofstee <jeroen@myspectrum.nl>

The binary_size_check target relies on stat -c %s
to return the size of u-boot.bin. This only works
with GNU stat though. Use wc instead.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agopxe: clear Bootfile before returning
Stephen Warren [Wed, 23 Jul 2014 00:06:46 +0000 (18:06 -0600)]
pxe: clear Bootfile before returning

When "pxe boot" downloads the initrd/kernel/DTB, netboot_common() saves
the downloaded filename to global variable BootFile. If the boot
operation is aborted, this global state is not cleared. If "dhcp" is
executed later without any arguments, BootFile is not cleared, and when
the DHCP response is received, BootpCopyNetParams() writes the value into
environment variable bootfile.

This causes the following scenario:

* Boot script executes dhcp; pxe get; pxe boot

* User CTRL-C's the PXE menu, which causes the first menu item to be
  booted, which causes some file to be downloaded.

  (This boot-on-CTRL-C behaviour is arguably a bug too, but it's a
  separate bug and the bug this patch fixes would still exist if the user
  simply waited to press CTRL-C until "pxe boot" started downloading
  files)

* User CTRL-C's the file downloads, but the filename is still written to
  the bootfile environment variable.

* User re-runs the boot command, which in my case executes "dhcp; pxe get;
  pxe boot" again, and "dhcp" picks up the saved bootfile environment
  variable and proceeds to download a file that it shouldn't.

To solve this, modify the implementation of "pxe get" to clear BootFile
if the whole boot operation fails, which avoids this whole mess.

An alternative would be to modify netboot_common() such that the no-
arguments case explicitly clears the global variable BootFile. However,
that would prevent the following command sequences from working:

$ dhcp filename # downloads "filename"
$ dhcp          # downloads $bootfile, i.e. "filename"

or:
$ setenv bootfile filename
$ dhcp          # downloads $bootfile, i.e. "filename"

... and I assume someone relies on U-Boot working that way.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
10 years agodoc: README.android-fastboot: Add note about vendor ID
Barnes, Clifton A [Tue, 22 Jul 2014 15:23:56 +0000 (11:23 -0400)]
doc: README.android-fastboot: Add note about vendor ID

The Android fastboot client only communicates with specific vendor IDs.
This addition to the documentation points out that fact so everyone is
aware that not just any vendor ID will work and where to find the IDs
that will.

Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com>
Cc: Rob Herring <robh@kernel.org>
10 years agoext4: trats: trats2: Modify dfu_alt_info's file names to have absolute path
Łukasz Majewski [Tue, 22 Jul 2014 08:17:06 +0000 (10:17 +0200)]
ext4: trats: trats2: Modify dfu_alt_info's file names to have absolute path

After the clean up performed in the commit 1151b7ac10b81ecbb the DFU subsystem
requires absolute patch for correct operation.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
10 years agoImplement generalised RSA public exponents for verified boot
Michael van der Westhuizen [Wed, 2 Jul 2014 08:17:26 +0000 (10:17 +0200)]
Implement generalised RSA public exponents for verified boot

Remove the verified boot limitation that only allows a single
RSA public exponent of 65537 (F4).  This change allows use with
existing PKI infrastructure and has been tested with HSM-based
PKI.

Change the configuration OF tree format to store the RSA public
exponent as a 64 bit integer and implement backward compatibility
for verified boot configuration trees without this extra field.

Parameterise vboot_test.sh to test different public exponents.

Mathematics and other hard work by Andrew Bott.

Tested with the following public exponents: 3, 5, 17, 257, 39981,
50457, 65537 and 4294967297.

Signed-off-by: Andrew Bott <Andrew.Bott@ipaccess.com>
Signed-off-by: Andrew Wishart <Andrew.Wishart@ipaccess.com>
Signed-off-by: Neil Piercy <Neil.Piercy@ipaccess.com>
Signed-off-by: Michael van der Westhuizen <michael@smart-africa.com>
Cc: Simon Glass <sjg@chromium.org>
10 years agoserial: sh: Add support External Clock mode
Nobuhiro Iwamatsu [Mon, 28 Jul 2014 06:07:44 +0000 (15:07 +0900)]
serial: sh: Add support External Clock mode

R8A7780 and R7A7791 of rmobile supports External Clock mode, and these uses
different from Internal Clock mode registers and calculations to the baud rate
setting. This adds function for External Clock mode.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agoserial: sh: Add support DL and CKS register for R8A7794
Nobuhiro Iwamatsu [Mon, 28 Jul 2014 06:07:43 +0000 (15:07 +0900)]
serial: sh: Add support DL and CKS register for R8A7794

R8A7794 has DL and CKS register, and these registers are used in external clock
mode. This adds support these for R8A7794.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agousb: ehci: rmobile: Remove xHCI address
Nobuhiro Iwamatsu [Mon, 28 Jul 2014 06:29:31 +0000 (15:29 +0900)]
usb: ehci: rmobile: Remove xHCI address

echi-rmobile does not support xHCI. This removes xHCI address
from address table. And this revise a value of CONFIG_USB_MAX_CONTROLLER_COUNT
for lager board and koelsh board.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
10 years agousb: ehci: rmobile: Add support R8A7794
Nobuhiro Iwamatsu [Thu, 24 Jul 2014 05:52:07 +0000 (14:52 +0900)]
usb: ehci: rmobile: Add support R8A7794

R8A7794 has same IP of USB controller as R8A7790 and R8A7791.
This addes support for R8A7794.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
10 years agodfu: fix readback buffer overflow test
Stephen Warren [Tue, 1 Jul 2014 18:16:57 +0000 (12:16 -0600)]
dfu: fix readback buffer overflow test

The buffer is too small if it's < size to read, not if it's <= the size.
This fixes the 1MB test case on Tegra, which has a 1MB buffer.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agotest: dfu: add some more test cases
Stephen Warren [Tue, 1 Jul 2014 18:16:56 +0000 (12:16 -0600)]
test: dfu: add some more test cases

On Tegra, the DFU buffer size is 1M. Consequently, the 8M test always
fails. Add tests for the 1M size, and one byte less as a corner case,
so that some large tests are executed and expected to pass.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agotest: dfu: cleanup before execution
Stephen Warren [Tue, 1 Jul 2014 18:16:55 +0000 (12:16 -0600)]
test: dfu: cleanup before execution

Call cleanup() before running tests too. If a previous test was CTRL-C'd
some stale files may have been left around. dfu-util refuses to receive
a file to a filename that already exists, which results in false test
failures if the files aren't cleaned up first.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agothor: defer parsing of device string to IO backend
Lukasz Majewski [Mon, 23 Jun 2014 07:39:16 +0000 (09:39 +0200)]
thor: defer parsing of device string to IO backend

Commit d4f5ef59cc7 "dfu: defer parsing of device string to IO backend" changed
the function signature of dfu_init_env_entities(). Adjust cmd_thordown.c
to match that change.

Also, apply the same change as commit d6d37d737b58e "dfu: free entities
when parsing fails" to cmd_thordown.c.

Fixes: d4f5ef59cc7 ("dfu: defer parsing of device string to IO backend")
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
10 years agotest:dfu: README file update
Lukasz Majewski [Fri, 20 Jun 2014 15:53:44 +0000 (17:53 +0200)]
test:dfu: README file update

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
10 years agotest: dfu: script enhancements
Stephen Warren [Tue, 10 Jun 2014 22:28:10 +0000 (16:28 -0600)]
test: dfu: script enhancements

Various misc enhancements to dfu_gadget_test.sh:

* After every write (download), perform a write to a different file
  with different data. This ensures that the DFU buffer's content is
  replaced, so that if the read (upload) succeeds, we know that the
  correct data was actually read from the storage device, rather than
  simply being left over in the DFU buffer. This requires two alt
  setting names to be passed to the script, and a dummy data file to
  be generated by dfu_gadget_test_init.sh.

* Fix the assumption that dfu_gadget_test.sh is run from the directory
  that contains it, by cd'ing to that directory before invoking
  ./dfu_gadget_test_init.sh.

* Use $DIR$RCV_DIR consistently, rather than using plain $RCV_DIR in
  some places.

* Add 959, 961 test file sizes, to be consistent with having one
  more than and one less than all the other "round" sizes 64, 128, and
  4096.

* Remove references to $BKP_DIR from dfu_gadget_test_init.sh, since it
  isn't used.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agotest:dfu: Add test scripts for testing DFU regression
Lukasz Majewski [Wed, 18 Jun 2014 09:38:56 +0000 (11:38 +0200)]
test:dfu: Add test scripts for testing DFU regression

This commit adds test scripts for testing if any commit has introduced
regression to the DFU subsystem.

It uses md5 to test if sent and received file is correct.
The test detailed description is available at README file.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
10 years agodfu: add SF backend
Stephen Warren [Wed, 11 Jun 2014 22:03:36 +0000 (16:03 -0600)]
dfu: add SF backend

This allows SPI Flash to be programmed using DFU.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agodfu: add free_entity() to struct dfu_entity
Stephen Warren [Wed, 11 Jun 2014 22:03:35 +0000 (16:03 -0600)]
dfu: add free_entity() to struct dfu_entity

This allows the backend to free any resources allocated during the
relevant dfu_fill_entity_*() call. This will soon be used by the
SF backend.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agodfu: allow backend to specify a maximum buffer size
Stephen Warren [Wed, 11 Jun 2014 22:03:34 +0000 (16:03 -0600)]
dfu: allow backend to specify a maximum buffer size

CONFIG_SYS_DFU_DATA_BUF_SIZE may be large to allow for FAT/ext layouts
to transfer large files. However, this means that individual write
operations will take a long time. Allow backends to specify a maximum
buffer size, so that each write operation is limited to a smaller data
block. This prevents the DFU protocol from timing out when e.g. writing
to SPI flash. I would guess that NAND might benefit from setting this
value too, but I can't test that.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agodfu: defer parsing of device string to IO backend
Stephen Warren [Wed, 11 Jun 2014 22:03:33 +0000 (16:03 -0600)]
dfu: defer parsing of device string to IO backend

Devices are not all identified by a single integer. To support
this, defer the parsing of the device string to the IO backed, so that
it can apply the appropriate rules.

SPI devices are specified as controller:chip_select. SPI/SF support will
be added soon.

MMC devices can also be specified as controller[.hwpart][:partition] in
many commands, although we don't support that syntax in DFU.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agodfu: add write error handling
Stephen Warren [Wed, 11 Jun 2014 18:48:08 +0000 (12:48 -0600)]
dfu: add write error handling

Fix calls to dfu_write() and dfu_flush() to detect errors in the I/O
itself. This could happen due to problems with the storage medium, or
simply when trying to write a FAT/ext file that is larger than the buffer
dfu_mmc.c maintains for this purpose.

Signal the error by switching the DFU state/status. This will be picked
up by the DFU client when it sends the next DFU request. Note that errors
can't simply be returned from e.g. dnload_request_complete(), since that
function has no way to pass errors back to the DFU client; a call to
dnload_request_complete() simply means that a USB OUT completed.

This error state/status needs to be cleared when the next DFU client
connects. While there is a DFU_CLRSTATUS request, no DFU client seems to
send this. Hence, clear this when selecting the USB alternate setting on
the USB interface.

Finally, dfu.c relies on a call to dfu_flush() to clear up the internal
state of the write transaction. Now that errors in dfu_write() are
detected, dfu_flush() may no longer be called for every transaction.
Separate out the cleanup code into a new function, and call it whenever
dfu_write() fails, as well as from any call to dfu_flush().

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agodfu: fix some issues with reads/uploads
Stephen Warren [Wed, 11 Jun 2014 18:47:27 +0000 (12:47 -0600)]
dfu: fix some issues with reads/uploads

DFU read support appears to rely upon dfu->read_medium() updating the
passed-by-reference len parameter to indicate the remaining size
available for reading.

dfu_read_medium_mmc() never does this, and the implementation of
dfu_read_medium_nand() will only work if called just once; it hard-codes
the value to the total size of the NAND device irrespective of read
offset.

I believe that overloading dfu->read_medium() is confusing. As such,
this patch introduces a new function dfu->get_medium_size() which can
be used to explicitly find out the medium size, and nothing else.
dfu_read() is modified to use this function to set the initial value for
dfu->r_left, rather than attempting to use the side-effects of
dfu->read_medium() for this purpose.

Due to this change, dfu_read() must initially set dfu->b_left to 0, since
no data has been read.

dfu_read_buffer_fill() must also be modified not to adjust dfu->r_left
when simply copying data from dfu->i_buf_start to the upload request
buffer. r_left represents the amount of data left to be read from HW.
That value is not affected by the memcpy(), but only by calls to
dfu->read_medium().

After this change, I can read from either a 4MB or 1.5MB chunk of a 4MB
eMMC boot partion with CONFIG_SYS_DFU_DATA_BUF_SIZE==1MB. Without this
change, attempting to do that would result in DFU read returning no data
at all due to r_left never being set.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agofs: implement size/fatsize/ext4size
Stephen Warren [Wed, 11 Jun 2014 18:47:26 +0000 (12:47 -0600)]
fs: implement size/fatsize/ext4size

These commands may be used to determine the size of a file without
actually reading the whole file content into memory. This may be used
to determine if the file will fit into the memory buffer that will
contain it. In particular, the DFU code will use it for this purpose
in the next commit.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoPrepare v2014.10-rc1 v2014.10-rc1
Tom Rini [Wed, 6 Aug 2014 12:52:10 +0000 (08:52 -0400)]
Prepare v2014.10-rc1

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoChange Andy Fleming's email address
Andy Fleming [Fri, 25 Jul 2014 22:39:08 +0000 (17:39 -0500)]
Change Andy Fleming's email address

Messages to afleming@freescale.com now bounce, and should be
directed to my personal address at afleming@gmail.com

Signed-off-by: Andy Fleming <afleming@gmail.com>
10 years agoThe _config target is not present anymore, mention _defconfig instead
Holger Freyther [Mon, 4 Aug 2014 07:26:05 +0000 (09:26 +0200)]
The _config target is not present anymore, mention _defconfig instead

The _config part is gone for sure, the _defconfig target could at least
work. I have not verified this for all targets though.

10 years agogit-mailrc: add a kconfig alias
Stephen Warren [Thu, 31 Jul 2014 23:30:03 +0000 (17:30 -0600)]
git-mailrc: add a kconfig alias

It's easier to Cc Masahiro on Kconfig-related changes with a git-mailrc
alias.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agodoc: README.SPL: adjust for Kbuild and Kconfig
Masahiro Yamada [Tue, 5 Aug 2014 06:25:06 +0000 (15:25 +0900)]
doc: README.SPL: adjust for Kbuild and Kconfig

Reflect the latest build system to doc/README.SPL.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agodoc: delete README.ARM-SoC
Masahiro Yamada [Tue, 5 Aug 2014 06:25:32 +0000 (15:25 +0900)]
doc: delete README.ARM-SoC

This document is too old and useless.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Tue, 5 Aug 2014 21:16:16 +0000 (17:16 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Mon, 4 Aug 2014 17:35:50 +0000 (13:35 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

10 years agospi, spi_mxc: do not hang in spi_xchg_single
Heiko Schocher [Mon, 14 Jul 2014 08:22:11 +0000 (10:22 +0200)]
spi, spi_mxc: do not hang in spi_xchg_single

if status register do never set MXC_CSPICTRL_TC, spi_xchg_single
endless loops. Add a timeout here to prevent endless hang.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Dirk Behme <dirk.behme@gmail.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agospi: Support half-duplex mode in FDT decode
Simon Glass [Mon, 7 Jul 2014 16:16:39 +0000 (10:16 -0600)]
spi: Support half-duplex mode in FDT decode

This parameter should also be supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agoexynos: spi: Fix calculation of SPI transaction start time
Simon Glass [Mon, 7 Jul 2014 16:16:38 +0000 (10:16 -0600)]
exynos: spi: Fix calculation of SPI transaction start time

The SPI transaction delay is supposed to be measured from the end of one
transaction to the start of the next. The code does not work that way, so
fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agocros_ec: Fix two bugs in the SPI implementation
Simon Glass [Mon, 7 Jul 2014 16:16:37 +0000 (10:16 -0600)]
cros_ec: Fix two bugs in the SPI implementation

An incorrect message version is passed to the EC in some cases and the
parameters of one function are switched.

Fix these problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: sf_ops: Stop leaking memory
Marek Vasut [Sat, 12 Jul 2014 12:41:31 +0000 (18:11 +0530)]
sf: sf_ops: Stop leaking memory

It's usually a common pattern to free() the memory that we allocated.
Implement this here to stop leaking memory.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agoMerge http://git.denx.de/u-boot-dm
Tom Rini [Mon, 4 Aug 2014 14:16:27 +0000 (10:16 -0400)]
Merge http://git.denx.de/u-boot-dm

10 years agoarm: Support pre-relocation malloc()
Simon Glass [Fri, 11 Jul 2014 04:23:29 +0000 (22:23 -0600)]
arm: Support pre-relocation malloc()

Add support for re-relocation malloc() in arm's start-up code.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoarm: Set up global data before board_init_f()
Simon Glass [Fri, 11 Jul 2014 04:23:26 +0000 (22:23 -0600)]
arm: Set up global data before board_init_f()

At present arm defines CONFIG_SYS_GENERIC_GLOBAL_DATA, meaning that
the global_data pointer is set up in board_init_f(). However it is
actually set up before this, it just isn't zeroed.

If we zero the global data before calling board_init_f() then we
don't need to define CONFIG_SYS_GENERIC_GLOBAL_DATA.

Make this change (on arm32 only) to simplify the init process. I
don't have the ability to test aarch64 yet.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
10 years agokmp204x: prepare to use CPU watchdog
Boschung, Rainer [Tue, 3 Jun 2014 07:05:20 +0000 (09:05 +0200)]
kmp204x: prepare to use CPU watchdog

This patch configures the qrio to trigger a core reset on
a CPU reset request.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x/qrio: support for setting the CPU reset request mode
Boschung, Rainer [Tue, 3 Jun 2014 07:05:19 +0000 (09:05 +0200)]
kmp204x/qrio: support for setting the CPU reset request mode

To acheive this, the qrio_uprstreq() function that sets the UPRSTREQN
flag in the qrio RESCNF reg is added.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: set CPU watchdog reset reason flag
Boschung, Rainer [Tue, 3 Jun 2014 07:05:18 +0000 (09:05 +0200)]
kmp204x: set CPU watchdog reset reason flag

Check the core timer status register (TSR) for watchdog reset,
and and set the QRIO's reset reason flag REASON1[0] accordingly.

This allows the appliction SW to identify the cpu watchdog as a
reset reason, by setting the REASON1[0] flag in the QRIO.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x/qrio: prepare support for the CPU watchdog reset reason
Boschung, Rainer [Tue, 3 Jun 2014 07:05:17 +0000 (09:05 +0200)]
kmp204x/qrio: prepare support for the CPU watchdog reset reason

To achieve this, the qrio_cpuwd_flag() function that sets the CPU watchdog
flag in the REASON1 reg is added.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: CPU watchdog enabled
Boschung, Rainer [Tue, 3 Jun 2014 07:05:16 +0000 (09:05 +0200)]
kmp204x: CPU watchdog enabled

The booting of the board is now protected by the CPU watchdog.
A failure during the boot phase will end up in board reset.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc: mpc85xx watchdog init added to init_func
Boschung, Rainer [Tue, 3 Jun 2014 07:05:15 +0000 (09:05 +0200)]
powerpc: mpc85xx watchdog init added to init_func

When CONFIG_WATCHDOG is defined the board initialization just performs
a WATCHDOG_RESET, an initialization of the watchdog is not done.
This has been modified fot the MPC85xx, the board initialization calls
its watchdog initialitzation allowing for full watchdog configuration
very early in the boot phase.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agompc85xx: watchdog initialisation added
Boschung, Rainer [Tue, 3 Jun 2014 07:05:14 +0000 (09:05 +0200)]
mpc85xx: watchdog initialisation added

Function to inititialize the cpu watchdog added.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
[York Sun: Add prototype in watchdog.h]
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc: macros for e500mc timer regs added
Boschung, Rainer [Tue, 3 Jun 2014 07:05:13 +0000 (09:05 +0200)]
powerpc: macros for e500mc timer regs added

For e500mc cores the watchdog timer period has to be set by means of a
6bit value, that defines the bit of the timebase counter used to signal
a watchdog timer exception on its 0 to 1 transition.
The macro used to set the watchdog period TCR_WP, was redefined for e500mc
to support 6 WP setting.

The parameter (x) given to the macro specifies the prescaling factor of
the time base clock (fTB):

watchdog_period = 1/fTB * 2^x

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agompc85xx: fix interrupt init to not affect watchdog
Boschung, Rainer [Tue, 3 Jun 2014 07:05:12 +0000 (09:05 +0200)]
mpc85xx: fix interrupt init to not affect watchdog

TCR watchdog bit are overwritten when dec interrupt is enabled.
This has been fixed with this patch.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoenv_mmc: support env partition setup in runtime
Dmitry Lifshitz [Wed, 30 Jul 2014 10:19:06 +0000 (13:19 +0300)]
env_mmc: support env partition setup in runtime

Add callback with __weak annotation to allow setup of environment
partition number in runtime from a board file.

Propagate mmc_switch_part() return value into init_mmc_for_env() instead
of -1 in case of failure.

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoenv_mmc: add mmc_get_env_addr() prototype
Dmitry Lifshitz [Wed, 30 Jul 2014 10:19:05 +0000 (13:19 +0300)]
env_mmc: add mmc_get_env_addr() prototype

Add missing mmc_get_env_addr() prototype in environment.h

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoMMC: atmel_mci: enable high speed mode support
Bo Shen [Thu, 31 Jul 2014 06:39:32 +0000 (14:39 +0800)]
MMC: atmel_mci: enable high speed mode support

If the MCI IP version >= 0x300, it supports hight speed mode
option, this patch enable it.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoMMC: atmel_mci: add configuration register definition
Bo Shen [Thu, 31 Jul 2014 06:39:31 +0000 (14:39 +0800)]
MMC: atmel_mci: add configuration register definition

Add configuration register definition, this register only
exists on MCI IP version >= 0x300.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoMMC: atmel_mci: refactor setting the mode register
Bo Shen [Thu, 31 Jul 2014 06:39:30 +0000 (14:39 +0800)]
MMC: atmel_mci: refactor setting the mode register

The mode register is different between MCI IP version.
So, according to MCI IP version to set the mode register.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc/dw_mmc: Fix clock divider calculation error for bypass mode
Chin Liang See [Tue, 10 Jun 2014 06:26:52 +0000 (01:26 -0500)]
mmc/dw_mmc: Fix clock divider calculation error for bypass mode

To fix the clock divider calculation error when the controller
clock same as the operating frequency. This is known as bypass
mode. In this mode, the divider should be 0.

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Mischa Jonker <mjonker@synopsys.com>
10 years agommc: s3c: Add SD driver
Marek Vasut [Tue, 22 Jul 2014 00:34:52 +0000 (02:34 +0200)]
mmc: s3c: Add SD driver

Implement SD driver for the S3C24xx family. This implementation
is currently only capable of using the PIO transfers, DMA is not
supported.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoarm: s3c: Unify the S3C24xx SDI structure
Marek Vasut [Tue, 22 Jul 2014 00:34:51 +0000 (02:34 +0200)]
arm: s3c: Unify the S3C24xx SDI structure

Unify the register structure so they can be easily used across all
of S3C24xx lineup.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agobcm2835_sdhci: Add SDHCI_QUIRK_NO_HISPD_BIT flag
Lubomir Rintel [Tue, 10 Jun 2014 18:46:43 +0000 (20:46 +0200)]
bcm2835_sdhci: Add SDHCI_QUIRK_NO_HISPD_BIT flag

Seems like the controller doesn't support the flag. None of the hi-speed cards
I've tried could be read, while they successfully worked with the quirk enabled.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
10 years agoARM: kirkwood: add mvsdio driver
DrEagle [Fri, 25 Jul 2014 19:07:30 +0000 (21:07 +0200)]
ARM: kirkwood: add mvsdio driver

This patch add Marvell kirkwood MVSDIO/MMC driver
and enable it for Sheevaplugs and OpenRD boards.

Signed-off-by: Gerald Kerma <drEagle@doukki.net>
Reviewed-by: Stefan Roese <sr@denx.de>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoinclude: remove CONFIG_SPL/CONFIG_TPL definition in config headers
Masahiro Yamada [Wed, 30 Jul 2014 05:08:25 +0000 (14:08 +0900)]
include: remove CONFIG_SPL/CONFIG_TPL definition in config headers

Now CONFIG_SPL and CONFIG_TPL are defined in Kconfig.

Remove the redundant definition in config headers.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 years agopowerpc: remove redundant CPU definition
Masahiro Yamada [Wed, 30 Jul 2014 05:08:24 +0000 (14:08 +0900)]
powerpc: remove redundant CPU definition

CONFIG_${CPU} is defined by Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Stefan Roese <sr@denx.de>
10 years agokconfig: delete redundant CONFIG_${ARCH} definition
Masahiro Yamada [Wed, 30 Jul 2014 05:08:23 +0000 (14:08 +0900)]
kconfig: delete redundant CONFIG_${ARCH} definition

CONFIG_${ARCH} is defined by Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 years agobuildman: adjust for Kconfig
Masahiro Yamada [Wed, 30 Jul 2014 05:08:22 +0000 (14:08 +0900)]
buildman: adjust for Kconfig

Use "make <board>_defconfig" instead of "make <board>_config".

Invoke tools/genboardscfg.py to generate boards.cfg when it is missing.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoMAKEALL: adjust for Kconfig
Masahiro Yamada [Wed, 30 Jul 2014 05:08:21 +0000 (14:08 +0900)]
MAKEALL: adjust for Kconfig

 - Use "make <board>_defconfig" instead of "make <board>_config".

 - Invoke tools/genboardscfg.py to generate boards.cfg when it is
   missing.

 - Show "Building ${BOARD_NAME} board..." message.
   (Prior to Kconfig, instead, mkconfig script displayed
   "Configuring for ${BOARD_NAME} board..." but it was removed.)
   Without this message, we cannot know which board is currently
   being built.

 - Do not show "# configuration written to .config".
   This message is useless and just annoying for MAKEALL.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agokconfig: remove mkconfig and boards.cfg
Masahiro Yamada [Wed, 30 Jul 2014 05:08:20 +0000 (14:08 +0900)]
kconfig: remove mkconfig and boards.cfg

The old configuration script is no longer necessary.
Nor is boards.cfg a primary database.
We can generate it with the genboardscfg.py tool
based on the latest Kconfig, defconfig and MAINTAINERS.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agotools: add genboardscfg.py
Masahiro Yamada [Wed, 30 Jul 2014 05:08:19 +0000 (14:08 +0900)]
tools: add genboardscfg.py

Now the primary data for each board is in Kconfig, defconfig and
MAINTAINERS.

It is true boards.cfg is needed for MAKEALL and buildman and might be
useful to brouse all the supported boards in a single database.
But it would be painful to maintain the boards.cfg in sync.

So, this is the solution.
Add a tool to generate the equivalent boards.cfg file based on
the latest Kconfig, defconfig and MAINTAINERS.

We can keep all the functions of MAKEALL and buildman with it.

The best thing would be to change MAKEALL and buildman for not
depending on boards.cfg in the future, but it would take some time.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoAdd board MAINTAINERS files
Masahiro Yamada [Wed, 30 Jul 2014 05:08:18 +0000 (14:08 +0900)]
Add board MAINTAINERS files

We have switched to Kconfig and the boards.cfg file is going to
be removed. We have to retrieve the board status and maintainers
information from it.

The MAINTAINERS format as in Linux Kernel would be nice
because we can crib the scripts/get_maintainer.pl script.

After some discussion, we chose to put a MAINTAINERS file under each
board directory, not the top-level one because we want to collect
relevant information for a board into a single place.

TODO:
Modify get_maintainer.pl to scan multiple MAINTAINERS files.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agokconfig: switch to Kconfig
Masahiro Yamada [Wed, 30 Jul 2014 05:08:17 +0000 (14:08 +0900)]
kconfig: switch to Kconfig

This commit enables Kconfig.
Going forward, we use Kconfig for the board configuration.
mkconfig will never be used. Nor will include/config.mk be generated.

Kconfig must be adjusted for U-Boot because our situation is
a little more complicated than Linux Kernel.
We have to generate multiple boot images (Normal, SPL, TPL)
from one source tree.
Each image needs its own configuration input.

Usage:

Run "make <board>_defconfig" to do the board configuration.

It will create the .config file and additionally spl/.config, tpl/.config
if SPL, TPL is enabled, respectively.

You can use "make config", "make menuconfig" etc. to create
a new .config or modify the existing one.

Use "make spl/config", "make spl/menuconfig" etc. for spl/.config
and do likewise for tpl/.config file.

The generic syntax of configuration targets for SPL, TPL is:

  <target_image>/<config_command>

Here, <target_image> is either 'spl' or 'tpl'
      <config_command> is 'config', 'menuconfig', 'xconfig', etc.

When the configuration is done, run "make".
(Or "make <board>_defconfig all" will do the configuration and build
in one time.)

For futher information of how Kconfig works in U-Boot,
please read the comment block of scripts/multiconfig.py.

By the way, there is another item worth remarking here:
coexistence of Kconfig and board herder files.

Prior to Kconfig, we used C headers to define a set of configs.

We expect a very long term to migrate from C headers to Kconfig.
Two different infractructure must coexist in the interim.

In our former configuration scheme, include/autoconf.mk was generated
for use in makefiles.
It is still generated under include/, spl/include/, tpl/include/ directory
for the Normal, SPL, TPL image, respectively.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoinclude: define CONFIG_SPL and CONFIG_TPL as 1
Masahiro Yamada [Wed, 30 Jul 2014 05:08:16 +0000 (14:08 +0900)]
include: define CONFIG_SPL and CONFIG_TPL as 1

We are about to switch to Kconfig in the next commit.
But there are something to get done beforehand.

In Kconfig, include/generated/autoconf.h defines boolean
CONFIG macros as 1.

CONFIG_SPL and CONFIG_TPL, if defined, must be set to 1.
Otherwise, when switching to Kconfig, the build log
would be sprinkled with warning messages like this:
  warning: "CONFIG_SPL" redefined [enabled by default]

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 years agokconfig: add basic Kconfig files
Masahiro Yamada [Wed, 30 Jul 2014 05:08:15 +0000 (14:08 +0900)]
kconfig: add basic Kconfig files

This commit adds more Kconfig files, which were written by hand.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agokconfig: add board Kconfig and defconfig files
Masahiro Yamada [Wed, 30 Jul 2014 05:08:14 +0000 (14:08 +0900)]
kconfig: add board Kconfig and defconfig files

This commit adds:
 - arch/${ARCH}/Kconfig
    provide a menu to select target boards
 - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig
    set CONFIG macros to the appropriate values for each board
 - configs/${TARGET_BOARD}_defconfig
    default setting of each board

(This commit was automatically generated by a conversion script
based on boards.cfg)

In Linux Kernel, defconfig files are located under
arch/${ARCH}/configs/ directory.
It works in Linux Kernel since ARCH is always given from the
command line for cross compile.

But in U-Boot, ARCH is not given from the command line.
Which means we cannot know ARCH until the board configuration is done.
That is why all the "*_defconfig" files should be gathered into a
single directory ./configs/.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agokconfig: import Kconfig files from Linux 3.16-rc7
Masahiro Yamada [Wed, 30 Jul 2014 05:08:13 +0000 (14:08 +0900)]
kconfig: import Kconfig files from Linux 3.16-rc7

Import
  - scripts/kconfig/*
  - include/linux/kconfig.h
from Linux 3.16-rc7.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 years agoboards:trats2: New Trats2 board maintainer
Łukasz Majewski [Tue, 29 Jul 2014 16:09:49 +0000 (18:09 +0200)]
boards:trats2: New Trats2 board maintainer

Change-Id: I8e72b942b8816726773d5407ce405d68a1594389
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
10 years agoboards.cfg : Add maintainers entries for SOCFPGA
Dinh Nguyen [Thu, 24 Jul 2014 11:45:24 +0000 (06:45 -0500)]
boards.cfg : Add maintainers entries for SOCFPGA

Add back the maintainers entries for Altera's SOCFPGA platform.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Signed-off-by: Chin Liang See <clsee@altera.com>
10 years agocosmetic: boards.cfg: fix some maintainers fields
Masahiro Yamada [Tue, 22 Jul 2014 03:58:30 +0000 (12:58 +0900)]
cosmetic: boards.cfg: fix some maintainers fields

Add a whitespace between the name and the email address.

When switching to Kconfig, the first version of MAINTAINERS files
will be generated based on the boards.cfg file.

So, the maintainers field should be corrected even if it is a really
minor fix.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agobuildman: make sure to invoke GNU Make
Masahiro Yamada [Tue, 22 Jul 2014 02:19:09 +0000 (11:19 +0900)]
buildman: make sure to invoke GNU Make

Since the command name 'make' may not be GNU Make on some platforms
such as FreeBSD, buildman should call scripts/show-gnu-make to get
the command name for GNU MAKE (and error out if it is not found).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoMAKEALL: make sure to invoke GNU Make
Masahiro Yamada [Tue, 22 Jul 2014 02:19:08 +0000 (11:19 +0900)]
MAKEALL: make sure to invoke GNU Make

Since the command name 'make' may not be GNU Make on some platforms
such as FreeBSD, MAKEALL should call scripts/show-gnu-make to get
the command name for GNU MAKE (and error out if it is not found).

The GNU Make should be searched after parsing options because we want
to allow "MAKEALL -h" even if GNU Make is missing on the system.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoscripts: add scripts/show-gnu-make to get GNU Make command name
Masahiro Yamada [Tue, 22 Jul 2014 02:19:07 +0000 (11:19 +0900)]
scripts: add scripts/show-gnu-make to get GNU Make command name

U-Boot is expected to be built on various platforms.

We should keep in mind that the command 'make' is not always GNU Make,
while all the makefiles are written for GNU Make.

For example, on Linux, people generally do:

  make <board>_config; make

But FreeBSD folks do

  gmake <board>_config; gmake

(The command 'make' on FreeBSD is BSD Make, not GNU Make)

It is not a good idea to hard-code the command name 'make'
in MAKEALL or buildman.

They should call this helper script and get the command name
for GNU Make.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Tue, 29 Jul 2014 13:41:35 +0000 (09:41 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

10 years agoMerge git://www.denx.de/git/u-boot-ppc4xx
Tom Rini [Mon, 28 Jul 2014 21:48:48 +0000 (17:48 -0400)]
Merge git://www.denx.de/git/u-boot-ppc4xx

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Mon, 28 Jul 2014 18:54:29 +0000 (14:54 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

10 years agoARM: HYP/non-sec: remove MIDR check to validate CBAR
Marc Zyngier [Sat, 12 Jul 2014 13:24:08 +0000 (14:24 +0100)]
ARM: HYP/non-sec: remove MIDR check to validate CBAR

Having a form of whitelist to check if we know of a CPU core
and and obtain CBAR is a bit silly.

It doesn't scale (how about A12, A17, as well as other I don't know
about?), and is actually a property of the SoC, not the core.

So either it works and everybody is happy, or it doesn't and
the u-boot port to this SoC is providing the real address via
a configuration option.

The result of the above is that this code doesn't need to exist,
is thus forcefully removed.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: HYP/non-sec/PSCI: emit DT nodes
Marc Zyngier [Sat, 12 Jul 2014 13:24:07 +0000 (14:24 +0100)]
ARM: HYP/non-sec/PSCI: emit DT nodes

Generate the PSCI node in the device tree.

Also add a reserve section for the "secure" code that lives in
in normal RAM, so that the kernel knows it'd better not trip on
it.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: convert arch_fixup_memory_node to a generic FDT fixup function
Ma Haijun [Sat, 12 Jul 2014 13:24:06 +0000 (14:24 +0100)]
ARM: convert arch_fixup_memory_node to a generic FDT fixup function

Some architecture needs extra device tree setup. Instead of adding
yet another hook, convert arch_fixup_memory_node to be a generic
FDT fixup function.

[maz: collapsed 3 patches into one, rewrote commit message]

Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: HYP/non-sec: add the option for a second-stage monitor
Marc Zyngier [Sat, 12 Jul 2014 13:24:05 +0000 (14:24 +0100)]
ARM: HYP/non-sec: add the option for a second-stage monitor

Allow the switch to a second stage secure monitor just before
switching to non-secure.

This allows a resident piece of firmware to be active once the
kernel has been entered (the u-boot monitor is dead anyway,
its pages being reused).

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: HYP/non-sec: add generic ARMv7 PSCI code
Marc Zyngier [Sat, 12 Jul 2014 13:24:04 +0000 (14:24 +0100)]
ARM: HYP/non-sec: add generic ARMv7 PSCI code

Implement core support for PSCI. As this is generic code, it doesn't
implement anything really useful (all the functions are returning
Not Implemented).

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: HYP/non-sec: allow relocation to secure RAM
Marc Zyngier [Sat, 12 Jul 2014 13:24:03 +0000 (14:24 +0100)]
ARM: HYP/non-sec: allow relocation to secure RAM

The current non-sec switching code suffers from one major issue:
it cannot run in secure RAM, as a large part of u-boot still needs
to be run while we're switched to non-secure.

This patch reworks the whole HYP/non-secure strategy by:
- making sure the secure code is the *last* thing u-boot executes
  before entering the payload
- performing an exception return from secure mode directly into
  the payload
- allowing the code to be dynamically relocated to secure RAM
  before switching to non-secure.

This involves quite a bit of horrible code, specially as u-boot
relocation is quite primitive.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: HYP/non-sec: add separate section for secure code
Marc Zyngier [Sat, 12 Jul 2014 13:24:02 +0000 (14:24 +0100)]
ARM: HYP/non-sec: add separate section for secure code

In anticipation of refactoring the HYP/non-secure code to run
from secure RAM, add a new linker section that will contain that
code.

Nothing is using it just yet.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: add missing HYP mode constant
Marc Zyngier [Sat, 12 Jul 2014 13:24:01 +0000 (14:24 +0100)]
ARM: add missing HYP mode constant

In order to be able to use the various mode constants (far more
readable than random hex values), add the missing HYP and A
values.

Also update arm/lib/interrupts.c to display HYP instead of an
unknown value.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: non-sec: reset CNTVOFF to zero
Marc Zyngier [Sat, 12 Jul 2014 13:24:00 +0000 (14:24 +0100)]
ARM: non-sec: reset CNTVOFF to zero

Before switching to non-secure, make sure that CNTVOFF is set
to zero on all CPUs. Otherwise, kernel running in non-secure
without HYP enabled (hence using virtual timers) may observe
timers that are not synchronized, effectively seeing time
going backward...

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: HYP/non-sec: add a barrier after setting SCR.NS==1
Marc Zyngier [Sat, 12 Jul 2014 13:23:59 +0000 (14:23 +0100)]
ARM: HYP/non-sec: add a barrier after setting SCR.NS==1

A CP15 instruction execution can be reordered, requiring an
isb to be sure it is executed in program order.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoARM: HYP/non-sec: move switch to non-sec to the last boot phase
Marc Zyngier [Sat, 12 Jul 2014 13:23:58 +0000 (14:23 +0100)]
ARM: HYP/non-sec: move switch to non-sec to the last boot phase

Having the switch to non-secure in the "prep" phase is causing
all kind of troubles, as that stage can be called multiple times.

Instead, move the switch to non-secure to the last possible phase,
when there is no turning back anymore.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 28 Jul 2014 10:26:21 +0000 (12:26 +0200)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

10 years agoMerge branch 'u-boot-sh/rmobile' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 28 Jul 2014 08:54:54 +0000 (10:54 +0200)]
Merge branch 'u-boot-sh/rmobile' into 'u-boot-arm/master'

10 years agoMerge branch 'u-boot-sunxi/master' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 28 Jul 2014 08:12:45 +0000 (10:12 +0200)]
Merge branch 'u-boot-sunxi/master' into 'u-boot-arm/master'

10 years agopatman: make "No recipient" checking more tolerant
Masahiro Yamada [Fri, 18 Jul 2014 05:23:20 +0000 (14:23 +0900)]
patman: make "No recipient" checking more tolerant

If Series-to tag is missing, Patman exits with a message
"No recipient".

This is just annoying for those who had already added
sendemail.to configuration.

I guess many developers have

  [sendemail]
          to = u-boot@lists.denx.de

in their .git/config because the 'To: u-boot@lists.denx.de' field
should always be added when sending patches.

That seems more reasonable rather than adding
'Series-to: u-boot@lists.denx.de' to every patch series.

Patman should exit only when both Series-to tag and sendemail.to
configuration are mising.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agobuildman: Support in-tree builds
Simon Glass [Mon, 14 Jul 2014 23:51:03 +0000 (17:51 -0600)]
buildman: Support in-tree builds

At present buildman always builds out-of-tree, that is it uses a separate
output directory from the source directory. Normally this is what you want,
but it is important that in-tree builds work also. Some Makefile changes may
break this.

Add a -i option to tell buildman to use in-tree builds, so that it is easy
to test this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agobuildman: Add -C option to force a reconfigure for each commit
Simon Glass [Mon, 14 Jul 2014 23:51:02 +0000 (17:51 -0600)]
buildman: Add -C option to force a reconfigure for each commit

Normally buildman wil try to configure U-Boot for a particular board on the
first commit that it builds in a series. Subsequent commits are built
without reconfiguring which normally works. Where it doesn't, buildman
automatically reconfigures and retries.

To fully emulate the way MAKEALL works, we should have an option to disable
this optimisation.

Add a -C option to cause buildman to always reconfigure on each commit.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoMerge branch 'u-boot-microblaze/zynq' into 'u-boot-arm/master'
Albert ARIBAUD [Sat, 26 Jul 2014 12:08:36 +0000 (14:08 +0200)]
Merge branch 'u-boot-microblaze/zynq' into 'u-boot-arm/master'

10 years agoARM: omap: move board specific NAND configs out from ti_armv7_common.h
pekon gupta [Fri, 18 Jul 2014 12:29:42 +0000 (17:59 +0530)]
ARM: omap: move board specific NAND configs out from ti_armv7_common.h

This patch moves some board specific NAND configs:
- FROM: generic config file 'ti_armv7_common.h'
- TO:   individual board config files using these configs.
So that each board can independently set the value as per its design.

Following configs are affected in this patch:
  CONFIG_SYS_NAND_U_BOOT_OFFS: <refer doc/README.nand>
  CONFIG_CMD_SPL_NAND_OFS: <refer doc/README.falcon>
  CONFIG_SYS_NAND_SPL_KERNEL_OFFS: <refer doc/README.falcon>
  CONFIG_CMD_SPL_WRITE_SIZE: <refer doc/README.falcon>

This patch also updates documentation for few of above NAND configs.

Signed-off-by: Pekon Gupta <pekon@ti.com>