Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/415002/?format=api
{ "id": 415002, "url": "http://patchwork.ozlabs.org/api/patches/415002/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1416984873-31495-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": "<1416984873-31495-1-git-send-email-yao.yuan@freescale.com>", "list_archive_url": null, "date": "2014-11-26T06:54:33", "name": "[U-Boot,v3] ls1021aqds: add hwconfig setting to do pin mux", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "eccab5a89dbb7e13ced524f4589b461a8bd62ba7", "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/1416984873-31495-1-git-send-email-yao.yuan@freescale.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/415002/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/415002/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 848EB14017B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 26 Nov 2014 18:10:48 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 786EA4B639;\n\tWed, 26 Nov 2014 08:10:46 +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 gdrHrAP7VWRs; Wed, 26 Nov 2014 08:10:45 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 800C44B622;\n\tWed, 26 Nov 2014 08:10:45 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id C6B2E4B622\n\tfor <u-boot@lists.denx.de>; Wed, 26 Nov 2014 08:10:40 +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 85tF09xsmEbc for <u-boot@lists.denx.de>;\n\tWed, 26 Nov 2014 08:10:40 +0100 (CET)", "from na01-bl2-obe.outbound.protection.outlook.com\n\t(mail-bl2on0133.outbound.protection.outlook.com [65.55.169.133])\n\tby theia.denx.de (Postfix) with ESMTPS id 5505B4B61A\n\tfor <u-boot@lists.denx.de>; Wed, 26 Nov 2014 08:10:37 +0100 (CET)", "from BN3PR0301CA0019.namprd03.prod.outlook.com (25.160.180.157) by\n\tBN1PR03MB156.namprd03.prod.outlook.com (10.255.201.28) with\n\tMicrosoft\n\tSMTP Server (TLS) id 15.1.26.15; Wed, 26 Nov 2014 06:56:00 +0000", "from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::162) by\n\tBN3PR0301CA0019.outlook.office365.com (2a01:111:e400:4000::29) with\n\tMicrosoft SMTP Server (TLS) id 15.1.26.15 via Frontend Transport;\n\tWed, 26 Nov 2014 06:56:00 +0000", "from tx30smr01.am.freescale.net (192.88.168.50) by\n\tBY2FFO11FD036.mail.protection.outlook.com (10.1.14.221) with\n\tMicrosoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport;\n\tWed, 26 Nov 2014 06:55:59 +0000", "from titan.ap.freescale.net ([10.192.208.233])\n\tby tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tsAQ6tolc005446; Tue, 25 Nov 2014 23:55:51 -0700" ], "X-Greylist": "delayed 873 seconds by postgrey-1.32 at theia;\n\tWed, 26 Nov 2014 08:10:37 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>, <wd@denx.de>, <michael@amarulasolutions.com>", "Date": "Wed, 26 Nov 2014 14:54:33 +0800", "Message-ID": "<1416984873-31495-1-git-send-email-yao.yuan@freescale.com>", "X-Mailer": "git-send-email 2.1.0.27.g96db324", "X-EOPAttributedMessage": "0", "X-Forefront-Antispam-Report": "CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10019020)(6009001)(189002)(199003)(50986999)(46102003)(19580405001)(87936001)(36756003)(92726001)(88136002)(68736004)(19580395003)(44976005)(2201001)(92566001)(120916001)(102836001)(31966008)(50226001)(4396001)(107046002)(106466001)(87286001)(89996001)(104166001)(229853001)(105606002)(33646002)(104016003)(21056001)(77156002)(62966003)(95666004)(50466002)(84676001)(97736003)(48376002)(575784001)(93916002)(86362001)(64706001)(6806004)(99396003)(47776003)(20776003);\n\tDIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR03MB156;\n\tH:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv;\n\tPTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; ", "MIME-Version": "1.0", "X-Microsoft-Antispam": [ "UriScan:;", "BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB156;" ], "X-Exchange-Antispam-Report-Test": "UriScan:;", "X-Exchange-Antispam-Report-CFA-Test": [ "BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB156;", "BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB156;" ], "X-Forefront-PRVS": "04073E895A", "Received-SPF": "Fail (protection.outlook.com: domain of freescale.com does not\n\tdesignate 192.88.168.50 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.168.50; helo=tx30smr01.am.freescale.net;", "Authentication-Results": "spf=fail (sender IP is 192.88.168.50)\n\tsmtp.mailfrom=yao.yuan@freescale.com; ", "X-OriginatorOrg": "freescale.com", "Cc": "u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH v3] ls1021aqds: add hwconfig setting to do pin mux", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.13", "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", "Sender": "u-boot-bounces@lists.denx.de", "Errors-To": "u-boot-bounces@lists.denx.de" }, "content": "The Freescale LS1021AQDS share some pins, so Add the hwconfig option\nthat allows the user to choose which the function he wants.\n\nThe main pin mux IP is:\neSDHC, SAI, IIC2, RGMII, CAN, SAI.\n\nSigned-off-by: Yuan Yao <yao.yuan@freescale.com>\n---\nChanged in v3: \n - Add the change log in comment section.\n - Use #define instead of magic numbers and computation.\nChanged in v2: \n - Rebase to latest u-boot.\n\n board/freescale/ls1021aqds/ls1021aqds.c | 73 +++++++++++++++++++++++++++++++--\n include/configs/ls1021aqds.h | 1 +\n 2 files changed, 71 insertions(+), 3 deletions(-)", "diff": "diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c\nindex 5fafc85..fe293b6 100644\n--- a/board/freescale/ls1021aqds/ls1021aqds.c\n+++ b/board/freescale/ls1021aqds/ls1021aqds.c\n@@ -10,6 +10,7 @@\n #include <asm/arch/immap_ls102xa.h>\n #include <asm/arch/clock.h>\n #include <asm/arch/fsl_serdes.h>\n+#include <hwconfig.h>\n #include <mmc.h>\n #include <fsl_esdhc.h>\n #include <fsl_ifc.h>\n@@ -18,9 +19,22 @@\n #include \"../common/qixis.h\"\n #include \"ls1021aqds_qixis.h\"\n \n+#define PIN_MUX_SEL_CAN\t\t0x03\n+#define PIN_MUX_SEL_IIC2\t0xa0\n+#define PIN_MUX_SEL_RGMII\t0x00\n+#define PIN_MUX_SEL_SAI\t\t0x0c\n+#define PIN_MUX_SEL_SDHC\t0x00\n+\n+#define SET_SDHC_MUX_SEL(reg, value)\t((reg & 0x0f) | value)\n+#define SET_EC_MUX_SEL(reg, value)\t((reg & 0xf0) | value)\n DECLARE_GLOBAL_DATA_PTR;\n \n enum {\n+\tMUX_TYPE_CAN,\n+\tMUX_TYPE_IIC2,\n+\tMUX_TYPE_RGMII,\n+\tMUX_TYPE_SAI,\n+\tMUX_TYPE_SDHC,\n \tMUX_TYPE_SD_PCI4,\n \tMUX_TYPE_SD_PC_SA_SG_SG,\n \tMUX_TYPE_SD_PC_SA_PC_SG,\n@@ -158,11 +172,27 @@ int board_early_init_f(void)\n \n int config_board_mux(int ctrl_type)\n {\n-\tu8 reg12;\n+\tu8 reg12, reg14;\n \n \treg12 = QIXIS_READ(brdcfg[12]);\n+\treg14 = QIXIS_READ(brdcfg[14]);\n \n \tswitch (ctrl_type) {\n+\tcase MUX_TYPE_CAN:\n+\t\treg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_CAN);\n+\t\tbreak;\n+\tcase MUX_TYPE_IIC2:\n+\t\treg14 = SET_SDHC_MUX_SEL(reg14, PIN_MUX_SEL_IIC2);\n+\t\tbreak;\n+\tcase MUX_TYPE_RGMII:\n+\t\treg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_RGMII);\n+\t\tbreak;\n+\tcase MUX_TYPE_SAI:\n+\t\treg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_SAI);\n+\t\tbreak;\n+\tcase MUX_TYPE_SDHC:\n+\t\treg14 = SET_SDHC_MUX_SEL(reg14, PIN_MUX_SEL_SDHC);\n+\t\tbreak;\n \tcase MUX_TYPE_SD_PCI4:\n \t\treg12 = 0x38;\n \t\tbreak;\n@@ -181,6 +211,7 @@ int config_board_mux(int ctrl_type)\n \t}\n \n \tQIXIS_WRITE(brdcfg[12], reg12);\n+\tQIXIS_WRITE(brdcfg[14], reg14);\n \n \treturn 0;\n }\n@@ -214,14 +245,50 @@ int config_serdes_mux(void)\n \treturn 0;\n }\n \n-#if defined(CONFIG_MISC_INIT_R)\n int misc_init_r(void)\n {\n+\tint conflict_flag;\n+\n+\t/* some signals can not enable simultaneous*/\n+\tconflict_flag = 0;\n+\tif (hwconfig(\"sdhc\"))\n+\t\tconflict_flag++;\n+\tif (hwconfig(\"iic2\"))\n+\t\tconflict_flag++;\n+\tif (conflict_flag > 1) {\n+\t\tprintf(\"WARNING: pin conflict !\\n\");\n+\t\treturn 0;\n+\t}\n+\n+\tconflict_flag = 0;\n+\tif (hwconfig(\"rgmii\"))\n+\t\tconflict_flag++;\n+\tif (hwconfig(\"can\"))\n+\t\tconflict_flag++;\n+\tif (hwconfig(\"sai\"))\n+\t\tconflict_flag++;\n+\tif (conflict_flag > 1) {\n+\t\tprintf(\"WARNING: pin conflict !\\n\");\n+\t\treturn 0;\n+\t}\n+\n+\tif (hwconfig(\"can\"))\n+\t\tconfig_board_mux(MUX_TYPE_CAN);\n+\telse if (hwconfig(\"rgmii\"))\n+\t\tconfig_board_mux(MUX_TYPE_RGMII);\n+\telse if (hwconfig(\"sai\"))\n+\t\tconfig_board_mux(MUX_TYPE_SAI);\n+\n+\tif (hwconfig(\"iic2\"))\n+\t\tconfig_board_mux(MUX_TYPE_IIC2);\n+\telse if (hwconfig(\"sdhc\"))\n+\t\tconfig_board_mux(MUX_TYPE_SDHC);\n+\n #ifdef CONFIG_FSL_CAAM\n \treturn sec_init();\n #endif\n+\treturn 0;\n }\n-#endif\n \n int board_init(void)\n {\ndiff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h\nindex b19a60f..0f5f988 100644\n--- a/include/configs/ls1021aqds.h\n+++ b/include/configs/ls1021aqds.h\n@@ -327,6 +327,7 @@ unsigned long get_board_ddr_clk(void);\n #define CONFIG_CMDLINE_EDITING\n #define CONFIG_CMD_IMLS\n \n+#define CONFIG_MISC_INIT_R\n #define CONFIG_HWCONFIG\n #define HWCONFIG_BUFFER_SIZE\t\t128\n \n", "prefixes": [ "U-Boot", "v3" ] }