Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1F10C4338F for ; Tue, 17 Aug 2021 22:01:22 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E939A6102A for ; Tue, 17 Aug 2021 22:01:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E939A6102A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 99CD182C6B; Wed, 18 Aug 2021 00:01:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 9EB9482BEC; Wed, 18 Aug 2021 00:00:45 +0200 (CEST) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E59AF82BEC for ; Wed, 18 Aug 2021 00:00:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qt1-f178.google.com with SMTP id x5so10016653qtq.13 for ; Tue, 17 Aug 2021 15:00:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Au7rndzEDOoJYe0ErCo9oP2CcDWyTPcmRiqkqiBs8ho=; b=fNBCzqQXoChjMF9S0LYFofiohg4BSfZlS+yW9X+AQLigWHBmeaGgCHinOmND/r9m7O hgQFVVNHXzwyUGvxkvCOmeLDDPLECwfM9z58GeC7PFaEAHyFvP4njlOs5ix2/hA1l43t q3YkwyoalnuxUPzOPNC1SIivx9o7n9uofEr7yXHFA6G+zHlkx4AweUCbzTWGHmEflbAx OXLOz5BBKOTWqqC0oShZKaow61UU+pHpim1WQ7+5HybFPpUn3GCCBYagfUSiNTxgdVGU IbLOt5Q17q53VrzWHRvhKxbEZazPnG4+bpfESd7d+bUUfcfiTPWeI6qX5pDHQPBnaY8w JErg== X-Gm-Message-State: AOAM5314wRc9dlokHUU7cV5+TQ2JlyyDXErOABWXEhScL93OM3Efoego xgq2+Ld/u5DlqbmtfWLZ58yyANpZgwud X-Google-Smtp-Source: ABdhPJzBk+sipunhCadQVaWXxqGCG9lD4cJSf6Bzv5nyNX8FbZXNMP4n8KKBJ/4AW0jsL/WOV57BVQ== X-Received: by 2002:a05:622a:1486:: with SMTP id t6mr5018558qtx.47.1629237633315; Tue, 17 Aug 2021 15:00:33 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-f93a-0b29-d1e6-92fc.res6.spectrum.com. [2603:6081:7b01:cbda:f93a:b29:d1e6:92fc]) by smtp.gmail.com with ESMTPSA id 75sm2270996qko.100.2021.08.17.15.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 15:00:32 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Lukasz Majewski Subject: [PATCH 01/13] kp_imx53: Switch to using a local namespace for ID EEPROM Date: Tue, 17 Aug 2021 17:59:36 -0400 Message-Id: <20210817220009.22721-2-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210817220009.22721-1-trini@konsulko.com> References: <20210817220009.22721-1-trini@konsulko.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This platform does not use any of the standard EEPROM functionality and instead provides its own. Use a local namespace for the I2C related defines to access the EEPROM. Cc: Lukasz Majewski Signed-off-by: Tom Rini --- board/k+p/kp_imx53/kp_id_rev.c | 9 ++++++--- include/configs/kp_imx53.h | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/board/k+p/kp_imx53/kp_id_rev.c b/board/k+p/kp_imx53/kp_id_rev.c index 7103a3e0f2b5..9f93cf008ce8 100644 --- a/board/k+p/kp_imx53/kp_id_rev.c +++ b/board/k+p/kp_imx53/kp_id_rev.c @@ -64,6 +64,10 @@ void show_eeprom(void) eth_env_set_enetaddr("ethaddr", p); } +#define I2C_EEPROM_BUS_NUM 1 +#define I2C_EEPROM_ADDR 0x50 +#define I2C_EEPROM_ADDR_LEN 2 + int read_eeprom(void) { struct udevice *dev; @@ -72,9 +76,8 @@ int read_eeprom(void) if (eeprom_has_been_read) return 0; - ret = i2c_get_chip_for_busnum(CONFIG_SYS_EEPROM_BUS_NUM, - CONFIG_SYS_I2C_EEPROM_ADDR, - CONFIG_SYS_I2C_EEPROM_ADDR_LEN, &dev); + ret = i2c_get_chip_for_busnum(I2C_EEPROM_BUS_NUM, I2C_EEPROM_ADDR, + I2C_EEPROM_ADDR_LEN, &dev); if (ret) { printf("Cannot find EEPROM !\n"); return ret; diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h index c94882846efa..87f4841af05c 100644 --- a/include/configs/kp_imx53.h +++ b/include/configs/kp_imx53.h @@ -20,9 +20,6 @@ #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_SYS_I2C_MXC -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 -#define CONFIG_SYS_EEPROM_BUS_NUM 1 -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Command definition */ #define CONFIG_LOADADDR 0x72000000 /* loadaddr env var */ -- 2.17.1