From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no 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 F204AC4338F for ; Thu, 12 Aug 2021 21:23:10 +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 28E1C60FED for ; Thu, 12 Aug 2021 21:23:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 28E1C60FED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.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 D355C82DB3; Thu, 12 Aug 2021 23:23:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.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 DF4F482DAD; Thu, 12 Aug 2021 23:23:05 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 7097D82DAD for ; Thu, 12 Aug 2021 23:23:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5097A1063; Thu, 12 Aug 2021 14:23:00 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 90DDE3F70D; Thu, 12 Aug 2021 14:22:59 -0700 (PDT) Date: Thu, 12 Aug 2021 22:22:07 +0100 From: Andre Przywara To: Tom Rini Cc: u-boot@lists.denx.de, Jagan Teki , Jernej =?UTF-8?B?xaBrcmFiZWM=?= Subject: Re: U-Boot sunxi DM_I2C migration? Message-ID: <20210812222207.02126e3c@slackpad.fritz.box> In-Reply-To: <20210812174930.GZ858@bill-the-cat> References: <20210812174930.GZ858@bill-the-cat> Organization: Arm Ltd. X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 12 Aug 2021 13:49:30 -0400 Tom Rini wrote: Hi Tom, > As I try and migrate more CONFIG symbols to be Kconfig only, I see that > sunxi is still using the legacy I2C drivers. Is there something > specific holding up migration? Thanks! Do you mean a DM_I2C conversion, or just moving those base address symbols to Kconfig? The latter is rather easy, let me know if I should give it a shot. For DM_I2C, it's the usual sunxi issue: we are using both: DM_I2C and DT based probing for U-Boot proper, and hardcoded CONFIG_ symbols for the SPL. *Some* boards need the set up the PMIC early (for increasing the CPU frequency or setting the proper DRAM voltage), so this needs to be done in the SPL. I don't know how to fix this "properly", but introducing DM (and DT) into the SPL is surely not worth the trouble. Alternatively we could have a separate, cut-down SPL-only driver, like we have for SPI (arch/arm/mach-sunxi/spl_spi_sunxi.c), but not sure that's really better. If there is something in particular that annoys you about the situation, we could try to improve this particular issue instead? Moving the non-DM code into a separate file, maybe? Cheers, Andre