All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] davinci: fix build warnings
@ 2019-05-27  8:57 Bartosz Golaszewski
  2019-05-27  8:57 ` [U-Boot] [PATCH 1/4] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs Bartosz Golaszewski
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Bartosz Golaszewski @ 2019-05-27  8:57 UTC (permalink / raw)
  To: u-boot

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There are several build warnings related to driver-model usage emitted
when building u-boot for da850-evm and da850-lcdk. This series fixes them
and - while we're at it - removes the i2c compatiblity layer as davinci
was the last user of it.

Bartosz Golaszewski (4):
  davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
  sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
  i2c: remove i2c driver-model compatibility layer
  omapl138_lcdk_defconfig: don't build support for SPI

 Makefile                           |   7 --
 configs/da850_am18xxevm_defconfig  |   1 -
 configs/omapl138_lcdk_defconfig    |   7 +-
 configs/sandbox64_defconfig        |   1 -
 configs/sandbox_defconfig          |   1 -
 configs/sandbox_flattree_defconfig |   1 -
 configs/sandbox_noblk_defconfig    |   1 -
 configs/sandbox_spl_defconfig      |   1 -
 configs/tools-only_defconfig       |   1 -
 drivers/i2c/Kconfig                |  13 +--
 drivers/i2c/Makefile               |   1 -
 drivers/i2c/i2c-uclass-compat.c    | 128 -----------------------------
 include/_exports.h                 |   3 +-
 include/configs/am3517_evm.h       |   1 -
 include/configs/da850evm.h         |   8 --
 include/configs/omapl138_lcdk.h    |   8 --
 include/exports.h                  |   3 +-
 include/i2c.h                      |  80 ------------------
 18 files changed, 4 insertions(+), 262 deletions(-)
 delete mode 100644 drivers/i2c/i2c-uclass-compat.c

-- 
2.21.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/4] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
  2019-05-27  8:57 [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
@ 2019-05-27  8:57 ` Bartosz Golaszewski
  2019-05-27  9:43   ` Heiko Schocher
  2019-05-27  8:57 ` [U-Boot] [PATCH 2/4] sandbox: " Bartosz Golaszewski
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2019-05-27  8:57 UTC (permalink / raw)
  To: u-boot

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This option is no longer used on any davinci board but still selected
in defconfigs which causes the following warning:

===================== WARNING ======================
This board uses CONFIG_DM_I2C_COMPAT. Please remove
(possibly in a subsequent patch in your series)
before sending patches to the mailing list.
====================================================

Remove all references to CONFIG_DM_I2C_COMPAT from davinci.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 configs/da850_am18xxevm_defconfig | 1 -
 configs/omapl138_lcdk_defconfig   | 1 -
 include/configs/am3517_evm.h      | 1 -
 include/configs/da850evm.h        | 8 --------
 include/configs/omapl138_lcdk.h   | 8 --------
 5 files changed, 19 deletions(-)

diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig
index f098222113..ad01957fa1 100644
--- a/configs/da850_am18xxevm_defconfig
+++ b/configs/da850_am18xxevm_defconfig
@@ -44,7 +44,6 @@ CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
-CONFIG_DM_I2C_COMPAT=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_MTD_DEVICE=y
 CONFIG_DM_SPI_FLASH=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index e43141844a..b03d8160af 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -37,7 +37,6 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
 CONFIG_DM_I2C=y
-CONFIG_DM_I2C_COMPAT=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
 CONFIG_NAND=y
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 9475e9975d..11f8f6d213 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -14,7 +14,6 @@
 
 #include <configs/ti_omap3_common.h>
 
-#undef CONFIG_DM_I2C_COMPAT
 #define CONFIG_REVISION_TAG
 
 /* Hardware drivers */
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index ccdac0abec..5d02c35279 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -18,14 +18,6 @@
 #define CONFIG_USE_SPIFLASH
 #endif
 
-/*
-* Disable DM_* for SPL build and can be re-enabled after adding
-* DM support in SPL
-*/
-#ifdef CONFIG_SPL_BUILD
-#undef CONFIG_DM_I2C
-#undef CONFIG_DM_I2C_COMPAT
-#endif
 /*
  * SoC Configuration
  */
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index da615e5063..db4a663c53 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -16,14 +16,6 @@
 #undef CONFIG_USE_SPIFLASH
 #undef	CONFIG_SYS_USE_NOR
 
-/*
-* Disable DM_* for SPL build and can be re-enabled after adding
-* DM support in SPL
-*/
-#ifdef CONFIG_SPL_BUILD
-#undef CONFIG_DM_I2C
-#undef CONFIG_DM_I2C_COMPAT
-#endif
 /*
  * SoC Configuration
  */
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/4] sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
  2019-05-27  8:57 [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
  2019-05-27  8:57 ` [U-Boot] [PATCH 1/4] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs Bartosz Golaszewski
@ 2019-05-27  8:57 ` Bartosz Golaszewski
  2019-05-27  9:44   ` Heiko Schocher
  2019-05-27  8:57 ` [U-Boot] [PATCH 3/4] i2c: remove i2c driver-model compatibility layer Bartosz Golaszewski
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2019-05-27  8:57 UTC (permalink / raw)
  To: u-boot

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There are no more "real" users of CONFIG_DM_I2C_COMPAT and we'll soon
remove it altogether. Stop building it in sandbox mode.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 Makefile                           | 2 +-
 configs/sandbox64_defconfig        | 1 -
 configs/sandbox_defconfig          | 1 -
 configs/sandbox_flattree_defconfig | 1 -
 configs/sandbox_noblk_defconfig    | 1 -
 configs/sandbox_spl_defconfig      | 1 -
 configs/tools-only_defconfig       | 1 -
 7 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 059978bfe6..ff38b5d19f 100644
--- a/Makefile
+++ b/Makefile
@@ -918,7 +918,7 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
 		$(srctree)/scripts/config_whitelist.txt $(srctree)
 
 all:		$(ALL-y)
-ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y)
+ifeq ($(CONFIG_DM_I2C_COMPAT),y)
 	@echo >&2 "===================== WARNING ======================"
 	@echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove"
 	@echo >&2 "(possibly in a subsequent patch in your series)"
diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index 1bc3bd3801..85226f5009 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -89,7 +89,6 @@ CONFIG_BOARD=y
 CONFIG_BOARD_SANDBOX=y
 CONFIG_PM8916_GPIO=y
 CONFIG_SANDBOX_GPIO=y
-CONFIG_DM_I2C_COMPAT=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_I2C_CROS_EC_LDO=y
 CONFIG_DM_I2C_GPIO=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 4877f1099a..9bc567b672 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -104,7 +104,6 @@ CONFIG_PM8916_GPIO=y
 CONFIG_SANDBOX_GPIO=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_SANDBOX=y
-CONFIG_DM_I2C_COMPAT=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_I2C_CROS_EC_LDO=y
 CONFIG_DM_I2C_GPIO=y
diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
index 40593ee3a1..f78d45ad1c 100644
--- a/configs/sandbox_flattree_defconfig
+++ b/configs/sandbox_flattree_defconfig
@@ -74,7 +74,6 @@ CONFIG_BOARD=y
 CONFIG_BOARD_SANDBOX=y
 CONFIG_PM8916_GPIO=y
 CONFIG_SANDBOX_GPIO=y
-CONFIG_DM_I2C_COMPAT=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_I2C_CROS_EC_LDO=y
 CONFIG_DM_I2C_GPIO=y
diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig
index 24ff4b41da..653341699b 100644
--- a/configs/sandbox_noblk_defconfig
+++ b/configs/sandbox_noblk_defconfig
@@ -81,7 +81,6 @@ CONFIG_BOARD=y
 CONFIG_BOARD_SANDBOX=y
 CONFIG_PM8916_GPIO=y
 CONFIG_SANDBOX_GPIO=y
-CONFIG_DM_I2C_COMPAT=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_I2C_CROS_EC_LDO=y
 CONFIG_DM_I2C_GPIO=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index bebd78d55b..6b8b923dda 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -95,7 +95,6 @@ CONFIG_BOARD=y
 CONFIG_BOARD_SANDBOX=y
 CONFIG_PM8916_GPIO=y
 CONFIG_SANDBOX_GPIO=y
-CONFIG_DM_I2C_COMPAT=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_I2C_CROS_EC_LDO=y
 CONFIG_DM_I2C_GPIO=y
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index fb06076785..e3b3018158 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -11,7 +11,6 @@ CONFIG_OF_HOSTFILE=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 # CONFIG_UDP_FUNCTION_FASTBOOT is not set
 CONFIG_SANDBOX_GPIO=y
-CONFIG_DM_I2C_COMPAT=y
 CONFIG_PCI=y
 CONFIG_DM_PCI=y
 CONFIG_PCI_SANDBOX=y
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/4] i2c: remove i2c driver-model compatibility layer
  2019-05-27  8:57 [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
  2019-05-27  8:57 ` [U-Boot] [PATCH 1/4] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs Bartosz Golaszewski
  2019-05-27  8:57 ` [U-Boot] [PATCH 2/4] sandbox: " Bartosz Golaszewski
@ 2019-05-27  8:57 ` Bartosz Golaszewski
  2019-05-27  9:45   ` Heiko Schocher
  2019-05-27  8:57 ` [U-Boot] [PATCH 4/4] omapl138_lcdk_defconfig: don't build support for SPI Bartosz Golaszewski
  2019-06-24  8:18 ` [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
  4 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2019-05-27  8:57 UTC (permalink / raw)
  To: u-boot

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There are no more users of the compatibility layer for i2c. Remove the
driver and all references to it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 Makefile                        |   7 --
 drivers/i2c/Kconfig             |  13 +---
 drivers/i2c/Makefile            |   1 -
 drivers/i2c/i2c-uclass-compat.c | 128 --------------------------------
 include/_exports.h              |   3 +-
 include/exports.h               |   3 +-
 include/i2c.h                   |  80 --------------------
 7 files changed, 3 insertions(+), 232 deletions(-)
 delete mode 100644 drivers/i2c/i2c-uclass-compat.c

diff --git a/Makefile b/Makefile
index ff38b5d19f..bc5774d975 100644
--- a/Makefile
+++ b/Makefile
@@ -918,13 +918,6 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
 		$(srctree)/scripts/config_whitelist.txt $(srctree)
 
 all:		$(ALL-y)
-ifeq ($(CONFIG_DM_I2C_COMPAT),y)
-	@echo >&2 "===================== WARNING ======================"
-	@echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove"
-	@echo >&2 "(possibly in a subsequent patch in your series)"
-	@echo >&2 "before sending patches to the mailing list."
-	@echo >&2 "===================================================="
-endif
 ifeq ($(CONFIG_MMC),y)
 ifneq ($(CONFIG_DM_MMC)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy)
 	@echo >&2 "===================== WARNING ======================"
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 095a9bc6a4..9c26471f94 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -12,18 +12,7 @@ config DM_I2C
 	  write and speed, is implemented with the bus drivers operations,
 	  which provide methods for bus setting and data transfer. Each chip
 	  device (bus child) info is kept as parent platdata. The interface
-	  is defined in include/i2c.h. When i2c bus driver supports the i2c
-	  uclass, but the device drivers not, then DM_I2C_COMPAT config can
-	  be used as compatibility layer.
-
-config DM_I2C_COMPAT
-	bool "Enable I2C compatibility layer"
-	depends on DM
-	help
-	  Enable old-style I2C functions for compatibility with existing code.
-	  This option can be enabled as a temporary measure to avoid needing
-	  to convert all code for a board in a single commit. It should not
-	  be enabled for any board in an official release.
+	  is defined in include/i2c.h.
 
 config I2C_CROS_EC_TUNNEL
 	tristate "Chrome OS EC tunnel I2C bus"
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index dc40055efb..c2f75d8755 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -3,7 +3,6 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 obj-$(CONFIG_DM_I2C) += i2c-uclass.o
-obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o
 obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o
 obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o
 obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o
diff --git a/drivers/i2c/i2c-uclass-compat.c b/drivers/i2c/i2c-uclass-compat.c
deleted file mode 100644
index b3ade88113..0000000000
--- a/drivers/i2c/i2c-uclass-compat.c
+++ /dev/null
@@ -1,128 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (c) 2014 Google, Inc
- */
-
-#include <common.h>
-#include <dm.h>
-#include <errno.h>
-#include <i2c.h>
-
-static int cur_busnum __attribute__((section(".data")));
-
-static int i2c_compat_get_device(uint chip_addr, int alen,
-				 struct udevice **devp)
-{
-	struct dm_i2c_chip *chip;
-	int ret;
-
-	ret = i2c_get_chip_for_busnum(cur_busnum, chip_addr, alen, devp);
-	if (ret)
-		return ret;
-	chip = dev_get_parent_platdata(*devp);
-	if (chip->offset_len != alen) {
-		printf("I2C chip %x: requested alen %d does not match chip offset_len %d\n",
-		       chip_addr, alen, chip->offset_len);
-		return -EADDRNOTAVAIL;
-	}
-
-	return 0;
-}
-
-int i2c_probe(uint8_t chip_addr)
-{
-	struct udevice *bus, *dev;
-	int ret;
-
-	ret = uclass_get_device_by_seq(UCLASS_I2C, cur_busnum, &bus);
-	if (ret) {
-		debug("Cannot find I2C bus %d: err=%d\n", cur_busnum, ret);
-		return ret;
-	}
-
-	if (!bus)
-		return -ENOENT;
-
-	return dm_i2c_probe(bus, chip_addr, 0, &dev);
-}
-
-int i2c_read(uint8_t chip_addr, unsigned int addr, int alen, uint8_t *buffer,
-	     int len)
-{
-	struct udevice *dev;
-	int ret;
-
-	ret = i2c_compat_get_device(chip_addr, alen, &dev);
-	if (ret)
-		return ret;
-
-	return dm_i2c_read(dev, addr, buffer, len);
-}
-
-int i2c_write(uint8_t chip_addr, unsigned int addr, int alen, uint8_t *buffer,
-	      int len)
-{
-	struct udevice *dev;
-	int ret;
-
-	ret = i2c_compat_get_device(chip_addr, alen, &dev);
-	if (ret)
-		return ret;
-
-	return dm_i2c_write(dev, addr, buffer, len);
-}
-
-int i2c_get_bus_num_fdt(int node)
-{
-	struct udevice *bus;
-	int ret;
-
-	ret = uclass_get_device_by_of_offset(UCLASS_I2C, node, &bus);
-	if (ret)
-		return ret;
-
-	return bus->seq;
-}
-
-unsigned int i2c_get_bus_num(void)
-{
-	return cur_busnum;
-}
-
-int i2c_set_bus_num(unsigned int bus)
-{
-	cur_busnum = bus;
-
-	return 0;
-}
-
-void i2c_init(int speed, int slaveaddr)
-{
-	/* Nothing to do here - the init happens through driver model */
-}
-
-void board_i2c_init(const void *blob)
-{
-	/* Nothing to do here - the init happens through driver model */
-}
-
-uint8_t i2c_reg_read(uint8_t chip_addr, uint8_t offset)
-{
-	struct udevice *dev;
-	int ret;
-
-	ret = i2c_compat_get_device(chip_addr, 1, &dev);
-	if (ret)
-		return 0xff;
-	return dm_i2c_reg_read(dev, offset);
-}
-
-void i2c_reg_write(uint8_t chip_addr, uint8_t offset, uint8_t val)
-{
-	struct udevice *dev;
-	int ret;
-
-	ret = i2c_compat_get_device(chip_addr, 1, &dev);
-	if (!ret)
-		dm_i2c_reg_write(dev, offset, val);
-}
diff --git a/include/_exports.h b/include/_exports.h
index c15050e30b..0dee05f077 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -40,8 +40,7 @@
 	EXPORT_FUNC(simple_strtol, long, simple_strtol,
 		    const char *, char **, unsigned int)
 	EXPORT_FUNC(strcmp, int, strcmp, const char *cs, const char *ct)
-#if defined(CONFIG_CMD_I2C) && \
-		(!defined(CONFIG_DM_I2C) || defined(CONFIG_DM_I2C_COMPAT))
+#if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C)
 	EXPORT_FUNC(i2c_write, int, i2c_write, uchar, uint, int , uchar * , int)
 	EXPORT_FUNC(i2c_read, int, i2c_read, uchar, uint, int , uchar * , int)
 #else
diff --git a/include/exports.h b/include/exports.h
index a4b862f191..bf8d53c6b0 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -32,8 +32,7 @@ long simple_strtol(const char *cp, char **endp, unsigned int base);
 int strcmp(const char *cs, const char *ct);
 unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
 unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
-#if defined(CONFIG_CMD_I2C) && \
-		(!defined(CONFIG_DM_I2C) || defined(CONFIG_DM_I2C_COMPAT))
+#if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C)
 int i2c_write (uchar, uint, int , uchar* , int);
 int i2c_read (uchar, uint, int , uchar* , int);
 #endif
diff --git a/include/i2c.h b/include/i2c.h
index a5c760c711..33570f5404 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -271,86 +271,6 @@ int i2c_get_chip_offset_len(struct udevice *dev);
  */
 int i2c_deblock(struct udevice *bus);
 
-#ifdef CONFIG_DM_I2C_COMPAT
-/**
- * i2c_probe() - Compatibility function for driver model
- *
- * Calls dm_i2c_probe() on the current bus
- */
-int i2c_probe(uint8_t chip_addr);
-
-/**
- * i2c_read() - Compatibility function for driver model
- *
- * Calls dm_i2c_read() with the device corresponding to @chip_addr, and offset
- * set to @addr. @alen must match the current setting for the device.
- */
-int i2c_read(uint8_t chip_addr, unsigned int addr, int alen, uint8_t *buffer,
-	     int len);
-
-/**
- * i2c_write() - Compatibility function for driver model
- *
- * Calls dm_i2c_write() with the device corresponding to @chip_addr, and offset
- * set to @addr. @alen must match the current setting for the device.
- */
-int i2c_write(uint8_t chip_addr, unsigned int addr, int alen, uint8_t *buffer,
-	      int len);
-
-/**
- * i2c_get_bus_num_fdt() - Compatibility function for driver model
- *
- * @return the bus number associated with the given device tree node
- */
-int i2c_get_bus_num_fdt(int node);
-
-/**
- * i2c_get_bus_num() - Compatibility function for driver model
- *
- * @return the 'current' bus number
- */
-unsigned int i2c_get_bus_num(void);
-
-/**
- * i2c_set_bus_num() - Compatibility function for driver model
- *
- * Sets the 'current' bus
- */
-int i2c_set_bus_num(unsigned int bus);
-
-static inline void I2C_SET_BUS(unsigned int bus)
-{
-	i2c_set_bus_num(bus);
-}
-
-static inline unsigned int I2C_GET_BUS(void)
-{
-	return i2c_get_bus_num();
-}
-
-/**
- * i2c_init() - Compatibility function for driver model
- *
- * This function does nothing.
- */
-void i2c_init(int speed, int slaveaddr);
-
-/**
- * board_i2c_init() - Compatibility function for driver model
- *
- * @param blob  Device tree blbo
- * @return the number of I2C bus
- */
-void board_i2c_init(const void *blob);
-
-/*
- * Compatibility functions for driver model.
- */
-uint8_t i2c_reg_read(uint8_t addr, uint8_t reg);
-void i2c_reg_write(uint8_t addr, uint8_t reg, uint8_t val);
-
-#endif
-
 /**
  * struct dm_i2c_ops - driver operations for I2C uclass
  *
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 4/4] omapl138_lcdk_defconfig: don't build support for SPI
  2019-05-27  8:57 [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2019-05-27  8:57 ` [U-Boot] [PATCH 3/4] i2c: remove i2c driver-model compatibility layer Bartosz Golaszewski
@ 2019-05-27  8:57 ` Bartosz Golaszewski
  2019-05-27  9:46   ` Heiko Schocher
  2019-06-24  8:18 ` [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
  4 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2019-05-27  8:57 UTC (permalink / raw)
  To: u-boot

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

The following warning is emited when building u-boot for da850-lcdk:

===================== WARNING ======================
This board does not use CONFIG_DM_SPI. Please update
the board before v2019.04 for no dm conversion
and v2019.07 for partially dm converted drivers.
Failure to update can lead to driver/board removal
See doc/driver-model/MIGRATION.txt for more info.
====================================================
===================== WARNING ======================
This board does not use CONFIG_DM_SPI_FLASH. Please update
the board to use CONFIG_SPI_FLASH before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

While we could fix it by selecting CONFIG_DM_SPI, there's no need to
build it at all as SPI is disabled on da850-lcdk. Remove all unneeded
options from the defconfig.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 configs/omapl138_lcdk_defconfig | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index b03d8160af..1c232b47f3 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -27,6 +27,7 @@ CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_GPIO is not set
 CONFIG_CMD_NAND=y
+# CONFIG_CMD_SPI is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_DIAG=y
@@ -45,13 +46,8 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
 CONFIG_SYS_NAND_U_BOOT_OFFS=0x28000
 CONFIG_SPL_NAND_SIMPLE=y
-CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
-CONFIG_SPI_FLASH_STMICRO=y
-CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
-CONFIG_SPI=y
-CONFIG_DAVINCI_SPI=y
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/4] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
  2019-05-27  8:57 ` [U-Boot] [PATCH 1/4] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs Bartosz Golaszewski
@ 2019-05-27  9:43   ` Heiko Schocher
  0 siblings, 0 replies; 12+ messages in thread
From: Heiko Schocher @ 2019-05-27  9:43 UTC (permalink / raw)
  To: u-boot

Hello Bartosz,

Am 27.05.2019 um 10:57 schrieb Bartosz Golaszewski:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> This option is no longer used on any davinci board but still selected
> in defconfigs which causes the following warning:
> 
> ===================== WARNING ======================
> This board uses CONFIG_DM_I2C_COMPAT. Please remove
> (possibly in a subsequent patch in your series)
> before sending patches to the mailing list.
> ====================================================
> 
> Remove all references to CONFIG_DM_I2C_COMPAT from davinci.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>   configs/da850_am18xxevm_defconfig | 1 -
>   configs/omapl138_lcdk_defconfig   | 1 -
>   include/configs/am3517_evm.h      | 1 -
>   include/configs/da850evm.h        | 8 --------
>   include/configs/omapl138_lcdk.h   | 8 --------
>   5 files changed, 19 deletions(-)

Acked-by: Heiko Schocher <hs@denx.de>

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/4] sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
  2019-05-27  8:57 ` [U-Boot] [PATCH 2/4] sandbox: " Bartosz Golaszewski
@ 2019-05-27  9:44   ` Heiko Schocher
  0 siblings, 0 replies; 12+ messages in thread
From: Heiko Schocher @ 2019-05-27  9:44 UTC (permalink / raw)
  To: u-boot

Hello Bartosz,

Am 27.05.2019 um 10:57 schrieb Bartosz Golaszewski:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> There are no more "real" users of CONFIG_DM_I2C_COMPAT and we'll soon
> remove it altogether. Stop building it in sandbox mode.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>   Makefile                           | 2 +-
>   configs/sandbox64_defconfig        | 1 -
>   configs/sandbox_defconfig          | 1 -
>   configs/sandbox_flattree_defconfig | 1 -
>   configs/sandbox_noblk_defconfig    | 1 -
>   configs/sandbox_spl_defconfig      | 1 -
>   configs/tools-only_defconfig       | 1 -
>   7 files changed, 1 insertion(+), 7 deletions(-)

Acked-by: Heiko Schocher <hs@denx.de>

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/4] i2c: remove i2c driver-model compatibility layer
  2019-05-27  8:57 ` [U-Boot] [PATCH 3/4] i2c: remove i2c driver-model compatibility layer Bartosz Golaszewski
@ 2019-05-27  9:45   ` Heiko Schocher
  0 siblings, 0 replies; 12+ messages in thread
From: Heiko Schocher @ 2019-05-27  9:45 UTC (permalink / raw)
  To: u-boot

Hello Bartosz,

Am 27.05.2019 um 10:57 schrieb Bartosz Golaszewski:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> There are no more users of the compatibility layer for i2c. Remove the
> driver and all references to it.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>   Makefile                        |   7 --
>   drivers/i2c/Kconfig             |  13 +---
>   drivers/i2c/Makefile            |   1 -
>   drivers/i2c/i2c-uclass-compat.c | 128 --------------------------------
>   include/_exports.h              |   3 +-
>   include/exports.h               |   3 +-
>   include/i2c.h                   |  80 --------------------
>   7 files changed, 3 insertions(+), 232 deletions(-)
>   delete mode 100644 drivers/i2c/i2c-uclass-compat.c

Acked-by: Heiko Schocher <hs@denx.de>

Thanks!

bye,
Heiko
-- 
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 4/4] omapl138_lcdk_defconfig: don't build support for SPI
  2019-05-27  8:57 ` [U-Boot] [PATCH 4/4] omapl138_lcdk_defconfig: don't build support for SPI Bartosz Golaszewski
@ 2019-05-27  9:46   ` Heiko Schocher
  0 siblings, 0 replies; 12+ messages in thread
From: Heiko Schocher @ 2019-05-27  9:46 UTC (permalink / raw)
  To: u-boot

Hello Bartosz,

Am 27.05.2019 um 10:57 schrieb Bartosz Golaszewski:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> The following warning is emited when building u-boot for da850-lcdk:
> 
> ===================== WARNING ======================
> This board does not use CONFIG_DM_SPI. Please update
> the board before v2019.04 for no dm conversion
> and v2019.07 for partially dm converted drivers.
> Failure to update can lead to driver/board removal
> See doc/driver-model/MIGRATION.txt for more info.
> ====================================================
> ===================== WARNING ======================
> This board does not use CONFIG_DM_SPI_FLASH. Please update
> the board to use CONFIG_SPI_FLASH before the v2019.07 release.
> Failure to update by the deadline may result in board removal.
> See doc/driver-model/MIGRATION.txt for more info.
> ====================================================
> 
> While we could fix it by selecting CONFIG_DM_SPI, there's no need to
> build it at all as SPI is disabled on da850-lcdk. Remove all unneeded
> options from the defconfig.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>   configs/omapl138_lcdk_defconfig | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)

Acked-by: Heiko Schocher <hs@denx.de>

Thanks!

bye,
Heiko
-- 
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 0/4] davinci: fix build warnings
  2019-05-27  8:57 [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
                   ` (3 preceding siblings ...)
  2019-05-27  8:57 ` [U-Boot] [PATCH 4/4] omapl138_lcdk_defconfig: don't build support for SPI Bartosz Golaszewski
@ 2019-06-24  8:18 ` Bartosz Golaszewski
  2019-07-04  7:38   ` Bartosz Golaszewski
  4 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2019-06-24  8:18 UTC (permalink / raw)
  To: u-boot

pon., 27 maj 2019 o 10:57 Bartosz Golaszewski <brgl@bgdev.pl> napisał(a):
>
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> There are several build warnings related to driver-model usage emitted
> when building u-boot for da850-evm and da850-lcdk. This series fixes them
> and - while we're at it - removes the i2c compatiblity layer as davinci
> was the last user of it.
>
> Bartosz Golaszewski (4):
>   davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
>   sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
>   i2c: remove i2c driver-model compatibility layer
>   omapl138_lcdk_defconfig: don't build support for SPI
>
>  Makefile                           |   7 --
>  configs/da850_am18xxevm_defconfig  |   1 -
>  configs/omapl138_lcdk_defconfig    |   7 +-
>  configs/sandbox64_defconfig        |   1 -
>  configs/sandbox_defconfig          |   1 -
>  configs/sandbox_flattree_defconfig |   1 -
>  configs/sandbox_noblk_defconfig    |   1 -
>  configs/sandbox_spl_defconfig      |   1 -
>  configs/tools-only_defconfig       |   1 -
>  drivers/i2c/Kconfig                |  13 +--
>  drivers/i2c/Makefile               |   1 -
>  drivers/i2c/i2c-uclass-compat.c    | 128 -----------------------------
>  include/_exports.h                 |   3 +-
>  include/configs/am3517_evm.h       |   1 -
>  include/configs/da850evm.h         |   8 --
>  include/configs/omapl138_lcdk.h    |   8 --
>  include/exports.h                  |   3 +-
>  include/i2c.h                      |  80 ------------------
>  18 files changed, 4 insertions(+), 262 deletions(-)
>  delete mode 100644 drivers/i2c/i2c-uclass-compat.c
>
> --
> 2.21.0
>

Ping

Bart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 0/4] davinci: fix build warnings
  2019-06-24  8:18 ` [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
@ 2019-07-04  7:38   ` Bartosz Golaszewski
  2019-07-04 13:28     ` Tom Rini
  0 siblings, 1 reply; 12+ messages in thread
From: Bartosz Golaszewski @ 2019-07-04  7:38 UTC (permalink / raw)
  To: u-boot

pon., 24 cze 2019 o 10:18 Bartosz Golaszewski <brgl@bgdev.pl> napisał(a):
>
> pon., 27 maj 2019 o 10:57 Bartosz Golaszewski <brgl@bgdev.pl> napisał(a):
> >
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > There are several build warnings related to driver-model usage emitted
> > when building u-boot for da850-evm and da850-lcdk. This series fixes them
> > and - while we're at it - removes the i2c compatiblity layer as davinci
> > was the last user of it.
> >
> > Bartosz Golaszewski (4):
> >   davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
> >   sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
> >   i2c: remove i2c driver-model compatibility layer
> >   omapl138_lcdk_defconfig: don't build support for SPI
> >
> >  Makefile                           |   7 --
> >  configs/da850_am18xxevm_defconfig  |   1 -
> >  configs/omapl138_lcdk_defconfig    |   7 +-
> >  configs/sandbox64_defconfig        |   1 -
> >  configs/sandbox_defconfig          |   1 -
> >  configs/sandbox_flattree_defconfig |   1 -
> >  configs/sandbox_noblk_defconfig    |   1 -
> >  configs/sandbox_spl_defconfig      |   1 -
> >  configs/tools-only_defconfig       |   1 -
> >  drivers/i2c/Kconfig                |  13 +--
> >  drivers/i2c/Makefile               |   1 -
> >  drivers/i2c/i2c-uclass-compat.c    | 128 -----------------------------
> >  include/_exports.h                 |   3 +-
> >  include/configs/am3517_evm.h       |   1 -
> >  include/configs/da850evm.h         |   8 --
> >  include/configs/omapl138_lcdk.h    |   8 --
> >  include/exports.h                  |   3 +-
> >  include/i2c.h                      |  80 ------------------
> >  18 files changed, 4 insertions(+), 262 deletions(-)
> >  delete mode 100644 drivers/i2c/i2c-uclass-compat.c
> >
> > --
> > 2.21.0
> >
>
> Ping
>
> Bart

Hi Tom,

could you pick this one up as well post release?

Bart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 0/4] davinci: fix build warnings
  2019-07-04  7:38   ` Bartosz Golaszewski
@ 2019-07-04 13:28     ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2019-07-04 13:28 UTC (permalink / raw)
  To: u-boot

On Thu, Jul 04, 2019 at 09:38:38AM +0200, Bartosz Golaszewski wrote:
> pon., 24 cze 2019 o 10:18 Bartosz Golaszewski <brgl@bgdev.pl> napisał(a):
> >
> > pon., 27 maj 2019 o 10:57 Bartosz Golaszewski <brgl@bgdev.pl> napisał(a):
> > >
> > > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > >
> > > There are several build warnings related to driver-model usage emitted
> > > when building u-boot for da850-evm and da850-lcdk. This series fixes them
> > > and - while we're at it - removes the i2c compatiblity layer as davinci
> > > was the last user of it.
> > >
> > > Bartosz Golaszewski (4):
> > >   davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
> > >   sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
> > >   i2c: remove i2c driver-model compatibility layer
> > >   omapl138_lcdk_defconfig: don't build support for SPI
> > >
> > >  Makefile                           |   7 --
> > >  configs/da850_am18xxevm_defconfig  |   1 -
> > >  configs/omapl138_lcdk_defconfig    |   7 +-
> > >  configs/sandbox64_defconfig        |   1 -
> > >  configs/sandbox_defconfig          |   1 -
> > >  configs/sandbox_flattree_defconfig |   1 -
> > >  configs/sandbox_noblk_defconfig    |   1 -
> > >  configs/sandbox_spl_defconfig      |   1 -
> > >  configs/tools-only_defconfig       |   1 -
> > >  drivers/i2c/Kconfig                |  13 +--
> > >  drivers/i2c/Makefile               |   1 -
> > >  drivers/i2c/i2c-uclass-compat.c    | 128 -----------------------------
> > >  include/_exports.h                 |   3 +-
> > >  include/configs/am3517_evm.h       |   1 -
> > >  include/configs/da850evm.h         |   8 --
> > >  include/configs/omapl138_lcdk.h    |   8 --
> > >  include/exports.h                  |   3 +-
> > >  include/i2c.h                      |  80 ------------------
> > >  18 files changed, 4 insertions(+), 262 deletions(-)
> > >  delete mode 100644 drivers/i2c/i2c-uclass-compat.c
> > >
> > > --
> > > 2.21.0
> > >
> >
> > Ping
> >
> > Bart
> 
> Hi Tom,
> 
> could you pick this one up as well post release?

Yes, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190704/5fd6e808/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-07-04 13:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27  8:57 [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
2019-05-27  8:57 ` [U-Boot] [PATCH 1/4] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs Bartosz Golaszewski
2019-05-27  9:43   ` Heiko Schocher
2019-05-27  8:57 ` [U-Boot] [PATCH 2/4] sandbox: " Bartosz Golaszewski
2019-05-27  9:44   ` Heiko Schocher
2019-05-27  8:57 ` [U-Boot] [PATCH 3/4] i2c: remove i2c driver-model compatibility layer Bartosz Golaszewski
2019-05-27  9:45   ` Heiko Schocher
2019-05-27  8:57 ` [U-Boot] [PATCH 4/4] omapl138_lcdk_defconfig: don't build support for SPI Bartosz Golaszewski
2019-05-27  9:46   ` Heiko Schocher
2019-06-24  8:18 ` [U-Boot] [PATCH 0/4] davinci: fix build warnings Bartosz Golaszewski
2019-07-04  7:38   ` Bartosz Golaszewski
2019-07-04 13:28     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.