[PATCH] ls1021a: Set CONFIG_SYS_BOOTMAPSZ to the memory for relocation

2020-02-02 Thread Alison Wang
This patch sets CONFIG_SYS_BOOTMAPSZ to the amount of memory available to safely contain a kernel, device tree and initrd for relocation. The way to set fdt_high as 0x to disable device tree relocation is removed. Signed-off-by: Alison Wang --- include/configs/ls1021aiot.h | 5 +++--

Re: [PATCH v2 02/10] mmc: Add init() API

2020-02-02 Thread Michal Simek
On 03. 02. 20 7:04, Sekhar Nori wrote: > Michal, > > On 30/01/20 9:08 PM, Tom Rini wrote: >> On Thu, Jan 30, 2020 at 04:35:40PM +0100, Simon Goldschmidt wrote: >>> Tom Rini schrieb am Do., 30. Jan. 2020, 16:32: >>> On Thu, Jan 30, 2020 at 04:30:54PM +0100, Michal Simek wrote: > On 30.

[PATCH 2/2] configs: ls2080ardb: Make BOOTCOMMAND access flash memory as per spi-mem

2020-02-02 Thread Kuldeep Singh
BOOT command currently access spi-nor flash memory directly. As per spi-mem framework, flash memory access via absolute addresses is no more possible. Use flash APIs to access memory instead of directly using it. Signed-off-by: Kuldeep Singh --- include/configs/ls2080ardb.h | 12 1

[PATCH 1/2] configs: ls2080ardb: Make QSPI_MC_INIT access flash memory as per spi-mem

2020-02-02 Thread Kuldeep Singh
MC_INIT command currently access spi-nor flash memory directly. As per spi-mem framework, flash memory access via absolute addresses is no more possible. Use flash APIs to access memory instead of directly using it. Signed-off-by: Kuldeep Singh --- include/configs/ls2080ardb.h | 22

Re: [PATCH v2 02/10] mmc: Add init() API

2020-02-02 Thread Sekhar Nori
Michal, On 30/01/20 9:08 PM, Tom Rini wrote: > On Thu, Jan 30, 2020 at 04:35:40PM +0100, Simon Goldschmidt wrote: >> Tom Rini schrieb am Do., 30. Jan. 2020, 16:32: >> >>> On Thu, Jan 30, 2020 at 04:30:54PM +0100, Michal Simek wrote: On 30. 01. 20 16:14, Faiz Abbas wrote: > Hi Michal,

Re: [PATCH 3/3] gpio: intel_gpio: Fix register/bit offsets intel_gpio_get_value()

2020-02-02 Thread Bin Meng
On Fri, Jan 10, 2020 at 3:35 PM Wolfgang Wallner wrote: > > Fix the following in intel_gpio_get_value(): > > * The value of the register is contained in the variable 'reg', not in >'mode'. The variable 'mode' contains only the configuration whether >the gpio is currently an input or an

Re: [PATCH 2/3] gpio: intel_gpio: Clear tx state bit when setting output

2020-02-02 Thread Bin Meng
On Fri, Jan 10, 2020 at 3:35 PM Wolfgang Wallner wrote: > > Add missing 'PAD_CFG0_TX_STATE' to the clear mask for pcr_clrsetbits32(). > Otherwise this bit cannot be cleared again after it has been set once. > > Signed-off-by: Wolfgang Wallner > --- > > drivers/gpio/intel_gpio.c | 2 +- > 1 file

Re: [PATCH v2 2/2] gpio: search for gpio label if gpio is not found through bank name

2020-02-02 Thread Heiko Schocher
Hello Simon, Am 03.02.2020 um 01:04 schrieb Simon Glass: On Sat, 1 Feb 2020 at 01:03, Heiko Schocher wrote: dm_gpio_lookup_name() searches for a gpio through the bank name. But we have also gpio labels, and it makes sense to search for a gpio also in the labels we have defined, if no gpio is

Re: [PATCH 1/3] gpio: intel_gpio: Pass pinctrl device to pcr_clrsetbits32()

2020-02-02 Thread Bin Meng
Hi Wolfgang, On Fri, Jan 10, 2020 at 3:35 PM Wolfgang Wallner wrote: > > The function pcr_clrsetbits32() expects a device with a P2SB parent > device. > > The currently passed device 'dev' is a gpio-controller with a device > 'pinctrl' as parent. This does not match the expectations of >

Re: [RFC] azure: Move to vs2017-win2016 platform build host

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 10:05 AM Bin Meng wrote: > > Hi Tom, > > On Tue, Jan 28, 2020 at 5:23 AM Tom Rini wrote: > > > > Azure is moving to remove the vs2015-win2012r2 platform build host. The > > two suggested new platforms to use are vs2017-win2016 and windows-2019. > > For now, move up to

Re: [PATCH v1 2/2] x86: edison: Switch to ACPI mode

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 12:59 PM Bin Meng wrote: > > On Fri, Jan 10, 2020 at 5:12 AM Andy Shevchenko > wrote: > > > > SFI is quite poor and useless resource provider. Moreover it makes hard > > to develop and extend functionality in the Linux kernel. > > > > Enable a necessary minimum to use ACPI

Re: [PATCH v1 1/2] x86: edison: Enable command line editing

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 12:57 PM Bin Meng wrote: > > On Fri, Jan 10, 2020 at 5:12 AM Andy Shevchenko > wrote: > > > > From: Marek Vasut > > > > Enable command line editing, because it is extremely convenient. > > > > Signed-off-by: Marek Vasut > > Signed-off-by: Andy Shevchenko > > --- > >

Re: [PATCH v1 2/2] x86: edison: Switch to ACPI mode

2020-02-02 Thread Bin Meng
On Thu, Jan 30, 2020 at 10:17 AM Simon Glass wrote: > > On Wed, 29 Jan 2020 at 09:16, Andy Shevchenko > wrote: > > > > On Thu, Jan 09, 2020 at 11:12:35PM +0200, Andy Shevchenko wrote: > > > SFI is quite poor and useless resource provider. Moreover it makes hard > > > to develop and extend

Re: [PATCH v1 2/2] x86: edison: Switch to ACPI mode

2020-02-02 Thread Bin Meng
On Fri, Jan 10, 2020 at 5:12 AM Andy Shevchenko wrote: > > SFI is quite poor and useless resource provider. Moreover it makes hard > to develop and extend functionality in the Linux kernel. > > Enable a necessary minimum to use ACPI on Intel Edison. > > Linux kernel have been prepared for this

Re: [PATCH v1 1/2] x86: edison: Enable command line editing

2020-02-02 Thread Bin Meng
On Fri, Jan 10, 2020 at 5:12 AM Andy Shevchenko wrote: > > From: Marek Vasut > > Enable command line editing, because it is extremely convenient. > > Signed-off-by: Marek Vasut > Signed-off-by: Andy Shevchenko > --- > configs/edison_defconfig | 1 - > 1 file changed, 1 deletion(-) >

Re: [PATCH 1/1] doc: Chromebook Coral: fix build warnings

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 12:54 PM Bin Meng wrote: > > On Fri, Jan 10, 2020 at 3:33 AM Heinrich Schuchardt > wrote: > > > > Use valid restructured text to avoid warnings like > > > > WARNING: Title underline too short. > > WARNING: Block quote ends without a blank line; unexpected unindent. > > >

Re: [PATCH 1/1] doc: Chromebook Coral: fix build warnings

2020-02-02 Thread Bin Meng
On Fri, Jan 10, 2020 at 3:33 AM Heinrich Schuchardt wrote: > > Use valid restructured text to avoid warnings like > > WARNING: Title underline too short. > WARNING: Block quote ends without a blank line; unexpected unindent. > > when building with `make htmldocs`. > > Signed-off-by: Heinrich

Re: [PATCH] x86: limit the fs segment to the pointer size

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 12:41 PM Bin Meng wrote: > > On Wed, Jan 8, 2020 at 7:14 PM Masahiro Yamada wrote: > > > > The fs segment is only used to get the global data pointer. > > If it is accessed beyond sizeof(new_gd->arch.gd_addr), it is a bug. > > > > To specify the byte-granule limit size,

Re: [PATCH] x86: use invd instead of wbinvd in real mode start code

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 12:41 PM Bin Meng wrote: > > On Wed, Jan 8, 2020 at 7:09 PM Masahiro Yamada wrote: > > > > I do not know why the boot code immediately after the system reset > > should write-back the cache content. I think the cache invalidation > > should be enough. > > > > I tested this

Re: [PATCH] x86: limit the fs segment to the pointer size

2020-02-02 Thread Bin Meng
On Wed, Jan 8, 2020 at 7:14 PM Masahiro Yamada wrote: > > The fs segment is only used to get the global data pointer. > If it is accessed beyond sizeof(new_gd->arch.gd_addr), it is a bug. > > To specify the byte-granule limit size, drop the G bit, so the > flag field is 0x8093 instead of 0xc093,

Re: [PATCH] x86: use invd instead of wbinvd in real mode start code

2020-02-02 Thread Bin Meng
On Wed, Jan 8, 2020 at 7:09 PM Masahiro Yamada wrote: > > I do not know why the boot code immediately after the system reset > should write-back the cache content. I think the cache invalidation > should be enough. > > I tested this commit with qemu-x86_defconfig, and it worked for me. > >

Re: [PATCH 4/4] wdt: Add DM support for Designware WDT

2020-02-02 Thread Simon Glass
On Sun, 2 Feb 2020 at 18:18, Sean Anderson wrote: > > On 2/2/20 7:04 PM, Simon Glass wrote: > > Hi Sean, > > > > On Sun, 2 Feb 2020 at 10:25, Sean Anderson wrote: > >> > >> On 2/2/20 12:13 PM, Sean Anderson wrote: > >>> The binding used is the same as Linux's. > >>> --- > >>>

Re: [PATCH 2/2] doc: intel: Update serial driver changes in slimbootloader.rst

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 10:43 AM Bin Meng wrote: > > On Wed, Dec 18, 2019 at 1:56 PM Park, Aiden wrote: > > > > Now, Slim Bootloader uses NS16550_DYNAMIC to support serial port > > configuration at runtime, so no more code change is required. > > Therefore, remove unnecessary steps and fix minor

Re: [PATCH 1/2] x86: serial: Use NS16550_DYNAMIC in Slim Bootloader

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 10:43 AM Bin Meng wrote: > > Hi Aiden, > > On Wed, Dec 18, 2019 at 1:56 PM Park, Aiden wrote: > > > > Slim Bootloader provides serial port info in its HOB to support > > both IO or MMIO serial ports, but it's controlled by SYS_NS16550_MEM32 > > or SYS_NS16550_PORT_MAPPED

Re: [PATCH 1/2] x86: serial: Use NS16550_DYNAMIC in Slim Bootloader

2020-02-02 Thread Bin Meng
Hi Aiden, On Wed, Dec 18, 2019 at 1:56 PM Park, Aiden wrote: > > Slim Bootloader provides serial port info in its HOB to support > both IO or MMIO serial ports, but it's controlled by SYS_NS16550_MEM32 > or SYS_NS16550_PORT_MAPPED in U-Boot. > To support both serial port configurations

Re: [PATCH 2/2] doc: intel: Update serial driver changes in slimbootloader.rst

2020-02-02 Thread Bin Meng
On Wed, Dec 18, 2019 at 1:56 PM Park, Aiden wrote: > > Now, Slim Bootloader uses NS16550_DYNAMIC to support serial port > configuration at runtime, so no more code change is required. > Therefore, remove unnecessary steps and fix minor typo. > > Signed-off-by: Aiden Park > --- >

Re: [PATCH v3 4/4] x86: Move coreboot over to use the coreboot UART

2020-02-02 Thread Bin Meng
On Fri, Dec 20, 2019 at 8:58 AM Simon Glass wrote: > > Use this UART to improve the compatibility of U-Boot when used as a > coreboot payload. > > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > --- > > Changes in v3: None > Changes in v2: None > > arch/x86/dts/coreboot.dts | 6 +- >

Re: [PATCH v3 3/4] x86: serial: Add a coreboot serial driver

2020-02-02 Thread Bin Meng
On Fri, Dec 20, 2019 at 8:58 AM Simon Glass wrote: > > Coreboot can provide information about the serial device in use on a > platform. Add a driver that uses this information to produce a working > UART. > > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > --- > > Changes in v3: None >

Re: [PATCH v3 1/4] serial: ns16550: Support run-time configuration

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 10:29 AM Bin Meng wrote: > > On Fri, Dec 20, 2019 at 8:58 AM Simon Glass wrote: > > > > At present this driver uses an assortment of CONFIG options to control > > how it accesses the hardware. This is painful for platforms that are > > supposed to be controlled by a device

Re: [PATCH v3 2/4] x86: Update coreboot serial table struct

2020-02-02 Thread Bin Meng
On Fri, Dec 20, 2019 at 8:58 AM Simon Glass wrote: > > Since mid 2016, coreboot has additional fields in the serial struct that > it passes down to U-Boot. Add these so we are in sync. > > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > --- > > Changes in v3: None > Changes in v2: None > >

Re: [PATCH v3 1/4] serial: ns16550: Support run-time configuration

2020-02-02 Thread Bin Meng
On Fri, Dec 20, 2019 at 8:58 AM Simon Glass wrote: > > At present this driver uses an assortment of CONFIG options to control > how it accesses the hardware. This is painful for platforms that are > supposed to be controlled by a device tree or a previous-stage bootloader. > > Add a new CONFIG

Re: [RFC] azure: Move to vs2017-win2016 platform build host

2020-02-02 Thread Bin Meng
Hi Simon, On Tue, Jan 28, 2020 at 5:34 AM Simon Goldschmidt wrote: > > Tom Rini schrieb am Mo., 27. Jan. 2020, 22:23: > > > Azure is moving to remove the vs2015-win2012r2 platform build host. The > > two suggested new platforms to use are vs2017-win2016 and windows-2019. > > For now, move up

Re: [RFC] azure: Move to vs2017-win2016 platform build host

2020-02-02 Thread Bin Meng
Hi Tom, On Tue, Jan 28, 2020 at 5:23 AM Tom Rini wrote: > > Azure is moving to remove the vs2015-win2012r2 platform build host. The > two suggested new platforms to use are vs2017-win2016 and windows-2019. > For now, move up to vs2017-win2016. > > Cc: Bin Meng > Signed-off-by: Tom Rini > ---

RE: [PATCH 02/21] dm: pci: Update the PCI read_config() method to const dev *

2020-02-02 Thread Tan, Ley Foon
> -Original Message- > From: Simon Glass > Sent: Monday, January 27, 2020 11:50 PM > To: U-Boot Mailing List > Cc: Simon Glass ; Alex Marginean > ; Bao Xiaowei ; Bin > Meng ; Frank Wunderlich ; > GSS_MTK_Uboot_upstream ; > Heiko Schocher ; Hou Zhiqiang ; > Jaehoon Chung ; Tan, Ley

Re: [PATCH 4/4] wdt: Add DM support for Designware WDT

2020-02-02 Thread Sean Anderson
On 2/2/20 7:04 PM, Simon Glass wrote: > Hi Sean, > > On Sun, 2 Feb 2020 at 10:25, Sean Anderson wrote: >> >> On 2/2/20 12:13 PM, Sean Anderson wrote: >>> The binding used is the same as Linux's. >>> --- >>> doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++ >>>

Re: [PATCH] serial: Set baudrate on boot

2020-02-02 Thread Sean Anderson
> This looks right to me. > > Can you please update the docs for setbrg() in serial.h to mention > that this method is always called after probing, so there is now no > need to set the baud rate in the probe() method? > Sure. Will do that in v2.

Re: [PATCH] x86: Correct error return value in mrccache_get_region()

2020-02-02 Thread Bin Meng
On Mon, Feb 3, 2020 at 4:37 AM Simon Glass wrote: > > This function doesn't use uclass_find_first_device() correctly. Add a > check that the device is found so we don't try to read properties from a > NULL device. > > The fixes booting on minnoxmax. > > Fixes: 87f1084a630 ("x86: Adjust

Re: [PATCH 2/2] spl: get rid of SPL_LIBDISK_SUPPORT

2020-02-02 Thread Simon Glass
On Sat, 1 Feb 2020 at 12:38, Thomas Hebb wrote: > > This option hasn't actually affected what's linked into the build since > commit 91ff6865629c ("blk: Rework guard around part_init call"), which > switched libdisk in SPL to depend on (CONFIG_SPL_FRAMEWORK && > CONFIG_PARTITIONS). After removing

Re: [PATCH v3 05/12] dm: Add support for simple-pm-bus

2020-02-02 Thread Simon Glass
Hi Sean, On Sun, 2 Feb 2020 at 13:02, Sean Anderson wrote: > > This type of bus is used in Linux to designate busses which have power domains > and/or clocks which need to be enabled before their child devices can be used. > Because power domains are automatically enabled before probing in

Re: [PATCH 2/4] arm: Move asm/utils.h to log2.h

2020-02-02 Thread Simon Glass
On Sun, 2 Feb 2020 at 10:12, Sean Anderson wrote: > > This header is needed outside of the arm architecture by the designware wdt > driver. > --- > arch/arm/cpu/armv7/cache_v7.c | 2 +- > arch/arm/mach-davinci/spl.c| 2 +- >

Re: SDL 2.0 in gitlab

2020-02-02 Thread Simon Glass
Hi Tom, On Sun, 2 Feb 2020 at 09:56, Tom Rini wrote: > > On Sun, Feb 02, 2020 at 09:14:56AM -0700, Simon Glass wrote: > > Hi Tom, > > > > On Mon, 13 Jan 2020 at 14:27, Tom Rini wrote: > > > > > > On Sun, Jan 12, 2020 at 09:01:18PM +1300, Simon Glass wrote: > > > > > > > Hi Tom, > > > > > > > >

Re: [PATCH 4/4] wdt: Add DM support for Designware WDT

2020-02-02 Thread Simon Glass
Hi Sean, On Sun, 2 Feb 2020 at 10:25, Sean Anderson wrote: > > On 2/2/20 12:13 PM, Sean Anderson wrote: > > The binding used is the same as Linux's. > > --- > > doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++ > > drivers/watchdog/designware_wdt.c| 67

Re: [PATCH v3 04/12] reset: Add generic reset driver

2020-02-02 Thread Simon Glass
HI Sean, On Sun, 2 Feb 2020 at 13:01, Sean Anderson wrote: > > This patch adds a generic reset driver. It is designed to be useful when one > has > a register in a regmap which contains bits that reset other devices. I thought > this seemed like a very generic use, so here is a generic driver.

Re: [PATCH v2 2/2] gpio: search for gpio label if gpio is not found through bank name

2020-02-02 Thread Simon Glass
On Sat, 1 Feb 2020 at 01:03, Heiko Schocher wrote: > > dm_gpio_lookup_name() searches for a gpio through > the bank name. But we have also gpio labels, and it > makes sense to search for a gpio also in the labels > we have defined, if no gpio is found through the > bank name definition. > > This

Re: [PATCH v2 1/2] sandbox, test: add test for GPIO_HOG function

2020-02-02 Thread Simon Glass
On Sat, 1 Feb 2020 at 01:02, Heiko Schocher wrote: > > currently gpio hog function is not tested with "ut dm gpio" > so add some basic tests for gpio hog functionality. > > For this enable GPIO_HOG in sandbox_defconfig, add > in DTS some gpio hog entries, and add testcase in > "ut dm gpio"

Re: [PATCH] serial: Set baudrate on boot

2020-02-02 Thread Simon Glass
Hi Sean, On Sun, 2 Feb 2020 at 11:15, Sean Anderson wrote: > > Currently, the baud rate is never set on boot. This works ok when a previous > bootloader has configured the baudrate properly, or when the baudrate is set > to > a reasonable default in the serial driver's probe(). However, when

Re: [PATCH 1/1 v1] cmd: gpio: Correct do_gpio() return value

2020-02-02 Thread Simon Glass
Hi Tom, On Fri, 31 Jan 2020 at 13:59, Tom Rini wrote: > > On Thu, Jan 30, 2020 at 07:27:57PM -0700, Simon Glass wrote: > > Hi Tom. > > > > On Thu, 30 Jan 2020 at 11:52, Tom Rini wrote: > > > > > > On Wed, Jan 29, 2020 at 07:17:09PM -0700, Simon Glass wrote: > > > > Hi Tom, > > > > > > > > On

Re: [PATCH v2] dm: uclass: don't assign aliased seq numbers

2020-02-02 Thread Simon Glass
Hi Michael, On Wed, 29 Jan 2020 at 19:16, Simon Glass wrote: > > Hi Michael, > > On Fri, 20 Dec 2019 at 06:29, Michael Walle wrote: > > > > If there are aliases for an uclass, set the base for the "dynamically" > > allocated numbers next to the highest alias. > > > > Please note, that this

Re: [PULL] u-boot-usb/master

2020-02-02 Thread Tom Rini
On Sun, Feb 02, 2020 at 06:20:45PM +0100, Marek Vasut wrote: > The following changes since commit 80e99adbe47d1c8590f9b971ac52257fdc51a5ec: > > Merge tag 'uniphier-v2020.04-2' of > https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier (2020-01-31 > 13:26:28 -0500) > > are available in the

Re: [PATCH 2/2] spl: get rid of SPL_LIBDISK_SUPPORT

2020-02-02 Thread Felix Brack
On 01.02.20 20:38, Thomas Hebb wrote: This option hasn't actually affected what's linked into the build since commit 91ff6865629c ("blk: Rework guard around part_init call"), which switched libdisk in SPL to depend on (CONFIG_SPL_FRAMEWORK && CONFIG_PARTITIONS). After removing one straggling

[PATCH] x86: Correct error return value in mrccache_get_region()

2020-02-02 Thread Simon Glass
This function doesn't use uclass_find_first_device() correctly. Add a check that the device is found so we don't try to read properties from a NULL device. The fixes booting on minnoxmax. Fixes: 87f1084a630 ("x86: Adjust mrccache_get_region() to use livetree") Signed-off-by: Simon Glass ---

Re: [PULL] u-boot-socfpga/master

2020-02-02 Thread Tom Rini
On Sun, Feb 02, 2020 at 06:18:53PM +0100, Marek Vasut wrote: > The following changes since commit 80e99adbe47d1c8590f9b971ac52257fdc51a5ec: > > Merge tag 'uniphier-v2020.04-2' of > https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier (2020-01-31 > 13:26:28 -0500) > > are available in the

[PATCH v3 12/12] riscv: Add initial Sipeed Maix support

2020-02-02 Thread Sean Anderson
The Sipeed Maix series is a collection of boards built around the RISC-V Kendryte K210 processor. This processor contains several peripherals to accelerate neural network processing and other "ai" tasks. This includes a "KPU" neural network processor, an audio processor supporting beamforming

[PATCH v3 11/12] riscv: Add device tree for K210

2020-02-02 Thread Sean Anderson
Where possible, I have tried to find compatible drivers based on the layout of registers. However, I have not tested most of this functionality, and most devices should be considered descriptive at best. I would appreciate if anyone could help identify possibly compatible devices, especially for

[PATCH v3 09/12] riscv: Add K210 pll support

2020-02-02 Thread Sean Anderson
This pll code is primarily based on the code from the kendryte standalone sdk in lib/drivers/sysctl.c. k210_pll_calc_params is roughly analogous to the algorithm used to set the pll frequency, but it has been completely rewritten to be fixed-point based. Currently I am having problems setting the

[PATCH v3 10/12] riscv: Add K210 clock support

2020-02-02 Thread Sean Anderson
Due to the large number of clocks, I decided to use the CCF. The overall structure is modeled after the imx code. A common pattern is to create a composite clock composed of several component clocks. For these component clocks, the clk_register_* functions are not used, since they will be

[PATCH v3 08/12] riscv: Allow use of reset drivers

2020-02-02 Thread Sean Anderson
Currently, one cannot use a reset driver on RISC-V. Follow the MIPS example, and disable the default reset handler when the sysreset driver is enabled. Signed-off-by: Sean Anderson --- Changes for v3: - New arch/riscv/lib/reset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1

2020-02-02 Thread Sean Anderson
Some older processors (notably the Kendryte K210) use an older version of the RISC-V privileged specification. The primary changes between the old and new are in virtual memory, and in the merging of three separate counter enable CSRs. Using the new CSR on an old processor causes an illegal

[PATCH v3 06/12] riscv: Add headers for asm/global_data.h

2020-02-02 Thread Sean Anderson
This header depended on bd_t and ulong, but did not include the appropriate headers. Signed-off-by: Sean Anderson --- arch/riscv/include/asm/global_data.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h index

[PATCH v3 05/12] dm: Add support for simple-pm-bus

2020-02-02 Thread Sean Anderson
This type of bus is used in Linux to designate busses which have power domains and/or clocks which need to be enabled before their child devices can be used. Because power domains are automatically enabled before probing in u-boot, we just need to enable any clocks present. Signed-off-by: Sean

[PATCH v3 04/12] reset: Add generic reset driver

2020-02-02 Thread Sean Anderson
This patch adds a generic reset driver. It is designed to be useful when one has a register in a regmap which contains bits that reset other devices. I thought this seemed like a very generic use, so here is a generic driver. The overall structure has been modeled on the syscon-reboot driver.

[PATCH v3 03/12] clk: Unconditionally recursively en-/dis-able clocks

2020-02-02 Thread Sean Anderson
For clocks not in the CCF, their parents will not have UCLASS_CLK, so we just enable them as normal. The enable count is local to the struct clk, but this will never result in the actual en-/dis-able op being called (unless the same struct clk is enabled twice). For clocks in the CCF, we always

[PATCH v3 02/12] clk: Check that ops of composite clock components, exist before calling

2020-02-02 Thread Sean Anderson
clk_composite_ops was shared between all devices in the composite clock driver. If one clock had a feature (such as supporting set_parent) which another clock did not, it could call a null pointer dereference. This patch does three things 1. It adds null-pointer checks to all composite clock

[PATCH v3 01/12] clk: Always use the supplied struct clk

2020-02-02 Thread Sean Anderson
CCF clocks should always use the struct clock passed to their methods for extracting the driver-specific clock information struct. Previously, many functions would use the clk->dev->priv if the device was bound. This could cause problems with composite clocks. The individual clocks in a composite

[PATCH v3 00/12] riscv: Add Sipeed Maix support

2020-02-02 Thread Sean Anderson
This patch series adds support for Sipeed Maix boards and the Kendryte K210 CPU. Currently, only the Maix Bit V2.0 is supported, however other models are similar. This series depends on (clk: Include missing headers for linux/clk-provider.h). In

[PATCH] serial: Set baudrate on boot

2020-02-02 Thread Sean Anderson
Currently, the baud rate is never set on boot. This works ok when a previous bootloader has configured the baudrate properly, or when the baudrate is set to a reasonable default in the serial driver's probe(). However, when this is not the case, we could be using a different baud rate than what

Re: [PATCH 1/4] wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig

2020-02-02 Thread Sean Anderson
> btw what's the motivation for this series, are you hitting some issues > with the WDT on SoCFPGA ? This watchdog appears on the Kendryte K210 CPU, which I am adding support for. The rest of the board uses devicetree to configure drivers, so I wanted to add support for this watchdog as well.

Re: [PATCH 1/4] wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig

2020-02-02 Thread Marek Vasut
On 2/2/20 6:48 PM, Sean Anderson wrote: > On 2/2/20 12:40 PM, Marek Vasut wrote: >> On 2/2/20 6:23 PM, Sean Anderson wrote: >>> CONFIG_DESIGNWARE_WATCHDOG is only defined if CONFIG_HW_WATCHDOG is >>> defined, and this is never defined in headers (or in the defconfigs). >> >> This is what I see in

Re: Pull request: u-boot-rockchip-20200130

2020-02-02 Thread Tom Rini
On Sat, Feb 01, 2020 at 01:16:12PM +0800, Kever Yang wrote: > Hi Tom, > > Please pull the rockchip updates: > - Support redundant boot for rk3399 > - Support binman for rockchip platform > - Update ram driver and add ddr4 support for rk3328 > > Travis: >

Re: [PATCH 1/4] wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig

2020-02-02 Thread Sean Anderson
On 2/2/20 12:40 PM, Marek Vasut wrote: > On 2/2/20 6:23 PM, Sean Anderson wrote: >> CONFIG_DESIGNWARE_WATCHDOG is only defined if CONFIG_HW_WATCHDOG is >> defined, and this is never defined in headers (or in the defconfigs). > > This is what I see in socfpga_soc64_common.h on u-boot/master: > 153

Re: [PATCH 1/4] wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig

2020-02-02 Thread Marek Vasut
On 2/2/20 6:23 PM, Sean Anderson wrote: > On 2/2/20 12:15 PM, Marek Vasut wrote: >> On 2/2/20 6:10 PM, Sean Anderson wrote: >>> Currently this is set from headers. No board has this set by default >> >> Please check where socfpga_common.h and socfpga_soc64_common.h are >> included. This should

[PATCH v2 2/2] riscv: Enable cpu clock if it is present

2020-02-02 Thread Sean Anderson
The cpu clock is probably already enabled if we are executing code (though we could be executing from a different core). This patch prevents the cpu clock or its parents from being disabled. Signed-off-by: Sean Anderson --- This doesn't strictly depend on the previous patch, but it doesn't

[PATCH v2 1/2] riscv: Try to get cpu frequency from device tree

2020-02-02 Thread Sean Anderson
Instead of always using the "clock-frequency" property to determine cpu frequency, try using a clock in "clocks" if it exists. This patch also fixes a bug where there could be spurious higher frequencies if sizeof(u32) != sizeof(ulong). Signed-off-by: Sean Anderson --- This patch is the

Re: [PATCH 4/9] ARM: dts: stm32mp1: move FDCAN to PLL4_R

2020-02-02 Thread Marek Vasut
On 1/31/20 9:15 AM, Patrick DELAUNAY wrote: > Hi Marek, Hi, >> From: Marek Vasut >> Sent: jeudi 30 janvier 2020 03:23 >> >> On 1/29/20 5:51 PM, Patrick DELAUNAY wrote: >>> Hi Marek, >> >> Hi, >> From: Marek Vasut Sent: mardi 28 janvier 2020 13:16 On 1/28/20 10:11 AM,

Re: [PATCH 4/4] wdt: Add DM support for Designware WDT

2020-02-02 Thread Sean Anderson
On 2/2/20 12:13 PM, Sean Anderson wrote: > The binding used is the same as Linux's. > --- > doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++ > drivers/watchdog/designware_wdt.c| 67 > 2 files changed, 91 insertions(+) > create mode 100644

Re: [PATCH 1/4] wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig

2020-02-02 Thread Sean Anderson
On 2/2/20 12:10 PM, Sean Anderson wrote: > Currently this is set from headers. No board has this set by default, so we > don't need to modify any configs. > --- > drivers/watchdog/Kconfig | 7 +++ > include/configs/socfpga_common.h | 1 - >

Re: [PATCH 2/4] arm: Move asm/utils.h to log2.h

2020-02-02 Thread Sean Anderson
On 2/2/20 12:12 PM, Sean Anderson wrote: > This header is needed outside of the arm architecture by the designware wdt > driver. > --- > arch/arm/cpu/armv7/cache_v7.c | 2 +- > arch/arm/mach-davinci/spl.c| 2 +- > arch/arm/mach-omap2/clocks-common.c

Re: [PATCH 3/4] wdt: Remove dependencies on CONFIG_DW_WDT_* from Designware WDT

2020-02-02 Thread Sean Anderson
On 2/2/20 12:12 PM, Sean Anderson wrote: > Currently, the designware watchdog driver depends in several places on the > values of CONFIG_DW_WDT_ defines. This patch moves these uses to just the > functions hw_watchdog_*. > --- > drivers/watchdog/designware_wdt.c | 65

Re: [PATCH 1/4] wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig

2020-02-02 Thread Sean Anderson
On 2/2/20 12:15 PM, Marek Vasut wrote: > On 2/2/20 6:10 PM, Sean Anderson wrote: >> Currently this is set from headers. No board has this set by default > > Please check where socfpga_common.h and socfpga_soc64_common.h are > included. This should then make it clear that this statement in not

[PULL] u-boot-usb/master

2020-02-02 Thread Marek Vasut
The following changes since commit 80e99adbe47d1c8590f9b971ac52257fdc51a5ec: Merge tag 'uniphier-v2020.04-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier (2020-01-31 13:26:28 -0500) are available in the Git repository at: git://git.denx.de/u-boot-usb.git master for you to

[PULL] u-boot-socfpga/master

2020-02-02 Thread Marek Vasut
The following changes since commit 80e99adbe47d1c8590f9b971ac52257fdc51a5ec: Merge tag 'uniphier-v2020.04-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier (2020-01-31 13:26:28 -0500) are available in the Git repository at: git://git.denx.de/u-boot-socfpga.git master for you

Re: [PATCH 1/4] wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig

2020-02-02 Thread Marek Vasut
On 2/2/20 6:10 PM, Sean Anderson wrote: > Currently this is set from headers. No board has this set by default Please check where socfpga_common.h and socfpga_soc64_common.h are included. This should then make it clear that this statement in not true. , so we > don't need to modify any configs.

[PATCH 4/4] wdt: Add DM support for Designware WDT

2020-02-02 Thread Sean Anderson
The binding used is the same as Linux's. --- doc/device-tree-bindings/watchdog/dw_wdt.txt | 24 +++ drivers/watchdog/designware_wdt.c| 67 2 files changed, 91 insertions(+) create mode 100644 doc/device-tree-bindings/watchdog/dw_wdt.txt diff --git

[PATCH 3/4] wdt: Remove dependencies on CONFIG_DW_WDT_* from Designware WDT

2020-02-02 Thread Sean Anderson
Currently, the designware watchdog driver depends in several places on the values of CONFIG_DW_WDT_ defines. This patch moves these uses to just the functions hw_watchdog_*. --- drivers/watchdog/designware_wdt.c | 65 --- 1 file changed, 42 insertions(+), 23

[PATCH 2/4] arm: Move asm/utils.h to log2.h

2020-02-02 Thread Sean Anderson
This header is needed outside of the arm architecture by the designware wdt driver. --- arch/arm/cpu/armv7/cache_v7.c | 2 +- arch/arm/mach-davinci/spl.c| 2 +- arch/arm/mach-omap2/clocks-common.c| 2 +- arch/arm/mach-omap2/emif-common.c

[PATCH 1/4] wdt: Add CONFIG_DESIGNWARE_WATCHDOG to Kconfig

2020-02-02 Thread Sean Anderson
Currently this is set from headers. No board has this set by default, so we don't need to modify any configs. --- drivers/watchdog/Kconfig | 7 +++ include/configs/socfpga_common.h | 1 - include/configs/socfpga_soc64_common.h | 1 - 3 files changed, 7 insertions(+), 2

Re: SDL 2.0 in gitlab

2020-02-02 Thread Tom Rini
On Sun, Feb 02, 2020 at 09:14:56AM -0700, Simon Glass wrote: > Hi Tom, > > On Mon, 13 Jan 2020 at 14:27, Tom Rini wrote: > > > > On Sun, Jan 12, 2020 at 09:01:18PM +1300, Simon Glass wrote: > > > > > Hi Tom, > > > > > > I have a series which changes sandbox over to use the newer SDL2. At > > >

Re: SDL 2.0 in gitlab

2020-02-02 Thread Simon Glass
Hi Tom, On Mon, 13 Jan 2020 at 14:27, Tom Rini wrote: > > On Sun, Jan 12, 2020 at 09:01:18PM +1300, Simon Glass wrote: > > > Hi Tom, > > > > I have a series which changes sandbox over to use the newer SDL2. At > > present I cannot make it pass on gitlab since it seems to have SDL1.2 > > (only).

Re: [PATCH] riscv: Remove unnecessary instruction

2020-02-02 Thread Bin Meng
On Tue, Jan 28, 2020 at 5:39 AM Sean Anderson wrote: > > The add instruction on risc-v can have any three sources and targets, so there > is no need for an intermediate mov. > > Signed-off-by: Sean Anderson > --- > arch/riscv/cpu/start.S | 5 ++--- > 1 file changed, 2 insertions(+), 3

Re: [PATCH v2] cmd: Handle CONFIG_(SPL_|TPL_)ENV_SUPPORT for toggling nvedit object

2020-02-02 Thread Nathan Rossi
On Sun, 2 Feb 2020 at 23:52, Wolfgang Denk wrote: > > Dear Nathan, > > In message <20200202130227.7755-1-nat...@nathanrossi.com> you wrote: > > When CONFIG_SPL_ENV_SUPPORT is disabled, nvedit was still being included > > as part of the build. Use the CONFIG_ENV_SUPPORT, CONFIG_SPL_ENV_SUPPORT > >

[PATCH 2/2] spl: get rid of SPL_LIBDISK_SUPPORT

2020-02-02 Thread Thomas Hebb
This option hasn't actually affected what's linked into the build since commit 91ff6865629c ("blk: Rework guard around part_init call"), which switched libdisk in SPL to depend on (CONFIG_SPL_FRAMEWORK && CONFIG_PARTITIONS). After removing one straggling reference that seems to been authored

Re: Fix for build error /uboot/driver/video/simplefb.c

2020-02-02 Thread ARJUN C R
Adding proper diff: --- u-boot-2020.04-rc1/drivers/video/simplefb.c 2020-01-29 03:29:30.0 +0530 +++ u-boot-2020.04-rc1_new/drivers/video/simplefb.c 2020-02-02 16:31:57.416168719 +0530 @@ -26,7 +26,7 @@ static int simple_video_probe(struct ude return -EINVAL; } - debug("%s: base=%llx,

Fix for build error /uboot/driver/video/simplefb.c

2020-02-02 Thread ARJUN C R
Hi, diff: --- u-boot-2020.04-rc1_new/drivers/video/simplefb.c 2020-02-02 16:31:57.416168719 +0530 +++ u-boot-2020.04-rc1/drivers/video/simplefb.c 2020-01-29 03:29:30.0 +0530 @@ -26,7 +26,7 @@ static int simple_video_probe(struct ude return -EINVAL; } - debug("%s: base=%lx,

Re: [PATCH v2] cmd: Handle CONFIG_(SPL_|TPL_)ENV_SUPPORT for toggling nvedit object

2020-02-02 Thread Wolfgang Denk
Dear Nathan, In message <20200202130227.7755-1-nat...@nathanrossi.com> you wrote: > When CONFIG_SPL_ENV_SUPPORT is disabled, nvedit was still being included > as part of the build. Use the CONFIG_ENV_SUPPORT, CONFIG_SPL_ENV_SUPPORT > or CONFIG_TPL_ENV_SUPPORT values to enable/disable the

[PATCH v2] cmd: Handle CONFIG_(SPL_|TPL_)ENV_SUPPORT for toggling nvedit object

2020-02-02 Thread Nathan Rossi
When CONFIG_SPL_ENV_SUPPORT is disabled, nvedit was still being included as part of the build. Use the CONFIG_ENV_SUPPORT, CONFIG_SPL_ENV_SUPPORT or CONFIG_TPL_ENV_SUPPORT values to enable/disable the inclusion of nvedit. Signed-off-by: Nathan Rossi --- Changes in v2: * Changed $(SPL_) to