On 11-08-25, 21:16, Shradha Todi wrote: > Add PCIe PHY support for Tesla FSD SoC. Can you pls add a bit more description of what you are adding, helps to understand the change > +/* FSD: PCIe PCS registers */ > +#define FSD_PCIE_PCS_BRF_0 0x0004 > +#define FSD_PCIE_PCS_BRF_1 0x0804 > +#define FSD_PCIE_PCS_CLK 0x0180 > + > +/* FSD: PCIe SYSREG registers */ > +#define FSD_PCIE_SYSREG_PHY_0_CON 0x042c > +#define FSD_PCIE_SYSREG_PHY_0_CON_MASK 0x03ff > +#define FSD_PCIE_SYSREG_PHY_0_REF_SEL (0x2 << 0) Use GENMASK() please here and elsewhere > +static int fsd_pcie_phy0_reset(struct phy *phy) > +{ > + struct exynos_pcie_phy *phy_ctrl = phy_get_drvdata(phy); > + > + writel(0x1, phy_ctrl->pcs_base + FSD_PCIE_PCS_CLK); > + > + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON, > + FSD_PCIE_SYSREG_PHY_0_CON_MASK, 0x0); > + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON, > + FSD_PCIE_SYSREG_PHY_0_AUX_EN, FSD_PCIE_SYSREG_PHY_0_AUX_EN); > + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON, > + FSD_PCIE_SYSREG_PHY_0_REF_SEL_MASK, FSD_PCIE_SYSREG_PHY_0_REF_SEL); > + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON, > + FSD_PCIE_SYSREG_PHY_0_INIT_RSTN, FSD_PCIE_SYSREG_PHY_0_INIT_RSTN); pls conform to coding style for these > + > + return 0; why return a value when this wont ever return anything else than 0? > + > + writel(0x2, pbase + FSD_PCIE_PHY_CMN_RESET); > + > + writel(0x00, phy_ctrl->pcs_base + FSD_PCIE_PCS_BRF_0); > + writel(0x00, phy_ctrl->pcs_base + FSD_PCIE_PCS_BRF_1); > + writel(0x00, pbase + FSD_PCIE_PHY_AGG_BIF_RESET); > + writel(0x00, pbase + FSD_PCIE_PHY_AGG_BIF_CLOCK); > + > + fsd_pcie_phy_writel(phy_ctrl, FSD_PCIE_PHY_TRSV_REG07B_LN_N, 0x20); > + fsd_pcie_phy_writel(phy_ctrl, FSD_PCIE_PHY_TRSV_REG052_LN_N, 0x00); > + writel(0xaa, pbase + FSD_PCIE_PHY_TRSV_CMN_REG01E); > + writel(0x28, pbase + FSD_PCIE_PHY_TRSV_CMN_REG02D); > + writel(0x28, pbase + FSD_PCIE_PHY_TRSV_CMN_REG031); > + writel(0x21, pbase + FSD_PCIE_PHY_TRSV_CMN_REG036); > + writel(0x12, pbase + FSD_PCIE_PHY_TRSV_CMN_REG05F); > + writel(0x23, pbase + FSD_PCIE_PHY_TRSV_CMN_REG060); > + writel(0x0, pbase + FSD_PCIE_PHY_TRSV_CMN_REG061); > + writel(0x0, pbase + FSD_PCIE_PHY_TRSV_CMN_REG062); > + writel(0x15, pbase + FSD_PCIE_PHY_TRSV_CMN_REG03); Magic numbers? -- ~Vinod