From patchwork Mon Oct 14 16:25:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Burr X-Patchwork-Id: 283297 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 8EC6C2C032E for ; Tue, 15 Oct 2013 03:25:35 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 69CDB4A0AF; Mon, 14 Oct 2013 18:25:30 +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 56BTE9Ozqxy0; Mon, 14 Oct 2013 18:25:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A2D3F4A0A9; Mon, 14 Oct 2013 18:25:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F42A4A088 for ; Mon, 14 Oct 2013 18:25:19 +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 P81HhXJkIepv for ; Mon, 14 Oct 2013 18:25:12 +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 barracuda.logicpd.com (smtp.logicpd.com [174.46.170.145]) by theia.denx.de (Postfix) with SMTP id 50D974A08F for ; Mon, 14 Oct 2013 18:25:10 +0200 (CEST) X-ASG-Debug-ID: 1381767909-0388000df9751290001-4l7tJC Received: from EDPR-EX01.logicpd.com (edpr-ex01.logicpd.com [10.1.18.124]) by barracuda.logicpd.com with ESMTP id gfFVGuPT067GEsG5 (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Mon, 14 Oct 2013 11:25:09 -0500 (CDT) X-Barracuda-Envelope-From: michael.burr@logicpd.com Received: from EDPR-EX01.logicpd.com ([169.254.2.65]) by EDPR-EX01.logicpd.com ([169.254.2.65]) with mapi id 14.02.0347.000; Mon, 14 Oct 2013 11:25:08 -0500 From: Michael Burr To: "u-boot@lists.denx.de" Thread-Topic: [PATCH] I2C:Zynq: Adapt this driver to the new model X-ASG-Orig-Subj: [PATCH] I2C:Zynq: Adapt this driver to the new model Thread-Index: Ac7I+ZJDMmf4yLiyS6y+x1x2diL3pQ== Date: Mon, 14 Oct 2013 16:25:08 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.5.74] MIME-Version: 1.0 X-Barracuda-Connect: edpr-ex01.logicpd.com[10.1.18.124] X-Barracuda-Start-Time: 1381767909 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://ep-cuda.logicpd.com:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at logicpd.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.141457 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header Subject: [U-Boot] [PATCH] I2C:Zynq: Adapt this driver to the new model 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 CONFIGs and README for driver 'zynq_i2c.c'. Signed-off-by: Michael Burr Cc: Heiko Schocher Cc: Michal Simek === This patch depends on the previous patch titled === "[PATCH] I2C:Zynq: Adapt this driver to the new model" === submitted 26 Sep. 2013. === This patch depends on the previous patch titled === "[PATCH] I2C: Zynq: Support for 0-length register address" === submitted 24 Sep. 2013. --- README | 9 +++++++++ include/configs/zynq.h | 10 ++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README b/README index ccd47fa..fd2c8fc 100644 --- a/README +++ b/README @@ -1995,6 +1995,15 @@ CBFS (Coreboot Filesystem) support - CONFIG_SYS_I2C_PPC4XX_CH0 activate hardware channel 0 - CONFIG_SYS_I2C_PPC4XX_CH1 activate hardware channel 1 + - drivers/i2c/zynq_i2c.c + - Activate this driver with CONFIG_SYS_I2C_ZYNQ + - This driver operates only as bus-master (i.e. slave- + address == 0) and supports only 100 kbps speed. + - Both bus-controller devices in the Zynq PS (I2C0 and I2C1) + are supported. (However, note that Zynq PL configuration + may be needed in order to route some bus lines to external + pins.) + additional defines: CONFIG_SYS_NUM_I2C_BUSES diff --git a/include/configs/zynq.h b/include/configs/zynq.h index b9f381f..1ae915f 100644 --- a/include/configs/zynq.h +++ b/include/configs/zynq.h @@ -56,15 +56,13 @@ # define CONFIG_DOS_PARTITION #endif -#define CONFIG_ZYNQ_I2C0 - /* I2C */ -#if defined(CONFIG_ZYNQ_I2C0) || defined(CONFIG_ZYNQ_I2C1) +#define CONFIG_SYS_I2C_ZYNQ +#ifdef CONFIG_SYS_I2C_ZYNQ +# define CONFIG_SYS_I2C # define CONFIG_CMD_I2C -# define CONFIG_ZYNQ_I2C -# define CONFIG_HARD_I2C # define CONFIG_SYS_I2C_SPEED 100000 -# define CONFIG_SYS_I2C_SLAVE 1 +# define CONFIG_SYS_I2C_SLAVE 0 #endif #if defined(CONFIG_ZYNQ_DCC)