Skip to contentSkip to conversation

Pull request: u-boot-spi/master

U-Boot NAK Jagan Teki 4 participants 15 messages Jan 22, 2018 – Jan 25, 2018

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

----------------------------------------------------------------
Miquel Raynal (1):
doc: bindings: soft-spi: update documentation to match the code

Álvaro Fernández Rojas (16):
wait_bit: add 8/16/32 BE/LE versions of wait_for_bit
wait_bit: use wait_for_bit_le32 and remove wait_for_bit
drivers: spi: allow limiting reads
drivers: spi: consider command bytes when sending transfers
dm: spi: add BCM63xx SPI driver
mips: bmips: add bcm63xx-spi driver support for BCM6338
mips: bmips: add bcm63xx-spi driver support for BCM6348
mips: bmips: add bcm63xx-spi driver support for BCM6358
mips: bmips: add bcm63xx-spi driver support for BCM3380
mips: bmips: add bcm63xx-spi driver support for BCM63268
mips: bmips: enable the SPI flash on the Sagem F at ST1704
mips: bmips: enable the SPI flash on the Netgear CG3100D
dm: spi: add BCM63xx HSSPI driver
mips: bmips: add bcm63xx-hsspi driver support for BCM6328
mips: bmips: add bcm63xx-hsspi driver support for BCM63268
mips: bmips: enable the SPI flash on the Comtrend AR-5387un

 arch/arm/mach-imx/mx6/ddr.c                   |  22 +-
 arch/arm/mach-socfpga/clock_manager.c         |   4 +-
 arch/arm/mach-socfpga/clock_manager_gen5.c    |   6 +-
 arch/arm/mach-socfpga/reset_manager_arria10.c |  36 +--
 arch/mips/dts/brcm,bcm3380.dtsi               |  17 +
 arch/mips/dts/brcm,bcm63268.dtsi              |  38 +++
 arch/mips/dts/brcm,bcm6328.dtsi               |  24 ++
 arch/mips/dts/brcm,bcm6338.dtsi               |  17 +
 arch/mips/dts/brcm,bcm6348.dtsi               |  17 +
 arch/mips/dts/brcm,bcm6358.dtsi               |  17 +
 arch/mips/dts/comtrend,ar-5387un.dts          |  12 +
 arch/mips/dts/netgear,cg3100d.dts             |  12 +
 arch/mips/dts/sagem,f at st1704.dts              |  12 +
 arch/mips/mach-ath79/ar934x/clk.c             |   2 +-
 board/samtec/vining_2000/vining_2000.c        |   4 +-
 configs/comtrend_ar5387un_ram_defconfig       |   8 +
 configs/netgear_cg3100d_ram_defconfig         |   8 +
 configs/sagem_f at st1704_ram_defconfig          |   8 +
 doc/device-tree-bindings/spi/soft-spi.txt     |  24 +-
 drivers/clk/clk_pic32.c                       |  12 +-
 drivers/clk/renesas/clk-rcar-gen3.c           |   4 +-
 drivers/ddr/microchip/ddr2.c                  |   8 +-
 drivers/fpga/socfpga_arria10.c                |  17 +-
 drivers/mmc/msm_sdhci.c                       |   8 +-
 drivers/mtd/pic32_flash.c                     |   4 +-
 drivers/mtd/spi/spi_flash.c                   |   5 +-
 drivers/net/ag7xxx.c                          |  16 +-
 drivers/net/dwc_eth_qos.c                     |  17 +-
 drivers/net/ethoc.c                           |   8 +-
 drivers/net/pic32_eth.c                       |  12 +-
 drivers/net/pic32_mdio.c                      |  28 +-
 drivers/net/ravb.c                            |   4 +-
 drivers/net/xilinx_axi_emac.c                 |   4 +-
 drivers/net/zynq_gem.c                        |  12 +-
 drivers/reset/sti-reset.c                     |   4 +-
 drivers/serial/serial_pic32.c                 |   4 +-
 drivers/spi/Kconfig                           |  16 +
 drivers/spi/Makefile                          |   2 +
 drivers/spi/atmel_spi.c                       |   4 +-
 drivers/spi/bcm63xx_hsspi.c                   | 414 ++++++++++++++++++++++++
 drivers/spi/bcm63xx_spi.c                     | 433 ++++++++++++++++++++++++++
 drivers/spi/cadence_qspi_apb.c                |  14 +-
 drivers/spi/fsl_qspi.c                        |  20 +-
 drivers/spi/mvebu_a3700_spi.c                 |  20 +-
 drivers/usb/host/dwc2.c                       |  24 +-
 drivers/usb/host/ehci-msm.c                   |   3 +-
 drivers/usb/host/ehci-mx6.c                   |   5 +-
 drivers/usb/host/ohci-lpc32xx.c               |  12 +-
 drivers/usb/host/xhci-rcar.c                  |  12 +-
 drivers/video/atmel_hlcdfb.c                  |  64 ++--
 include/spi.h                                 |   5 +-
 include/wait_bit.h                            |  81 ++---
 52 files changed, 1326 insertions(+), 258 deletions(-)
 create mode 100644 drivers/spi/bcm63xx_hsspi.c
 create mode 100644 drivers/spi/bcm63xx_spi.c
Reviewed-by Daniel Schwierzeck Reviewed-by Jagan Teki NAK
#1 lore raw
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/9cc52f5c/attachment.sig>
#2 lore raw

Hi Tom,

Quoted 34 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 9 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

did this commit alone produce those warnings? The patch series itself builds successfully on Travis CI [1].

[1] https://travis-ci.org/danielschwierzeck/u-boot/builds/331506036

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/e0b5172d/attachment.sig>
#3 lore raw
Quoted 48 lines · Daniel Schwierzeck

Hi Tom,

Quoted 34 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 9 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Quoted 4 lines

did this commit alone produce those warnings? The patch series itself builds successfully on Travis CI [1].

[1] https://travis-ci.org/danielschwierzeck/u-boot/builds/331506036

It builds, yes. But it adds that warning too:
https://travis-ci.org/danielschwierzeck/u-boot/jobs/331506059

And I bisect'd down to the above commit being what adds that warning.

And yes, sigh, I need to something-something to get us back to zero warnings and make -Werror at least a CONFIG option and perhaps default in travis as this isn't the first warning to come in that wasn't noticed as travis didn't fail.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/e63dbea2/attachment.sig>
#4 lore raw
Quoted 57 lines · Tom Rini
Quoted 48 lines · Daniel Schwierzeck

Hi Tom,

Quoted 34 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 9 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Quoted 4 lines

did this commit alone produce those warnings? The patch series itself builds successfully on Travis CI [1].

[1] https://travis-ci.org/danielschwierzeck/u-boot/builds/331506036

It builds, yes. But it adds that warning too:
https://travis-ci.org/danielschwierzeck/u-boot/jobs/331506059

Quoted 7 lines

And I bisect'd down to the above commit being what adds that warning.

And yes, sigh, I need to something-something to get us back to zero warnings and make -Werror at least a CONFIG option and perhaps default in travis as this isn't the first warning to come in that wasn't noticed as travis didn't fail.

hm, since when are gcc warnings being ignored? I thought only DTC warnings were suppressed. Thus I still expected to have Travis CI builds marked as yellow in case of gcc warnings ;)

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/8ec846d9/attachment.sig>
#5 lore raw
Quoted 62 lines · Daniel Schwierzeck
Quoted 59 lines · Tom Rini
Quoted 48 lines · Daniel Schwierzeck

Hi Tom,

Quoted 34 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 9 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Quoted 4 lines

did this commit alone produce those warnings? The patch series itself builds successfully on Travis CI [1].

[1] https://travis-ci.org/danielschwierzeck/u-boot/builds/331506036

It builds, yes. But it adds that warning too:
https://travis-ci.org/danielschwierzeck/u-boot/jobs/331506059

And I bisect'd down to the above commit being what adds that warning.

Quoted 8 lines
Quoted 4 lines

And yes, sigh, I need to something-something to get us back to zero warnings and make -Werror at least a CONFIG option and perhaps default in travis as this isn't the first warning to come in that wasn't noticed as travis didn't fail.

hm, since when are gcc warnings being ignored? I thought only DTC warnings were suppressed. Thus I still expected to have Travis CI builds marked as yellow in case of gcc warnings ;)

... wait, you can have Travis CI do yellow for warnings? That'd be handy to get back again. Especially if we can have it for non-DTC warnings only.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/bc5108b4/attachment.sig>
#6 lore raw
Quoted 68 lines · Tom Rini
Quoted 67 lines · Daniel Schwierzeck
Quoted 63 lines · Tom Rini
Quoted 48 lines · Daniel Schwierzeck

Hi Tom,

Quoted 34 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 9 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Quoted 4 lines

did this commit alone produce those warnings? The patch series itself builds successfully on Travis CI [1].

[1] https://travis-ci.org/danielschwierzeck/u-boot/builds/331506036

It builds, yes. But it adds that warning too:
https://travis-ci.org/danielschwierzeck/u-boot/jobs/331506059

And I bisect'd down to the above commit being what adds that warning.

And yes, sigh, I need to something-something to get us back to zero warnings and make -Werror at least a CONFIG option and perhaps default in travis as this isn't the first warning to come in that wasn't noticed as travis didn't fail.

Quoted 8 lines
Quoted 3 lines

hm, since when are gcc warnings being ignored? I thought only DTC warnings were suppressed. Thus I still expected to have Travis CI builds marked as yellow in case of gcc warnings ;)

... wait, you can have Travis CI do yellow for warnings? That'd be handy to get back again. Especially if we can have it for non-DTC warnings only.

hm, I think I saw this in the past but can't find any reference in the documentation. Sorry for creating false hopes ;)

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/d5d68a09/attachment.sig>
#7 lore raw
In reply to Tom Rini
Quoted 34 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 10 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Tom, would this change to the patch be acceptable?

include/wait_bit.h +4 -0
@@ -73,8 +73,12 @@ static inline int wait_for_bit_##sfx(const void *reg,			\
 
 BUILD_WAIT_FOR_BIT(8, u8, readb)
 BUILD_WAIT_FOR_BIT(le16, u16, readw)
+#ifdef readw_be
 BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
+#endif
 BUILD_WAIT_FOR_BIT(le32, u32, readl)
+#ifdef readl_be
 BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
+#endif
 
 #endif

This wouldn't define wait_bit_be*() on archs which doesn't implement readw_be or readl_be.

A build with the updated patch is scheduled at
https://travis-ci.org/danielschwierzeck/u-boot/builds/331899381

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/7a712800/attachment.sig>
#8 lore raw
Quoted 66 lines · Daniel Schwierzeck
Quoted 34 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 10 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Tom, would this change to the patch be acceptable?

include/wait_bit.h +4 -0
@@ -73,8 +73,12 @@ static inline int wait_for_bit_##sfx(const void *reg,			\
 
 BUILD_WAIT_FOR_BIT(8, u8, readb)
 BUILD_WAIT_FOR_BIT(le16, u16, readw)
+#ifdef readw_be
 BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
+#endif
 BUILD_WAIT_FOR_BIT(le32, u32, readl)
+#ifdef readl_be
 BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
+#endif
 
 #endif
Quoted 5 lines

This wouldn't define wait_bit_be*() on archs which doesn't implement readw_be or readl_be.

A build with the updated patch is scheduled at
https://travis-ci.org/danielschwierzeck/u-boot/builds/331899381

That seems reasonable, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/a8906979/attachment.sig>
#9 lore raw
Quoted 67 lines · Tom Rini
Quoted 66 lines · Daniel Schwierzeck
Quoted 34 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 10 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Tom, would this change to the patch be acceptable?

include/wait_bit.h +4 -0
@@ -73,8 +73,12 @@ static inline int wait_for_bit_##sfx(const void *reg,			\
 
 BUILD_WAIT_FOR_BIT(8, u8, readb)
 BUILD_WAIT_FOR_BIT(le16, u16, readw)
+#ifdef readw_be
 BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
+#endif
 BUILD_WAIT_FOR_BIT(le32, u32, readl)
+#ifdef readl_be
 BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
+#endif
 
 #endif
Quoted 8 lines
Quoted 5 lines

This wouldn't define wait_bit_be*() on archs which doesn't implement readw_be or readl_be.

A build with the updated patch is scheduled at
https://travis-ci.org/danielschwierzeck/u-boot/builds/331899381

That seems reasonable, thanks!

Álvaro, could you send a v10 where the patch "wait_bit: add 8/16/32 BE/LE versions of wait_for_bit" is fixed like above? Thanks.

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/6f3b7ba8/attachment.sig>
#10 lore raw

Hi Daniel,

Quoted 69 lines · Daniel Schwierzeck
Quoted 67 lines · Tom Rini
Quoted 66 lines · Daniel Schwierzeck
Quoted 33 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

   Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)
Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 10 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Tom, would this change to the patch be acceptable?

include/wait_bit.h +4 -0
@@ -73,8 +73,12 @@ static inline int wait_for_bit_##sfx(const void *reg,			\
 
  BUILD_WAIT_FOR_BIT(8, u8, readb)
  BUILD_WAIT_FOR_BIT(le16, u16, readw)
+#ifdef readw_be
  BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
+#endif
  BUILD_WAIT_FOR_BIT(le32, u32, readl)
+#ifdef readl_be
  BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
+#endif
 
  #endif

This wouldn't define wait_bit_be*() on archs which doesn't implement readw_be or readl_be.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

A build with the updated patch is scheduled at
https://travis-ci.org/danielschwierzeck/u-boot/builds/331899381

That seems reasonable, thanks!

Álvaro, could you send a v10 where the patch "wait_bit: add 8/16/32 BE/LE versions of wait_for_bit" is fixed like above? Thanks.

Sure, but I think this alternative would be much cleaner:
https://gist.github.com/Noltari/3e6ed4648b87484c73ca22e2f533f9b0

What do you think?

#11 lore raw
Quoted 77 lines · Álvaro Fernández Rojas

Hi Daniel,

Quoted 73 lines · Daniel Schwierzeck
Quoted 71 lines · Tom Rini
Quoted 63 lines · Daniel Schwierzeck
Quoted 33 lines · Tom Rini
Quoted 11 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:

Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

Quoted 8 lines

are available in the git repository at:

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit.
This is needed for reading registers that are not aligned to 32 bits, and for Big Endian platforms.

Quoted 10 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31: warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration]
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Tom, would this change to the patch be acceptable?

include/wait_bit.h +4 -0
@@ -73,8 +73,12 @@ static inline int wait_for_bit_##sfx(const void *reg,			\
 
 BUILD_WAIT_FOR_BIT(8, u8, readb)
 BUILD_WAIT_FOR_BIT(le16, u16, readw)
+#ifdef readw_be
 BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
+#endif
 BUILD_WAIT_FOR_BIT(le32, u32, readl)
+#ifdef readl_be
 BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
+#endif
 
 #endif
Quoted 5 lines

This wouldn't define wait_bit_be*() on archs which doesn't implement readw_be or readl_be.

A build with the updated patch is scheduled at
https://travis-ci.org/danielschwierzeck/u-boot/builds/331899381

That seems reasonable, thanks!

Quoted 6 lines
Quoted 2 lines

Álvaro, could you send a v10 where the patch "wait_bit: add 8/16/32 BE/LE versions of wait_for_bit" is fixed like above? Thanks.

Sure, but I think this alternative would be much cleaner:
https://gist.github.com/Noltari/3e6ed4648b87484c73ca22e2f533f9b0

What do you think?

That is a bit cleaner, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180122/219c5819/attachment.sig>
#12 lore raw
In reply to Álvaro Fernández Rojas
Quoted 89 lines · Álvaro Fernández Rojas

Hi Daniel,

Quoted 85 lines · Daniel Schwierzeck
Quoted 83 lines · Tom Rini
Quoted 75 lines · Daniel Schwierzeck
Quoted 42 lines · Tom Rini
Quoted 15 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit
98691a60abffb44303d7dae6e9e699d0daded930:

   Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)

are available in the git repository at:

Quoted 8 lines

   git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to
b23c685c6f295da3c01dd487f0e003b70299af91:

   mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be
Author: Álvaro Fernández Rojas <[email protected]> Date:   Sat Jan 20 02:11:34 2018 +0100

     wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

     Add 8/16/32 bits and BE/LE versions of wait_for_bit. This is needed for reading registers that are not aligned to 32 bits, and for
     Big Endian platforms.

Quoted 12 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31:
warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration] w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be32?:         w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Tom, would this change to the patch be acceptable?

include/wait_bit.h +4 -0
@@ -73,8 +73,12 @@ static inline int wait_for_bit_##sfx(const void
 *reg,            \
 
   BUILD_WAIT_FOR_BIT(8, u8, readb)
   BUILD_WAIT_FOR_BIT(le16, u16, readw)
+#ifdef readw_be
   BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
+#endif
   BUILD_WAIT_FOR_BIT(le32, u32, readl)
+#ifdef readl_be
   BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
+#endif
 

  #endif

Quoted 5 lines

This wouldn't define wait_bit_be*() on archs which doesn't implement readw_be or readl_be.

A build with the updated patch is scheduled at
https://travis-ci.org/danielschwierzeck/u-boot/builds/331899381

That seems reasonable, thanks!

Quoted 7 lines
Quoted 2 lines

Álvaro, could you send a v10 where the patch "wait_bit: add 8/16/32 BE/LE versions of wait_for_bit" is fixed like above? Thanks.

Sure, but I think this alternative would be much cleaner:
https://gist.github.com/Noltari/3e6ed4648b87484c73ca22e2f533f9b0

What do you think?

I had a similar idea at first but a #ifdef within a #define is not possible and AFAIK not implemented in C standards.

Have you tried it? With nested #ifdef I'm getting:

$ ./tools/buildman/buildman -o /tmp/bm -b master..wait_for_bit aarch64 
Building 1 commit for 111 boards (8 threads, 1 job per thread)
   50   11   50 /111    lion-rk3368

vs.

$ ./tools/buildman/buildman -o /tmp/bm -b master..wait_for_bit_2 aarch64 
Building 1 commit for 111 boards (8 threads, 1 job per thread)
   98   13    0 /111    0:00:06  : ls1046ardb_emm

Also a Travis CI build already shows several broken builds:
https://travis-ci.org/danielschwierzeck/u-boot/builds/332205310

Maybe a yet better solution would be if each arch implements the same common set of I/O primitives like Linux is doing.

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180123/beee2404/attachment.sig>
author
#13 lore raw
Quoted 110 lines · Daniel Schwierzeck
Quoted 89 lines · Álvaro Fernández Rojas

Hi Daniel,

Quoted 85 lines · Daniel Schwierzeck
Quoted 83 lines · Tom Rini
Quoted 75 lines · Daniel Schwierzeck
Quoted 42 lines · Tom Rini
Quoted 15 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit
98691a60abffb44303d7dae6e9e699d0daded930:

   Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51

-0500)

are available in the git repository at:

Quoted 8 lines

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to
b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un
(2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit. This is needed for reading registers that are not aligned to
32 bits, and for
Big Endian platforms.

Quoted 12 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31:
warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration] w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function
?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT)
../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Tom, would this change to the patch be acceptable?

include/wait_bit.h +4 -0
@@ -73,8 +73,12 @@ static inline int wait_for_bit_##sfx(const void
 *reg,            \
 
  BUILD_WAIT_FOR_BIT(8, u8, readb)
  BUILD_WAIT_FOR_BIT(le16, u16, readw)
+#ifdef readw_be
  BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
+#endif
  BUILD_WAIT_FOR_BIT(le32, u32, readl)
+#ifdef readl_be
  BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
+#endif
 
  #endif
Quoted 5 lines

This wouldn't define wait_bit_be*() on archs which doesn't implement readw_be or readl_be.

A build with the updated patch is scheduled at
https://travis-ci.org/danielschwierzeck/u-boot/builds/331899381

That seems reasonable, thanks!

Quoted 7 lines
Quoted 2 lines

Álvaro, could you send a v10 where the patch "wait_bit: add 8/16/32 BE/LE versions of wait_for_bit" is fixed like above? Thanks.

Sure, but I think this alternative would be much cleaner:
https://gist.github.com/Noltari/3e6ed4648b87484c73ca22e2f533f9b0

What do you think?

I had a similar idea at first but a #ifdef within a #define is not possible and AFAIK not implemented in C standards.

Have you tried it? With nested #ifdef I'm getting:

$ ./tools/buildman/buildman -o /tmp/bm -b master..wait_for_bit aarch64
Building 1 commit for 111 boards (8 threads, 1 job per thread)
   50   11   50 /111    lion-rk3368

vs.

Quoted 8 lines
$ ./tools/buildman/buildman -o /tmp/bm -b master..wait_for_bit_2 aarch64
Building 1 commit for 111 boards (8 threads, 1 job per thread)
   98   13    0 /111    0:00:06  : ls1046ardb_emm

Also a Travis CI build already shows several broken builds:
https://travis-ci.org/danielschwierzeck/u-boot/builds/332205310

Maybe a yet better solution would be if each arch implements the same common set of I/O primitives like Linux is doing.

Recent patch from Alvaro, seems fine to built all [1]

[1] https://travis-ci.org/openedev/u-boot-spi/builds/332390626

#14 lore raw

Hi Jagan,

Quoted 112 lines · Jagan Teki
Quoted 110 lines · Daniel Schwierzeck
Quoted 87 lines · Álvaro Fernández Rojas

Hi Daniel,

Quoted 83 lines · Daniel Schwierzeck
Quoted 82 lines · Tom Rini
Quoted 74 lines · Daniel Schwierzeck
Quoted 42 lines · Tom Rini
Quoted 15 lines · Jagan Teki

Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit
98691a60abffb44303d7dae6e9e699d0daded930:

    Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51

-0500)

are available in the git repository at:

Quoted 8 lines

git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to
b23c685c6f295da3c01dd487f0e003b70299af91:

mips: bmips: enable the SPI flash on the Comtrend AR-5387un
(2018-01-22 10:39:13 +0530)

NAK:

commit 19e3a4856c1cba751a9ecb3931ff0d96a7f169be

Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jan 20 02:11:34 2018 +0100

wait_bit: add 8/16/32 BE/LE versions of wait_for_bit

Add 8/16/32 bits and BE/LE versions of wait_for_bit. This is needed for reading registers that are not aligned to
32 bits, and for
Big Endian platforms.

Quoted 12 lines

Adds warnings on almost all platforms:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function ?wait_for_bit_be16?:
w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h:76:31:
warning: implicit declaration of function ?readw_be? [-Wimplicit-function-declaration] w+(ls1088ardb_qspi_SECURE_BOOT) ../include/wait_bit.h: In function
?wait_for_bit_be32?: w+(ls1088ardb_qspi_SECURE_BOOT)
../include/wait_bit.h:78:31: warning: implicit declaration of function ?readl_be? [-Wimplicit-function-declaration]

Tom, would this change to the patch be acceptable?

include/wait_bit.h +4 -0
@@ -73,8 +73,12 @@ static inline int wait_for_bit_##sfx(const void
 *reg,            \
 
   BUILD_WAIT_FOR_BIT(8, u8, readb)
   BUILD_WAIT_FOR_BIT(le16, u16, readw)
+#ifdef readw_be
   BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
+#endif
   BUILD_WAIT_FOR_BIT(le32, u32, readl)
+#ifdef readl_be
   BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
+#endif
 
   #endif
Quoted 5 lines

This wouldn't define wait_bit_be*() on archs which doesn't implement readw_be or readl_be.

A build with the updated patch is scheduled at
https://travis-ci.org/danielschwierzeck/u-boot/builds/331899381

That seems reasonable, thanks!

Quoted 7 lines
Quoted 2 lines

Álvaro, could you send a v10 where the patch "wait_bit: add 8/16/32 BE/LE versions of wait_for_bit" is fixed like above? Thanks.

Sure, but I think this alternative would be much cleaner:
https://gist.github.com/Noltari/3e6ed4648b87484c73ca22e2f533f9b0

What do you think?

I had a similar idea at first but a #ifdef within a #define is not possible and AFAIK not implemented in C standards.

Have you tried it? With nested #ifdef I'm getting:

$ ./tools/buildman/buildman -o /tmp/bm -b master..wait_for_bit aarch64
Building 1 commit for 111 boards (8 threads, 1 job per thread)
    50   11   50 /111    lion-rk3368

vs.

$ ./tools/buildman/buildman -o /tmp/bm -b master..wait_for_bit_2 aarch64
Building 1 commit for 111 boards (8 threads, 1 job per thread)
    98   13    0 /111    0:00:06  : ls1046ardb_emm
Quoted 7 lines
Quoted 4 lines

Also a Travis CI build already shows several broken builds:
https://travis-ci.org/danielschwierzeck/u-boot/builds/332205310

Maybe a yet better solution would be if each arch implements the same common set of I/O primitives like Linux is doing.

Recent patch from Alvaro, seems fine to built all [1]

[1] https://travis-ci.org/openedev/u-boot-spi/builds/332390626

I ended up adding the changes proposed by Daniel to avoid nested ifdefs. So I guess it can be merged now :).