Add support for max_link_speed specified in the PCI DT binding.
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
[eugen.hristev@collabora.com: port to latest API, set default correctly,
align to 80 chars]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
[jonas@kwiboo.se: switch to dev_read_u32_default]
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
struct clk_bulk clks;
struct reset_ctl_bulk rsts;
struct gpio_desc rst_gpio;
+ u32 gen;
};
/* Parameters for the waiting for iATU enabled routine */
rk_pcie_writel_apb(priv, 0x0, 0xf00040);
pcie_dw_setup_host(&priv->dw);
- ret = rk_pcie_link_up(priv, LINK_SPEED_GEN_3);
+ ret = rk_pcie_link_up(priv, priv->gen);
if (ret < 0)
goto err_link_up;
goto rockchip_pcie_parse_dt_err_phy_get_by_index;
}
+ priv->gen = dev_read_u32_default(dev, "max-link-speed",
+ LINK_SPEED_GEN_3);
+
return 0;
rockchip_pcie_parse_dt_err_phy_get_by_index: