From patchwork Wed Nov 14 09:11: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: 12832 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 E69EA23F56 for ; Wed, 14 Nov 2012 09:14:19 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7502DA18E91 for ; Wed, 14 Nov 2012 09:14:19 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so250881iej.11 for ; Wed, 14 Nov 2012 01:14:19 -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=41EV0sgjBrT/2x1cP08HjsDpQRI8Jb/t0ptolHy8Ys8=; b=eGFd4ehyvcjLx8FEPHLaqWTNb0jadqIYvA/du2AH4Yj9S0beMH3ZduW3D9pfg28Ihp Nn4N9ZaBLBbWWy00oi4YjE30B/H9OeA624Z8fAzM9f8WE0Ejh0SI7ru036/QX2nuhE3u PgmKp6E6bOOeosnPUsfCcETyexh7D//V4V6if/mvInLv7fji2+LH/vJaf6SIubMfhLK7 QEJGRO+d29IDMnCz246W/++PMzv7sF0v4icl4xXWDeC+MTP5XzTDk5429/K02/3W7ca1 omjFfujwpYiaR9I67YB3fsv+VBioWmmgxxW54MtdY+O06ULUPw9dnnk8wcpEMlpZV38m Z3OA== Received: by 10.43.7.132 with SMTP id oo4mr23708401icb.6.1352884458821; Wed, 14 Nov 2012 01:14:18 -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 n20csp632484igt; Wed, 14 Nov 2012 01:14:18 -0800 (PST) Received: by 10.66.89.98 with SMTP id bn2mr2223933pab.16.1352884458210; Wed, 14 Nov 2012 01:14:18 -0800 (PST) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id zw5si17352702pbc.217.2012.11.14.01.14.17; Wed, 14 Nov 2012 01:14:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@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 rajeshwari.s@samsung.com designates 203.254.224.33 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MDH008WA04M7UN0@mailout3.samsung.com>; Wed, 14 Nov 2012 18:10:17 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 14.69.01231.9FF53A05; Wed, 14 Nov 2012 18:10:17 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-d4-50a35ff994a9 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 33.69.01231.9FF53A05; Wed, 14 Nov 2012 18:10:17 +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 <0MDG00I7CZWU0Z70@mmp2.samsung.com>; Wed, 14 Nov 2012 18:10:17 +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, hs@denx.de Subject: [PATCH 6/6 V2] SMDK5250: Initialise I2C using FDT Date: Wed, 14 Nov 2012 14:41:19 +0530 Message-id: <1352884279-24067-7-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1352884279-24067-1-git-send-email-rajeshwari.s@samsung.com> References: <1352884279-24067-1-git-send-email-rajeshwari.s@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsWyRsSkTvdn/OIAg56XChYP199ksZhy+AuL A5PHnWt72AIYo7hsUlJzMstSi/TtErgy/mz+zl7wlLPi04ubLA2MjRxdjJwcEgImEsvn/2OF sMUkLtxbz9bFyMUhJLCUUeL2nTWMMEW9B+cwQSSmM0o8PPQPLCEkMJFJYnK7K4jNJmAksfXk NLC4iICExK/+q2A2s0CGxO0PS1hAbGEBK4n2t+fBtrEIqEq0bJkEFucV8JD4ffQIG8QyBYlj U7+C1XAKeEr8f9DDCrHLQ2Lyju1sEL0CEt8mHwLq5QCql5XYdIAZ5DYJgdtsEpuvvGGBmCMp cXDFDZYJjMILGBlWMYqmFiQXFCel5xrqFSfmFpfmpesl5+duYgSG4+l/z6R2MK5ssDjEKMDB qMTD+7F1UYAQa2JZcWXuIUYJDmYlEd5Yq8UBQrwpiZVVqUX58UWlOanFhxh9gC6ZyCwlmpwP jJW8knhDYxNzU2NTSyMjM1NTHMJK4rzNHikBQgLpiSWp2ampBalFMOOYODilGhizKo+eXiu7 ++KmGYsDzlenBz7wN5/xz/qYjQFzRz6L15r8WwsusNTNjtzEdp/39J5JBkIxX5O+x7fNvlyz 4yeLp4FAqYEyb/eDltUzJ+UxBdwIdSl/LP9mxUeDb6zzLjtMPxB1vZDTzLAtsWy7e1Hapffl fr5rZx/YwLNvqk1P8YyQlV1qMX+VWIozEg21mIuKEwGZmQJedAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRmVeSWpSXmKPExsVy+t9jQd2f8YsDDJ6uErF4uP4mi8WUw19Y HJg87lzbwxbAGNXAaJORmpiSWqSQmpecn5KZl26r5B0c7xxvamZgqGtoaWGupJCXmJtqq+Ti E6DrlpkDNFtJoSwxpxQoFJBYXKykb4dpQmiIm64FTGOErm9IEFyPkQEaSFjDmPFn83f2gqec FZ9e3GRpYGzk6GLk5JAQMJHoPTiHCcIWk7hwbz1bFyMXh5DAdEaJh4f+MYIkhAQmMklMbncF sdkEjCS2npwGFhcRkJD41X8VzGYWyJC4/WEJC4gtLGAl0f72PCuIzSKgKtGyZRJYnFfAQ+L3 0SNsEMsUJI5N/QpWwyngKfH/QQ8rxC4Pick7trNNYORdwMiwilE0tSC5oDgpPddQrzgxt7g0 L10vOT93EyM42J9J7WBc2WBxiFGAg1GJh/dj66IAIdbEsuLK3EOMEhzMSiK8sVaLA4R4UxIr q1KL8uOLSnNSiw8x+gBdNZFZSjQ5HxiJeSXxhsYm5qbGppYmFiZmljiElcR5mz1SAoQE0hNL UrNTUwtSi2DGMXFwSjUwTrXKcZrwXv/jJld7A0WlpRMM7xzJ4RLbN6vl+asemdkdfFc+zj9R vfXarhSr3r5vMneZbd8bLmpy23lvoqFF0rKkj9tav++9X3ry2c03LK47P4S9qeD5Zu6fvblC cvsL8eTnkZuyeyb+d/S2jzY8qqhfqW18+XewwbbtRdzVcma/bCQDRXelKbEUZyQaajEXFScC AAEAC8WjAgAA X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQmYdkUrS9uxZc+VwJXE8R1rupmMuTUWb5eaZPBYRVsZ3iHj/JR4Tq4WX91tPvsq6S9IOwnj This patch initialises I2C using FDT. Signed-off-by: Rajeshwari Shinde Acked-by: Simon Glass Acked-by: Heiko Schocher --- Changes since V2: - board_i2c_init moved to driver in case of FDT. 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 db2457b..5ebc665 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -272,24 +272,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) { @@ -300,7 +282,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; }