From patchwork Thu Oct 17 07:18:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 284108 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 6698D2C00C5 for ; Thu, 17 Oct 2013 18:19:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 18E754A0E1; Thu, 17 Oct 2013 09:19:33 +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 9UifrGOCOPR5; Thu, 17 Oct 2013 09:19:32 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 65EBB4A0E7; Thu, 17 Oct 2013 09:19:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1EFC74A0DD for ; Thu, 17 Oct 2013 09:19:10 +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 aPvjMokiCuGK for ; Thu, 17 Oct 2013 09:19:05 +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-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by theia.denx.de (Postfix) with ESMTPS id 17C664A0BA for ; Thu, 17 Oct 2013 09:18:53 +0200 (CEST) Received: by mail-pb0-f42.google.com with SMTP id un15so1949619pbc.1 for ; Thu, 17 Oct 2013 00:18:51 -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=oI0cJnQrryS/Ieb88xXHb5KNuXYrUVIGfRBV8F43yek=; b=CvU3bsRXWef72Vilo9PV+s0C83PLrLxpf4lE1hz0WiwRP9p6S/KBliu6LMeP5c9J23 8kcz5QpYQpvMmYXEGUfK0sWwJICXkGJD5iZI1wv12p2XyIWiNqGgat6FLcTdNxz6HQR3 YFk5jdgH2feBoIfvlUK0dvHgBamsXlGUn56XjjNeZ84ZqVXZwTiGPXFB4yVxVHZcDyiy ybpD4g5Q4FZ6CiLpiDr4nengzrXKHa0SCCelpw9rO4FR2P8/V7HTUX39Gl2ZLooXzJEf YAjIaJyQDCcYa9WMmPRgo4jkSz9hNaJy+H9oUUAtyIMcRYsVYwWcGE8BECIRwe8WNNOH RSpQ== X-Gm-Message-State: ALoCoQmmkcUpnruSccJf5Vw2ns5q/B0AA1W1slIpPmKjn2enMmypNyugoRCZxThx6dnpPGQBpr5F X-Received: by 10.68.234.97 with SMTP id ud1mr2819431pbc.72.1381994331808; Thu, 17 Oct 2013 00:18:51 -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:50 -0700 (PDT) From: Nobuhiro Iwamatsu To: u-boot@lists.denx.de Date: Thu, 17 Oct 2013 16:18:31 +0900 Message-Id: <1381994312-10728-2-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 2/3] arm: kzm9g: 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 Kzm9g uses sh_i2c driver. sh_i2c driver updated to new I2C framwork. This updates kzm9g to this change. Signed-off-by: Nobuhiro Iwamatsu --- board/kmc/kzm9g/kzm9g.c | 2 +- include/configs/kzm9g.h | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c index b669ffe..0ec5e8e 100644 --- a/board/kmc/kzm9g/kzm9g.c +++ b/board/kmc/kzm9g/kzm9g.c @@ -289,7 +289,7 @@ void adjust_core_voltage(void) { u8 data; - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); + i2c_init(CONFIG_SYS_I2C_SH_SPEED0, CONFIG_SYS_I2C_SLAVE); data = 0x35; i2c_set_bus_num(0); i2c_write(0x40, 3, 1, &data, 1); diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h index 6323050..9a3d2f8 100644 --- a/include/configs/kzm9g.h +++ b/include/configs/kzm9g.h @@ -141,21 +141,22 @@ /* I2C */ #define CONFIG_CMD_I2C -#define CONFIG_SH_I2C 1 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SH +#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 5 +#define CONFIG_SYS_I2C_SH_BASE0 0xE6820000 +#define CONFIG_SYS_I2C_SH_SPEED0 100000 +#define CONFIG_SYS_I2C_SH_BASE1 0xE6822000 +#define CONFIG_SYS_I2C_SH_SPEED1 100000 +#define CONFIG_SYS_I2C_SH_BASE2 0xE6824000 +#define CONFIG_SYS_I2C_SH_SPEED2 100000 +#define CONFIG_SYS_I2C_SH_BASE3 0xE6826000 +#define CONFIG_SYS_I2C_SH_SPEED3 100000 +#define CONFIG_SYS_I2C_SH_BASE4 0xE6828000 +#define CONFIG_SYS_I2C_SH_SPEED4 100000 #define CONFIG_SH_I2C_8BIT -#define CONFIG_HARD_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS (5) -#define CONFIG_SYS_I2C_MODULE -#define CONFIG_SYS_I2C_SPEED (100000) /* 100 kHz */ -#define CONFIG_SYS_I2C_SLAVE (0x7F) -#define CONFIG_SH_I2C_DATA_HIGH (4) -#define CONFIG_SH_I2C_DATA_LOW (5) -#define CONFIG_SH_I2C_CLOCK (104000000) /* 104 MHz */ -#define CONFIG_SH_I2C_BASE0 (0xE6820000) -#define CONFIG_SH_I2C_BASE1 (0xE6822000) -#define CONFIG_SH_I2C_BASE2 (0xE6824000) -#define CONFIG_SH_I2C_BASE3 (0xE6826000) -#define CONFIG_SH_I2C_BASE4 (0xE6828000) +#define CONFIG_SH_I2C_DATA_HIGH 4 +#define CONFIG_SH_I2C_DATA_LOW 5 +#define CONFIG_SH_I2C_CLOCK 104000000 /* 104 MHz */ #endif /* __KZM9G_H */