[PATCH B] fixdep: fix U-Boot own code to handle only valid symbol characters

2020-02-18 Thread Masahiro Yamada
fig.h: add CPP macros useful for per-image config options") Signed-off-by: Masahiro Yamada --- This patch is applicable on top of Tom's resync: scripts/basic/fixdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index

[PATCH] fixdep: fix U-Boot own code to handle only valid symbol characters

2020-02-18 Thread Masahiro Yamada
'#' in function invocations. So, this does not happen for GNU Make 4.3 | commit c6966b323811c37acedff05b576b907b06aea5f4 | Author: Paul Smith | Date: Thu Dec 22 18:47:26 2016 -0500 | |[SV 20513] Un-escaped # are not comments in function invocations Signed-off-by: Masahiro Yamada

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

2020-02-17 Thread Masahiro Yamada
0, %eax > orl $(X86_CR0_NW | X86_CR0_CD), %eax > movl%eax, %cr0 > - invd > + wbinvd > > /* load the temporary Global Descriptor Table */ > data32 cs lidtidt_ptr > -- > 2.25.0 > -- Best Regards Masahiro Yamada

Re: [PATCH] image.h: Change android_image_get_dtb* to use uint and not u32

2020-02-16 Thread Masahiro Yamada
roid_print_contents(const struct andr_img_hdr > *hdr); > bool android_image_print_dtb_contents(ulong hdr_addr); > #endif > > -#endif /* CONFIG_ANDROID_BOOT_IMAGE */ > +#endif /* CONFIG_ANDROID_BOOT_IMAGE && !USE_HOSTCC */ > > /** > * board_fit_config_name_match() - Check for a matching board name > Maybe U-Boot shares too much code between U-Boot space and tooling space? include/image.h of U-Boot is 1520 lines. include/image.h of Barebox is 258 lines. But, I am not tracking how they diverged. Shrinking the interface between U-Boot space and tooling space will provide a better maintainability. ifdef would work. Perhaps, splitting the header might be even better. That's my random thought. I have not looked into the detail, though. -- Best Regards Masahiro Yamada

[PATCH 3/3] ARM: uniphier: detect the base of micro support card at run-time

2020-02-14 Thread Masahiro Yamada
The base address 0x43f0 is no longer true for the future SoC. Extract the base address from the device tree. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/micro-support-card.c | 43 +++-- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/arch/arm

[PATCH 2/3] ARM: uniphier: remove workaround for the NAND write protect

2020-02-14 Thread Masahiro Yamada
to the default value, which means the write protect is deasserted. This workaround can go away entirely. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/board_late_init.c | 17 - 1 file changed, 17 deletions(-) diff --git a/arch/arm/mach-uniphier/board_late_init.c b

[PATCH 1/3] ARM: uniphier: move NAND reset assertion to U-Boot proper from SPL

2020-02-14 Thread Masahiro Yamada
The comment /* deassert reset */ is wrong. It asserts the reset. It no longer needs to stay in SPL. The NAND controller reset is handled in the driver. So, this assert can be moved to the board_init() of U-Boot proper. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/Makefile

[PATCH v3 10/11] mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA

2020-02-13 Thread Masahiro Yamada
occurs behind the scene. This commit also sanitizes the difference between the virtual address and the dma address. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None drivers/mmc/sdhci.c | 51 ++--- 1 file changed, 25 insertions

[PATCH v3 09/11] mmc: add mmc_get_dma_dir() helper

2020-02-13 Thread Masahiro Yamada
Copied from Linux kernel. include/linux/mmc/host.h Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None include/mmc.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/mmc.h b/include/mmc.h index b5cb514f57d6..71e2e1735ad5 100644 --- a/include/mmc.h +++ b

[PATCH v3 11/11] mmc: sdhci: fix missing cache invalidation after reading by DMA

2020-02-13 Thread Masahiro Yamada
speculative memory read or memory prefetch occurs. Instead of calling the cache operation directly, this commit adds dma_unmap_single(), which performs cache invalidation internally, but drivers do not need which operation is being run. Signed-off-by: Masahiro Yamada --- Changes in v3: None

[PATCH v3 08/11] mmc: sdhci: remove unneeded casts

2020-02-13 Thread Masahiro Yamada
host->mmc is already (struct mmc *). memalign() returns an opaque pointer, so there is no need for casting. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None drivers/mmc/sdhci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/

[PATCH v3 04/11] dma-mapping: add for all architectures

2020-02-13 Thread Masahiro Yamada
To avoid "asm/dma-mapping.h: No such file or directory" error, we need something. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: - New patch arch/arc/include/asm/dma-mapping.h| 1 + arch/m68k/include/asm/dma-mapping.h | 1 + arch/microblaze/i

[PATCH v3 00/11] mmc: sdhci: code clean-up and fix cache coherency problem

2020-02-13 Thread Masahiro Yamada
le), I did some cleaups first. Patch 01-04 tidies up the DMA helpers. Patch 05-10 are code clean-ups. Patch 11 fixes the bug. Masahiro Yamada (11): dma-mapping: fix the prototype of dma_map_single() dma-mapping: fix the prototype of dma_unmap_single() dma-mapping: move dma_map_(un)single()

[PATCH v3 02/11] dma-mapping: fix the prototype of dma_unmap_single()

2020-02-13 Thread Masahiro Yamada
dma_unmap_single() takes the dma address, not virtual address. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None arch/arm/include/asm/dma-mapping.h | 4 +--- arch/nds32/include/asm/dma-mapping.h | 4 +--- arch/riscv/include/asm/dma-mapping.h | 4 +--- arch/x86

[PATCH v3 06/11] mmc: sdhci: reduce code duplication for aligned buffer

2020-02-13 Thread Masahiro Yamada
The same code is run for both SDHCI_QUIRK_32BIT_DMA_ADDR and define(CONFIG_FIXED_SDHCI_ALIGNED_BUFFER). Unify the code. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None drivers/mmc/sdhci.c | 22 -- include/sdhci.h | 2 ++ 2 files changed, 10

[PATCH v3 05/11] mmc: sdhci: put the aligned buffer pointer to struct sdhci_host

2020-02-13 Thread Masahiro Yamada
Using the global variable does not look nice. Add a new field sthci::align_buffer to point to the bounce buffer. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None drivers/mmc/sdhci.c | 27 +-- include/sdhci.h | 1 + 2 files changed, 14

[PATCH v3 07/11] mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr

2020-02-13 Thread Masahiro Yamada
Use {lower,upper}_32_bits() instead of the combination of cast and shift. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None drivers/mmc/sdhci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index

[PATCH v3 01/11] dma-mapping: fix the prototype of dma_map_single()

2020-02-13 Thread Masahiro Yamada
Make dma_map_single() return the dma address, and remove the pointless volatile. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None arch/arm/include/asm/dma-mapping.h | 5 +++-- arch/nds32/include/asm/dma-mapping.h | 5 +++-- arch/riscv/include/asm/dma-mapping.h | 5

[PATCH v3 03/11] dma-mapping: move dma_map_(un)single() to

2020-02-13 Thread Masahiro Yamada
some comments to the helpers. The concept is quite similar to the DMA-API of Linux kernel. Drivers are agnostic about what is going on behind the scene. Just call dma_map_single() before the DMA, and dma_unmap_single() after it. Signed-off-by: Masahiro Yamada --- Changes in v3: - Rebase

Re: [PATCH v2 03/11] dma-mapping: move dma_map_(un)single() to

2020-02-13 Thread Masahiro Yamada
On Fri, Feb 14, 2020 at 2:43 PM Masahiro Yamada wrote: > > The implementation of dma_map_single() and dma_unmap_single() is > exactly the same for all the architectures that support them. > > Factor them out to , and make all drivers to > include instead of . > > If we ne

[PATCH v2 11/11] mmc: sdhci: fix missing cache invalidation after reading by DMA

2020-02-13 Thread Masahiro Yamada
speculative memory read or memory prefetch occurs. Instead of calling the cache operation directly, this commit adds dma_unmap_single(), which performs cache invalidation internally, but drivers do not need which operation is being run. Signed-off-by: Masahiro Yamada --- Changes in v2: None

[PATCH v2 09/11] mmc: add mmc_get_dma_dir() helper

2020-02-13 Thread Masahiro Yamada
Copied from Linux kernel. include/linux/mmc/host.h Signed-off-by: Masahiro Yamada --- Changes in v2: None include/mmc.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/mmc.h b/include/mmc.h index b5cb514f57d6..71e2e1735ad5 100644 --- a/include/mmc.h +++ b/include/mmc.h

[PATCH v2 07/11] mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr

2020-02-13 Thread Masahiro Yamada
Use {lower,upper}_32_bits() instead of the combination of cast and shift. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/sdhci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index b4713e7b9bba

[PATCH v2 10/11] mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA

2020-02-13 Thread Masahiro Yamada
occurs behind the scene. This commit also sanitizes the difference between the virtual address and the dma address. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/sdhci.c | 51 ++--- 1 file changed, 25 insertions(+), 26 deletions

[PATCH v2 08/11] mmc: sdhci: remove unneeded casts

2020-02-13 Thread Masahiro Yamada
host->mmc is already (struct mmc *). memalign() returns an opaque pointer, so there is no need for casting. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/sdhci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/

[PATCH v2 03/11] dma-mapping: move dma_map_(un)single() to

2020-02-13 Thread Masahiro Yamada
some comments to the helpers. The concept is quite similar to the DMA-API of Linux kernel. Drivers are agnostic about what is going on behind the scene. Just call dma_map_single() before the DMA, and dma_unmap_single() after it. Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch

[PATCH v2 00/11] mmc: sdhci: code clean-up and fix cache coherency problem

2020-02-13 Thread Masahiro Yamada
le), I did some cleaups first. Patch 01-04 tidies up the DMA helpers. Patch 05-10 are code clean-ups. Patch 11 fixes the bug. Masahiro Yamada (11): dma-mapping: fix the prototype of dma_map_single() dma-mapping: fix the prototype of dma_unmap_single() dma-mapping: move dma_map_

[PATCH v2 06/11] mmc: sdhci: reduce code duplication for aligned buffer

2020-02-13 Thread Masahiro Yamada
The same code is run for both SDHCI_QUIRK_32BIT_DMA_ADDR and define(CONFIG_FIXED_SDHCI_ALIGNED_BUFFER). Unify the code. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/sdhci.c | 22 -- include/sdhci.h | 2 ++ 2 files changed, 10 insertions(+), 14

[PATCH v2 02/11] dma-mapping: fix the prototype of dma_unmap_single()

2020-02-13 Thread Masahiro Yamada
dma_unmap_single() takes the dma address, not virtual address. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/arm/include/asm/dma-mapping.h | 4 +--- arch/nds32/include/asm/dma-mapping.h | 4 +--- arch/riscv/include/asm/dma-mapping.h | 4 +--- arch/x86/include/asm/dma-mapping.h

[PATCH v2 05/11] mmc: sdhci: put the aligned buffer pointer to struct sdhci_host

2020-02-13 Thread Masahiro Yamada
Using the global variable does not look nice. Add a new field sthci::align_buffer to point to the bounce buffer. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/sdhci.c | 27 +-- include/sdhci.h | 1 + 2 files changed, 14 insertions(+), 14

[PATCH v2 04/11] dma-mapping: add for all architectures

2020-02-13 Thread Masahiro Yamada
To avoid "asm/dma-mapping.h: No such file or directory" error, we need something. Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch arch/arc/include/asm/dma-mapping.h| 1 + arch/m68k/include/asm/dma-mapping.h | 1 + arch/microblaze/include/asm/dma-mapp

[PATCH v2 01/11] dma-mapping: fix the prototype of dma_map_single()

2020-02-13 Thread Masahiro Yamada
Make dma_map_single() return the dma address, and remove the pointless volatile. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/arm/include/asm/dma-mapping.h | 5 +++-- arch/nds32/include/asm/dma-mapping.h | 5 +++-- arch/riscv/include/asm/dma-mapping.h | 5 +++-- arch/x86

Re: [PATCH 0/9] mmc: sdhci: code clean-up and fix cache coherency problem.

2020-02-13 Thread Masahiro Yamada
[sub-make] Error 2 Ah, right. I will fix it soon. Thanks. -- Best Regards Masahiro Yamada

[PATCH] ARM: uniphier: add sdscript, sdboot, sdupdate environment variables

2020-02-12 Thread Masahiro Yamada
Add handy macros: - sdscript: source boot.scr in the file system of the SD media - sdboot : boot the kernel using the images in the file system of the SD media - sdscript: update the boot firmware in the SD media (in raw block sectors) Signed-off-by: Masahiro

Re: [PATCH 10/33] mtd: Rename free() to rfree()

2020-02-12 Thread Masahiro Yamada
, > diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h > index ceffd994de..1b9151714c 100644 > --- a/include/linux/mtd/mtd.h > +++ b/include/linux/mtd/mtd.h > @@ -129,8 +129,8 @@ struct mtd_oob_region { > struct mtd_ooblayout_ops { > int (*ecc)(struct mtd_info *mtd, int section, >struct mtd_oob_region *oobecc); > - int (*free)(struct mtd_info *mtd, int section, > - struct mtd_oob_region *oobfree); > + int (*rfree)(struct mtd_info *mtd, int section, > +struct mtd_oob_region *oobfree); > }; > > /* > -- > 2.25.0.rc1.283.g88dfdc4193-goog > -- Best Regards Masahiro Yamada

Re: [PATCH 2/9] dma-mapping: fix the prototype of dma_unmap_single()

2020-02-11 Thread Masahiro Yamada
On Wed, Feb 5, 2020 at 9:17 AM Simon Glass wrote: > > On Tue, 4 Feb 2020 at 04:09, Masahiro Yamada > wrote: > > > > dma_unmap_single() takes the dma address, not virtual address. > > > > Signed-off-by: Masahiro Yamada > > --- > > > > arch

Re: [PATCH 1/9] dma-mapping: fix the prototype of dma_map_single()

2020-02-11 Thread Masahiro Yamada
Hi Simon, On Wed, Feb 5, 2020 at 9:17 AM Simon Glass wrote: > > On Tue, 4 Feb 2020 at 04:09, Masahiro Yamada > wrote: > > > > Make dma_map_single() return the dma address, and remove the > > pointless volatile. > > > > Signed-off-by: Masahiro Yamada &g

[PATCH] ARM: uniphier: enable CONFIG_MMC_SDHCI_ADMA for uniphier_v8_defconfig

2020-02-04 Thread Masahiro Yamada
Switch over to ADMA from SDMA. Signed-off-by: Masahiro Yamada --- configs/uniphier_v8_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/uniphier_v8_defconfig b/configs/uniphier_v8_defconfig index 9ad4bd68b6c8..55f7516e3992 100644 --- a/configs

[PATCH 1/9] dma-mapping: fix the prototype of dma_map_single()

2020-02-04 Thread Masahiro Yamada
Make dma_map_single() return the dma address, and remove the pointless volatile. Signed-off-by: Masahiro Yamada --- arch/arm/include/asm/dma-mapping.h | 5 +++-- arch/nds32/include/asm/dma-mapping.h | 5 +++-- arch/riscv/include/asm/dma-mapping.h | 5 +++-- arch/x86/include/asm/dma-mapping.h

[PATCH 2/9] dma-mapping: fix the prototype of dma_unmap_single()

2020-02-04 Thread Masahiro Yamada
dma_unmap_single() takes the dma address, not virtual address. Signed-off-by: Masahiro Yamada --- arch/arm/include/asm/dma-mapping.h | 4 +--- arch/nds32/include/asm/dma-mapping.h | 4 +--- arch/riscv/include/asm/dma-mapping.h | 4 +--- arch/x86/include/asm/dma-mapping.h | 4 +--- drivers

[PATCH 9/9] mmc: sdhci: fix missing cache invalidation after reading by DMA

2020-02-04 Thread Masahiro Yamada
speculative memory read or memory prefetch occurs. Instead of calling the cache operation directly, this commit adds dma_unmap_single(), which performs cache invalidation internally, but drivers do not need which operation is being run. Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci.c | 4

[PATCH 0/9] mmc: sdhci: code clean-up and fix cache coherency problem.

2020-02-04 Thread Masahiro Yamada
le), I did some cleaups first. Patch 01 and 02 fix the prototypes of dma_{map,unmap}_single(). Patch 03-08 are code clean-ups. Patch 09 fixes the bug. Masahiro Yamada (9): dma-mapping: fix the prototype of dma_map_single() dma-mapping: fix the prototype of dma_unmap_single() mmc:

[PATCH 3/9] mmc: sdhci: put the aligned buffer pointer to struct sdhci_host

2020-02-04 Thread Masahiro Yamada
Using the global variable does not look nice. Add a new field sthci::align_buffer to point to the bounce buffer. Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci.c | 27 +-- include/sdhci.h | 1 + 2 files changed, 14 insertions(+), 14 deletions(-) diff --git

[PATCH 7/9] mmc: add mmc_get_dma_dir() helper

2020-02-04 Thread Masahiro Yamada
Copied from Linux kernel. include/linux/mmc/host.h Signed-off-by: Masahiro Yamada --- include/mmc.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/mmc.h b/include/mmc.h index b5cb514f57d6..71e2e1735ad5 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -12,6 +12,7

[PATCH 5/9] mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr

2020-02-04 Thread Masahiro Yamada
Use {lower,upper}_32_bits() instead of the combination of cast and shift. Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index b4713e7b9bba..fefe81016eb1 100644

[PATCH 6/9] mmc: sdhci: remove unneeded casts

2020-02-04 Thread Masahiro Yamada
host->mmc is already (struct mmc *). memalign() returns an opaque pointer, so there is no need for casting. Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c in

[PATCH 8/9] mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA

2020-02-04 Thread Masahiro Yamada
occurs behind the scene. This commit also sanitizes the difference between the virtual address and the dma address. Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci.c | 51 ++--- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/drivers/mmc

[PATCH 4/9] mmc: sdhci: reduce code duplication for aligned buffer

2020-02-04 Thread Masahiro Yamada
The same code is run for both SDHCI_QUIRK_32BIT_DMA_ADDR and define(CONFIG_FIXED_SDHCI_ALIGNED_BUFFER). Unify the code. Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci.c | 22 -- include/sdhci.h | 2 ++ 2 files changed, 10 insertions(+), 14 deletions(-) diff

[GIT PULL] UniPhier SoC updates for v2020.04 (2nd)

2020-01-31 Thread Masahiro Yamada
the block before booting the kernel Masahiro Yamada (7): mtd: rawnand: denali_dt: make the core clock optional mtd: rawnand: denali_dt: insert udelay() after reset deassert mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES based on DT compatible ARM: uniphier: remove adhoc reset d

Re: [PATCH 2/2] ARM: uniphier: use $loadaddr for source command

2020-01-31 Thread Masahiro Yamada
On Thu, Jan 30, 2020 at 10:21 PM Masahiro Yamada wrote: > > If the "source" command is not given the address, it uses > CONFIG_SYS_LOAD_ADDR, which is compile-time determined. > > Using the "loadaddr" environment variable is handier because it is > reloc

Re: [PATCH 1/2] ARM: uniphier: set gd->ram_base correctly

2020-01-31 Thread Masahiro Yamada
On Thu, Jan 30, 2020 at 10:21 PM Masahiro Yamada wrote: > > gd->ram_base is not set at all if the end address of the DRAM ch0 > exceeds 4GB. > > Signed-off-by: Masahiro Yamada > --- Applied to u-boot-uniphier. > > arch/arm/mach-uniphier/dram_init.c | 7 +

Re: [PATCH v2 4/4] ARM: uniphier: remove adhoc reset deassertion for the NAND controller

2020-01-31 Thread Masahiro Yamada
On Thu, Jan 30, 2020 at 12:57 AM Masahiro Yamada wrote: > > Now that the reset controlling of the Denali NAND driver (denali_dt.c) > works for this platform, remove the adhoc reset deassert code. > > Signed-off-by: Masahiro Yamada > --- Applied to u-boot-uniphier. > Chan

Re: [PATCH v2 2/4] mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES based on DT compatible

2020-01-31 Thread Masahiro Yamada
On Thu, Jan 30, 2020 at 12:57 AM Masahiro Yamada wrote: > > Currently, the denali NAND driver in U-Boot configures the > SPARE_AREA_SKIP_BYTES based on the CONFIG option. > > Recently, Linux kernel merged a patch that associates the proper > value for this register with the DT

Re: [PATCH v2 1/4] mtd: rawnand: denali_dt: insert udelay() after reset deassert

2020-01-31 Thread Masahiro Yamada
On Thu, Jan 30, 2020 at 12:57 AM Masahiro Yamada wrote: > > When the reset signal is de-asserted, the HW-controlled bootstrap > starts running unless it is disabled in the SoC integration. > It issues some commands to detect a NAND chip, and sets up registers > automatically. Unt

[PATCH 2/2] ARM: uniphier: use $loadaddr for source command

2020-01-30 Thread Masahiro Yamada
If the "source" command is not given the address, it uses CONFIG_SYS_LOAD_ADDR, which is compile-time determined. Using the "loadaddr" environment variable is handier because it is relocated according to the memory base when CONFIG_POSITION_INDEPENDENT is enabled. Signed-off

[PATCH 1/2] ARM: uniphier: set gd->ram_base correctly

2020-01-30 Thread Masahiro Yamada
gd->ram_base is not set at all if the end address of the DRAM ch0 exceeds 4GB. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/dram_init.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniph

[PATCH v3 3/4] mtd: rawnand: denali_dt: use UCLASS_MTD instead of UCLASS_MISC

2020-01-30 Thread Masahiro Yamada
UCLASS_MTD is a better fit for NAND drivers. Make NAND_DENALI_DT depend on DM_MTD, which is needed to compile drivers/mtd/mtd-uclass.c Also, make ARCH_UNIPHIER select DM_MTD because all the defconfig of this platform enables NAND_DENALI_DT. Signed-off-by: Masahiro Yamada Reviewed-by: Miquel

Re: [PATCH v2 3/4] mtd: rawnand: denali_dt: use UCLASS_MTD instead of UCLASS_MISC

2020-01-29 Thread Masahiro Yamada
Hi Marek, On Thu, Jan 30, 2020 at 7:03 AM Marek Vasut wrote: > > On 1/29/20 6:08 PM, Simon Goldschmidt wrote: > > Am 29.01.2020 um 16:55 schrieb Masahiro Yamada: > >> UCLASS_MTD is a better fit for NAND drivers. > >> > >> Make NAND_DENALI_DT depen

[PATCH v2 3/4] mtd: rawnand: denali_dt: use UCLASS_MTD instead of UCLASS_MISC

2020-01-29 Thread Masahiro Yamada
UCLASS_MTD is a better fit for NAND drivers. Make NAND_DENALI_DT depend on DM_MTD, which is needed to compile drivers/mtd/mtd-uclass.c Also, make ARCH_SOCFPGA and ARCH_UNIPHIER select DM_MTD because they use this driver. Signed-off-by: Masahiro Yamada --- Changes in v2: - new patch arch

[PATCH v2 2/4] mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES based on DT compatible

2020-01-29 Thread Masahiro Yamada
CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/raw/denali.c| 15 +++ drivers/mtd/nand/raw/denali_dt.c | 16 +++- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/nand/raw/denali.c b

[PATCH v2 4/4] ARM: uniphier: remove adhoc reset deassertion for the NAND controller

2020-01-29 Thread Masahiro Yamada
Now that the reset controlling of the Denali NAND driver (denali_dt.c) works for this platform, remove the adhoc reset deassert code. Signed-off-by: Masahiro Yamada --- Changes in v2: - more clean-up arch/arm/mach-uniphier/board_init.c | 2 -- arch/arm/mach-uniphier/clk/Makefile | 4

[PATCH v2 1/4] mtd: rawnand: denali_dt: insert udelay() after reset deassert

2020-01-29 Thread Masahiro Yamada
this delay function, some of UniPhier boards hangs up while executing nand_scan_ident(). (denali_read_byte() is blocked) Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/raw/denali_dt.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 4/4] mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES based on DT compatible

2020-01-27 Thread Masahiro Yamada
CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/raw/Kconfig | 18 +- drivers/mtd/nand/raw/denali.c| 15 +++ drivers/mtd/nand/raw/denali_dt.c | 16 +++- 3 files changed, 31 insertions(+), 18 deletions(-) diff

[PATCH 1/4] mtd: rawnand: denali_dt: insert udelay() after reset deassert

2020-01-27 Thread Masahiro Yamada
this delay function, some of UniPhier boards hangs up during the probe. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/raw/denali_dt.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index

[PATCH 3/4] ARM: uniphier: move NAND reset assertion to U-Boot proper from SPL

2020-01-27 Thread Masahiro Yamada
The comment /* deassert reset */ is wrong. It asserts the reset. It no longer needs to stay in SPL. The NAND controller reset is handled in the driver. So, this assert can be moved to the board_init() of U-Boot proper. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/board_init.c

[PATCH 2/4] ARM: uniphier: remove adhoc reset deassertion for the NAND controller

2020-01-27 Thread Masahiro Yamada
Now that the reset controlling of the Denali NAND driver (denali_dt.c) works for this platform, remove the adhoc reset deassert code. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/board_init.c | 2 -- arch/arm/mach-uniphier/clk/Makefile | 4 ++-- arch/arm/mach-uniphier/clk

Re: [PATCH V2 3/3] mtd: rawnand: denali: Do not reset the block before booting the kernel

2020-01-26 Thread Masahiro Yamada
d784ac3822b ("mtd: rawnand: denali: add reset handling") > Signed-off-by: Marek Vasut > Cc: Masahiro Yamada > Cc: Simon Goldschmidt > --- I talked to Marek off-list, and he acked me to reword the commit log like follows when applied. -->8--

Re: [PATCH V2 2/3] mtd: rawnand: denali_dt: make the core clock optional

2020-01-26 Thread Masahiro Yamada
On Wed, Jan 22, 2020 at 4:03 AM Marek Vasut wrote: > > From: Masahiro Yamada > > The "nand_x" and "ecc" clocks are currently optional. Make the core > clock optional in the same way. This will allow platforms with no clock > driver support to use this driv

Re: [PATCH V2 1/3] mtd: rawnand: denali-spl: Add missing hardware init on SoCFPGA

2020-01-26 Thread Masahiro Yamada
which do not use the HW-controlled bootstrap, more registers > may have to be programmed. > > This also aligns the SPL behavior with the full Denali NAND > driver, which sets these values in denali_hw_init(). > > Signed-off-by: Marek Vasut > Cc: Masahiro Yamada > --- Ap

Re: [PATCH v2] genboardscfg.py: drop python version comment

2020-01-23 Thread Masahiro Yamada
On Wed, Jan 22, 2020 at 9:54 PM Baruch Siach wrote: > > genboardscfg.py requires python 3.x since commit 3bc14098d8fb > ("genboardscfg.py: Convert to Python 3"). > > Cc: Masahiro Yamada Acked-by: Masahiro Yamada > Signed-off-by: Baruch Siach > --- &g

[PATCH] mmc: remove unneeded forward declarations

2020-01-22 Thread Masahiro Yamada
These functions are defined before the callers. Signed-off-by: Masahiro Yamada --- drivers/mmc/mmc.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index b26e266c1c29..dd8e29460cef 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -24,10

[PATCH] mmc: check the return value of mmc_select_mode_and_width()

2020-01-22 Thread Masahiro Yamada
Since commit 01298da31d92 ("mmc: Change mode when switching to a boot partition"), errors in mmc_select_mode_and_width() are ignored. The return value should be checked. Fixes: 01298da31d92 ("mmc: Change mode when switching to a boot partition") Signed-off-by: Masahiro Yamad

Re: [PATCH V2 1/3] mtd: rawnand: denali-spl: Add missing hardware init on SoCFPGA

2020-01-21 Thread Masahiro Yamada
> which do not use the HW-controlled bootstrap, more registers > may have to be programmed. > > This also aligns the SPL behavior with the full Denali NAND > driver, which sets these values in denali_hw_init(). > > Signed-off-by: Marek Vasut > Cc: Masahiro Yamada > -

Re: [PATCH] genboardscfg.py: fix python version dependency comment

2020-01-21 Thread Masahiro Yamada
Hi. On Wed, Jan 22, 2020 at 12:57 AM Baruch Siach wrote: > > Hi Masahiro Yamada, > > On Wed, Jan 22, 2020 at 12:19:31AM +0900, Masahiro Yamada wrote: > > On Mon, Jan 20, 2020 at 9:08 PM Baruch Siach wrote: > > > > > > genboardscfg.py requires

Re: [PATCH] genboardscfg.py: fix python version dependency comment

2020-01-21 Thread Masahiro Yamada
Hi. On Mon, Jan 20, 2020 at 9:08 PM Baruch Siach wrote: > > genboardscfg.py requires python 3.x since commit 3bc14098d8fb > ("genboardscfg.py: Convert to Python 3"). > > Cc: Masahiro Yamada > Signed-off-by: Baruch Siach > --- > tools/genboardscfg.py | 2 +- &g

[PATCH] mmc: sdhci-cadence: send tune request twice to work around errata

2020-01-21 Thread Masahiro Yamada
the hardware tuning and instead perform an almost identical procedure to eMMC, using the HRS34 Tune Force register. Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci-cadence.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/sdhci

Re: [PATCH 3/3] mtd: rawnand: denali: Do not reset the block before booting the kernel

2020-01-13 Thread Masahiro Yamada
On Mon, Jan 13, 2020 at 8:11 PM Marek Vasut wrote: > > On 1/10/20 6:26 AM, Masahiro Yamada wrote: > > On Fri, Jan 10, 2020 at 1:05 PM Marek Vasut wrote: > >> > >> On 1/10/20 4:09 AM, Masahiro Yamada wrote: > >>> On Fri, Jan 10, 2020 at 9:14 AM Marek V

Re: [PATCH 1/3] mtd: rawnand: denali-spl: Add missing hardware init

2020-01-13 Thread Masahiro Yamada
On Mon, Jan 13, 2020 at 8:11 PM Marek Vasut wrote: > > On 1/10/20 7:26 AM, Masahiro Yamada wrote: > > On Fri, Jan 10, 2020 at 1:05 PM Marek Vasut wrote: > >> > >> On 1/10/20 3:45 AM, Masahiro Yamada wrote: > >>> On Fri, Jan 10, 2020 at 9:14 AM Marek Va

Re: [PATCH 1/2] dts: add property removal option CONFIG_OF_REMOVE_PROPS

2020-01-10 Thread Masahiro Yamada
question about this. In my understanding, U-Boot DTB is a different instance from the DTB passed to the kernel. Was it changed, or is the change planned? -- Best Regards Masahiro Yamada

Re: [PATCH 1/2] dts: add property removal option CONFIG_OF_REMOVE_PROPS

2020-01-10 Thread Masahiro Yamada
scripts/dtc/pylibfdt/libfdt.i] Error 127 make[2]: *** [scripts/Makefile.build:432: scripts/dtc/pylibfdt] Error 2 make[1]: *** [scripts/Makefile.build:432: scripts/dtc] Error 2 make: *** [Makefile:551: scripts] Error 2 Please do not touch cmd_shipped. If this feature is desired, please implement it in dts/Makefile. -- Best Regards Masahiro Yamada

Re: [PATCH 2/8] arm64: dts: Remove inconsistent use of 'arm, armv8' compatible string

2020-01-10 Thread Masahiro Yamada
> This fixes warnings generated by the DT schema. > > Reported-by: Michal Simek > Cc: Mark Rutland > Cc: Will Deacon > Acked-by: Antoine Tenart > Acked-by: Nishanth Menon > Acked-by: Maxime Ripard > Acked-by: Manivannan Sadhasivam > Acked-by: Chanho Min > Acke

Re: [PATCH 1/3] mtd: rawnand: denali-spl: Add missing hardware init

2020-01-09 Thread Masahiro Yamada
On Fri, Jan 10, 2020 at 1:05 PM Marek Vasut wrote: > > On 1/10/20 3:45 AM, Masahiro Yamada wrote: > > On Fri, Jan 10, 2020 at 9:14 AM Marek Vasut wrote: > >> > >> While the Denali NAND is initialized by the BootROM in SPL, there > >> are still

Re: [PATCH 3/3] mtd: rawnand: denali: Do not reset the block before booting the kernel

2020-01-09 Thread Masahiro Yamada
On Fri, Jan 10, 2020 at 1:05 PM Marek Vasut wrote: > > On 1/10/20 4:09 AM, Masahiro Yamada wrote: > > On Fri, Jan 10, 2020 at 9:14 AM Marek Vasut wrote: > >> > >> The Denali NAND block loses configuration when put in reset. > >> Specifically

Re: [PATCH 3/3] mtd: rawnand: denali: Do not reset the block before booting the kernel

2020-01-09 Thread Masahiro Yamada
tion programmed > into the Denali NAND controller by the bootloader, do not > reset the controller before starting the kernel, otherwise > the kernel will read bogus values and fail to use the NAND. > > Fixes: ed784ac3822b ("mtd: rawnand: denali: add reset handling") > Signed

Re: [PATCH 3/3] mtd: rawnand: denali: Do not reset the block before booting the kernel

2020-01-09 Thread Masahiro Yamada
rt the reset of the NAND controller. (BTW, the situation is worse on the UniPhier platform. The kernel will crash because the register access never respond.) > > Fixes: ed784ac3822b ("mtd: rawnand: denali: add reset handling") > Signed-off-by: Marek Vasut > Cc: Masahiro Yamada

Re: [PATCH 1/3] mtd: rawnand: denali-spl: Add missing hardware init

2020-01-09 Thread Masahiro Yamada
; > Signed-off-by: Marek Vasut > Cc: Masahiro Yamada > --- > drivers/mtd/nand/raw/denali_spl.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/mtd/nand/raw/denali_spl.c > b/drivers/mtd/nand/raw/denali_spl.c > index dbaba3cab2..b8b29812aa 10064

Re: [PATCH] mtd: rawnand: denali_dt: make the core clock optional

2020-01-09 Thread Masahiro Yamada
On Thu, Jan 9, 2020 at 10:20 PM Marek Vasut wrote: > > On 1/9/20 1:02 PM, Masahiro Yamada wrote: > > The "nand_x" and "ecc" clocks are currently optional. Make the core > > clock optional in the same way. This will allow platforms with no clock

Re: [PATCH 3/3] mtd: rawnand: denali: Do not reset the block on SoCFPGA

2020-01-09 Thread Masahiro Yamada
On Thu, Jan 9, 2020 at 11:48 PM Marek Vasut wrote: > > On 1/9/20 1:11 PM, Masahiro Yamada wrote: > > On Thu, Jan 9, 2020 at 8:16 PM Marek Vasut wrote: > >> > >> On 1/9/20 12:04 PM, Masahiro Yamada wrote: > >>> On Thu, Jan 9, 2020 at 7:08 PM Marek

Re: [PATCH 3/3] mtd: rawnand: denali: Do not reset the block on SoCFPGA

2020-01-09 Thread Masahiro Yamada
On Thu, Jan 9, 2020 at 8:16 PM Marek Vasut wrote: > > On 1/9/20 12:04 PM, Masahiro Yamada wrote: > > On Thu, Jan 9, 2020 at 7:08 PM Marek Vasut wrote: > >> > >> Legacy kernel versions for SoCFPGA may not implement proper reset > >> handling. Apply the same

Re: [PATCH 2/3] mtd: rawnand: denali: Allow operation without clock driver

2020-01-09 Thread Masahiro Yamada
On Thu, Jan 9, 2020 at 8:16 PM Marek Vasut wrote: > > On 1/9/20 12:02 PM, Masahiro Yamada wrote: > > On Thu, Jan 9, 2020 at 7:08 PM Marek Vasut wrote: > >> > >> The SoCFPGA Gen5 does not have a clock driver yet, let the NAND driver > >> work without a cloc

[PATCH] mtd: rawnand: denali_dt: make the core clock optional

2020-01-09 Thread Masahiro Yamada
The "nand_x" and "ecc" clocks are currently optional. Make the core clock optional in the same way. This will allow platforms with no clock driver support to use this driver. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/raw/denali_dt.c | 10 ++ 1 file changed

[PATCH v2] mtd: rawnand: denali_dt: make the core clock optional

2020-01-09 Thread Masahiro Yamada
From: Masahiro Yamada Masahiro Yamada The "nand_x" and "ecc" clocks are currently optional. Make the core clock optional in the same way. This will allow platforms with no clock driver support to use this driver. Signed-off-by: Masahiro Yamada --- V2: - Fix sof line

[PATCH] mtd: rawnand: denali_dt: make the core clock optional

2020-01-09 Thread Masahiro Yamada
From: Masahiro Yamada Masahiro Yamada The "nand_x" and "ecc" clocks are currently optional. Make the core clock optional in the same way. This will allow platforms with no clock driver support to use this driver. Signed-off-by: Masahiro Yamada Masahiro Yamada Signed-off

Re: [PATCH 1/3] mtd: rawnand: denali-spl: Add missing hardware init

2020-01-09 Thread Masahiro Yamada
they are filled in by the full Denali NAND > driver in denali_hw_init(). > > Signed-off-by: Marek Vasut > Cc: Masahiro Yamada > --- > drivers/mtd/nand/raw/denali_spl.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/mtd/nand/raw/denali_spl.c >

Re: [PATCH 3/3] mtd: rawnand: denali: Do not reset the block on SoCFPGA

2020-01-09 Thread Masahiro Yamada
set the IP before booting Linux. This way, even the > older kernel versions can be booted by up to date U-Boot. > > Signed-off-by: Marek Vasut > Cc: Masahiro Yamada > --- > drivers/mtd/nand/raw/denali_dt.c | 12 > 1 file changed, 12 insertions(+) > > diff -

Re: [PATCH 2/3] mtd: rawnand: denali: Allow operation without clock driver

2020-01-09 Thread Masahiro Yamada
On Thu, Jan 9, 2020 at 7:08 PM Marek Vasut wrote: > > The SoCFPGA Gen5 does not have a clock driver yet, let the NAND driver > work without a clock driver by falling back to the default frequencies. > > Signed-off-by: Marek Vasut > Cc: Masahiro Yamada Why do you need this

[GIT PULL] UniPhier SoC updates for v2020.04

2020-01-08 Thread Masahiro Yamada
) UniPhier SoC updates for v2020.04 - add pinmux nodes for I2C ch5, ch6 - enable SPI driver and command Masahiro Yamada (2): ARM: dts: uniphier: add pinmux nodes for I2C ch5, ch6 uniphier_{v7

[PATCH] board_init: remove meaningless increment in board_init_f_init_reserve()

2020-01-08 Thread Masahiro Yamada
The base is not used in the code that follows this increment. Signed-off-by: Masahiro Yamada --- common/init/board_init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/init/board_init.c b/common/init/board_init.c index e52106966d49..315168672420 100644 --- a/common/init

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

2020-01-08 Thread Masahiro Yamada
r) - 1. Signed-off-by: Masahiro Yamada --- arch/x86/cpu/i386/cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index 2b27617ca3a4..72fefdd3adca 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -137,8

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

2020-01-08 Thread Masahiro Yamada
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. Signed-off-by: Masahiro Yamada --- arch/x86/cpu/start.S | 2 +- arch

<    1   2   3   4   5   6   7   8   9   10   >