Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1134782/?format=api
{ "id": 1134782, "url": "http://patchwork.ozlabs.org/api/patches/1134782/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20190722083646.15229-1-chuanhua.han@nxp.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": "<20190722083646.15229-1-chuanhua.han@nxp.com>", "list_archive_url": null, "date": "2019-07-22T08:36:42", "name": "[U-Boot,v3,1/5] armv8: ls2088a: The ls2088a platform supports the I2C driver model.", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d3ca5c2a56440305e265ccd29eeabf656cb40a2f", "submitter": { "id": 74737, "url": "http://patchwork.ozlabs.org/api/people/74737/?format=api", "name": "Chuanhua Han", "email": "chuanhua.han@nxp.com" }, "delegate": { "id": 2467, "url": "http://patchwork.ozlabs.org/api/users/2467/?format=api", "username": "prabhu_kush", "first_name": "Prabhakar", "last_name": "Kushwaha", "email": "prabhakar@freescale.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20190722083646.15229-1-chuanhua.han@nxp.com/mbox/", "series": [ { "id": 120622, "url": "http://patchwork.ozlabs.org/api/series/120622/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=120622", "date": "2019-07-22T08:36:42", "name": "[U-Boot,v3,1/5] armv8: ls2088a: The ls2088a platform supports the I2C driver model.", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/120622/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1134782/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1134782/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\tdmarc=fail (p=none dis=none) header.from=nxp.com" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 45sbgV1ddHz9s8m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 22 Jul 2019 19:20:38 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid E7FCBC21E35; Mon, 22 Jul 2019 09:20:36 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id CAAE0C21FD3;\n\tMon, 22 Jul 2019 09:05:11 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 1235AC21FD3; Mon, 22 Jul 2019 09:05:10 +0000 (UTC)", "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n\tby lists.denx.de (Postfix) with ESMTPS id 858BFC21FD1\n\tfor <u-boot@lists.denx.de>; Mon, 22 Jul 2019 08:46:09 +0000 (UTC)", "from inva021.nxp.com (localhost [127.0.0.1])\n\tby inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B3EED200250;\n\tMon, 22 Jul 2019 10:46:08 +0200 (CEST)", "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n\t[165.114.16.14])\n\tby inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4657E2000A1;\n\tMon, 22 Jul 2019 10:46:05 +0200 (CEST)", "from titan.ap.freescale.net (TITAN.ap.freescale.net\n\t[10.192.208.233])\n\tby invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A193C402F7;\n\tMon, 22 Jul 2019 16:46:00 +0800 (SGT)" ], "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=none autolearn=unavailable\n\tautolearn_force=no version=3.4.0", "From": "Chuanhua Han <chuanhua.han@nxp.com>", "To": "albert.u.boot@aribaud.net, prabhakar.kushwaha@nxp.com,\n\tpriyanka.jain@nxp.com, rajesh.bhagat@nxp.com", "Date": "Mon, 22 Jul 2019 16:36:42 +0800", "Message-Id": "<20190722083646.15229-1-chuanhua.han@nxp.com>", "X-Mailer": "git-send-email 2.9.5", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Cc": "u-boot@lists.denx.de, Chuanhua Han <chuanhua.han@nxp.com>", "Subject": "[U-Boot] [PATCH v3 1/5] armv8: ls2088a: The ls2088a platform\n\tsupports the I2C driver model.", "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": "DM_I2C_COMPAT is a compatibility layer that allows using the non-DM\nI2C API when DM_I2C is used.When DM_I2C_COMPAT is not enabled for\ncompilation, a compilation error will be generated. This patch\nsolves the problem that the i2c-related api of the ls2088a platform\ndoes not support dm.\n\nSigned-off-by: Chuanhua Han <chuanhua.han@nxp.com>\n---\ndepends on:\n\t- http://patchwork.ozlabs.org/project/uboot/list/?series=109459\n\t- http://patchwork.ozlabs.org/project/uboot/list/?series=113103\n\nChange in v3:\n\t- Change the Kconfig file to !TFABOOT.\n\t- Define the use of CONFIG_SYS_I2C for non-dm.\n\t- Qualified RDB boards that are not dm are used CONFIG_SYS_I2C_EARLY_INIT.\nChange in v2:\n\t- No change.\n\n arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 8 ++++----\n board/freescale/ls2080ardb/ls2080ardb.c | 9 +++++++++\n include/configs/ls2080a_common.h | 2 ++\n include/configs/ls2080ardb.h | 2 ++\n 4 files changed, 17 insertions(+), 4 deletions(-)", "diff": "diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig\nindex ffda02a..d285565 100644\n--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig\n+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig\n@@ -205,10 +205,10 @@ config ARCH_LS2080A\n \tselect ARCH_EARLY_INIT_R\n \tselect BOARD_EARLY_INIT_F\n \tselect SYS_I2C_MXC\n-\tselect SYS_I2C_MXC_I2C1\n-\tselect SYS_I2C_MXC_I2C2\n-\tselect SYS_I2C_MXC_I2C3\n-\tselect SYS_I2C_MXC_I2C4\n+\tselect SYS_I2C_MXC_I2C1 if !TFABOOT\n+\tselect SYS_I2C_MXC_I2C2 if !TFABOOT\n+\tselect SYS_I2C_MXC_I2C3 if !TFABOOT\n+\tselect SYS_I2C_MXC_I2C4 if !TFABOOT\n \timply DISTRO_DEFAULTS\n \timply PANIC_HANG\n \ndiff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c\nindex ce419df..8833ed3 100644\n--- a/board/freescale/ls2080ardb/ls2080ardb.c\n+++ b/board/freescale/ls2080ardb/ls2080ardb.c\n@@ -163,7 +163,16 @@ int select_i2c_ch_pca9547(u8 ch)\n {\n \tint ret;\n \n+#ifndef CONFIG_DM_I2C\n \tret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);\n+#else\n+\tstruct udevice *dev;\n+\n+\tret = i2c_get_chip_for_busnum(0, I2C_MUX_PCA_ADDR_PRI, 1, &dev);\n+\tif (!ret)\n+\t\tret = dm_i2c_write(dev, 0, &ch, 1);\n+#endif\n+\n \tif (ret) {\n \t\tputs(\"PCA: failed to select proper channel\\n\");\n \t\treturn ret;\ndiff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h\nindex c7d8a3b..6be581a 100644\n--- a/include/configs/ls2080a_common.h\n+++ b/include/configs/ls2080a_common.h\n@@ -75,7 +75,9 @@\n #define CONFIG_SYS_MALLOC_LEN\t\t(CONFIG_ENV_SIZE + 2048 * 1024)\n \n /* I2C */\n+#ifndef CONFIG_DM_I2C\n #define CONFIG_SYS_I2C\n+#endif\n \n /* Serial Port */\n #define CONFIG_SYS_NS16550_SERIAL\ndiff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h\nindex bfb54be..2bf8217 100644\n--- a/include/configs/ls2080ardb.h\n+++ b/include/configs/ls2080ardb.h\n@@ -13,8 +13,10 @@\n #ifdef CONFIG_TARGET_LS2081ARDB\n #define CONFIG_QIXIS_I2C_ACCESS\n #endif\n+#ifndef CONFIG_DM_I2C\n #define CONFIG_SYS_I2C_EARLY_INIT\n #endif\n+#endif\n \n #define I2C_MUX_CH_VOL_MONITOR\t\t0xa\n #define I2C_VOL_MONITOR_ADDR\t\t0x38\n", "prefixes": [ "U-Boot", "v3", "1/5" ] }