From patchwork Fri Aug 4 21:49:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Graeme Gregory X-Patchwork-Id: 109466 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp1884231obb; Fri, 4 Aug 2017 14:50:04 -0700 (PDT) X-Received: by 10.99.44.78 with SMTP id s75mr3765660pgs.146.1501883404429; Fri, 04 Aug 2017 14:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501883404; cv=none; d=google.com; s=arc-20160816; b=UEp9C9217fcEeGMr6Tw9LVnZM3tUH9t/ofeerd1gVctEyYmoj6hZ1NMuAPu7BCa108 9FFtDcbXsRUK7KG+WbMFQ0eOLk9yiUKIGUBeKdjNIuTv9MnjwwaNBxUXVfiFElYihxDL 3hPAttw13330K8/fr68Vqljy6s2LKgsnneij3+r1E+mGsxxYw7F3Sbab+d44X2qazT+7 PMxuiOxaTwOPLtJsIaMO+cvcDhzhN92u54/bH4WdEbQ29u1cJecv5ZKQ7DO1vu2ecLvE sdw36JviYq65fubf3S1jiTcw9yNlhzY1bymkFC82+DAEa9l8nm/bCO4EHBnbQcauNKS6 Wp0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=GSPTojM37D28VysRchnCstTIz0ib1w+61lOEJedXwLg=; b=Sg4wDCrcLU1NgA3g+mqOrf5jLHgjOWaGnDcOl0bO3JUWFxA73+1UrBC/cO+QzXoUam c3HABRZ0sLkBsz2GF+p129qwS3Iec1D1lsZyB6sRfDkCqQel9Un+wb0cmh19wZwA9yfI cq2lrVMHlTxeHgSwYpzV6aMCSA97jSN8tjeCVpv3Y2n0YJ6pkdU8SJYKfgHbKvmFeCdo RXfH1TrguHaRfmbLd7h1zHmB16XsyLOUN4Yw1HFGyCPDmOSzfkIFdok2hZAP5h35pMUJ WES9RoRBfBjaQudW+MfqOQwwDJvobVC55EBwZj/nlvDSqBwp231gOdRCNfWrsXlRVyUF NElw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=PKCiRnxi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t61si1654440plb.601.2017.08.04.14.50.04; Fri, 04 Aug 2017 14:50:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=PKCiRnxi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752643AbdHDVt5 (ORCPT + 25 others); Fri, 4 Aug 2017 17:49:57 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:35695 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbdHDVty (ORCPT ); Fri, 4 Aug 2017 17:49:54 -0400 Received: by mail-wr0-f176.google.com with SMTP id k71so20997241wrc.2 for ; Fri, 04 Aug 2017 14:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GSPTojM37D28VysRchnCstTIz0ib1w+61lOEJedXwLg=; b=PKCiRnxiK4B81UO4gzByCK2qKNUMvGJRZnxTdZYRElvPnQcjpcE1PIQ+rVknPyO94V VjFvhyeSJSxjiv9+7Op5UsQPmmIUNlV2RtFYvfZRMKaqBYRUWEOpfjiQHfzBDFjFfR2M BDd40WfvYuodHcP3aKYqrnD3oegaIx41hEoxQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GSPTojM37D28VysRchnCstTIz0ib1w+61lOEJedXwLg=; b=e3LsPmQgb8wEj7dzmMPPsO23rqBkUj2omB0oRjVhWq2fRRgMJXHHvrkzwnkE0Yai6j EuL3EMieS38sJJgGArRj9EqL9KFzILrHMZst7HaRoBNNPGo5xVYEAT4G9ThjkP1QwHu6 oHhUj7lFyH6E3WD++o2CHtAfY+m0VQnvUxDYg8jmMPAX3ZaRJB4RllnD303K1zY5MFEc FDLbL3RCXMgmhwVT+p3HGdFL6lMNMtb+f2vew+oRmy+eMG0mv+afKC7aVikqREGMGyKq H5jtlK7h9OVnM1fdPULn1M9DJNILZMcz5E8GcRj4WcSs85W4UxV6iyczxHNm4zf1Mc1J w64g== X-Gm-Message-State: AIVw111LLHQ9meW+QdIhliIGeixtLSS1bkDdALqas4voScpucsI1r9Qg qJjpPOtz9RsU1Aq2SO07YQ== X-Received: by 10.223.139.88 with SMTP id v24mr3056166wra.208.1501883393198; Fri, 04 Aug 2017 14:49:53 -0700 (PDT) Received: from linaro-xps13-gg.xora.org.uk (host-92-20-158-19.as13285.net. [92.20.158.19]) by smtp.gmail.com with ESMTPSA id v65sm3630332wmf.10.2017.08.04.14.49.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2017 14:49:52 -0700 (PDT) From: Graeme Gregory To: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, rjw@rjwysocki.net, lenb@kernel.org, lho@apm.com, gregkh@linuxfoundation.org, jcm@redhat.com, Graeme Gregory Subject: [PATCH 2/2] ACPI: SPCR: work around clock issue on xgene UART Date: Fri, 4 Aug 2017 22:49:44 +0100 Message-Id: <20170804214944.3910-3-graeme.gregory@linaro.org> X-Mailer: git-send-email 2.13.4 In-Reply-To: <20170804214944.3910-1-graeme.gregory@linaro.org> References: <20170804214944.3910-1-graeme.gregory@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org xgene v1/v2 8250 UARTs don't run at the standard clock rate expected by the driver and there is no information on clocking available from the SPCR table. As there has been no progress on relevant vendors updating DBG2/SPCR specifications to fix this work around this using the previous xgene quirk handling to avoid setting a baud rate and therefore using the UART as configured by firmware. Signed-off-by: Graeme Gregory --- drivers/acpi/spcr.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- 2.13.4 diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c index 1457ef0b0fd5..a57e2698df39 100644 --- a/drivers/acpi/spcr.c +++ b/drivers/acpi/spcr.c @@ -156,11 +156,19 @@ int __init parse_spcr(bool earlycon) if (qdf2400_erratum_44_present(&table->header)) uart = "qdf2400_e44"; - if (xgene_8250_erratum_present(table)) + if (xgene_8250_erratum_present(table)) { iotype = "mmio32"; - snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype, - table->serial_port.address, baud_rate); + /* for xgene v1 and v2 we don't know the clock rate of the + * UART so don't attempt to change to the baud rate state + * in the table because driver cannot calculate the dividers + */ + snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype, + table->serial_port.address); + } else { + snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype, + table->serial_port.address, baud_rate); + } pr_info("console: %s\n", opts);