mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
sacsng board: fix warnings "suggest explicit braces to avoid ambiguous 'else'"
Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
4ff170a818
commit
ced209c50e
1 changed files with 8 additions and 4 deletions
|
@ -272,10 +272,14 @@
|
|||
|
||||
#undef SPI_INIT /* no port initialization needed */
|
||||
#define SPI_READ ((immr->im_ioport.iop_pdatd & I2C_MISO) != 0)
|
||||
#define SPI_SDA(bit) if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \
|
||||
else immr->im_ioport.iop_pdatd &= ~I2C_MOSI
|
||||
#define SPI_SCL(bit) if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \
|
||||
else immr->im_ioport.iop_pdatd &= ~I2C_SCLK
|
||||
#define SPI_SDA(bit) do { \
|
||||
if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \
|
||||
else immr->im_ioport.iop_pdatd &= ~I2C_MOSI; \
|
||||
} while (0)
|
||||
#define SPI_SCL(bit) do { \
|
||||
if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \
|
||||
else immr->im_ioport.iop_pdatd &= ~I2C_SCLK; \
|
||||
} while (0)
|
||||
#define SPI_DELAY /* No delay is needed */
|
||||
#endif /* CONFIG_SOFT_SPI */
|
||||
|
||||
|
|
Loading…
Reference in a new issue