Commit Graph

31510 Commits

Author SHA1 Message Date
Masahiro Yamada 4d713be139 kbuild: use relative path more to include Makefile
Prior to this commit, it was impossible to use relative path to
include Makefiles from the top level Makefile because the option
"--include-dir=$(srctree)" becomes effective when Make enters into
sub Makefiles.

To use relative path in any places, this commit moves the option
above the "sub-make" target.

This was imported from Linux (commit a436bb7b8063) and adjusted for
U-Boot.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-07-27 15:01:55 -04:00
Masahiro Yamada ba84de9f13 kbuild: do not add $((generic-)offsets-file) to targets
$(always) is added to targets by scripts/Makefile.build.
Moreover, filechk does not need .*.cmd files.

Adding these two files to targets is redundant.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-07-27 15:01:55 -04:00
Masahiro Yamada 98bd0e0d9b kbuild: sync with Linux 4.1
Update some build scripts to match Linux 4.1.  Commit-based syncing
was done so as not to break U-Boot specific changes.
The previous big sync was from Linux 3.18-rc1 by commit 176d098277
(kbuild: sync misc scripts with Linux 3.18-rc1).

The commits imported from Linux (some with adjustments) are:

[1] commit 9fb5e5372208973984a23ee6f5f025c05d364633
    Author: Robert Richter <rrichter@cavium.com>
    dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst

[2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: collect shorthands into scripts/Kbuild.include

[3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03
    Author: Michal Marek <mmarek@suse.cz>
    kbuild: Remove duplicate $(cmd) definition in Makefile.clean

[4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: remove redundant -rR flag of hdr-inst

[5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5
    Author: Michal Marek <mmarek@suse.cz>
    kbuild: Drop support for clean-rule

[6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736
    Author: Michal Marek <mmarek@suse.cz>
    kbuild: Fix removal of the debian/ directory

[7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: use mixed-targets when two or more config targets are given

[8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: fix cc-ifversion macro

[9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion

[10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: allow cc-ifversion to have the argument for false condition

[11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3
    Author: Heiko Carstens <heiko.carstens@de.ibm.com>
    ftrace: allow architectures to specify ftrace compile options

[12] commit 0b24becc810dc3be6e3f94103a866f214c282394
    Author: Andrey Ryabinin <a.ryabinin@samsung.com>
    kasan: add kernel address sanitizer infrastructure

[13] commit 4218affdf57f938c04e3a916a9685ee27079f377
    Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
    kbuild: remove warning about "make depend"

[14] commit 77479b38e2f58890eb221a0418357502a5b41cd6
    Author: Nathan Rossi <nathan.rossi@xilinx.com>
    kbuild: Create directory for target DTB

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-07-27 15:01:54 -04:00
Masahiro Yamada 9b5f0b1da9 kconfig: sync with Linux 4.1
Update the files under scripts/kconfig/ to match Linux 4.1.
Some Kconfig sources have diverged from those in the kernel,
so commit-base syncing was done not to lose U-Boot specific updates.

The commits cherry-picked from Linux are:

[1] commit be8af2d54a66911693eddc556e4f7a866670082b
    Author: Bjørn Forsman <bjorn.forsman@gmail.com>
    kconfig/lxdialog: get ncurses CFLAGS with pkg-config

[2] commit 3943f42c11896ce82ad3da132c8a5630313bdd0e
    Author: Andrey Utkin <andrey.krieger.utkin@gmail.com>
    Replace mentions of "list_struct" to "list_head"

[3] commit e4e458b45c5861808674eebfea94cee2258bb2ea
    Author: Arjun Sreedharan <arjun024@gmail.com>
    calloc/xcalloc: Fix argument order

[4] commit 09950bc256e3628d275f90e016e6f5a039fbdcab
    Author: Olof Johansson <olof@lixom.net>
    merge_config.sh: Display usage if given too few arguments

[5] commit b6a2ab2cd4739a9573ed41677e53171987b8da34
    Author: Colin Ian King <colin.king@canonical.com>
    kconfig: use va_end to match corresponding va_start

[6] commit 70529b1a1784503169416df19ce3d68746401340
    Author: Michal Marek <mmarek@suse.cz>
    kconfig: Get rid of the P() macro in headers

[7] commit 463157444e377bf9b279101b1f16a94c4648c03a
    Author: Michal Marek <mmarek@suse.cz>
    kconfig: Remove dead code

[8] commit ad8d40cda3ad22ad9e8863d55a5c88f85c0173f0
    Author: Michal Marek <mmarek@suse.cz>
    kconfig: Remove unnecessary prototypes from headers

[9] commit de4619937229378e81f95e99c9866acc8e207d34
    Author: Masahiro Yamada <yamada.masahiro@socionext.com>
    kbuild: mergeconfig: fix "jobserver unavailable" warning

[10] commit b9fe99c5b994c6ddc57780993966b18899526c0b
    Author: Masahiro Yamada <yamada.masahiro@socionext.com>
    kbuild: mergeconfig: move an error check to merge_config.sh

[11] commit 371cfd4ff0611d8bc5d18bbb9cc6a2bc3d56cd3d
    Author: Masahiro Yamada <yamada.masahiro@socionext.com>
    kbuild: mergeconfig: remove redundant $(objtree)

[12] commit 3a975b8cfcbe026b535f83bde9a3c009bae214f9
    Author: Masahiro Yamada <yamada.masahiro@socionext.com>
    merge_config.sh: improve indentation

[13] commit bc8f8f5fc47cd02c2c5f3580dac2fe6695af1edd
    Author: Masahiro Yamada <yamada.masahiro@socionext.com>
    merge_config.sh: rename MAKE to RUNMAKE

[14] commit 63a91033d52e64a22e571fe84924c0b7f21c280d
    Author: Masahiro Yamada <yamada.masahiro@socionext.com>
    kbuild: add generic mergeconfig target, %.config

[15] commit 1cba0c305758c3c1786ecaceb03e142c95a4edc9
    Author: Michal Marek <mmarek@suse.cz>
    kconfig: Simplify Makefile

[16] commit 0a1f00a1c86421cc07cec87011c7cf4df68ee54b
    Author: Michal Marek <mmarek@suse.cz>
    kconfig: Do not print status messages in make -s mode

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-07-27 15:01:53 -04:00
Paul Kocialkowski d6fc0cefd8 config: ti_omap5_common: Palmas power support in SPL
Palmas power support is required for OMAP5 devices such as the OMAP5 uEVM, that
need to e.g. enable MMC power at SPL stage.

This is especially important when booting from a peripheral (such as USB, UART),
where the bootrom will not enable power for the MMC device that will hold the
main U-Boot.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-07-27 15:01:51 -04:00
Otavio Salvador 5b94ce2c34 cgtqmx6eval: Use standard boot script
Use more standard boot scripts and also add the capability of
booting via NFS.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:36:32 +02:00
Otavio Salvador f33abe39fd cgtqmx6eval: Align DCD settings with Congatec's U-boot
Use the same DCD settings from Congatec's U-boot tree for
the P/N 016113 card.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:36:16 +02:00
Otavio Salvador 6731bc8db4 cgtqmx6eval: Add SATA support
Add SATA support.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:36:10 +02:00
Otavio Salvador 6d551f2705 cgtqmx6eval: Add splash screen support
Add LVDS and HDMI support.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:35:56 +02:00
Otavio Salvador 95246ac709 cgtqmx6eval: Add USB support
Add USB support.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:29:53 +02:00
Otavio Salvador 4c9929d63a cgtqmx6eval: Add PMIC support
cgtqmx6eval has a PFUZE100 FSL PMIC connected to I2C2.

Add support for it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:29:13 +02:00
Otavio Salvador 862187b7cd cgtqmx6eval: Add thermal support
Add thermal support so that we can see the following message on boot:

CPU:   Industrial temperature grade (-40C to 105C) at 33C

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:24:44 +02:00
Otavio Salvador 45e4d3504a cgtqmx6eval: Add ESDHC3 support
cgtqmx6eval has an eMMC connected to ESDHC3.

Add support for it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:21:59 +02:00
Otavio Salvador dbcb6ffb37 cgtqmx6eval: Fit into single lines
There is no need to use multiple lines when they fit into a single line.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:21:58 +02:00
Otavio Salvador 516a863ef4 cgtqmx6eval: Improve the error handling
Perfoming an OR operation on the error is not a good approach.

Return the error immediately for each ESDHC instance instead.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:21:58 +02:00
Otavio Salvador 6b3496f7ba cgtqmx6eval: Staticize when possible
Declare 'static' when possible.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:21:58 +02:00
Otavio Salvador d6ec45da30 cgtqmx6eval: Use the default CONFIG_SYS_PBSIZE
Entering the maximum number of characters defined by CONFIG_SYS_CBSIZE into
the console and hitting enter afterwards, causes a hang in the system because
CONFIG_SYS_PBSIZE is not capable of storing the extra characters of the error
message:
"Unknown command '' - try 'help'".

Use the default CONFIG_SYS_PBSIZE definition from config_fallbacks.h to solve
this problem.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:21:58 +02:00
Otavio Salvador 72d21256fb cgtqmx6eval: Use default prompt
Remove the custom prompt and use the default instead.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-26 12:21:58 +02:00
Peng Fan 4683b22065 mmc:fsl_esdhc invalidate dcache before read
DCIMVAC is upgraded to DCCIMVAC for the individual processor
(Cortex-A7) that the DCIMVAC is executed on.

We should follow the linux dma follow. Before DMA read, first
invalidate dcache then after DMA read, invalidate dcache again.

With the DMA direction DMA_FROM_DEVICE, the dcache need be
invalidated again after the DMA completion. The reason is
that we need explicity make sure the dcache been invalidated
thus to get the DMA'ed memory correctly from the physical memory.
Any cache-line fill during the DMA operations such as the
pre-fetching can cause the DMA coherency issue, thus CPU get the stale data.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Jason Liu <r64343@freescale.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2015-07-26 12:17:20 +02:00
Fabio Estevam 42acd1874f mx6sxsabresd: Use 'int' for return values
The variable 'ret' is used to store the value returned by pfuze_mode_init(),
so it should be of type 'int' instead of 'unsigned int' in order to
correctly handle negative numbers.

Fix the variable type.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-07-26 12:12:04 +02:00
Fabio Estevam e4b984d75e mx6sabresd: Use 'int' for return values
The variable 'ret' is used to store the value returned by pfuze_mode_init(),
so it should of type 'int' instead of 'unsigned int' in order to correctly
handle negative numbers.

Fix the variable type.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-07-26 12:12:04 +02:00
Fabio Estevam 44f98f9c8e warp: Add MAX77696 support
Warp has a MAX77696 PMIC connected via I2C1 bus.

Add support for it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-07-26 12:12:04 +02:00
Fabio Estevam a643acd44c power: pmic: Add support for MAX77696 PMIC
Add support for MAX77696 PMIC.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-07-26 12:11:33 +02:00
Fabio Estevam 6918f974cf thermal: Fix comments
It seems that many comments were copied from the I2C uclass, so adjust
the comments for the thermal class.

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Simon Glass <sjg@chromium.org>
2015-07-26 12:11:33 +02:00
Adrian Alonso 0b7f7c339c imx: imximage: add new CHECK/CLR BIT command
* Extend imximage DCD version 2 to support DCD commands
  CMD_WRITE_CLR_BIT 4 [address] [mask bit] means:
    while ((*address & ~mask) != 0);
  CMD_CHECK_BITS_SET 4 [address] [mask bit] means:
    while ((*address & mask) != mask);
  CMD_CHECK_BITS_CLR 4 [address] [mask bit] means:
    *address = *address & ~mask;
* Add set_dcd_param_v2 helper function to set DCD
  command parameters

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
2015-07-26 12:07:14 +02:00
Stefan Roese 452308c02b arm: mx6: tqma6: Add WRU-IV baseboard for the TQMa6 SoM
This patch adds support for the "OHB System AG" baseboard
with is equipped with the TQMa6S SoM.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Stefano Babic <sbabic@denx.de>
2015-07-26 12:05:22 +02:00
Tom Rini 26473945ad Merge branch 'master' of http://git.denx.de/u-boot-sunxi 2015-07-25 09:04:18 -04:00
Hans de Goede 7f7409ba6a sunxi: Enable both ehci and otg in host mode on various boards
Now that the device-model port of the musb mode makes it possible, enable
both the ehci and otg in host mode on boards where the musb is wired up in
host only mode, either via an usb-a receptacle or via an usb <-> sata
converter.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-07-25 11:22:55 +02:00
Hans de Goede a51c832cc1 sunxi: ga10h: Enable both otg and regular usb host controllers
This allows using devices plugged into both ports of the tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-07-25 11:22:55 +02:00
Hans de Goede 9ecce9707b sunxi: musb: Stop treating not having a vbus-det gpio as an error
On some boards the otg is wired up in host-only mode in this case we
have no vbus-det gpio.

Stop logging an error from sunxi_usb_phy_vbus_detect() in this case, and
stop treating sunxi_usb_phy_vbus_detect() returning a negative errno, as
if a charger is plugged into the otg port.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-07-25 11:22:55 +02:00
Hans de Goede 56a2085410 sunxi: musb: Improve output during probing
When we return an error the usb core will print an error-message, so in this
case do not print anything.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-07-25 11:22:55 +02:00
Hans de Goede 91183babea sunxi: musb: Use device-model for musb host mode
Modify the sunxi musb glue to use the device-model for musb host mode.

This allows using musb in host mode together with other host drivers
such as ehci / ohci, which is esp. useful on boards which use the
musb controller in host-only mode, these boards have e.g. an usb-a
receptacle or an usb to sata converter attached to the musb controller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-07-25 11:22:55 +02:00
Hans de Goede d42faf3198 sunxi: musb: Move musb config and platdata to the sunxi-musb glue
Move the musb config and platdata to the sunxi-musb glue, which is where
it really belongs. This is preparation patch for adding device-model
support for the sunxi-musb-host code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-07-25 11:22:55 +02:00
Hans de Goede 71cbe0d681 sunxi: musb: Add id pin support
When in host mode check if there is a host cable inserted into the otg
port by checking the id pin. If there is no host cable return an error to
make usb_lowlevel_init() exit early, rather then waiting for 1 second
for a device which will never show up.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-07-25 11:22:55 +02:00
Hans de Goede b41972e7d1 sunxi: musb: Move vbus check to sunxi_musb_enable
This way it can be re-checked on "usb reset".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-07-25 11:22:54 +02:00
Hans de Goede 48c06c98ec sunxi: usb-phy: Add support for reading otg id pin value
Add support for reading the id pin value of the otg connector to the usb
phy code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-07-25 11:22:54 +02:00
Hans de Goede de1502c937 sunxi: Enable CMD_USB and USB_STORAGE by default on sunxi
Start using the new Kconfig options which are available for these now,
and simply always enable them by selecting them as sunxi builds always
include USB support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-07-25 11:22:54 +02:00
Tom Rini 4536882710 sunxi: Update selects in arch/arm/Kconfig for DM conversions
With certain features being convert to DM now we want sunxi to default
to having DM enabled for ETH/SERIAL and USB in some cases.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Rini <trini@konsulko.com>
[hdegoede@redhat.com: Also select CONFIG_USB for all sunxi builds]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-07-25 11:22:54 +02:00
Hans de Goede d08980de02 sunxi: Remove bogus uart entry from utoo-p66 dts file
At one point in time the utoo-p66 dts file in the kernel had a bogus
uart entry, and it seems like we synced with the kernel at just the wrong
moment.

This commit removes the bogus uart entry, which breaks booting the utoo-p66
when DM_SERIAL=y.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-07-25 11:22:54 +02:00
Tom Rini 6f4e050639 Merge git://git.denx.de/u-boot-usb 2015-07-24 16:39:56 -04:00
Rob Herring 58d6d139c3 usb: ci_udc: fix request allocation when endpoints are disabled
The ci_udc driver request allocation assumes that the endpoint descriptor
pointer is set to retrieve the endpoint number, but that is only true
when the endpoint is enabled. This results in a NULL ptr dereference
which for me happens to return 0 value. This causes the EP0 request
struct to be returned for other endpoints. Some gadget drivers like
fastboot and USB MS work fine, but ethernet does not.

Really, the ci_udc driver is the oddball here doing this EP0 special
case handling Stephen added. All the other drivers alloc/free functions
are pretty much the same with the only variation being the size of the
private struct. This could all be consolidated to a common function.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
2015-07-24 22:08:38 +02:00
Daniel Kochmański bf5b9b103c sunxi: spl: Remove redundant check from `board_mmc_init` for signature
Remove the boot signature check from board_mmc_init() in spl mode, as it
is already done in spl_boot_device() in this case, and update the comments
to reflect this.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
CC: Roy Spliet <r.spliet@ultimaker.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
[hdegoede@redhat.com: Disable the check only for SPL instead of always]
Acked-by: Hans De Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-07-24 16:17:09 +02:00
Daniel Kochmański a151403fd2 sunxi: spl: Detect at runtime where SPL was read from
Make possible using a single `u-boot-sunxi-with-spl.bin` binary for both NAND
memory and SD card. Detection where SPL was read from is implemented in
`spl_boot_device`.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
CC: Roy Spliet <r.spliet@ultimaker.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
[hdegoede@redhat.com: Some small coding style fixes]
Acked-by: Hans De Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-07-24 16:17:08 +02:00
Daniel Kochmański 645c48f50e sunxi: Create helper function veryfing valid boot signature on MMC
This patch extracts checking for valid SD card "eGON.BT0" signature from
`board_mmc_init` into function `sunxi_mmc_has_egon_boot_signature`.

Buffer for mmc sector is allocated and freed at runtime. `panic` is
triggered on malloc failure.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
CC: Roy Spliet <r.spliet@ultimaker.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
[hdegoede@redhat.com: Small bugfix to make it work for devs other then mmc0]
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-07-24 16:17:08 +02:00
Daniel Kochmański 1b26bab12e mmc: Protect `mmc_initialize` from initialising mmc multiple times
`mmc_initialize` might be called multiple times leading to the mmc-controllers
being initialised twice, and initialising the `mmc_devices` list head twice
which may lead to memory leaks.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
CC: Roy Spliet <r.spliet@ultimaker.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
CC: Pantelis Antoniou <panto@antoniou-consulting.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-07-24 16:17:08 +02:00
Stefan Roese 5a9749ee12 arm: marvell: Increase MAXARGS to 32
This makes more complex U-Boot scripts possible.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
2015-07-24 09:48:07 +02:00
Stefan Roese 7853c508e4 arm: mvebu: db-88f6820-gp: Add SDIO/MMC SPL boot support
This patch adds the configuration options to boot via SDIO/MMC on the
Marvell DB-88F6820-GP Armada A38x board. The default boot device
is still SPI NOR flash.

To enable MMC booting on this board 2 things need to be changes:
a) Change kwbimage.cfg
   BOOT_FROM   sdio
b) In the config header select
   #define CONFIG_SPL_BOOT_DEVICE	SPL_BOOT_SDIO_MMC_CARD

The generated image needs to be copied to the first bootable MMC
partition:

dd if=u-boot-spl.kwb of=/dev/sdX1

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
2015-07-24 09:47:02 +02:00
Stefan Roese 4bfcc54c0b spl: spl_mmc: Add option to boot from a MMC partition with offset
This patch introduces the option to boot from a MMC card parition with
an offset. This can be done by using both defines together:

define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1
define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR    ((160 << 10) / 512)

The example above loads the main U-Boot at offset 160KiB from the MMC
partition 1.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Tom Rini <trini@konsulko.com>
2015-07-24 09:46:45 +02:00
Stefan Roese 7ddf8cfb0d kwbimage: Rename CONFIG_SYS_SPI_U_BOOT_OFFS to CONFIG_SYS_U_BOOT_OFFS
To use this offset for other boot device (like SDIO/MMC), lets rename
it to a more generic name. This will be used be the SDIO/MMC SPL boot
support for the A38x.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
2015-07-24 09:46:21 +02:00
Stefan Roese 1bbe63c3f2 kwbimage: Add support for SDIO/MMC boot device selection
This patch adds support to select the "sdio" as boot device in the
kwbimage.cfg file. This line selects this SDIO device:

BOOT_FROM  sdio

Tested on Marvell DB-88F6820-GP board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
2015-07-24 09:45:56 +02:00