Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/799651/?format=api
{ "id": 799651, "url": "http://patchwork.ozlabs.org/api/1.2/patches/799651/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1502248361-7953-4-git-send-email-william.wu@rock-chips.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<1502248361-7953-4-git-send-email-william.wu@rock-chips.com>", "list_archive_url": null, "date": "2017-08-09T03:12:41", "name": "[U-Boot,3/3] rockchip: evb-rv1108: add usb init function for dwc2 gadget", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0e65828830e51ac8caefb0553914dcd424591c16", "submitter": { "id": 69388, "url": "http://patchwork.ozlabs.org/api/1.2/people/69388/?format=api", "name": "William Wu", "email": "william.wu@rock-chips.com" }, "delegate": { "id": 69486, "url": "http://patchwork.ozlabs.org/api/1.2/users/69486/?format=api", "username": "ptomsich", "first_name": "Philipp", "last_name": "Tomsich", "email": "philipp.tomsich@theobroma-systems.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1502248361-7953-4-git-send-email-william.wu@rock-chips.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/799651/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/799651/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", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xS7RZ4kMNz9sNc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 9 Aug 2017 20:53:46 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 53734C21EE5; Wed, 9 Aug 2017 10:52:08 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 51869C21E34;\n\tWed, 9 Aug 2017 10:51:06 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 7A362C21C3E; Wed, 9 Aug 2017 03:12:57 +0000 (UTC)", "from regular1.263xmail.com (regular1.263xmail.com [211.150.99.140])\n\tby lists.denx.de (Postfix) with ESMTPS id 2841CC21C2F\n\tfor <u-boot@lists.denx.de>; Wed, 9 Aug 2017 03:12:56 +0000 (UTC)", "from william.wu?rock-chips.com (unknown [192.168.167.193])\n\tby regular1.263xmail.com (Postfix) with ESMTP id E53F74CE5;\n\tWed, 9 Aug 2017 11:12:51 +0800 (CST)", "from localhost.localdomain (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id EF5AD36E;\n\tWed, 9 Aug 2017 11:12:50 +0800 (CST)", "from unknown (unknown [58.22.7.114])\n\tby smtp.263.net (Postfix) whith SMTP id 4176YLPQ0M;\n\tWed, 09 Aug 2017 11:12:52 +0800 (CST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE\n\tautolearn=unavailable autolearn_force=no version=3.4.0", "X-263anti-spam": "KSV:0;", "X-MAIL-GRAY": "0", "X-MAIL-DELIVERY": "1", "X-KSVirus-check": "0", "X-ABS-CHECKED": "4", "X-RL-SENDER": "william.wu@rock-chips.com", "X-FST-TO": "sjg@chromium.org", "X-SENDER-IP": "58.22.7.114", "X-LOGIN-NAME": "william.wu@rock-chips.com", "X-UNIQUE-TAG": "<f5a691950b862b5c00d5311b4844ed1d>", "X-ATTACHMENT-NUM": "0", "X-SENDER": "wulf@rock-chips.com", "X-DNS-TYPE": "0", "From": "William Wu <william.wu@rock-chips.com>", "To": "sjg@chromium.org, philipp.tomsich@theobroma-systems.com,\n\tandy.yan@rock-chips.com", "Date": "Wed, 9 Aug 2017 11:12:41 +0800", "Message-Id": "<1502248361-7953-4-git-send-email-william.wu@rock-chips.com>", "X-Mailer": "git-send-email 2.0.0", "In-Reply-To": "<1502248361-7953-1-git-send-email-william.wu@rock-chips.com>", "References": "<1502248361-7953-1-git-send-email-william.wu@rock-chips.com>", "X-Mailman-Approved-At": "Wed, 09 Aug 2017 10:51:00 +0000", "Cc": "huangtao@rock-chips.com, albert.u.boot@aribaud.net,\n\tfrank.wang@rock-chips.com, u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH 3/3] rockchip: evb-rv1108: add usb init function\n\tfor dwc2 gadget", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/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": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "This patch implements board_usb_init() for dwc2 gadget, it\ngenerally called from do_fastboot to do dwc2 udc probe and\nsupport fastboot over USB.\n\nSigned-off-by: William Wu <william.wu@rock-chips.com>\n---\n board/rockchip/evb_rv1108/evb_rv1108.c | 47 ++++++++++++++++++++++++++++++++++\n 1 file changed, 47 insertions(+)", "diff": "diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c\nindex fe37eac..8ca5ee6 100644\n--- a/board/rockchip/evb_rv1108/evb_rv1108.c\n+++ b/board/rockchip/evb_rv1108/evb_rv1108.c\n@@ -50,3 +50,50 @@ int dram_init_banksize(void)\n \n \treturn 0;\n }\n+\n+#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)\n+#include <usb.h>\n+#include <usb/dwc2_udc.h>\n+\n+static struct dwc2_plat_otg_data rv1108_otg_data = {\n+\t.rx_fifo_sz\t= 512,\n+\t.np_tx_fifo_sz\t= 16,\n+\t.tx_fifo_sz\t= 128,\n+};\n+\n+int board_usb_init(int index, enum usb_init_type init)\n+{\n+\tint node;\n+\tconst char *mode;\n+\tbool matched = false;\n+\tconst void *blob = gd->fdt_blob;\n+\n+\t/* find the usb_otg node */\n+\tnode = fdt_node_offset_by_compatible(blob, -1,\n+\t\t\t\t\t\"rockchip,rv1108-usb\");\n+\n+\twhile (node > 0) {\n+\t\tmode = fdt_getprop(blob, node, \"dr_mode\", NULL);\n+\t\tif (mode && strcmp(mode, \"otg\") == 0) {\n+\t\t\tmatched = true;\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tnode = fdt_node_offset_by_compatible(blob, node,\n+\t\t\t\t\t\"rockchip,rv1108-usb\");\n+\t}\n+\tif (!matched) {\n+\t\tdebug(\"Not found usb_otg device\\n\");\n+\t\treturn -ENODEV;\n+\t}\n+\n+\trv1108_otg_data.regs_otg = fdtdec_get_addr(blob, node, \"reg\");\n+\n+\treturn dwc2_udc_probe(&rv1108_otg_data);\n+}\n+\n+int board_usb_cleanup(int index, enum usb_init_type init)\n+{\n+\treturn 0;\n+}\n+#endif\n", "prefixes": [ "U-Boot", "3/3" ] }