From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17972 invoked by alias); 31 Mar 2012 17:17:43 -0000 Received: (qmail 17945 invoked by uid 22791); 31 Mar 2012 17:17:40 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 31 Mar 2012 17:17:26 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 64C702FB082D for ; Sat, 31 Mar 2012 18:17:25 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RtKpU8FwBUb7; Sat, 31 Mar 2012 18:17:24 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001397] I2C driver for Kinetic microcontrollers X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ilijak@siva.com.mk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 31 Mar 2012 17:17:00 -0000 Message-Id: <20120331171724.140412F78003@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2012-03/txt/msg00128.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001397 --- Comment #21 from Ilija Kocho 2012-03-31 18:17:18 BST --- (In reply to comment #20) > Created an attachment (id=1653) --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1653) [details] > Kinetis i2c driver > > I have updated the patch against the current cvs, as well as implemented a > per-device bus speed configuration. > > However, I left the cdls and API to use the MULT+ICR values (as per 50.3.2 and > 50.4.1.10 of the RM) rather then actual frequency -- the ICR value is a > function of multiple parameters, and there seems to be no obvious way to > conjure it up from frequency alone. There is a conflict that requires at least one active I2C bus: 18:46:30> ecosconfig new twr_k60n512 U CYGHWR_HAL_CORTEXM, new inferred value M4 U CYGHWR_HAL_CORTEXM_SYSTICK_CLK_SOURCE, new inferred value INTERNAL C CYGPKG_DEVS_I2C_FREESCALE_I2C, "requires" constraint not satisfied: CYGINT_HAL_FREESCALE_I2C_BUS 18:46:30> Probably something like following would be best fix, but unfortunately configtool crashes when I try to activate an I2C bus: --- i2c_freescale_org.cdl 2012-03-31 18:15:45.364128606 +0200 +++ i2c_freescale.cdl 2012-03-31 18:53:28.388222427 +0200 @@ -46,10 +46,17 @@ #####DESCRIPTIONEND#### # ==================================================================== +cdl_interface CYGINT_HAL_FREESCALE_I2C_BUS { + display "Number of I2C buses" +} + cdl_package CYGPKG_DEVS_I2C_FREESCALE_I2C { display "I2C driver for Freescale Kinetis and ColdFire+ chips" parent CYGPKG_IO_I2C requires CYGPKG_IO_I2C + + active_if CYGINT_HAL_FREESCALE_I2C_BUS + include_dir cyg/io description " This package provides a generic I2C device driver for the on-chip @@ -57,12 +64,6 @@ compile -library=libextras.a i2c_freescale.c - cdl_interface CYGINT_HAL_FREESCALE_I2C_BUS { - display "Number of I2C buses" - } - - requires CYGINT_HAL_FREESCALE_I2C_BUS - cdl_option CYGPKG_DEVS_I2C_FREESCALE_I2C_TRACE { display "I2C trace" flavor bool Then I tried the following: --- i2c_freescale_org.cdl 2012-03-31 18:15:45.364128606 +0200 +++ i2c_freescale.cdl 2012-03-31 18:56:09.916229122 +0200 @@ -46,10 +46,17 @@ #####DESCRIPTIONEND#### # ==================================================================== +cdl_interface CYGINT_HAL_FREESCALE_I2C_BUS { + display "Number of I2C buses" +} + cdl_package CYGPKG_DEVS_I2C_FREESCALE_I2C { display "I2C driver for Freescale Kinetis and ColdFire+ chips" parent CYGPKG_IO_I2C requires CYGPKG_IO_I2C + + requires CYGPKG_HAL_CORTEXM_KINETIS + include_dir cyg/io description " This package provides a generic I2C device driver for the on-chip @@ -57,12 +64,6 @@ compile -library=libextras.a i2c_freescale.c - cdl_interface CYGINT_HAL_FREESCALE_I2C_BUS { - display "Number of I2C buses" - } - - requires CYGINT_HAL_FREESCALE_I2C_BUS - cdl_option CYGPKG_DEVS_I2C_FREESCALE_I2C_TRACE { display "I2C trace" flavor bool I hope you'll find better fix, otherwise If this is good enough I could prepare updated patch. Ilija -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.