Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1473512 > unrolled thread
| Started by | Heiko Stübner <heiko@sntech.de> |
|---|---|
| First post | 2016-08-31 16:10 +0200 |
| Last post | 2016-09-01 07:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v5 2/2] phy: add a driver for the Rockchip SoC internal PCIe PHY Heiko Stübner <heiko@sntech.de> - 2016-08-31 16:10 +0200
Re: [PATCH v5 2/2] phy: add a driver for the Rockchip SoC internal PCIe PHY Kishon Vijay Abraham I <kishon@ti.com> - 2016-09-01 07:10 +0200
| From | Heiko Stübner <heiko@sntech.de> |
|---|---|
| Date | 2016-08-31 16:10 +0200 |
| Subject | Re: [PATCH v5 2/2] phy: add a driver for the Rockchip SoC internal PCIe PHY |
| Message-ID | <sceng-3nc-35@gated-at.bofh.it> |
Hi,
Am Samstag, 20. August 2016, 10:53:37 schrieb Shawn Lin:
> This patch to add a generic PHY driver for rockchip PCIe PHY.
> Access the PHY via registers provided by GRF (general register
> files) module.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
seems I'm late to the party, but when looking if I can apply the pcie-
devicetree patches, I found that the phy is still pending.
Apart from some error-message nitpicks below, this looks ok to me. I don't
know enough about the actual pci phy part though.
Kishon, is this on your radar?
[...]
> +static int rockchip_pcie_phy_power_off(struct phy *phy)
> +{
> + struct rockchip_pcie_phy *rk_phy = phy_get_drvdata(phy);
> + int err = 0;
> +
> + err = reset_control_assert(rk_phy->phy_rst);
> + if (err) {
> + pr_err("assert phy_rst err %d\n", err);
dev_err(phy->dev, ...)
probably the same for all other pr_err invocations
> + return err;
> + }
> +
> + return 0;
> +}
[...]
> +static const struct of_device_id rockchip_pcie_phy_dt_ids[] = {
> + {
> + .compatible = "rockchip,rk3399-pcie-phy",
> + .data = &rk3399_pcie_data,
> + },
> + {}
> +};
> +
> +MODULE_DEVICE_TABLE(of, rockchip_pcie_phy_dt_ids);
> +
> +static int rockchip_pcie_phy_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct rockchip_pcie_phy *rk_phy;
> + struct phy *generic_phy;
> + struct phy_provider *phy_provider;
> + struct regmap *grf;
> + const struct of_device_id *of_id;
> +
> + grf = syscon_node_to_regmap(dev->parent->of_node);
> + if (IS_ERR(grf)) {
> + dev_err(dev, "Missing rockchip,grf property\n");
dev_err(dev, "Cannot find GRF syscon\n");
Heiko
[toc] | [next] | [standalone]
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2016-09-01 07:10 +0200 |
| Subject | Re: [PATCH v5 2/2] phy: add a driver for the Rockchip SoC internal PCIe PHY |
| Message-ID | <scsqd-44S-3@gated-at.bofh.it> |
| In reply to | #1473512 |
On Wednesday 31 August 2016 07:38 PM, Heiko Stübner wrote:
> Hi,
>
> Am Samstag, 20. August 2016, 10:53:37 schrieb Shawn Lin:
>> This patch to add a generic PHY driver for rockchip PCIe PHY.
>> Access the PHY via registers provided by GRF (general register
>> files) module.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>
> seems I'm late to the party, but when looking if I can apply the pcie-
> devicetree patches, I found that the phy is still pending.
>
> Apart from some error-message nitpicks below, this looks ok to me. I don't
> know enough about the actual pci phy part though.
>
> Kishon, is this on your radar?
yes.. can the nipicks be fixed and posted asap?
Thanks
Kishon
>
> [...]
>
>> +static int rockchip_pcie_phy_power_off(struct phy *phy)
>> +{
>> + struct rockchip_pcie_phy *rk_phy = phy_get_drvdata(phy);
>> + int err = 0;
>> +
>> + err = reset_control_assert(rk_phy->phy_rst);
>> + if (err) {
>> + pr_err("assert phy_rst err %d\n", err);
>
> dev_err(phy->dev, ...)
>
> probably the same for all other pr_err invocations
>
>
>> + return err;
>> + }
>> +
>> + return 0;
>> +}
>
> [...]
>
>> +static const struct of_device_id rockchip_pcie_phy_dt_ids[] = {
>> + {
>> + .compatible = "rockchip,rk3399-pcie-phy",
>> + .data = &rk3399_pcie_data,
>> + },
>> + {}
>> +};
>> +
>> +MODULE_DEVICE_TABLE(of, rockchip_pcie_phy_dt_ids);
>> +
>> +static int rockchip_pcie_phy_probe(struct platform_device *pdev)
>> +{
>> + struct device *dev = &pdev->dev;
>> + struct rockchip_pcie_phy *rk_phy;
>> + struct phy *generic_phy;
>> + struct phy_provider *phy_provider;
>> + struct regmap *grf;
>> + const struct of_device_id *of_id;
>> +
>> + grf = syscon_node_to_regmap(dev->parent->of_node);
>> + if (IS_ERR(grf)) {
>> + dev_err(dev, "Missing rockchip,grf property\n");
>
> dev_err(dev, "Cannot find GRF syscon\n");
>
>
> Heiko
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web