Message ID | 20210205151058.1037793-1-igor.opaniuk@gmail.com |
---|---|
Headers | show
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; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 header.s=google header.b=SxytJKO+; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DXK6Z555Gz9sWY for <incoming@patchwork.ozlabs.org>; Sat, 6 Feb 2021 02:27:34 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E2396801D8; Fri, 5 Feb 2021 16:27:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="SxytJKO+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4A3EF825EC; Fri, 5 Feb 2021 16:11:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 2CB608002F for <u-boot@lists.denx.de>; Fri, 5 Feb 2021 16:11:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@foundries.io Received: by mail-lj1-x22e.google.com with SMTP id y14so8118127ljn.8 for <u-boot@lists.denx.de>; Fri, 05 Feb 2021 07:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FCkoZxHHTJXVjO+PvtQDHx7VAI+UkWKMVRu+yEc0f8M=; b=SxytJKO+v+NIgbP8qNUolEPwihUc6e+P4BRboDmUqtEdLZJlriyO5V29N1Q9C/rRGI 6a+RjHOCG4HEorLLKgl1jnQzxnICkqjc11+h2J0MOFbnSeKO19OXrVt/Pt4c38lpPREh OtzVSwqFlb3tLmSjVLIxnNMDYHC11BZnS5f0LkhUcqYyeLqtv73Y5SZVeeGx52MpOfjz kVUuAkMgBrvdP0drNwNC6+KQKH7rA+1xiLp3Qfe8dogYOskG3YOrPcJwpcUZW2nRLyQd 3vm4PPSCjBGweRKeBm53lQST2rufPLBM+Q8TwVjcReFDwtwU0FS6rl9jcuN61NyNx8ih m3Wg== 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:mime-version :content-transfer-encoding; bh=FCkoZxHHTJXVjO+PvtQDHx7VAI+UkWKMVRu+yEc0f8M=; b=Lqf+M+DtwbKn4nySQYzjV+qIviXtai4j9Uhqc20vArB92YRVyTxb4T5aqYvc2cwg2e xfICqfLSOT/xake0+TjrU4riyUH5zAgR5v7jR6kTQa3UPVGy7c2EWp0YY+p/2zQbgNE1 eyeFGHNzCSNk/8twfhBo7dwt2oWsYRoz7zluv0MwPPeQpBRnJw5PL9U38rQVNNL6GApn E0dVLbdsf8F6yJCGoFEZzTuAbMRjG86Grqb447hvRombwDwKtS0gtaVFCtNJ65Q6Z3jP UCWarZthnhN88DmGLktLi4Drl2Lb+LJWpTakX9uBIv9dkctANs04FBUG5hg7iIxkF+hJ X80A== X-Gm-Message-State: AOAM531lqIie79/WvP37A0K4CNBMQCrX0kh1yqtoHbfBpgRzjaoKBt3d l/Lzmxt/7YsACQvxJV1RqoS+BOa6chkML9lp X-Google-Smtp-Source: ABdhPJypKPUVEO9FI10ZGE+497KZ7uCsTG8sZJMHMnBizvHN7sPZT3tIUequH0Xe4D0jyAewa/3Xdg== X-Received: by 2002:a2e:884b:: with SMTP id z11mr2891610ljj.104.1612537863884; Fri, 05 Feb 2021 07:11:03 -0800 (PST) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id s2sm1015965lfc.261.2021.02.05.07.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 07:11:02 -0800 (PST) From: Igor Opaniuk <igor.opaniuk@foundries.io> X-Google-Original-From: Igor Opaniuk <igor.opaniuk@gmail.com> To: u-boot@lists.denx.de Cc: trini@konsulko.com, jorge@foundries.io, mike@foundries.io, ricardo@foundries.io, sjg@chromium.org, Igor Opaniuk <igor.opaniuk@foundries.io>, Adam Ford <aford173@gmail.com>, Alison Wang <alison.wang@nxp.com>, Andre Przywara <andre.przywara@arm.com>, Ashish Kumar <Ashish.Kumar@nxp.com>, Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>, Bhaskar Upadhaya <bhaskar.upadhaya@nxp.com>, Bin Meng <bmeng.cn@gmail.com>, Biwen Li <biwen.li@nxp.com>, Fabio Estevam <festevam@gmail.com>, Faiz Abbas <faiz_abbas@ti.com>, Feng Li <feng.li_2@nxp.com>, Frieder Schrempf <frieder.schrempf@kontron.de>, Hans de Goede <hdegoede@redhat.com>, Heiko Schocher <hs@denx.de>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Holger Brunck <holger.brunck@hitachi-powergrids.com>, Hou Zhiqiang <Zhiqiang.Hou@nxp.com>, Jaehoon Chung <jh80.chung@samsung.com>, Jagan Teki <jagan@amarulasolutions.com>, Jernej Skrabec <jernej.skrabec@siol.net>, Jonas Smedegaard <dr@jones.dk>, Kuldeep Singh <kuldeep.singh@nxp.com>, Lokesh Vutla <lokeshvutla@ti.com>, Lukasz Majewski <lukma@denx.de>, Madalin Bucur <madalin.bucur@oss.nxp.com>, Manish Tomar <manish.tomar@nxp.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Marek Vasut <marex@denx.de>, Martin Kaistra <martin.kaistra@linutronix.de>, Masahiro Yamada <masahiroy@kernel.org>, Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>, Michael Walle <michael@walle.cc>, Michal Simek <michal.simek@xilinx.com>, Mingkai Hu <mingkai.hu@nxp.com>, "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>, Ovidiu Panait <ovidiu.panait@windriver.com>, =?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>, Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>, Pragnesh Patel <pragnesh.patel@sifive.com>, Pramod Kumar <pramod.kumar_1@nxp.com>, Priyanka Jain <priyanka.jain@nxp.com>, Priyanka Singh <priyanka.singh@nxp.com>, Qiang Zhao <qiang.zhao@nxp.com>, Rai Harninder <harninder.rai@nxp.com>, Rajesh Bhagat <rajesh.bhagat@nxp.com>, Shengzhou Liu <Shengzhou.Liu@nxp.com>, Stefan Bosch <stefan_b@posteo.net>, Stefan Roese <sr@denx.de>, Stefano Babic <sbabic@denx.de>, Sudhanshu Gupta <sudhanshu.gupta@nxp.com>, Suman Anna <s-anna@ti.com>, Sumit Garg <sumit.garg@nxp.com>, Tang Yuantian <andy.tang@nxp.com>, Tero Kristo <t-kristo@ti.com>, Udit Agarwal <udit.agarwal@nxp.com>, Vitaly Andrianov <vitalya@ti.com>, Vladimir Oltean <olteanv@gmail.com>, Wasim Khan <wasim.khan@nxp.com>, Wolfgang Denk <wd@denx.de> Subject: [RFC PATCH v1 0/2] Allow disabling driver model for I2C in SPL Date: Fri, 5 Feb 2021 17:10:56 +0200 Message-Id: <20210205151058.1037793-1-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 05 Feb 2021 16:27:17 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://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>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
Allow disabling driver model for I2C in SPL
|
expand
|
From: Igor Opaniuk <igor.opaniuk@foundries.io> At present if U-Boot proper uses driver model for I2C, then SPL has to also. While this is desirable, it places a significant barrier to moving to driver model in some cases. For example, with a space-constrained SPL it may be necessary to enable CONFIG_SPL_OF_PLATDATA which involves adjusting some drivers. This patch introduces a separate Kconfig symbols for enabling DM_I2C and DM_I2C_GPIO support in SPL. This will also help to get away from dirty workarounds to achieve non-DM I2C support for SPL, which is currently used in some board header files like: ifdef CONFIG_SPL_BUILD undef CONFIG_DM_I2C endif All occurences were replaced automatically using these bash cmds: $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + Testing: $ make check ... Name Stmts Miss Cover --------------------------------------------------------------------------- tools/binman/cbfs_util.py 370 7 98% tools/binman/cmdline.py 49 0 100% tools/binman/control.py 291 0 100% tools/binman/elf.py 123 0 100% tools/binman/entry.py 340 0 100% tools/binman/etype/atf_bl31.py 5 0 100% tools/binman/etype/blob.py 26 0 100% tools/binman/etype/blob_dtb.py 23 0 100% tools/binman/etype/blob_ext.py 9 0 100% tools/binman/etype/blob_named_by_arg.py 9 0 100% tools/binman/etype/cbfs.py 90 0 100% tools/binman/etype/cros_ec_rw.py 5 0 100% tools/binman/etype/fdtmap.py 53 0 100% tools/binman/etype/files.py 32 0 100% tools/binman/etype/fill.py 14 0 100% tools/binman/etype/fit.py 109 0 100% tools/binman/etype/fmap.py 29 0 100% tools/binman/etype/gbb.py 33 0 100% tools/binman/etype/image_header.py 53 0 100% tools/binman/etype/intel_cmc.py 4 0 100% tools/binman/etype/intel_descriptor.py 39 0 100% tools/binman/etype/intel_fit.py 12 0 100% tools/binman/etype/intel_fit_ptr.py 17 0 100% tools/binman/etype/intel_fsp.py 4 0 100% tools/binman/etype/intel_fsp_m.py 4 0 100% tools/binman/etype/intel_fsp_s.py 4 0 100% tools/binman/etype/intel_fsp_t.py 4 0 100% tools/binman/etype/intel_ifwi.py 59 0 100% tools/binman/etype/intel_me.py 4 0 100% tools/binman/etype/intel_mrc.py 6 0 100% tools/binman/etype/intel_refcode.py 6 0 100% tools/binman/etype/intel_vbt.py 4 0 100% tools/binman/etype/intel_vga.py 4 0 100% tools/binman/etype/mkimage.py 28 0 100% tools/binman/etype/powerpc_mpc85xx_bootpg_resetvec.py 6 0 100% tools/binman/etype/scp.py 5 0 100% tools/binman/etype/section.py 328 0 100% tools/binman/etype/text.py 21 0 100% tools/binman/etype/u_boot.py 7 0 100% tools/binman/etype/u_boot_dtb.py 9 0 100% tools/binman/etype/u_boot_dtb_with_ucode.py 50 0 100% tools/binman/etype/u_boot_elf.py 19 0 100% tools/binman/etype/u_boot_env.py 27 0 100% tools/binman/etype/u_boot_img.py 7 0 100% tools/binman/etype/u_boot_nodtb.py 7 0 100% tools/binman/etype/u_boot_spl.py 11 0 100% tools/binman/etype/u_boot_spl_bss_pad.py 14 0 100% tools/binman/etype/u_boot_spl_dtb.py 9 0 100% tools/binman/etype/u_boot_spl_elf.py 7 0 100% tools/binman/etype/u_boot_spl_nodtb.py 7 0 100% tools/binman/etype/u_boot_spl_with_ucode_ptr.py 8 0 100% tools/binman/etype/u_boot_tpl.py 11 0 100% tools/binman/etype/u_boot_tpl_dtb.py 9 0 100% tools/binman/etype/u_boot_tpl_dtb_with_ucode.py 8 0 100% tools/binman/etype/u_boot_tpl_elf.py 7 0 100% tools/binman/etype/u_boot_tpl_with_ucode_ptr.py 12 0 100% tools/binman/etype/u_boot_ucode.py 33 0 100% tools/binman/etype/u_boot_with_ucode_ptr.py 42 0 100% tools/binman/etype/vblock.py 36 0 100% tools/binman/etype/x86_reset16.py 7 0 100% tools/binman/etype/x86_reset16_spl.py 7 0 100% tools/binman/etype/x86_reset16_tpl.py 7 0 100% tools/binman/etype/x86_start16.py 7 0 100% tools/binman/etype/x86_start16_spl.py 7 0 100% tools/binman/etype/x86_start16_tpl.py 7 0 100% tools/binman/fmap_util.py 48 0 100% tools/binman/image.py 154 0 100% tools/binman/state.py 154 0 100% --------------------------------------------------------------------------- TOTAL 2960 7 99% Testing builds with buildman for some random set of boards: Toradex: buildman -l -W -v -m -o ../buildman-results/ toradex 10 5 0 /15 0:00:07 : apalis_t30 Completed: 15 total built, duration 0:02:41, rate 0.09 ---------------------------------- Xilinx: buildman -l -W -v -m -o ../buildman-results/ xilinx 3 14 1 /18 xilinx_zynq_virt Completed: 18 total built, duration 0:02:29, rate 0.12 ---------------------------------- ST: buildman -l -W -v -m -o ../buildman-results/ st 15 2 5 /22 0:00:03 : stm32f769-disco Completed: 22 total built, duration 0:02:46, rate 0.13 Igor Opaniuk (2): dm: i2c: allow disabling driver model in SPL dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C and DM_I2C_GPIO .../include/asm/arch-fsl-layerscape/config.h | 2 +- arch/arm/include/asm/arch-lpc32xx/i2c.h | 2 +- arch/arm/include/asm/mach-imx/mxc_i2c.h | 2 +- arch/arm/include/asm/omap_i2c.h | 2 +- arch/arm/mach-imx/i2c-mxv7.c | 2 +- arch/arm/mach-keystone/ddr3_spd.c | 2 +- arch/arm/mach-kirkwood/include/mach/config.h | 2 +- arch/arm/mach-omap2/am33xx/board.c | 2 +- arch/arm/mach-omap2/am33xx/clk_synthesizer.c | 6 +- arch/arm/mach-omap2/boot-common.c | 2 +- arch/arm/mach-omap2/clocks-common.c | 2 +- arch/arm/mach-sunxi/board.c | 2 +- arch/powerpc/include/asm/fsl_i2c.h | 2 +- board/freescale/common/dcu_sii9022a.c | 2 +- board/freescale/common/diu_ch7301.c | 2 +- board/freescale/common/emc2305.c | 4 +- board/freescale/common/qixis.c | 4 +- board/freescale/common/sys_eeprom.c | 20 ++-- board/freescale/common/vid.c | 24 ++--- board/freescale/common/vsc3316_3308.c | 10 +- board/freescale/ls1012aqds/ls1012aqds.c | 2 +- board/freescale/ls1012ardb/eth.c | 2 +- board/freescale/ls1012ardb/ls1012ardb.c | 12 +-- board/freescale/ls1021aqds/dcu.c | 6 +- board/freescale/ls1021aqds/ls1021aqds.c | 2 +- board/freescale/ls1021atwr/ls1021atwr.c | 2 +- board/freescale/ls1028a/ls1028a.c | 2 +- board/freescale/ls1043aqds/ls1043aqds.c | 4 +- board/freescale/ls1046afrwy/ls1046afrwy.c | 2 +- board/freescale/ls1046aqds/ls1046aqds.c | 2 +- board/freescale/ls1088a/eth_ls1088aqds.c | 16 +-- board/freescale/ls1088a/ls1088a.c | 60 ++++++------ board/freescale/ls2080aqds/eth.c | 14 +-- board/freescale/ls2080aqds/ls2080aqds.c | 4 +- board/freescale/ls2080ardb/ls2080ardb.c | 2 +- board/freescale/lx2160a/lx2160a.c | 2 +- board/freescale/p1010rdb/p1010rdb.c | 8 +- board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 2 +- board/freescale/t102xrdb/t102xrdb.c | 2 +- board/freescale/t208xqds/t208xqds.c | 2 +- board/friendlyarm/nanopi2/onewire.c | 6 +- board/keymile/common/ivm.c | 2 +- board/samsung/common/misc.c | 2 +- board/samsung/trats/trats.c | 10 +- board/samsung/trats2/trats2.c | 10 +- board/sunxi/board.c | 2 +- board/ti/am335x/board.c | 8 +- board/ti/am335x/mux.c | 2 +- board/ti/am43xx/board.c | 12 +-- board/ti/common/board_detect.c | 4 +- board/ti/ks2_evm/board_k2g.c | 2 +- board/wandboard/wandboard.c | 4 +- cmd/eeprom.c | 6 +- cmd/i2c.c | 98 +++++++++---------- doc/driver-model/i2c-howto.rst | 2 +- drivers/ddr/fsl/main.c | 8 +- drivers/i2c/Kconfig | 21 ++++ drivers/i2c/Makefile | 4 +- drivers/i2c/davinci_i2c.c | 4 +- drivers/i2c/designware_i2c.c | 4 +- drivers/i2c/fsl_i2c.c | 6 +- drivers/i2c/ihs_i2c.c | 42 ++++---- drivers/i2c/lpc32xx_i2c.c | 4 +- drivers/i2c/mv_i2c.c | 2 +- drivers/i2c/mvtwsi.c | 16 +-- drivers/i2c/mxc_i2c.c | 4 +- drivers/i2c/omap24xx_i2c.c | 2 +- drivers/misc/Makefile | 2 +- drivers/power/palmas.c | 2 +- drivers/power/pmic/pmic_tps62362.c | 6 +- drivers/power/pmic/pmic_tps65217.c | 14 +-- drivers/power/pmic/pmic_tps65218.c | 4 +- drivers/power/pmic/pmic_tps65910.c | 6 +- drivers/power/twl4030.c | 2 +- drivers/power/twl6030.c | 2 +- drivers/tpm/tpm_atmel_twi.c | 6 +- drivers/usb/host/ohci-lpc32xx.c | 8 +- include/_exports.h | 2 +- include/config_fallbacks.h | 2 +- include/configs/MPC8548CDS.h | 2 +- include/configs/P1010RDB.h | 2 +- include/configs/P2041RDB.h | 2 +- include/configs/T102xRDB.h | 2 +- include/configs/T104xRDB.h | 2 +- include/configs/T208xQDS.h | 2 +- include/configs/T208xRDB.h | 2 +- include/configs/T4240RDB.h | 2 +- include/configs/am43xx_evm.h | 2 +- include/configs/corenet_ds.h | 2 +- include/configs/ls1012a_common.h | 2 +- include/configs/ls1021aiot.h | 2 +- include/configs/ls1021aqds.h | 2 +- include/configs/ls1021atsn.h | 2 +- include/configs/ls1021atwr.h | 2 +- include/configs/ls1028a_common.h | 2 +- include/configs/ls1043a_common.h | 2 +- include/configs/ls1046a_common.h | 2 +- include/configs/ls1088a_common.h | 2 +- include/configs/ls1088aqds.h | 2 +- include/configs/ls2080a_common.h | 2 +- include/configs/ls2080aqds.h | 2 +- include/configs/ls2080ardb.h | 2 +- include/configs/p1_p2_rdb_pc.h | 2 +- include/configs/sunxi-common.h | 2 +- include/configs/ti_armv7_common.h | 2 +- include/exports.h | 2 +- include/i2c.h | 2 +- include/palmas.h | 2 +- include/twl4030.h | 2 +- include/twl6030.h | 2 +- 110 files changed, 335 insertions(+), 314 deletions(-)