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 3CA84C4338F for ; Thu, 19 Aug 2021 03:14:41 +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 BBB8A610E5 for ; Thu, 19 Aug 2021 03:14:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BBB8A610E5 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 7D98B82F3D; Thu, 19 Aug 2021 05:13:48 +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 0883F82EA5; Thu, 19 Aug 2021 05:13:07 +0200 (CEST) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (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 7166182DE8 for ; Thu, 19 Aug 2021 05:12:55 +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-qk1-f171.google.com with SMTP id n11so5662594qkk.1 for ; Wed, 18 Aug 2021 20:12:55 -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:subject:date:message-id:in-reply-to :references; bh=1fsO7cs7/CVM7M8x2DhCRNnT7TTpY/tYZoQmAnH+MXo=; b=DiVRuf+MThz9tYsE/LjOXy5Z8UxW2ldxHvUnWiy2Feb+g1F8nRjV6D+k11UAlKBkap 87XTRSKn3piROHSmf1vGG/RhuioEs3AXdZpqqlMbA6r86RS+sTVQzC3yPalI8fT0VxdT llB3gX/2YfeRF5v2YP25kVK0hDBIern/aaalQxKF1Bm/NvtcvhD1L3I65wm2664ZioWV X3Oyk2zIlxtgxsiWdH2L6pIuggvUD5TqF7Mwf86YAwES5ypG9ZlZf8co32E+RV/AC4MO doNAHS7f8dDNA7q7LHXOEReYNPa0ECfTouPdPlMLAJuNsyqoQJCO58i3buMJ99LWP15l nhvg== X-Gm-Message-State: AOAM531tkAJj69KH1VcdRFNP1NEkFRGTZX1nltW/gbKzj8nhq1PQWb4b bgAHUrPoDpJV9Hib/D+C3JrhV+wq8fgH X-Google-Smtp-Source: ABdhPJzmMrdXCdmF7VuOumwKwmhUSXPI/xdYpsARre80EmnCsgbQNzILCl/j2aqFXHmrbT7xpemdZQ== X-Received: by 2002:a05:620a:8da:: with SMTP id z26mr1581902qkz.77.1629342774035; Wed, 18 Aug 2021 20:12:54 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-c592-d3ae-4d6b-6c5e.res6.spectrum.com. [2603:6081:7b01:cbda:c592:d3ae:4d6b:6c5e]) by smtp.gmail.com with ESMTPSA id h140sm984045qke.112.2021.08.18.20.12.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 20:12:53 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 08/16] cmd/i2c.c: Remove unused legacy code Date: Wed, 18 Aug 2021 23:12:31 -0400 Message-Id: <20210819031239.19772-9-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210819031239.19772-1-trini@konsulko.com> References: <20210817220009.22721-1-trini@konsulko.com> <20210819031239.19772-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 There are no longer any cases where we are neither SYS_I2C_LEGACY nor DM_I2C. Remove these code paths. Signed-off-by: Tom Rini --- cmd/i2c.c | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/cmd/i2c.c b/cmd/i2c.c index 7919d01303a9..9050b2b8d27a 100644 --- a/cmd/i2c.c +++ b/cmd/i2c.c @@ -195,54 +195,6 @@ void i2c_init_board(void) { } -/* TODO: Implement architecture-specific get/set functions */ - -/** - * i2c_get_bus_speed() - Return I2C bus speed - * - * This function is the default implementation of function for retrieveing - * the current I2C bus speed in Hz. - * - * A driver implementing runtime switching of I2C bus speed must override - * this function to report the speed correctly. Simple or legacy drivers - * can use this fallback. - * - * Returns I2C bus speed in Hz. - */ -#if !CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && !CONFIG_IS_ENABLED(DM_I2C) -/* - * TODO: Implement architecture-specific get/set functions - * Should go away, if we switched completely to new multibus support - */ -__weak -unsigned int i2c_get_bus_speed(void) -{ - return CONFIG_SYS_I2C_SPEED; -} - -/** - * i2c_set_bus_speed() - Configure I2C bus speed - * @speed: Newly set speed of the I2C bus in Hz - * - * This function is the default implementation of function for setting - * the I2C bus speed in Hz. - * - * A driver implementing runtime switching of I2C bus speed must override - * this function to report the speed correctly. Simple or legacy drivers - * can use this fallback. - * - * Returns zero on success, negative value on error. - */ -__weak -int i2c_set_bus_speed(unsigned int speed) -{ - if (speed != CONFIG_SYS_I2C_SPEED) - return -1; - - return 0; -} -#endif - /** * get_alen() - Small parser helper function to get address length * @@ -1953,8 +1905,6 @@ static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc, } #elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY) i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr); -#else - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); #endif return 0; } -- 2.17.1