[PATCH] spi: omap3_spi: Fix speed and mode selection

2020-11-28 Thread Vignesh Raghavendra
McSPI IP provides per CS specific speed and mode selection. Therefore it is possible to apply these settings only after CS is known. But set_speed and set_mode can be called without bus being claimed, this would lead driver to set up wrong CS (or previously used CS). Fix this by apply set_speed an

Re: [PATCH 2/3] efi_loader: Introduce eventlog support for TCG2_PROTOCOL

2020-11-28 Thread Heinrich Schuchardt
On 11/27/20 5:29 PM, Ilias Apalodimas wrote: In the previous patches we only introduced a minimal subset of the EFI_TCG2_PROTOCOL protocol implementing GetCapability(). So let's continue adding features to it, introducing the GetEventLog() and HashLogExtendEvent() functions. In order to do that

Re: [PATCH 1/3] tpm: Add tpm2 headers for TCG2 eventlog support

2020-11-28 Thread Heinrich Schuchardt
On 11/27/20 5:29 PM, Ilias Apalodimas wrote: A following patch introduces support for the EFI_TCG2_PROTOCOL evenlog management. %s/evenlog/eventlog/ Introduce the necessary tpm related headers Signed-off-by: Ilias Apalodimas --- include/tpm-v2.h | 59 ++

Re: [PATCH v9 08/11] tools: add mkeficapsule command for UEFI capsule update

2020-11-28 Thread Heinrich Schuchardt
On 11/27/20 3:22 PM, Heinrich Schuchardt wrote: Am 25. November 2020 08:32:08 MEZ schrieb AKASHI Takahiro : Heinrich, On Wed, Nov 25, 2020 at 07:42:31AM +0100, Heinrich Schuchardt wrote: Am 25. November 2020 02:05:06 MEZ schrieb AKASHI Takahiro : Heinrich, On Tue, Nov 24, 2020 at 09:23:50P

[PATCH 16/18] fs: fat: use constant DELETED_FLAG

2020-11-28 Thread Heinrich Schuchardt
When deleting a directory entry 0xe5 is written to name[0]. We have a constant for this value and should use it consistently. Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c ind

[PATCH 18/18] fs: fat: deletion of long file names

2020-11-28 Thread Heinrich Schuchardt
Long file names are stored in multiple directory entries. When deleting a file we must delete all of them. Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 88 +++--- 1 file changed, 76 insertions(+), 12 deletions(-) diff --git a/fs/fat/fat_wri

[PATCH 17/18] fs: fat: first dentry of long name in FAT iterator

2020-11-28 Thread Heinrich Schuchardt
A long name is split over multiple directory entries. When deleting a file with a long name we need the first directory entry to be able to delete the whole chain. Add the necessary fields to the FAT iterator: * cluster of first directory entry * address of first directory entry * remaining entri

[PATCH 15/18] fs: fat: search file should not allocate cluster

2020-11-28 Thread Heinrich Schuchardt
Searching for a file is not a write operation. So it should not lead to the allocation of a new cluster to the directory. If we reuse deleted entries, we might not even use the new cluster and due to not flushing it the directory could be corrupted. Signed-off-by: Heinrich Schuchardt --- fs/fat

[PATCH 08/18] fs: fat: call set_name() only once

2020-11-28 Thread Heinrich Schuchardt
In set_name() we select the short name. Once this is correctly implemented this will be a performance intensive operation because we need to check that the name does not exist yet. So set_name should only be called once. Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 87

[PATCH 13/18] fs: fat: fat_find_empty_dentries()

2020-11-28 Thread Heinrich Schuchardt
Provide a function to find a series of empty directory entries. The current directory is scanned for deleted entries. Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 62 +- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/fs/f

[PATCH 09/18] fs: fat: generate unique short names

2020-11-28 Thread Heinrich Schuchardt
File names must be unique within their directory. So before assigning a short name we must check that it is unique. Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 41 - 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/fs/fat/fat_

[PATCH 02/18] fs: fat: directory entries starting with 0x05

2020-11-28 Thread Heinrich Schuchardt
0x05 is used as replacement letter for 0xe5 at the first position of short file names. We must not skip over directory entries starting with 0x05. Cf. Microsoft FAT Specification, August 30 2005 Fixes: 39606d462c97 ("fs: fat: handle deleted directory entries correctly") Signed-off-by: Heinrich Sc

[PATCH 11/18] fs: fat: set start cluster for root directory

2020-11-28 Thread Heinrich Schuchardt
When iterating over a child directory we set itr->start_clust. Do the same when over the root directory. When looking for deleted directory entries or existing short names we will have to iterate over directories a second and third time. With this patch we do not need any special logic for the roo

[PATCH 14/18] fs: fat: reuse deleted directory entries

2020-11-28 Thread Heinrich Schuchardt
When creating new directory entries try to reuse entries marked as deleted. In fill_dir_slot() do not allocate new clusters as this has already been done in fat_find_empty_dentries(). Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 34 ++ 1 file chang

[PATCH 12/18] fs: fat: flush new directory cluster

2020-11-28 Thread Heinrich Schuchardt
When handling long file names directory entries may be split over multiple clusters. We must make sure that new clusters are zero filled on disk. When allocating a new cluster for a directory flush it. The flushing should be executed before updating the FAT. This way if flushing fails, we still h

[PATCH 10/18] fs: fat: dentry iterator for fill_dir_slot()

2020-11-28 Thread Heinrich Schuchardt
For reusing deleted directory entries we have to adjust the function called to step to the next directory entry. This patch alone is not enough to actually reuse deleted directory entries as the fill_dir_slot() is still called with first never used directory entry. Signed-off-by: Heinrich Schucha

[PATCH 01/18] fs: fat: avoid NULL dereference when root dir is full

2020-11-28 Thread Heinrich Schuchardt
When trying to create a file in the full root directory of a FAT32 filesystem a NULL dereference can be observed. When the root directory of a FAT16 filesystem is full fill_dir_slot() must return -1 to signal that a new directory entry could not be allocated. Fixes: cd2d727fff7e ("fs: fat: alloca

[PATCH 00/18] fs: fat: fix long name support

2020-11-28 Thread Heinrich Schuchardt
Since long name support was added to U-Boot's implementation of the FAT file system corruption of the directories was observed when running the UEFI Self Certifification Test. The following problems are addressed by this series. * short names were not unique * long names directory entries were no

[PATCH 05/18] fs: fat: export fat_next_cluster()

2020-11-28 Thread Heinrich Schuchardt
Rename function next_cluster() to fat_next_cluster() and export it. When creating a new directory entries we should reuse deleted entries. This requires re-scanning the directory. Signed-off-by: Heinrich Schuchardt --- fs/fat/fat.c | 106 +++--- incl

[PATCH 07/18] fs: fat: pass shortname to fill_dir_slot

2020-11-28 Thread Heinrich Schuchardt
Currently we pass the short name via the directory iterator. Pass it explicitly as a parameter. This removes the requirement to set the short name in the iterator before writing the long name. Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 20 1 file changed, 1

[PATCH 04/18] fs: fat: correct first cluster for '..'

2020-11-28 Thread Heinrich Schuchardt
The FAT specification [1] requires that for a '..' directory entry pointing to the root directory the fields DIR_FstClusHi and DIR_FstClusLo are 0. [1] Microsoft FAT Specification, Microsoft Corporation, August 30 2005 Fixes: 31a18d570d96 ("fs: fat: support mkdir") Signed-off-by: Heinrich Schucha

[PATCH 06/18] fs: fat: create correct short names

2020-11-28 Thread Heinrich Schuchardt
The current function set_name() used to create short names has the following deficiencies resolved by this patch: * Long names (e.g. FOO.TXT) are stored even if a short name is enough. * Short names with spaces are created, e.g. "A ~1.TXT". * Short names with illegal characters are created, e.

[PATCH 03/18] fs: fat: use ATTR_ARCH instead of anonymous 0x20

2020-11-28 Thread Heinrich Schuchardt
Using constants instead of anonymous numbers increases code readability. Fixes: 704df6aa0a28 ("fs: fat: refactor write interface for a file offset") Signed-off-by: Heinrich Schuchardt --- fs/fat/fat_write.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fat/fat_write.c

[PATCH 09/11] dm: core: Combine the flattree and livetree binding code

2020-11-28 Thread Simon Glass
At present there are two copies of this code. With ofnode we can combine them to reduce duplication. Update the dm_scan_fdt_node() function and adjust its callers. Signed-off-by: Simon Glass --- drivers/core/root.c | 74 ++--- 1 file changed, 16 insertion

[PATCH 11/11] dm: core: Drop unused parameter from dm_extended_scan_fdt()

2020-11-28 Thread Simon Glass
This doesn't need to be passed the devicetree anymore. Drop it. Also rename the function to drop the _fdt suffix. Signed-off-by: Simon Glass --- drivers/core/root.c | 6 +++--- include/dm/root.h | 5 ++--- test/dm/test-fdt.c | 2 +- test/dm/test-main.c | 2 +- 4 files changed, 7 insertions(+

[PATCH 10/11] dm: core: Drop unused parameter from dm_scan_fdt()

2020-11-28 Thread Simon Glass
This doesn't need to be passed the devicetree anymore. Drop it. Signed-off-by: Simon Glass --- drivers/core/root.c | 9 - include/dm/root.h | 3 +-- test/dm/core.c | 2 +- test/dm/test-fdt.c | 2 +- test/dm/test-main.c | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) d

[PATCH 07/11] dm: core: Drop device_bind_offset()

2020-11-28 Thread Simon Glass
This function is not needed since the standard device_bind() can be used instead. Drop it. Signed-off-by: Simon Glass --- drivers/core/device.c| 8 include/dm/device-internal.h | 10 +++--- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/core/device

[PATCH 08/11] dm: core: Add an ofnode function to get the devicetree root

2020-11-28 Thread Simon Glass
This is needed in at least one place. Avoid the conditional code in root.c by adding this inline function. Signed-off-by: Simon Glass --- drivers/core/root.c | 8 ++-- include/dm/ofnode.h | 12 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/core/root.c

[PATCH 05/11] dm: Drop uses of dev_set_of_offset()

2020-11-28 Thread Simon Glass
The need for this can be avoided by passing the correct node to the device_bind() function. Signed-off-by: Simon Glass --- drivers/gpio/mt7621_gpio.c| 3 +-- drivers/gpio/s5p_gpio.c | 4 +--- drivers/gpio/sunxi_gpio.c | 3 +-- drivers/gpio/tegra186_gpio.c

[PATCH 04/11] dm: Remove uses of device_bind_offset()

2020-11-28 Thread Simon Glass
This function is not needed since the standard device_bind() can be used instead. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/spl.c | 2 +- drivers/clk/at91/compat.c | 20 drivers/clk/clk.c | 2 +- drive

[PATCH 06/11] dm: core: Drop dev_set_of_offset()

2020-11-28 Thread Simon Glass
This pre-livetree function is not needed anymore. Drop it. Signed-off-by: Simon Glass --- include/dm/device.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/dm/device.h b/include/dm/device.h index 5bef4842470..25a77d08b9d 100644 --- a/include/dm/device.h +++ b/include/dm/device

[PATCH 03/11] dm: core: Add a livetree function to check node status

2020-11-28 Thread Simon Glass
Add a way to find out if a node is enabled or not, based on its 'status' property. Signed-off-by: Simon Glass --- drivers/core/ofnode.c | 10 ++ include/dm/ofnode.h | 11 +++ test/dm/ofnode.c | 12 3 files changed, 33 insertions(+) diff --git a/drivers/core/

[PATCH 02/11] dm: core: Rename device_bind_ofnode() to device_bind()

2020-11-28 Thread Simon Glass
This is the standard function to use when binding devices. Drop the '_ofnode' suffix to make this clear. Signed-off-by: Simon Glass --- drivers/core/device.c | 6 +++--- drivers/firmware/scmi/scmi_agent-uclass.c | 4 ++-- drivers/gpio/dwapb_gpio.c | 4 ++-- d

[PATCH 01/11] dm: core: Rename device_bind() to device_bind_offset()

2020-11-28 Thread Simon Glass
This function is not necessary anymore, since device_bind_ofnode() does the same thing and works with both flattree and livetree. Rename it to indicate that it is special. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/spl.c | 2 +- drivers/clk/clk.c

[U-Boot] Please pull from u-boot-i2c

2020-11-28 Thread Heiko Schocher
Hello Tom, The following changes since commit 7889951d0f56eab746a7c8fde350a022ba0361ca: Merge tag 'u-boot-stm32-20201125' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm (2020-11-25 11:00:52 -0500) are available in the Git repository at: https://gitlab.denx.de/u-boot/custodians/u-bo

Re: [PATCH v3 0/2] Add OpenCores I2C controller driver

2020-11-28 Thread Heiko Schocher
Hello Pragnesh, Am 14.11.20 um 10:12 schrieb Pragnesh Patel: > This driver has been tested on HiFive Unleashed with a PMOD based > RTCC sensor connected to I2C pins J1 header of the board. > > This series is available here [1] for testing > [1] https://github.com/pragnesh26992/u-boot/tree/i2c >

Re: [PATCH] i2c: designware_i2c: Don't warn if no reset controller

2020-11-28 Thread Heiko Schocher
Hello Simon, Am 09.11.20 um 15:12 schrieb Simon Glass: > At present if CONFIG_RESET is not enabled, this code shows a warning: > > designware_i2c_ofdata_to_platdata() i2c_designware_pci i2c2@16,0: > Can't get reset: -524 > > Avoid this by checking if reset is supported, first. > > Fixes

Re: [PATCH] i2c: mvtwsi: disable i2c slave also on Armada 8k

2020-11-28 Thread Heiko Schocher
Hello Baruch, Am 01.10.20 um 13:49 schrieb Baruch Siach: > The hidden I2C slave is also present on the Armada 8k AP806. Testing > shows that this I2C slave causes the same issues as Armada 38x. > Disabling that I2C slave fixes all these issues. > > I2C blocks on the Armada 8k CP110 are not affect

[PATCH v4 1/2] pinctrl: renesas: Make sure the pin type is updated after setting the MUX

2020-11-28 Thread Lad Prabhakar
By default on startup all the pin types are configured to PINMUX_TYPE_NONE (in sh_pfc_map_pins()), when pin is set as GPIO the pin type is updated to PINMUX_TYPE_GPIO. But the type is not updated when the pin is set as a function in sh_pfc_pinctrl_pin_set() or sh_pfc_pinctrl_group_set() calls (thes

[PATCH v4 2/2] pinctrl: renesas: Implement get_pin_muxing() callback

2020-11-28 Thread Lad Prabhakar
Implement get_pin_muxing() callback so that pinmux status command can be used on Renesas platforms. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das --- drivers/pinctrl/renesas/pfc.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/pinctrl/renesas/pfc.c b

[PATCH v4 0/2] pinctrl: renesas: trivial fixes and enhancements

2020-11-28 Thread Lad Prabhakar
Hi All, This patch series includes trivial fixes and enhancements to renesas pfc driver. Cheers, Prabhakar v3->v4 * Avoided pin to be re-muxed for the same device. v2->v3 * Patch 1/2 print a warning message if the current pin is being overwritten before abort as suggested by Marek. * Patch 2/

Re: [PATCH] Nokia RX-51: Decrease i2c speed to 100000

2020-11-28 Thread Pali Rohár
On Saturday 28 November 2020 14:02:20 Michael Nazzareno Trimarchi wrote: > Hi > > On Sat, Nov 28, 2020 at 1:59 PM Pali Rohár wrote: > > > > On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote: > > > Hi > > > > > > On Sat, Nov 21, 2020 at 11:30 PM Pali Rohár wrote: > > > > > >

Re: [PATCH] Nokia RX-51: Decrease i2c speed to 100000

2020-11-28 Thread Michael Nazzareno Trimarchi
Hi On Sat, Nov 28, 2020 at 1:59 PM Pali Rohár wrote: > > On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote: > > Hi > > > > On Sat, Nov 21, 2020 at 11:30 PM Pali Rohár wrote: > > > > > > It looks like that i2c bus lot of times timeout on some units. Prior > > > migration to

Re: [PATCH] Nokia RX-51: Decrease i2c speed to 100000

2020-11-28 Thread Pali Rohár
On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote: > Hi > > On Sat, Nov 21, 2020 at 11:30 PM Pali Rohár wrote: > > > > It looks like that i2c bus lot of times timeout on some units. Prior > > migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED > > val

Re: [PATCH] Nokia RX-51: Decrease i2c speed to 100000

2020-11-28 Thread Michael Nazzareno Trimarchi
Hi On Sat, Nov 21, 2020 at 11:30 PM Pali Rohár wrote: > > It looks like that i2c bus lot of times timeout on some units. Prior > migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED > value which was 10. Lower speed fixes timeout problems, so change speed > back to its

Re: [PATCH] Nokia RX-51: Decrease i2c speed to 100000

2020-11-28 Thread Pali Rohár
On Saturday 21 November 2020 23:30:11 Pali Rohár wrote: > It looks like that i2c bus lot of times timeout on some units. Prior > migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED > value which was 10. Lower speed fixes timeout problems, so change speed > back to its pr

Re: [linux-sunxi] [PATCH] sunxi: Add arm64 FEL support

2020-11-28 Thread Icenowy Zheng
在 2020-11-19星期四的 10:54 +,Andre Przywara写道: > So far we did not support the BootROM based FEL USB debug mode on the > 64-bit builds for Allwinner SoCs: The BootROM is using AArch32, but > the > SPL runs in AArch64. > Returning back to AArch32 was not working as expected, since the RMR > reset in

Re: [PATCH] gpio: Add support for DM GPIO for Kirkwood

2020-11-28 Thread Stefan Roese
Hi Harm, On 27.11.20 22:56, Harm Berntsen wrote: The Armada driver also works on Nedap's ax8008 Kirkwood board with a Marvell 88F6180 CPU. The original commit of that driver, 704d9a645e1790e568abf43c5eff2de0d7b135ed also mentions that this driver would be suitable for Kirkwood. Well, this was

[PATCH v4 18/18] global_data: Enable spl_handoff only if CONFIG_HANDOFF is set

2020-11-28 Thread Ovidiu Panait
spl_handoff should only be enabled when CONFIG_HANDOFF is set. Drop the nested ifdefs and check for CONFIG_HANDOFF instead. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - none v2 updates: - add reviewed-by tag include/asm-generic/global_data.h | 4

[PATCH v4 16/18] common: board_r: Drop arch-specific ifdefs around initr_trap

2020-11-28 Thread Ovidiu Panait
In order to remove the arch-specific ifdefs around initr_trap, introduce arch_initr_trap weak initcall. Implementations for ppc/m68k/mips have been moved to arch//lib/traps.c Default implementation is a nop stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - Drop trap_

[PATCH v4 13/18] common: board_r: Drop initr_jumptable wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to jumptable_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - add reviewed-by tag v2 updates: - add function comment common/board_r.c

[PATCH v4 12/18] common: board_r: Drop initr_xen wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to xen_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - none v2 updates: - add reviewed-by tag common/board_r.c | 10 +

[PATCH v4 17/18] spl: Kconfig: Add SPL dependency to CONFIG_HANDOFF

2020-11-28 Thread Ovidiu Panait
CONFIG_HANDOFF is used in u-boot proper to locate handoff info from SPL during pre-relocation init (in setup_spl_handoff). Add explicit dependency on CONFIG_SPL, to fix the following build error when CONFIG_HANDOFF && !CONFIG_SPL: common/board_f.c: In function ‘setup_spl_handoff’: common/board_f.c

[PATCH v4 15/18] common: board_r: Drop initr_bbmii wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to bb_miiphy_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - add reviewed-by tag v2 updates: - add function comment common/board_r.c

[PATCH v4 14/18] common: board_r: Drop initr_api wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to api_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - add reviewed-by tag v2 updates: - add function comment api/api.c | 6

[PATCH v4 11/18] common: board_r: Drop initr_noncached wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to noncached_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - add reviewed-by tag v2 updates: - add function comment arch/arm/include/

[PATCH v4 10/18] common: board_r: Drop initr_pci wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to pci_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - add reviewed-by tag v2 updates: - add function comment common/board_r.c

[PATCH v4 08/18] common: board_r: Drop initr_post_backlog wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to post_output_backlog and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - add reviewed-by tag v2 updates: - add function comment common/board

[PATCH v4 07/18] common: board_r: Drop initr_secondary_cpu wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to cpu_secondary_init_r and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait --- v4 updates: - add reviewed-by tag v3 updates: -none v2 updates: - add function comment arch/powerpc/cpu/mpc85xx/cpu_init.c |

[PATCH v4 09/18] common: board_r: Drop initr_pci_ep wrapper

2020-11-28 Thread Ovidiu Panait
Add a return value to pci_ep_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - add reviewed-by tag v2 updates: - add function comment common/board_r.c

[PATCH v4 05/18] common: board_f: Use IS_ENABLED(CONFIG_OF_EMBED) in reserve_fdt, reloc_fdt

2020-11-28 Thread Ovidiu Panait
Use IS_ENABLED(CONFIG_OF_EMBED) in instead of #ifdefs in reserve_fdt, reloc_fdt functions. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - none v2 updates: - add reviewed-by tag common/board_f.c | 41 + 1 file

[PATCH v4 06/18] common: board_r: Drop initr_console_record wrapper

2020-11-28 Thread Ovidiu Panait
Drop initr_console_record wrapper and call console_record_init directly. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - none v2 updates: - add reviewed-by tag common/board_r.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) di

[PATCH v4 04/18] common: board_f: Move setup_machine code to setup_bdinfo

2020-11-28 Thread Ovidiu Panait
setup_bdinfo is used to populate various bdinfo fields, so move setup_machine code there, as all it does is setting gd->bd->bi_arch_number. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - none v2 updates: - add reviewed-by tag common/board_f.c | 13

[PATCH v4 03/18] common: board_f: Use IS_ENABLED(CONFIG_TIMER_EARLY) in initf_dm

2020-11-28 Thread Ovidiu Panait
Use IS_ENABLED(CONFIG_TIMER_EARLY) instead of #ifdef in initf_dm. Also, move timer code to the main ifdef, so that ret is defined. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - none v3 updates: - none v2 updates: - add reviewed-by tag common/board_f.c | 11 ++---

[PATCH v4 02/18] common: board_f: Drop initf_console_record wrapper

2020-11-28 Thread Ovidiu Panait
Drop initf_console_record wrapper and call console_record_init directly. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v4 updates: - add reviewed-by tag v3 updates: - none v2 updates: - check defined(CONFIG_CONSOLE_RECORD_INIT_F) in ifdef condition common/board_f.c | 12 +++--

[PATCH v4 01/18] common: Kconfig: Introduce CONFIG_CONSOLE_RECORD_INIT_F

2020-11-28 Thread Ovidiu Panait
Currently, the following #ifdef construct is used to check whether to run console_record_init() during pre-relocation init: defined(CONFIG_CONSOLE_RECORD) && CONFIG_VAL(SYS_MALLOC_F_LEN) Introduce CONFIG_CONSOLE_RECORD_INIT_F Kconfig option to get rid of the complex ifdef check. Also, use IS_ENAB

[PATCH v4 00/18] Minor board_f/board_r cleanups

2020-11-28 Thread Ovidiu Panait
v4: * Drop trap_init declaration from init.h and make arch-specific implementations static for mips and m68k (on powerpc trap_init is an asm routine) v3: * Use only "default y" for CONFIG_CONSOLE_RECORD_INIT_F Kconfig option * Add reviewed-by tags v2: * Introduce CONFIG_CONSOLE_RECORD_INIT_F Kcon

[PATCH] spi: ti_qspi: Fix "spi-max-frequency" error path in ti_qspi_ofdata_to_platdata

2020-11-28 Thread Ovidiu Panait
struct ti_qspi_priv->max_hz is declared as unsigned int, so the following error path check will always be false, even when "spi-max-frequency" property is invalid/missing: priv->max_hz = fdtdec_get_int(blob, node, "spi-max-frequency", -1); if (priv->max_hz < 0) { ... } Replace the fdtdec