From nobody Wed Dec 17 08:51:19 2025 Received: from msa.smtpout.orange.fr (smtp-65.smtpout.orange.fr [80.12.242.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5EA016DEB2 for ; Thu, 11 Jul 2024 17:31:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720719095; cv=none; b=Q7yP6UxWRApZsdwkx1LBx79xsG9YORiojx6Hu3lSYJR1iwr8rnr44ttwSGCWOQyim1V7KTJtYjzhVSZW3j91WV6wrJTSkHD/sKcAHmC5TM75xfDA5MXcBmqVndYMzbu2oea0FsfiKgEmCH9XvY+oBkidm1ge6yf1sLRLQj//w8M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720719095; c=relaxed/simple; bh=zzjuHCVV6olOCADlYvUsznIwGJclkDpBQVvqzzvD6Xs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m+T4AyCphrp616o7E4IMsaivz+nODYax7Pr0aWI1mmu/nd3Jpl1wquoTMKFAL0Rk2WZHZ93X+CDHCYmt7cGd5lAcBBxSYKs0RsBJ1WazsvDDCBuTHNq7esbRJ1GN5bTQWbdfvxk5HtwkLycnrBNVxXHP68VMiyjoiVCvbgj0ozw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=WFyzItvl; arc=none smtp.client-ip=80.12.242.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="WFyzItvl" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id RxdPsAr1uHTrpRxddsVLjD; Thu, 11 Jul 2024 19:31:25 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1720719085; bh=2HetOYmpzK1sGlzN2mO3qHKDtInquWxN0l2bx7SFEt8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=WFyzItvlGuxdJnGLk8vjtmYenDHl51saVFeWZnxBolEx6f4Imh+8AlWl4uTGjv+8g g1CpWsrwVGVypYCkjjwoEXTjewsvcdffv6rnWtNshKUa9Gl+u57VHTfP66aymaLLVm 5ZP1DCe+c+MRpcIDcObYpuw6qg+FKDVf+vVEedoolxlJIL6Ycr+XjZG6ZJWZdzIjAd C3CLAFknIIYFBswl7ItAWuXCIb/2SX1Qn20VIWrkEuIaDR5LeU0PUJsvLU4+zR8cIg jV2s+YRTdebUubu+/3fJSEixyUK5cArLlVnKRv+HNd0SNaZrJ/lcOikzrzbUOE8fld QWZBv3EKiNdDA== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 11 Jul 2024 19:31:25 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: vkoul@kernel.org, kishon@kernel.org Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 1/4] phy: cadence-torrent: Constify struct cdns_reg_pairs Date: Thu, 11 Jul 2024 19:31:06 +0200 Message-ID: <803684a6f0c24d7e091dc8d285dd49c6fd31a010.1720718240.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 'struct cdns_reg_pairs' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: =3D=3D=3D=3D=3D=3D text data bss dec hex filename 78154 20222 16 98392 18058 drivers/phy/cadence/phy-cadence-tor= rent.o After: =3D=3D=3D=3D=3D text data bss dec hex filename 85130 13214 16 98360 18038 drivers/phy/cadence/phy-cadence-tor= rent.o Signed-off-by: Christophe JAILLET --- Compile tested-only. --- drivers/phy/cadence/phy-cadence-torrent.c | 168 +++++++++++----------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadenc= e/phy-cadence-torrent.c index 56ce82a47f88..6551dcf99639 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -422,7 +422,7 @@ struct cdns_reg_pairs { }; =20 struct cdns_torrent_vals { - struct cdns_reg_pairs *reg_pairs; + const struct cdns_reg_pairs *reg_pairs; u32 num_regs; }; =20 @@ -2315,7 +2315,7 @@ static int cdns_torrent_phy_init(struct phy *phy) enum cdns_torrent_ssc_mode ssc =3D inst->ssc_mode; struct cdns_torrent_vals *phy_pma_cmn_vals; struct cdns_torrent_vals *pcs_cmn_vals; - struct cdns_reg_pairs *reg_pairs; + const struct cdns_reg_pairs *reg_pairs; struct regmap *regmap; u32 num_regs; int i, j; @@ -2471,8 +2471,8 @@ int cdns_torrent_phy_configure_multilink(struct cdns_= torrent_phy *cdns_phy) enum cdns_torrent_phy_type phy_t1, phy_t2; struct cdns_torrent_vals *phy_pma_cmn_vals; struct cdns_torrent_vals *pcs_cmn_vals; + const struct cdns_reg_pairs *reg_pairs; int i, j, node, mlane, num_lanes, ret; - struct cdns_reg_pairs *reg_pairs; enum cdns_torrent_ssc_mode ssc; struct regmap *regmap; u32 num_regs; @@ -3079,11 +3079,11 @@ static void cdns_torrent_phy_remove(struct platform= _device *pdev) } =20 /* SGMII and QSGMII link configuration */ -static struct cdns_reg_pairs sgmii_qsgmii_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs sgmii_qsgmii_link_cmn_regs[] =3D { {0x0002, PHY_PLL_CFG} }; =20 -static struct cdns_reg_pairs sgmii_qsgmii_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs sgmii_qsgmii_xcvr_diag_ln_regs[] =3D { {0x0003, XCVR_DIAG_HSCLK_DIV}, {0x0113, XCVR_DIAG_PLLDRC_CTRL} }; @@ -3155,18 +3155,18 @@ static DEFINE_NOIRQ_DEV_PM_OPS(cdns_torrent_phy_pm_= ops, cdns_torrent_phy_resume_noirq); =20 /* USB and DP link configuration */ -static struct cdns_reg_pairs usb_dp_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs usb_dp_link_cmn_regs[] =3D { {0x0002, PHY_PLL_CFG}, {0x8600, CMN_PDIAG_PLL0_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs usb_dp_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs usb_dp_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0041, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_reg_pairs dp_usb_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs dp_usb_xcvr_diag_ln_regs[] =3D { {0x0001, XCVR_DIAG_HSCLK_SEL}, {0x0009, XCVR_DIAG_PLLDRC_CTRL} }; @@ -3187,19 +3187,19 @@ static struct cdns_torrent_vals dp_usb_xcvr_diag_ln= _vals =3D { }; =20 /* USXGMII and SGMII/QSGMII link configuration */ -static struct cdns_reg_pairs usxgmii_sgmii_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs usxgmii_sgmii_link_cmn_regs[] =3D { {0x0002, PHY_PLL_CFG}, {0x0400, CMN_PDIAG_PLL0_CLK_SEL_M0}, {0x0601, CMN_PDIAG_PLL1_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs usxgmii_sgmii_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs usxgmii_sgmii_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0001, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_reg_pairs sgmii_usxgmii_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs sgmii_usxgmii_xcvr_diag_ln_regs[] =3D { {0x0111, XCVR_DIAG_HSCLK_SEL}, {0x0103, XCVR_DIAG_HSCLK_DIV}, {0x0A9B, XCVR_DIAG_PLLDRC_CTRL} @@ -3221,7 +3221,7 @@ static struct cdns_torrent_vals sgmii_usxgmii_xcvr_di= ag_ln_vals =3D { }; =20 /* Multilink USXGMII, using PLL0, 156.25 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs ml_usxgmii_pll0_156_25_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs ml_usxgmii_pll0_156_25_no_ssc_cmn_regs[= ] =3D { {0x0014, CMN_PLL0_DSM_FBH_OVRD_M0}, {0x0005, CMN_PLL0_DSM_FBL_OVRD_M0}, {0x061B, CMN_PLL0_VCOCAL_INIT_TMR}, @@ -3239,7 +3239,7 @@ static struct cdns_torrent_vals ml_usxgmii_pll0_156_2= 5_no_ssc_cmn_vals =3D { }; =20 /* Multilink SGMII/QSGMII, using PLL1, 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs ml_sgmii_pll1_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs ml_sgmii_pll1_100_no_ssc_cmn_regs[] =3D= { {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0}, @@ -3254,7 +3254,7 @@ static struct cdns_torrent_vals ml_sgmii_pll1_100_no_= ssc_cmn_vals =3D { }; =20 /* TI J7200, Multilink USXGMII, using PLL0, 156.25 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs j7200_ml_usxgmii_pll0_156_25_no_ssc_cmn_regs[= ] =3D { +static const struct cdns_reg_pairs j7200_ml_usxgmii_pll0_156_25_no_ssc_cmn= _regs[] =3D { {0x0014, CMN_SSM_BIAS_TMR}, {0x0028, CMN_PLLSM0_PLLPRE_TMR}, {0x00A4, CMN_PLLSM0_PLLLOCK_TMR}, @@ -3286,7 +3286,7 @@ static struct cdns_torrent_vals j7200_ml_usxgmii_pll0= _156_25_no_ssc_cmn_vals =3D { }; =20 /* TI J7200, Multilink SGMII/QSGMII, using PLL1, 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs j7200_ml_sgmii_pll1_100_no_ssc_cmn_regs[] =3D= { +static const struct cdns_reg_pairs j7200_ml_sgmii_pll1_100_no_ssc_cmn_regs= [] =3D { {0x0028, CMN_PLLSM1_PLLPRE_TMR}, {0x00A4, CMN_PLLSM1_PLLLOCK_TMR}, {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, @@ -3303,20 +3303,20 @@ static struct cdns_torrent_vals j7200_ml_sgmii_pll1= _100_no_ssc_cmn_vals =3D { }; =20 /* PCIe and USXGMII link configuration */ -static struct cdns_reg_pairs pcie_usxgmii_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs pcie_usxgmii_link_cmn_regs[] =3D { {0x0003, PHY_PLL_CFG}, {0x0601, CMN_PDIAG_PLL0_CLK_SEL_M0}, {0x0400, CMN_PDIAG_PLL0_CLK_SEL_M1}, {0x0400, CMN_PDIAG_PLL1_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs pcie_usxgmii_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs pcie_usxgmii_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0012, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_reg_pairs usxgmii_pcie_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs usxgmii_pcie_xcvr_diag_ln_regs[] =3D { {0x0011, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0089, XCVR_DIAG_PLLDRC_CTRL} @@ -3340,7 +3340,7 @@ static struct cdns_torrent_vals usxgmii_pcie_xcvr_dia= g_ln_vals =3D { /* * Multilink USXGMII, using PLL1, 156.25 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs ml_usxgmii_pll1_156_25_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs ml_usxgmii_pll1_156_25_no_ssc_cmn_regs[= ] =3D { {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, {0x0014, CMN_PLL1_DSM_FBH_OVRD_M0}, {0x0005, CMN_PLL1_DSM_FBL_OVRD_M0}, @@ -3355,7 +3355,7 @@ static struct cdns_reg_pairs ml_usxgmii_pll1_156_25_n= o_ssc_cmn_regs[] =3D { {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_reg_pairs ml_usxgmii_156_25_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs ml_usxgmii_156_25_no_ssc_tx_ln_regs[] = =3D { {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, {0x04A2, TX_PSC_A3 }, @@ -3363,7 +3363,7 @@ static struct cdns_reg_pairs ml_usxgmii_156_25_no_ssc= _tx_ln_regs[] =3D { {0x0000, XCVR_DIAG_PSC_OVRD} }; =20 -static struct cdns_reg_pairs ml_usxgmii_156_25_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs ml_usxgmii_156_25_no_ssc_rx_ln_regs[] = =3D { {0x091D, RX_PSC_A0}, {0x0900, RX_PSC_A2}, {0x0100, RX_PSC_A3}, @@ -3397,7 +3397,7 @@ static struct cdns_torrent_vals ml_usxgmii_156_25_no_= ssc_rx_ln_vals =3D { }; =20 /* TI USXGMII configuration: Enable cmn_refclk_rcv_out_en */ -static struct cdns_reg_pairs ti_usxgmii_phy_pma_cmn_regs[] =3D { +static const struct cdns_reg_pairs ti_usxgmii_phy_pma_cmn_regs[] =3D { {0x0040, PHY_PMA_CMN_CTRL1}, }; =20 @@ -3407,12 +3407,12 @@ static struct cdns_torrent_vals ti_usxgmii_phy_pma_= cmn_vals =3D { }; =20 /* Single USXGMII link configuration */ -static struct cdns_reg_pairs sl_usxgmii_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_usxgmii_link_cmn_regs[] =3D { {0x0000, PHY_PLL_CFG}, {0x0400, CMN_PDIAG_PLL0_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs sl_usxgmii_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_usxgmii_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0001, XCVR_DIAG_PLLDRC_CTRL} @@ -3429,7 +3429,7 @@ static struct cdns_torrent_vals sl_usxgmii_xcvr_diag_= ln_vals =3D { }; =20 /* Single link USXGMII, 156.25 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs sl_usxgmii_156_25_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_usxgmii_156_25_no_ssc_cmn_regs[] =3D= { {0x0014, CMN_SSM_BIAS_TMR}, {0x0028, CMN_PLLSM0_PLLPRE_TMR}, {0x00A4, CMN_PLLSM0_PLLLOCK_TMR}, @@ -3467,7 +3467,7 @@ static struct cdns_reg_pairs sl_usxgmii_156_25_no_ssc= _cmn_regs[] =3D { {0x0138, CMN_PLL1_LOCK_PLLCNT_START} }; =20 -static struct cdns_reg_pairs usxgmii_156_25_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs usxgmii_156_25_no_ssc_tx_ln_regs[] =3D { {0x07A2, TX_RCVDET_ST_TMR}, {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, @@ -3476,7 +3476,7 @@ static struct cdns_reg_pairs usxgmii_156_25_no_ssc_tx= _ln_regs[] =3D { {0x0000, XCVR_DIAG_PSC_OVRD} }; =20 -static struct cdns_reg_pairs usxgmii_156_25_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs usxgmii_156_25_no_ssc_rx_ln_regs[] =3D { {0x0014, RX_SDCAL0_INIT_TMR}, {0x0062, RX_SDCAL0_ITER_TMR}, {0x0014, RX_SDCAL1_INIT_TMR}, @@ -3514,19 +3514,19 @@ static struct cdns_torrent_vals usxgmii_156_25_no_s= sc_rx_ln_vals =3D { }; =20 /* PCIe and DP link configuration */ -static struct cdns_reg_pairs pcie_dp_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs pcie_dp_link_cmn_regs[] =3D { {0x0003, PHY_PLL_CFG}, {0x0601, CMN_PDIAG_PLL0_CLK_SEL_M0}, {0x0400, CMN_PDIAG_PLL0_CLK_SEL_M1} }; =20 -static struct cdns_reg_pairs pcie_dp_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs pcie_dp_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0012, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_reg_pairs dp_pcie_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs dp_pcie_xcvr_diag_ln_regs[] =3D { {0x0001, XCVR_DIAG_HSCLK_SEL}, {0x0009, XCVR_DIAG_PLLDRC_CTRL} }; @@ -3547,19 +3547,19 @@ static struct cdns_torrent_vals dp_pcie_xcvr_diag_l= n_vals =3D { }; =20 /* DP Multilink, 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs dp_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs dp_100_no_ssc_cmn_regs[] =3D { {0x007F, CMN_TXPUCAL_TUNE}, {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_reg_pairs dp_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs dp_100_no_ssc_tx_ln_regs[] =3D { {0x00FB, TX_PSC_A0}, {0x04AA, TX_PSC_A2}, {0x04AA, TX_PSC_A3}, {0x000F, XCVR_DIAG_BIDI_CTRL} }; =20 -static struct cdns_reg_pairs dp_100_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs dp_100_no_ssc_rx_ln_regs[] =3D { {0x0000, RX_PSC_A0}, {0x0000, RX_PSC_A2}, {0x0000, RX_PSC_A3}, @@ -3585,11 +3585,11 @@ static struct cdns_torrent_vals dp_100_no_ssc_rx_ln= _vals =3D { }; =20 /* Single DisplayPort(DP) link configuration */ -static struct cdns_reg_pairs sl_dp_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_link_cmn_regs[] =3D { {0x0000, PHY_PLL_CFG}, }; =20 -static struct cdns_reg_pairs sl_dp_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_PLLDRC_CTRL} }; @@ -3605,7 +3605,7 @@ static struct cdns_torrent_vals sl_dp_xcvr_diag_ln_va= ls =3D { }; =20 /* Single DP, 19.2 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs sl_dp_19_2_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_19_2_no_ssc_cmn_regs[] =3D { {0x0014, CMN_SSM_BIAS_TMR}, {0x0027, CMN_PLLSM0_PLLPRE_TMR}, {0x00A1, CMN_PLLSM0_PLLLOCK_TMR}, @@ -3642,7 +3642,7 @@ static struct cdns_reg_pairs sl_dp_19_2_no_ssc_cmn_re= gs[] =3D { {0x0003, CMN_PLL1_VCOCAL_TCTRL} }; =20 -static struct cdns_reg_pairs sl_dp_19_2_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_19_2_no_ssc_tx_ln_regs[] =3D { {0x0780, TX_RCVDET_ST_TMR}, {0x00FB, TX_PSC_A0}, {0x04AA, TX_PSC_A2}, @@ -3650,7 +3650,7 @@ static struct cdns_reg_pairs sl_dp_19_2_no_ssc_tx_ln_= regs[] =3D { {0x000F, XCVR_DIAG_BIDI_CTRL} }; =20 -static struct cdns_reg_pairs sl_dp_19_2_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_19_2_no_ssc_rx_ln_regs[] =3D { {0x0000, RX_PSC_A0}, {0x0000, RX_PSC_A2}, {0x0000, RX_PSC_A3}, @@ -3676,7 +3676,7 @@ static struct cdns_torrent_vals sl_dp_19_2_no_ssc_rx_= ln_vals =3D { }; =20 /* Single DP, 25 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs sl_dp_25_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_25_no_ssc_cmn_regs[] =3D { {0x0019, CMN_SSM_BIAS_TMR}, {0x0032, CMN_PLLSM0_PLLPRE_TMR}, {0x00D1, CMN_PLLSM0_PLLLOCK_TMR}, @@ -3713,7 +3713,7 @@ static struct cdns_reg_pairs sl_dp_25_no_ssc_cmn_regs= [] =3D { {0x0003, CMN_PLL1_VCOCAL_TCTRL} }; =20 -static struct cdns_reg_pairs sl_dp_25_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_25_no_ssc_tx_ln_regs[] =3D { {0x09C4, TX_RCVDET_ST_TMR}, {0x00FB, TX_PSC_A0}, {0x04AA, TX_PSC_A2}, @@ -3721,7 +3721,7 @@ static struct cdns_reg_pairs sl_dp_25_no_ssc_tx_ln_re= gs[] =3D { {0x000F, XCVR_DIAG_BIDI_CTRL} }; =20 -static struct cdns_reg_pairs sl_dp_25_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_25_no_ssc_rx_ln_regs[] =3D { {0x0000, RX_PSC_A0}, {0x0000, RX_PSC_A2}, {0x0000, RX_PSC_A3}, @@ -3747,19 +3747,19 @@ static struct cdns_torrent_vals sl_dp_25_no_ssc_rx_= ln_vals =3D { }; =20 /* Single DP, 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs sl_dp_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_100_no_ssc_cmn_regs[] =3D { {0x0003, CMN_PLL0_VCOCAL_TCTRL}, {0x0003, CMN_PLL1_VCOCAL_TCTRL} }; =20 -static struct cdns_reg_pairs sl_dp_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_100_no_ssc_tx_ln_regs[] =3D { {0x00FB, TX_PSC_A0}, {0x04AA, TX_PSC_A2}, {0x04AA, TX_PSC_A3}, {0x000F, XCVR_DIAG_BIDI_CTRL} }; =20 -static struct cdns_reg_pairs sl_dp_100_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_dp_100_no_ssc_rx_ln_regs[] =3D { {0x0000, RX_PSC_A0}, {0x0000, RX_PSC_A2}, {0x0000, RX_PSC_A3}, @@ -3785,19 +3785,19 @@ static struct cdns_torrent_vals sl_dp_100_no_ssc_rx= _ln_vals =3D { }; =20 /* USB and SGMII/QSGMII link configuration */ -static struct cdns_reg_pairs usb_sgmii_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs usb_sgmii_link_cmn_regs[] =3D { {0x0002, PHY_PLL_CFG}, {0x8600, CMN_PDIAG_PLL0_CLK_SEL_M0}, {0x0601, CMN_PDIAG_PLL1_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs usb_sgmii_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs usb_sgmii_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0041, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_reg_pairs sgmii_usb_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs sgmii_usb_xcvr_diag_ln_regs[] =3D { {0x0011, XCVR_DIAG_HSCLK_SEL}, {0x0003, XCVR_DIAG_HSCLK_DIV}, {0x009B, XCVR_DIAG_PLLDRC_CTRL} @@ -3819,20 +3819,20 @@ static struct cdns_torrent_vals sgmii_usb_xcvr_diag= _ln_vals =3D { }; =20 /* PCIe and USB Unique SSC link configuration */ -static struct cdns_reg_pairs pcie_usb_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs pcie_usb_link_cmn_regs[] =3D { {0x0003, PHY_PLL_CFG}, {0x0601, CMN_PDIAG_PLL0_CLK_SEL_M0}, {0x0400, CMN_PDIAG_PLL0_CLK_SEL_M1}, {0x8600, CMN_PDIAG_PLL1_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs pcie_usb_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs pcie_usb_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0012, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_reg_pairs usb_pcie_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs usb_pcie_xcvr_diag_ln_regs[] =3D { {0x0011, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x00C9, XCVR_DIAG_PLLDRC_CTRL} @@ -3854,7 +3854,7 @@ static struct cdns_torrent_vals usb_pcie_xcvr_diag_ln= _vals =3D { }; =20 /* USB 100 MHz Ref clk, internal SSC */ -static struct cdns_reg_pairs usb_100_int_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs usb_100_int_ssc_cmn_regs[] =3D { {0x0004, CMN_PLL0_DSM_DIAG_M0}, {0x0004, CMN_PLL0_DSM_DIAG_M1}, {0x0004, CMN_PLL1_DSM_DIAG_M0}, @@ -3913,12 +3913,12 @@ static struct cdns_torrent_vals usb_100_int_ssc_cmn= _vals =3D { }; =20 /* Single USB link configuration */ -static struct cdns_reg_pairs sl_usb_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_usb_link_cmn_regs[] =3D { {0x0000, PHY_PLL_CFG}, {0x8600, CMN_PDIAG_PLL0_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs sl_usb_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_usb_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0041, XCVR_DIAG_PLLDRC_CTRL} @@ -3935,7 +3935,7 @@ static struct cdns_torrent_vals sl_usb_xcvr_diag_ln_v= als =3D { }; =20 /* USB PHY PCS common configuration */ -static struct cdns_reg_pairs usb_phy_pcs_cmn_regs[] =3D { +static const struct cdns_reg_pairs usb_phy_pcs_cmn_regs[] =3D { {0x0A0A, PHY_PIPE_USB3_GEN2_PRE_CFG0}, {0x1000, PHY_PIPE_USB3_GEN2_POST_CFG0}, {0x0010, PHY_PIPE_USB3_GEN2_POST_CFG1} @@ -3947,7 +3947,7 @@ static struct cdns_torrent_vals usb_phy_pcs_cmn_vals = =3D { }; =20 /* USB 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs sl_usb_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_usb_100_no_ssc_cmn_regs[] =3D { {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0}, @@ -3962,14 +3962,14 @@ static struct cdns_torrent_vals sl_usb_100_no_ssc_c= mn_vals =3D { .num_regs =3D ARRAY_SIZE(sl_usb_100_no_ssc_cmn_regs), }; =20 -static struct cdns_reg_pairs usb_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs usb_100_no_ssc_cmn_regs[] =3D { {0x8200, CMN_CDIAG_CDB_PWRI_OVRD}, {0x8200, CMN_CDIAG_XCVRC_PWRI_OVRD}, {0x007F, CMN_TXPUCAL_TUNE}, {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_reg_pairs usb_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs usb_100_no_ssc_tx_ln_regs[] =3D { {0x02FF, TX_PSC_A0}, {0x06AF, TX_PSC_A1}, {0x06AE, TX_PSC_A2}, @@ -3979,7 +3979,7 @@ static struct cdns_reg_pairs usb_100_no_ssc_tx_ln_reg= s[] =3D { {0x0003, XCVR_DIAG_PSC_OVRD} }; =20 -static struct cdns_reg_pairs usb_100_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs usb_100_no_ssc_rx_ln_regs[] =3D { {0x0D1D, RX_PSC_A0}, {0x0D1D, RX_PSC_A1}, {0x0D00, RX_PSC_A2}, @@ -4018,7 +4018,7 @@ static struct cdns_torrent_vals usb_100_no_ssc_rx_ln_= vals =3D { }; =20 /* Single link USB, 100 MHz Ref clk, internal SSC */ -static struct cdns_reg_pairs sl_usb_100_int_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_usb_100_int_ssc_cmn_regs[] =3D { {0x0004, CMN_PLL0_DSM_DIAG_M0}, {0x0004, CMN_PLL1_DSM_DIAG_M0}, {0x0509, CMN_PDIAG_PLL0_CP_PADJ_M0}, @@ -4065,20 +4065,20 @@ static struct cdns_torrent_vals sl_usb_100_int_ssc_= cmn_vals =3D { }; =20 /* PCIe and SGMII/QSGMII Unique SSC link configuration */ -static struct cdns_reg_pairs pcie_sgmii_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs pcie_sgmii_link_cmn_regs[] =3D { {0x0003, PHY_PLL_CFG}, {0x0601, CMN_PDIAG_PLL0_CLK_SEL_M0}, {0x0400, CMN_PDIAG_PLL0_CLK_SEL_M1}, {0x0601, CMN_PDIAG_PLL1_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs pcie_sgmii_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs pcie_sgmii_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0001, XCVR_DIAG_HSCLK_DIV}, {0x0012, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_reg_pairs sgmii_pcie_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs sgmii_pcie_xcvr_diag_ln_regs[] =3D { {0x0011, XCVR_DIAG_HSCLK_SEL}, {0x0003, XCVR_DIAG_HSCLK_DIV}, {0x009B, XCVR_DIAG_PLLDRC_CTRL} @@ -4100,7 +4100,7 @@ static struct cdns_torrent_vals sgmii_pcie_xcvr_diag_= ln_vals =3D { }; =20 /* SGMII 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs sl_sgmii_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_sgmii_100_no_ssc_cmn_regs[] =3D { {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0}, @@ -4113,12 +4113,12 @@ static struct cdns_torrent_vals sl_sgmii_100_no_ssc= _cmn_vals =3D { .num_regs =3D ARRAY_SIZE(sl_sgmii_100_no_ssc_cmn_regs), }; =20 -static struct cdns_reg_pairs sgmii_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sgmii_100_no_ssc_cmn_regs[] =3D { {0x007F, CMN_TXPUCAL_TUNE}, {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_reg_pairs sgmii_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs sgmii_100_no_ssc_tx_ln_regs[] =3D { {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, {0x04A2, TX_PSC_A3}, @@ -4127,7 +4127,7 @@ static struct cdns_reg_pairs sgmii_100_no_ssc_tx_ln_r= egs[] =3D { {0x0002, XCVR_DIAG_PSC_OVRD} }; =20 -static struct cdns_reg_pairs ti_sgmii_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs ti_sgmii_100_no_ssc_tx_ln_regs[] =3D { {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, {0x04A2, TX_PSC_A3}, @@ -4137,7 +4137,7 @@ static struct cdns_reg_pairs ti_sgmii_100_no_ssc_tx_l= n_regs[] =3D { {0x4000, XCVR_DIAG_RXCLK_CTRL} }; =20 -static struct cdns_reg_pairs sgmii_100_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs sgmii_100_no_ssc_rx_ln_regs[] =3D { {0x091D, RX_PSC_A0}, {0x0900, RX_PSC_A2}, {0x0100, RX_PSC_A3}, @@ -4176,7 +4176,7 @@ static struct cdns_torrent_vals sgmii_100_no_ssc_rx_l= n_vals =3D { }; =20 /* TI J7200, multilink SGMII */ -static struct cdns_reg_pairs j7200_sgmii_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs j7200_sgmii_100_no_ssc_tx_ln_regs[] =3D= { {0x07A2, TX_RCVDET_ST_TMR}, {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, @@ -4192,7 +4192,7 @@ static struct cdns_torrent_vals j7200_sgmii_100_no_ss= c_tx_ln_vals =3D { .num_regs =3D ARRAY_SIZE(j7200_sgmii_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_reg_pairs j7200_sgmii_100_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs j7200_sgmii_100_no_ssc_rx_ln_regs[] =3D= { {0x0014, RX_SDCAL0_INIT_TMR}, {0x0062, RX_SDCAL0_ITER_TMR}, {0x0014, RX_SDCAL1_INIT_TMR}, @@ -4220,7 +4220,7 @@ static struct cdns_torrent_vals j7200_sgmii_100_no_ss= c_rx_ln_vals =3D { }; =20 /* SGMII 100 MHz Ref clk, internal SSC */ -static struct cdns_reg_pairs sgmii_100_int_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sgmii_100_int_ssc_cmn_regs[] =3D { {0x0004, CMN_PLL0_DSM_DIAG_M0}, {0x0004, CMN_PLL0_DSM_DIAG_M1}, {0x0004, CMN_PLL1_DSM_DIAG_M0}, @@ -4277,7 +4277,7 @@ static struct cdns_torrent_vals sgmii_100_int_ssc_cmn= _vals =3D { }; =20 /* QSGMII 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs sl_qsgmii_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_qsgmii_100_no_ssc_cmn_regs[] =3D { {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0}, @@ -4290,12 +4290,12 @@ static struct cdns_torrent_vals sl_qsgmii_100_no_ss= c_cmn_vals =3D { .num_regs =3D ARRAY_SIZE(sl_qsgmii_100_no_ssc_cmn_regs), }; =20 -static struct cdns_reg_pairs qsgmii_100_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs qsgmii_100_no_ssc_cmn_regs[] =3D { {0x007F, CMN_TXPUCAL_TUNE}, {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_reg_pairs qsgmii_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs qsgmii_100_no_ssc_tx_ln_regs[] =3D { {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, {0x04A2, TX_PSC_A3}, @@ -4305,7 +4305,7 @@ static struct cdns_reg_pairs qsgmii_100_no_ssc_tx_ln_= regs[] =3D { {0x0002, XCVR_DIAG_PSC_OVRD} }; =20 -static struct cdns_reg_pairs ti_qsgmii_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs ti_qsgmii_100_no_ssc_tx_ln_regs[] =3D { {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, {0x04A2, TX_PSC_A3}, @@ -4316,7 +4316,7 @@ static struct cdns_reg_pairs ti_qsgmii_100_no_ssc_tx_= ln_regs[] =3D { {0x4000, XCVR_DIAG_RXCLK_CTRL} }; =20 -static struct cdns_reg_pairs qsgmii_100_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs qsgmii_100_no_ssc_rx_ln_regs[] =3D { {0x091D, RX_PSC_A0}, {0x0900, RX_PSC_A2}, {0x0100, RX_PSC_A3}, @@ -4355,7 +4355,7 @@ static struct cdns_torrent_vals qsgmii_100_no_ssc_rx_= ln_vals =3D { }; =20 /* TI J7200, multilink QSGMII */ -static struct cdns_reg_pairs j7200_qsgmii_100_no_ssc_tx_ln_regs[] =3D { +static const struct cdns_reg_pairs j7200_qsgmii_100_no_ssc_tx_ln_regs[] = =3D { {0x07A2, TX_RCVDET_ST_TMR}, {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, @@ -4372,7 +4372,7 @@ static struct cdns_torrent_vals j7200_qsgmii_100_no_s= sc_tx_ln_vals =3D { .num_regs =3D ARRAY_SIZE(j7200_qsgmii_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_reg_pairs j7200_qsgmii_100_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs j7200_qsgmii_100_no_ssc_rx_ln_regs[] = =3D { {0x0014, RX_SDCAL0_INIT_TMR}, {0x0062, RX_SDCAL0_ITER_TMR}, {0x0014, RX_SDCAL1_INIT_TMR}, @@ -4400,7 +4400,7 @@ static struct cdns_torrent_vals j7200_qsgmii_100_no_s= sc_rx_ln_vals =3D { }; =20 /* QSGMII 100 MHz Ref clk, internal SSC */ -static struct cdns_reg_pairs qsgmii_100_int_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs qsgmii_100_int_ssc_cmn_regs[] =3D { {0x0004, CMN_PLL0_DSM_DIAG_M0}, {0x0004, CMN_PLL0_DSM_DIAG_M1}, {0x0004, CMN_PLL1_DSM_DIAG_M0}, @@ -4457,12 +4457,12 @@ static struct cdns_torrent_vals qsgmii_100_int_ssc_= cmn_vals =3D { }; =20 /* Single SGMII/QSGMII link configuration */ -static struct cdns_reg_pairs sl_sgmii_link_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_sgmii_link_cmn_regs[] =3D { {0x0000, PHY_PLL_CFG}, {0x0601, CMN_PDIAG_PLL0_CLK_SEL_M0} }; =20 -static struct cdns_reg_pairs sl_sgmii_xcvr_diag_ln_regs[] =3D { +static const struct cdns_reg_pairs sl_sgmii_xcvr_diag_ln_regs[] =3D { {0x0000, XCVR_DIAG_HSCLK_SEL}, {0x0003, XCVR_DIAG_HSCLK_DIV}, {0x0013, XCVR_DIAG_PLLDRC_CTRL} @@ -4479,7 +4479,7 @@ static struct cdns_torrent_vals sl_sgmii_xcvr_diag_ln= _vals =3D { }; =20 /* Multi link PCIe, 100 MHz Ref clk, internal SSC */ -static struct cdns_reg_pairs pcie_100_int_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs pcie_100_int_ssc_cmn_regs[] =3D { {0x0004, CMN_PLL0_DSM_DIAG_M0}, {0x0004, CMN_PLL0_DSM_DIAG_M1}, {0x0004, CMN_PLL1_DSM_DIAG_M0}, @@ -4534,7 +4534,7 @@ static struct cdns_torrent_vals pcie_100_int_ssc_cmn_= vals =3D { }; =20 /* Single link PCIe, 100 MHz Ref clk, internal SSC */ -static struct cdns_reg_pairs sl_pcie_100_int_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs sl_pcie_100_int_ssc_cmn_regs[] =3D { {0x0004, CMN_PLL0_DSM_DIAG_M0}, {0x0004, CMN_PLL0_DSM_DIAG_M1}, {0x0004, CMN_PLL1_DSM_DIAG_M0}, @@ -4589,13 +4589,13 @@ static struct cdns_torrent_vals sl_pcie_100_int_ssc= _cmn_vals =3D { }; =20 /* PCIe, 100 MHz Ref clk, no SSC & external SSC */ -static struct cdns_reg_pairs pcie_100_ext_no_ssc_cmn_regs[] =3D { +static const struct cdns_reg_pairs pcie_100_ext_no_ssc_cmn_regs[] =3D { {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0} }; =20 -static struct cdns_reg_pairs pcie_100_ext_no_ssc_rx_ln_regs[] =3D { +static const struct cdns_reg_pairs pcie_100_ext_no_ssc_rx_ln_regs[] =3D { {0x0019, RX_REE_TAP1_CLIP}, {0x0019, RX_REE_TAP2TON_CLIP}, {0x0001, RX_DIAG_ACYA} --=20 2.45.2 From nobody Wed Dec 17 08:51:19 2025 Received: from msa.smtpout.orange.fr (msa-210.smtpout.orange.fr [193.252.23.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4B2516D9BE for ; Thu, 11 Jul 2024 17:31:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.252.23.210 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720719096; cv=none; b=Qnl4VRb+vOV2KZIRw43gXRlJm2/PJzMM/BT2LynIxD3YQFI1md5IR3D3NFVQ1JRd+7KOTVrd9PQdUN+aciT31QuW5OLlFkOGeiDy5ty9c9u27XX79/zb8YdTsD4dnNBH+KL+VA1craCA7QZ1K5vkVX5GrLZjvnGhbTJOl7mN8Os= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720719096; c=relaxed/simple; bh=EbbiXRBL8HrzAg+yUgeovOpjQ3huWrUXPU/7EhK8zmY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Um8+XkVtSF5+5lwAnAdOlFECl0zbHdWYncfcyjVaRojBz2R6O6yi3+KFWPjkPo+Rz7HhH/bdGPEgY7PBalDKVqsfCwSNp26sMl7I8HSoHkx6SLajIOia5pUk6lthU/tUw2XxkSz+NPILWC3iI1ZSjYwtRg7xr2LuSilKDZsW3zo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=UNMBB7gt; arc=none smtp.client-ip=193.252.23.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="UNMBB7gt" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id RxdPsAr1uHTrpRxdmsVLtc; Thu, 11 Jul 2024 19:31:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1720719094; bh=A0NOwSSCnj3xicr3sw3iyD9fFy6aCRNZ4cGMskLj1QM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=UNMBB7gtc7++sYbZbHSmEkl0Q2G25m2AmSWlZTsaAR2p4ORz/j+s2vd8g970Gb/KG ZmmfG+DPhLZJ4/hZoWgw/5iWuK7XlnYwSIaMMhY39sAZafDKtFNhgRgzUMQntGxhOC k2Uor2s6qs/UV9T/sovoP7xKHNHfTxMQhmahyLsAZk6oFrl0S27efy2rfTdb56TSEx 4AnieTSKpAf/sQfI56rmKM/TN+JEUU1RJccjAiBlm41+Obhg92kQgcgZCIN4TG6oIG 6froEreYKDt1lt3i34WeJZDFOa6y6zLT1i53kwPex0k0BaifIUEPBDQ9rel75nbFMB SyGyBsAU5y3uw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 11 Jul 2024 19:31:34 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: vkoul@kernel.org, kishon@kernel.org Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 2/4] phy: cadence-torrent: Constify struct cdns_torrent_vals_entry Date: Thu, 11 Jul 2024 19:31:07 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 'struct cdns_torrent_vals_entry' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: =3D=3D=3D=3D=3D=3D text data bss dec hex filename 85130 13214 16 98360 18038 drivers/phy/cadence/phy-cadence-tor= rent.o After: =3D=3D=3D=3D=3D text data bss dec hex filename 92234 6078 16 98328 18018 drivers/phy/cadence/phy-cadence-tor= rent.o Signed-off-by: Christophe JAILLET --- Compile tested-only. --- drivers/phy/cadence/phy-cadence-torrent.c | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadenc= e/phy-cadence-torrent.c index 6551dcf99639..6787d64ee982 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -432,7 +432,7 @@ struct cdns_torrent_vals_entry { }; =20 struct cdns_torrent_vals_table { - struct cdns_torrent_vals_entry *entries; + const struct cdns_torrent_vals_entry *entries; u32 num_entries; }; =20 @@ -4611,7 +4611,7 @@ static struct cdns_torrent_vals pcie_100_no_ssc_rx_ln= _vals =3D { .num_regs =3D ARRAY_SIZE(pcie_100_ext_no_ssc_rx_ln_regs), }; =20 -static struct cdns_torrent_vals_entry link_cmn_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry link_cmn_vals_entries[] =3D { {CDNS_TORRENT_KEY_ANYCLK(TYPE_DP, TYPE_NONE), &sl_dp_link_cmn_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_DP, TYPE_PCIE), &pcie_dp_link_cmn_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_DP, TYPE_USB), &usb_dp_link_cmn_vals}, @@ -4647,7 +4647,7 @@ static struct cdns_torrent_vals_entry link_cmn_vals_e= ntries[] =3D { {CDNS_TORRENT_KEY_ANYCLK(TYPE_USXGMII, TYPE_QSGMII), &usxgmii_sgmii_link_= cmn_vals}, }; =20 -static struct cdns_torrent_vals_entry xcvr_diag_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry xcvr_diag_vals_entries[] =3D { {CDNS_TORRENT_KEY_ANYCLK(TYPE_DP, TYPE_NONE), &sl_dp_xcvr_diag_ln_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_DP, TYPE_PCIE), &dp_pcie_xcvr_diag_ln_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_DP, TYPE_USB), &dp_usb_xcvr_diag_ln_vals}, @@ -4683,7 +4683,7 @@ static struct cdns_torrent_vals_entry xcvr_diag_vals_= entries[] =3D { {CDNS_TORRENT_KEY_ANYCLK(TYPE_USXGMII, TYPE_QSGMII), &usxgmii_sgmii_xcvr_= diag_ln_vals}, }; =20 -static struct cdns_torrent_vals_entry pcs_cmn_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry pcs_cmn_vals_entries[] =3D { {CDNS_TORRENT_KEY_ANYCLK(TYPE_USB, TYPE_NONE), &usb_phy_pcs_cmn_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_USB, TYPE_PCIE), &usb_phy_pcs_cmn_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_USB, TYPE_SGMII), &usb_phy_pcs_cmn_vals}, @@ -4691,7 +4691,7 @@ static struct cdns_torrent_vals_entry pcs_cmn_vals_en= tries[] =3D { {CDNS_TORRENT_KEY_ANYCLK(TYPE_USB, TYPE_DP), &usb_phy_pcs_cmn_vals}, }; =20 -static struct cdns_torrent_vals_entry cmn_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry cmn_vals_entries[] =3D { {CDNS_TORRENT_KEY(CLK_19_2_MHZ, CLK_19_2_MHZ, TYPE_DP, TYPE_NONE, NO_SSC)= , &sl_dp_19_2_no_ssc_cmn_vals}, {CDNS_TORRENT_KEY(CLK_25_MHZ, CLK_25_MHZ, TYPE_DP, TYPE_NONE, NO_SSC), &s= l_dp_25_no_ssc_cmn_vals}, =20 @@ -4773,7 +4773,7 @@ static struct cdns_torrent_vals_entry cmn_vals_entrie= s[] =3D { {CDNS_TORRENT_KEY(CLK_156_25_MHZ, CLK_100_MHZ, TYPE_USXGMII, TYPE_QSGMII,= NO_SSC), &ml_usxgmii_pll0_156_25_no_ssc_cmn_vals}, }; =20 -static struct cdns_torrent_vals_entry cdns_tx_ln_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry cdns_tx_ln_vals_entries[] =3D { {CDNS_TORRENT_KEY(CLK_19_2_MHZ, CLK_19_2_MHZ, TYPE_DP, TYPE_NONE, NO_SSC)= , &sl_dp_19_2_no_ssc_tx_ln_vals}, {CDNS_TORRENT_KEY(CLK_25_MHZ, CLK_25_MHZ, TYPE_DP, TYPE_NONE, NO_SSC), &s= l_dp_25_no_ssc_tx_ln_vals}, =20 @@ -4855,7 +4855,7 @@ static struct cdns_torrent_vals_entry cdns_tx_ln_vals= _entries[] =3D { {CDNS_TORRENT_KEY(CLK_156_25_MHZ, CLK_100_MHZ, TYPE_USXGMII, TYPE_QSGMII,= NO_SSC), &ml_usxgmii_156_25_no_ssc_tx_ln_vals}, }; =20 -static struct cdns_torrent_vals_entry cdns_rx_ln_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry cdns_rx_ln_vals_entries[] =3D { {CDNS_TORRENT_KEY(CLK_19_2_MHZ, CLK_19_2_MHZ, TYPE_DP, TYPE_NONE, NO_SSC)= , &sl_dp_19_2_no_ssc_rx_ln_vals}, {CDNS_TORRENT_KEY(CLK_25_MHZ, CLK_25_MHZ, TYPE_DP, TYPE_NONE, NO_SSC), &s= l_dp_25_no_ssc_rx_ln_vals}, =20 @@ -4966,14 +4966,14 @@ static const struct cdns_torrent_data cdns_map_torr= ent =3D { }, }; =20 -static struct cdns_torrent_vals_entry j721e_phy_pma_cmn_vals_entries[] =3D= { +static const struct cdns_torrent_vals_entry j721e_phy_pma_cmn_vals_entries= [] =3D { {CDNS_TORRENT_KEY_ANYCLK(TYPE_USXGMII, TYPE_NONE), &ti_usxgmii_phy_pma_cm= n_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_USXGMII, TYPE_PCIE), &ti_usxgmii_phy_pma_cm= n_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_USXGMII, TYPE_SGMII), &ti_usxgmii_phy_pma_c= mn_vals}, {CDNS_TORRENT_KEY_ANYCLK(TYPE_USXGMII, TYPE_QSGMII), &ti_usxgmii_phy_pma_= cmn_vals}, }; =20 -static struct cdns_torrent_vals_entry ti_tx_ln_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry ti_tx_ln_vals_entries[] =3D { {CDNS_TORRENT_KEY(CLK_19_2_MHZ, CLK_19_2_MHZ, TYPE_DP, TYPE_NONE, NO_SSC)= , &sl_dp_19_2_no_ssc_tx_ln_vals}, {CDNS_TORRENT_KEY(CLK_25_MHZ, CLK_25_MHZ, TYPE_DP, TYPE_NONE, NO_SSC), &s= l_dp_25_no_ssc_tx_ln_vals}, =20 @@ -5089,7 +5089,7 @@ static const struct cdns_torrent_data ti_j721e_map_to= rrent =3D { }; =20 /* TI J7200 (Torrent SD0805) */ -static struct cdns_torrent_vals_entry ti_j7200_cmn_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry ti_j7200_cmn_vals_entries[] = =3D { {CDNS_TORRENT_KEY(CLK_19_2_MHZ, CLK_19_2_MHZ, TYPE_DP, TYPE_NONE, NO_SSC)= , &sl_dp_19_2_no_ssc_cmn_vals}, {CDNS_TORRENT_KEY(CLK_25_MHZ, CLK_25_MHZ, TYPE_DP, TYPE_NONE, NO_SSC), &s= l_dp_25_no_ssc_cmn_vals}, =20 @@ -5171,7 +5171,7 @@ static struct cdns_torrent_vals_entry ti_j7200_cmn_va= ls_entries[] =3D { {CDNS_TORRENT_KEY(CLK_156_25_MHZ, CLK_100_MHZ, TYPE_USXGMII, TYPE_QSGMII,= NO_SSC), &j7200_ml_usxgmii_pll0_156_25_no_ssc_cmn_vals}, }; =20 -static struct cdns_torrent_vals_entry ti_j7200_tx_ln_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry ti_j7200_tx_ln_vals_entries[] = =3D { {CDNS_TORRENT_KEY(CLK_19_2_MHZ, CLK_19_2_MHZ, TYPE_DP, TYPE_NONE, NO_SSC)= , &sl_dp_19_2_no_ssc_tx_ln_vals}, {CDNS_TORRENT_KEY(CLK_25_MHZ, CLK_25_MHZ, TYPE_DP, TYPE_NONE, NO_SSC), &s= l_dp_25_no_ssc_tx_ln_vals}, =20 @@ -5253,7 +5253,7 @@ static struct cdns_torrent_vals_entry ti_j7200_tx_ln_= vals_entries[] =3D { {CDNS_TORRENT_KEY(CLK_156_25_MHZ, CLK_100_MHZ, TYPE_USXGMII, TYPE_QSGMII,= NO_SSC), &usxgmii_156_25_no_ssc_tx_ln_vals}, }; =20 -static struct cdns_torrent_vals_entry ti_j7200_rx_ln_vals_entries[] =3D { +static const struct cdns_torrent_vals_entry ti_j7200_rx_ln_vals_entries[] = =3D { {CDNS_TORRENT_KEY(CLK_19_2_MHZ, CLK_19_2_MHZ, TYPE_DP, TYPE_NONE, NO_SSC)= , &sl_dp_19_2_no_ssc_rx_ln_vals}, {CDNS_TORRENT_KEY(CLK_25_MHZ, CLK_25_MHZ, TYPE_DP, TYPE_NONE, NO_SSC), &s= l_dp_25_no_ssc_rx_ln_vals}, =20 --=20 2.45.2 From nobody Wed Dec 17 08:51:19 2025 Received: from msa.smtpout.orange.fr (msa-210.smtpout.orange.fr [193.252.23.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 590A416DC0F for ; Thu, 11 Jul 2024 17:31:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.252.23.210 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720719106; cv=none; b=N9WIUfjWVcSBA1YqY7q/af8SioY+L0iHaZOdg2tAA0ITa5+fi2wFoBF6U0WIVzvtVpNJf6euOGuiRZn9U57bjmZHxWtmYDP1jjoWihZ9O4yYmqpldznKC4dV5jerDsXXLUsiOkETbWduu8/FHdbNKFkTNBL4CiLrM892gXx8o5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720719106; c=relaxed/simple; bh=d0rz10bABHfwQA8K1RS5jZzki6RQ8u69L/YIFc0LRcE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZKBOPBmiAMPPdNOnw17A4kV9FkeGjpLwS0Ryp69awpRay0KWzgJ9ckB6jsI4GVEGkQp4MxOQomiK1nFuzVBmSHSZgCiRPVqKDZXXvbCItUxniKQb3F1qcoSQsUj3QGPCOQh2NL/BR34aRskEqpKbLCjww6hxkSXDRa/ds6mW0w4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=UCdmwYjO; arc=none smtp.client-ip=193.252.23.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="UCdmwYjO" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id RxdPsAr1uHTrpRxdusVM4d; Thu, 11 Jul 2024 19:31:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1720719103; bh=IHSzGyCBZ96fFD83zyiq1j3cJyuFru4VA9guWRHtEyk=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=UCdmwYjOUnPrpZiWvXPZ9ownhx2wSPvs4wXDSoL3btvDx714fuFvmz5bbArkuohJV w6pYqGqYspALbZCo8AyJEB6T4hFWjNu5LpcVQ+fZyCLs0skhElqx8ee8fhDK9j3T6B 1iHT3FYrygyaY5CcQ9FuBVZe3Wqpv6UUeN2N6B+/UeluXcgoVZub4cjRFemwRlYipa DN+05RfpvU39pJmN/ddMYZzWtooTykOg5Gd5+fN78a6598FIlRiSFXHS+nPWuhGVoB 48l2F5eKUcBn6gWuSZvJREQ/gJ2YJFz0gjRR42ZMlb4vorF4mz6Pv82la6EXwrQPSB z0+QHgIZ0N+FQ== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 11 Jul 2024 19:31:43 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: vkoul@kernel.org, kishon@kernel.org Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 3/4] phy: cadence-torrent: Constify struct cdns_torrent_vals Date: Thu, 11 Jul 2024 19:31:08 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 'struct cdns_torrent_vals' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: =3D=3D=3D=3D=3D=3D text data bss dec hex filename 92234 6078 16 98328 18018 drivers/phy/cadence/phy-cadence-tor= rent.o After: =3D=3D=3D=3D=3D text data bss dec hex filename 93578 4798 16 98392 18058 drivers/phy/cadence/phy-cadence-tor= rent.o Signed-off-by: Christophe JAILLET --- Compile tested-only. --- drivers/phy/cadence/phy-cadence-torrent.c | 182 +++++++++++----------- 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadenc= e/phy-cadence-torrent.c index 6787d64ee982..e99fa19aafb2 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -428,7 +428,7 @@ struct cdns_torrent_vals { =20 struct cdns_torrent_vals_entry { u32 key; - struct cdns_torrent_vals *vals; + const struct cdns_torrent_vals *vals; }; =20 struct cdns_torrent_vals_table { @@ -454,12 +454,12 @@ struct cdns_regmap_cdb_context { u8 reg_offset_shift; }; =20 -static struct cdns_torrent_vals *cdns_torrent_get_tbl_vals(const struct cd= ns_torrent_vals_table *tbl, - enum cdns_torrent_ref_clk refclk0, - enum cdns_torrent_ref_clk refclk1, - enum cdns_torrent_phy_type link0, - enum cdns_torrent_phy_type link1, - enum cdns_torrent_ssc_mode ssc) +static const struct cdns_torrent_vals *cdns_torrent_get_tbl_vals(const str= uct cdns_torrent_vals_table *tbl, + enum cdns_torrent_ref_clk refclk0, + enum cdns_torrent_ref_clk refclk1, + enum cdns_torrent_phy_type link0, + enum cdns_torrent_phy_type link1, + enum cdns_torrent_ssc_mode ssc) { int i; u32 key =3D CDNS_TORRENT_KEY(refclk0, refclk1, link0, link1, ssc); @@ -2306,15 +2306,15 @@ static int cdns_torrent_regmap_init(struct cdns_tor= rent_phy *cdns_phy) static int cdns_torrent_phy_init(struct phy *phy) { struct cdns_torrent_phy *cdns_phy =3D dev_get_drvdata(phy->dev.parent); + const struct cdns_torrent_vals *cmn_vals, *tx_ln_vals, *rx_ln_vals; const struct cdns_torrent_data *init_data =3D cdns_phy->init_data; - struct cdns_torrent_vals *cmn_vals, *tx_ln_vals, *rx_ln_vals; + const struct cdns_torrent_vals *link_cmn_vals, *xcvr_diag_vals; enum cdns_torrent_ref_clk ref_clk =3D cdns_phy->ref_clk_rate; - struct cdns_torrent_vals *link_cmn_vals, *xcvr_diag_vals; struct cdns_torrent_inst *inst =3D phy_get_drvdata(phy); enum cdns_torrent_phy_type phy_type =3D inst->phy_type; + const struct cdns_torrent_vals *phy_pma_cmn_vals; enum cdns_torrent_ssc_mode ssc =3D inst->ssc_mode; - struct cdns_torrent_vals *phy_pma_cmn_vals; - struct cdns_torrent_vals *pcs_cmn_vals; + const struct cdns_torrent_vals *pcs_cmn_vals; const struct cdns_reg_pairs *reg_pairs; struct regmap *regmap; u32 num_regs; @@ -2463,14 +2463,14 @@ static const struct phy_ops cdns_torrent_phy_ops = =3D { static int cdns_torrent_phy_configure_multilink(struct cdns_torrent_phy *cdns_phy) { + const struct cdns_torrent_vals *cmn_vals, *tx_ln_vals, *rx_ln_vals; const struct cdns_torrent_data *init_data =3D cdns_phy->init_data; - struct cdns_torrent_vals *cmn_vals, *tx_ln_vals, *rx_ln_vals; + const struct cdns_torrent_vals *link_cmn_vals, *xcvr_diag_vals; enum cdns_torrent_ref_clk ref_clk1 =3D cdns_phy->ref_clk1_rate; enum cdns_torrent_ref_clk ref_clk =3D cdns_phy->ref_clk_rate; - struct cdns_torrent_vals *link_cmn_vals, *xcvr_diag_vals; + const struct cdns_torrent_vals *phy_pma_cmn_vals; + const struct cdns_torrent_vals *pcs_cmn_vals; enum cdns_torrent_phy_type phy_t1, phy_t2; - struct cdns_torrent_vals *phy_pma_cmn_vals; - struct cdns_torrent_vals *pcs_cmn_vals; const struct cdns_reg_pairs *reg_pairs; int i, j, node, mlane, num_lanes, ret; enum cdns_torrent_ssc_mode ssc; @@ -3088,12 +3088,12 @@ static const struct cdns_reg_pairs sgmii_qsgmii_xcv= r_diag_ln_regs[] =3D { {0x0113, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals sgmii_qsgmii_link_cmn_vals =3D { +static const struct cdns_torrent_vals sgmii_qsgmii_link_cmn_vals =3D { .reg_pairs =3D sgmii_qsgmii_link_cmn_regs, .num_regs =3D ARRAY_SIZE(sgmii_qsgmii_link_cmn_regs), }; =20 -static struct cdns_torrent_vals sgmii_qsgmii_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals sgmii_qsgmii_xcvr_diag_ln_vals =3D { .reg_pairs =3D sgmii_qsgmii_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(sgmii_qsgmii_xcvr_diag_ln_regs), }; @@ -3171,17 +3171,17 @@ static const struct cdns_reg_pairs dp_usb_xcvr_diag= _ln_regs[] =3D { {0x0009, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals usb_dp_link_cmn_vals =3D { +static const struct cdns_torrent_vals usb_dp_link_cmn_vals =3D { .reg_pairs =3D usb_dp_link_cmn_regs, .num_regs =3D ARRAY_SIZE(usb_dp_link_cmn_regs), }; =20 -static struct cdns_torrent_vals usb_dp_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals usb_dp_xcvr_diag_ln_vals =3D { .reg_pairs =3D usb_dp_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(usb_dp_xcvr_diag_ln_regs), }; =20 -static struct cdns_torrent_vals dp_usb_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals dp_usb_xcvr_diag_ln_vals =3D { .reg_pairs =3D dp_usb_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(dp_usb_xcvr_diag_ln_regs), }; @@ -3205,17 +3205,17 @@ static const struct cdns_reg_pairs sgmii_usxgmii_xc= vr_diag_ln_regs[] =3D { {0x0A9B, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals usxgmii_sgmii_link_cmn_vals =3D { +static const struct cdns_torrent_vals usxgmii_sgmii_link_cmn_vals =3D { .reg_pairs =3D usxgmii_sgmii_link_cmn_regs, .num_regs =3D ARRAY_SIZE(usxgmii_sgmii_link_cmn_regs), }; =20 -static struct cdns_torrent_vals usxgmii_sgmii_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals usxgmii_sgmii_xcvr_diag_ln_vals =3D { .reg_pairs =3D usxgmii_sgmii_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(usxgmii_sgmii_xcvr_diag_ln_regs), }; =20 -static struct cdns_torrent_vals sgmii_usxgmii_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals sgmii_usxgmii_xcvr_diag_ln_vals =3D { .reg_pairs =3D sgmii_usxgmii_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(sgmii_usxgmii_xcvr_diag_ln_regs), }; @@ -3233,7 +3233,7 @@ static const struct cdns_reg_pairs ml_usxgmii_pll0_15= 6_25_no_ssc_cmn_regs[] =3D { {0x0138, CMN_PLL0_LOCK_PLLCNT_START} }; =20 -static struct cdns_torrent_vals ml_usxgmii_pll0_156_25_no_ssc_cmn_vals =3D= { +static const struct cdns_torrent_vals ml_usxgmii_pll0_156_25_no_ssc_cmn_va= ls =3D { .reg_pairs =3D ml_usxgmii_pll0_156_25_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(ml_usxgmii_pll0_156_25_no_ssc_cmn_regs), }; @@ -3248,7 +3248,7 @@ static const struct cdns_reg_pairs ml_sgmii_pll1_100_= no_ssc_cmn_regs[] =3D { {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_torrent_vals ml_sgmii_pll1_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals ml_sgmii_pll1_100_no_ssc_cmn_vals = =3D { .reg_pairs =3D ml_sgmii_pll1_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(ml_sgmii_pll1_100_no_ssc_cmn_regs), }; @@ -3280,7 +3280,7 @@ static const struct cdns_reg_pairs j7200_ml_usxgmii_p= ll0_156_25_no_ssc_cmn_regs[ {0x0138, CMN_PLL0_LOCK_PLLCNT_START} }; =20 -static struct cdns_torrent_vals j7200_ml_usxgmii_pll0_156_25_no_ssc_cmn_va= ls =3D { +static const struct cdns_torrent_vals j7200_ml_usxgmii_pll0_156_25_no_ssc_= cmn_vals =3D { .reg_pairs =3D j7200_ml_usxgmii_pll0_156_25_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(j7200_ml_usxgmii_pll0_156_25_no_ssc_cmn_regs), }; @@ -3297,7 +3297,7 @@ static const struct cdns_reg_pairs j7200_ml_sgmii_pll= 1_100_no_ssc_cmn_regs[] =3D { {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_torrent_vals j7200_ml_sgmii_pll1_100_no_ssc_cmn_vals = =3D { +static const struct cdns_torrent_vals j7200_ml_sgmii_pll1_100_no_ssc_cmn_v= als =3D { .reg_pairs =3D j7200_ml_sgmii_pll1_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(j7200_ml_sgmii_pll1_100_no_ssc_cmn_regs), }; @@ -3322,17 +3322,17 @@ static const struct cdns_reg_pairs usxgmii_pcie_xcv= r_diag_ln_regs[] =3D { {0x0089, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals pcie_usxgmii_link_cmn_vals =3D { +static const struct cdns_torrent_vals pcie_usxgmii_link_cmn_vals =3D { .reg_pairs =3D pcie_usxgmii_link_cmn_regs, .num_regs =3D ARRAY_SIZE(pcie_usxgmii_link_cmn_regs), }; =20 -static struct cdns_torrent_vals pcie_usxgmii_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals pcie_usxgmii_xcvr_diag_ln_vals =3D { .reg_pairs =3D pcie_usxgmii_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(pcie_usxgmii_xcvr_diag_ln_regs), }; =20 -static struct cdns_torrent_vals usxgmii_pcie_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals usxgmii_pcie_xcvr_diag_ln_vals =3D { .reg_pairs =3D usxgmii_pcie_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(usxgmii_pcie_xcvr_diag_ln_regs), }; @@ -3381,17 +3381,17 @@ static const struct cdns_reg_pairs ml_usxgmii_156_2= 5_no_ssc_rx_ln_regs[] =3D { {0x018C, RX_CDRLF_CNFG} }; =20 -static struct cdns_torrent_vals ml_usxgmii_pll1_156_25_no_ssc_cmn_vals =3D= { +static const struct cdns_torrent_vals ml_usxgmii_pll1_156_25_no_ssc_cmn_va= ls =3D { .reg_pairs =3D ml_usxgmii_pll1_156_25_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(ml_usxgmii_pll1_156_25_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals ml_usxgmii_156_25_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals ml_usxgmii_156_25_no_ssc_tx_ln_vals = =3D { .reg_pairs =3D ml_usxgmii_156_25_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(ml_usxgmii_156_25_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals ml_usxgmii_156_25_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals ml_usxgmii_156_25_no_ssc_rx_ln_vals = =3D { .reg_pairs =3D ml_usxgmii_156_25_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(ml_usxgmii_156_25_no_ssc_rx_ln_regs), }; @@ -3401,7 +3401,7 @@ static const struct cdns_reg_pairs ti_usxgmii_phy_pma= _cmn_regs[] =3D { {0x0040, PHY_PMA_CMN_CTRL1}, }; =20 -static struct cdns_torrent_vals ti_usxgmii_phy_pma_cmn_vals =3D { +static const struct cdns_torrent_vals ti_usxgmii_phy_pma_cmn_vals =3D { .reg_pairs =3D ti_usxgmii_phy_pma_cmn_regs, .num_regs =3D ARRAY_SIZE(ti_usxgmii_phy_pma_cmn_regs), }; @@ -3418,12 +3418,12 @@ static const struct cdns_reg_pairs sl_usxgmii_xcvr_= diag_ln_regs[] =3D { {0x0001, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals sl_usxgmii_link_cmn_vals =3D { +static const struct cdns_torrent_vals sl_usxgmii_link_cmn_vals =3D { .reg_pairs =3D sl_usxgmii_link_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_usxgmii_link_cmn_regs), }; =20 -static struct cdns_torrent_vals sl_usxgmii_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals sl_usxgmii_xcvr_diag_ln_vals =3D { .reg_pairs =3D sl_usxgmii_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(sl_usxgmii_xcvr_diag_ln_regs), }; @@ -3498,17 +3498,17 @@ static const struct cdns_reg_pairs usxgmii_156_25_n= o_ssc_rx_ln_regs[] =3D { {0x018C, RX_CDRLF_CNFG} }; =20 -static struct cdns_torrent_vals sl_usxgmii_156_25_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_usxgmii_156_25_no_ssc_cmn_vals = =3D { .reg_pairs =3D sl_usxgmii_156_25_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_usxgmii_156_25_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals usxgmii_156_25_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals usxgmii_156_25_no_ssc_tx_ln_vals =3D= { .reg_pairs =3D usxgmii_156_25_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(usxgmii_156_25_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals usxgmii_156_25_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals usxgmii_156_25_no_ssc_rx_ln_vals =3D= { .reg_pairs =3D usxgmii_156_25_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(usxgmii_156_25_no_ssc_rx_ln_regs), }; @@ -3531,17 +3531,17 @@ static const struct cdns_reg_pairs dp_pcie_xcvr_dia= g_ln_regs[] =3D { {0x0009, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals pcie_dp_link_cmn_vals =3D { +static const struct cdns_torrent_vals pcie_dp_link_cmn_vals =3D { .reg_pairs =3D pcie_dp_link_cmn_regs, .num_regs =3D ARRAY_SIZE(pcie_dp_link_cmn_regs), }; =20 -static struct cdns_torrent_vals pcie_dp_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals pcie_dp_xcvr_diag_ln_vals =3D { .reg_pairs =3D pcie_dp_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(pcie_dp_xcvr_diag_ln_regs), }; =20 -static struct cdns_torrent_vals dp_pcie_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals dp_pcie_xcvr_diag_ln_vals =3D { .reg_pairs =3D dp_pcie_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(dp_pcie_xcvr_diag_ln_regs), }; @@ -3569,17 +3569,17 @@ static const struct cdns_reg_pairs dp_100_no_ssc_rx= _ln_regs[] =3D { {0x0000, RX_REE_PERGCSM_CTRL} }; =20 -static struct cdns_torrent_vals dp_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals dp_100_no_ssc_cmn_vals =3D { .reg_pairs =3D dp_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(dp_100_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals dp_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals dp_100_no_ssc_tx_ln_vals =3D { .reg_pairs =3D dp_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(dp_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals dp_100_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals dp_100_no_ssc_rx_ln_vals =3D { .reg_pairs =3D dp_100_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(dp_100_no_ssc_rx_ln_regs), }; @@ -3594,12 +3594,12 @@ static const struct cdns_reg_pairs sl_dp_xcvr_diag_= ln_regs[] =3D { {0x0001, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals sl_dp_link_cmn_vals =3D { +static const struct cdns_torrent_vals sl_dp_link_cmn_vals =3D { .reg_pairs =3D sl_dp_link_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_dp_link_cmn_regs), }; =20 -static struct cdns_torrent_vals sl_dp_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals sl_dp_xcvr_diag_ln_vals =3D { .reg_pairs =3D sl_dp_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(sl_dp_xcvr_diag_ln_regs), }; @@ -3660,17 +3660,17 @@ static const struct cdns_reg_pairs sl_dp_19_2_no_ss= c_rx_ln_regs[] =3D { {0x0000, RX_REE_PERGCSM_CTRL} }; =20 -static struct cdns_torrent_vals sl_dp_19_2_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_dp_19_2_no_ssc_cmn_vals =3D { .reg_pairs =3D sl_dp_19_2_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_dp_19_2_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals sl_dp_19_2_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals sl_dp_19_2_no_ssc_tx_ln_vals =3D { .reg_pairs =3D sl_dp_19_2_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(sl_dp_19_2_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals sl_dp_19_2_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals sl_dp_19_2_no_ssc_rx_ln_vals =3D { .reg_pairs =3D sl_dp_19_2_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(sl_dp_19_2_no_ssc_rx_ln_regs), }; @@ -3731,17 +3731,17 @@ static const struct cdns_reg_pairs sl_dp_25_no_ssc_= rx_ln_regs[] =3D { {0x0000, RX_REE_PERGCSM_CTRL} }; =20 -static struct cdns_torrent_vals sl_dp_25_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_dp_25_no_ssc_cmn_vals =3D { .reg_pairs =3D sl_dp_25_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_dp_25_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals sl_dp_25_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals sl_dp_25_no_ssc_tx_ln_vals =3D { .reg_pairs =3D sl_dp_25_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(sl_dp_25_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals sl_dp_25_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals sl_dp_25_no_ssc_rx_ln_vals =3D { .reg_pairs =3D sl_dp_25_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(sl_dp_25_no_ssc_rx_ln_regs), }; @@ -3769,17 +3769,17 @@ static const struct cdns_reg_pairs sl_dp_100_no_ssc= _rx_ln_regs[] =3D { {0x0000, RX_REE_PERGCSM_CTRL} }; =20 -static struct cdns_torrent_vals sl_dp_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_dp_100_no_ssc_cmn_vals =3D { .reg_pairs =3D sl_dp_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_dp_100_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals sl_dp_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals sl_dp_100_no_ssc_tx_ln_vals =3D { .reg_pairs =3D sl_dp_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(sl_dp_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals sl_dp_100_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals sl_dp_100_no_ssc_rx_ln_vals =3D { .reg_pairs =3D sl_dp_100_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(sl_dp_100_no_ssc_rx_ln_regs), }; @@ -3803,17 +3803,17 @@ static const struct cdns_reg_pairs sgmii_usb_xcvr_d= iag_ln_regs[] =3D { {0x009B, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals usb_sgmii_link_cmn_vals =3D { +static const struct cdns_torrent_vals usb_sgmii_link_cmn_vals =3D { .reg_pairs =3D usb_sgmii_link_cmn_regs, .num_regs =3D ARRAY_SIZE(usb_sgmii_link_cmn_regs), }; =20 -static struct cdns_torrent_vals usb_sgmii_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals usb_sgmii_xcvr_diag_ln_vals =3D { .reg_pairs =3D usb_sgmii_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(usb_sgmii_xcvr_diag_ln_regs), }; =20 -static struct cdns_torrent_vals sgmii_usb_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals sgmii_usb_xcvr_diag_ln_vals =3D { .reg_pairs =3D sgmii_usb_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(sgmii_usb_xcvr_diag_ln_regs), }; @@ -3838,17 +3838,17 @@ static const struct cdns_reg_pairs usb_pcie_xcvr_di= ag_ln_regs[] =3D { {0x00C9, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals pcie_usb_link_cmn_vals =3D { +static const struct cdns_torrent_vals pcie_usb_link_cmn_vals =3D { .reg_pairs =3D pcie_usb_link_cmn_regs, .num_regs =3D ARRAY_SIZE(pcie_usb_link_cmn_regs), }; =20 -static struct cdns_torrent_vals pcie_usb_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals pcie_usb_xcvr_diag_ln_vals =3D { .reg_pairs =3D pcie_usb_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(pcie_usb_xcvr_diag_ln_regs), }; =20 -static struct cdns_torrent_vals usb_pcie_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals usb_pcie_xcvr_diag_ln_vals =3D { .reg_pairs =3D usb_pcie_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(usb_pcie_xcvr_diag_ln_regs), }; @@ -3907,7 +3907,7 @@ static const struct cdns_reg_pairs usb_100_int_ssc_cm= n_regs[] =3D { {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_torrent_vals usb_100_int_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals usb_100_int_ssc_cmn_vals =3D { .reg_pairs =3D usb_100_int_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(usb_100_int_ssc_cmn_regs), }; @@ -3924,12 +3924,12 @@ static const struct cdns_reg_pairs sl_usb_xcvr_diag= _ln_regs[] =3D { {0x0041, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals sl_usb_link_cmn_vals =3D { +static const struct cdns_torrent_vals sl_usb_link_cmn_vals =3D { .reg_pairs =3D sl_usb_link_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_usb_link_cmn_regs), }; =20 -static struct cdns_torrent_vals sl_usb_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals sl_usb_xcvr_diag_ln_vals =3D { .reg_pairs =3D sl_usb_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(sl_usb_xcvr_diag_ln_regs), }; @@ -3941,7 +3941,7 @@ static const struct cdns_reg_pairs usb_phy_pcs_cmn_re= gs[] =3D { {0x0010, PHY_PIPE_USB3_GEN2_POST_CFG1} }; =20 -static struct cdns_torrent_vals usb_phy_pcs_cmn_vals =3D { +static const struct cdns_torrent_vals usb_phy_pcs_cmn_vals =3D { .reg_pairs =3D usb_phy_pcs_cmn_regs, .num_regs =3D ARRAY_SIZE(usb_phy_pcs_cmn_regs), }; @@ -3957,7 +3957,7 @@ static const struct cdns_reg_pairs sl_usb_100_no_ssc_= cmn_regs[] =3D { {0x8200, CMN_CDIAG_XCVRC_PWRI_OVRD} }; =20 -static struct cdns_torrent_vals sl_usb_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_usb_100_no_ssc_cmn_vals =3D { .reg_pairs =3D sl_usb_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_usb_100_no_ssc_cmn_regs), }; @@ -4002,17 +4002,17 @@ static const struct cdns_reg_pairs usb_100_no_ssc_r= x_ln_regs[] =3D { {0x0003, RX_CDRLF_CNFG3} }; =20 -static struct cdns_torrent_vals usb_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals usb_100_no_ssc_cmn_vals =3D { .reg_pairs =3D usb_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(usb_100_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals usb_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals usb_100_no_ssc_tx_ln_vals =3D { .reg_pairs =3D usb_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(usb_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals usb_100_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals usb_100_no_ssc_rx_ln_vals =3D { .reg_pairs =3D usb_100_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(usb_100_no_ssc_rx_ln_regs), }; @@ -4059,7 +4059,7 @@ static const struct cdns_reg_pairs sl_usb_100_int_ssc= _cmn_regs[] =3D { {0x8200, CMN_CDIAG_XCVRC_PWRI_OVRD} }; =20 -static struct cdns_torrent_vals sl_usb_100_int_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_usb_100_int_ssc_cmn_vals =3D { .reg_pairs =3D sl_usb_100_int_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_usb_100_int_ssc_cmn_regs), }; @@ -4084,17 +4084,17 @@ static const struct cdns_reg_pairs sgmii_pcie_xcvr_= diag_ln_regs[] =3D { {0x009B, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals pcie_sgmii_link_cmn_vals =3D { +static const struct cdns_torrent_vals pcie_sgmii_link_cmn_vals =3D { .reg_pairs =3D pcie_sgmii_link_cmn_regs, .num_regs =3D ARRAY_SIZE(pcie_sgmii_link_cmn_regs), }; =20 -static struct cdns_torrent_vals pcie_sgmii_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals pcie_sgmii_xcvr_diag_ln_vals =3D { .reg_pairs =3D pcie_sgmii_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(pcie_sgmii_xcvr_diag_ln_regs), }; =20 -static struct cdns_torrent_vals sgmii_pcie_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals sgmii_pcie_xcvr_diag_ln_vals =3D { .reg_pairs =3D sgmii_pcie_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(sgmii_pcie_xcvr_diag_ln_regs), }; @@ -4108,7 +4108,7 @@ static const struct cdns_reg_pairs sl_sgmii_100_no_ss= c_cmn_regs[] =3D { {0x0003, CMN_PLL1_VCOCAL_TCTRL} }; =20 -static struct cdns_torrent_vals sl_sgmii_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_sgmii_100_no_ssc_cmn_vals =3D { .reg_pairs =3D sl_sgmii_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_sgmii_100_no_ssc_cmn_regs), }; @@ -4155,22 +4155,22 @@ static const struct cdns_reg_pairs sgmii_100_no_ssc= _rx_ln_regs[] =3D { {0x018C, RX_CDRLF_CNFG}, }; =20 -static struct cdns_torrent_vals sgmii_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sgmii_100_no_ssc_cmn_vals =3D { .reg_pairs =3D sgmii_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sgmii_100_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals sgmii_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals sgmii_100_no_ssc_tx_ln_vals =3D { .reg_pairs =3D sgmii_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(sgmii_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals ti_sgmii_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals ti_sgmii_100_no_ssc_tx_ln_vals =3D { .reg_pairs =3D ti_sgmii_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(ti_sgmii_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals sgmii_100_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals sgmii_100_no_ssc_rx_ln_vals =3D { .reg_pairs =3D sgmii_100_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(sgmii_100_no_ssc_rx_ln_regs), }; @@ -4187,7 +4187,7 @@ static const struct cdns_reg_pairs j7200_sgmii_100_no= _ssc_tx_ln_regs[] =3D { {0x4000, XCVR_DIAG_RXCLK_CTRL} }; =20 -static struct cdns_torrent_vals j7200_sgmii_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals j7200_sgmii_100_no_ssc_tx_ln_vals = =3D { .reg_pairs =3D j7200_sgmii_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(j7200_sgmii_100_no_ssc_tx_ln_regs), }; @@ -4214,7 +4214,7 @@ static const struct cdns_reg_pairs j7200_sgmii_100_no= _ssc_rx_ln_regs[] =3D { {0x018C, RX_CDRLF_CNFG} }; =20 -static struct cdns_torrent_vals j7200_sgmii_100_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals j7200_sgmii_100_no_ssc_rx_ln_vals = =3D { .reg_pairs =3D j7200_sgmii_100_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(j7200_sgmii_100_no_ssc_rx_ln_regs), }; @@ -4271,7 +4271,7 @@ static const struct cdns_reg_pairs sgmii_100_int_ssc_= cmn_regs[] =3D { {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_torrent_vals sgmii_100_int_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sgmii_100_int_ssc_cmn_vals =3D { .reg_pairs =3D sgmii_100_int_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sgmii_100_int_ssc_cmn_regs), }; @@ -4285,7 +4285,7 @@ static const struct cdns_reg_pairs sl_qsgmii_100_no_s= sc_cmn_regs[] =3D { {0x0003, CMN_PLL1_VCOCAL_TCTRL} }; =20 -static struct cdns_torrent_vals sl_qsgmii_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_qsgmii_100_no_ssc_cmn_vals =3D { .reg_pairs =3D sl_qsgmii_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_qsgmii_100_no_ssc_cmn_regs), }; @@ -4334,22 +4334,22 @@ static const struct cdns_reg_pairs qsgmii_100_no_ss= c_rx_ln_regs[] =3D { {0x018C, RX_CDRLF_CNFG}, }; =20 -static struct cdns_torrent_vals qsgmii_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals qsgmii_100_no_ssc_cmn_vals =3D { .reg_pairs =3D qsgmii_100_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(qsgmii_100_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals qsgmii_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals qsgmii_100_no_ssc_tx_ln_vals =3D { .reg_pairs =3D qsgmii_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(qsgmii_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals ti_qsgmii_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals ti_qsgmii_100_no_ssc_tx_ln_vals =3D { .reg_pairs =3D ti_qsgmii_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(ti_qsgmii_100_no_ssc_tx_ln_regs), }; =20 -static struct cdns_torrent_vals qsgmii_100_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals qsgmii_100_no_ssc_rx_ln_vals =3D { .reg_pairs =3D qsgmii_100_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(qsgmii_100_no_ssc_rx_ln_regs), }; @@ -4367,7 +4367,7 @@ static const struct cdns_reg_pairs j7200_qsgmii_100_n= o_ssc_tx_ln_regs[] =3D { {0x4000, XCVR_DIAG_RXCLK_CTRL} }; =20 -static struct cdns_torrent_vals j7200_qsgmii_100_no_ssc_tx_ln_vals =3D { +static const struct cdns_torrent_vals j7200_qsgmii_100_no_ssc_tx_ln_vals = =3D { .reg_pairs =3D j7200_qsgmii_100_no_ssc_tx_ln_regs, .num_regs =3D ARRAY_SIZE(j7200_qsgmii_100_no_ssc_tx_ln_regs), }; @@ -4394,7 +4394,7 @@ static const struct cdns_reg_pairs j7200_qsgmii_100_n= o_ssc_rx_ln_regs[] =3D { {0x018C, RX_CDRLF_CNFG} }; =20 -static struct cdns_torrent_vals j7200_qsgmii_100_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals j7200_qsgmii_100_no_ssc_rx_ln_vals = =3D { .reg_pairs =3D j7200_qsgmii_100_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(j7200_qsgmii_100_no_ssc_rx_ln_regs), }; @@ -4451,7 +4451,7 @@ static const struct cdns_reg_pairs qsgmii_100_int_ssc= _cmn_regs[] =3D { {0x007F, CMN_TXPDCAL_TUNE} }; =20 -static struct cdns_torrent_vals qsgmii_100_int_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals qsgmii_100_int_ssc_cmn_vals =3D { .reg_pairs =3D qsgmii_100_int_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(qsgmii_100_int_ssc_cmn_regs), }; @@ -4468,12 +4468,12 @@ static const struct cdns_reg_pairs sl_sgmii_xcvr_di= ag_ln_regs[] =3D { {0x0013, XCVR_DIAG_PLLDRC_CTRL} }; =20 -static struct cdns_torrent_vals sl_sgmii_link_cmn_vals =3D { +static const struct cdns_torrent_vals sl_sgmii_link_cmn_vals =3D { .reg_pairs =3D sl_sgmii_link_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_sgmii_link_cmn_regs), }; =20 -static struct cdns_torrent_vals sl_sgmii_xcvr_diag_ln_vals =3D { +static const struct cdns_torrent_vals sl_sgmii_xcvr_diag_ln_vals =3D { .reg_pairs =3D sl_sgmii_xcvr_diag_ln_regs, .num_regs =3D ARRAY_SIZE(sl_sgmii_xcvr_diag_ln_regs), }; @@ -4528,7 +4528,7 @@ static const struct cdns_reg_pairs pcie_100_int_ssc_c= mn_regs[] =3D { {0x0005, CMN_PLL1_LOCK_PLLCNT_THR} }; =20 -static struct cdns_torrent_vals pcie_100_int_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals pcie_100_int_ssc_cmn_vals =3D { .reg_pairs =3D pcie_100_int_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(pcie_100_int_ssc_cmn_regs), }; @@ -4583,7 +4583,7 @@ static const struct cdns_reg_pairs sl_pcie_100_int_ss= c_cmn_regs[] =3D { {0x0005, CMN_PLL1_LOCK_PLLCNT_THR} }; =20 -static struct cdns_torrent_vals sl_pcie_100_int_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals sl_pcie_100_int_ssc_cmn_vals =3D { .reg_pairs =3D sl_pcie_100_int_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(sl_pcie_100_int_ssc_cmn_regs), }; @@ -4601,12 +4601,12 @@ static const struct cdns_reg_pairs pcie_100_ext_no_= ssc_rx_ln_regs[] =3D { {0x0001, RX_DIAG_ACYA} }; =20 -static struct cdns_torrent_vals pcie_100_no_ssc_cmn_vals =3D { +static const struct cdns_torrent_vals pcie_100_no_ssc_cmn_vals =3D { .reg_pairs =3D pcie_100_ext_no_ssc_cmn_regs, .num_regs =3D ARRAY_SIZE(pcie_100_ext_no_ssc_cmn_regs), }; =20 -static struct cdns_torrent_vals pcie_100_no_ssc_rx_ln_vals =3D { +static const struct cdns_torrent_vals pcie_100_no_ssc_rx_ln_vals =3D { .reg_pairs =3D pcie_100_ext_no_ssc_rx_ln_regs, .num_regs =3D ARRAY_SIZE(pcie_100_ext_no_ssc_rx_ln_regs), }; --=20 2.45.2 From nobody Wed Dec 17 08:51:19 2025 Received: from msa.smtpout.orange.fr (msa-211.smtpout.orange.fr [193.252.23.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65C9116E89C for ; Thu, 11 Jul 2024 17:31:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.252.23.211 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720719114; cv=none; b=OMGGX4QkIA0vRq2zQ9ZxQGw4lCBCkWvzlcZilUgOBR+KmmIM0IoV6Q73niRkjQSZu0PK2GuAPJhrtux8PhyHj2zY6W0uaQRlqCYvD6yOfqZFYx3F0ewjUPzSEIcBq/bFRsL7iuBku9u342vUbNVImwj0SID0i7Px3din4PqRx6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720719114; c=relaxed/simple; bh=I1lh+9PWxnRfpKf5KyMuGtWHTLzEMQ4QrU/SElqg0lw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BTdDiMUttHWVV4dPD9IFUJP+DiRhrsZ+LBPe7bQ7aMXtsJJEQsE9ko0VJhx0OeNmqgoDS89hgGADGiPu7d/HFBv/pBL1GRdQ1s3mqNgf0AVUqfxe6GjtqrbvG3iHWlMx0UkTE2IU9O6JXEzc5p7Jiae8Zvtjrx1AJ2FCWNDgdyU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=AI76M2CN; arc=none smtp.client-ip=193.252.23.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="AI76M2CN" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id RxdPsAr1uHTrpRxdwsVM6q; Thu, 11 Jul 2024 19:31:45 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1720719105; bh=CYDBY2pWQO+vL7jUvHWkdq6VSa180NCvhyL35LhJ4nw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=AI76M2CNz/N0+vD1wQnHuPFx3lNMObmO+djuwzVfE+tEFcf41Gc4mxZ9lWQE9ygtD 73FG9DaAXzSrSVqCt89PNak4DHz0jBDk30k0SQPUwuFp4OUY4dNL6dRqZgZY7bHvl3 QC1PoyOOivnLhNtxvWk4PKNNK/uYCzZK29IdIHHlW7Qrd1JvZo5qs7hMgA+qF/v7GL ZkG6rTisyxlvedh1MOALNEIgyV8CSOIEvPboywkMMUGQd0+urlO5JSrcLr3LwN5C5S RyQ/qcicJIM+8VJcyUlehJBjc4gKwl1VNBX7gMrJuTc3Ld/hAoUqyjlkjFOS6YGyil FHdESRH/i/nug== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 11 Jul 2024 19:31:45 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: vkoul@kernel.org, kishon@kernel.org Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 4/4] phy: cadence-torrent: Constify a u32[] Date: Thu, 11 Jul 2024 19:31:09 +0200 Message-ID: <34e23ceb6b7b7eb730ee8deee21d231b504dc65f.1720718240.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 'cdns_torrent_refclk_driver_mux_table' is not modified in this driver. And it is only used as a "const u32 *". Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: =3D=3D=3D=3D=3D=3D text data bss dec hex filename 93578 4798 16 98392 18058 drivers/phy/cadence/phy-cadence-tor= rent.o After: =3D=3D=3D=3D=3D text data bss dec hex filename 93606 4790 16 98412 1806c drivers/phy/cadence/phy-cadence-tor= rent.o Signed-off-by: Christophe JAILLET --- Compile tested-only. --- drivers/phy/cadence/phy-cadence-torrent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadenc= e/phy-cadence-torrent.c index e99fa19aafb2..098c141c28c2 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -285,7 +285,7 @@ static const int refclk_driver_parent_index[] =3D { CDNS_TORRENT_RECEIVED_REFCLK }; =20 -static u32 cdns_torrent_refclk_driver_mux_table[] =3D { 1, 0 }; +static const u32 cdns_torrent_refclk_driver_mux_table[] =3D { 1, 0 }; =20 enum cdns_torrent_phy_type { TYPE_NONE, --=20 2.45.2