Lines Matching refs:value
328 static inline void afi_writel(struct tegra_pcie *pcie, u32 value, in afi_writel() argument
331 writel(value, pcie->afi + offset); in afi_writel()
339 static inline void pads_writel(struct tegra_pcie *pcie, u32 value, in pads_writel() argument
342 writel(value, pcie->pads + offset); in pads_writel()
513 unsigned long value; in tegra_pcie_port_reset() local
516 value = afi_readl(port->pcie, ctrl); in tegra_pcie_port_reset()
517 value &= ~AFI_PEX_CTRL_RST; in tegra_pcie_port_reset()
518 afi_writel(port->pcie, value, ctrl); in tegra_pcie_port_reset()
522 value = afi_readl(port->pcie, ctrl); in tegra_pcie_port_reset()
523 value |= AFI_PEX_CTRL_RST; in tegra_pcie_port_reset()
524 afi_writel(port->pcie, value, ctrl); in tegra_pcie_port_reset()
531 unsigned long value; in tegra_pcie_port_enable() local
534 value = afi_readl(port->pcie, ctrl); in tegra_pcie_port_enable()
535 value |= AFI_PEX_CTRL_REFCLK_EN; in tegra_pcie_port_enable()
538 value |= AFI_PEX_CTRL_CLKREQ_EN; in tegra_pcie_port_enable()
540 value |= AFI_PEX_CTRL_OVERRIDE_EN; in tegra_pcie_port_enable()
542 afi_writel(port->pcie, value, ctrl); in tegra_pcie_port_enable()
551 unsigned long value; in tegra_pcie_port_disable() local
554 value = afi_readl(port->pcie, ctrl); in tegra_pcie_port_disable()
555 value &= ~AFI_PEX_CTRL_RST; in tegra_pcie_port_disable()
556 afi_writel(port->pcie, value, ctrl); in tegra_pcie_port_disable()
559 value = afi_readl(port->pcie, ctrl); in tegra_pcie_port_disable()
562 value &= ~AFI_PEX_CTRL_CLKREQ_EN; in tegra_pcie_port_disable()
564 value &= ~AFI_PEX_CTRL_REFCLK_EN; in tegra_pcie_port_disable()
565 afi_writel(port->pcie, value, ctrl); in tegra_pcie_port_disable()
759 u32 value; in tegra_pcie_pll_wait() local
764 value = pads_readl(pcie, soc->pads_pll_ctl); in tegra_pcie_pll_wait()
765 if (value & PADS_PLL_CTL_LOCKDET) in tegra_pcie_pll_wait()
775 u32 value; in tegra_pcie_phy_enable() local
782 value = pads_readl(pcie, PADS_CTL); in tegra_pcie_phy_enable()
783 value |= PADS_CTL_IDDQ_1L; in tegra_pcie_phy_enable()
784 pads_writel(pcie, value, PADS_CTL); in tegra_pcie_phy_enable()
790 value = pads_readl(pcie, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
791 value &= ~(PADS_PLL_CTL_REFCLK_MASK | PADS_PLL_CTL_TXCLKREF_MASK); in tegra_pcie_phy_enable()
792 value |= PADS_PLL_CTL_REFCLK_INTERNAL_CML | soc->tx_ref_sel; in tegra_pcie_phy_enable()
793 pads_writel(pcie, value, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
796 value = pads_readl(pcie, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
797 value &= ~PADS_PLL_CTL_RST_B4SM; in tegra_pcie_phy_enable()
798 pads_writel(pcie, value, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
803 value = pads_readl(pcie, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
804 value |= PADS_PLL_CTL_RST_B4SM; in tegra_pcie_phy_enable()
805 pads_writel(pcie, value, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
808 value = PADS_REFCLK_CFG_VALUE | (PADS_REFCLK_CFG_VALUE << 16); in tegra_pcie_phy_enable()
809 pads_writel(pcie, value, PADS_REFCLK_CFG0); in tegra_pcie_phy_enable()
821 value = pads_readl(pcie, PADS_CTL); in tegra_pcie_phy_enable()
822 value &= ~PADS_CTL_IDDQ_1L; in tegra_pcie_phy_enable()
823 pads_writel(pcie, value, PADS_CTL); in tegra_pcie_phy_enable()
826 value = pads_readl(pcie, PADS_CTL); in tegra_pcie_phy_enable()
827 value |= PADS_CTL_TX_DATA_EN_1L | PADS_CTL_RX_DATA_EN_1L; in tegra_pcie_phy_enable()
828 pads_writel(pcie, value, PADS_CTL); in tegra_pcie_phy_enable()
837 unsigned long value; in tegra_pcie_enable_controller() local
842 value = afi_readl(pcie, AFI_PLLE_CONTROL); in tegra_pcie_enable_controller()
843 value &= ~AFI_PLLE_CONTROL_BYPASS_PADS2PLLE_CONTROL; in tegra_pcie_enable_controller()
844 value |= AFI_PLLE_CONTROL_PADS2PLLE_CONTROL_EN; in tegra_pcie_enable_controller()
845 afi_writel(pcie, value, AFI_PLLE_CONTROL); in tegra_pcie_enable_controller()
853 value = afi_readl(pcie, AFI_PCIE_CONFIG); in tegra_pcie_enable_controller()
854 value &= ~AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_MASK; in tegra_pcie_enable_controller()
855 value |= AFI_PCIE_CONFIG_PCIE_DISABLE_ALL | pcie->xbar_config; in tegra_pcie_enable_controller()
858 value &= ~AFI_PCIE_CONFIG_PCIE_DISABLE(port->index); in tegra_pcie_enable_controller()
860 afi_writel(pcie, value, AFI_PCIE_CONFIG); in tegra_pcie_enable_controller()
863 value = afi_readl(pcie, AFI_FUSE); in tegra_pcie_enable_controller()
864 value &= ~AFI_FUSE_PCIE_T0_GEN2_DIS; in tegra_pcie_enable_controller()
865 afi_writel(pcie, value, AFI_FUSE); in tegra_pcie_enable_controller()
867 value = afi_readl(pcie, AFI_FUSE); in tegra_pcie_enable_controller()
868 value |= AFI_FUSE_PCIE_T0_GEN2_DIS; in tegra_pcie_enable_controller()
869 afi_writel(pcie, value, AFI_FUSE); in tegra_pcie_enable_controller()
886 value = afi_readl(pcie, AFI_CONFIGURATION); in tegra_pcie_enable_controller()
887 value |= AFI_CONFIGURATION_EN_FPCI; in tegra_pcie_enable_controller()
888 afi_writel(pcie, value, AFI_CONFIGURATION); in tegra_pcie_enable_controller()
890 value = AFI_INTR_EN_INI_SLVERR | AFI_INTR_EN_INI_DECERR | in tegra_pcie_enable_controller()
895 value |= AFI_INTR_EN_PRSNT_SENSE; in tegra_pcie_enable_controller()
897 afi_writel(pcie, value, AFI_AFI_INTR_ENABLE); in tegra_pcie_enable_controller()
1333 u32 value; in tegra_pcie_disable_msi() local
1336 value = afi_readl(pcie, AFI_INTR_MASK); in tegra_pcie_disable_msi()
1337 value &= ~AFI_INTR_MASK_MSI_MASK; in tegra_pcie_disable_msi()
1338 afi_writel(pcie, value, AFI_INTR_MASK); in tegra_pcie_disable_msi()
1659 u32 value; in tegra_pcie_parse_dt() local
1677 err = of_property_read_u32(port, "nvidia,num-lanes", &value); in tegra_pcie_parse_dt()
1684 if (value > 16) { in tegra_pcie_parse_dt()
1685 dev_err(pcie->dev, "invalid # of lanes: %u\n", value); in tegra_pcie_parse_dt()
1689 lanes |= value << (index << 3); in tegra_pcie_parse_dt()
1692 lane += value; in tegra_pcie_parse_dt()
1696 mask |= ((1 << value) - 1) << lane; in tegra_pcie_parse_dt()
1697 lane += value; in tegra_pcie_parse_dt()
1712 rp->lanes = value; in tegra_pcie_parse_dt()
1744 unsigned long value; in tegra_pcie_port_check_link() local
1747 value = readl(port->base + RP_PRIV_MISC); in tegra_pcie_port_check_link()
1748 value &= ~RP_PRIV_MISC_PRSNT_MAP_EP_ABSNT; in tegra_pcie_port_check_link()
1749 value |= RP_PRIV_MISC_PRSNT_MAP_EP_PRSNT; in tegra_pcie_port_check_link()
1750 writel(value, port->base + RP_PRIV_MISC); in tegra_pcie_port_check_link()
1756 value = readl(port->base + RP_VEND_XP); in tegra_pcie_port_check_link()
1758 if (value & RP_VEND_XP_DL_UP) in tegra_pcie_port_check_link()
1773 value = readl(port->base + RP_LINK_CONTROL_STATUS); in tegra_pcie_port_check_link()
1775 if (value & RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE) in tegra_pcie_port_check_link()
1896 unsigned int value; in tegra_pcie_ports_seq_show() local
1900 value = readl(port->base + RP_VEND_XP); in tegra_pcie_ports_seq_show()
1902 if (value & RP_VEND_XP_DL_UP) in tegra_pcie_ports_seq_show()
1905 value = readl(port->base + RP_LINK_CONTROL_STATUS); in tegra_pcie_ports_seq_show()
1907 if (value & RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE) in tegra_pcie_ports_seq_show()