lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Oct 2015 17:55:07 -0500
From:	Rob Herring <robh+dt@...nel.org>
To:	WingMan Kwok <w-kwok2@...com>
Cc:	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Kishon Vijay Abraham I <kishon@...com>,
	Roger Quadros <rogerq@...com>,
	Murali Karicheri <m-karicheri2@...com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Santosh Shilimkar <ssantosh@...nel.org>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3 1/2] phy: keystone: serdes driver for gbe 10gbe and pcie

On Wed, Oct 21, 2015 at 7:56 AM, WingMan Kwok <w-kwok2@...com> wrote:
> On TI's Keystone platforms, several peripherals such as the
> gbe ethernet switch, 10gbe ethernet switch and PCIe controller
> require the use of a SerDes for converting SoC parallel data into
> serialized data that can be output over a high-speed electrical
> interface, and also converting high-speed serial input data
> into parallel data that can be processed by the SoC.  The
> SerDeses used by those peripherals, though they may be different,
> are largely similar in functionality and setup.
>
> This patch provides a SerDes phy driver implementation that can be
> used by the above mentioned peripheral drivers to configure their
> respective SerDeses.
>
> Signed-off-by: WingMan Kwok <w-kwok2@...com>
> ---
>  Documentation/devicetree/bindings/phy/ti-phy.txt |  239 +++

For the binding:

Acked-by: Rob Herring <robh@...nel.org>


One other comment:

> +       if (of_device_is_compatible(np, "ti,keystone-serdes-gbe")) {
> +               sc->phy_type = KSERDES_PHY_SGMII;
> +       } else if (of_device_is_compatible(np, "ti,keystone-serdes-xgbe")) {
> +               sc->phy_type = KSERDES_PHY_XGE;
> +       } else if (of_device_is_compatible(np, "ti,keystone-serdes-pcie")) {
> +               sc->phy_type = KSERDES_PHY_PCIE;
> +       } else {
> +               dev_err(dev, "unknown phy type\n");
> +               return -EINVAL;
> +       }

Use the match data to set the type:

> +static const struct of_device_id kserdes_of_match[] = {
> +       { .compatible = "ti,keystone-serdes-gbe" },
> +       { .compatible = "ti,keystone-serdes-pcie" },
> +       { .compatible = "ti,keystone-serdes-xgbe" },
> +       { },
> +};
> +MODULE_DEVICE_TABLE(of, kserdes_of_match);

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ