From patchwork Thu Sep 15 13:54:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: u-boot@lakedaemon.net X-Patchwork-Id: 114790 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DF584B71D8 for ; Thu, 15 Sep 2011 23:55:14 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BDA9728533; Thu, 15 Sep 2011 15:55:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c3L-ly2SdOL0; Thu, 15 Sep 2011 15:55:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 10EE5284F8; Thu, 15 Sep 2011 15:54:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BAFC0284E0 for ; Thu, 15 Sep 2011 15:54:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qr8CaOXPPAXP for ; Thu, 15 Sep 2011 15:54:48 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mho-02-ewr.mailhop.org (mho-04-ewr.mailhop.org [204.13.248.74]) by theia.denx.de (Postfix) with ESMTPS id 52543284CA for ; Thu, 15 Sep 2011 15:54:45 +0200 (CEST) Received: from pool-74-110-102-81.nrflva.fios.verizon.net ([74.110.102.81] helo=titan) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1R4COo-0004AP-3T; Thu, 15 Sep 2011 13:54:42 +0000 Received: from localhost.localdomain (triton.lakedaemon.net [10.16.5.50]) by titan (Postfix) with ESMTP id D601B2A2394; Thu, 15 Sep 2011 09:54:36 -0400 (EDT) X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 74.110.102.81 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18ljSZmcpmDqaFiyIkmr+xItmbTbVj2XsE= From: Jason Cooper To: sjg@chromium.org Date: Thu, 15 Sep 2011 13:54:31 +0000 Message-Id: X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: <1315865067-1443-1-git-send-email-sjg@chromium.org> Cc: grant.likely@secretlab.ca, u-boot@lists.denx.de, twarren@nvidia.com Subject: [U-Boot] [RFC PATCH 1/4 v1] fdt: remove i2c example code. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Jason Cooper --- common/fdt_decode.c | 14 -------------- include/fdt_decode.h | 32 -------------------------------- 2 files changed, 0 insertions(+), 46 deletions(-) diff --git a/common/fdt_decode.c b/common/fdt_decode.c index 9e8cf4d..cd7a071 100644 --- a/common/fdt_decode.c +++ b/common/fdt_decode.c @@ -34,7 +34,6 @@ */ #define COMPAT(id, name) name static const char *compat_names[COMPAT_COUNT] = { - COMPAT(NVIDIA_TEGRA250_I2C, "nvidia,tegra250-i2c"), }; /** @@ -162,16 +161,3 @@ int fdt_decode_next_alias(const void *blob, const char *name, return err ? -FDT_ERR_MISSING : node; } -int fdt_decode_i2c(const void *blob, int node, struct fdt_i2c *config) -{ - config->reg = (struct i2c_ctlr *)get_addr(blob, node, "reg"); - config->pinmux = get_int(blob, node, "pinmux", 0); - config->speed = get_int(blob, node, "speed", 0); - config->periph_id = get_int(blob, node, "periph-id", -1); - config->enabled = get_is_enabled(blob, node, 0); - - if (config->periph_id == -1) - return -FDT_ERR_MISSING; - - return 0; -} diff --git a/include/fdt_decode.h b/include/fdt_decode.h index bdcdbba..ba3c15b 100644 --- a/include/fdt_decode.h +++ b/include/fdt_decode.h @@ -28,9 +28,6 @@ * changes to support FDT are minimized. */ -#include -#include - /* A typedef for a physical address. We should move it to a generic place */ #ifdef CONFIG_PHYS_64BIT typedef u64 addr_t; @@ -55,36 +52,7 @@ struct fdt_memory { */ enum fdt_compat_id { COMPAT_UNKNOWN, - COMPAT_NVIDIA_TEGRA250_I2C, /* Tegra 250 i2c */ - COMPAT_COUNT, }; -/* Information about i2c controller */ -struct fdt_i2c { - struct i2c_ctlr *reg; /* Address of controller registers */ - int pinmux; /* Which pin mux setting to use */ - u32 speed; /* Speed in KHz */ - enum periph_id periph_id; /* Peripheral ID for clock/pinmux */ - int enabled; /* 1 if enabled, 0 if disabled */ -}; -/** - * Returns information from the FDT about an i2c controler. This function reads - * out the following attributes: - * - * reg - * enabled - * pinmux - * speed - * periph-id - * - * @param blob FDT blob to use - * @param node Node to read from - * @param config structure to use to return information - * @returns 0 on success, -ve on error, in which case config may or may not be - * unchanged. If the node is present but expected data is - * missing then this will generally return - * -FDT_ERR_MISSING. - */ -int fdt_decode_i2c(const void *blob, int node, struct fdt_i2c *config);