{"id":810330,"url":"http://patchwork.ozlabs.org/api/1.2/patches/810330/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1504655200-32400-1-git-send-email-festevam@gmail.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":"<1504655200-32400-1-git-send-email-festevam@gmail.com>","list_archive_url":null,"date":"2017-09-05T23:46:39","name":"[U-Boot,1/2] toradex: imx6: Move g_dnl_bind_fixup() into common SPL code","commit_ref":"511db3bf5a27a2f7eca0f60b6adb1eff74bd6df6","pull_url":null,"state":"accepted","archived":false,"hash":"e5e203b0a0dc096f465b8c8f48420ee1e4c09730","submitter":{"id":6978,"url":"http://patchwork.ozlabs.org/api/1.2/people/6978/?format=json","name":"Fabio Estevam","email":"festevam@gmail.com"},"delegate":{"id":1693,"url":"http://patchwork.ozlabs.org/api/1.2/users/1693/?format=json","username":"sbabic","first_name":"Stefano","last_name":"Babic","email":"sbabic@denx.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1504655200-32400-1-git-send-email-festevam@gmail.com/mbox/","series":[{"id":1668,"url":"http://patchwork.ozlabs.org/api/1.2/series/1668/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=1668","date":"2017-09-05T23:46:39","name":"[U-Boot,1/2] toradex: imx6: Move g_dnl_bind_fixup() into common SPL code","version":1,"mbox":"http://patchwork.ozlabs.org/series/1668/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/810330/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/810330/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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"p34878vI\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xn3KV3FNCz9t2W\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 09:47:09 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid CC901C21E1E; Tue,  5 Sep 2017 23:46:59 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 9AC81C21D7A;\n\tTue,  5 Sep 2017 23:46:57 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 424E3C21C40; Tue,  5 Sep 2017 23:46:56 +0000 (UTC)","from mail-qt0-f196.google.com (mail-qt0-f196.google.com\n\t[209.85.216.196])\n\tby lists.denx.de (Postfix) with ESMTPS id 84064C21C26\n\tfor <u-boot@lists.denx.de>; Tue,  5 Sep 2017 23:46:55 +0000 (UTC)","by mail-qt0-f196.google.com with SMTP id h21so3105431qth.4\n\tfor <u-boot@lists.denx.de>; Tue, 05 Sep 2017 16:46:55 -0700 (PDT)","from localhost.localdomain ([189.61.239.183])\n\tby smtp.gmail.com with ESMTPSA id\n\tq56sm1296320qtb.32.2017.09.05.16.46.51\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 05 Sep 2017 16:46:53 -0700 (PDT)"],"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=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=nqJm6AHrOdmfDpPZPE1mvQ10AWXyx3lXGkd2E4eMflQ=;\n\tb=p34878vI8SIeEdtBYYoeSc2uN43gN51GkKHqIfuO84E5/spB6BGNWXh56i4zunWBzs\n\tFMEEs1/UwMQVZKeccjsfX+coNajYltrNGQ74OhZuKhLI/l2wsBf55wUC4n93wu4XQLJe\n\t7nrHT2o61hA05df+9jO8ncJRz1fvWD8+1CkWsmrg0BtSwcrTWtHpYAQY8XK7mIkQfCyD\n\t1HqkexXIfelDkjMyTP3u/xLgbrPQB1+jzNBZOupcpNsWTLVBNETzidFV4amoCo3d3cUa\n\tlRMtjWefeFMJBQU7IIO/+Dz/EbKQVYmTIxRF8X38vag0qixUX6xz/MQ9TDFK9zN4a4QD\n\tmwBw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=nqJm6AHrOdmfDpPZPE1mvQ10AWXyx3lXGkd2E4eMflQ=;\n\tb=JbUmDhG1s7Vj5C1Pq55LZvC/yhT9M7QjJvVIdYNBquiXtA3mQ+5ScFRRGwhgCPtL37\n\tAzKFygkPfpn1XmREemrNfg4nZC2eJLEmw8c5yBYSaMmcbzirz1KyTEqE1O/NQNI0f5Du\n\tm2EM6Ou9U/0rhywuwi5Kc3yxb/uG+Z94ARkFRbcHhIcxTmhFUge1vB0iWJeWXCdZg8ly\n\tQWlOpQ+EGqGH4n5HCg0cmq9ABRqM8baKkpN4+fOi6CQHQeatMcc807aX0rS+ZQA30bwE\n\t6QlKRDZv7BjcqutolboZ3B+rNPl41weadu1c9nJ0eojnmosnRXEZprmvOj5MbNgz4Rfk\n\tsotQ==","X-Gm-Message-State":"AHPjjUhOf3SUam4UaVA+3NgkWKD5YJ2ImjJq8VknkdYzsuXETWvRiHXM\n\tVT8HQn1ZFcM5Zw==","X-Google-Smtp-Source":"ADKCNb7dZWRUdFcaKC+mf3JF4iPwcvaTk3Qe++E/jpXWrMFCAu/SUlsVJnv/z3lce98QsHq+ZXJ+PA==","X-Received":"by 10.200.37.21 with SMTP id 21mr1149084qtm.74.1504655214193;\n\tTue, 05 Sep 2017 16:46:54 -0700 (PDT)","From":"Fabio Estevam <festevam@gmail.com>","To":"sbabic@denx.de","Date":"Tue,  5 Sep 2017 20:46:39 -0300","Message-Id":"<1504655200-32400-1-git-send-email-festevam@gmail.com>","X-Mailer":"git-send-email 2.7.4","MIME-Version":"1.0","Cc":"Fabio Estevam <fabio.estevam@nxp.com>, u-boot@lists.denx.de,\n\tstefan.agner@toradex.com","Subject":"[U-Boot] [PATCH 1/2] toradex: imx6: Move g_dnl_bind_fixup() into\n\tcommon SPL code","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: Fabio Estevam <fabio.estevam@nxp.com>\n\nInstead of having every board file to add its own g_dnl_bind_fixup()\nimplementation, move it to the common imx6 SPL code.\n\nSigned-off-by: Fabio Estevam <fabio.estevam@nxp.com>\nReviewed-by: Łukasz Majewski <lukma@denx.de>\n---\nChanges since RFC: \n- Keep the non-SPL g_dnl_bind_fixup inside tdx-common.c \n\n arch/arm/mach-imx/spl.c                   | 10 ++++++++++\n board/toradex/apalis_imx6/apalis_imx6.c   | 13 -------------\n board/toradex/colibri_imx6/colibri_imx6.c | 13 -------------\n 3 files changed, 10 insertions(+), 26 deletions(-)","diff":"diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c\nindex 8e8e2f7..e350bc9 100644\n--- a/arch/arm/mach-imx/spl.c\n+++ b/arch/arm/mach-imx/spl.c\n@@ -14,6 +14,7 @@\n #include <asm/spl.h>\n #include <spl.h>\n #include <asm/mach-imx/hab.h>\n+#include <g_dnl.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n \n@@ -86,6 +87,15 @@ u32 spl_boot_device(void)\n \t}\n \treturn BOOT_DEVICE_NONE;\n }\n+\n+#ifdef CONFIG_SPL_USB_GADGET_SUPPORT\n+int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)\n+{\n+\tput_unaligned(CONFIG_G_DNL_PRODUCT_NUM + 0xfff, &dev->idProduct);\n+\n+\treturn 0;\n+}\n+#endif\n #endif\n \n #if defined(CONFIG_SPL_MMC_SUPPORT)\ndiff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c\nindex ebc6c12..628a61d 100644\n--- a/board/toradex/apalis_imx6/apalis_imx6.c\n+++ b/board/toradex/apalis_imx6/apalis_imx6.c\n@@ -29,7 +29,6 @@\n #include <dm/platform_data/serial_mxc.h>\n #include <dm/platdata.h>\n #include <fsl_esdhc.h>\n-#include <g_dnl.h>\n #include <i2c.h>\n #include <imx_thermal.h>\n #include <linux/errno.h>\n@@ -1224,18 +1223,6 @@ void reset_cpu(ulong addr)\n {\n }\n \n-#ifdef CONFIG_SPL_USB_GADGET_SUPPORT\n-int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)\n-{\n-\tunsigned short usb_pid;\n-\n-\tusb_pid = TORADEX_USB_PRODUCT_NUM_OFFSET + 0xfff;\n-\tput_unaligned(usb_pid, &dev->idProduct);\n-\n-\treturn 0;\n-}\n-#endif\n-\n #endif\n \n static struct mxc_serial_platdata mxc_serial_plat = {\ndiff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c\nindex 669d912..756e3f3 100644\n--- a/board/toradex/colibri_imx6/colibri_imx6.c\n+++ b/board/toradex/colibri_imx6/colibri_imx6.c\n@@ -28,7 +28,6 @@\n #include <dm/platform_data/serial_mxc.h>\n #include <dm/platdata.h>\n #include <fsl_esdhc.h>\n-#include <g_dnl.h>\n #include <i2c.h>\n #include <imx_thermal.h>\n #include <linux/errno.h>\n@@ -1108,18 +1107,6 @@ void reset_cpu(ulong addr)\n {\n }\n \n-#ifdef CONFIG_SPL_USB_GADGET_SUPPORT\n-int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)\n-{\n-\tunsigned short usb_pid;\n-\n-\tusb_pid = TORADEX_USB_PRODUCT_NUM_OFFSET + 0xfff;\n-\tput_unaligned(usb_pid, &dev->idProduct);\n-\n-\treturn 0;\n-}\n-#endif\n-\n #endif\n \n static struct mxc_serial_platdata mxc_serial_plat = {\n","prefixes":["U-Boot","1/2"]}