From patchwork Fri Dec 7 13:50:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 1009439 X-Patchwork-Delegate: hs@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="ZUln/qME"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43BDht0jjYz9rxp for ; Sat, 8 Dec 2018 01:03:41 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id A7DFEC22705; Fri, 7 Dec 2018 13:54:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A2381C22728; Fri, 7 Dec 2018 13:51:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 23A0BC2273E; Fri, 7 Dec 2018 13:51:23 +0000 (UTC) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lists.denx.de (Postfix) with ESMTPS id 18F95C2270E for ; Fri, 7 Dec 2018 13:51:18 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id wB7DpHPX027837; Fri, 7 Dec 2018 07:51:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1544190677; bh=DzbGPiBZ9riZmu0bb1uJEVVEj78tZwZ9H3zlhHr0Cu8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZUln/qMERhWmn8noV4E1M4uYJaipvpNOiaLb44XvDH9xcOZ9ESUCxBd+89dAAB0aX z93K7B8Cp2rUr+jAxVKQ0sn+WOKZJ8XUUh+UZArwRWeHkVMsaoT6Z3Rg06NDPgPoeV nv3Y2NA+rqe3SDYdLeX1FksIP2fzXiQgNAWLqxcY= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wB7DpHsA096453 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 7 Dec 2018 07:51:17 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 7 Dec 2018 07:51:17 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Fri, 7 Dec 2018 07:51:17 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wB7DpGk0004529; Fri, 7 Dec 2018 07:51:16 -0600 From: Jean-Jacques Hiblot To: , Date: Fri, 7 Dec 2018 14:50:50 +0100 Message-ID: <1544190655-4405-15-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544190655-4405-1-git-send-email-jjhiblot@ti.com> References: <1544190655-4405-1-git-send-email-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: u-boot@lists.denx.de Subject: [U-Boot] [RESEND PATCH v3 14/19] am57xx: remove non-DM I2C code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" am57xx configs uses DM_I2C both in SPL and u-boot. Remove code for non-DM I2C support. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini Reviewed-by: Heiko Schocher --- Changes in v3: None Changes in v2: None board/ti/am57xx/board.c | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 355ea55..9738beb 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -623,7 +623,7 @@ void am57x_idk_lcd_detect(void) { int r = -ENODEV; char *idk_lcd = "no"; - u8 buf = 0; + struct udevice *dev; /* Only valid for IDKs */ if (board_is_x15() || board_is_am572x_evm()) @@ -633,34 +633,6 @@ void am57x_idk_lcd_detect(void) if (board_is_am571x_idk() && !am571x_idk_needs_lcd()) goto out; -#ifndef CONFIG_DM_I2C - r = i2c_set_bus_num(OSD_TS_FT_BUS_ADDRESS); - if (r) { - printf("%s: Failed to set bus address to %d: %d\n", - __func__, OSD_TS_FT_BUS_ADDRESS, r); - goto out; - } - r = i2c_probe(OSD_TS_FT_CHIP_ADDRESS); - if (r) { - /* AM572x IDK has no explicit settings for optional LCD kit */ - if (board_is_am571x_idk()) { - printf("%s: Touch screen detect failed: %d!\n", - __func__, r); - } - goto out; - } - - /* Read FT ID */ - r = i2c_read(OSD_TS_FT_CHIP_ADDRESS, OSD_TS_FT_REG_ID, 1, &buf, 1); - if (r) { - printf("%s: Touch screen ID read %d:0x%02x[0x%02x] failed:%d\n", - __func__, OSD_TS_FT_BUS_ADDRESS, OSD_TS_FT_CHIP_ADDRESS, - OSD_TS_FT_REG_ID, r); - goto out; - } -#else - struct udevice *dev; - r = i2c_get_chip_for_busnum(OSD_TS_FT_BUS_ADDRESS, OSD_TS_FT_CHIP_ADDRESS, 1, &dev); if (r) { @@ -682,10 +654,8 @@ void am57x_idk_lcd_detect(void) OSD_TS_FT_REG_ID, r); goto out; } - buf = (u8)r; -#endif - switch (buf) { + switch (r) { case OSD_TS_FT_ID_5606: idk_lcd = "osd101t2045"; break; @@ -694,7 +664,7 @@ void am57x_idk_lcd_detect(void) break; default: printf("%s: Unidentifed Touch screen ID 0x%02x\n", - __func__, buf); + __func__, r); /* we will let default be "no lcd" */ } out: