From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 04/18] net: mdio: Add private MDIO read/write function
Date: Thu, 14 Aug 2014 09:57:32 -0700 [thread overview]
Message-ID: <53ECEA7C.7030007@freescale.com> (raw)
In-Reply-To: <1407998707-9632-5-git-send-email-b18965@freescale.com>
On 08/13/2014 11:44 PM, Alison Wang wrote:
> As extra FPGA settings is needed for MDIO read/write
> on LS1021AQDS, private MDIO read/write functions are
> created.
>
> Signed-off-by: Alison Wang <alison.wang@freescale.com>
> ---
> Change log:
> v4: No change.
> v3: Split from the 0004-arm-ls102xa-Add-etsec-support-for-LS102xA patch.
> v2: Add private mdio read and write support.
>
> drivers/net/fsl_mdio.c | 9 +++++++--
> include/fsl_mdio.h | 4 ++++
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/fsl_mdio.c b/drivers/net/fsl_mdio.c
> index 8d09f5d..6eae78f 100644
> --- a/drivers/net/fsl_mdio.c
> +++ b/drivers/net/fsl_mdio.c
> @@ -98,8 +98,13 @@ int fsl_pq_mdio_init(bd_t *bis, struct fsl_pq_mdio_info *info)
> return -1;
> }
>
> - bus->read = tsec_phy_read;
> - bus->write = tsec_phy_write;
> + if (info->priv_mdio_read) {
> + bus->read = info->priv_mdio_read;
> + bus->write = info->priv_mdio_write;
> + } else {
> + bus->read = tsec_phy_read;
> + bus->write = tsec_phy_write;
> + }
> bus->reset = fsl_pq_mdio_reset;
> sprintf(bus->name, info->name);
>
> diff --git a/include/fsl_mdio.h b/include/fsl_mdio.h
> index a531edf..633123c 100644
> --- a/include/fsl_mdio.h
> +++ b/include/fsl_mdio.h
> @@ -57,6 +57,10 @@ int memac_mdio_read(struct mii_dev *bus, int port_addr, int dev_addr,
> struct fsl_pq_mdio_info {
> struct tsec_mii_mng __iomem *regs;
> char *name;
> + int (*priv_mdio_read)(struct mii_dev *bus, int addr,
> + int devad, int reg);
> + int (*priv_mdio_write)(struct mii_dev *bus, int addr, int devad,
> + int reg, u16 val);
> };
> int fsl_pq_mdio_init(bd_t *bis, struct fsl_pq_mdio_info *info);
>
>
Alison,
Please check if Shaohui's comment on your v3 patch is valid. He suggested you
don't need to add a new private functions.
York
next prev parent reply other threads:[~2014-08-14 16:57 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-14 6:44 [U-Boot] [PATCH v4 0/18] arm: ls102xa: Add Freescale LS102xA SoC and LS1021AQDS/TWR board support Alison Wang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 01/18] arm: ls102xa: Add Freescale LS102xA SoC support Alison Wang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 02/18] ls102xa: i2c: Add i2c support for LS102xA Alison Wang
2014-08-14 17:04 ` York Sun
2014-08-15 14:33 ` AlisonWang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 03/18] net: Merge asm/fsl_enet.h into fsl_mdio.h Alison Wang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 04/18] net: mdio: Add private MDIO read/write function Alison Wang
2014-08-14 16:57 ` York Sun [this message]
2014-08-15 14:29 ` AlisonWang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 05/18] net: mdio: Use mb() to be compatible for both ARM and PowerPC Alison Wang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 06/18] ls102xa: etsec: Add etsec support for LS102xA Alison Wang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 07/18] ls102xa: esdhc: Add esdhc " Alison Wang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 08/18] driver/ddr/freescale: Add support of accumulate ECC Alison Wang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 09/18] driver/ddr/freescale: Fix DDR3 driver for ARM Alison Wang
2014-08-14 6:44 ` [U-Boot] [PATCH v4 10/18] driver/ddr/fsl: Add support of overriding chip select write leveling Alison Wang
2014-08-14 6:45 ` [U-Boot] [PATCH v4 11/18] arm: ls102xa: Add basic support for LS1021AQDS board Alison Wang
2014-08-14 6:45 ` [U-Boot] [PATCH v4 12/18] arm: ls102xa: Add basic support for LS1021ATWR board Alison Wang
2014-08-14 6:45 ` [U-Boot] [PATCH v4 13/18] net: tsec: Remove tx snooping support from LS1 Alison Wang
2014-08-14 6:45 ` [U-Boot] [PATCH v4 14/18] serial: lpuart: add 32-bit registers lpuart support Alison Wang
2014-08-14 6:45 ` [U-Boot] [PATCH v4 15/18] arm: ls102xa: Add LETECH support for LS1021AQDS/TWR board Alison Wang
2014-08-14 17:19 ` York Sun
2014-08-15 14:44 ` AlisonWang
2014-08-14 6:45 ` [U-Boot] [PATCH v4 16/18] video: dcu: Add Sii9022A HDMI Transmitter support Alison Wang
2014-08-14 17:17 ` York Sun
2014-08-15 14:42 ` AlisonWang
2014-08-14 6:45 ` [U-Boot] [PATCH v4 17/18] video: dcu: Add DCU driver support Alison Wang
2014-08-14 6:45 ` [U-Boot] [PATCH v4 18/18] ls102xa: dcu: Add platform support for DCU on LS1021ATWR board Alison Wang
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=53ECEA7C.7030007@freescale.com \
--to=yorksun@freescale.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