Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/405103/?format=api
{ "id": 405103, "url": "http://patchwork.ozlabs.org/api/patches/405103/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1414688383-26420-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": "<1414688383-26420-1-git-send-email-ivan.khoronzhuk@ti.com>", "list_archive_url": null, "date": "2014-10-30T16:59:43", "name": "[U-Boot,U-boot,v2] net: phy: marvell: add errata w/a for 88E151* chips", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "eb5e68df8e08d39e4bfcaca1679a4845e34d0c2b", "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/1414688383-26420-1-git-send-email-ivan.khoronzhuk@ti.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/405103/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/405103/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 3B2751400A0\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 31 Oct 2014 04:00:08 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id C568C4BB0F;\n\tThu, 30 Oct 2014 18:00:06 +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 6cyHsbrnsrQH; Thu, 30 Oct 2014 18:00:06 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id D05C84BB03;\n\tThu, 30 Oct 2014 18:00:05 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id C18724BB03\n\tfor <u-boot@lists.denx.de>; Thu, 30 Oct 2014 18:00:00 +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 T-LFmqcYwArC for <u-boot@lists.denx.de>;\n\tThu, 30 Oct 2014 18:00:00 +0100 (CET)", "from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41])\n\tby theia.denx.de (Postfix) with ESMTPS id 697264BB01\n\tfor <u-boot@lists.denx.de>; Thu, 30 Oct 2014 17:59:56 +0100 (CET)", "from dlelxv90.itg.ti.com ([172.17.2.17])\n\tby bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9UGxn5C026293;\n\tThu, 30 Oct 2014 11:59:50 -0500", "from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110])\n\tby dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9UGxn3K007014; \n\tThu, 30 Oct 2014 11:59:49 -0500", "from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com\n\t(128.247.5.110) with Microsoft SMTP Server id 14.3.174.1;\n\tThu, 30 Oct 2014 11:59:49 -0500", "from khorivan.synapse.com (incasgf5a_e1_2.itg.ti.com\n\t[10.167.216.36])\tby dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id\n\ts9UGxkBF004257;\tThu, 30 Oct 2014 11:59:47 -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": "Thu, 30 Oct 2014 18:59:43 +0200", "Message-ID": "<1414688383-26420-1-git-send-email-ivan.khoronzhuk@ti.com>", "X-Mailer": "git-send-email 1.8.3.2", "MIME-Version": "1.0", "Cc": "sr@denx.de, Hao Zhang <hzhang@ti.com>", "Subject": "[U-Boot] [U-boot] [Patch v2] 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\nv2..v1\n\tuse only for SGMII interface.\n\n drivers/net/phy/marvell.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 52 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c\nindex d2ecadc..9437c3b 100644\n--- a/drivers/net/phy/marvell.c\n+++ b/drivers/net/phy/marvell.c\n@@ -276,6 +276,57 @@ 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\n+\t * /88E1514 Rev A0, Errata Section 3.1\n+\t */\n+\tif (phydev->interface == PHY_INTERFACE_MODE_SGMII) {\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 22, 0x00ff);\t/* page 0xff */\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 17, 0x214B);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 16, 0x2144);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 17, 0x0C28);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 16, 0x2146);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 17, 0xB233);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 16, 0x214D);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 17, 0xCC0C);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 16, 0x2159);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 22, 0x0000);\t/* reg page 0 */\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 22, 18); /* reg page 18 */\n+\t\t/* Write HWCFG_MODE = SGMII to Copper */\n+\t\tm88e1518_phy_writebits(phydev, 20, 0, 3, 1);\n+\n+\t\t/* Phy reset */\n+\t\tm88e1518_phy_writebits(phydev, 20, 15, 1, 1);\n+\t\tphy_write(phydev, MDIO_DEVAD_NONE, 22, 0); /* reg page 18 */\n+\t\tudelay(100);\n+\t}\n+\n+\treturn m88e1111s_config(phydev);\n+}\n+\n /* Marvell 88E1118 */\n static int m88e1118_config(struct phy_device *phydev)\n {\n@@ -493,7 +544,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", "v2" ] }