{"id":801001,"url":"http://patchwork.ozlabs.org/api/patches/801001/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1502632828-8733-1-git-send-email-aford173@gmail.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1502632828-8733-1-git-send-email-aford173@gmail.com>","list_archive_url":null,"date":"2017-08-13T14:00:28","name":"[U-Boot] Kconfig: Add EEPROM options to Kconfig when I2C_EEPROM is set","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"7a262f12a4faab0749b3555e781877df6cb3663a","submitter":{"id":67132,"url":"http://patchwork.ozlabs.org/api/people/67132/?format=json","name":"Adam Ford","email":"aford173@gmail.com"},"delegate":{"id":3651,"url":"http://patchwork.ozlabs.org/api/users/3651/?format=json","username":"trini","first_name":"Tom","last_name":"Rini","email":"trini@ti.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1502632828-8733-1-git-send-email-aford173@gmail.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/801001/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/801001/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"o2sM2nPb\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xVgPZ2kCtz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 14 Aug 2017 00:00:48 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid D1747C21E1E; Sun, 13 Aug 2017 14:00:41 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 93B4AC21DA3;\n\tSun, 13 Aug 2017 14:00:39 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid C35CFC21DA3; Sun, 13 Aug 2017 14:00:37 +0000 (UTC)","from mail-io0-f193.google.com (mail-io0-f193.google.com\n\t[209.85.223.193])\n\tby lists.denx.de (Postfix) with ESMTPS id 42574C21D96\n\tfor <u-boot@lists.denx.de>; Sun, 13 Aug 2017 14:00:37 +0000 (UTC)","by mail-io0-f193.google.com with SMTP id q64so6159141ioi.0\n\tfor <u-boot@lists.denx.de>; Sun, 13 Aug 2017 07:00:37 -0700 (PDT)","from ubuntu16.lan (c-66-41-69-9.hsd1.mn.comcast.net. [66.41.69.9])\n\tby smtp.gmail.com with ESMTPSA id\n\te92sm2250389itd.0.2017.08.13.07.00.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSun, 13 Aug 2017 07:00:34 -0700 (PDT)"],"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=FREEMAIL_FROM, KHOP_BIG_TO_CC,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=DuNCVMS/wXlwUPDEpAgTTBjFzXYugZYMcPCA7hLkh24=;\n\tb=o2sM2nPbf0ulQgpjv1XydHjcy56qYogrbMJohgDGQcKRAvA6wafnRQcW+9LTujlaLk\n\tOgE1FXR6Z7su5jnQr3iVrfKlLGkm3xfwVXtwe5eKymrWt8nWHyNpUPquCxgltS9IUMF2\n\tIZmZ6DVdKDp4Kk3QqZrz3WMQFRGbDJqd9EnJ5OqEYc9TdMpXo0o91FZm037n0W+46QSz\n\t0kl/VhJD1YTrkaH8rJADPmxvaoFkYWFaapQ/G9jOMmx75KksezDoCb5BBl2rwhliS1R/\n\tite6wIkkholz018/5/Uw0PcuudsYqLFBLE6pun+YPvRhb5yiw4z4uZGCz03iO/XIgetH\n\teRgw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=DuNCVMS/wXlwUPDEpAgTTBjFzXYugZYMcPCA7hLkh24=;\n\tb=OYgOfoCtSyEfniSTR6Np8ZG4CxIY2WPOz3YlXMi3zTkfRCJkLsT8YKF5CSui35ZHCd\n\tD/bDeUY1OkWmiDEUbX7I060kj4eDULGdexfDxV6PDJC94lxNcpfCEu94rnVkcHuQfW+H\n\tyzp9hfs7XMHgM+N15t16YxRC92k7RTYUIarkQm5r4q2SNgYlkZQadl9boUnSmQJFm5qk\n\tP6rbSFCd+dAf9ksYF9+KLGyZ81TvvvYf4wi7zWWRHdDqiaPdxas86P9wfBrj1fXKc/xk\n\tfVXAf/q1wF6BH8k89MEJIngTQX26PPbj50r2U4m3mfYu8RIpWVm9HTrjqfWrifwT25G1\n\twjqQ==","X-Gm-Message-State":"AIVw112w1ccdehoTRBVuhRQkqpM3k32MGHr5gDjb5uA4WZQg6nfnRQak\n\tFYT/Dz8R7uFA4A==","X-Received":"by 10.107.132.233 with SMTP id\n\to102mr19687572ioi.214.1502632835716; \n\tSun, 13 Aug 2017 07:00:35 -0700 (PDT)","From":"Adam Ford <aford173@gmail.com>","To":"Simon Glass <sjg@chromium.org>, Jagan Teki <jagan@openedev.com>,\n\tBin Meng <bmeng.cn@gmail.com>,\n\tMaxime Ripard <maxime.ripard@free-electrons.com>,\n\tAdam Ford <aford173@gmail.com>,\n\t\"Robert P. J. Day\" <rpjday@crashcourse.ca>, \n\tMasahiro Yamada <yamada.masahiro@socionext.com>,\n\tStephen Warren <swarren@nvidia.com>, Tom Warren <twarren@nvidia.com>, \n\tStefan Roese <sr@denx.de>,\n\t=?UTF-8?q?Marek=20Beh=C3=BAn?= <marek.behun@nic.cz>,\n\tPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>,\n\tu-boot@lists.denx.de","Date":"Sun, 13 Aug 2017 09:00:28 -0500","Message-Id":"<1502632828-8733-1-git-send-email-aford173@gmail.com>","X-Mailer":"git-send-email 2.7.4","Cc":"adam.ford@logicpd.com","Subject":"[U-Boot] [PATCH] Kconfig: Add EEPROM options to Kconfig when\n\tI2C_EEPROM is set","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"Add the following options to drivers/misc/Kconfig:\n\tSYS_I2C_EEPROM_ADDR\n\tSYS_I2C_EEPROM_BUS\n\tSYS_EEPROM_SIZE\n\tSYS_EEPROM_PAGE_WRITE_BITS\n\tSYS_EEPROM_PAGE_WRITE_DELAY_MS\n\tSYS_I2C_EEPROM_ADDR_LEN\n\tSYS_I2C_EEPROM_ADDR_OVERFLOW\n\nThis does not migrate any boards, but provides a foundations for\nthose who want/need these options\n\nSigned-off-by: Adam Ford <aford173@gmail.com>\n---\n common/Kconfig       | 30 ------------------------------\n drivers/misc/Kconfig | 45 +++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 45 insertions(+), 30 deletions(-)","diff":"diff --git a/common/Kconfig b/common/Kconfig\nindex 0983891..aa50b03 100644\n--- a/common/Kconfig\n+++ b/common/Kconfig\n@@ -204,40 +204,10 @@ config ENV_IS_IN_EEPROM\n \t  These two #defines specify the offset and size of the\n \t  environment area within the total memory of your EEPROM.\n \n-\t  - CONFIG_SYS_I2C_EEPROM_ADDR:\n-\t  If defined, specified the chip address of the EEPROM device.\n-\t  The default address is zero.\n-\n-\t  - CONFIG_SYS_I2C_EEPROM_BUS:\n-\t  If defined, specified the i2c bus of the EEPROM device.\n-\n-\t  - CONFIG_SYS_EEPROM_PAGE_WRITE_BITS:\n-\t  If defined, the number of bits used to address bytes in a\n-\t  single page in the EEPROM device.  A 64 byte page, for example\n-\t  would require six bits.\n-\n-\t  - CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS:\n-\t  If defined, the number of milliseconds to delay between\n-\t  page writes.\tThe default is zero milliseconds.\n-\n-\t  - CONFIG_SYS_I2C_EEPROM_ADDR_LEN:\n-\t  The length in bytes of the EEPROM memory array address.  Note\n-\t  that this is NOT the chip address length!\n-\n-\t  - CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW:\n-\t  EEPROM chips that implement \"address overflow\" are ones\n-\t  like Catalyst 24WC04/08/16 which has 9/10/11 bits of\n-\t  address and the extra bits end up in the \"chip address\" bit\n-\t  slots. This makes a 24WC08 (1Kbyte) chip look like four 256\n-\t  byte chips.\n-\n \t  Note that we consider the length of the address field to\n \t  still be one byte because the extra address bits are hidden\n \t  in the chip address.\n \n-\t  - CONFIG_SYS_EEPROM_SIZE:\n-\t  The size in bytes of the EEPROM device.\n-\n \t  - CONFIG_ENV_EEPROM_IS_ON_I2C\n \t  define this, if you have I2C and SPI activated, and your\n \t  EEPROM, which holds the environment, is on the I2C bus.\ndiff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig\nindex d1ddbbe..3d282d5 100644\n--- a/drivers/misc/Kconfig\n+++ b/drivers/misc/Kconfig\n@@ -196,4 +196,49 @@ config I2C_EEPROM\n \tdepends on MISC\n \thelp\n \t  Enable a generic driver for EEPROMs attached via I2C.\n+\n+if I2C_EEPROM\n+\n+config SYS_I2C_EEPROM_ADDR\n+\thex \"Chip address of the EEPROM device\"\n+\tdefault 0\n+\n+config SYS_I2C_EEPROM_BUS\n+\tint \"I2C bus of the EEPROM device.\"\n+\tdefault 0\n+\n+config SYS_EEPROM_SIZE\n+\tint \"Size in bytes of the EEPROM device\"\n+\tdefault 256\n+\n+config SYS_EEPROM_PAGE_WRITE_BITS\n+\tint \"Number of bits used to address bytes in a single page\"\n+\tdefault 0\n+\thelp\n+\t  The EEPROM page size is 2^SYS_EEPROM_PAGE_WRITE_BITS.\n+\t  A 64 byte page, for example would require six bits.\n+\n+config SYS_EEPROM_PAGE_WRITE_DELAY_MS\n+\tint \"Number of milliseconds to delay between page writes\"\n+\tdefault 0\n+\n+config SYS_I2C_EEPROM_ADDR_LEN\n+\tint \"Length in bytes of the EEPROM memory array address\"\n+\tdefault 1\n+\thelp\n+\t  Note: This is NOT the chip address length!\n+\n+config SYS_I2C_EEPROM_ADDR_OVERFLOW\n+\thex \"EEPROM Address Overflow\"\n+\tdefault 0\n+\thelp\n+\t  EEPROM chips that implement \"address overflow\" are ones\n+\t  like Catalyst 24WC04/08/16 which has 9/10/11 bits of\n+\t  address and the extra bits end up in the \"chip address\" bit\n+\t  slots. This makes a 24WC08 (1Kbyte) chip look like four 256\n+\t  byte chips.\n+\n+endif\n+\n+\n endmenu\n","prefixes":["U-Boot"]}