Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6876817ybc; Thu, 28 Nov 2019 07:01:56 -0800 (PST) X-Google-Smtp-Source: APXvYqy022YvhIcv+OunKR3r2N9DhK1KKFyFZptEYTBKEVSzUWucKTj+ZWUhrwMvV6a+U1kWZCYD X-Received: by 2002:ae9:f80a:: with SMTP id x10mr8487183qkh.393.1574953316341; Thu, 28 Nov 2019 07:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574953316; cv=none; d=google.com; s=arc-20160816; b=Wr8tSiTC9MZ+VyI7KGB/e22yTOV3b4pJb72VkBw08NKp+gR4Faa9IZ+eUmgVNyoLLs MzUPiWzzYM5bYiL4RG6YaA0AqFFSj6p/1fVxWfowZNqNhB4tPBCT9w/Fut6Ok5kwo6zn u0waFa86LaReAF5zDS42NI3vjBmHd0Agwwiztrh5q8OEv0RBT+xG2jXwD+QZUBIlaNPf WplzwW2btruDmS07uMAtCcZSJdYVmzTJGBfBr53ss19ERo+4rxoJwz5Rpl6iUYUFD+FJ CrRkGRqQqIDMXPKOVNwJWE7eFItUrHakhcV9kCH8vk5YOVpDaNhziHdVoQR7hiPNmVhQ EiLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Lk3laNSvKrksBmzvW1+vBhhKfEZjlULs2tdXrxvrw9M=; b=LMHSJiJaXfeL3vbeEoOrkF1I1XrI2I9jEzbIBtwgybXyNfC6YmPhkeHji6JE+TejyR H1ujqiDtAWpC4iCNjFeLKdHItrKNDAUXAXW3XPLlDTSKSovn/RBieqUjoc6PDz+65oFS +G54JMmNtCWZnsFP0SjnYnRTj02ll3uu+LthVAvVz/EVGJQH4MGmZExrtXqewbufa/DF 06QDntcq6/xomGvv5UTtpvjszRwIyRjaRSv6BrQrahhPyUPMfL6+DMXhuiWgA823CDeA 1510Rq9KZROPoHtCIEFMPA+bEc3MFuw7UHGQPNXyHj0sP6Gj/IO0TB7ATZSqftxr5+8I HdKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=WL+NyXT4; 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 w5si105106edl.299.2019.11.28.07.01.00; Thu, 28 Nov 2019 07:01:56 -0800 (PST) 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=@rasmusvillemoes.dk header.s=google header.b=WL+NyXT4; 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 S1727722AbfK1O7F (ORCPT + 99 others); Thu, 28 Nov 2019 09:59:05 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:36556 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727478AbfK1O5u (ORCPT ); Thu, 28 Nov 2019 09:57:50 -0500 Received: by mail-lj1-f195.google.com with SMTP id k15so28858109lja.3 for ; Thu, 28 Nov 2019 06:57:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lk3laNSvKrksBmzvW1+vBhhKfEZjlULs2tdXrxvrw9M=; b=WL+NyXT4PE96r/aFfykz6rJ/jSO5ngXrbuEXhHV2hvCO2pLlE226VK6kJOehz+jQDF aLFIJFEAZY+IOodG+ekGt6hgWrjisce5XzijEQcM5TRjGF3DmtuQDgzP9yT52SmHQvQE +CXBMdpP8v47QFJKPuUJL3H7gaGIy0wI6SElg= 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:mime-version:content-transfer-encoding; bh=Lk3laNSvKrksBmzvW1+vBhhKfEZjlULs2tdXrxvrw9M=; b=T+8F9QTfbmOZicXu9EtNpwEb2WdQrcFxbldqWCl5EEFhMzmUFzoKXeraTiZJqOXKv9 99Ps9J9y5C94tRgj8BFWSU6MlatVvt9FhO4W+JwafokDjZMOM3BRSYIg4+jFR/w+gwdA 1EVPpd5T949BiUWMeViReglh6n4Mxn49d3fkhw42g5ftOiBADrG7AQRHLBl4TVMS6AP8 XBuufwuncwL9HvUPFTZDua0GbtjScfpOq96Xewo+6IghS9k3Jt8M2V0lZZ8H2+yQ9V57 b6syWnh7+oKgT7j05vb4+xk11YU3z7N41PqOWbhx5/WdWrYLSlJEES0Tms861dP3zHaK j7ng== X-Gm-Message-State: APjAAAX0IYWDoVFmSq8vBmU0c0KjQgmTV/tTHZtIOZie7UUTBrpRveXj bQ4eKZCgkReK9XgCAn8d9wuzDjIxWOyH8At6 X-Received: by 2002:a2e:8ed1:: with SMTP id e17mr10842604ljl.52.1574953066298; Thu, 28 Nov 2019 06:57:46 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id u2sm2456803lfl.18.2019.11.28.06.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 06:57:45 -0800 (PST) From: Rasmus Villemoes To: Qiang Zhao , Li Yang , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Scott Wood , Timur Tabi , Rasmus Villemoes , linux-serial@vger.kernel.org Subject: [PATCH v6 31/49] serial: ucc_uart: stub out soft_uart_init for !CONFIG_PPC32 Date: Thu, 28 Nov 2019 15:55:36 +0100 Message-Id: <20191128145554.1297-32-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191128145554.1297-1-linux@rasmusvillemoes.dk> References: <20191128145554.1297-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Soft UART hack is only needed for some PPC-based SOCs. To allow building this driver for non-PPC, guard soft_uart_init() and its helpers by CONFIG_PPC32, and use a no-op soft_uart_init() otherwise. Reviewed-by: Timur Tabi Acked-by: Timur Tabi Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index f286e91714cb..313697842e24 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c @@ -33,7 +33,10 @@ #include #include -#include + +#ifdef CONFIG_PPC32 +#include /* mfspr, SPRN_SVR */ +#endif /* * The GUMR flag for Soft UART. This would normally be defined in qe.h, @@ -1096,6 +1099,8 @@ static const struct uart_ops qe_uart_pops = { .verify_port = qe_uart_verify_port, }; + +#ifdef CONFIG_PPC32 /* * Obtain the SOC model number and revision level * @@ -1238,6 +1243,16 @@ static int soft_uart_init(struct platform_device *ofdev) return 0; } +#else /* !CONFIG_PPC32 */ + +static int soft_uart_init(struct platform_device *ofdev) +{ + return 0; +} + +#endif + + static int ucc_uart_probe(struct platform_device *ofdev) { struct device_node *np = ofdev->dev.of_node; -- 2.23.0