From patchwork Mon Oct 14 08:27:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "esw@bus-elektronik.de" X-Patchwork-Id: 283152 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 6AF1E2C0335 for ; Mon, 14 Oct 2013 19:28:03 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8CC924A08F; Mon, 14 Oct 2013 10:28:01 +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 5YUSMYuoRgMK; Mon, 14 Oct 2013 10:28:01 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 404254A092; Mon, 14 Oct 2013 10:28:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B3FAE4A092 for ; Mon, 14 Oct 2013 10:27:54 +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 zbfq5I-YqiUF for ; Mon, 14 Oct 2013 10:27:49 +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 smtp.bus-elektronik.de (smtp.bus-elektronik.de [212.144.119.5]) by theia.denx.de (Postfix) with ESMTPS id 7E2D64A08F for ; Mon, 14 Oct 2013 10:27:43 +0200 (CEST) Received: from CAS2.busriesa.bus (192.168.30.80) by Edge-Transport.busriesa.bus (192.168.30.20) with Microsoft SMTP Server (TLS) id 14.1.438.0; Mon, 14 Oct 2013 10:27:39 +0200 Received: from bus-elektronik.net (10.0.0.198) by cas.busriesa.bus (192.168.53.173) with Microsoft SMTP Server id 14.2.347.0; Mon, 14 Oct 2013 10:27:41 +0200 Received: by bus-elektronik.net (Postfix, from userid 500) id 68FC38E12DC; Mon, 14 Oct 2013 10:27:41 +0200 (CEST) From: "Jens Scharsig (BuS Elektronik)" To: Date: Mon, 14 Oct 2013 10:27:38 +0200 Message-ID: <1381739258-10011-1-git-send-email-esw@bus-elektronik.de> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 Cc: js_at_ng@scharsoft.de Subject: [U-Boot] [PATCH] Fix: nommu I2C adapter relocation error 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: "Jens Scharsig (BuS Elektronik)" NoMMU systems have a access violation problem with i2c_reloc_fixup. Blame for it is a double relocation of the adapter itself. The i2c_adap_p is already relocated, if i2c_reloc_fixup is called. This patch removes the relocation of i2c_adap_p from i2c_reloc_fixup to fix this. Signed-off-by: Jens Scharsig (BuS Elektronik) --- drivers/i2c/i2c_core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c index d1072e8..bb5d4db 100644 --- a/drivers/i2c/i2c_core.c +++ b/drivers/i2c/i2c_core.c @@ -53,10 +53,6 @@ void i2c_reloc_fixup(void) return; for (i = 0; i < max; i++) { - /* adapter itself */ - addr = (unsigned long)i2c_adap_p; - addr += gd->reloc_off; - i2c_adap_p = (struct i2c_adapter *)addr; /* i2c_init() */ addr = (unsigned long)i2c_adap_p->init; addr += gd->reloc_off;