Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/445667/?format=api
{ "id": 445667, "url": "http://patchwork.ozlabs.org/api/patches/445667/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1425371718-30816-1-git-send-email-yao.yuan@freescale.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": "<1425371718-30816-1-git-send-email-yao.yuan@freescale.com>", "list_archive_url": null, "date": "2015-03-03T08:35:18", "name": "[U-Boot] ls1021atwr: add hwconfig setting to do pin mux", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "fde9ccb7c409624f4f1a5165ef8db973fe3c5d7b", "submitter": { "id": 53507, "url": "http://patchwork.ozlabs.org/api/people/53507/?format=api", "name": "Yao Yuan", "email": "yao.yuan@freescale.com" }, "delegate": { "id": 2666, "url": "http://patchwork.ozlabs.org/api/users/2666/?format=api", "username": "yorksun", "first_name": "York", "last_name": "Sun", "email": "yorksun@freescale.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1425371718-30816-1-git-send-email-yao.yuan@freescale.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/445667/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/445667/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", "Received": [ "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 542761400B6\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 3 Mar 2015 22:11:38 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id CE2934B5CD;\n\tTue, 3 Mar 2015 12:11:34 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 2CgozJg9O2K0; Tue, 3 Mar 2015 12:11:34 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 70B154B58F;\n\tTue, 3 Mar 2015 12:11:34 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 813754B58F\n\tfor <u-boot@lists.denx.de>; Tue, 3 Mar 2015 12:11:31 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id aYL-opQwSIHV for <u-boot@lists.denx.de>;\n\tTue, 3 Mar 2015 12:11:31 +0100 (CET)", "from na01-bn1-obe.outbound.protection.outlook.com\n\t(mail-bn1on0112.outbound.protection.outlook.com [157.56.110.112])\n\tby theia.denx.de (Postfix) with ESMTPS id 102EA4B585\n\tfor <u-boot@lists.denx.de>; Tue, 3 Mar 2015 12:11:27 +0100 (CET)", "from BN3PR0301CA0084.namprd03.prod.outlook.com (25.160.152.180) by\n\tBN3PR0301MB1282.namprd03.prod.outlook.com (25.161.210.146) with\n\tMicrosoft\n\tSMTP Server (TLS) id 15.1.99.14; Tue, 3 Mar 2015 08:38:06 +0000", "from BL2FFO11FD032.protection.gbl (2a01:111:f400:7c09::166) by\n\tBN3PR0301CA0084.outlook.office365.com (2a01:111:e400:401e::52) with\n\tMicrosoft\n\tSMTP Server (TLS) id 15.1.99.9 via Frontend Transport; Tue, 3 Mar 2015\n\t08:38:06 +0000", "from az84smr01.freescale.net (192.88.158.2) by\n\tBL2FFO11FD032.mail.protection.outlook.com (10.173.160.73) with\n\tMicrosoft SMTP Server (TLS) id 15.1.99.6 via Frontend Transport;\n\tTue, 3 Mar 2015 08:38:06 +0000", "from titan.ap.freescale.net ([10.192.208.233])\n\tby az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tt238c3Vp015478; Tue, 3 Mar 2015 01:38:03 -0700" ], "X-Greylist": "delayed 7182 seconds by postgrey-1.34 at theia;\n\tTue, 03 Mar 2015 12:11:27 CET", "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)", "From": "Yuan Yao <yao.yuan@freescale.com>", "To": "<yorksun@freescale.com>", "Date": "Tue, 3 Mar 2015 16:35:18 +0800", "Message-ID": "<1425371718-30816-1-git-send-email-yao.yuan@freescale.com>", "X-Mailer": "git-send-email 2.1.0.27.g96db324", "X-EOPAttributedMessage": "0", "Received-SPF": "Fail (protection.outlook.com: domain of freescale.com does not\n\tdesignate 192.88.158.2 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.158.2; helo=az84smr01.freescale.net;", "Authentication-Results": "spf=fail (sender IP is 192.88.158.2)\n\tsmtp.mailfrom=yao.yuan@freescale.com; freescale.mail.onmicrosoft.com; \n\tdkim=none (message not signed) header.d=none;", "X-Forefront-Antispam-Report": "CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10019020)(6009001)(339900001)(199003)(189002)(48376002)(105606002)(77156002)(450100001)(62966003)(104016003)(106466001)(50226001)(50986999)(2351001)(50466002)(86362001)(85426001)(6806004)(19580405001)(19580395003)(47776003)(36756003)(46102003)(110136001)(229853001)(33646002)(87936001)(2371004)(77096005)(92566002);\n\tDIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0301MB1282;\n\tH:az84smr01.freescale.net; \n\tFPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; ", "MIME-Version": "1.0", "X-Microsoft-Antispam": "UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1282;", "X-Microsoft-Antispam-PRVS": "<BN3PR0301MB1282406FD386B054A6CFA18FD3110@BN3PR0301MB1282.namprd03.prod.outlook.com>", "X-Exchange-Antispam-Report-Test": "UriScan:;", "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0; RULEID:(601004)(5005006); \n\tSRVR:BN3PR0301MB1282; BCL:0; PCL:0;\n\tRULEID:; SRVR:BN3PR0301MB1282; ", "X-Forefront-PRVS": "0504F29D72", "X-OriginatorOrg": "freescale.com", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "03 Mar 2015 08:38:06.2680\n\t(UTC)", "X-MS-Exchange-CrossTenant-Id": "710a03f5-10f6-4d38-9ff4-a80b81da590d", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;\n\tIp=[192.88.158.2]", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN3PR0301MB1282", "Cc": "u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH] ls1021atwr: add hwconfig setting to do pin mux", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<http://lists.denx.de/mailman/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": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "The Freescale LS1021ATWR share some pins, so Add the hwconfig option\nthat allows the user to choose which the function he wants.\n\nSigned-off-by: Yuan Yao <yao.yuan@freescale.com>\n---\n board/freescale/ls1021atwr/ls1021atwr.c | 78 +++++++++++++++++++++++++++++++++\n 1 file changed, 78 insertions(+)", "diff": "diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c\nindex fb8525f..90aaa27 100644\n--- a/board/freescale/ls1021atwr/ls1021atwr.c\n+++ b/board/freescale/ls1021atwr/ls1021atwr.c\n@@ -13,6 +13,7 @@\n #include <asm/arch/fsl_serdes.h>\n #include <asm/arch/ls102xa_stream_id.h>\n #include <asm/pcie_layerscape.h>\n+#include <hwconfig.h>\n #include <mmc.h>\n #include <fsl_esdhc.h>\n #include <fsl_ifc.h>\n@@ -54,6 +55,17 @@ DECLARE_GLOBAL_DATA_PTR;\n #define KEEP_STATUS\t\t0x0\n #define NEED_RESET\t\t0x1\n \n+#define SOFT_MUX_ON_I2C3_IFC\t0x2\n+#define SOFT_MUX_ON_CAN3_USB2\t0x8\n+#define SOFT_MUX_ON_QE_LCD\t0x10\n+\n+#define PIN_I2C3_IFC_MUX_I2C3\t0x0\n+#define PIN_I2C3_IFC_MUX_IFC\t0x1\n+#define PIN_CAN3_USB2_MUX_USB2\t0x0\n+#define PIN_CAN3_USB2_MUX_CAN3\t0x1\n+#define PIN_QE_LCD_MUX_LCD\t0x0\n+#define PIN_QE_LCD_MUX_QE\t0x1\n+\n struct cpld_data {\n \tu8 cpld_ver;\t\t/* cpld revision */\n \tu8 cpld_ver_sub;\t/* cpld sub revision */\n@@ -260,6 +272,68 @@ int config_serdes_mux(void)\n }\n #endif\n \n+#ifndef CONFIG_QSPI_BOOT\n+int config_board_mux(void)\n+{\n+\tstruct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);\n+\tint conflict_flag;\n+\n+\tconflict_flag = 0;\n+\tif (hwconfig(\"i2c3\")) {\n+\t\tconflict_flag++;\n+\t\tcpld_data->soft_mux_on |= SOFT_MUX_ON_I2C3_IFC;\n+\t\tcpld_data->i2c3_ifc_mux = PIN_I2C3_IFC_MUX_I2C3;\n+\t}\n+\n+\tif (hwconfig(\"ifc\")) {\n+\t\tconflict_flag++;\n+\t\t/* some signals can not enable simultaneous*/\n+\t\tif (conflict_flag > 1)\n+\t\t\tgoto conflict;\n+\t\tcpld_data->soft_mux_on |= SOFT_MUX_ON_I2C3_IFC;\n+\t\tcpld_data->i2c3_ifc_mux = PIN_I2C3_IFC_MUX_IFC;\n+\t}\n+\n+\tconflict_flag = 0;\n+\tif (hwconfig(\"usb2\")) {\n+\t\tconflict_flag++;\n+\t\tcpld_data->soft_mux_on |= SOFT_MUX_ON_CAN3_USB2;\n+\t\tcpld_data->can3_usb2_mux = PIN_CAN3_USB2_MUX_USB2;\n+\t}\n+\n+\tif (hwconfig(\"can3\")) {\n+\t\tconflict_flag++;\n+\t\t/* some signals can not enable simultaneous*/\n+\t\tif (conflict_flag > 1)\n+\t\t\tgoto conflict;\n+\t\tcpld_data->soft_mux_on |= SOFT_MUX_ON_CAN3_USB2;\n+\t\tcpld_data->can3_usb2_mux = PIN_CAN3_USB2_MUX_CAN3;\n+\t}\n+\n+\tconflict_flag = 0;\n+\tif (hwconfig(\"lcd\")) {\n+\t\tconflict_flag++;\n+\t\tcpld_data->soft_mux_on |= SOFT_MUX_ON_QE_LCD;\n+\t\tcpld_data->qe_lcd_mux = PIN_QE_LCD_MUX_LCD;\n+\t}\n+\n+\tif (hwconfig(\"qe\")) {\n+\t\tconflict_flag++;\n+\t\t/* some signals can not enable simultaneous*/\n+\t\tif (conflict_flag > 1)\n+\t\t\tgoto conflict;\n+\t\tcpld_data->soft_mux_on |= SOFT_MUX_ON_QE_LCD;\n+\t\tcpld_data->qe_lcd_mux = PIN_QE_LCD_MUX_QE;\n+\t}\n+\n+\treturn 0;\n+\n+conflict:\n+\tprintf(\"WARNING: pin conflict! MUX setting may failed!\\n\");\n+\treturn 0;\n+}\n+#endif\n+\n int board_early_init_f(void)\n {\n \tstruct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR;\n@@ -465,6 +539,10 @@ int board_init(void)\n #if defined(CONFIG_MISC_INIT_R)\n int misc_init_r(void)\n {\n+#ifndef CONFIG_QSPI_BOOT\n+\tconfig_board_mux();\n+#endif\n+\n #ifdef CONFIG_FSL_CAAM\n \treturn sec_init();\n #endif\n", "prefixes": [ "U-Boot" ] }