From e53baa6bfff7e3f8962c9e2310e62e28da88c54b Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Sat, 9 Sep 2023 08:50:01 +0200 Subject: soc/sifive/fu540: Remove space after a cast Change-Id: I6a64015326c6ec7e14a0465fe081a2cb4606cdc8 Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/77734 Reviewed-by: Felix Singer Tested-by: build bot (Jenkins) --- src/soc/sifive/fu540/spi.c | 6 +++--- src/soc/sifive/fu540/ux00ddr.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/soc/sifive') diff --git a/src/soc/sifive/fu540/spi.c b/src/soc/sifive/fu540/spi.c index 87c59a4716..2fd67b1294 100644 --- a/src/soc/sifive/fu540/spi.c +++ b/src/soc/sifive/fu540/spi.c @@ -28,7 +28,7 @@ static void spi_tx(volatile struct spi_ctrl *spictrl, uint8_t in) ); } while (r < 0); #else - while ((int32_t) spictrl->txdata.raw_bits < 0) + while ((int32_t)spictrl->txdata.raw_bits < 0) ; spictrl->txdata.data = in; #endif @@ -40,9 +40,9 @@ static void spi_tx(volatile struct spi_ctrl *spictrl, uint8_t in) static uint8_t spi_rx(volatile struct spi_ctrl *spictrl) { int32_t out; - while ((out = (int32_t) spictrl->rxdata.raw_bits) < 0) + while ((out = (int32_t)spictrl->rxdata.raw_bits) < 0) ; - return (uint8_t) out; + return (uint8_t)out; } static int spi_claim_bus_(const struct spi_slave *slave) diff --git a/src/soc/sifive/fu540/ux00ddr.h b/src/soc/sifive/fu540/ux00ddr.h index d468a8ede7..aebf91a2d4 100644 --- a/src/soc/sifive/fu540/ux00ddr.h +++ b/src/soc/sifive/fu540/ux00ddr.h @@ -48,8 +48,8 @@ static inline void phy_reset(volatile uint32_t *ddrphyreg, const uint32_t *physe } static inline void ux00ddr_writeregmap(size_t ahbregaddr, const uint32_t *ctlsettings, const uint32_t *physettings) { - volatile uint32_t *ddrctlreg = (volatile uint32_t *) ahbregaddr; - volatile uint32_t *ddrphyreg = ((volatile uint32_t *) ahbregaddr) + (0x2000 / sizeof(uint32_t)); + volatile uint32_t *ddrctlreg = (volatile uint32_t *)ahbregaddr; + volatile uint32_t *ddrphyreg = ((volatile uint32_t *)ahbregaddr) + (0x2000 / sizeof(uint32_t)); unsigned int i; for (i=0;i<=264;i++) { @@ -102,7 +102,7 @@ static inline void ux00ddr_mask_leveling_completed_interrupt(size_t ahbregaddr) static inline void ux00ddr_setuprangeprotection(size_t ahbregaddr, size_t end_addr) { _REG32(209<<2, ahbregaddr) = 0x0; size_t end_addr_16Kblocks = ((end_addr >> 14) & 0x7FFFFF)-1; - _REG32(210<<2, ahbregaddr) = ((uint32_t) end_addr_16Kblocks); + _REG32(210<<2, ahbregaddr) = ((uint32_t)end_addr_16Kblocks); _REG32(212<<2, ahbregaddr) = 0x0; _REG32(214<<2, ahbregaddr) = 0x0; _REG32(216<<2, ahbregaddr) = 0x0; -- cgit v1.2.3