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>
This commit is contained in:
parent
334772008c
commit
977673894f
|
@ -30,7 +30,7 @@ struct qcom_qspi_regs {
|
||||||
};
|
};
|
||||||
|
|
||||||
check_member(qcom_qspi_regs, rd_fifo, 0x50);
|
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
|
// MSTR_CONFIG register
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ static void dma_transfer_chain(struct cmd_desc *chain)
|
||||||
uint32_t mstr_int_status;
|
uint32_t mstr_int_status;
|
||||||
|
|
||||||
write32(&qcom_qspi->mstr_int_sts, 0xFFFFFFFF);
|
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) {
|
while (1) {
|
||||||
mstr_int_status = read32(&qcom_qspi->mstr_int_sts);
|
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->direction == MASTER_READ) {
|
||||||
if (desc->bounce_length == 0)
|
if (desc->bounce_length == 0)
|
||||||
dcache_invalidate_by_mva(
|
dcache_invalidate_by_mva(
|
||||||
(void *)(uintptr_t) desc->data_address,
|
(void *)(uintptr_t)desc->data_address,
|
||||||
desc->length);
|
desc->length);
|
||||||
else {
|
else {
|
||||||
src = (void *)(uintptr_t) desc->bounce_src;
|
src = (void *)(uintptr_t)desc->bounce_src;
|
||||||
dst = (void *)(uintptr_t) desc->bounce_dst;
|
dst = (void *)(uintptr_t)desc->bounce_dst;
|
||||||
memcpy(dst, src, desc->bounce_length);
|
memcpy(dst, src, desc->bounce_length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
desc = (void *)(uintptr_t) desc->next_descriptor;
|
desc = (void *)(uintptr_t)desc->next_descriptor;
|
||||||
}
|
}
|
||||||
curr_desc_idx = -1;
|
curr_desc_idx = -1;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ static struct cmd_desc *allocate_descriptor(void)
|
||||||
index = ++curr_desc_idx;
|
index = ++curr_desc_idx;
|
||||||
next = &dma->descriptors[index];
|
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->next_descriptor = 0;
|
||||||
next->direction = MASTER_READ;
|
next->direction = MASTER_READ;
|
||||||
|
@ -131,7 +131,7 @@ static struct cmd_desc *allocate_descriptor(void)
|
||||||
next->bounce_length = 0;
|
next->bounce_length = 0;
|
||||||
|
|
||||||
if (current)
|
if (current)
|
||||||
current->next_descriptor = (uint32_t)(uintptr_t) next;
|
current->next_descriptor = (uint32_t)(uintptr_t)next;
|
||||||
|
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
@ -164,13 +164,13 @@ static void queue_bounce_data(uint8_t *data, uint32_t data_bytes,
|
||||||
desc = allocate_descriptor();
|
desc = allocate_descriptor();
|
||||||
desc->direction = write;
|
desc->direction = write;
|
||||||
desc->multi_io_mode = data_mode;
|
desc->multi_io_mode = data_mode;
|
||||||
ptr = (void *)(uintptr_t) desc->data_address;
|
ptr = (void *)(uintptr_t)desc->data_address;
|
||||||
|
|
||||||
if (write) {
|
if (write) {
|
||||||
memcpy(ptr, data, data_bytes);
|
memcpy(ptr, data, data_bytes);
|
||||||
} else {
|
} else {
|
||||||
desc->bounce_src = (uint32_t)(uintptr_t) ptr;
|
desc->bounce_src = (uint32_t)(uintptr_t)ptr;
|
||||||
desc->bounce_dst = (uint32_t)(uintptr_t) data;
|
desc->bounce_dst = (uint32_t)(uintptr_t)data;
|
||||||
desc->bounce_length = data_bytes;
|
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 = allocate_descriptor();
|
||||||
desc->direction = write;
|
desc->direction = write;
|
||||||
desc->multi_io_mode = data_mode;
|
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;
|
desc->length = data_bytes;
|
||||||
|
|
||||||
if (write)
|
if (write)
|
||||||
|
@ -291,7 +291,7 @@ static int xfer(enum qspi_mode mode, const void *dout, size_t out_bytes,
|
||||||
return -1;
|
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);
|
in_bytes | out_bytes, mode, !!out_bytes);
|
||||||
|
|
||||||
flush_chain();
|
flush_chain();
|
||||||
|
|
|
@ -188,7 +188,7 @@ void gpi_firmware_load(int addr)
|
||||||
struct gsi_fw_hdr *gsi_hdr;
|
struct gsi_fw_hdr *gsi_hdr;
|
||||||
struct gsi_fw_iep *fwIep;
|
struct gsi_fw_iep *fwIep;
|
||||||
struct gsi_fw_iram *fwIRam;
|
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";
|
static const char * const filename = "fallback/gsi_fw";
|
||||||
|
|
||||||
/* Assign firmware header base */
|
/* Assign firmware header base */
|
||||||
|
@ -241,7 +241,7 @@ static void qup_common_init(int addr)
|
||||||
{
|
{
|
||||||
struct qupv3_common_reg *qupv3_common;
|
struct qupv3_common_reg *qupv3_common;
|
||||||
/* HPG section 3.1.2 */
|
/* 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,
|
setbits32(&qupv3_common->qupv3_common_cfg_reg,
|
||||||
QUPV3_COMMON_CFG_FAST_SWITCH_TO_HIGH_DISABLE_BMSK);
|
QUPV3_COMMON_CFG_FAST_SWITCH_TO_HIGH_DISABLE_BMSK);
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ void hs_usb_phy_init(void *board_data)
|
||||||
|
|
||||||
hs_phy_reg = &qusb_phy;
|
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 */
|
/* PWR_CTRL: set the power down bit to disable the PHY */
|
||||||
|
|
||||||
|
|
|
@ -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)
|
void hs_usb_phy_init(void *board_data)
|
||||||
{
|
{
|
||||||
struct usb_board_data *override_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,
|
clrsetbits32(&hs_phy_reg->cfg0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN,
|
||||||
UTMI_PHY_CMN_CTRL_OVERRIDE_EN);
|
UTMI_PHY_CMN_CTRL_OVERRIDE_EN);
|
||||||
|
|
|
@ -31,7 +31,7 @@ static void *load_ipq_blob(const char *file_name)
|
||||||
(blob_mbn->mbn_total_size > blob_size))
|
(blob_mbn->mbn_total_size > blob_size))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
blob_dest = (void *) blob_mbn->mbn_destination;
|
blob_dest = (void *)blob_mbn->mbn_destination;
|
||||||
|
|
||||||
if (blob_mbn->mbn_destination) {
|
if (blob_mbn->mbn_destination) {
|
||||||
/* Copy the blob to the appropriate memory location. */
|
/* Copy the blob to the appropriate memory location. */
|
||||||
|
|
|
@ -591,7 +591,7 @@ static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout,
|
||||||
write_force_cs(slave, 1);
|
write_force_cs(slave, 1);
|
||||||
|
|
||||||
if (dout != NULL) {
|
if (dout != NULL) {
|
||||||
ret = blsp_spi_write(ds, txp, (unsigned int) out_bytes);
|
ret = blsp_spi_write(ds, txp, (unsigned int)out_bytes);
|
||||||
if (ret != SUCCESS)
|
if (ret != SUCCESS)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ static void *load_ipq_blob(const char *file_name)
|
||||||
(blob_mbn->mbn_total_size > blob_size))
|
(blob_mbn->mbn_total_size > blob_size))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
blob_dest = (void *) blob_mbn->mbn_destination;
|
blob_dest = (void *)blob_mbn->mbn_destination;
|
||||||
if (blob_mbn->mbn_destination) {
|
if (blob_mbn->mbn_destination) {
|
||||||
/* Copy the blob to the appropriate memory location. */
|
/* Copy the blob to the appropriate memory location. */
|
||||||
memcpy(blob_dest, blob_mbn + 1, blob_mbn->mbn_total_size);
|
memcpy(blob_dest, blob_mbn + 1, blob_mbn->mbn_total_size);
|
||||||
|
@ -99,7 +99,7 @@ void start_rpm(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
load_addr = (u32) load_ipq_blob("rpm.mbn");
|
load_addr = (u32)load_ipq_blob("rpm.mbn");
|
||||||
if (!load_addr)
|
if (!load_addr)
|
||||||
die("could not find or map RPM code\n");
|
die("could not find or map RPM code\n");
|
||||||
|
|
||||||
|
|
|
@ -660,7 +660,7 @@ static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (dout != NULL) {
|
if (dout != NULL) {
|
||||||
ret = blsp_spi_write(ds, txp, (unsigned int) out_bytes);
|
ret = blsp_spi_write(ds, txp, (unsigned int)out_bytes);
|
||||||
if (ret != SUCCESS)
|
if (ret != SUCCESS)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,13 +140,13 @@ static const struct qcom_qmp_phy_init_tbl sc7280_qmp_gen3x2_pcie_misc_tbl[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static pcie_cntlr_cfg_t pcie_host = {
|
static pcie_cntlr_cfg_t pcie_host = {
|
||||||
.parf = (void *) PCIE1_PCIE_PARF,
|
.parf = (void *)PCIE1_PCIE_PARF,
|
||||||
.dbi_base = (void *) PCIE1_GEN3X2_PCIE_DBI,
|
.dbi_base = (void *)PCIE1_GEN3X2_PCIE_DBI,
|
||||||
.elbi = (void *) PCIE1_GEN3X2_PCIE_ELBI,
|
.elbi = (void *)PCIE1_GEN3X2_PCIE_ELBI,
|
||||||
.atu_base = (void *) PCIE1_GEN3X2_DWC_PCIE_DM_IATU,
|
.atu_base = (void *)PCIE1_GEN3X2_DWC_PCIE_DM_IATU,
|
||||||
.cfg_base = (void *) PCIE1_GEN3X2_PCIE_DBI + PCIE_EP_CONF_OFFSET,
|
.cfg_base = (void *)PCIE1_GEN3X2_PCIE_DBI + PCIE_EP_CONF_OFFSET,
|
||||||
.pcie_bcr = (void *) PCIE1_BCR,
|
.pcie_bcr = (void *)PCIE1_BCR,
|
||||||
.qmp_phy_bcr = (void *) GCC_PCIE_1_PHY_BCR,
|
.qmp_phy_bcr = (void *)GCC_PCIE_1_PHY_BCR,
|
||||||
.lanes = PCIE_3x2_NUM_LANES,
|
.lanes = PCIE_3x2_NUM_LANES,
|
||||||
.cfg_size = PCIE_EP_CONF_SIZE,
|
.cfg_size = PCIE_EP_CONF_SIZE,
|
||||||
.perst = GPIO(2),
|
.perst = GPIO(2),
|
||||||
|
@ -160,14 +160,14 @@ static pcie_cntlr_cfg_t pcie_host = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static pcie_qmp_phy_cfg_t pcie1_qmp_phy_3x2 = {
|
static pcie_qmp_phy_cfg_t pcie1_qmp_phy_3x2 = {
|
||||||
.qmp_phy_base = (void *) PCIE_1_QMP_PHY,
|
.qmp_phy_base = (void *)PCIE_1_QMP_PHY,
|
||||||
.serdes = (void *) PCE1_QPHY_SERDES,
|
.serdes = (void *)PCE1_QPHY_SERDES,
|
||||||
.tx0 = (void *) PCE1_QPHY_TX0,
|
.tx0 = (void *)PCE1_QPHY_TX0,
|
||||||
.rx0 = (void *) PCE1_QPHY_RX0,
|
.rx0 = (void *)PCE1_QPHY_RX0,
|
||||||
.pcs = (void *) PCIE1_QMP_PHY_PCS_COM,
|
.pcs = (void *)PCIE1_QMP_PHY_PCS_COM,
|
||||||
.tx1 = (void *) PCE1_QPHY_TX1,
|
.tx1 = (void *)PCE1_QPHY_TX1,
|
||||||
.rx1 = (void *) PCE1_QPHY_RX1,
|
.rx1 = (void *)PCE1_QPHY_RX1,
|
||||||
.pcs_misc = (void *) PCE1_QPHY_PCS_MISC,
|
.pcs_misc = (void *)PCE1_QPHY_PCS_MISC,
|
||||||
.serdes_tbl = sc7280_qmp_pcie_serdes_tbl,
|
.serdes_tbl = sc7280_qmp_pcie_serdes_tbl,
|
||||||
.serdes_tbl_num = ARRAY_SIZE(sc7280_qmp_pcie_serdes_tbl),
|
.serdes_tbl_num = ARRAY_SIZE(sc7280_qmp_pcie_serdes_tbl),
|
||||||
.tx_tbl = sc7280_qmp_pcie_tx_tbl,
|
.tx_tbl = sc7280_qmp_pcie_tx_tbl,
|
||||||
|
|
Loading…
Reference in New Issue