{"id":815778,"url":"http://patchwork.ozlabs.org/api/patches/815778/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1505846281-19020-4-git-send-email-jteki@openedev.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/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":"<1505846281-19020-4-git-send-email-jteki@openedev.com>","list_archive_url":null,"date":"2017-09-19T18:37:58","name":"[U-Boot,3/6] i.MX6: engicam: Move set_fdt_file to common","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"bb00c742776c336a059c71a43acaa09d8abead1c","submitter":{"id":20045,"url":"http://patchwork.ozlabs.org/api/people/20045/?format=json","name":"Jagan Teki","email":"jagannadh.teki@gmail.com"},"delegate":{"id":1693,"url":"http://patchwork.ozlabs.org/api/users/1693/?format=json","username":"sbabic","first_name":"Stefano","last_name":"Babic","email":"sbabic@denx.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1505846281-19020-4-git-send-email-jteki@openedev.com/mbox/","series":[{"id":3946,"url":"http://patchwork.ozlabs.org/api/series/3946/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=3946","date":"2017-09-19T18:37:55","name":"i.MX6Q: Add SPL_OF_CONTROL support","version":1,"mbox":"http://patchwork.ozlabs.org/series/3946/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/815778/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/815778/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=\"q5g7KJJS\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xxWyw2zczz9sPm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 04:45:28 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid D2904C21DA2; Tue, 19 Sep 2017 18:44:12 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id E03A6C21DB5;\n\tTue, 19 Sep 2017 18:44:10 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 7FA10C21D76; Tue, 19 Sep 2017 18:43:40 +0000 (UTC)","from mail-pf0-f195.google.com (mail-pf0-f195.google.com\n\t[209.85.192.195])\n\tby lists.denx.de (Postfix) with ESMTPS id C5CA7C21D19\n\tfor <u-boot@lists.denx.de>; Tue, 19 Sep 2017 18:43:36 +0000 (UTC)","by mail-pf0-f195.google.com with SMTP id f84so187735pfj.3\n\tfor <u-boot@lists.denx.de>; Tue, 19 Sep 2017 11:43:36 -0700 (PDT)","from localhost.localdomain ([115.97.191.18])\n\tby smtp.gmail.com with ESMTPSA id\n\te87sm4757779pfl.46.2017.09.19.11.43.31\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 19 Sep 2017 11:43:33 -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_H2,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_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:in-reply-to:references;\n\tbh=D9gOAXZn0MHYfj7bD9PeFmFiS9loNQv87dU7bCM8iJU=;\n\tb=q5g7KJJSTXTE2P/7MPuGVL/kK3S/m49YPQPd0sXxVVbFD1h9LUAU2pYM97jbZPbYRG\n\tQ2O6p/WGL2lF26WGJmu4JT7dTa4okxwF6rJwlafPOaaUEqZyEqBiRKu1IWsHZvJ5DjC3\n\t5oxBuWeIAXX2Cy99afTRkK6riMPxU5dlkNGDvJAqgmhLmLWc5WHDu5/mXOg6ggkm42Bc\n\te4WC1/ffhSCPYHqEDvhUxmhlXOyrkiP+VpLZ6c1UwhC9B740wdF3gYZhIhI3OFiPsT8j\n\twaqTWaQEL1b855Tut+6JoAGpzV8V8Zn+Xa/SQn+5ODeELZoryK3iuDjgMEoVd6R5+RP2\n\tP/BQ==","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:in-reply-to\n\t:references;\n\tbh=D9gOAXZn0MHYfj7bD9PeFmFiS9loNQv87dU7bCM8iJU=;\n\tb=kJzVPfk0x9RnLaqJu9we2hXFyo1ABNJAwt9WLclNriFvFMrgjcHrkQ1Qf73SvNWTTv\n\t6ysV2+kEnRrZHOdsooOtvRsvdJBkHc4ROG44bIXqR0o+MszhdnG40RPUQtYOo5wEvKeM\n\toA3Z1lbLR7BCSA2DoKNOWNF68VK+wh6m0KbcJW1MFL/RUlGVB+++Lz3YRk0Jz7DLBejT\n\tp04F1EKKJhrQHM0j4J+1DFD+puKJZpqLA7gAipbzjuAa6Nf9iG61vKclyqVwS9Q7Jw8M\n\tkHAyceC9ZnnyVfccaSTOsDy3JFR7MQvRnbnIq5yO0afoWxG4jXlzPVPkJ5zrlakgxw0y\n\tCAbQ==","X-Gm-Message-State":"AHPjjUgdrgOCs/xU+sChGow4sl56h5vcaEuLqBseZG5P8gXqOUHHSJJh\n\tyo1Wyws+oDeaV2BIIgQS+mk=","X-Google-Smtp-Source":"AOwi7QBoOEAANsCvwmKIhXv65TMjceLykKS5TkNHr5evSFV4ZB6/s1gqvTi10p5mqmB5LsFtLtRTOw==","X-Received":"by 10.98.14.27 with SMTP id w27mr2140431pfi.201.1505846615368;\n\tTue, 19 Sep 2017 11:43:35 -0700 (PDT)","From":"Jagan Teki <jagannadh.teki@gmail.com>","X-Google-Original-From":"Jagan Teki <jteki@openedev.com>","To":"Stefano Babic <sbabic@denx.de>","Date":"Wed, 20 Sep 2017 00:07:58 +0530","Message-Id":"<1505846281-19020-4-git-send-email-jteki@openedev.com>","X-Mailer":"git-send-email 2.7.4","In-Reply-To":"<1505846281-19020-1-git-send-email-jteki@openedev.com>","References":"<1505846281-19020-1-git-send-email-jteki@openedev.com>","Cc":"Fabio Estevam <fabio.estevam@nxp.com>, u-boot@lists.denx.de","Subject":"[U-Boot] [PATCH 3/6] i.MX6: engicam: Move set_fdt_file to common","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":"From: Jagan Teki <jagan@amarulasolutions.com>\n\nsetenv_fdt_file to common code and set dtb based on\nCONFIG_DEFAULT_DEVICE_TREE and cpu_type.\n\nSigned-off-by: Jagan Teki <jagan@amarulasolutions.com>\n---\n board/engicam/common/board.c            | 24 ++++++++++++++++++++++++\n board/engicam/common/board.h            |  1 -\n board/engicam/geam6ul/geam6ul.c         |  6 ------\n board/engicam/icorem6/icorem6.c         |  8 --------\n board/engicam/icorem6_rqs/icorem6_rqs.c |  8 --------\n board/engicam/isiotmx6ul/isiotmx6ul.c   | 11 -----------\n 6 files changed, 24 insertions(+), 34 deletions(-)","diff":"diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c\nindex c7ec55f..f86fb2b 100644\n--- a/board/engicam/common/board.c\n+++ b/board/engicam/common/board.c\n@@ -32,6 +32,30 @@ static void mmc_late_init(void)\n }\n #endif\n \n+static void setenv_fdt_file(void)\n+{\n+\tconst char *cmp_dtb = CONFIG_DEFAULT_DEVICE_TREE;\n+\n+\tif (!strcmp(cmp_dtb, \"imx6q-icore\")) {\n+\t\tif (is_mx6dq())\n+\t\t\tenv_set(\"fdt_file\", \"imx6q-icore.dtb\");\n+\t\telse if(is_mx6dl() || is_mx6solo())\n+\t\t\tenv_set(\"fdt_file\", \"imx6dl-icore.dtb\");\n+\t} else if (!strcmp(cmp_dtb, \"imx6q-icore-rqs\")) {\n+\t\tif (is_mx6dq())\n+\t\t\tenv_set(\"fdt_file\", \"imx6q-icore-rqs.dtb\");\n+\t\telse if(is_mx6dl() || is_mx6solo())\n+\t\t\tenv_set(\"fdt_file\", \"imx6dl-icore-rqs.dtb\");\n+\t} else if (!strcmp(cmp_dtb, \"imx6ul-geam-kit\"))\n+\t\tenv_set(\"fdt_file\", \"imx6ul-geam-kit.dtb\");\n+\telse if (!strcmp(cmp_dtb, \"imx6ul-isiot-mmc\"))\n+\t\tenv_set(\"fdt_file\", \"imx6ul-isiot-mmc.dtb\");\n+\telse if (!strcmp(cmp_dtb, \"imx6ul-isiot-emmc\"))\n+\t\tenv_set(\"fdt_file\", \"imx6ul-isiot-emmc.dtb\");\n+\telse if (!strcmp(cmp_dtb, \"imx6ul-isiot-nand\"))\n+\t\tenv_set(\"fdt_file\", \"imx6ul-isiot-nand.dtb\");\n+}\n+\n int board_late_init(void)\n {\n \tswitch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>\ndiff --git a/board/engicam/common/board.h b/board/engicam/common/board.h\nindex f364a23..c720b0b 100644\n--- a/board/engicam/common/board.h\n+++ b/board/engicam/common/board.h\n@@ -6,7 +6,6 @@\n \n #ifndef _BOARD_H_\n #define _BOARD_H_\n-void setenv_fdt_file(void);\n void setup_gpmi_nand(void);\n void setup_display(void);\n #endif /* _BOARD_H_ */\ndiff --git a/board/engicam/geam6ul/geam6ul.c b/board/engicam/geam6ul/geam6ul.c\nindex ffd383a..15bd8b2 100644\n--- a/board/engicam/geam6ul/geam6ul.c\n+++ b/board/engicam/geam6ul/geam6ul.c\n@@ -90,12 +90,6 @@ void setup_gpmi_nand(void)\n }\n #endif /* CONFIG_NAND_MXS */\n \n-void setenv_fdt_file(void)\n-{\n-\tif (is_mx6ul())\n-\t\tenv_set(\"fdt_file\", \"imx6ul-geam-kit.dtb\");\n-}\n-\n #ifdef CONFIG_SPL_BUILD\n /* MMC board initialization is needed till adding DM support in SPL */\n #if defined(CONFIG_FSL_ESDHC) && !defined(CONFIG_DM_MMC)\ndiff --git a/board/engicam/icorem6/icorem6.c b/board/engicam/icorem6/icorem6.c\nindex 3d4f713..59c085b 100644\n--- a/board/engicam/icorem6/icorem6.c\n+++ b/board/engicam/icorem6/icorem6.c\n@@ -192,14 +192,6 @@ void setup_display(void)\n }\n #endif /* CONFIG_VIDEO_IPUV3 */\n \n-void setenv_fdt_file(void)\n-{\n-\tif (is_mx6dq())\n-\t\tenv_set(\"fdt_file\", \"imx6q-icore.dtb\");\n-\telse if(is_mx6dl() || is_mx6solo())\n-\t\tenv_set(\"fdt_file\", \"imx6dl-icore.dtb\");\n-}\n-\n #ifdef CONFIG_SPL_BUILD\n /* MMC board initialization is needed till adding DM support in SPL */\n #if defined(CONFIG_FSL_ESDHC) && !defined(CONFIG_DM_MMC)\ndiff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c\nindex 2a321dc..edf9d086 100644\n--- a/board/engicam/icorem6_rqs/icorem6_rqs.c\n+++ b/board/engicam/icorem6_rqs/icorem6_rqs.c\n@@ -32,14 +32,6 @@ int board_mmc_get_env_dev(int devno)\n }\n #endif\n \n-void setenv_fdt_file(void)\n-{\n-\tif (is_mx6dq())\n-\t\tenv_set(\"fdt_file\", \"imx6q-icore-rqs.dtb\");\n-\telse if(is_mx6dl() || is_mx6solo())\n-\t\tenv_set(\"fdt_file\", \"imx6dl-icore-rqs.dtb\");\n-}\n-\n #ifdef CONFIG_SPL_BUILD\n #include <spl.h>\n \ndiff --git a/board/engicam/isiotmx6ul/isiotmx6ul.c b/board/engicam/isiotmx6ul/isiotmx6ul.c\nindex fbf1724..9afa8e4 100644\n--- a/board/engicam/isiotmx6ul/isiotmx6ul.c\n+++ b/board/engicam/isiotmx6ul/isiotmx6ul.c\n@@ -98,17 +98,6 @@ int board_mmc_get_env_dev(int devno)\n }\n #endif\n \n-void setenv_fdt_file(void)\n-{\n-\tif (is_mx6ul()) {\n-#ifdef CONFIG_ENV_IS_IN_MMC\n-\t\tenv_set(\"fdt_file\", \"imx6ul-isiot-emmc.dtb\");\n-#else\n-\t\tenv_set(\"fdt_file\", \"imx6ul-isiot-nand.dtb\");\n-#endif\n-\t}\n-}\n-\n #ifdef CONFIG_SPL_BUILD\n #include <spl.h>\n \n","prefixes":["U-Boot","3/6"]}