Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2486218ybx; Fri, 8 Nov 2019 05:06:42 -0800 (PST) X-Google-Smtp-Source: APXvYqymXrdUONJ4eGgdrKlX5cFDpKq2c3nuCxLPBxy0bo8jKmgACzALhtgrq9sP+VrA2+6ew7Nx X-Received: by 2002:a17:906:459:: with SMTP id e25mr8540215eja.259.1573218402664; Fri, 08 Nov 2019 05:06:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573218402; cv=none; d=google.com; s=arc-20160816; b=jOgGL9I5eI8IyPnPbXCKC+oo5yfPYGNg+UJquQPrAyA18LXVgy71yoeX68u97Mv/el +M254QmSZA3rZRVBIZfa0bUa96ZgxT3+nTPdbFtaPqxHuNfXN8/wajO4OjMi2SbpJVCD pSKz7aAWuAdjAD8+H+s8BQibXyRu5CmFo95qbT+TcAze1+cxXY3PT9ZNRR4lBH4p4G25 KIwpjO6bSooRVrcfGswPsEY+tg0npYmcX4LyQUlUK9OZLdmkkf989ZKNr6ZNhPFF9p4+ T6hD0p0s748iShnVFR5mZEHfVnQ/9fjdqhtGvhpLGK2d2vdHM6Dn0ANntamyZW4pYnZ4 llZA== 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=zPi0SchlJBpcK2Uafamd7sY3psIZzF+ErFogb8EsMtA=; b=G5E8viKxLP2U0isIhOIbjvOuGTE1444qSM5BjdlQvdBN/hnBr5l/R8ZK1g9ZruLfP5 owNoDLPPXG6llnL4Lf2TBg+/jD0dNQKBB1VcbjIyvyCnAQcEyxFQy9u2u2+mzBTywxrH 5PXRfkcAmcAd8NnBRqEZA0sfKvvCqnGl9QykA3RRhyks5n/Y6fPmW3sMkqGL/j1QLX6U LQFm1dMbH39f3PRBVBsvwYLzE6YwlgBVIYkd21M+b+XCgMaPhv0OrUBHNoqhKelJzZ0J LN40NciPxKeFKFYjGP2avy+ve8VHePVzKh5turNMRolCwz/KZiNJBCsMLFk/dXP2utLz +XkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=SRXE1NoS; 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 e24si4204707ede.392.2019.11.08.05.06.19; Fri, 08 Nov 2019 05:06:42 -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=SRXE1NoS; 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 S1731847AbfKHNDj (ORCPT + 99 others); Fri, 8 Nov 2019 08:03:39 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:36979 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729443AbfKHNCJ (ORCPT ); Fri, 8 Nov 2019 08:02:09 -0500 Received: by mail-lf1-f68.google.com with SMTP id b20so4411073lfp.4 for ; Fri, 08 Nov 2019 05:02:08 -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=zPi0SchlJBpcK2Uafamd7sY3psIZzF+ErFogb8EsMtA=; b=SRXE1NoSEoSCywO+L8E6ng+2FXGjgyGd7B+f0jJ2JaXIveaCYZLPIeDN3ivZQSSkGE u1V/D5rgTkWtpx6sNDzCdXxFB3bSCGyd8bTMf7BINnG8O7NsszC3ReD1KjCbn+P9Wj81 /49kVxIImaa1ns64nyNk2b2uJQOsVial126RE= 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=zPi0SchlJBpcK2Uafamd7sY3psIZzF+ErFogb8EsMtA=; b=g8YGU/46v7HgAtqewpczFlJBC0saPATpW3xBL2eZAoAmD9mPsfbJ5MC/J88wUDhQ5x Tf2a6iO4Xzv37Nk7qx/DkBCO2fM31I1eVsJrM6v1x8vDm3RNjKNLqWtxLhHkEwkL5Vlv 0EyUcpIIaCSDBpw8EpEtqSgyNQOUDqKt1oEPiMaBtRwAQzc4kgO08GIVAbF6GwRImMwm 1YjlwQqsPVVO2gOKJzC1B5/2TzF8NoPobphRyLDreClea1tVwVe80CDm6fiWDGvV61/Z Zv74upooPu4o8tl0poCnpZkVjbLg/qhnZFCj1f5JGdd40Q7P6gIclUVQmnw98jgubLQ0 Z6aA== X-Gm-Message-State: APjAAAVdQ3aNEZwimPD/v0jKc6qKCpg4mAyqGC645TgBOvpCVvW41JCn 2m6XbSAfz3De196Xdl8Er0iMAQ== X-Received: by 2002:ac2:5dcc:: with SMTP id x12mr6536635lfq.163.1573218127481; Fri, 08 Nov 2019 05:02:07 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id d28sm2454725lfn.33.2019.11.08.05.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 05:02:06 -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 , Rasmus Villemoes , linux-serial@vger.kernel.org Subject: [PATCH v4 31/47] serial: ucc_uart: stub out soft_uart_init for !CONFIG_PPC32 Date: Fri, 8 Nov 2019 14:01:07 +0100 Message-Id: <20191108130123.6839-32-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108130123.6839-1-linux@rasmusvillemoes.dk> References: <20191108130123.6839-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. 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