]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
5 years agoARM: imx: vining2000: Convert to ethernet DM
Marek Vasut [Tue, 26 Nov 2019 08:39:10 +0000 (09:39 +0100)]
ARM: imx: vining2000: Convert to ethernet DM

Convert the board to ethernet DM support. Adjust board file accordingly,
as the board_eth_init() contains custom clock configuration required for
this board to work. Furthermore, enable FEC1 clock to make FEC1 work as
well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: imx: vining2000: Enable DDR DRAM calibration
Marek Vasut [Tue, 26 Nov 2019 08:39:09 +0000 (09:39 +0100)]
ARM: imx: vining2000: Enable DDR DRAM calibration

Enable DRAM calibration in SPL to improve behavior of the board
in edge conditions of the thermal envelope of the board and make
it even more stable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: imx: vining2000: Convert to SPL framework
Marek Vasut [Tue, 26 Nov 2019 08:39:08 +0000 (09:39 +0100)]
ARM: imx: vining2000: Convert to SPL framework

In preparation for use of DDR DRAM fine-tuning upon boot,
convert the board to SPL framework instead of using DCD
tables to bring up DRAM and pinmux.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: mx6: pmu: Expose PMU LDO configuration interface
Marek Vasut [Tue, 26 Nov 2019 08:35:32 +0000 (09:35 +0100)]
ARM: mx6: pmu: Expose PMU LDO configuration interface

Make the PMU LDO configuration interface available to board code,
so that board code can reconfigure the internal LDOs of the SoC.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eric Nelson <eric@nelint.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Eric Nelson <eric@nelint.com>
5 years agoboard: colibri_imx7: reserve DDR memory for Cortex-M4
Igor Opaniuk [Tue, 3 Dec 2019 12:04:47 +0000 (14:04 +0200)]
board: colibri_imx7: reserve DDR memory for Cortex-M4

i.MX 7's Cortex-M4 core can run from DDR and uses DDR memory for
the rpmsg communication. Both use cases need a fixed location of
memory reserved. For the rpmsg use case the reserved area needs
to be in sync with the kernel's hardcoded vring descriptor location.

Use the linux,usable-memory property to carve out 1MB of memory
in case the M4 core is running. Also make sure that the i.MX 7
specific rpmsg driver does not get loaded in case we do not carve
out memory.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
5 years agocommon: fdt_support: add support for setting usable memory
Igor Opaniuk [Tue, 3 Dec 2019 12:04:46 +0000 (14:04 +0200)]
common: fdt_support: add support for setting usable memory

Add support for setting linux,usable-memory property in the memory
node of device tree for the kernel [1].

This property holds a base address and size, describing a
limited region in which memory may be considered available for use by
the kernel. Memory outside of this range is not available for use.

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
5 years agowarp7: Fix U-Boot corruption after saving the environment
Fabio Estevam [Mon, 2 Dec 2019 23:40:28 +0000 (20:40 -0300)]
warp7: Fix U-Boot corruption after saving the environment

U-Boot binary has grown in such a way that it goes beyond the reserved
area for the environment variables.

Running "saveenv" followed by a "reset" causes U-Boot to hang because
of this overlap.

Fix this problem by increasing the CONFIG_ENV_OFFSET size.

Also, in order to prevent this same problem in the future, use
CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time.

CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare
CONFIG_ENV_OFFSET with its direct value instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Acked-by: Joris Offouga <offougajoris@gmail.com>
Tested-by: Joris Offouga <offougajoris@gmail.com>
5 years agomx6: Allow configuring the NoC registers on i.MX6QP
Fabio Estevam [Mon, 4 Nov 2019 12:44:34 +0000 (09:44 -0300)]
mx6: Allow configuring the NoC registers on i.MX6QP

The NoC registers on i.MX6QP needs to be configured, otherwise some
usecases in the kernel behave incorrectly, such as rotation and resize.

Currently the NoC registers are not configured in the kernel, so
configure them in U-Boot like it is done in the NXP U-Boot tree.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
5 years agomx6cuboxi: Add Baruch as maintainer
Fabio Estevam [Thu, 7 Nov 2019 20:06:21 +0000 (17:06 -0300)]
mx6cuboxi: Add Baruch as maintainer

Add Baruch Siach as a mx6cuboxi maintainer.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
5 years agomx7ulp: Sync the device tree related files
Fabio Estevam [Tue, 5 Nov 2019 12:47:54 +0000 (09:47 -0300)]
mx7ulp: Sync the device tree related files

Sync the mx7ulp device tree related files with the one from
NXP U-Boot vendor tree (imx_v2019.04_4.19.35_1.0.0).

The mainline support for i.MX7ULP is very premature at this stage.

We should probably re-sync with mainline Linux dts when it gets
in better shape, but for now sync with the U-Boot vendor code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agomx7ulp: scg: Remove unnused scg_a7_apll_init()
Fabio Estevam [Tue, 5 Nov 2019 12:47:53 +0000 (09:47 -0300)]
mx7ulp: scg: Remove unnused scg_a7_apll_init()

scg_a7_apll_init() is not called anywhere, so remove such dead code

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agomx7ulp: Remove the _RUN notation from the PMC1 LDOVL definitions
Fabio Estevam [Tue, 5 Nov 2019 12:47:52 +0000 (09:47 -0300)]
mx7ulp: Remove the _RUN notation from the PMC1 LDOVL definitions

The LDOVL definitions is common to all the modes, not only RUN mode,
so in order to avoid confusion, remove the _RUN notation from the PMC1
LDOVL definitions.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agomx7ulp: Introduce the CONFIG_LDO_ENABLED_MODE option
Fabio Estevam [Tue, 5 Nov 2019 12:47:51 +0000 (09:47 -0300)]
mx7ulp: Introduce the CONFIG_LDO_ENABLED_MODE option

Introduce the CONFIG_LDO_ENABLED_MODE option so that i.MX7ULP boards
designed to operate with LDO enabled mode can work with 0.95V at LDO
output in RUN mode as per the datasheet.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agomx7ulp: Print the LDO mode status
Fabio Estevam [Tue, 5 Nov 2019 12:47:50 +0000 (09:47 -0300)]
mx7ulp: Print the LDO mode status

As per the i.MX7ULP datasheet, it can boot in LDO enabled mode
or LDO bypass mode.

Print the LDO mode status in the U-Boot log for convenience.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agotbs2910: Disable VxWorks image booting support
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>
5 years agoPrepare v2020.01-rc4
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>
5 years agoMerge branch '2019-12-02-master-imports'
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

5 years agocommon: Move old EEPROM functions into a new header
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>
5 years agocommon: Drop get_endaddr()
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>
5 years agocommon: Move trap_init() out of common.h
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>
5 years agocommon: Move pci_init_board() out of common.h
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>
5 years agocommon: Move some board functions out of common.h
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>
5 years agocommon: Move board_get_usable_ram_top() out of common.h
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>
5 years agocommon: Drop board_show_dram()
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>
5 years agocommon: Move command functions out of common.h
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>
5 years agocommon: Move enable/disable_interrupts out of common.h
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>
5 years agocommon: Move interrupt functions into a new header
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>
5 years agoarm: powerpc: Tidy up code style for interrupt functions
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>
5 years agocommon: Move ARM cache operations out of common.h
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>
5 years agocommon: Drop checkicache() and checkdcache()
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>
5 years agocommon: Move some cache and MMU functions out of common.h
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>
5 years agoarm: powerpc: Tidy up code style for cache functions
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>
5 years agocommon: Move some SMP functions out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:35 +0000 (12:57 -0700)]
common: Move some SMP functions out of common.h

These functions belong in cpu_func.h so move them over.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move checkcpu() out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:34 +0000 (12:57 -0700)]
common: Move checkcpu() out of common.h

This function belongs in cpu_func.h so move it over.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Drop cpu_init()
Simon Glass [Thu, 14 Nov 2019 19:57:33 +0000 (12:57 -0700)]
common: Drop cpu_init()

This function is not defined anywhere. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move some CPU functions out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:32 +0000 (12:57 -0700)]
common: Move some CPU functions out of common.h

These functions belong in cpu_func.h since they do not use driver model.
Move them over. Don't bother adding comments since these functions should
be deleted.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move mii_init() function out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:31 +0000 (12:57 -0700)]
common: Move mii_init() function out of common.h

This function belongs in mii.h so move it over.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move get_ticks() function out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:30 +0000 (12:57 -0700)]
common: Move get_ticks() function out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move timer_get_us() function out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:29 +0000 (12:57 -0700)]
common: Move timer_get_us() function out of common.h

This function belongs in time.h so move it over and update the comment
style.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoarm: pxa: Drop pxa_wait_ticks()
Simon Glass [Thu, 14 Nov 2019 19:57:28 +0000 (12:57 -0700)]
arm: pxa: Drop pxa_wait_ticks()

This function has a similar name to the common wait_ticks(). It is only
used in one place and seems small enough to drop.

Inline it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move wait_ticks functions out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:27 +0000 (12:57 -0700)]
common: Move wait_ticks functions out of common.h

This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move some time functions out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:26 +0000 (12:57 -0700)]
common: Move some time functions out of common.h

These functions belong in time.h so move them over and add comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Add a new lz4.h header file
Simon Glass [Thu, 14 Nov 2019 19:57:25 +0000 (12:57 -0700)]
common: Add a new lz4.h header file

Add a header file to house the lz4 compression function. Add a comment
while we are here, since it not even clear from the name what the function
actuall does.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move serial functions out of common.h
Simon Glass [Thu, 14 Nov 2019 19:57:24 +0000 (12:57 -0700)]
common: Move serial functions out of common.h

These functions belong in serial.h so move them over.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move serial_printf() to the serial header
Simon Glass [Thu, 14 Nov 2019 19:57:23 +0000 (12:57 -0700)]
common: Move serial_printf() to the serial header

Move this function header to serial.h since this function is clearly
related to serial. The function itself stays in console.c since we don't
have a single serial file. DM and non-DM each has a separate file so we
would have to either create a new common serial file, or repeat the
function in both serial.c and serial-uclass.c, neither of which seem
worthwhile.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoserial: usb: Correct the usbtty_...() prototypes
Simon Glass [Thu, 14 Nov 2019 19:57:22 +0000 (12:57 -0700)]
serial: usb: Correct the usbtty_...() prototypes

The function declarations in serial.h are not in sync with what is
currently used in usbtty. Fix this by updating the header and including
it, to help catch future such problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move env_get_ip() to net.h
Simon Glass [Thu, 14 Nov 2019 19:57:21 +0000 (12:57 -0700)]
common: Move env_get_ip() to net.h

This function relates to networking, so move it out of the common.h
header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoMove strtomhz() to vsprintf.h
Simon Glass [Thu, 14 Nov 2019 19:57:20 +0000 (12:57 -0700)]
Move strtomhz() to vsprintf.h

At present this function sits in its own file but it does not really
justify it. There are similar string functions in vsprintf.h, so move it
there. Also add the missing function comment.

Use the vsprintf.h include file explicitly where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move sorting functions to their own header file
Simon Glass [Thu, 14 Nov 2019 19:57:19 +0000 (12:57 -0700)]
common: Move sorting functions to their own header file

These don't need to be in common.h so move them out into a new header.
Also add some missing comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move bootcount functions to their header file
Simon Glass [Thu, 14 Nov 2019 19:57:18 +0000 (12:57 -0700)]
common: Move bootcount functions to their header file

These don't need to be in common.h so move them out.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agospl: bootcount: Move code out of header file
Simon Glass [Thu, 14 Nov 2019 19:57:17 +0000 (12:57 -0700)]
spl: bootcount: Move code out of header file

It is not good practice to write code in a header file. If it is included
multiple times then the code can cause duplicate functions.

Move the bootcount_store() and bootcount_load() functions into SPL.

Note: bootcount is a bit strange in that it uses driver model but does not
define proper drivers. This should be fixed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocrc32: Use the crc.h header for crc functions
Simon Glass [Thu, 14 Nov 2019 19:57:16 +0000 (12:57 -0700)]
crc32: Use the crc.h header for crc functions

Drop inclusion of crc.h in common.h and use the correct header directly
instead.

With this we can drop the conflicting definition in fw_env.h and rely on
the crc.h header, which is already included.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocrc: Fix code style with crc functions
Simon Glass [Thu, 14 Nov 2019 19:57:15 +0000 (12:57 -0700)]
crc: Fix code style with crc functions

Some of these have a space before the bracket. Drop it to fix the style.
Add some missing function comments while here.

Note that u32 and u8 cannot be used here since crc.h is included on the
host side.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Drop linux/crc8.h
Simon Glass [Thu, 14 Nov 2019 19:57:14 +0000 (12:57 -0700)]
common: Drop linux/crc8.h

We have an existing U-Boot header for the one function that this defines.
Use that instead of the linux/ one. Move over the nice comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Move random-number functions into their own header
Simon Glass [Thu, 14 Nov 2019 19:57:13 +0000 (12:57 -0700)]
common: Move random-number functions into their own header

Create a new rand.h header file and move functions into it, to reduce
the size of common.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agostatus_led: Tidy up the code style
Simon Glass [Thu, 14 Nov 2019 19:57:12 +0000 (12:57 -0700)]
status_led: Tidy up the code style

There are a few whitespace problems with this code. Tidy them up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocommon: Drop global inclusion of status_led.h
Simon Glass [Thu, 14 Nov 2019 19:57:11 +0000 (12:57 -0700)]
common: Drop global inclusion of status_led.h

This is only used by a few files so it should not be in the common header.
Move it out.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoDrop CONFIG_SHOW_ACTIVITY
Simon Glass [Thu, 14 Nov 2019 19:57:10 +0000 (12:57 -0700)]
Drop CONFIG_SHOW_ACTIVITY

This feature is not enabled by any board. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agocommon: Move older CPU functions to their own header
Simon Glass [Thu, 14 Nov 2019 19:57:09 +0000 (12:57 -0700)]
common: Move older CPU functions to their own header

These should be moved to driver model, but in the meantime, move them
out of the common header to help reduce its size.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Mon, 2 Dec 2019 15:53:34 +0000 (10:53 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- fsl-qoriq : Minor bug fixes and updates on lx2160a, ls1028a, ls1012a,
  ls1043aqds platforms

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Mon, 2 Dec 2019 15:53:07 +0000 (10:53 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

- MIPS: remove Micronas VCT boards

5 years agoMIPS: remove Micronas VCT boards
Daniel Schwierzeck [Fri, 18 Oct 2019 13:13:26 +0000 (15:13 +0200)]
MIPS: remove Micronas VCT boards

The deadline for migration to CONFIG_DM is v2020.01. The VCT
baords would need an almost complete rewrite of all drivers to
support driver model.

Unless someone has access to the hardware and volunteers to do the migration,
the board should be scheduled for removal.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
5 years agoconfigs: ls1028a: enable CMD_DM
Alex Marginean [Fri, 22 Nov 2019 09:58:05 +0000 (11:58 +0200)]
configs: ls1028a: enable CMD_DM

Since at least some of the drivers relevant to LS1028A are now following
DM, it's useful to have dm command enabled by default.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agoboard: fsl: lx2160a: Fix the typo in board_fix_fdt
Pankaj Bansal [Wed, 20 Nov 2019 09:12:47 +0000 (09:12 +0000)]
board: fsl: lx2160a: Fix the typo in board_fix_fdt

Fix a typo that caused incorrect reg-name for pcie node in lx2160a rev2.

Fixes: 5d535aa40b ("board: fsl: lx2160a: implement board_fix_fdt")
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agoconfigs/lx2160a: Add CONFIG_ENV_SECT_SIZE in defconfig
Priyanka Jain [Tue, 26 Nov 2019 06:45:10 +0000 (06:45 +0000)]
configs/lx2160a: Add CONFIG_ENV_SECT_SIZE in defconfig

Define CONFIG_ENV_SECT_SIZE as 0x20000 in lx2160a related defconfigs:
lx2160ardb_tfa_defconfig, lx2160ardb_tfa_SECURE_BOOT_defconfig,
lx2160aqds_tfa_defconfig, lx2160aqds_tfa_SECURE_BOOT_defconfig

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 28 Nov 2019 12:34:41 +0000 (07:34 -0500)]
Merge git://git.denx.de/u-boot-socfpga

- Assorted Gen5 fixes

5 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Thu, 28 Nov 2019 12:34:21 +0000 (07:34 -0500)]
Merge git://git.denx.de/u-boot-usb

- USB keyboard improvements

5 years agoMerge tag 'mmc-11-27-2019' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Thu, 28 Nov 2019 12:33:45 +0000 (07:33 -0500)]
Merge tag 'mmc-11-27-2019' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- fsl_esdhc update and some cleanup in ls1021a/mpc83xx code
- mmc tmio sdhi update for hs400

5 years agoMerge tag 'u-boot-stm32-20191126' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Thu, 28 Nov 2019 12:33:16 +0000 (07:33 -0500)]
Merge tag 'u-boot-stm32-20191126' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- Solve warning for stih410-b2260
- Device tree alignment on v5.4-rc4 for all stm32 boards
- Correct the eMMC pin configuration on stm32mp157c-ev1
- Add DFU and SPI-NAND support for stm32mp1 board

5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
Tom Rini [Thu, 28 Nov 2019 12:32:44 +0000 (07:32 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx

- powerpc: Fix DM_MMC related build warnings by adding eSDHC device
  module support for T4240RDB, T2080RDB, T1042D4RDB, T1024RDB, P5040DS,
  P4080DS, P3041DS, P2041RDB, P2020RDB, P1020RDB platforms

5 years agommc: tmio: sdhi: Add calibration tables
Marek Vasut [Sat, 23 Nov 2019 12:36:25 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Add calibration tables

Instead of using single fixed value for the calibration offset,
add tables which dynamically adjust this per calibration code
from the SCC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: sdhi: Skip bad taps
Marek Vasut [Sat, 23 Nov 2019 12:36:24 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Skip bad taps

Some of the tuning taps produce suboptimal results. Add code
which skips those "bad" taps.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: sdhi: Add SCC error checking
Marek Vasut [Sat, 23 Nov 2019 12:36:23 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Add SCC error checking

Check SCC for errors after check command if applicable and
optionally adjust the bus skew settings accordingly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: sdhi: Disable auto-retuning in HS400
Marek Vasut [Sat, 23 Nov 2019 12:36:22 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Disable auto-retuning in HS400

Disable the auto-retuning in HS400 mode in favor of manual calibration.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: sdhi: Adjust HS400 calibration offsets
Marek Vasut [Sat, 23 Nov 2019 12:36:21 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Adjust HS400 calibration offsets

Adjust the TMPPORT3 offsets according to the latest information
from the chip vendor.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: sdhi: Adjust DT2FF settings for HS400 mode
Marek Vasut [Sat, 23 Nov 2019 12:36:20 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Adjust DT2FF settings for HS400 mode

Adjust the DT2FF offsets in HS400 according to latest information
from the chip vendor.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: sdhi: Use 4 tuning taps on M3W up to ES1.2
Marek Vasut [Sat, 23 Nov 2019 12:36:19 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Use 4 tuning taps on M3W up to ES1.2

The M3W up to ES1.2 uses 4 tuning taps for HS400, make it so.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: sdhi: Track SMPCMP valu in private data
Marek Vasut [Sat, 23 Nov 2019 12:36:18 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Track SMPCMP valu in private data

Retain the SMPCMP value from last calibration in private data.
This will be later used for skipping bad taps.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: sdhi: Track current tap number in private data
Marek Vasut [Sat, 23 Nov 2019 12:36:17 +0000 (13:36 +0100)]
mmc: tmio: sdhi: Track current tap number in private data

Retain the tap number from last calibration in private data. This
will be later used for SCC error checking after each command.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agompc83xx: remove unused clock.h
Yangbo Lu [Tue, 12 Nov 2019 11:28:39 +0000 (19:28 +0800)]
mpc83xx: remove unused clock.h

The clock.h was to define mxc_get_clock() providing clock value
to fsl_esdhc driver. Since fsl_esdhc driver is using global data
gd->arch.sdhc_clk directly now, we can remove this file.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agoarm: drop eSDHC clock getting in mxc_get_clock() for layerscape
Yangbo Lu [Tue, 12 Nov 2019 11:28:38 +0000 (19:28 +0800)]
arm: drop eSDHC clock getting in mxc_get_clock() for layerscape

Although layerscape platforms reuse mxc_get_clock() of i.MX platforms,
eSDHC clock getting do not have to use it. It uses global data
gd->arch.sdhc_clk directly in fsl_esdhc driver. Even there are more
than one eSDHC controllers on SoC, they use same reference clock.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agoarm: ls1021a: drop redundant board_mmc_init()
Yangbo Lu [Tue, 12 Nov 2019 11:28:37 +0000 (19:28 +0800)]
arm: ls1021a: drop redundant board_mmc_init()

The board_mmc_init() defined in board files is actually
doing same thing with the cpu_mmc_init() defined in
arch/arm/cpu/armv7/ls102xa/cpu.c. So drop it.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agommc: fsl_esdhc: get clock directly from global data
Yangbo Lu [Tue, 12 Nov 2019 11:28:36 +0000 (19:28 +0800)]
mmc: fsl_esdhc: get clock directly from global data

This patch is to get clock directly from global data.

- Remove uclass clk api method. This was what i.MX platforms were
  using, while QorIQ platforms weren't.
- Get clock only from global data, dropping mxc_get_clock().
  QorIQ eSDHC controllers on one silicon use same reference clock.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agommc: sdhci: make sdhci_get_cd static
Baruch Siach [Sun, 3 Nov 2019 10:00:27 +0000 (12:00 +0200)]
mmc: sdhci: make sdhci_get_cd static

sdhci_get_cd() is not referenced anywhere else. Limit its scope to
sdhci.c.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
5 years agoinclude/configs: ls1012a: add pfe stop command
Biwen Li [Fri, 15 Nov 2019 07:10:14 +0000 (15:10 +0800)]
include/configs: ls1012a: add pfe stop command

This adds pfe stop command before boot linux kernel
to fix a problem that ethernet won't be workable
after enter linux. Because there is a h/w limitation
in LS1012A PFE, to re-initialize PFE it has to be
safe shutdown, these steps are done through PFE stop.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agoarmv8: ls1043aqds: modify the qspi_bootcmd definition
Wen He [Thu, 14 Nov 2019 07:08:15 +0000 (15:08 +0800)]
armv8: ls1043aqds: modify the qspi_bootcmd definition

Fix the kernel offset of qspi_bootcmd scripts, followed
the qoriq_memory_layout definition.

Signed-off-by: Wen He <wen.he_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agoconfigs: ls1028a: enable OF_LIBFDT_OVERLAY
Alex Marginean [Thu, 14 Nov 2019 13:39:33 +0000 (15:39 +0200)]
configs: ls1028a: enable OF_LIBFDT_OVERLAY

LS1028A QDS board supports multiple combinations of SerDes protocols and
multiple add-on cards with Ethernet PHYs.  Some of them require specific
configuration in Linux DT, and the plan is to use DT overlays for them.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agoarmv8: ls1028a: Add environment variables to facilitate the boot
Yuantian Tang [Mon, 4 Nov 2019 07:10:45 +0000 (15:10 +0800)]
armv8: ls1028a: Add environment variables to facilitate the boot

Add some environment variables to facilitate the auto boot.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
5 years agostm32mp1: add support for virtual partition read
Patrick Delaunay [Mon, 14 Oct 2019 07:28:12 +0000 (09:28 +0200)]
stm32mp1: add support for virtual partition read

Add read for OTP and PMIC NVM with alternates
on virtual DFU device.

Serie-cc: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: add spi nand support
Patrick Delaunay [Mon, 14 Oct 2019 07:28:11 +0000 (09:28 +0200)]
stm32mp1: board: add spi nand support

This patch adds the support of the spi nand device in mtdparts command
and in dfu_alt_info.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agostm32mp1: configs: activate CONFIG_MTD_SPI_NAND
Patrick Delaunay [Mon, 14 Oct 2019 07:28:10 +0000 (09:28 +0200)]
stm32mp1: configs: activate CONFIG_MTD_SPI_NAND

Activate the support of SPI NAND in stm32mp1 U-Boot.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agostm32mp1: activate SET_DFU_ALT_INFO
Patrick Delaunay [Mon, 14 Oct 2019 07:28:09 +0000 (09:28 +0200)]
stm32mp1: activate SET_DFU_ALT_INFO

Generate automatically dfu_alt_info for the supported device.
The simple command "dfu 0" allows to start the dfu stack on usb 0
for the supported devices:
- dfu mtd for nand0
- dfu mtd for nor0
- dfu mmc for SDCard
- dfu mmc for eMMC
- dfu ram for images in DDR

The DUF alternate use the "part", "partubi" and "mmcpart" options
to select the correct MTD or GPT partition or the eMMC hw boot partition.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agostm32mp1: activate DFU support and command MTD
Patrick Delaunay [Mon, 14 Oct 2019 07:28:08 +0000 (09:28 +0200)]
stm32mp1: activate DFU support and command MTD

Add support of DFU for MMC, MTD, RAM and MTD command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoARM: dts: stm32: update eMMC configuration for stm32mp157c-ev1
Patrick Delaunay [Wed, 6 Nov 2019 15:16:34 +0000 (16:16 +0100)]
ARM: dts: stm32: update eMMC configuration for stm32mp157c-ev1

Update the sdmmc2 node for eMMC support on eval board stm32mp157c-ev1.
- update slew-rate for pin configuration
- update "vqmmc-supply"
- remove "st,sig-dir"
- add mandatory "pinctrl-names"
- add "mmc-ddr-3_3v"

This patch solve the eMMC detection issue for command "mmc dev 1".

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32: DT alignment with kernel v5.4-rc4
Patrick Delaunay [Wed, 6 Nov 2019 15:16:33 +0000 (16:16 +0100)]
ARM: dts: stm32: DT alignment with kernel v5.4-rc4

Device tree and binding alignment with kernel v5.4-rc4

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoARM: dts: stm32: DT alignment with kernel v5.3
Patrick Delaunay [Wed, 6 Nov 2019 15:16:32 +0000 (16:16 +0100)]
ARM: dts: stm32: DT alignment with kernel v5.3

Device tree and binding alignment with kernel v5.3
and converted to SPDX.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoconfigs: stih410-b2260: Enable DM_ETH flag
Patrice Chotard [Fri, 15 Nov 2019 10:57:03 +0000 (11:57 +0100)]
configs: stih410-b2260: Enable DM_ETH flag

This patch allows to fix the following compilation warning:

===================== WARNING ======================
This board does not use CONFIG_DM_ETH (Driver Model
for Ethernet drivers). Please update the board to use
CONFIG_DM_ETH before the v2020.07 release. Failure to
update by the deadline may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoMerge tag 'rpi-next-2020.01' of https://github.com/mbgg/u-boot
Tom Rini [Mon, 25 Nov 2019 17:56:27 +0000 (12:56 -0500)]
Merge tag 'rpi-next-2020.01' of https://github.com/mbgg/u-boot

- add RPi4 upstream compatible to pinctrl
- fix boot banner on RPi3/4
- add support for one binary on RPi3/4

5 years agoMerge tag 'fixes-for-v2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 25 Nov 2019 17:56:12 +0000 (12:56 -0500)]
Merge tag 'fixes-for-v2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- fix mxsfb regression on pico-imx7d and imx7d-sabre

5 years agosandbox: enable USB_KEYBOARD_FN_KEYS
Heinrich Schuchardt [Sat, 23 Nov 2019 17:15:24 +0000 (18:15 +0100)]
sandbox: enable USB_KEYBOARD_FN_KEYS

Enable the support of function keys on the USB keyboard. This is necessary
to test the USB keyboard driver.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>