Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp547515imm; Fri, 1 Jun 2018 05:44:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIfCTWliRPi3dGLOf4UEdUwZWgbsbxOSWvCk1BN06D2aVn717EVX1qXTC2bzxgKpzSUUQjd X-Received: by 2002:a17:902:5a09:: with SMTP id q9-v6mr5393578pli.300.1527857050579; Fri, 01 Jun 2018 05:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527857050; cv=none; d=google.com; s=arc-20160816; b=UAOOiBBnUSYnWcJEWPBdtHpGOXqz+PBaxGd3MqpSah2RrPkkfTUh+4N9zoVZEIjMJK dP325bWoxXZc5tQTGTCR/6e40vW9qbeKCfz9XBdKwGvvVTsIyYxFUjpjTDZwKHPN1s1k oKfR+NuGsx6cVfeOkLAz4pkdcSx/fNvu38YosJbYXxULGSpPZibU/5uxZWqD0L6w/MP1 93NTGwZxPdAHHzQO0mXQ3wBstGow7uWFDoVBVkbqVhrTjqiU254+n8ysrfKSW11y/Mjf LfW4+ZI7Hhz3D8S2JvpPk4IUTBSH7I1a4CoSopo/TQTCyj62Hw4a9NnztV6fSs+L7wL3 W0kQ== 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=4UkXpLuV2R6MvwNCC6nBJrSlrEd+qi/NZ+EJoNn/7ac=; b=Vxv5gxhPYou0C/g24YKUNkI7nhXYap9XCK5Qh4jRZhvM95Oc20qbURcALSfHnFYNIA YJOeEaxybrk7FHWKMU52QNiLoQeRr9WuoyXfTmsmEPCvDb+Z/ot0DU1rOG6Kt7BQk/ms FoK6qx1+kmIXuyrrESh3wiphpqzppgG0MeeDmuGSqlW32KIgKSzcCaSZPrK+C+P1op9/ ZXOR3vYNQT4j5T7fr48NTJs8F0uJLBWojYfj4TWlqxwLsrcYoHt6AlyeYSUw16Y5b9t9 3ddV8MTgQiqu52CWcIyFDI7EzkCLoLDBUvbGVKeWa5w0YLieNV2aNjr6iZJZ1FOkRqCd c5rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=k0T1pzAn; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v38-v6si40771113plg.283.2018.06.01.05.43.56; Fri, 01 Jun 2018 05:44:10 -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=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=k0T1pzAn; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbeFAMmy (ORCPT + 99 others); Fri, 1 Jun 2018 08:42:54 -0400 Received: from mail.micronovasrl.com ([212.103.203.10]:38760 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752141AbeFAMkh (ORCPT ); Fri, 1 Jun 2018 08:40:37 -0400 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 0C703B00917 for ; Fri, 1 Jun 2018 14:40:36 +0200 (CEST) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=references:in-reply-to:x-mailer:message-id:date:date:subject :subject:to:from:from; s=dkim; t=1527856835; x=1528720836; bh=Wt vAPWtsashgoFXKwklevlYr2cvzb6YujBfb5hZuNuQ=; b=k0T1pzAnGLK6YMRKMp CalH7zG+4X8lu3f4ydCsG/YiUBcGwofUtyZvP8qlFN0jOSPgEygFAfp5bxz2oE1a VFUaNT882TmtG0CgX+/GH2VP45L3LRA73jCWpM0TzMRgRxVQtcYtcXxvhQ4Y2DSS x/5BPI1xVlv+Z09R3EGdZ4DJE= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=unavailable autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vZ-LvVpMaXU0 for ; Fri, 1 Jun 2018 14:40:35 +0200 (CEST) Received: from localhost.localdomain (unknown [87.18.119.93]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 4DF31B0076B; Fri, 1 Jun 2018 14:40:29 +0200 (CEST) From: Giulio Benetti To: Greg Kroah-Hartman Cc: Jiri Slaby , Andy Shevchenko , Kees Cook , Matthias Brugger , Allen Pais , Sean Young , Ed Blake , Stefan Potyra , Philipp Zabel , Joshua Scott , Vignesh R , Rolf Evers-Fischer , Aaron Sierra , Rafael Gago , Joel Stanley , Sean Wang , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Giulio Benetti Subject: [PATCH 2/8] serial: 8250_dw: allow enable rs485 at boot time Date: Fri, 1 Jun 2018 14:40:15 +0200 Message-Id: <20180601124021.102970-3-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180601124021.102970-1-giulio.benetti@micronovasrl.com> References: <20180601124021.102970-1-giulio.benetti@micronovasrl.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If "linux,rs485-enabled-at-boot-time" is specified need to setup 485 in probe function. Call uart_get_rs485_mode() to get rs485 configuration, then call rs485_config() callback directly to setup port as rs485. Signed-off-by: Giulio Benetti --- drivers/tty/serial/8250/8250_dw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 45366e6e5411..0f8b4da03d4e 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -582,8 +582,11 @@ static int dw8250_probe(struct platform_device *pdev) if (data->uart_16550_compatible) p->handle_irq = NULL; - if (!data->skip_autocfg) + if (!data->skip_autocfg) { dw8250_setup_port(p); + uart_get_rs485_mode(dev, &p->rs485); + dw8250_rs485_config(p, &p->rs485); + } /* If we have a valid fifosize, try hooking up DMA */ if (p->fifosize) { -- 2.17.0