From patchwork Wed Mar 6 08:48:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 15251 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C88C023E3E for ; Wed, 6 Mar 2013 08:51:32 +0000 (UTC) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by fiordland.canonical.com (Postfix) with ESMTP id 3B814A18FD9 for ; Wed, 6 Mar 2013 08:51:32 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id 15so6585330vea.28 for ; Wed, 06 Mar 2013 00:51:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-auditid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-brightmail-tracker:x-brightmail-tracker :dlp-filter:x-mtr:x-cfilter-loop:x-gm-message-state; bh=N5vA/xrFAxQbLMJvvePXcxMZtp2j07eshlugmMVj0w8=; b=R2VPfaa82vrTHkczlYwdUgyTFQFzRc6o1RpoBZMWgXuinarzZ/bdTGF+GP1My2qB9Z g+315b/vKa/mqWybGAHjieSMsGI0VnSQeb4Bl7UyCnWwLWb5sVvozvF8wNVmx3ChpJSc rlGajkp9nNf0nAd69JNJQLiR/RrMl3gf9xptTMA/oxivspHWjWRMgTxjeSb7Cz256lMB VVlbaUEaPvdDeG1EEXrJtg0T0eSbAKcwk7wvgPYzOR4zSugqevlrSQVur8lPyRIYrPjB nse3/i6LchF+pTs0d9SL+mQgFajCJ4t3bsy6Qwd0R+ehrtiCiF+XiQocM+uiNTB6MJzA sTng== X-Received: by 10.52.93.235 with SMTP id cx11mr9336611vdb.51.1362559891652; Wed, 06 Mar 2013 00:51:31 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp4150veb; Wed, 6 Mar 2013 00:51:30 -0800 (PST) X-Received: by 10.68.49.73 with SMTP id s9mr12205376pbn.106.1362559889921; Wed, 06 Mar 2013 00:51:29 -0800 (PST) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id ai10si25610289pbd.40.2013.03.06.00.51.29; Wed, 06 Mar 2013 00:51:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.33 as permitted sender) client-ip=203.254.224.33; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.33 as permitted sender) smtp.mail=gautam.vivek@samsung.com Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MJ8009M8DWY3SW0@mailout3.samsung.com> for patches@linaro.org; Wed, 06 Mar 2013 17:50:58 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id D7.E8.25214.27307315; Wed, 06 Mar 2013 17:50:58 +0900 (KST) X-AuditID: cbfee68e-b7fa46d00000627e-09-513703726a71 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D2.60.03918.27307315; Wed, 06 Mar 2013 17:50:58 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.214.169]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MJ80010MDW69F80@mmp1.samsung.com> for patches@linaro.org; Wed, 06 Mar 2013 17:50:58 +0900 (KST) From: Vivek Gautam To: u-boot@lists.denx.de Cc: patches@linaro.org, mk7.kang@samsung.com, marex@denx.de, sjg@chromium.org, rajeshwari.s@samsung.com Subject: [PATCH v4 2/2] usb: ehci: exynos: Enable non-dt path Date: Wed, 06 Mar 2013 14:18:33 +0530 Message-id: <1362559713-6743-3-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: <1362559713-6743-1-git-send-email-gautam.vivek@samsung.com> References: <1362559713-6743-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCLMWRmVeSWpSXmKPExsWyRsSkTreI2TzQYMcDRYsph7+wODB63Lm2 hy2AMYrLJiU1J7MstUjfLoErY+LDHWwFM3krFl44z9zA+IKri5GTQ0LARGLli+PsELaYxIV7 69m6GLk4hASWMkr8eHuACaZo0rsrzBCJRYwS3d0voZzVTBLLV59nBKliE9CVaHq7C8wWEZCQ +NV/FcxmFsiUeLf5EjOILSxgK/H2yhmgdRwcLAKqEh82pYGEeQXcJZp/nGaDWKYg8eb2M7By TgEPifsrTrCAlAsB1azd6QayVkLgMpvEtG/NYPUsAgIS3yYfAquREJCV2HSAGWKMpMTBFTdY JjAKL2BkWMUomlqQXFCclF5kpFecmFtcmpeul5yfu4kRGIKn/z3r28F484D1IcZkoHETmaVE k/OBIZxXEm9obGJuamxqZmRpaWlKmrCSOK/8JZlAIYH0xJLU7NTUgtSi+KLSnNTiQ4xMHJxS DYzLc02lTh28x39afJ63v97zZt1s3bQyDpbsr4GTnzIUfQ9nFjt+qelccEYY1/VH/ftYyu9I Hl3RP23KlT/hov2aHwU2O6378/rVfRWbiVUnts1r6jm+PXe76P5Pu8LuaCz7ujnH+lskV+W9 9R62YWWbUt6dDMiVdl8w/XGChPaiw2c5d55t9Q1WYinOSDTUYi4qTgQAQQNL9FcCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsVy+t9jAd0iZvNAgw8TBSymHP7C4sDocefa HrYAxqgGRpuM1MSU1CKF1Lzk/JTMvHRbJe/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wc oLFKCmWJOaVAoYDE4mIlfTtME0JD3HQtYBojdH1DguB6jAzQQMIaxoyJD3ewFczkrVh44Txz A+MLri5GTg4JAROJSe+uMEPYYhIX7q1n62Lk4hASWMQo0d39khnCWc0ksXz1eUaQKjYBXYmm t7vAbBEBCYlf/VfBbGaBTIl3my+BTRIWsJV4e+UMexcjBweLgKrEh01pIGFeAXeJ5h+n2SCW KUi8uf0MrJxTwEPi/ooTLCDlQkA1a3e6TWDkXcDIsIpRNLUguaA4KT3XUK84Mbe4NC9dLzk/ dxMjOMCfSe1gXNlgcYhRgINRiYfXQsksUIg1say4MvcQowQHs5IIL9cZoBBvSmJlVWpRfnxR aU5q8SHGZKCbJjJLiSbnA6MvryTe0NjE3NTY1NLEwsTMkjRhJXFexlNPAoQE0hNLUrNTUwtS i2C2MHFwSjUwhqY11d5i5kv4lylp6q7R6fP7XtsqjQOfwzvm5a+M4v8bf4czc01/hBYfZ4/o ldy2g3lih5jnM2W7tG0wFako9p2S17jvwA/1q1+az93713m2snj7r//ri+/rsnKYF6c+/Of8 LTq0PYtz7e13XkVrl81ZcbiR2/zk5Z/8+068VNTbsNGkdC+HEktxRqKhFnNRcSIARyYZqLQC AAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQn0qe1uaZZfSkB6Q7SlwKNBvoYNHXRuDvWcrH3k5i93kpgm94DDnOPQQDGSX0SeALXjoEBX Enabling the non-dt path for the driver so that we don't get any build errors for non-dt configuration. Signed-off-by: Vivek Gautam Acked-by: Simon Glass --- Changes from v3: - No change Changes from v2: - Adding necessary typecast (struct ehci_hccr *) for ctx->hcd. Changes from v1: - Using CONFIG_OF_CONTROL around exynos_usb_parse_dt() definition since it is used for DT systems only. drivers/usb/host/ehci-exynos.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index c4c90be..0c797aa 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -47,6 +47,7 @@ struct exynos_ehci { static struct exynos_ehci exynos; +#ifdef CONFIG_OF_CONTROL static int exynos_usb_parse_dt(const void *blob, struct exynos_ehci *exynos) { fdt_addr_t addr; @@ -90,6 +91,7 @@ static int exynos_usb_parse_dt(const void *blob, struct exynos_ehci *exynos) return 0; } +#endif /* Setup the EHCI host controller. */ static void setup_usb_phy(struct exynos_usb_phy *usb) @@ -151,10 +153,15 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { struct exynos_ehci *ctx = &exynos; +#ifdef CONFIG_OF_CONTROL if (exynos_usb_parse_dt(gd->fdt_blob, ctx)) { debug("Unable to parse device tree for ehci-exynos\n"); return -ENODEV; } +#else + ctx->usb = (struct exynos_usb_phy *)samsung_get_base_usb_phy(); + ctx->hcd = (struct ehci_hccr *)samsung_get_base_usb_ehci(); +#endif setup_usb_phy(ctx->usb);