From patchwork Thu Oct 17 07:18:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 284107 X-Patchwork-Delegate: hs@denx.de 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 D26B02C009D for ; Thu, 17 Oct 2013 18:19:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 62E554A0D7; Thu, 17 Oct 2013 09:19:25 +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 okOAXDN4GAMS; Thu, 17 Oct 2013 09:19:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 64DF34A0DF; Thu, 17 Oct 2013 09:19:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C0D614A0BB for ; Thu, 17 Oct 2013 09:19:05 +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 n4C8Bza6gO0H for ; Thu, 17 Oct 2013 09:18:59 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=SKIP(-1.5) (only DNSBL check requested) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by theia.denx.de (Postfix) with ESMTPS id 728964A0B9 for ; Thu, 17 Oct 2013 09:18:56 +0200 (CEST) Received: by mail-pd0-f170.google.com with SMTP id x10so2267166pdj.15 for ; Thu, 17 Oct 2013 00:18:55 -0700 (PDT) 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=6JJM4V9Yz2UCkVhxi1nTSTj3e0A1Fyl8KJOUNfO5ESM=; b=bPWFgL/3Gtsy0iTzpuuEaIP2PsrhBWutS0l7b9ctAWuxFiieZxg9FtPIFVCMgxmmtz mo6dplb3lc8iaQs5KpJO55Dlhry/j2DFhmv6oF5z1kbmXaKRrItxzygftKGDzQFgCwyi 2bg9J6RTsRYsctXIO/WTcJCsKLygfEQToyedGhZqt8NfZSFmI23sids84p9lWwW/CL0n vOB2xswQPQBoY+2PDhDmGJ6zM7dJtG3hCnIhstzYvFdi0EGRVZb5lKP9X5Nru8SNKdc1 PC5wOk2UaqUj8wu5TdP90antPv9pxF4yYZIRnbtLJd8lbLsqX69aJouMrj8ZOYFeCUUf lnBg== X-Gm-Message-State: ALoCoQl+aeZvkkpJh/NutETUJpigaKExnwuKNEkyIUrivz4Eip/VFjN3EI1zLD6slCEbND6jfWyC X-Received: by 10.66.102.9 with SMTP id fk9mr7745583pab.41.1381994335218; Thu, 17 Oct 2013 00:18:55 -0700 (PDT) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id fk4sm112108520pab.23.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Oct 2013 00:18:54 -0700 (PDT) From: Nobuhiro Iwamatsu To: u-boot@lists.denx.de Date: Thu, 17 Oct 2013 16:18:32 +0900 Message-Id: <1381994312-10728-3-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381994312-10728-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> References: <1381994312-10728-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> Cc: Nobuhiro Iwamatsu Subject: [U-Boot] [PATCH 3/3] sh: ecovec: Update to new I2C framework 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 Ecovec uses sh_i2c driver. sh_i2c driver updated to new I2C framwork. This updates ecovec to this change. Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/ecovec/ecovec.c | 4 ++-- include/configs/ecovec.h | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/board/renesas/ecovec/ecovec.c b/board/renesas/ecovec/ecovec.c index e2d365a..4289d2d 100644 --- a/board/renesas/ecovec/ecovec.c +++ b/board/renesas/ecovec/ecovec.c @@ -57,8 +57,8 @@ int board_late_init(void) outl(inl(MSTPCR2) & ~0x10000000, MSTPCR2); - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - i2c_set_bus_num(CONFIG_SYS_I2C_MODULE); /* Use I2C 1 */ + i2c_init(CONFIG_SYS_I2C_SH_SPEED1, CONFIG_SYS_I2C_SLAVE); + i2c_set_bus_num(1); /* Use I2C 1 */ /* Read MAC address */ i2c_read(0x50, 0x10, 0, mac, 6); diff --git a/include/configs/ecovec.h b/include/configs/ecovec.h index 34bd0b3..b0c41b1 100644 --- a/include/configs/ecovec.h +++ b/include/configs/ecovec.h @@ -58,18 +58,17 @@ /* I2C */ #define CONFIG_CMD_I2C -#define CONFIG_SH_I2C 1 -#define CONFIG_HARD_I2C 1 -#define CONFIG_I2C_MULTI_BUS 1 -#define CONFIG_SYS_MAX_I2C_BUS 2 -#define CONFIG_SYS_I2C_MODULE 1 -#define CONFIG_SYS_I2C_SPEED 100000 /* 100 kHz */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SH #define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 2 +#define CONFIG_SYS_I2C_SH_BASE0 0xA4470000 +#define CONFIG_SYS_I2C_SH_SPEED0 100000 +#define CONFIG_SYS_I2C_SH_BASE1 0xA4750000 +#define CONFIG_SYS_I2C_SH_SPEED1 100000 #define CONFIG_SH_I2C_DATA_HIGH 4 #define CONFIG_SH_I2C_DATA_LOW 5 #define CONFIG_SH_I2C_CLOCK 41666666 -#define CONFIG_SH_I2C_BASE0 0xA4470000 -#define CONFIG_SH_I2C_BASE1 0xA4750000 /* Ether */ #define CONFIG_SH_ETHER 1