From: Purna Chandra Mandal <purna.mandal@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 12/13] drivers: net: add Microchip PIC32 ethernet controller driver.
Date: Thu, 7 Jan 2016 10:44:45 +0530 [thread overview]
Message-ID: <568DF445.9000904@microchip.com> (raw)
In-Reply-To: <CANr=Z=Z2eqs50_A=XSqtbGhQ6v9zoLetc5cUEe57PP2Q6hietg@mail.gmail.com>
On 01/07/2016 12:11 AM, Joe Hershberger wrote:
> [...]
> +static int pic32_eth_probe(struct udevice *dev)
> +{
> + struct eth_pdata *pdata = dev_get_platdata(dev);
> + struct pic32eth_device *priv = dev_get_priv(dev);
> + void __iomem *iobase;
> + int phy_addr = 0;
> +
> +#if defined(CONFIG_PHY_ADDR)
> + phy_addr = CONFIG_PHY_ADDR;
>>> Doesn't this usually come from the device tree these days?
>> Yes, device-tree option is more meaningful. Could you please point me some reference for this?
> Eg:
> drivers/net/zynq_gem.c:682: priv->phyaddr =
> fdtdec_get_int(gd->fdt_blob, offset, "reg", -1);
Thanks. Will incorporate phy_addr into device-tree.
>>>> +#endif
>>>> + iobase = pic32_ioremap((ulong)pdata->iobase);
>>>> +
>>>> + /* initialize */
>>>> + priv->phy_addr = phy_addr;
>>>> + priv->phyif = pdata->phy_interface;
>>>> + priv->ectl_regs = (struct pic32_ectl_regs *)(iobase);
>>>> + priv->emac_regs = (struct pic32_emac_regs *)(iobase + PIC32_EMAC1CFG1);
>>>> +
>>>> + gpio_request_by_name_nodev(gd->fdt_blob, dev->of_offset,
>>>> + "reset-gpios", 0,
>>>> + &priv->rst_gpio, GPIOD_IS_OUT);
>>>> + _mdio_init(priv);
>>>> +
>>>> + return _phy_init(priv, dev);
>>>> +}
>>>>
[...]
prev parent reply other threads:[~2016-01-07 5:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 14:02 [U-Boot] [PATCH v2 12/13] drivers: net: add Microchip PIC32 ethernet controller driver Purna Chandra Mandal
2016-01-05 21:02 ` Daniel Schwierzeck
2016-01-06 11:01 ` Purna Chandra Mandal
2016-01-05 23:00 ` Joe Hershberger
2016-01-06 11:56 ` Purna Chandra Mandal
2016-01-06 18:41 ` Joe Hershberger
2016-01-07 5:14 ` Purna Chandra Mandal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=568DF445.9000904@microchip.com \
--to=purna.mandal@microchip.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox