{"id":810022,"url":"http://patchwork.ozlabs.org/api/1.2/patches/810022/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1504602267-31283-11-git-send-email-patrice.chotard@st.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","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":"<1504602267-31283-11-git-send-email-patrice.chotard@st.com>","list_archive_url":null,"date":"2017-09-05T09:04:27","name":"[U-Boot,v10,10/10] board: STiH410-B2260: add fastboot support","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"2e67ef674360b5bc5bd642afffa4c5b932ccb00d","submitter":{"id":63958,"url":"http://patchwork.ozlabs.org/api/1.2/people/63958/?format=json","name":"Patrice CHOTARD","email":"patrice.chotard@st.com"},"delegate":{"id":3651,"url":"http://patchwork.ozlabs.org/api/1.2/users/3651/?format=json","username":"trini","first_name":"Tom","last_name":"Rini","email":"trini@ti.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1504602267-31283-11-git-send-email-patrice.chotard@st.com/mbox/","series":[{"id":1524,"url":"http://patchwork.ozlabs.org/api/1.2/series/1524/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=1524","date":"2017-09-05T09:04:18","name":"STiH410-B2260: add reset, usb and fastboot support","version":10,"mbox":"http://patchwork.ozlabs.org/series/1524/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/810022/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/810022/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 3xmgvW4fvKz9sPs\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 19:11:51 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 45CC3C21F88; Tue,  5 Sep 2017 09:10:35 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 03695C21F86;\n\tTue,  5 Sep 2017 09:09:50 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 07E82C21F6E; Tue,  5 Sep 2017 09:06:05 +0000 (UTC)","from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com\n\t[91.207.212.93])\n\tby lists.denx.de (Postfix) with ESMTPS id 0C387C21F49\n\tfor <u-boot@lists.denx.de>; Tue,  5 Sep 2017 09:04:43 +0000 (UTC)","from pps.filterd (m0046660.ppops.net [127.0.0.1])\n\tby mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv857e9RM012880; Tue, 5 Sep 2017 11:04:38 +0200","from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35])\n\tby mx08-00178001.pphosted.com with ESMTP id 2cqhs56wkp-1\n\t(version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT);\n\tTue, 05 Sep 2017 11:04:38 +0200","from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9])\n\tby beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DBE4761;\n\tTue,  5 Sep 2017 09:04:37 +0000 (GMT)","from Webmail-eu.st.com (sfhdag6node3.st.com [10.75.127.18])\n\tby zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C4D3615F0;\n\tTue,  5 Sep 2017 09:04:37 +0000 (GMT)","from localhost (10.75.127.44) by SFHDAG6NODE3.st.com (10.75.127.18)\n\twith Microsoft SMTP Server (TLS) id 15.0.1178.4;\n\tTue, 5 Sep 2017 11:04:37 +0200"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW\n\tautolearn=unavailable autolearn_force=no version=3.4.0","From":"<patrice.chotard@st.com>","To":"<u-boot@lists.denx.de>, <albert.u.boot@aribaud.net>, <sjg@chromium.org>, \n\t<jh80.chung@samsung.com>, <marex@denx.de>","Date":"Tue, 5 Sep 2017 11:04:27 +0200","Message-ID":"<1504602267-31283-11-git-send-email-patrice.chotard@st.com>","X-Mailer":"git-send-email 1.9.1","In-Reply-To":"<1504602267-31283-1-git-send-email-patrice.chotard@st.com>","References":"<1504602267-31283-1-git-send-email-patrice.chotard@st.com>","MIME-Version":"1.0","X-Originating-IP":"[10.75.127.44]","X-ClientProxiedBy":"SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG6NODE3.st.com\n\t(10.75.127.18)","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-05_03:, , signatures=0","Subject":"[U-Boot] [PATCH v10 10/10] board: STiH410-B2260: add fastboot\n\tsupport","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>","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":"From: Patrice Chotard <patrice.chotard@st.com>\n\nAdd usb_gadget_handle_interrupts(), board_usb_init(),\nboard_usb_cleanup() and g_dnl_board_usb_cable_connected()\ncallbacks needed for FASTBOOT support\n\nSigned-off-by: Patrice Chotard <patrice.chotard@st.com>\nReviewed-by: Simon Glass <sjg@chromium.org>\n---\nv10:\t_ none\nv9:\t_ none\nv8:\t_ none\nv7:\t_ none\nv6:\t_ add reviewed-by Simon Glass\nv5:\t_ none\nv4:\t_ none\nv3:\t_ none\nv2:\t_ none\n\n\n\n board/st/stih410-b2260/board.c | 42 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 42 insertions(+)","diff":"diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c\nindex 92b0695..d6cbbb8 100644\n--- a/board/st/stih410-b2260/board.c\n+++ b/board/st/stih410-b2260/board.c\n@@ -7,6 +7,10 @@\n  */\n \n #include <common.h>\n+#include <linux/usb/otg.h>\n+#include <dwc3-sti-glue.h>\n+#include <dwc3-uboot.h>\n+#include <usb.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n \n@@ -36,3 +40,41 @@ int board_init(void)\n {\n \treturn 0;\n }\n+\n+#ifdef CONFIG_USB_DWC3\n+static struct dwc3_device dwc3_device_data = {\n+\t.maximum_speed = USB_SPEED_HIGH,\n+\t.dr_mode = USB_DR_MODE_PERIPHERAL,\n+\t.index = 0,\n+};\n+\n+int usb_gadget_handle_interrupts(int index)\n+{\n+\tdwc3_uboot_handle_interrupt(index);\n+\treturn 0;\n+}\n+\n+int board_usb_init(int index, enum usb_init_type init)\n+{\n+\tint node;\n+\tconst void *blob = gd->fdt_blob;\n+\n+\t/* find the snps,dwc3 node */\n+\tnode = fdt_node_offset_by_compatible(blob, -1, \"snps,dwc3\");\n+\n+\tdwc3_device_data.base = fdtdec_get_addr(blob, node, \"reg\");\n+\n+\treturn dwc3_uboot_init(&dwc3_device_data);\n+}\n+\n+int board_usb_cleanup(int index, enum usb_init_type init)\n+{\n+\tdwc3_uboot_exit(index);\n+\treturn 0;\n+}\n+\n+int g_dnl_board_usb_cable_connected(void)\n+{\n+\treturn 1;\n+}\n+#endif\n","prefixes":["U-Boot","v10","10/10"]}