From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 12/14] net: gem: Move driver to DM
Date: Wed, 2 Dec 2015 14:51:04 +0100 [thread overview]
Message-ID: <565EF748.2080206@xilinx.com> (raw)
In-Reply-To: <CAEUhbmV42EAsGkHhNVeCSjur3GPFrC9aaje1oZX75SEVBNb6Aw@mail.gmail.com>
On 2.12.2015 14:16, Bin Meng wrote:
> Hi Michal,
>
> On Wed, Dec 2, 2015 at 7:36 PM, Michal Simek <michal.simek@xilinx.com> wrote:
...
>> +
>> + offset = fdtdec_lookup_phandle(gd->fdt_blob, dev->of_offset,
>> + "phy-handle");
>> + if (offset > 0)
>> + priv->phyaddr = fdtdec_get_int(gd->fdt_blob, offset, "reg", 0);
>
> I don't see where is this priv->phyaddr used in this driver?
phy_detection function called from zynq_phy_init/
>
>>
>> - return 1;
>> + printf("ZYNQ GEM: %lx, phyaddr %d\n", (ulong)priv->iobase,
>> + priv->phyaddr);
>> +
>> + return 0;
>> }
>> +
>> +static const struct udevice_id zynq_gem_ids[] = {
>> + { .compatible = "cdns,zynqmp-gem" },
>> + { .compatible = "cdns,zynq-gem" },
>> + { .compatible = "cdns,gem" },
>> + { }
>> +};
>> +
>> +U_BOOT_DRIVER(zynq_gem) = {
>> + .name = "zynq_gem",
>> + .id = UCLASS_ETH,
>> + .of_match = zynq_gem_ids,
>> + .ofdata_to_platdata = zynq_gem_ofdata_to_platdata,
>> + .probe = zynq_gem_probe,
>
> Please add .remove function, otherwise there will be memory leak when
> removing the device. See designware.c for example.
No problem to do it. It will be almost c&p from that driver.
Do we have any way how to detect these leaks?
I have never tried to remove devices. How to do it?
Thanks,
Michal
next prev parent reply other threads:[~2015-12-02 13:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 11:36 [U-Boot] [PATCH v2 01/14] ARM: zynq: Remove PHYLIB from config to defconfig Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 02/14] ARM: zynq: Remove CONFIG_API Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 03/14] net: gem: Do not continue if phy is not found Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 04/14] net: gem: Change mdio_wait prototype to pass regs Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 05/14] net: gem: Change mii function not to use eth_device structure Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 06/14] net: gem: Remove phydev variable Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 07/14] net: gem: Extract phy init code Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 08/14] net: gem: Check if priv->phydev is valid Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 09/14] net: gem: Enable MDIO bus earlier Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 10/14] net: gem: Remove zynq_gem_of_init() Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 11/14] net: gem: Fix miiphy_read name Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 12/14] net: gem: Move driver to DM Michal Simek
2015-12-02 13:16 ` Bin Meng
2015-12-02 13:51 ` Michal Simek [this message]
2015-12-03 5:00 ` Bin Meng
2015-12-03 18:56 ` Simon Glass
2015-12-02 11:36 ` [U-Boot] [PATCH v2 13/14] net: gem: Read information about interface from DT Michal Simek
2015-12-02 11:36 ` [U-Boot] [PATCH v2 14/14] net: gem: Move gem to Kconfig Michal Simek
2015-12-15 17:40 ` [U-Boot] [PATCH v2 01/14] ARM: zynq: Remove PHYLIB from config to defconfig Joe Hershberger
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=565EF748.2080206@xilinx.com \
--to=michal.simek@xilinx.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