From patchwork Tue Sep 23 23:30:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 392708 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 292EC1400B2 for ; Wed, 24 Sep 2014 09:39:19 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B246EA73F0; Wed, 24 Sep 2014 01:39:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 lJJ09JLPCiuW; Wed, 24 Sep 2014 01:39:17 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 07F5BA73F8; Wed, 24 Sep 2014 01:39:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20584A73FB for ; Wed, 24 Sep 2014 01:39:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 j0gwi1OjPNBD for ; Wed, 24 Sep 2014 01:39:10 +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-qg0-f73.google.com (mail-qg0-f73.google.com [209.85.192.73]) by theia.denx.de (Postfix) with ESMTPS id DE1B4A73E2 for ; Wed, 24 Sep 2014 01:39:06 +0200 (CEST) Received: by mail-qg0-f73.google.com with SMTP id z107so188768qgd.4 for ; Tue, 23 Sep 2014 16:39:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KF+0B3ncEAIt5d3B+LDsBYOZNNp7OSa+kilU8GAbzWU=; b=b6jc0avU3Ldw67bzP8QVtkHHRplTqXAxkXbyRGn+8yCzxrINy7yJYu52o1m1zMBSqP au+AMXHvIbCWluDvq31pQnc3ygVmCRsUs4FL/LjSp1Oc0YEpwnO/mRPfJCMzi2j8pfF2 tPw8IQA6m55OhT7qI523fYZsjHHSGI3UnrmJ8kNNgf7a9SuIlf2UrEsi0Yo2aoiGUqYV hwYkkqxSoH9SZNn4cItH5NApKWexSK7QRMirtVL75A7dONVLt/2u/D1orrQYIb/ntFa1 WUXjJdwCfeZvyr/NHqSbCGGwbvD58UUQzS2A9mNmTwj9CmjAtEWjPO9h3mHFSLHUKgC0 MX0Q== X-Gm-Message-State: ALoCoQnZkKphjosCWchphMA4AXKQ3RbNOWcqRQf06PUo7FbGm8uplyN65kgUYwGumH5MvfAAKyUb X-Received: by 10.224.10.199 with SMTP id q7mr2627842qaq.7.1411515544883; Tue, 23 Sep 2014 16:39:04 -0700 (PDT) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id t28si726521yhb.4.2014.09.23.16.39.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Sep 2014 16:39:04 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id PSsfEQC6.1; Tue, 23 Sep 2014 16:39:04 -0700 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 46CB7221CAE; Tue, 23 Sep 2014 17:30:24 -0600 (MDT) From: Simon Glass To: u-boot@lists.denx.de Date: Tue, 23 Sep 2014 17:30:03 -0600 Message-Id: <1411515008-4483-10-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1411515008-4483-1-git-send-email-sjg@chromium.org> References: <1411515008-4483-1-git-send-email-sjg@chromium.org> Cc: Stephen Warren , Tom Warren Subject: [U-Boot] [RFC PATCH 09/14] dm: tegra: Add platform data for the SPL uart X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Since we currently don't have device tree available in SPL, add platform data so the uart works. Signed-off-by: Simon Glass --- drivers/serial/serial_tegra.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/serial/serial_tegra.c b/drivers/serial/serial_tegra.c index 7eb70e1..b9227f0 100644 --- a/drivers/serial/serial_tegra.c +++ b/drivers/serial/serial_tegra.c @@ -9,6 +9,7 @@ #include #include +#ifdef CONFIG_OF_CONTROL static const struct udevice_id tegra_serial_ids[] = { { .compatible = "nvidia,tegra20-uart" }, { } @@ -26,13 +27,28 @@ static int tegra_serial_ofdata_to_platdata(struct udevice *dev) return 0; } +#else +struct ns16550_platdata tegra_serial = { + .base = CONFIG_SYS_NS16550_COM1, + .reg_shift = 2, + .clock = V_NS16550_CLK, +}; + +U_BOOT_DEVICE(ns16550_serial) = { + "serial_tegra20", &tegra_serial +}; +#endif + U_BOOT_DRIVER(serial_ns16550) = { .name = "serial_tegra20", .id = UCLASS_SERIAL, +#ifdef CONFIG_OF_CONTROL .of_match = tegra_serial_ids, .ofdata_to_platdata = tegra_serial_ofdata_to_platdata, .platdata_auto_alloc_size = sizeof(struct ns16550_platdata), +#endif .priv_auto_alloc_size = sizeof(struct NS16550), .probe = ns16550_serial_probe, .ops = &ns16550_serial_ops, + .flags = DM_FLAG_PRE_RELOC, };