From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Thu, 17 Oct 2013 08:31:04 +0200 Subject: [U-Boot] [U-Boot, 2/3, v4] exynos: i2c: Change FDT bus setup code to enumerate ports correctly In-Reply-To: <1381833130-26275-1-git-send-email-ch.naveen@samsung.com> References: <1381833130-26275-1-git-send-email-ch.naveen@samsung.com> Message-ID: <525F8428.3050503@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Naveen, Am 15.10.2013 12:32, schrieb Naveen Krishna Ch: > From: Simon Glass > > At present the i2c ports are enumerated in a strange way - the > fdtdec_find_aliases_for_id() function is used, but then the ID returned > is ignored and the ports are renumbered. The effect is the same provided > that the device tree has the ports in the same order, or uses aliases, > and has no gaps, but it is not correct. > > Adjust the code to use the function as intended. This will allows device > tree aliases to change the device order if required. > > As a result, the i2c_busses variable is dropped. We can't be sure that > there are no 'holes' in the list of buses, so must check the whole > array. > > Note: it seems that non-FDT operation is now broken in this drive and > will need to be reinstated for upstream. > > Signed-off-by: Simon Glass > Reviewed-on: https://gerrit.chromium.org/gerrit/59369 > Signed-off-by: Naveen Krishna Chatradhi > > --- > Changes since v1: > Nonei > > Changes since v2: > None > > Changes since v3: > None; ran # ./MAKEALL -v samsung > > drivers/i2c/s3c24x0_i2c.c | 25 ++++++++++++++++++------- > drivers/i2c/s3c24x0_i2c.h | 1 + > 2 files changed, 19 insertions(+), 7 deletions(-) Thanks! Applied to u-boot-i2c.git bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany