From patchwork Thu Jul 24 06:01:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 373121 X-Patchwork-Delegate: iwamatsu@nigauri.org 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 7AC831401E7 for ; Thu, 24 Jul 2014 16:01:48 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B2B45A770B; Thu, 24 Jul 2014 08:01:46 +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 u4c-59ONVHw7; Thu, 24 Jul 2014 08:01:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F758A76EC; Thu, 24 Jul 2014 08:01:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 13306A76D7 for ; Thu, 24 Jul 2014 08:01:38 +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 lKL19iKngO+b for ; Thu, 24 Jul 2014 08:01:34 +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-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by theia.denx.de (Postfix) with ESMTPS id 854F4A76EC for ; Thu, 24 Jul 2014 08:01:30 +0200 (CEST) Received: by mail-pa0-f42.google.com with SMTP id lf10so3248433pab.29 for ; Wed, 23 Jul 2014 23:01:27 -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; bh=UD9/DBEh97zeGF0vlqOrxCtJ45xKss2Ym1gyFnxQo1c=; b=hvbddrQx93zDqNSY4hhwLHaA3lWZXtGWfLHpvePJYq24mKU6SvyXWmL4EzbyklBciU cqYg+/WAZ9O1UKukcHzsvwrwzfsUmYryuG8B+kEw0rF5xozESuwth7tdWSctWQwB1M5b uloLlI1tl4Vrs1pq+OLkoXa4K/3w6H6pek0c5B5ZDZzvaWJN97Z0CEkFBAmxQHon9nJs zyRMgSUwMVy2VktI3sFqq2tINq+yhXhwrBWwz5NZHRcKCmi5euKyVLlEFF/lvJlnDvgV fyzr973UN5o7wB8muIR+6brgPVaYWNWP+We5wOlZGAFwj7c1sSj+hrMFcyEnH1rwZ2Ej JgWg== X-Gm-Message-State: ALoCoQnQE1GwKowf5z97FB5R9VyhxbApQxPVIbI5UxN1hH3hjXDPrxK8ntHrTuPsQzkHDAiLg+qp X-Received: by 10.68.174.33 with SMTP id bp1mr7643739pbc.74.1406181687774; Wed, 23 Jul 2014 23:01:27 -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 j17sm5825274pdl.31.2014.07.23.23.01.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Jul 2014 23:01:26 -0700 (PDT) From: Nobuhiro Iwamatsu To: u-boot@lists.denx.de, Heiko Schocher , Albert Aribaud Date: Thu, 24 Jul 2014 15:01:17 +0900 Message-Id: <1406181677-28240-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 2.0.0 Cc: Nobuhiro Iwamatsu Subject: [U-Boot] [PATCH] arm: rmobile: Add register infomation of i2c for rcar 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 This move to to the rcar_i2c.h the register address of the i2c that is defined in board config. Signed-off-by: Nobuhiro Iwamatsu --- arch/arm/include/asm/arch-rmobile/rcar_i2c.h | 29 ++++++++++++++++++++++++++++ drivers/i2c/rcar_i2c.c | 1 + include/configs/lager.h | 5 ----- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 arch/arm/include/asm/arch-rmobile/rcar_i2c.h diff --git a/arch/arm/include/asm/arch-rmobile/rcar_i2c.h b/arch/arm/include/asm/arch-rmobile/rcar_i2c.h new file mode 100644 index 0000000..763b91e --- /dev/null +++ b/arch/arm/include/asm/arch-rmobile/rcar_i2c.h @@ -0,0 +1,29 @@ +/* + * arch/arm/include/asm/arch-rmobile/rcar_i2c.h + * + * Copyright (C) 2014 Renesas Electronics Corporation + * Copyright (C) 2014 Nobuhiro Iwamatsu + * + * SPDX-License-Identifier: GPL-2.0 +*/ + +#ifndef __ASM_ARCH_RCAR_I2C_H +#define __ASM_ARCH_RCAR_I2C_H + +/* + * R-Car (R8A7790/R8A7791) I2C Addresses + */ +#define RCAR_I2C0_BASE 0xE6508000 +#define RCAR_I2C1_BASE 0xE6518000 +#define RCAR_I2C2_BASE 0xE6530000 +#define RCAR_I2C3_BASE 0xE6540000 +#define RCAR_I2C4_BASE 0xE6520000 +#define RCAR_I2C5_BASE 0xE6528000 + +#if defined(CONFIG_R8A7790) + #define RCAR_I2C_NUM_CONTROLLERS 4 +#elif defined(CONFIG_R8A7791) + #define RCAR_I2C_NUM_CONTROLLERS 6 +#endif + +#endif /* __ASM_ARCH_RCAR_I2C_H */ diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c index 50cebd6..d624637 100644 --- a/drivers/i2c/rcar_i2c.c +++ b/drivers/i2c/rcar_i2c.c @@ -10,6 +10,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/include/configs/lager.h b/include/configs/lager.h index f39a788..d1ea79d 100644 --- a/include/configs/lager.h +++ b/include/configs/lager.h @@ -148,15 +148,10 @@ /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_RCAR -#define CONFIG_SYS_RCAR_I2C0_BASE 0xE6508000 #define CONFIG_SYS_RCAR_I2C0_SPEED 400000 -#define CONFIG_SYS_RCAR_I2C1_BASE 0xE6518000 #define CONFIG_SYS_RCAR_I2C1_SPEED 400000 -#define CONFIG_SYS_RCAR_I2C2_BASE 0xE6530000 #define CONFIG_SYS_RCAR_I2C2_SPEED 400000 -#define CONFIG_SYS_RCAR_I2C3_BASE 0xE6540000 #define CONFIG_SYS_RCAR_I2C3_SPEED 400000 -#define CONFIF_SYS_RCAR_I2C_NUM_CONTROLLERS 4 #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */