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()
774 u32 value; in tegra_pcie_pll_wait() local
779 value = pads_readl(pcie, soc->pads_pll_ctl); in tegra_pcie_pll_wait()
780 if (value & PADS_PLL_CTL_LOCKDET) in tegra_pcie_pll_wait()
790 u32 value; in tegra_pcie_phy_enable() local
797 value = pads_readl(pcie, PADS_CTL); in tegra_pcie_phy_enable()
798 value |= PADS_CTL_IDDQ_1L; in tegra_pcie_phy_enable()
799 pads_writel(pcie, value, PADS_CTL); in tegra_pcie_phy_enable()
805 value = pads_readl(pcie, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
806 value &= ~(PADS_PLL_CTL_REFCLK_MASK | PADS_PLL_CTL_TXCLKREF_MASK); in tegra_pcie_phy_enable()
807 value |= PADS_PLL_CTL_REFCLK_INTERNAL_CML | soc->tx_ref_sel; in tegra_pcie_phy_enable()
808 pads_writel(pcie, value, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
811 value = pads_readl(pcie, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
812 value &= ~PADS_PLL_CTL_RST_B4SM; in tegra_pcie_phy_enable()
813 pads_writel(pcie, value, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
818 value = pads_readl(pcie, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
819 value |= PADS_PLL_CTL_RST_B4SM; in tegra_pcie_phy_enable()
820 pads_writel(pcie, value, soc->pads_pll_ctl); in tegra_pcie_phy_enable()
823 value = PADS_REFCLK_CFG_VALUE | (PADS_REFCLK_CFG_VALUE << 16); in tegra_pcie_phy_enable()
824 pads_writel(pcie, value, PADS_REFCLK_CFG0); in tegra_pcie_phy_enable()
836 value = pads_readl(pcie, PADS_CTL); in tegra_pcie_phy_enable()
837 value &= ~PADS_CTL_IDDQ_1L; in tegra_pcie_phy_enable()
838 pads_writel(pcie, value, PADS_CTL); in tegra_pcie_phy_enable()
841 value = pads_readl(pcie, PADS_CTL); in tegra_pcie_phy_enable()
842 value |= PADS_CTL_TX_DATA_EN_1L | PADS_CTL_RX_DATA_EN_1L; in tegra_pcie_phy_enable()
843 pads_writel(pcie, value, PADS_CTL); in tegra_pcie_phy_enable()
852 unsigned long value; in tegra_pcie_enable_controller() local
857 value = afi_readl(pcie, AFI_PLLE_CONTROL); in tegra_pcie_enable_controller()
858 value &= ~AFI_PLLE_CONTROL_BYPASS_PADS2PLLE_CONTROL; in tegra_pcie_enable_controller()
859 value |= AFI_PLLE_CONTROL_PADS2PLLE_CONTROL_EN; in tegra_pcie_enable_controller()
860 afi_writel(pcie, value, AFI_PLLE_CONTROL); in tegra_pcie_enable_controller()
868 value = afi_readl(pcie, AFI_PCIE_CONFIG); in tegra_pcie_enable_controller()
869 value &= ~AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_MASK; in tegra_pcie_enable_controller()
870 value |= AFI_PCIE_CONFIG_PCIE_DISABLE_ALL | pcie->xbar_config; in tegra_pcie_enable_controller()
873 value &= ~AFI_PCIE_CONFIG_PCIE_DISABLE(port->index); in tegra_pcie_enable_controller()
875 afi_writel(pcie, value, AFI_PCIE_CONFIG); in tegra_pcie_enable_controller()
878 value = afi_readl(pcie, AFI_FUSE); in tegra_pcie_enable_controller()
879 value &= ~AFI_FUSE_PCIE_T0_GEN2_DIS; in tegra_pcie_enable_controller()
880 afi_writel(pcie, value, AFI_FUSE); in tegra_pcie_enable_controller()
882 value = afi_readl(pcie, AFI_FUSE); in tegra_pcie_enable_controller()
883 value |= AFI_FUSE_PCIE_T0_GEN2_DIS; in tegra_pcie_enable_controller()
884 afi_writel(pcie, value, AFI_FUSE); in tegra_pcie_enable_controller()
901 value = afi_readl(pcie, AFI_CONFIGURATION); in tegra_pcie_enable_controller()
902 value |= AFI_CONFIGURATION_EN_FPCI; in tegra_pcie_enable_controller()
903 afi_writel(pcie, value, AFI_CONFIGURATION); in tegra_pcie_enable_controller()
905 value = AFI_INTR_EN_INI_SLVERR | AFI_INTR_EN_INI_DECERR | in tegra_pcie_enable_controller()
910 value |= AFI_INTR_EN_PRSNT_SENSE; in tegra_pcie_enable_controller()
912 afi_writel(pcie, value, AFI_AFI_INTR_ENABLE); in tegra_pcie_enable_controller()
1349 u32 value; in tegra_pcie_disable_msi() local
1352 value = afi_readl(pcie, AFI_INTR_MASK); in tegra_pcie_disable_msi()
1353 value &= ~AFI_INTR_MASK_MSI_MASK; in tegra_pcie_disable_msi()
1354 afi_writel(pcie, value, AFI_INTR_MASK); in tegra_pcie_disable_msi()
1675 u32 value; in tegra_pcie_parse_dt() local
1693 err = of_property_read_u32(port, "nvidia,num-lanes", &value); in tegra_pcie_parse_dt()
1700 if (value > 16) { in tegra_pcie_parse_dt()
1701 dev_err(pcie->dev, "invalid # of lanes: %u\n", value); in tegra_pcie_parse_dt()
1705 lanes |= value << (index << 3); in tegra_pcie_parse_dt()
1708 lane += value; in tegra_pcie_parse_dt()
1712 mask |= ((1 << value) - 1) << lane; in tegra_pcie_parse_dt()
1713 lane += value; in tegra_pcie_parse_dt()
1728 rp->lanes = value; in tegra_pcie_parse_dt()
1760 unsigned long value; in tegra_pcie_port_check_link() local
1763 value = readl(port->base + RP_PRIV_MISC); in tegra_pcie_port_check_link()
1764 value &= ~RP_PRIV_MISC_PRSNT_MAP_EP_ABSNT; in tegra_pcie_port_check_link()
1765 value |= RP_PRIV_MISC_PRSNT_MAP_EP_PRSNT; in tegra_pcie_port_check_link()
1766 writel(value, port->base + RP_PRIV_MISC); in tegra_pcie_port_check_link()
1772 value = readl(port->base + RP_VEND_XP); in tegra_pcie_port_check_link()
1774 if (value & RP_VEND_XP_DL_UP) in tegra_pcie_port_check_link()
1789 value = readl(port->base + RP_LINK_CONTROL_STATUS); in tegra_pcie_port_check_link()
1791 if (value & RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE) in tegra_pcie_port_check_link()
1913 unsigned int value; in tegra_pcie_ports_seq_show() local
1917 value = readl(port->base + RP_VEND_XP); in tegra_pcie_ports_seq_show()
1919 if (value & RP_VEND_XP_DL_UP) in tegra_pcie_ports_seq_show()
1922 value = readl(port->base + RP_LINK_CONTROL_STATUS); in tegra_pcie_ports_seq_show()
1924 if (value & RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE) in tegra_pcie_ports_seq_show()