From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4] net/phy: Add support for CS4315/CS4340 PHY
Date: Thu, 15 May 2014 10:27:49 -0500 [thread overview]
Message-ID: <5374DCF5.1060406@freescale.com> (raw)
In-Reply-To: <1397204058-7568-2-git-send-email-Shengzhou.Liu@freescale.com>
On 04/11/2014 03:14 AM, Shengzhou Liu wrote:
> Add support for Cortina CS4315/CS4340 10G PHY.
> - This driver loads CS43xx firmware to initialize Cortina PHY.
> - To define macro CONFIG_PHY_CORTINA will enable this driver.
> - Cortina PHY has non-standard offset of PHY ID registers, so
> define own get_phy_id().
>
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> ---
> v4: add support for loading cortina phy ucode from NAND/SPI/SD/REMOTE
> v3: move devad as '0' in cortina.c instead of in phy.c
> v2: no change.
>
> drivers/net/phy/Makefile | 1 +
> drivers/net/phy/cortina.c | 320 ++++++++++++++++++++++++++++++++++++++++++++++
> drivers/net/phy/phy.c | 3 +
> include/cortina.h | 73 +++++++++++
> include/phy.h | 2 +
> 5 files changed, 399 insertions(+)
> create mode 100644 drivers/net/phy/cortina.c
> create mode 100644 include/cortina.h
>
<snip>
> +void cs4340_upload_firmware(struct phy_device *phydev)
> +{
> + char line_temp[0x50] = {0};
> + char reg_addr[0x50] = {0};
> + char reg_data[0x50] = {0};
> + int i = 0;
> + int line_cnt = 0;
> + int column_cnt = 0;
> + struct cortina_reg_config fw_temp;
> + char *addr = NULL;
> +
> +#if defined(CONFIG_SYS_CORTINA_FW_IN_NOR) || \
> + defined(CONFIG_SYS_CORTINA_FW_IN_REMOTE)
> +
> + addr = (char *)CONFIG_CORTINA_FW_ADDR;
> +#elif defined(CONFIG_SYS_CORTINA_FW_IN_NAND)
> + size_t fw_length = CONFIG_CORTINA_FW_LENGTH;
> +
> + addr = malloc(CONFIG_CORTINA_FW_LENGTH);
> + rc = nand_read(&nand_info[0], (loff_t)CONFIG_CORTINA_FW_ADDR,
> + &fw_length, (u_char *)addr);
> + if (rc == -EUCLEAN) {
> + printf("NAND read of Cortina firmware at 0x%x failed %d\n",
> + CONFIG_CORTINA_FW_ADDR, rc);
> + }
Where is "rc" declared?
York
next prev parent reply other threads:[~2014-05-15 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 8:14 [U-Boot] [PATCH 1/2 v4] net/phy: enable get_phy_id redefinable Shengzhou Liu
2014-04-11 8:14 ` [U-Boot] [PATCH v4] net/phy: Add support for CS4315/CS4340 PHY Shengzhou Liu
2014-05-15 15:27 ` York Sun [this message]
2014-05-13 1:51 ` [U-Boot] [U-Boot, 1/2, v4] net/phy: enable get_phy_id redefinable Tom Rini
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=5374DCF5.1060406@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.