The dualport configuration is read from the handoff table and used for configuration, but num_port is never read or used.
Remove the unused field. Signed-off-by: Michael Tretter <[email protected]> --- arch/arm/mach-socfpga/agilex5-sdram.c | 5 ----- arch/arm/mach-socfpga/iossm_mailbox.c | 5 ++--- arch/arm/mach-socfpga/iossm_mailbox.h | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-socfpga/agilex5-sdram.c b/arch/arm/mach-socfpga/agilex5-sdram.c index fa940958d104..4a28713a3588 100644 --- a/arch/arm/mach-socfpga/agilex5-sdram.c +++ b/arch/arm/mach-socfpga/agilex5-sdram.c @@ -98,11 +98,6 @@ static int populate_ddr_handoff(struct altera_sdram_plat *plat, struct io96b_inf plat->dualport = FIELD_GET(BIT(0), handoff_table[PORT_EMIF_CONFIG_OFFSET]); pr_debug("%s: dualport from handoff: 0x%x\n", __func__, plat->dualport); - if (plat->dualport) - io96b_ctrl->num_port = 2; - else - io96b_ctrl->num_port = 1; - /* Read handoff - dual EMIF */ plat->dualemif = FIELD_GET(BIT(1), handoff_table[PORT_EMIF_CONFIG_OFFSET]); pr_debug("%s: dualemif from handoff: 0x%x\n", __func__, plat->dualemif); diff --git a/arch/arm/mach-socfpga/iossm_mailbox.c b/arch/arm/mach-socfpga/iossm_mailbox.c index 6a9a7a489b75..b79ec87b4f46 100644 --- a/arch/arm/mach-socfpga/iossm_mailbox.c +++ b/arch/arm/mach-socfpga/iossm_mailbox.c @@ -49,7 +49,7 @@ static const char *ddr_type_list[7] = { "DDR4", "DDR5", "DDR5_RDIMM", "LPDDR4", "LPDDR5", "QDRIV", "UNKNOWN" }; -static int is_ddr_csr_clkgen_locked(u32 clkgen_mask, u8 num_port) +static int is_ddr_csr_clkgen_locked(u32 clkgen_mask) { int ret; u32 tmp; @@ -289,8 +289,7 @@ void io96b_init_mem_cal(struct io96b_info *io96b_ctrl) count = 0; for (i = 0; i < io96b_ctrl->num_instance; i++) { if (io96b_ctrl->ckgen_lock) { - ret = is_ddr_csr_clkgen_locked(DDR_CSR_CLKGEN_LOCKED_IO96B_MASK(i), - io96b_ctrl->num_port); + ret = is_ddr_csr_clkgen_locked(DDR_CSR_CLKGEN_LOCKED_IO96B_MASK(i)); if (ret) { pr_err("%s: ckgena_lock iossm IO96B_%d is not locked\n", __func__, i); diff --git a/arch/arm/mach-socfpga/iossm_mailbox.h b/arch/arm/mach-socfpga/iossm_mailbox.h index 0e942a632847..954bfcdf382e 100644 --- a/arch/arm/mach-socfpga/iossm_mailbox.h +++ b/arch/arm/mach-socfpga/iossm_mailbox.h @@ -119,7 +119,6 @@ struct io96b_instance { * @overall_size: Total DDR memory size * @io96b[]: IO96B instance specific information * @ckgen_lock: IO96B GEN PLL lock (false = not locked, true = locked) - * @num_port: Number of IO96B port. */ struct io96b_info { int version; @@ -131,7 +130,6 @@ struct io96b_info { phys_size_t overall_size; struct io96b_instance io96b[MAX_IO96B_SUPPORTED]; bool ckgen_lock; - u8 num_port; }; int io96b_mb_req(void __iomem *io96b_csr_addr, u32 ip_type, u32 instance_id, -- 2.47.3
