Commit Graph

54520 Commits

Author SHA1 Message Date
Simon Goldschmidt
7d05d3a8e3 dtoc: make generated platdata structs const
The platdata initialization structs are currently generated into .rwdata.
Make sure the are put into .rodata by generating them as const.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-15 15:28:45 -05:00
Heinrich Schuchardt
d667090999 cmd: zip: use correct format code
dst_len is defined as unsigned long. So use %lu for printf().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15 15:28:44 -05:00
Heinrich Schuchardt
9ae2ddc82e cmd: unzip: use correct format code
src_len is defined as unsigned long. So use %lu for printf().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15 15:28:44 -05:00
Heinrich Schuchardt
76428561b3 cmd: ubi: remove unreachable code
It does not make sense to check if argc < 2 a second time, especially after
accessing argv[1].

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15 15:28:44 -05:00
Heinrich Schuchardt
1d1af2ae5a cmd: tpm-v2: use correct format code
updates is defined as unsigned int. So use %u for printf().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15 15:28:44 -05:00
Heinrich Schuchardt
c6b2ea379c cmd: sf: use correct printf code
test->time_ms[] is defined as unsigned. So use %u for printf().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-15 15:28:44 -05:00
Heinrich Schuchardt
82919517fb cmd: nvedit: use correct format code
len is defined as unsigned. So use %u for printf().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15 15:28:43 -05:00
Heinrich Schuchardt
b1970013d4 cmd: gpio: use correct printf code
gpio is defined as unsigned int. So we should use %u when calling printf().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-15 15:28:43 -05:00
Patrice Chotard
6e00104880 configs: stm32: Remove CONFIG_OF_EMBED
Building with CONFIG_OF_EMBED generates build warnings, as it should
only be used for debugging purposes.

Remove CONFIG_OF_EMBED from all stm32 config files which are using
this flag.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-01-15 15:28:43 -05:00
Marek Vasut
1d044d323d cmd: mmc: Invalidate MMC block cache after init
Make sure the block cache is cleared for the MMC device after it was
reinitialized to avoid having any stale data in the cache, like e.g.
partition tables or such.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-15 15:28:43 -05:00
Marek Vasut
d2a083696e cmd: mmc: Force mmc reinit when no card present
In case the card is removed, force-init the MMC to start the internal
machinery which deregisters and invalidate the MMC device.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-15 15:28:43 -05:00
Marek Vasut
b9a2a0e2e9 mmc: Add support for downgrading HS200/HS400 to HS mode
The mmc_select_mode_and_width() function can be called while the card
is in HS200/HS400 mode and can be used to downgrade the card to lower
mode, e.g. HS. This is used for example by mmc_boot_part_access_chk()
which cannot access the card in HS200/HS400 mode and which is in turn
called by saveenv if env is in the MMC.

In such case, forcing the card clock to legacy frequency cannot work.
Instead, the card must be switched to HS mode first, from which it can
then be reprogrammed as needed.

However, this procedure needs additional code changes, since the current
implementation checks whether the card correctly switched to HS mode in
mmc_set_card_speed(). The check only expects that the card will be going
to HS mode from lower modes, not from higher modes, hence add a parameter
which indicates that the HS200/HS400 to HS downgrade is happening. This
makes the code send the switch command first, reconfigure the controller
next and finally perform the EXT_CSD readback check. The last two steps
cannot be done in reverse order as the card is already in HS mode when
the clock are being switched on the controller side.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-15 15:28:42 -05:00
Enric Balletbo i Serra
9a878e8f17 am335x: igep003x: Add Device Tree Support and DM_MMC driver
This adds device tree and the DM_MMC driver for the AM335x IGEP based
boards.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-01-15 15:28:42 -05:00
Enric Balletbo i Serra
e5f0878c07 am335x: sl50: Add Device Tree Support and DM_MMC driver
This adds device tree and the DM_MMC driver for the SL50 board.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-01-15 15:28:42 -05:00
Enric Balletbo i Serra
8fd8f2e4fc omap3: igep00x0: Add Device Tree Support and DM_MMC driver
This adds device tree for OMAP3 IGEP based boards and the DM_MMC driver.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-01-15 15:28:42 -05:00
Enric Balletbo i Serra
94b9a0cc46 omap3: igep00x0: Switch to simple malloc in SPL
To save more space, switch to simple malloc here.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-01-15 15:28:42 -05:00
Enric Balletbo i Serra
829d6465b0 omap3: igep00x0: Switch to using TI_COMMON_CMD_OPTION
Enable TI_COMMON_CMD_OPTIONS and remove similar options
from the defconfig.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-01-15 15:28:42 -05:00
Enric Balletbo i Serra
2432dace11 omap3: igep00x0: Remove USB support due DM_USB deadline
The USB support for this board was never really tested, in fact, the
presence of these options are more a copy & paste error from the
Beagleboard than a feature that really was used. As doesn't work, remove
for now. If someone at some point want to add this support he'll need to
migrate the board to use CONFIG_DM_USB instead.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-01-15 15:28:41 -05:00
Enric Balletbo i Serra
f88a34defe omap3: igep00x0: Remove unmaintained IGEP0032 defconfig
The IGEP0032 board was never officially pushed upstream and actually I
don't have access to this hardware, unless someone with the hardware
wants to start working on this doesn't makes sense have this defconfig
here. So remove it.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-01-15 15:28:41 -05:00
Simon Glass
871bf7d9ba test: Use single quote consistently
Some tests have ended up using double quotes where single quotes could be
used. Adjust this for consistency with the rest of U-Boot's Python code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15 15:28:41 -05:00
Manivannan Sadhasivam
a50eb64915 arm: dts: Add MMC nodes for HiKey board
Add MMC nodes for HiKey board based on HI6220 SoC. There are three MMC
controllers in this SoC, first one used for eMMC, second one used
for SD card and third one is not used by u-boot.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-01-15 15:28:21 -05:00
Manivannan Sadhasivam
6240e64f92 mmc: Convert HI6220 MMC driver to driver model
Convert HiSilicon HI6220 MMC driver based on DWMMC IP to driver
model.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Enable this on poplar]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-01-15 15:28:10 -05:00
Manivannan Sadhasivam
5bb409c1ba include: configs: Add gunzip size for HiKey board
Default 8MB gunzip size is not enough to load the release kernel, hence
fix 64MB size for uncompressing the kernel.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-14 17:43:18 -05:00
Weijie Gao
b5d29e4390 configs: MediaTek: use OF_SEPARATE instead of OF_EMBED
This patch replace OF_EMBED with OF_SEPARATE of defconfig files of
MediaTek boards because now OF_EMBED is only used for debugging purpose.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-14 17:43:18 -05:00
Weijie Gao
d049ff9ca5 MAINTAINERS: ARM MEDIATEK: update file entries
This patch adds new file entries for MediaTek SoCs

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-01-14 17:43:18 -05:00
Weijie Gao
d7fe0ad285 arm: MediaTek: add ethernet support for MT7629 boards
Enable ethernet related configs to mt7629_rfb_defconfig.
Add default IP addresses.
Enable noncached memory region required by ethernet driver.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
2019-01-14 17:43:18 -05:00
Weijie Gao
8505cdde8e arm: MediaTek: add ethernet support for MT7623 boards
Enable ethernet related configs to mt7623n_bpir2_defconfig.
Add default IP addresses.
Enable noncached memory region required by ethernet driver.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
2019-01-14 17:43:18 -05:00
Weijie Gao
9d42b613a8 arm: dts: add ethernet related node for MT7629 SoC
This patch adds ethernet gmac node for MT7629 with internal gigabit phy.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
2019-01-14 17:43:18 -05:00
Weijie Gao
d9506a6fdd arm: dts: add ethernet related node for MT7623 SoC
This patch adds ethernet gmac node for MT7623 with MT7530 gigabit switch.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
2019-01-14 17:43:18 -05:00
Weijie Gao
23f17164d9 ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs
This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>
2019-01-14 17:43:18 -05:00
Weijie Gao
2dca3cc2a9 clk: MediaTek: bind ethsys reset controller
The ethsys contains not only the clock gating controller, but also the
reset controller for the whole ethernet subsystem and its components.

This patch adds binding of the reset controller so that the ethernet node
can have references on it.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-01-14 17:43:18 -05:00
Weijie Gao
3e066bcaef reset: MedaiTek: add reset controller driver for MediaTek SoCs
This patch adds reset controller driver for MediaTek SoCs.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-01-14 17:43:18 -05:00
Shawn Guo
37cbd8918c poplar_defconfig: enable fastboot support
It enables fastboot support on Poplar board by using DWC2 OTG gadget
driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2019-01-14 17:43:18 -05:00
Shawn Guo
e7ab6dfc65 poplar: add DWC2 OTG gadget support
It enables DWC2 OTG gadget driver support for Poplar board.  As
usb2_phy_init() is being always called from board_init(), we can save
the call from board_usb_init().

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2019-01-14 17:42:44 -05:00
Simon Goldschmidt
596be5f327 image: fix compiling without CMD_FDT
Booting an image currently sets the environment variable "fdtaddr"
by calling into 'cmd/fdt.c'. As a result, linking U-Boot fails if
CMD_FDT is not enabled.

Fix this by adding 'if (CONFIG_IS_ENABLED(CMD_FDT))' to the two
places where 'set_working_fdt_addr()' is called.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-01-14 17:42:32 -05:00
Yan Liu
eddb7278d7 am57xx_evm_defconfig: Enable YMODEM support
Enable CONFIG_SPL_YMODEM_SUPPORT to support UART boot

Signed-off-by: Yan Liu <yan-liu@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-01-14 17:41:23 -05:00
Philipp Tomsich
6f2d59cb7f test: bootcount: add bootcount-uclass test
Add a test for the bootcount uclass, which uses the RTC bootcount backend
(i.e. drivers/bootcount/rtc.c is implictly also tested).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-14 17:41:23 -05:00
Tom Rini
d3689267f9 Prepare v2019.01
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-01-14 17:02:36 -05:00
Fabio Estevam
29c2edb42b mmc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common()
The following hang is observed on a Hummingboard 2 MicroSOM
i2eX iMX6D - rev 1.3 with no eMMC populated on board:

U-Boot SPL 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)
Trying to boot from MMC1

U-Boot 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)

CPU:   Freescale i.MX6D rev1.5 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 33C
Reset cause: POR
Board: MX6 HummingBoard2
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

No panel detected: default to HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
---> hangs

which is caused by the following infinite loop inside esdhc_send_cmd_common()

	while (!(esdhc_read32(&regs->irqstat) & flags))
		;

Instead of looping forever, provide an exit path so that a timeout
error can be propagated in the case irqstat does not report
any interrupts, which may happen when no eMMC is populated on
board.

Reported-by: Ricardo Salveti <rsalveti@rsalveti.net>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Ricardo Salveti <rsalveti@rsalveti.net>
2019-01-14 11:26:12 -05:00
Fabio Estevam
789ee25de6 imx8mq_evk_defconfig: Move file system options to Kconfig
Chris Spencer reports that when enabling ext4 read support without
also enabling write support the following error is seen:

fs/fs.c:198:12: error: 'ext4_write_file' undeclared here (not in a
function); did you mean 'ext4_read_file'?
   .write = ext4_write_file,
            ^~~~~~~~~~~~~~~
Fix this problem by moving these options to Kconfig.

Reported-by: Chris Spencer <spencercw@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-01-14 11:26:12 -05:00
Alex Elder
cdee91a044 poplar: save environment at a different offset
Change CONFIG_ENV_OFFSET for Poplar to be 1MB further into the eMMC
than before.  This puts it immediately prior to the space we are
reserving offset 0x200000-0x400000 for UEFI to save its persistent
data.  Define CONFIG_ENV_SIZE as a product of env_mmc_nblks and the
sector size, like CONFIG_ENV_OFFSET is.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2019-01-14 09:09:15 -05:00
Tom Rini
c9e257a911 Merge branch 'master' of git://git.denx.de/u-boot-socfpga 2019-01-11 10:47:53 -05:00
Tom Rini
7f9418688d Merge branch 'master' of git://git.denx.de/u-boot-usb 2019-01-11 10:47:41 -05:00
Tom Rini
d3035b8560 Revert "fs: fat: assign rootdir sector when accessing root directory"
This particular commit is causing a regression on stih410-b2260 and
other platforms when reading from FAT16.  Noting that I had rebased the
original fix from Thomas onto then-current master, there is also
question from Akashi-san if the change is still needed after other FAT
fixes that have gone in.

This reverts commit a68b0e11ea.

Reported-by: Patrice Chotard <patrice.chotard@st.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Thomas RIENOESSL <thomas.rienoessl@bachmann.info>
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-01-11 10:15:42 -05:00
Lukasz Majewski
b6a6238f04 Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"
This reverts commit a7f4b4b344.

As reported by Alex Kiernan the above optimization introduces a
regression in the below use case where:

1. Device has defined 'u-boot,dm-spl' property (@ eMMC DTS node)

2. The device downloads its MLO/SPL via UART (not eMMC - the eMMC pinmux
pins are NOT probed/configured in MLO/SPL).

3. The loaded via UART MLO/SPL wants to load Linux from eMMC. In this case
the DM core and pinctrl uclass checks 'u-boot,dm-spl' and don't
configure pins (as it thinks that those were initialized in MLO/SPL).

As we are very close to release - please revert this commit.

Reported-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-11 10:03:42 -05:00
Tien Fong Chee
70cae47014 ARM: dts: socfpga: Add missing SDMMC reset
The SDMMC reset is missing from DT, so the reset manager cannot unreset
the SDMMC. Add the missing DT reset entry.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
2019-01-11 15:51:38 +01:00
Jean-Jacques Hiblot
b3c518a882 dm: usb: gadget: Fix boot breakage on sunxi platforms
Fixes commit 0131162439 ("dm: usb: create a new UCLASS ID for USB gadget
devices")

The UCLASS_DRIVER for id UCLASS_USB_GADGET_GENERIC needs to be declared
even for platforms that do not enable DM_USB_GADGET. Otherwise the driver
for their usb peripheral controller fails to bind.

Reported-by: Priit Laes <plaes@plaes.org>
Reported-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Priit Laes <plaes@plaes.org>
Acked-by: Jagan Teki <jagan@openedev.com>
2019-01-10 18:53:03 +01:00
Jean-Jacques Hiblot
db17a92d28 usb: Make compiling gadget support optional
There is no need to compile and include this code if it is not used.
CONFIG_USB_GADGET can be used for the purpose.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-01-10 18:52:55 +01:00
Jean-Jacques Hiblot
f811e9763f Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET
The SPL option for USB gadget should be named after the option for u-boot
(CONFIG_USB_GADGET)

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-01-10 18:52:55 +01:00
Jean-Jacques Hiblot
b975a52e02 ARM: dts: define USB aliases for all omap5 platforms
This allows us to properly map the USB controller indexes

Tested on dra76 evm, am572 evm

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-01-10 18:52:52 +01:00