summaryrefslogtreecommitdiff
path: root/src/soc/qualcomm/common
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-11-18 15:08:13 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-11-23 16:30:58 +0000
commit977673894ff486af2ff74ba5585ca6039701eb8f (patch)
treeb9719dc91560c7f5fcb791da0c767979e9bb48e0 /src/soc/qualcomm/common
parent334772008c547d971e2591ef53bd570c176572ed (diff)
src/soc/qualcomm: Remove unnecessary space after casts
Change-Id: Ic6c711fe3fad19c24ca4c01f8d0a4bc002f14bd6 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69807 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm/common')
-rw-r--r--src/soc/qualcomm/common/include/soc/qspi_common.h2
-rw-r--r--src/soc/qualcomm/common/qspi.c24
-rw-r--r--src/soc/qualcomm/common/qupv3_config.c4
-rw-r--r--src/soc/qualcomm/common/usb/qusb_phy.c2
-rw-r--r--src/soc/qualcomm/common/usb/snps_usb_phy.c2
5 files changed, 17 insertions, 17 deletions
diff --git a/src/soc/qualcomm/common/include/soc/qspi_common.h b/src/soc/qualcomm/common/include/soc/qspi_common.h
index 6a1496aed1..a0c8e46812 100644
--- a/src/soc/qualcomm/common/include/soc/qspi_common.h
+++ b/src/soc/qualcomm/common/include/soc/qspi_common.h
@@ -30,7 +30,7 @@ struct qcom_qspi_regs {
};
check_member(qcom_qspi_regs, rd_fifo, 0x50);
-static struct qcom_qspi_regs * const qcom_qspi = (void *) QSPI_BASE;
+static struct qcom_qspi_regs * const qcom_qspi = (void *)QSPI_BASE;
// MSTR_CONFIG register
diff --git a/src/soc/qualcomm/common/qspi.c b/src/soc/qualcomm/common/qspi.c
index 1c345ccf12..eb0c062a81 100644
--- a/src/soc/qualcomm/common/qspi.c
+++ b/src/soc/qualcomm/common/qspi.c
@@ -66,7 +66,7 @@ static void dma_transfer_chain(struct cmd_desc *chain)
uint32_t mstr_int_status;
write32(&qcom_qspi->mstr_int_sts, 0xFFFFFFFF);
- write32(&qcom_qspi->next_dma_desc_addr, (uint32_t)(uintptr_t) chain);
+ write32(&qcom_qspi->next_dma_desc_addr, (uint32_t)(uintptr_t)chain);
while (1) {
mstr_int_status = read32(&qcom_qspi->mstr_int_sts);
@@ -87,15 +87,15 @@ static void flush_chain(void)
if (desc->direction == MASTER_READ) {
if (desc->bounce_length == 0)
dcache_invalidate_by_mva(
- (void *)(uintptr_t) desc->data_address,
+ (void *)(uintptr_t)desc->data_address,
desc->length);
else {
- src = (void *)(uintptr_t) desc->bounce_src;
- dst = (void *)(uintptr_t) desc->bounce_dst;
+ src = (void *)(uintptr_t)desc->bounce_src;
+ dst = (void *)(uintptr_t)desc->bounce_dst;
memcpy(dst, src, desc->bounce_length);
}
}
- desc = (void *)(uintptr_t) desc->next_descriptor;
+ desc = (void *)(uintptr_t)desc->next_descriptor;
}
curr_desc_idx = -1;
}
@@ -112,7 +112,7 @@ static struct cmd_desc *allocate_descriptor(void)
index = ++curr_desc_idx;
next = &dma->descriptors[index];
- next->data_address = (uint32_t) (uintptr_t) dma->buffers[index];
+ next->data_address = (uint32_t)(uintptr_t)dma->buffers[index];
next->next_descriptor = 0;
next->direction = MASTER_READ;
@@ -131,7 +131,7 @@ static struct cmd_desc *allocate_descriptor(void)
next->bounce_length = 0;
if (current)
- current->next_descriptor = (uint32_t)(uintptr_t) next;
+ current->next_descriptor = (uint32_t)(uintptr_t)next;
return next;
}
@@ -164,13 +164,13 @@ static void queue_bounce_data(uint8_t *data, uint32_t data_bytes,
desc = allocate_descriptor();
desc->direction = write;
desc->multi_io_mode = data_mode;
- ptr = (void *)(uintptr_t) desc->data_address;
+ ptr = (void *)(uintptr_t)desc->data_address;
if (write) {
memcpy(ptr, data, data_bytes);
} else {
- desc->bounce_src = (uint32_t)(uintptr_t) ptr;
- desc->bounce_dst = (uint32_t)(uintptr_t) data;
+ desc->bounce_src = (uint32_t)(uintptr_t)ptr;
+ desc->bounce_dst = (uint32_t)(uintptr_t)data;
desc->bounce_length = data_bytes;
}
@@ -185,7 +185,7 @@ static void queue_direct_data(uint8_t *data, uint32_t data_bytes,
desc = allocate_descriptor();
desc->direction = write;
desc->multi_io_mode = data_mode;
- desc->data_address = (uint32_t)(uintptr_t) data;
+ desc->data_address = (uint32_t)(uintptr_t)data;
desc->length = data_bytes;
if (write)
@@ -291,7 +291,7 @@ static int xfer(enum qspi_mode mode, const void *dout, size_t out_bytes,
return -1;
}
- queue_data((uint8_t *) (out_bytes ? dout : din),
+ queue_data((uint8_t *)(out_bytes ? dout : din),
in_bytes | out_bytes, mode, !!out_bytes);
flush_chain();
diff --git a/src/soc/qualcomm/common/qupv3_config.c b/src/soc/qualcomm/common/qupv3_config.c
index b243fdded8..919c11bf4e 100644
--- a/src/soc/qualcomm/common/qupv3_config.c
+++ b/src/soc/qualcomm/common/qupv3_config.c
@@ -188,7 +188,7 @@ void gpi_firmware_load(int addr)
struct gsi_fw_hdr *gsi_hdr;
struct gsi_fw_iep *fwIep;
struct gsi_fw_iram *fwIRam;
- struct gsi_regs *regs = (struct gsi_regs *)(uintptr_t) addr;
+ struct gsi_regs *regs = (struct gsi_regs *)(uintptr_t)addr;
static const char * const filename = "fallback/gsi_fw";
/* Assign firmware header base */
@@ -241,7 +241,7 @@ static void qup_common_init(int addr)
{
struct qupv3_common_reg *qupv3_common;
/* HPG section 3.1.2 */
- qupv3_common = (struct qupv3_common_reg *)(uintptr_t) addr;
+ qupv3_common = (struct qupv3_common_reg *)(uintptr_t)addr;
setbits32(&qupv3_common->qupv3_common_cfg_reg,
QUPV3_COMMON_CFG_FAST_SWITCH_TO_HIGH_DISABLE_BMSK);
diff --git a/src/soc/qualcomm/common/usb/qusb_phy.c b/src/soc/qualcomm/common/usb/qusb_phy.c
index 494f7cd3b3..ddb087f0aa 100644
--- a/src/soc/qualcomm/common/usb/qusb_phy.c
+++ b/src/soc/qualcomm/common/usb/qusb_phy.c
@@ -96,7 +96,7 @@ void hs_usb_phy_init(void *board_data)
hs_phy_reg = &qusb_phy;
- hs_phy_reg->board_data = (struct usb_board_data *) board_data;
+ hs_phy_reg->board_data = (struct usb_board_data *)board_data;
/* PWR_CTRL: set the power down bit to disable the PHY */
diff --git a/src/soc/qualcomm/common/usb/snps_usb_phy.c b/src/soc/qualcomm/common/usb/snps_usb_phy.c
index 1b2d869bc4..d04694b0c7 100644
--- a/src/soc/qualcomm/common/usb/snps_usb_phy.c
+++ b/src/soc/qualcomm/common/usb/snps_usb_phy.c
@@ -36,7 +36,7 @@ struct hs_usb_phy_reg *hs_phy_reg = (void *)HS_USB_PRIM_PHY_BASE;
void hs_usb_phy_init(void *board_data)
{
struct usb_board_data *override_data =
- (struct usb_board_data *) board_data;
+ (struct usb_board_data *)board_data;
clrsetbits32(&hs_phy_reg->cfg0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN,
UTMI_PHY_CMN_CTRL_OVERRIDE_EN);