Ben Wolsieffer [Tue, 3 Dec 2019 05:40:05 +0000 (00:40 -0500)]
rockchip: allow loading larger kernels
Recent versions of the Linux kernel with many options enabled have
grown large enough to overwrite the beginning of the initrd. For
example, the kernel I use on my Rock64 and RockPro64 is 34.1 MiB,
while only 31.5 MiB are available between kernel_addr_r and
ramdisk_addr_r.
This patch moves ramdisk_addr_r up by 32 MiB on the RK3328 and RK3399,
allowing for much larger kernels.
Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Ben Wolsieffer [Tue, 3 Dec 2019 05:24:31 +0000 (00:24 -0500)]
rockchip: rk3328: rock64: enable CONFIG_MISC_INIT_R
This enables reading of the cpuid and a static MAC address.
Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
David Wu [Tue, 3 Dec 2019 11:26:50 +0000 (19:26 +0800)]
pinctrl: rockchip: Add pinctrl support for rk3308
An iomux register contains 8 pins, each of which is represented
by 2 bits, but the register offset is 0x8.
For example, GRF_GPIO0A_IOMUX offset is 0x0, but GRF_GPIO0B_IOMUX
offset is 0x8, the offset 0x4 is reserved.
So add a type IOMUX_8WIDTH_2BIT to calculate offset.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
David Wu [Tue, 3 Dec 2019 11:02:50 +0000 (19:02 +0800)]
arm: rockchip: rk3308: Initialize the iomux configuration
When we want to use plus pinctrl feature, we need to enable
them at spl.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
David Wu [Tue, 3 Dec 2019 09:49:53 +0000 (17:49 +0800)]
pwm: rk_pwm: Make PWM driver to support all Rockchip Socs
This PWM driver can be used to support pwm functions
for on all Rockchip Socs.
The previous chips than RK3288 did not support polarity,
and register layout was different from the RK3288 PWM.
The RK3288 keep the current functions.
RK3328 and the chips after it, which can support hardware lock,
configure duty, period and polarity at next same period, to
prevent the intermediate temporary state.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
David Wu [Tue, 26 Nov 2019 01:39:51 +0000 (09:39 +0800)]
dts: rk3308: Enable ethernet function supported for Firefly ROC_RK3308_CC
The Firefly ROC_RK3308_CC use ref_clock of input mode,
and rmii pins of m1 group.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
David Wu [Tue, 26 Nov 2019 01:39:50 +0000 (09:39 +0800)]
arm: dts: Add mac node for rk3308 at dtsi level
The rk3308 only support RMII mode, and if it is output clock
mode, better to use ref_clk pin with drive strength 12ma.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
David Wu [Tue, 26 Nov 2019 01:39:49 +0000 (09:39 +0800)]
net: gmac_rockchip: Add support for rk3308
Add the glue code to allow the rk3308 variant of the Rockchip gmac
to provide network functionality.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Kever Yang [Mon, 2 Dec 2019 07:58:17 +0000 (15:58 +0800)]
rockchip: config: add support for firefly-px30 board
This is a core board named Core-PX30-JD4 with a mainboard from Firefly,
name it as firefly-px30 for now.
This board can re-use the dts of PX30, the only difference is the UART IO,
the firefly use UART2 M1 while evb use UART2 M0.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Heiko Stuebner [Fri, 29 Nov 2019 15:40:43 +0000 (16:40 +0100)]
rockchip: misc: protect serial# from getting overwritten
serial# is one of the vendor properties and thus protected from being
overwritten if already set. If env_set is called anyway this result in
some nasty warnings, so check for presence before trying that.
In the same direction check for the presence of cpuid# and compare it
to the actual hardware and emit a warning if they don't match.
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Heiko Stuebner [Fri, 29 Nov 2019 15:40:42 +0000 (16:40 +0100)]
rockchip: misc: don't fail if eth_addr already set
rockchip_setup_macaddr() runs from an initcall, so returning an error
code will make that initcall fail thus breaking the boot process.
And if an ethernet address is already set this is definitly not a
cause for that, so just return success in that case.
Fixes:
04825384999f ("rockchip: rk3399: derive ethaddr from cpuid");
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Paul Kocialkowski [Thu, 28 Nov 2019 14:27:52 +0000 (15:27 +0100)]
rockchip: px30: Add support for using UART3 as debug UART
Some generic PX30 SoMs found in the wild use UART3 as their debug output
instead of UART2 (used for MMC) and UART5.
Make it possible to use UART3 as early debug output, with the associated
clock and pinmux configuration. Two sets of output pins are supported (M0/M1).
Future users should also note that the pinmux default in the dts is to use
the M1 pins while the Kconfig option takes M0 as a default.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Paul Kocialkowski [Thu, 28 Nov 2019 14:27:51 +0000 (15:27 +0100)]
rockchip: px30: Rename CONFIG_DEBUG_UART2_CHANNEL to CONFIG_DEBUG_UART_CHANNEL
UART3 also has two sets of pins that can be selected.
Rename the config option to a common name, to allow it to be used for both
UART2 and UART3.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Paul Kocialkowski [Thu, 28 Nov 2019 14:27:50 +0000 (15:27 +0100)]
rockchip: px30: Fixup PMUGRF registers layout order
According to the PX30 TRM, the iomux registers come first, before the pull
and strength control registers.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Andy Yan [Tue, 26 Nov 2019 13:15:40 +0000 (21:15 +0800)]
rockchip: evb-px5: disable NET
PX5 evb has no ETH port, so disable it.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Andy Yan [Tue, 26 Nov 2019 13:15:39 +0000 (21:15 +0800)]
rockchip: px5: enable spl-fifo-mode for emmc for px5-evb
We need load some parts of ATF to sram, but rockchip
dwmmc controllers can't do dma to non-ddr addresses
space, so set the mmc controller into fifo mode in spl.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Andy Yan [Tue, 26 Nov 2019 13:15:38 +0000 (21:15 +0800)]
rockchip: rk3308: enable spl-fifo-mode for emmc
We need load some parts of ATF to sram, but rockchip
dwmmc controllers can't do dma to non-ddr addresses
space, so set the mmc controller into fifo mode in spl.
And show my best respect to Heiko's work for this solution.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Andy Yan [Tue, 26 Nov 2019 13:15:37 +0000 (21:15 +0800)]
doc: rockchip: Update build instruction for rk3308
After commit
d8765e2422cd ("Enable building of u-boot.itb
on Rockchip platform"), u-boot.itb will automatically
generated by "make all" command, manually command
"make u-boot.itb" is no longer needed.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tom Rini [Wed, 4 Dec 2019 23:10:04 +0000 (18:10 -0500)]
Merge git://git.denx.de/u-boot-sh
- Convert some R-Car Gen3 platforms to DM_SPI{,_FLASH}
Tom Rini [Wed, 4 Dec 2019 22:18:38 +0000 (17:18 -0500)]
configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 4 Dec 2019 22:13:35 +0000 (17:13 -0500)]
Merge branch '2019-10-27-mtd-cleanup'
- Merge the series to clean up our MTD Kconfig and Makefile logic
Miquel Raynal [Fri, 25 Oct 2019 17:39:31 +0000 (19:39 +0200)]
mtd: Makefile: deep cleanup
Move MTD-related lines out of the root Makefile. Put them in their
respective directories. Enclose some of these new lines to skip them
when building the SPL. MTD core files and some MTD device drivers are
compiled in a mtd.o object and included in the final object only if
MTD support is required (there are two different symbols for that, one
for U-Boot and one for the SPL).
Now that all defconfigs have been fixed, we can stop the logic where
enabling a command selects the core files to compile. This logic is
broken since selecting a symbol with a 'depends on' will not enforce
this secondary dependency.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Fri, 25 Oct 2019 17:39:30 +0000 (19:39 +0200)]
cmd: make MTD commands depend on MTD
Defconfigs have been fixed, now we can add proper dependencies in
Kconfig. SPI FLASH is still not dependent on MTD (deeper rework needed).
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Fri, 25 Oct 2019 17:39:29 +0000 (19:39 +0200)]
cmd: nand/sf: isolate legacy code
The 'sf' command is not supposed to rely on the MTD stack, but both
'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite
their location, these functions do not depend at all on the MTD
stack.
This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD is
selected, which is inconsistent with the current situation. Solve this
by moving these three functions (which are only used by the above two
commands) out of mtd_uboot.c and put them in a C file only compiled
with cmd/sf.c and cmd/nand.c.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
[trini: Don't export get_part function now]
Signed-off-by: Tom Rini <trini@konsulko.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:25 +0000 (19:50 +0200)]
cmd: mtdparts: Kconfig: join mtdparts command entry with its options
Move the Kconfig entry of the option right after the entry of the
mtdparts command.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:24 +0000 (19:50 +0200)]
mtd: spi: SPI_FLASH_MTD depends on MTD
It is already the case that all defconfigs with SPI_FLASH_MTD also
declare using MTD, but let's make this consistent and enforce it in
Kconfig. Most of the time SPI_FLASH_MTD is used in conjunction with
UBI, which already depends on MTD.
Suggested-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:22 +0000 (19:50 +0200)]
dfu: add dependency on the raw NAND core
CONFIG_DFU_NAND needs the raw NAND core being compiled.
Also fix the colibri_vf defconfig to reflect this dependency.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:21 +0000 (19:50 +0200)]
mtd: nand: add includes in NAND core to avoid warnings
Because of the include's game, when some files are compiled for a SPI
NAND device, no warning appears. But when it is for a raw NAND device,
GCC complains. Fix these warning by including <common.h>.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:20 +0000 (19:50 +0200)]
configs: ls104x/ls108x/ls208x: Build the raw NAND core with TFABOOT
Enabling TFABOOT configuration will compile-in a call to nand_read in
the boot sequence. Handle the situation by also selecting officially
the raw NAND core in this case.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:19 +0000 (19:50 +0200)]
configs: socfpga: mcvevk: Remove useless UBI infos
There is no flash on this board, there is no reason to define MTD
environment variables nor UBI. Drop them from the configuration file.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Wolfgang Grandegger <wg@aries-embedded.de>
Miquel Raynal [Thu, 3 Oct 2019 17:50:18 +0000 (19:50 +0200)]
configs: remove MTD support from bcm11130 and M54418TWR defconfigs
While the right Kconfig entries were selected, because of the missing
CMD_NAND symbol the raw NAND core was never compiled. Remove it from
the defconfigs otherwise the build will fail.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
[trini: Also do this on bcm11130_nand]
Signed-off-by: Tom Rini <trini@konsulko.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:17 +0000 (19:50 +0200)]
configs: remove raw NAND core from k2g defconfigs
Due to previous Makefile organization, the raw NAND subdirectory was
not compiled in if CMD_NAND was not enabled. Because the Denali driver
does not compile with these boards (undefined environment offset),
remove the dependency within the defconfig over the controller driver
(was ignored anyway in the past).
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:16 +0000 (19:50 +0200)]
configs: move CONFIG_MTD in defconfigs when set in arch includes
Let's be consistent and always declare CONFIG_MTD from the defconfig
file when needed.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:15 +0000 (19:50 +0200)]
mtd: ensure MTD is compiled when CMD_MTDPARTS is selected
MTD support must be enabled when using mtdparts. Indeed, functions
like get_mtd_info(), get_mtd_device() and put_mtd_device() are in
drivers/mtd/mtd_uboot.c and are built only with CONFIG_MTD.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:14 +0000 (19:50 +0200)]
mtd: ensure CMD_NAND is compiled when its options are selected
In some files, options of CMD_NAND are selected but not the command
itself. Fix this inconsistency.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:13 +0000 (19:50 +0200)]
mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selected
Raw NAND support must be enabled when the environment is in NAND.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:12 +0000 (19:50 +0200)]
mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selected
UBI must be enabled when the environment is in UBI.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:09 +0000 (19:50 +0200)]
mtd: ensure UBI is compiled when using fastmap
UBI must be enabled when using fastmap, reflect this is defconfigs.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:08 +0000 (19:50 +0200)]
mtd: ensure MTD is compiled when there is a SPI NOR flash using MTD
MTD must be enabled when there is a SPI NOR flash using the
SPI_FLASH_MTD config entry.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:07 +0000 (19:50 +0200)]
mtd: ensure MTD/the raw NAND core are compiled when there is a NAND flash
Both symbols must be enabled when there is a raw NAND driver
selected. Also enable them when CONFIG_CMD_NAND is selected to avoid
breaking things when we'll further rework the MTD dependency
description.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
[trini: Rebase and migrate a few more boards here]
Signed-off-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Sat, 30 Nov 2019 20:50:48 +0000 (21:50 +0100)]
ARM: rmobile: Convert M2N Gose to DM_SPI{,_FLASH}
Enable DM_SPI and DM_SPI_FLASH in U-Boot on M2N Gose.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Sat, 30 Nov 2019 20:48:33 +0000 (21:48 +0100)]
ARM: rmobile: Convert M2W Koelsch to DM_SPI{,_FLASH}
Enable DM_SPI and DM_SPI_FLASH in U-Boot on M2W Koelsch.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Sat, 30 Nov 2019 20:45:25 +0000 (21:45 +0100)]
ARM: rmobile: Convert H2 Lager to DM_SPI{,_FLASH}
Enable DM_SPI and DM_SPI_FLASH in U-Boot on H2 Lager.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Miquel Raynal [Thu, 3 Oct 2019 17:50:05 +0000 (19:50 +0200)]
mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD
Like in Linux, just use CONFIG_MTD to compile the MTD stack.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:04 +0000 (19:50 +0200)]
mtd: rename CONFIG_MTD -> CONFIG_DM_MTD
CONFIG_MTD must be reserved for the MTD core. Like any other
subsystem, prefix the symbol by DM when it comes to DM support.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
[trini: Add Kconfig files]
Signed-off-by: Tom Rini <trini@konsulko.com>
Miquel Raynal [Thu, 3 Oct 2019 17:50:03 +0000 (19:50 +0200)]
mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND
Add more clarity by changing the Kconfig entry name.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
[trini: Re-run migration, update a few more cases]
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tom Rini [Tue, 3 Dec 2019 23:12:58 +0000 (18:12 -0500)]
Merge tag 'efi-2020-01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-01-rc5
A type error in the implementation of the efidebug command is fixed.
Tom Rini [Tue, 3 Dec 2019 23:12:04 +0000 (18:12 -0500)]
Merge tag 'dm-pull-3dec19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
Fix stdout-path handling
Tom Rini [Tue, 3 Dec 2019 23:10:17 +0000 (18:10 -0500)]
Merge branch '2019-12-03-master-imports'
- omapl138_lcdk fixes
- MediaTek MT8518 support
- VxWorks standard DTB support
- Assorted bug fixes
AKASHI Takahiro [Tue, 26 Nov 2019 01:11:22 +0000 (10:11 +0900)]
cmd: efidebug: fix a build error in show_efi_boot_opt()
I detected the following error in sandbox with Clang on Travis CI:
+cmd/efidebug.c:703:15: error: result of comparison of constant
9223372036854775822 with expression of type 'int' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
+ else if (ret == EFI_NOT_FOUND)
+ ~~~ ^ ~~~~~~~~~~~~~
Simply changing a type of 'ret' to efi_status_t will fix this error.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Michal Simek [Mon, 25 Nov 2019 09:28:45 +0000 (10:28 +0100)]
arm64: zynqmp: Point zcu216 defconfig to correct dts file
Defconfig is pointing to incorrect DT file which needs to be fix.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
mingming lee [Thu, 7 Nov 2019 11:28:44 +0000 (19:28 +0800)]
ARM: MediaTek: add basic support for MT8518 boards
This adds a general board file based on MT8518 SoCs from MediaTek.
Apart from the generic parts (cpu) we add some low level init codes
and initialize the early clocks.
This commit is adding the basic boot support for the MT8518 eMMC board.
Signed-off-by: mingming lee <mingming.lee@mediatek.com>
[trini: Migrate env location to defconfig, set ENV_IS_IN_MMC]
Signeed-off-by: Tom Rini <trini@konsulko.com>
mingming lee [Thu, 7 Nov 2019 11:28:43 +0000 (19:28 +0800)]
pinctrl: add driver for MT8518
Add Pinctrl driver for MediaTek MT8518 SoC.
Signed-off-by: mingming lee <mingming.lee@mediatek.com>
mingming lee [Thu, 7 Nov 2019 11:28:42 +0000 (19:28 +0800)]
mmc: mtk-sd: Adjust the mmc tuning flow
1.Support cmd response and data tuning together.
2.Support hs400 cmd responese tuning.
Signed-off-by: mingming lee <mingming.lee@mediatek.com>
mingming lee [Thu, 7 Nov 2019 11:28:41 +0000 (19:28 +0800)]
clk: mediatek: add driver for MT8518
Add clock driver for MediaTek MT8518 SoC.
Signed-off-by: mingming lee <mingming.lee@mediatek.com>
mingming lee [Thu, 7 Nov 2019 11:28:40 +0000 (19:28 +0800)]
ARM: MediaTek: Add support for MediaTek MT8518 SoC
Add support for MediaTek MT8518 SoC. This include the file
that will initialize the SoC after boot and its device tree.
Signed-off-by: mingming lee <mingming.lee@mediatek.com>
Faiz Abbas [Mon, 11 Nov 2019 09:59:05 +0000 (15:29 +0530)]
regmap: Fix potential memory leaks
Free allocated memory in case of an error in regmap_init_mem() and
regmap_init_mem_index().
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Faiz Abbas [Mon, 11 Nov 2019 09:52:56 +0000 (15:22 +0530)]
net: cpsw: Add NULL pointer check
Add null pointer check to take care of out of memory errors.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Lokesh Vutla [Thu, 14 Nov 2019 13:03:30 +0000 (18:33 +0530)]
spl: ymodem: Fix loading of fit image
spl ymodem driver always assumes that 1 BUF_SIZE is read in one stream.
This might not be true when image is not padded to BUF_SIZE and the last
sector that gets loaded will be < BUF_SIZE. Drop this assumption and use
the actual size that is loaded.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Bartosz Golaszewski [Thu, 14 Nov 2019 15:10:31 +0000 (16:10 +0100)]
mmc: davinci: fix mmc boot in SPL
The MMC boot is currently broken on omapl138-lcdk after enabling the
driver model in SPL. The main problem is the driver's bind callback not
being called after probe in SPL (even with the DM_FLAG_PRE_RELOC flag
specified).
While a proper fix is still being worked on, this hacky changeset at
least fixes the MMC boot on this platform by calling mmc_bind()
manually from probe().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Bartosz Golaszewski [Thu, 14 Nov 2019 15:10:30 +0000 (16:10 +0100)]
board: omapl138_lcdk: add the mmc device to SPL
We don't have full device-tree support in SPL yet - add an appropriate
U_BOOT_DEVICE() to the board file.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Bartosz Golaszewski [Thu, 14 Nov 2019 15:10:29 +0000 (16:10 +0100)]
mmc: davinci: drop struct davinci_mmc_plat
struct mmc_config & struct mmc don't need to be exported over platform
data, but can instead be private in the driver.
Remove struct davinci_mmc_plat.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Bartosz Golaszewski [Thu, 14 Nov 2019 15:10:28 +0000 (16:10 +0100)]
mmc: davinci: drop support for ti,dm6441-mmc
The DM family of DaVinci SoCs is no longer supported. Drop the
irrelevant code from the driver.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Adam Ford [Sun, 10 Nov 2019 16:17:58 +0000 (10:17 -0600)]
ARM: omapl138_lcdk: Allow early init to start instruction cache
Currently the omapl138_lcdk has SKIP_LOWLEVEL_INIT set.
The README states there is a variation of this for the ARM926EJ-S
which allows the board to just skip the call to lowlevel_init()
and do the normal CP15 init which enables the instruction cache.
On the da850evm, this was shown to improve startup time.
This patch switches SKIP_LOWLEVEL_INIT to SKIP_LOWLEVEL_INIT_ONLY
thus, enabling the cache.
Signed-off-by: Adam Ford <aford173@gmail.com>
Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Adam Ford [Sun, 10 Nov 2019 14:01:33 +0000 (08:01 -0600)]
ARM: omapl138_lcdk: Enable SPL_DM_SEQ_ALIAS and SPL_OF_TRANSLATE
In order to further prepare for full device tree support in SPL,
this patch enables both SPL_DM_SEQ_ALIAS and SPL_OF_TRANSLATE.
Both of these are already enabled in U-Boot, so SPL will have
the same functionality
Signed-off-by: Adam Ford <aford173@gmail.com>
Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Adam Ford [Sun, 10 Nov 2019 14:01:32 +0000 (08:01 -0600)]
ARM: omapl138_lcdk: Increase malloc pool before relocation
Driver model requires a malloc pool to allocate memory before
relocations to operate serial and some other devices. This patch
increases the pool size to 2K.
Signed-off-by: Adam Ford <aford173@gmail.com>
Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Adam Ford [Sun, 10 Nov 2019 14:01:31 +0000 (08:01 -0600)]
ARM: omapl138_lcdk: Separate BSS in SPL
In preparation to use full device tree support, SPL can separate
BSS from text region.
This patch enables SPL_SEPARATE_BSS.
Signed-off-by: Adam Ford <aford173@gmail.com>
Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Abhishek Shah [Tue, 19 Nov 2019 00:41:49 +0000 (16:41 -0800)]
cmd: pxe: Fix bootm argument count
pxe command parses the init ramfs address(through initrd lable in
pxe config file), but is not passing it to bootm command as argument
as bootm_argc count is not increased.
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Giulio Benetti [Tue, 26 Nov 2019 11:19:27 +0000 (12:19 +0100)]
armv7m: cache: add invalidate_icache_all() stub
This commit:
https://gitlab.denx.de/u-boot/u-boot/commit/
d409c962169bd293e39386d0ddfa64d5222a3be4
causes build failure with ICACHE enabled. This is due to missing
invalidate_icache_all() stub. Let's add empty invalidate_icache_all() in
the case where ICACHE is not enabled.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Matthias Brugger [Wed, 27 Nov 2019 16:41:06 +0000 (17:41 +0100)]
MAINTAINERS: Add info for bcm283x
The bcm283x has grown in files, which was not reflected in the
MAINTAINERS file. Fix this by adding the missing entries.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Tom Rini [Mon, 2 Dec 2019 15:52:31 +0000 (10:52 -0500)]
blk: Make use of CONFIG_HAVE_BLOCK_DEVICE more
When we do not have CONFIG_BLK (or SPL/TPL) enabled there are very few
cases where we need the blk_legacy code linked in. To catch these, build
when we have CONFIG_HAVE_BLOCK_DEVICE set. In addition, we only need
cmd/blk_common.o to be linked in when we have CONFIG_HAVE_BLOCK_DEVICE
set, so make use of that directly.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 27 Nov 2019 01:41:00 +0000 (20:41 -0500)]
mtd: mtdcore: Drop unused mtd_table
The array 'mtd_table' is unused in the code. Remove this as gcc doesn't
always discard unused global variables.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 27 Nov 2019 01:40:59 +0000 (20:40 -0500)]
pci: Only link pci_rom.o in some cases
The content of pci_rom.c is only used in a few cases. Only build and
link in these cases to avoid a global variable as gcc doesn't always
discard those when they are unused.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 26 Nov 2019 22:32:43 +0000 (17:32 -0500)]
Convert CONFIG_SYS_CORTINA_FW_IN_MMC et al to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_CORTINA_FW_IN_MMC
CONFIG_SYS_CORTINA_FW_IN_NAND
CONFIG_SYS_CORTINA_FW_IN_NOR
CONFIG_SYS_CORTINA_FW_IN_REMOTE
CONFIG_SYS_CORTINA_FW_IN_SPIFLASH
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 26 Nov 2019 22:32:42 +0000 (17:32 -0500)]
Convert CONFIG_PHY_CORTINA to Kconfig
This converts the following to Kconfig:
CONFIG_PHY_CORTINA
Signed-off-by: Tom Rini <trini@konsulko.com>
Lihua Zhao [Fri, 15 Nov 2019 08:21:17 +0000 (00:21 -0800)]
bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
Enhance do_bootm_vxworks() to support Linux compatible standard DTB
for ARM and PPC, when the least significant bit of flags in VxWorks
bootargs is set. Otherwise it falls back to the existing bootm flow
which is now legacy.
Signed-off-by: Lihua Zhao <lihua.zhao@windriver.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini [Wed, 27 Nov 2019 14:23:05 +0000 (09:23 -0500)]
tbs2910: Disable VxWorks image booting support
There are currently no known users of this functionality on this
platform, disable it to prepare for additional VxWorks functionality
that would cause this platform to fail to link.
Cc: Soeren Moch <smoch@web.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Soeren Moch <smoch@web.de>
Thomas Hebb [Thu, 14 Nov 2019 02:18:03 +0000 (18:18 -0800)]
cosmetic: Fix spelling and whitespace errors
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Thomas Hebb [Sun, 10 Nov 2019 16:25:10 +0000 (08:25 -0800)]
Makefile: add Rockchip idbloader.img to CLEAN_FILES
This file is generated in the root during Rockchip builds and so should
be cleaned up.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Thomas Hebb [Sun, 10 Nov 2019 16:25:09 +0000 (08:25 -0800)]
Makefile: consolidate hardcoded lists of files to clean
Currently, we have two places where we list files that should always be
cleaned if they exist. One, the CLEAN_FILES variable, is from the Linux
build system and is the proper place to list files.
The other, a set of extra arguments passed in the xargs template used to
remove files with certain extensions, was introduced by
8f06f0cee3d3
("Makefile: clean image.map") and is clearly wrong: by extending the
xargs template, we attempt to remove the files once for each batch of
arguments that xargs produces and we reduce the number of files from
stdin that xargs can include in each of its rm commands.
To fix this, put all hardcoded files into CLEAN_FILES.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Thomas Hebb [Sun, 10 Nov 2019 16:25:08 +0000 (08:25 -0800)]
Makefile: don't try to construct CLEAN_FILES based on config
All of the clean targets (clean, dist-clean, mrproper) are run without
loading a configuration. That means that any conditional modification of
CLEAN_FILES will either always apply or never apply and so shouldn't be
in a conditional in the first place.
Since CLEAN_FILES is allowed to list nonexistent files, just add
everything to it unconditionally to fix the issue.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Thomas Hebb [Sun, 10 Nov 2019 16:23:55 +0000 (08:23 -0800)]
Kconfig: make TPL_DM_SERIAL depend on TPL_DM
This missing dependency seems like an oversight, since all other
TPL_DM_* options have it.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Thomas Hebb [Sun, 10 Nov 2019 16:23:53 +0000 (08:23 -0800)]
Kconfig: disambiguate config names for tiny printf
27084c03d36a ("spl: Allow tiny printf() to be controlled in SPL and
TPL") split this option in two for TPL and SPL, but didn't change the
Kconfig names, making them hard to set quickly.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Tom Rini [Tue, 3 Dec 2019 03:09:27 +0000 (22:09 -0500)]
Prepare v2020.01-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 3 Dec 2019 03:05:35 +0000 (22:05 -0500)]
Merge branch '2019-12-02-master-imports'
- A large series of clean-ups to reduce common.h contents
Simon Glass [Thu, 14 Nov 2019 19:57:50 +0000 (12:57 -0700)]
common: Move old EEPROM functions into a new header
These functions do not use driver model but are still used. Move them to a
new eeprom.h header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:49 +0000 (12:57 -0700)]
common: Drop get_endaddr()
This is not used in U-Boot. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:48 +0000 (12:57 -0700)]
common: Move trap_init() out of common.h
Move this function into the init.h header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Simon Glass [Thu, 14 Nov 2019 19:57:47 +0000 (12:57 -0700)]
common: Move pci_init_board() out of common.h
This function can be dropped when all boards use driver model for PCI. For
now, move it into init.h with a comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:46 +0000 (12:57 -0700)]
common: Move some board functions out of common.h
A number of board function belong in init.h with the others. Move them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:45 +0000 (12:57 -0700)]
common: Move board_get_usable_ram_top() out of common.h
Move this function into init.h which seems to be designed for this sort
of thing. Also update the header to declare struct global_data so that it
can be included without global_data.h being needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:44 +0000 (12:57 -0700)]
common: Drop board_show_dram()
This function is not defined by any boards so the feature is not used.
Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:43 +0000 (12:57 -0700)]
common: Move command functions out of common.h
Move these functions into the command.h header file which is a better fit.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:42 +0000 (12:57 -0700)]
common: Move enable/disable_interrupts out of common.h
Move these two functions into the irq_funcs.h header file. Also move
interrupt_handler_t as this is used by the irq_install_handler() function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:41 +0000 (12:57 -0700)]
common: Move interrupt functions into a new header
These functions do not use driver model but are fairly widely used in
U-Boot. But it is not clear that they will use driver model anytime soon,
so we don't want to label them as 'legacy'.
Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it
is widely used in U-Boot already.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:40 +0000 (12:57 -0700)]
arm: powerpc: Tidy up code style for interrupt functions
Remove the unwanted space before the bracket.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:39 +0000 (12:57 -0700)]
common: Move ARM cache operations out of common.h
These functions are CPU-related and do not use driver model. Move them to
cpu_func.h
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:38 +0000 (12:57 -0700)]
common: Drop checkicache() and checkdcache()
These are used by only one arch and only within a single file. Drop the
declarations from the common file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:37 +0000 (12:57 -0700)]
common: Move some cache and MMU functions out of common.h
These functions belong in cpu_func.h. Another option would be cache.h
but that code uses driver model and we have not moved these cache
functions to use driver model. Since they are CPU-related it seems
reasonable to put them here.
Move them over.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Thu, 14 Nov 2019 19:57:36 +0000 (12:57 -0700)]
arm: powerpc: Tidy up code style for cache functions
Remove the unwanted space before the bracket.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>