
8 May
2024
8 May
'24
3:32 a.m.
On 5/4/24 5:03 PM, Minda Chen wrote:
Fix up the copyrights to year 2024 globally please.
[...]
+static int phy_usb3_mode_set(struct jh7110_pcie_phy *data) +{
Can this phy_usb3_mode_set and phy_pcie_mode_set be unified into single function with parameter to select usb3/pcie mode instead ?
- if (!data->stg_syscon || !data->sys_syscon) {
dev_err(data->phy->dev, "doesn't support usb3 mode\n");
return -EINVAL;
- }
- regmap_update_bits(data->stg_syscon, data->stg_pcie_mode,
PCIE_PHY_MODE_MASK, PCIE_PHY_MODE);
- regmap_update_bits(data->stg_syscon, data->stg_pcie_usb,
PCIE_USB3_BUS_WIDTH_MASK, 0);
- regmap_update_bits(data->stg_syscon, data->stg_pcie_usb,
PCIE_USB3_PHY_ENABLE, PCIE_USB3_PHY_ENABLE);
- /* Connect usb 3.0 phy mode */
- regmap_update_bits(data->sys_syscon, data->sys_phy_connect,
USB_PDRSTN_SPLIT, 0);
- /* Configuare spread-spectrum mode: down-spread-spectrum */
- writel(PCIE_USB3_PHY_ENABLE, data->regs + PCIE_USB3_PHY_PLL_CTL_OFF);
- return 0;
+}
[...]
+int jh7110_pcie_phy_probe(struct udevice *dev) +{
- struct jh7110_pcie_phy *phy = dev_get_priv(dev);
- int rc;
- phy->regs = dev_read_addr_ptr(dev);
Drop extra newline here.
- if (!phy->regs)
return -EINVAL;
[...]