From patchwork Thu Jan 5 22:39:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Paratey X-Patchwork-Id: 9500083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E9FCB60413 for ; Fri, 6 Jan 2017 04:52:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E16332845D for ; Fri, 6 Jan 2017 04:52:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D420A28482; Fri, 6 Jan 2017 04:52:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9F21628475 for ; Fri, 6 Jan 2017 04:52:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPMTj-000212-OI; Fri, 06 Jan 2017 04:50:11 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPGhM-0005WJ-0x for xen-devel@lists.xen.org; Thu, 05 Jan 2017 22:39:52 +0000 Received: from [85.158.137.68] by server-3.bemta-3.messagelabs.com id A2/F8-14551-73BCE685; Thu, 05 Jan 2017 22:39:51 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1WSbUgTcRzH+9/d5mlbnVPx51hl0xcWqJuGiC8 iC0LJyh4oK0Rvdm3LPdhuxjIEByI5Kwy11EQzy54UH9I0K1Cjh7lIsnqxJCiwWhaW5hMuqrtO ze7V937fz++RP4nLxkRykrFZGYuJNijFfoQuep0qMs5lSlMNFuDxV8YbiE0o6dE9L5aKDor0J o3ZlinSnb7bQuR0r7F19HX5FKDvIQ7kRxJUIQ71U17MgXxJRB2Aq9NvCF7LqFkE771qXoupaJ irK0QORJKBVDgMP1DxYZwqx2Dcs4/XAVQijHiGfHiE4JCKnh18WEpthTlHL85roFaD83GZSIj 7g7NqhBDKAPR5PPNMKHTNzIj50YAqRlDvmZgfJxzmWoZ9BGg7PB+awfhevHY/zRL4G2K4fK1B JPz0iKF6bBITEgzwq/S+WNDxUFL/EwkQt0BfcdF8RqcIGmf4LXlKAWfsrZhgXBRBp33y724yK gPmarYIjFsC7qp8gWkSw7tPY7hwCzl863YiQSugtbKGEKBzYmiu7xAJ2QB1LjteisKqlxykes lBLiHsJopgGctxxhKpVkdpLHqtzmqk9YZItSo2ysiwLK1lDLSGjcoyG9sR9w6WcV83uuXd3I9 CSEwZJE3uN6XJVmjMh0/oaFaXYck1MGw/UpCkEqTTTs7ztzBaxnZEb+Ae04INpEQZKG3kbSmb QxtZvVawBtBaebD0JW9QvKHLNS2mLTzDIbRKHiBF3CAySQ5jMeqt//ujKJhEygBpzABXRaI3W Rerj3KNMa5xV2o239hK/7PkBWhXiv1Qx/KTFaF548kJ/uffHi3fGbJh6mEbPvsFeU7deRWr3N t0LD2vYzZTEdYa4XKXvQ7KHijZ+LnNV389vfWFwdadVOwyx5ie3Z5tSDhrXvkjX/LV/3eRJzH jgzm31Pyx1re9co9d5pne1jvorN2/W9Uc5n2S1jlRHZdyQS6PRkqC1dHq9biFpf8AGobk+oED AAA= X-Env-Sender: Swapnil.Paratey@amd.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1483655988!78535354!1 X-Originating-IP: [104.47.41.48] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 36566 invoked from network); 5 Jan 2017 22:39:49 -0000 Received: from mail-dm3nam03on0048.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) (104.47.41.48) by server-10.tower-31.messagelabs.com with AES256-SHA256 encrypted SMTP; 5 Jan 2017 22:39:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=R8XUETQ3NOghm63MxGi6TzOV0QYMSYNrp/xNEPrHCxg=; b=DAEazzio15z/crRmVQDtkZwUI7yy9SstqBDLHXHgYmU+QV89NbJ+zLzFegmUgRvBz/yPqhDOjFxIjjsHWQFypuHgjHdeAcA2CvHf3FTVubeGKqf4I8ZJAsEycyaoLuEJkKto7HiZK8y2tZ2ArPgncgrhO/CiALbUPhmXDb/wjZ0= Received: from ubuntu.amd.com (165.204.77.1) by CY4PR12MB1879.namprd12.prod.outlook.com (10.175.80.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Thu, 5 Jan 2017 22:39:46 +0000 From: Swapnil Paratey To: Date: Thu, 5 Jan 2017 16:39:34 -0600 Message-ID: <1483655974-3280-1-git-send-email-swapnil.paratey@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR2201CA0002.namprd22.prod.outlook.com (10.171.208.140) To CY4PR12MB1879.namprd12.prod.outlook.com (10.175.80.151) X-MS-Office365-Filtering-Correlation-Id: ede950cc-75b7-4d2f-e6c0-08d435bbc081 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY4PR12MB1879; X-Microsoft-Ex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hua6hwIjLaAWhkdHIXMilI9xIRx1+PrwtV2ItA6CDUstumErHUvnKKMSNtY6fC7CsKyCj9urF0Ur78gL8hjbGhrWEqwobjoM1ogkpRSeV6lGIyCBtCsAtWMV2E0ldl08Em/5V3UEHT8P/ErEkZbs9sSIerolNYxQW3yyo41Be1eiNRNN8pbNSZIHOTQtusiVD2jxwAuR6QWi0Fxk2SdBcZAdE2uIa+IjRylDacX+mUlYPAGZNOeU/Ivqvs5RgqNZl52tp7OGFl1rOhGEzpeJT0EqKwM8thmIvOf9av6KXvttVAcbb6RVaMXL8PuUceGVwgcLrgDMZP1GI9SyQlbAQMfqjrjfhz2snN66iH6EfhJnHtAU3rmEGU8WkzshNfkMAMpUJzZFUa/Vk7Hb5r7h2RZfy/Ea2oM+wrQJTGmu7NDlJT1oAXKUSZ/ZI7fQ8UlylTVqDQxVZohtHdtPDcjQ4wERpF2HZCh8zXf9rwe5KaTNQWuyXPn2Xrhw4EnR252U X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:CY4PR12MB1879; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1879; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1879; 4:J4AQfTLhNv0ZZ5fdjVeRwX7ha1neGESC4HvKfZCk8XKbgIIiHPmfTl4wscno8gAVJv96/kOVRD3fRrR8y5t9kgBtjvln0J7DAytj1bi5DtGtYO2rIYbcetounq3xRODeYOV3bPxY8qAB9Yx/CShjUj46taf7CZrB2xQwCaw7Ke6vd/L2ROxryLN8U+PprRosZUqoc6jxfiGWn6G9aln/Nc7H6/MfLFS3oGWoRvCO7Plvf3l4pwfDVG388OrSujWBIVwvGiVsZThAUYdNrxa78U3OD9R7oY/WQsg3uWuC/VPN6SJlG95RkOsocklIIzBmrzALTi7JTqGwLAAEmS+WBvp50399a8I77MDeWBtnnaDREP4BUx9+3kENfy8LrRxDkz4J44H3uDN3jQv3REWG8CIpjahT5TemHROMLBsU4sApvj1u+jaDZF9eq2I6slH+W3OW4pXq83m8yXm1Bemt8zQTu1TqGmy88EHOAcypTp5qjY7D5OGwDmdFc9NCe6kDrlo8X2UBjmVwOfI7HuxqLiub8G5gImLhwlW80Ykyq/zAmRSeBShqR8mRmIcy2Na75m90NNXotvGh89ULMWrQk0p0e6Ivyze/uiU3/JoWMQuBo7m9+1bQvqh/Oh6+WWHr X-Forefront-PRVS: 0178184651 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39860400002)(39840400002)(39450400003)(39410400002)(39850400002)(199003)(189002)(54906002)(7736002)(81166006)(8676002)(305945005)(36756003)(106356001)(2351001)(105586002)(6666003)(110136003)(7416002)(92566002)(42186005)(6916009)(53416004)(8666007)(6116002)(3846002)(2906002)(47776003)(50466002)(4326007)(50986999)(97736004)(48376002)(66066001)(68736007)(50226002)(6486002)(5003940100001)(38730400001)(189998001)(81156014)(33646002)(101416001)(86362001)(25786008)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1879; H:ubuntu.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1879; 23:YGcDx9nI43opOyp0S0V+XKpg8Z3dWoyWQ63ut213D?= =?us-ascii?Q?yTXmqyFbIUspSVCF5rm3mgLETvxJSGRZBxse1BniswaQZJvLkZfIqWhmv2AX?= =?us-ascii?Q?1hY/CyGyaLxqvVwYaKHDOCMe7UivbK1Uks1j4fH7yUoSK6oSQjWxUeW+lTqo?= =?us-ascii?Q?qlOfhm30GXR9c8YhkFcDMrzPvc9lWYE5dsnvqoDc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8+IVF/L5M1DS5d+Yc/SEAAmQFERA07e4nJ+CDeKAnocMQl6UslzumJH6V?= =?us-ascii?Q?z039PDZwgAT3qN4R5dfRmVLhjLtYNgTC3Do5JOaRKn3zF6AOKtUCB0iec4jJ?= =?us-ascii?Q?bmgTrzAgvHNMLFMleov3pvbdLVExwEyVPiF?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1879; 6:NVhUTkZamHi+zJc16WnmGy3DqNCvQ80JID/Lr+yaBO94zg59olu3NKqvP+wfTvbPchizYC+GSO2IderhxLo+awYMDvBufKJrdo+JKeH9U/jUKeYQyuZLMQT7k9f3rEEPWJyoDzuJppr6KYGBGxZ+TbAJes/t0Rorv6/fijy9nGowgMIsx+F8LKcU4YIlAxN+gFHcJTLFjP9Qr8aKfehWCxrG+BPQSo/EKP7wdh8tl7I6IMKVChs6WaUh5k6LnMOza5MSNDk+dtToDnkVCu/7ymHlx9LCLff2OEvvh82olyfc7zeEi8w898/M/CMWeb9cjOQ+WzUBBJiZsAdzfBY4Or3isNJ3Y+CVtfQe1v31Obv394N+wIbI//MFw54VL0AePwXzUA8qDwsvkozt8Lq/6eySEprNFpv5a0orBS2GwQp0vNPnLVtWTgbTQnU/p/Z83Jjp+KOxjxhmFlwJXwF1Dg==; 5:NyQwofFULHYDIGlKul87EOaZ7kQ4rMPQn4uWyAEpNZW6EuZ17YMJ45tRlTTrY8+fYYfannvzL06oFNgO66LC7RJsETL6/LwYMt4y/YO9ex6ifYOeFuzf/4ikt1SNBfvlbMas/R0MwDj558diggUF/Il5hAV5G/8KrgunQV5+pzM=; 24:XmaggvPPD/SkGNHQwBlMSmcqPsnjXy1DZWrR2L49hcyss3mwj0QBfejn6mkMxpB++coXHjb3PIug6oRavMrF9u6EbWjuLziFRrzeRrBBzoY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1879; 7:00QBvjP+v7WcFzKOcIYx7GGyC24gzjCNIElJh7uCg86lB4Gt7uSomlCoXRCO1KfeVCvvARz3Q2CYWwpIvMtCBnUYYgS+v7zmy3d3xEm+IhId9jh3TUO27sGwN+PVGu6QcFaXyRx2fCZTwygd+ZB6aHwritgW3q3enr74ElKICo6v5e3/9QKLlkJvJ5Q7uWpZzC2gkTRXtgRfdypVOWBypa/2prM1jznMh3tHCBMiTn38o7oJSjhSZkkA2e2jqCE5UJtjWjhmscUm4fo3ESpjtEOkGrJHzZCCxpjX7R9GLn+PQzyMUDijM0ZGD4rW/ZD4llI4WQ6/jY4X4u9PagVwHVZhw5aE7fi433NNip6SO5HihjUzD5nSJdsZQMaWpGMxaGfN3BT/xm4RLmTUxcD6rn/D4bF1erHXaC5kJKcg2Yfw3SPYkVHXy9urLxyFzdl8xf/VezegKJzmHehF3rWOAw==; 20:IM+e3NkmqzipGec2bXM24NjNhLfGCzDw5aKC6zjogcVz1cJogxBneW66buNCYzdTHdXOsVrcQwI7/DEmImaBbOewzAgipXadjb+rGCOroVeIH6/r5YLLA+cKagQk+x1rtiYyQ2X2CXs9fKVk4ze65pd20l9p01TUftH6b8Y71mB5EqUBKskXTA8/qPv0Ovwgqp7SfXj/U0+FM9U/zdJ+4WGDGGbvlqGfVGxt68Sz94TG6tUxFTUtrpqqMqI4IoEa X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2017 22:39:46.6944 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1879 X-Mailman-Approved-At: Fri, 06 Jan 2017 04:50:08 +0000 Cc: Swapnil Paratey , tim@xen.org, sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, jbeulich@suse.com Subject: [Xen-devel] [PATCH v2] ns16550: Add command line parsing adjustments X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add parsing options for reg_width and reg_shift in bootup command line parameters. This adds flexibility in setting register values for MMIO UART devices. Increase length of opt_com1 and opt_com2 buffer to accommodate more command line parameters. eg. com1=115200,8n1,0x3f8,4 (legacy IO) eg. com1=115200/3000000/4/2,8n1,0xfedc9000,4 (MMIO adjustments) Reviewed-by: Suravee Suthikulpanit Signed-off-by: Swapnil Paratey --- Changed since v1: * Changed opt_com1 and opt_com2 array size to 64 (power of 2). * Added descriptions for reg_width and reg_shift in docs/misc/xen-command-line.markdown * Changed subject to ns16550 from 16550 for better tracking. --- docs/misc/xen-command-line.markdown | 11 ++++++++++- xen/drivers/char/ns16550.c | 20 +++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index 0138978..9ab7ead 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -291,7 +291,7 @@ Flag to indicate whether to probe for a CMOS Real Time Clock irrespective of ACPI indicating none to be there. ### com1,com2 -> `= [/][,[DPS][,[|pci|amt][,[][,[][,[]]]]]]` +> `= [/[][/[][/[]]]][,DPS[,[,[,[,]]]]]` Both option `com1` and `com2` follow the same format. @@ -299,6 +299,15 @@ Both option `com1` and `com2` follow the same format. the bootloader or other earlier firmware has already set it up. * Optionally, the base baud rate (usually the highest baud rate the device can communicate at) can be specified. +* `` is the access size, or width, for programming + the UART device registers. Accepted values are 1 and 4 (bytes). + The UART device datasheet defines the register width to be used when + reading or writing the registers. This field is optional. + The default value is 1. +* `` is the number of bits to shift the register offset value + for programming the UART device registers. The UART device datasheet + defines the register shift needed to access the registers properly. + This field is optional. The default value is 0. * `DPS` represents the number of data bits, the parity, and the number of stop bits. * `D` is an integer between 5 and 8 for the number of data bits. diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 1da103a..0e80bce 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -33,14 +33,14 @@ /* * Configure serial port with a string: - * [/][,DPS[,[,[,[,]]]]]. + * [/[][/[][/[]]]][,DPS[,[,[,[,]]]]]. * The tail of the string can be omitted if platform defaults are sufficient. * If the baud rate is pre-configured, perhaps by a bootloader, then 'auto' * can be specified in place of a numeric baud rate. Polled mode is specified * by requesting irq 0. */ -static char __initdata opt_com1[30] = ""; -static char __initdata opt_com2[30] = ""; +static char __initdata opt_com1[64] = ""; +static char __initdata opt_com2[64] = ""; string_param("com1", opt_com1); string_param("com2", opt_com2); @@ -1118,6 +1118,20 @@ static void __init ns16550_parse_port_config( uart->clock_hz = simple_strtoul(conf, &conf, 0) << 4; } + if ( *conf == '/' ) + { + conf++; + if ( *conf != '/' && *conf != ',' ) + uart->reg_width = simple_strtol(conf, &conf, 0); + } + + if ( *conf == '/' ) + { + conf++; + if ( *conf != '/' && *conf != ',' ) + uart->reg_shift = simple_strtol(conf, &conf, 0); + } + if ( *conf == ',' && *++conf != ',' ) { uart->data_bits = simple_strtoul(conf, &conf, 10);