From patchwork Mon Apr 10 15:33:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olliver Schinagl X-Patchwork-Id: 749095 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3w1vbZ5QNLz9sNj for ; Tue, 11 Apr 2017 01:43:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=schinagl.nl header.i=@schinagl.nl header.b="ZO31y6Nl"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 71B5DC21C1F; Mon, 10 Apr 2017 15:37:31 +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=KHOP_BIG_TO_CC, 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 5137BC21C93; Mon, 10 Apr 2017 15:34:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B86AAC21C1F; Mon, 10 Apr 2017 15:34:15 +0000 (UTC) Received: from 7of9.schinagl.nl (7of9.schinagl.nl [62.251.20.244]) by lists.denx.de (Postfix) with ESMTPS id 78B88C21C26 for ; Mon, 10 Apr 2017 15:34:15 +0000 (UTC) Received: from um-mbp-306.cloud.ultimaker.com (static-98-101-100-159.thenetworkfactory.nl [159.100.101.98]) by 7of9.schinagl.nl (Postfix) with ESMTPA id 6753CAC894; Mon, 10 Apr 2017 17:34:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1491838450; bh=RQhD7hR7unGQU0brMXv0LqYo4dDV73lq6qaRkQyv5j8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZO31y6Nl1IgoAvFdJhzbnR9hO8P9CN0EXsiZjp8vAV0dajh2Pwo6ZST4rasjexdak NkJ+lPTs/1Pjwrmawwui8unx1/2ySiHGvwVGsyQE2wuYZYi0uE+uQkWPsE5IhBDBNi +Mv4taVzmnhP+LOLSEEr3CtWcJAHvr3sfv6ZTNlM= From: Olliver Schinagl To: Jagan Teki , Maxime Ripard , Simon Glass , Joe Hershberger Date: Mon, 10 Apr 2017 17:33:45 +0200 Message-Id: <20170410153356.2664-11-oliver@schinagl.nl> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170410153356.2664-1-oliver@schinagl.nl> References: <20170410153356.2664-1-oliver@schinagl.nl> X-Mailman-Approved-At: Mon, 10 Apr 2017 15:34:41 +0000 Cc: Mugunthan V N , Marcus Cooper , Philipp Tomsich , Stefan Roese , u-boot@lists.denx.de, Aleksei Mamlin , Ian Campbell , Bernhard Nortmann , dev@linux-sunxi.org, Andre Przywara , Phil Han , Hans de Goede , Zoltan Herpai , Olliver Schinagl , Jelle de Jong Subject: [U-Boot] [PATCHv2 10/21] net: sunxi: Enable I2C bus set via NET_ETHADDR_EEPROM_I2C_BUS 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" A user may select the connected eeprom address via NET_ETHADDR_EEPROM_I2C_BUS, but not enable it (I2Cn_ENABLE). To prevent this mistake, enable the I2C controller selected via NET_ETHADDR_EEPROM_I2C_BUS. This in turn simplifies the defconfig. Signed-off-by: Olliver Schinagl --- board/sunxi/Kconfig | 4 ++++ configs/A10-OLinuXino-Lime_defconfig | 1 - configs/A20-OLinuXino-Lime2_defconfig | 1 - configs/A20-OLinuXino-Lime_defconfig | 1 - configs/A20-OLinuXino_MICRO_defconfig | 1 - 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 962da09136..e515175117 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -441,6 +441,7 @@ config I2C0_ENABLE config I2C1_ENABLE bool "Enable I2C/TWI controller 1" + default y if (NET_ETHADDR_EEPROM_I2C_BUS = 1) default n select CMD_I2C ---help--- @@ -448,6 +449,7 @@ config I2C1_ENABLE config I2C2_ENABLE bool "Enable I2C/TWI controller 2" + default y if (NET_ETHADDR_EEPROM_I2C_BUS = 2) default n select CMD_I2C ---help--- @@ -455,6 +457,7 @@ config I2C2_ENABLE if MACH_SUN6I || MACH_SUN7I config I2C3_ENABLE + default y if (NET_ETHADDR_EEPROM_I2C_BUS = 3) bool "Enable I2C/TWI controller 3" default n select CMD_I2C @@ -475,6 +478,7 @@ endif if MACH_SUN7I config I2C4_ENABLE bool "Enable I2C/TWI controller 4" + default y if (NET_ETHADDR_EEPROM_I2C_BUS = 4) default n select CMD_I2C ---help--- diff --git a/configs/A10-OLinuXino-Lime_defconfig b/configs/A10-OLinuXino-Lime_defconfig index 6634139ab8..7a8756620a 100644 --- a/configs/A10-OLinuXino-Lime_defconfig +++ b/configs/A10-OLinuXino-Lime_defconfig @@ -17,7 +17,6 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_NET_ETHADDR_EEPROM=y CONFIG_NET_ETHADDR_EEPROM_I2C=y CONFIG_NET_ETHADDR_EEPROM_I2C_BUS=1 -CONFIG_I2C1_ENABLE=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_ISO_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig index 4c720b3109..0d7d5f042f 100644 --- a/configs/A20-OLinuXino-Lime2_defconfig +++ b/configs/A20-OLinuXino-Lime2_defconfig @@ -24,7 +24,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_NET_ETHADDR_EEPROM=y CONFIG_NET_ETHADDR_EEPROM_I2C=y CONFIG_NET_ETHADDR_EEPROM_I2C_BUS=1 -CONFIG_I2C1_ENABLE=y CONFIG_AXP_ALDO3_VOLT=2800 CONFIG_AXP_ALDO4_VOLT=2800 CONFIG_USB_EHCI_HCD=y diff --git a/configs/A20-OLinuXino-Lime_defconfig b/configs/A20-OLinuXino-Lime_defconfig index 564ae256a3..a90d681064 100644 --- a/configs/A20-OLinuXino-Lime_defconfig +++ b/configs/A20-OLinuXino-Lime_defconfig @@ -19,7 +19,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_NET_ETHADDR_EEPROM=y CONFIG_NET_ETHADDR_EEPROM_I2C=y CONFIG_NET_ETHADDR_EEPROM_I2C_BUS=1 -CONFIG_I2C1_ENABLE=y CONFIG_AXP_ALDO3_VOLT=2800 CONFIG_AXP_ALDO4_VOLT=2800 CONFIG_USB_EHCI_HCD=y diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig index 93be13b407..d0bfa9c3c0 100644 --- a/configs/A20-OLinuXino_MICRO_defconfig +++ b/configs/A20-OLinuXino_MICRO_defconfig @@ -22,7 +22,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_NET_ETHADDR_EEPROM=y CONFIG_NET_ETHADDR_EEPROM_I2C=y CONFIG_NET_ETHADDR_EEPROM_I2C_BUS=1 -CONFIG_I2C1_ENABLE=y CONFIG_AXP_ALDO3_VOLT=2800 CONFIG_AXP_ALDO4_VOLT=2800 CONFIG_USB_EHCI_HCD=y