Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/404760/?format=api
{ "id": 404760, "url": "http://patchwork.ozlabs.org/api/patches/404760/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1414607903-3079-1-git-send-email-ivan.khoronzhuk@ti.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1414607903-3079-1-git-send-email-ivan.khoronzhuk@ti.com>", "list_archive_url": null, "date": "2014-10-29T18:38:23", "name": "[U-Boot,U-boot] net: phy: marvell: add errata w/a for 88E151* chips", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "8c3a136a56e4bd400894665c3fee403ca2e9636e", "submitter": { "id": 46094, "url": "http://patchwork.ozlabs.org/api/people/46094/?format=api", "name": "Ivan Khoronzhuk", "email": "ivan.khoronzhuk@ti.com" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1414607903-3079-1-git-send-email-ivan.khoronzhuk@ti.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/404760/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/404760/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Received": [ "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 02A0814007D\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 30 Oct 2014 05:38:44 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 784A84BA21;\n\tWed, 29 Oct 2014 19:38:41 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id geBCVJ0AbIbm; Wed, 29 Oct 2014 19:38:41 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 0A9064BA1D;\n\tWed, 29 Oct 2014 19:38:41 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 890A24BA1D\n\tfor <u-boot@lists.denx.de>; Wed, 29 Oct 2014 19:38:36 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id bR9F5E1q5t2r for <u-boot@lists.denx.de>;\n\tWed, 29 Oct 2014 19:38:36 +0100 (CET)", "from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152])\n\tby theia.denx.de (Postfix) with ESMTPS id 249954BA1C\n\tfor <u-boot@lists.denx.de>; Wed, 29 Oct 2014 19:38:32 +0100 (CET)", "from dlelxv90.itg.ti.com ([172.17.2.17])\n\tby comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9TIcU7D026104\n\tfor <u-boot@lists.denx.de>; Wed, 29 Oct 2014 13:38:30 -0500", "from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113])\n\tby dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9TIcUQS028846\n\tfor <u-boot@lists.denx.de>; Wed, 29 Oct 2014 13:38:30 -0500", "from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com\n\t(157.170.170.113) with Microsoft SMTP Server id 14.3.174.1;\n\tWed, 29 Oct 2014 13:38:29 -0500", "from khorivan.itg.ti.com (incasgf5a_e1_2.itg.ti.com\n\t[10.167.216.36])\n\tby dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9TIcQSE024402;\n\tWed, 29 Oct 2014 13:38:27 -0500" ], "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)", "From": "Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>", "To": "<trini@ti.com>, <u-boot@lists.denx.de>", "Date": "Wed, 29 Oct 2014 20:38:23 +0200", "Message-ID": "<1414607903-3079-1-git-send-email-ivan.khoronzhuk@ti.com>", "X-Mailer": "git-send-email 1.8.3.2", "MIME-Version": "1.0", "Cc": "Hao Zhang <hzhang@ti.com>", "Subject": "[U-Boot] [U-boot] [Patch] net: phy: marvell: add errata w/a for\n\t88E151* chips", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.13", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<http://lists.denx.de/mailman/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "u-boot-bounces@lists.denx.de", "Errors-To": "u-boot-bounces@lists.denx.de" }, "content": "From: Hao Zhang <hzhang@ti.com>\n\nAs per Marvell Release Notes - Alaska 88E1510/88E1518/88E1512/88E1514\nRev A0, Errata Section 3.1 Marvell PHY has an errata which requires\nthat certain registers get written in order to restart\nautonegotiation.\n\nSigned-off-by: Hao Zhang <hzhang@ti.com>\nSigned-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>\n---\n drivers/net/phy/marvell.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 50 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c\nindex d2ecadc..425db94 100644\n--- a/drivers/net/phy/marvell.c\n+++ b/drivers/net/phy/marvell.c\n@@ -276,6 +276,55 @@ static int m88e1111s_config(struct phy_device *phydev)\n \treturn 0;\n }\n \n+/**\n+ * m88e1518_phy_writebits - write bits to a register\n+ */\n+void m88e1518_phy_writebits(struct phy_device *phydev,\n+\t\t u8 reg_num, u16 offset, u16 len, u16 data)\n+{\n+\tu16 reg, mask;\n+\n+\tif ((len + offset) >= 16)\n+\t\tmask = 0 - (1 << offset);\n+\telse\n+\t\tmask = (1 << (len + offset)) - (1 << offset);\n+\n+\treg = phy_read(phydev, MDIO_DEVAD_NONE, reg_num);\n+\n+\treg &= ~mask;\n+\treg |= data << offset;\n+\n+\tphy_write(phydev, MDIO_DEVAD_NONE, reg_num, reg);\n+}\n+\n+static int m88e1518_config(struct phy_device *phydev)\n+{\n+\t/*\n+\t * As per Marvell Release Notes - Alaska 88E1510/88E1518/88E1512/88E1514\n+\t * Rev A0, Errata Section 3.1\n+\t */\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 22, 0x00ff);\t/* reg page 0xff */\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 17, 0x214B);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 16, 0x2144);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 17, 0x0C28);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 16, 0x2146);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 17, 0xB233);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 16, 0x214D);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 17, 0xCC0C);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 16, 0x2159);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 22, 0x0000);\t/* reg page 0 */\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 22, 18);\t/* reg page 18 */\n+\t/* Write HWCFG_MODE = SGMII to Copper */\n+\tm88e1518_phy_writebits(phydev, 20, 0, 3, 1);\n+\n+\t/* Phy reset */\n+\tm88e1518_phy_writebits(phydev, 20, 15, 1, 1);\n+\tphy_write(phydev, MDIO_DEVAD_NONE, 22, 0);\t/* reg page 18 */\n+\tudelay(100);\n+\n+\treturn m88e1111s_config(phydev);\n+}\n+\n /* Marvell 88E1118 */\n static int m88e1118_config(struct phy_device *phydev)\n {\n@@ -493,7 +542,7 @@ static struct phy_driver M88E1518_driver = {\n \t.uid = 0x1410dd1,\n \t.mask = 0xffffff0,\n \t.features = PHY_GBIT_FEATURES,\n-\t.config = &m88e1111s_config,\n+\t.config = &m88e1518_config,\n \t.startup = &m88e1011s_startup,\n \t.shutdown = &genphy_shutdown,\n };\n", "prefixes": [ "U-Boot", "U-boot" ] }