From patchwork Mon Jun 13 05:33:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 634371 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rShkt55psz9s9x for ; Mon, 13 Jun 2016 15:52:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=FlRwTxXy; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 52034A7813; Mon, 13 Jun 2016 07:52:36 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y-FEWboCfY1j; Mon, 13 Jun 2016 07:52:36 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C3B9EA7809; Mon, 13 Jun 2016 07:52:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 72A26A77CE for ; Mon, 13 Jun 2016 07:52:24 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GyxlpYf0A_To for ; Mon, 13 Jun 2016 07:52:24 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by theia.denx.de (Postfix) with ESMTPS id 17923A74D2 for ; Mon, 13 Jun 2016 07:52:22 +0200 (CEST) Received: by mail-io0-f178.google.com with SMTP id o127so65316322iod.2 for ; Sun, 12 Jun 2016 22:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=YPd7ZKK4zzJvb9USJxGUjKmues9tlSFfAPIlEH/smek=; b=FlRwTxXyOC0aGAuwd7PZ/XWSXmo8Homfy2Vma/+HX8Jxv71+f9nczz3QWLCRHOMqvl FosxAEpSVnne8xlcLi86bSU+9cytuCTtAijUek/E74IpE+iZcyz4r+HYL3XizxPzVNLI 3EC08MFHE2nx3/3gRIoybMZok4Q9RgmyHLfDxCgs5KxLvJIr/3FOliBxlNCJUBh0KSl9 PqN7qQhTO5F+Ip0q/rZ0U6lU+4VsuG5WwuS8wSZVSNCiob35mnRWjErvOgtJDxAcvibf u8Y8S2GhFHldnNn3zpUbzfcAEuh0JqRsEjL5KnGO5y7qoqr02ROJbjO3ixXC79buuwH/ p5dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=YPd7ZKK4zzJvb9USJxGUjKmues9tlSFfAPIlEH/smek=; b=e7H6By9fPrbcI2XGTtznCVxmqPGfiVx0E6ysrC9MiSuvW1wY9MuKtzW6Pq24BIx0Fd d+4S0S02yCi48tVTFfqst/bynmi+wBaakYtEr0/q+h6sfrLXOkcP86dvG9fXVup+Wc5W 4fT/TQF5Q9oEQtZilO+sOfERBRbD3iYIDGidrPgMob0l5VVN1uiCG2zllfBnCE5DlbNf wDcTf/Jqu+qRZ/EyuCVs+NRh5guko+1wlTFOpEZ+H7J9S92Qr29lRdxDKLGVFnDUQyEs k66KYzzqaGUoSoAU+Wuy7GP/yP7AJYZADmR/+Nq7YrfCX2YMWFDvQKekj2QpFwvjoVfM H81g== X-Gm-Message-State: ALyK8tKqAzVb4jdonimKta5x6TEyIi9Wr3c9ewaA4bKLSv+jfmPJ8I/zl07zAJuzv6c7B/c6 X-Received: by 10.107.35.129 with SMTP id j123mr22149495ioj.4.1465797141217; Sun, 12 Jun 2016 22:52:21 -0700 (PDT) Received: from kaki.bld.corp.google.com ([2620:0:1005:12:fc26:39ef:b365:2bcc]) by smtp.gmail.com with ESMTPSA id w10sm5712782itc.1.2016.06.12.22.52.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jun 2016 22:52:19 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id A91E2223F93; Sun, 12 Jun 2016 23:35:13 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 12 Jun 2016 23:33:22 -0600 Message-Id: <1465796016-18375-42-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1465796016-18375-1-git-send-email-sjg@chromium.org> References: <1465796016-18375-1-git-send-email-sjg@chromium.org> Cc: Tom Rini , huang lin , Jeffy Chen Subject: [U-Boot] [PATCH v2 41/55] dm: serial: ns16550: Update to support of-platdata X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" With of-platdata this driver cannot know the format of the of-platdata struct, so we cannot use generic code for accessing the of-platdata. Each SoC that uses this driver will need to set up ns16550's platdata for it. So don't compile in the generic code. Signed-off-by: Simon Glass --- Changes in v2: None drivers/serial/ns16550.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index c6cb3eb..88fca15 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -347,7 +347,7 @@ int ns16550_serial_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) int ns16550_serial_ofdata_to_platdata(struct udevice *dev) { struct ns16550_platdata *plat = dev->platdata; @@ -416,6 +416,7 @@ const struct dm_serial_ops ns16550_serial_ops = { .setbrg = ns16550_serial_setbrg, }; +#if !CONFIG_IS_ENABLED(OF_PLATDATA) #if CONFIG_IS_ENABLED(OF_CONTROL) /* * Please consider existing compatible strings before adding a new @@ -452,4 +453,5 @@ U_BOOT_DRIVER(ns16550_serial) = { .flags = DM_FLAG_PRE_RELOC, }; #endif +#endif /* !OF_PLATDATA */ #endif /* CONFIG_DM_SERIAL */