From patchwork Fri Dec 14 11:56:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 13572 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 B348923FC0 for ; Fri, 14 Dec 2012 11:54:39 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4EDABA18E8C for ; Fri, 14 Dec 2012 11:54:39 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so2985600iag.11 for ; Fri, 14 Dec 2012 03:54:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :dlp-filter:x-mtr:x-brightmail-tracker:x-brightmail-tracker :x-cfilter-loop:x-gm-message-state; bh=wI2NJ3F+xgL3PDg2bG6pkMfjbQU2Y2AcXiK/0iQqCts=; b=Y3t2QjXoxglQOWsmfFzGbQPTn2RIOvIiHsDLIVYku/Fmz2CfGtlidvhcTHIGknake9 F6SbhlAOH/DEvK00x9H5M15R6690/lshNoqT0KdY+bdDRZgrXi/aSxQRHu+qHiDEofSB IK4veqZvXuCfmDAz1hmhvF2nNLMbM47s2yvjMIgggaKkpwTYD3xyxitAlcLOJNP/yuQq /HQ02lABpY/2BXTM2JX1fxKjfDfw1UKDfblR+PBL7I2+fcP3n/cn3H3GG95u9WbLLhGL Q0nwHJbxt5U5JpEWtzWXH6Y2Dqtdm7SBZcZqJBecnK6DW7D2JDgFcI5T3UI7MZD60cey Vb4A== Received: by 10.50.42.168 with SMTP id p8mr1238244igl.57.1355486078684; Fri, 14 Dec 2012 03:54:38 -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.50.67.148 with SMTP id n20csp67281igt; Fri, 14 Dec 2012 03:54:38 -0800 (PST) Received: by 10.69.0.8 with SMTP id au8mr15128323pbd.58.1355486077965; Fri, 14 Dec 2012 03:54:37 -0800 (PST) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id ru9si4676500pbc.190.2012.12.14.03.54.37; Fri, 14 Dec 2012 03:54:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.25 as permitted sender) client-ip=203.254.224.25; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.25 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MF0003OQRR0CDB0@mailout2.samsung.com>; Fri, 14 Dec 2012 20:54:36 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id C0.64.01231.C731BC05; Fri, 14 Dec 2012 20:54:36 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-4a-50cb137cb51d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 60.64.01231.C731BC05; Fri, 14 Dec 2012 20:54:36 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MF000GYFRKI4870@mmp2.samsung.com>; Fri, 14 Dec 2012 20:54:36 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org Subject: [PATCH 06/16] SMDK5250: Initialise I2C using FDT Date: Fri, 14 Dec 2012 17:26:19 +0530 Message-id: <1355486189-432-6-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1355486189-432-1-git-send-email-rajeshwari.s@samsung.com> References: <1355486189-432-1-git-send-email-rajeshwari.s@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsWyRsSkTrdG+HSAwdYzJhYP199ksZhy+AuL A5PHnWt72AIYo7hsUlJzMstSi/TtErgyJu69y1SwhKvi20bpBsbdHF2MnBwSAiYSmz+3sULY YhIX7q1n62Lk4hASWMoocfXDGRaYot5ji5ghEtMZJRY8aWWHcCYySezf+gWsik3ASGLryWmM ILaIgITEr/6rYDazQIzE6/0/2EBsYQFLiXMzT4PVswioSrSvnM8MYvMKuEncmtAIdYaCxLGp X8FsTgF3iZNv7oHVCAHVrOhZxgbRKyDxbfIhoDkcQPWyEpsOgB0nIXCdTeLrsqfsEHMkJQ6u uMEygVF4ASPDKkbR1ILkguKk9FxDveLE3OLSvHS95PzcTYzAcDz975nUDsaVDRaHGAU4GJV4 eD8KnQoQYk0sK67MPcQowcGsJMIreQQoxJuSWFmVWpQfX1Sak1p8iNEH6JKJzFKiyfnAWMkr iTc0NjE3NTa1NDIyMzXFIawkztvskRIgJJCeWJKanZpakFoEM46Jg1OqgTHs3ymbRh63eLVa vq57l1/tKnW9KGkbktXhUy+8SfTMsl93+zNzNqgsXbKuXe3wt3BZL6unz/6t1tQpOTnrjKFD jW2BsYfO3INJVuurp9z9/u/Sez6vn3ar30R++X6rZFVuLNuOzuPR8sc7+ZczMJ1P3Px1e8Yb xvlcB+S4PW8q6EnViJ4KS1JiKc5INNRiLipOBACUOzvqdAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRmVeSWpSXmKPExsVy+t9jQd0a4dMBBrsvqls8XH+TxWLK4S8s Dkwed67tYQtgjGpgtMlITUxJLVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLx CdB1y8wBmq2kUJaYUwoUCkgsLlbSt8M0ITTETdcCpjFC1zckCK7HyAANJKxhzJi49y5TwRKu im8bpRsYd3N0MXJySAiYSPQeW8QMYYtJXLi3nq2LkYtDSGA6o8SCJ63sEM5EJon9W7+wgFSx CRhJbD05jRHEFhGQkPjVfxXMZhaIkXi9/wcbiC0sYClxbuZpsHoWAVWJ9pXzwTbwCrhJ3JrQ yAqxTUHi2NSvYDangLvEyTf3wGqEgGpW9Cxjm8DIu4CRYRWjaGpBckFxUnquoV5xYm5xaV66 XnJ+7iZGcLA/k9rBuLLB4hCjAAejEg/vR6FTAUKsiWXFlbmHGCU4mJVEeCWPAIV4UxIrq1KL 8uOLSnNSiw8x+gBdNZFZSjQ5HxiJeSXxhsYm5qbGppYmFiZmljiElcR5mz1SAoQE0hNLUrNT UwtSi2DGMXFwSjUwltm1+tk4Ripd8dB6ZReWePAz8yKXg+daFcrPX9r93enmbz/3RZ+rF3Ya mLY05pTvPjn1/Lnfsxay+h7q9juz+vkKI5+UK0qKD76tlv19UXT5+5veq169zlURnCPCwGg+ +wDvhbwexwSJD0LKC5Vm+Vb5af8s6LFcYTPhqk6VrdT8t9UzrB8FKLEUZyQaajEXFScCAK9S Z7+jAgAA X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQkeCVZctxTVrUDi/t7YtTCYGtJE0S+7UQUEoZDmD1PuYT1+fyZc0l1boz34OvuIT6Q3Hy4n This patch initialises I2C using FDT. Signed-off-by: Rajeshwari Shinde Acked-by: Simon Glass Acked-by: Heiko Schocher --- Changes in V1: -Rebased on latest u-boot-samsung board/samsung/smdk5250/smdk5250.c | 20 +------------------- 1 files changed, 1 insertions(+), 19 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index ac7346d..4d24978 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -236,24 +236,6 @@ static int board_uart_init(void) return 0; } -#ifdef CONFIG_SYS_I2C_INIT_BOARD -static int board_i2c_init(void) -{ - int i, err; - - for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) { - err = exynos_pinmux_config((PERIPH_ID_I2C0 + i), - PINMUX_FLAG_NONE); - if (err) { - debug("I2C%d not configured\n", (PERIPH_ID_I2C0 + i)); - return err; - } - } - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - return 0; -} -#endif - #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { @@ -264,7 +246,7 @@ int board_early_init_f(void) return err; } #ifdef CONFIG_SYS_I2C_INIT_BOARD - err = board_i2c_init(); + board_i2c_init(gd->fdt_blob); #endif return err; }