Skip to contentSkip to conversation

ARM: davinci: driver-model improvements

PATCH New Bartosz Golaszewski 3 participants 20 messages Jul 9, 2019 – Jul 22, 2019

Subsystems (9)
lore
Share & tools
lore
#0 lore raw

cover ARM: davinci: driver-model improvements

From: Bartosz Golaszewski <[email protected]>

Hi Tom,

the following series contains all the patches for davinci that have been sent to the mailing list recently rebased on top of v2019.07 and retested on da850-lcdk and da850-evm. I collected all the review and test tags too.

The first patch is the emac driver conversion to driver model. Patches 2-5 fix build warnings due to legacy interfaces usage. Patches 6-9 add support for driver model to the davinci NAND driver. Patches 10-13 enable driver-model support in SPL for davinci. Last patch enables the driver model for NAND in SPL.

These patches (except for the last, trivial one) have spent a lot of time on the list and have been validated. I think they are ready to be picked up for upstream.

Bartosz Golaszewski (14):
net: davinci_emac: convert to using the driver model
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
nand: davinci: make davinci_nand_init() static
nand: davinci: add support for driver model
davinci: omapl138-lcdk: enable driver model for NAND
davinci: da850-evm: enable driver model for NAND
davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE
davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF
davinci: omapl138-lcdk: remove unneeded includes
davinci: omapl138-lcdk: enable driver-model in SPL
configs: omapl138_lcdk: enable NAND self-init in SPL

 Makefile                                      |   7 -
 arch/arm/dts/da850-evm-u-boot.dtsi            |   4 +
 arch/arm/dts/da850-lcdk-u-boot.dtsi           |   4 +
 arch/arm/include/asm/ti-common/davinci_nand.h |   2 -
 arch/arm/mach-davinci/cpu.c                   |  13 --
 arch/arm/mach-omap2/omap3/emac.c              |   3 +-
 board/davinci/da8xxevm/da850evm.c             |   6 -
 board/davinci/da8xxevm/omapl138_lcdk.c        |  32 ++---
 board/logicpd/am3517evm/am3517evm.c           |   1 -
 board/ti/ti816x/evm.c                         |   3 +-
 configs/am3517_evm_defconfig                  |   1 +
 configs/da850_am18xxevm_defconfig             |   1 -
 configs/da850evm_defconfig                    |   2 +
 configs/da850evm_direct_nor_defconfig         |   2 +
 configs/da850evm_nand_defconfig               |   2 +
 configs/omapl138_lcdk_defconfig               |  16 ++-
 configs/sandbox64_defconfig                   |   1 -
 configs/sandbox_defconfig                     |   1 -
 configs/sandbox_flattree_defconfig            |   1 -
 configs/sandbox_noblk_defconfig               |   1 -
 configs/sandbox_spl_defconfig                 |   1 -
 configs/ti816x_evm_defconfig                  |   1 +
 configs/tools-only_defconfig                  |   1 -
 drivers/i2c/Kconfig                           |  13 +-
 drivers/i2c/Makefile                          |   1 -
 drivers/i2c/i2c-uclass-compat.c               | 128 ------------------
 drivers/mtd/nand/raw/davinci_nand.c           |  48 ++++++-
 drivers/net/ti/davinci_emac.c                 |  77 ++++++-----
 include/_exports.h                            |   3 +-
 include/configs/am3517_evm.h                  |   1 -
 include/configs/da850evm.h                    |  12 +-
 include/configs/omapl138_lcdk.h               |   8 --
 include/exports.h                             |   3 +-
 include/i2c.h                                 |  80 -----------
 include/netdev.h                              |   1 -
 35 files changed, 139 insertions(+), 342 deletions(-)
 delete mode 100644 drivers/i2c/i2c-uclass-compat.c
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/14 net: davinci_emac: convert to using the driver model

From: Bartosz Golaszewski <[email protected]>

Now that we removed all legacy boards selecting TI_EMAC we can completely convert the driver code to using the driver model. This patch also updates all remaining users of davinci_emac.

---
 arch/arm/mach-davinci/cpu.c            | 13 -----
 arch/arm/mach-omap2/omap3/emac.c       |  3 +-
 board/davinci/da8xxevm/da850evm.c      |  6 --
 board/davinci/da8xxevm/omapl138_lcdk.c | 14 -----
 board/logicpd/am3517evm/am3517evm.c    |  1 -
 board/ti/ti816x/evm.c                  |  3 +-
 configs/am3517_evm_defconfig           |  1 +
 configs/da850evm_defconfig             |  1 +
 configs/da850evm_direct_nor_defconfig  |  1 +
 configs/da850evm_nand_defconfig        |  1 +
 configs/omapl138_lcdk_defconfig        |  1 +
 configs/ti816x_evm_defconfig           |  1 +
 drivers/net/ti/davinci_emac.c          | 77 ++++++++++++++------------
 include/netdev.h                       |  1 -
 14 files changed, 50 insertions(+), 74 deletions(-)
arch/arm/mach-davinci/cpu.c +0 -13
index f97ad3fc74..9fd6564d04 100644
@@ -5,7 +5,6 @@
  */
 
 #include <common.h>
-#include <netdev.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
 
@@ -90,15 +89,3 @@ int set_cpu_clk_info(void)
 	gd->bd->bi_dsp_freq = 0;
 	return 0;
 }
-
-/*
- * Initializes on-chip ethernet controllers.
- * to override, implement board_eth_init()
- */
-int cpu_eth_init(bd_t *bis)
-{
-#if defined(CONFIG_DRIVER_TI_EMAC)
-	davinci_emac_initialize();
-#endif
-	return 0;
-}
arch/arm/mach-omap2/omap3/emac.c +1 -2
index c79e870183..fb0c9188f5 100644
@@ -7,7 +7,6 @@
  */
 
 #include <common.h>
-#include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/am35x_def.h>
 
@@ -24,5 +23,5 @@ int cpu_eth_init(bd_t *bis)
 	reset &= ~CPGMACSS_SW_RST;
 	writel(reset, &am35x_scm_general_regs->ip_sw_reset);
 
-	return davinci_emac_initialize();
+	return 0;
 }
board/davinci/da8xxevm/da850evm.c +0 -6
index a90b7a3538..a5c583444d 100644
@@ -13,7 +13,6 @@
 #include <environment.h>
 #include <i2c.h>
 #include <net.h>
-#include <netdev.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
@@ -472,11 +471,6 @@ int board_eth_init(bd_t *bis)
 	if (rmii_hw_init())
 		printf("RMII hardware init failed!!!\n");
 #endif
-	if (!davinci_emac_initialize()) {
-		printf("Error: Ethernet init failed!\n");
-		return -1;
-	}
-
 	return 0;
 }
 #endif /* CONFIG_DRIVER_TI_EMAC */
board/davinci/da8xxevm/omapl138_lcdk.c +0 -14
index fe1bf44101..dd11551428 100644
@@ -11,7 +11,6 @@
 #include <common.h>
 #include <i2c.h>
 #include <net.h>
-#include <netdev.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
@@ -229,19 +228,6 @@ int board_init(void)
 
 #ifdef CONFIG_DRIVER_TI_EMAC
 
-/*
- * Initializes on-board ethernet controllers.
- */
-int board_eth_init(bd_t *bis)
-{
-	if (!davinci_emac_initialize()) {
-		printf("Error: Ethernet init failed!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
 #endif /* CONFIG_DRIVER_TI_EMAC */
 
 #define CFG_MAC_ADDR_SPI_BUS	0
board/logicpd/am3517evm/am3517evm.c +0 -1
index 10031a4801..bfd4e78274 100644
@@ -28,7 +28,6 @@
 #include <linux/usb/gadget.h>
 #include <linux/usb/musb.h>
 #include <i2c.h>
-#include <netdev.h>
 #include "am3517evm.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/ti/ti816x/evm.c +1 -2
index 07a084bab8..240df8cbe1 100644
@@ -9,7 +9,6 @@
 #include <common.h>
 #include <environment.h>
 #include <spl.h>
-#include <netdev.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
@@ -56,7 +55,7 @@ int board_eth_init(bd_t *bis)
 			printf("Unable to read MAC address. Set <ethaddr>\n");
 	}
 
-	return davinci_emac_initialize();
+	return 0;
 }
 
 #ifdef CONFIG_SPL_BUILD
configs/am3517_evm_defconfig +1 -0
index b9f59f3291..5cb76322df 100644
@@ -44,6 +44,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
 CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
 CONFIG_SPL_NAND_SIMPLE=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_PINCTRL=y
configs/da850evm_defconfig +1 -0
index c095058282..f7c679d3b5 100644
@@ -59,6 +59,7 @@ CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_PINCTRL=y
configs/da850evm_direct_nor_defconfig +1 -0
index 166e77b8e3..9b1da07384 100644
@@ -50,6 +50,7 @@ CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_PINCTRL=y
configs/da850evm_nand_defconfig +1 -0
index 7271016346..8f06b8592b 100644
@@ -59,6 +59,7 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
+CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_SERIAL=y
configs/omapl138_lcdk_defconfig +1 -0
index 48f251ebb8..466ae860cd 100644
@@ -49,6 +49,7 @@ CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_DM_SERIAL=y
configs/ti816x_evm_defconfig +1 -0
index bf877f596b..b233ab8cc9 100644
@@ -45,6 +45,7 @@ CONFIG_SYS_I2C_OMAP24XX=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_SYS_NS16550=y
drivers/net/ti/davinci_emac.c +42 -35

159 lines not on this page · raw message

include/netdev.h +0 -1
index 0a1a3a2d8d..a40c4adaad 100644
@@ -30,7 +30,6 @@ int bcm_sf2_eth_register(bd_t *bis, u8 dev_num);
 int bfin_EMAC_initialize(bd_t *bis);
 int calxedaxgmac_initialize(u32 id, ulong base_addr);
 int cs8900_initialize(u8 dev_num, int base_addr);
-int davinci_emac_initialize(void);
 int dc21x4x_initialize(bd_t *bis);
 int designware_initialize(ulong base_addr, u32 interface);
 int dm9000_initialize(bd_t *bis);
Signature · 1 line
2.21.0
#2 lore raw

PATCH 1/14 net: davinci_emac: convert to using the driver model

Quoted 424 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Now that we removed all legacy boards selecting TI_EMAC we can completely convert the driver code to using the driver model. This patch also updates all remaining users of davinci_emac.

---
 arch/arm/mach-davinci/cpu.c            | 13 -----
 arch/arm/mach-omap2/omap3/emac.c       |  3 +-
 board/davinci/da8xxevm/da850evm.c      |  6 --
 board/davinci/da8xxevm/omapl138_lcdk.c | 14 -----
 board/logicpd/am3517evm/am3517evm.c    |  1 -
 board/ti/ti816x/evm.c                  |  3 +-
 configs/am3517_evm_defconfig           |  1 +
 configs/da850evm_defconfig             |  1 +
 configs/da850evm_direct_nor_defconfig  |  1 +
 configs/da850evm_nand_defconfig        |  1 +
 configs/omapl138_lcdk_defconfig        |  1 +
 configs/ti816x_evm_defconfig           |  1 +
 drivers/net/ti/davinci_emac.c          | 77 ++++++++++++++------------
 include/netdev.h                       |  1 -
 14 files changed, 50 insertions(+), 74 deletions(-)
arch/arm/mach-davinci/cpu.c +0 -13
index f97ad3fc74..9fd6564d04 100644
@@ -5,7 +5,6 @@
  */
 
 #include <common.h>
-#include <netdev.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
 
@@ -90,15 +89,3 @@ int set_cpu_clk_info(void)
        gd->bd->bi_dsp_freq = 0;
        return 0;
 }
-
-/*
- * Initializes on-chip ethernet controllers.
- * to override, implement board_eth_init()
- */
-int cpu_eth_init(bd_t *bis)
-{
-#if defined(CONFIG_DRIVER_TI_EMAC)
-       davinci_emac_initialize();
-#endif
-       return 0;
-}
arch/arm/mach-omap2/omap3/emac.c +1 -2
index c79e870183..fb0c9188f5 100644
@@ -7,7 +7,6 @@
  */
 
 #include <common.h>
-#include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/am35x_def.h>
 
@@ -24,5 +23,5 @@ int cpu_eth_init(bd_t *bis)
        reset &= ~CPGMACSS_SW_RST;
        writel(reset, &am35x_scm_general_regs->ip_sw_reset);
 
-       return davinci_emac_initialize();
+       return 0;
 }
board/davinci/da8xxevm/da850evm.c +0 -6
index a90b7a3538..a5c583444d 100644
@@ -13,7 +13,6 @@
 #include <environment.h>
 #include <i2c.h>
 #include <net.h>
-#include <netdev.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
@@ -472,11 +471,6 @@ int board_eth_init(bd_t *bis)
        if (rmii_hw_init())
                printf("RMII hardware init failed!!!\n");
 #endif
-       if (!davinci_emac_initialize()) {
-               printf("Error: Ethernet init failed!\n");
-               return -1;
-       }
-
        return 0;
 }
 #endif /* CONFIG_DRIVER_TI_EMAC */
board/davinci/da8xxevm/omapl138_lcdk.c +0 -14
index fe1bf44101..dd11551428 100644
@@ -11,7 +11,6 @@
 #include <common.h>
 #include <i2c.h>
 #include <net.h>
-#include <netdev.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
@@ -229,19 +228,6 @@ int board_init(void)
 
 #ifdef CONFIG_DRIVER_TI_EMAC
 
-/*
- * Initializes on-board ethernet controllers.
- */
-int board_eth_init(bd_t *bis)
-{
-       if (!davinci_emac_initialize()) {
-               printf("Error: Ethernet init failed!\n");
-               return -1;
-       }
-
-       return 0;
-}
-
 #endif /* CONFIG_DRIVER_TI_EMAC */
 
 #define CFG_MAC_ADDR_SPI_BUS   0
board/logicpd/am3517evm/am3517evm.c +0 -1
index 10031a4801..bfd4e78274 100644
@@ -28,7 +28,6 @@
 #include <linux/usb/gadget.h>
 #include <linux/usb/musb.h>
 #include <i2c.h>
-#include <netdev.h>
 #include "am3517evm.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/ti/ti816x/evm.c +1 -2
index 07a084bab8..240df8cbe1 100644
@@ -9,7 +9,6 @@
 #include <common.h>
 #include <environment.h>
 #include <spl.h>
-#include <netdev.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
@@ -56,7 +55,7 @@ int board_eth_init(bd_t *bis)
                        printf("Unable to read MAC address. Set <ethaddr>\n");
        }
 
-       return davinci_emac_initialize();
+       return 0;
 }
 
 #ifdef CONFIG_SPL_BUILD
configs/am3517_evm_defconfig +1 -0
index b9f59f3291..5cb76322df 100644
@@ -44,6 +44,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
 CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
 CONFIG_SPL_NAND_SIMPLE=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_PINCTRL=y
configs/da850evm_defconfig +1 -0
index c095058282..f7c679d3b5 100644
@@ -59,6 +59,7 @@ CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_PINCTRL=y
configs/da850evm_direct_nor_defconfig +1 -0
index 166e77b8e3..9b1da07384 100644
@@ -50,6 +50,7 @@ CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_PINCTRL=y
configs/da850evm_nand_defconfig +1 -0
index 7271016346..8f06b8592b 100644
@@ -59,6 +59,7 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
+CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_SERIAL=y
configs/omapl138_lcdk_defconfig +1 -0
index 48f251ebb8..466ae860cd 100644
@@ -49,6 +49,7 @@ CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_DM_SERIAL=y
configs/ti816x_evm_defconfig +1 -0
index bf877f596b..b233ab8cc9 100644
@@ -45,6 +45,7 @@ CONFIG_SYS_I2C_OMAP24XX=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
+CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_SYS_NS16550=y
drivers/net/ti/davinci_emac.c +42 -35
index 9d53984973..2bd9c51079 100644
@@ -26,7 +26,6 @@
 #include <net.h>
 #include <miiphy.h>
 #include <malloc.h>
-#include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/io.h>
@@ -107,8 +106,9 @@ static u_int8_t     num_phy;
 
 phy_t                          phy[CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT];
 
-static int davinci_eth_set_mac_addr(struct eth_device *dev)
+static int davinci_emac_write_hwaddr(struct udevice *dev)
 {
+       struct eth_pdata *pdata = dev_get_platdata(dev);
        unsigned long           mac_hi;
        unsigned long           mac_lo;
 
@@ -118,12 +118,12 @@ static int davinci_eth_set_mac_addr(struct eth_device *dev)
         *  Using channel 0 only - other channels are disabled
         *  */
        writel(0, &adap_emac->MACINDEX);
-       mac_hi = (dev->enetaddr[3] << 24) |
-                (dev->enetaddr[2] << 16) |
-                (dev->enetaddr[1] << 8)  |
-                (dev->enetaddr[0]);
-       mac_lo = (dev->enetaddr[5] << 8) |
-                (dev->enetaddr[4]);
+       mac_hi = (pdata->enetaddr[3] << 24) |
+                (pdata->enetaddr[2] << 16) |
+                (pdata->enetaddr[1] << 8)  |
+                (pdata->enetaddr[0]);
+       mac_lo = (pdata->enetaddr[5] << 8) |
+                (pdata->enetaddr[4]);
 
        writel(mac_hi, &adap_emac->MACADDRHI);
 #if defined(DAVINCI_EMAC_VERSION2)
@@ -411,7 +411,7 @@ static void  __attribute__((unused)) davinci_eth_gigabit_enable(int phy_addr)
 }
 
 /* Eth device open */
-static int davinci_eth_open(struct eth_device *dev, bd_t *bis)
+static int davinci_emac_start(struct udevice *dev)
 {
        dv_reg_p                addr;
        u_int32_t               clkdiv, cnt, mac_control;
@@ -447,7 +447,7 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis)
        writel(1, &adap_emac->TXCONTROL);
        writel(1, &adap_emac->RXCONTROL);
 
-       davinci_eth_set_mac_addr(dev);
+       davinci_emac_write_hwaddr(dev);
 
        /* Set DMA 8 TX / 8 RX Head pointers to 0 */
        addr = &adap_emac->TX0HDP;
@@ -588,7 +588,7 @@ static void davinci_eth_ch_teardown(int ch)
 }
 
 /* Eth device close */
-static void davinci_eth_close(struct eth_device *dev)
+static void davinci_emac_stop(struct udevice *dev)
 {
        debug_emac("+ emac_close\n");
 
@@ -619,8 +619,8 @@ static int tx_send_loop = 0;
  * This function sends a single packet on the network and returns
  * positive number (number of bytes transmitted) or negative for error
  */
-static int davinci_eth_send_packet (struct eth_device *dev,
-                                       void *packet, int length)
+static int davinci_emac_send(struct udevice *dev,
+                            void *packet, int length)
 {
        int ret_status = -1;
        int index;
@@ -672,7 +672,7 @@ static int davinci_eth_send_packet (struct eth_device *dev,
 /*
  * This function handles receipt of a packet from the network
  */
-static int davinci_eth_rcv_packet (struct eth_device *dev)
+static int davinci_emac_recv(struct udevice *dev, int flags, uchar **packetp)
 {
        volatile emac_desc *rx_curr_desc;
        volatile emac_desc *curr_desc;
@@ -682,6 +682,7 @@ static int davinci_eth_rcv_packet (struct eth_device *dev)
        rx_curr_desc = emac_rx_active_head;
        if (!rx_curr_desc)
                return 0;
+       *packetp = rx_curr_desc->buffer;
        status = rx_curr_desc->pkt_flag_len;
        if ((status & EMAC_CPPI_OWNERSHIP_BIT) == 0) {
                if (status & EMAC_CPPI_RX_ERROR_FRAME) {
@@ -693,7 +694,6 @@ static int davinci_eth_rcv_packet (struct eth_device *dev)
                                rx_curr_desc->buff_off_len & 0xffff;
 
                        invalidate_dcache_range(tmp, tmp + ALIGN(len, PKTALIGN));
-                       net_process_received_packet(rx_curr_desc->buffer, len);
                        ret = len;
                }
 
@@ -742,6 +742,7 @@ static int davinci_eth_rcv_packet (struct eth_device *dev)
                }
                return (ret);
        }
+
        return (0);
 }
 
@@ -750,30 +751,12 @@ static int davinci_eth_rcv_packet (struct eth_device *dev)
  * EMAC modules power or pin multiplexors, that is done by board_init()
  * much earlier in bootup process. Returns 1 on success, 0 otherwise.
  */
-int davinci_emac_initialize(void)
+static int davinci_emac_probe(struct udevice *dev)
 {
        u_int32_t       phy_id;
        u_int16_t       tmp;
        int             i;
        int             ret;
-       struct eth_device *dev;
-
-       dev = malloc(sizeof *dev);
-
-       if (dev == NULL)
-               return -1;
-
-       memset(dev, 0, sizeof *dev);
-       strcpy(dev->name, "DaVinci-EMAC");
-
-       dev->iobase = 0;
-       dev->init = davinci_eth_open;
-       dev->halt = davinci_eth_close;
-       dev->send = davinci_eth_send_packet;
-       dev->recv = davinci_eth_rcv_packet;
-       dev->write_hwaddr = davinci_eth_set_mac_addr;
-
-       eth_register(dev);
 
        davinci_eth_mdio_enable();
 
@@ -854,5 +837,29 @@ int davinci_emac_initialize(void)
                        phy[i].auto_negotiate(i);
        }
 #endif
-       return(1);
+       return 0;
 }
+
+static const struct eth_ops davinci_emac_ops = {
+       .start          = davinci_emac_start,
+       .send           = davinci_emac_send,
+       .recv           = davinci_emac_recv,
+       .stop           = davinci_emac_stop,
+       .write_hwaddr   = davinci_emac_write_hwaddr,
+};
+
+static const struct udevice_id davinci_emac_ids[] = {
+       { .compatible = "ti,davinci-dm6467-emac" },
+       { .compatible = "ti,am3517-emac", },
+       { .compatible = "ti,dm816-emac", },
+       { }
+};
+
+U_BOOT_DRIVER(davinci_emac) = {
+       .name           = "davinci_emac",
+       .id             = UCLASS_ETH,
+       .of_match       = davinci_emac_ids,
+       .probe          = davinci_emac_probe,
+       .ops            = &davinci_emac_ops,
+       .platdata_auto_alloc_size = sizeof(struct eth_pdata),
+};
include/netdev.h +0 -2
index 0a1a3a2d8d..a40c4adaad 100644
@@ -30,7 +30,6 @@ int bcm_sf2_eth_register(bd_t *bis, u8 dev_num);
 int bfin_EMAC_initialize(bd_t *bis);
 int calxedaxgmac_initialize(u32 id, ulong base_addr);
 int cs8900_initialize(u8 dev_num, int base_addr);
-int davinci_emac_initialize(void);
 int dc21x4x_initialize(bd_t *bis);
 int designware_initialize(ulong base_addr, u32 interface);
 int dm9000_initialize(bd_t *bis);
--
Quoted 2 lines

2.21.0

#3 lore raw

PATCH 2/14 davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

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.

---
 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(-)
configs/da850_am18xxevm_defconfig +0 -1
index 7ecdc361ce..b224b4da8f 100644
@@ -43,7 +43,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
configs/omapl138_lcdk_defconfig +0 -1
index 466ae860cd..b5d41bd3f6 100644
@@ -36,7 +36,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
include/configs/am3517_evm.h +0 -1
index 9475e9975d..11f8f6d213 100644
@@ -14,7 +14,6 @@
 
 #include <configs/ti_omap3_common.h>
 
-#undef CONFIG_DM_I2C_COMPAT
 #define CONFIG_REVISION_TAG
 
 /* Hardware drivers */
include/configs/da850evm.h +0 -8
index ccdac0abec..5d02c35279 100644
@@ -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
  */
include/configs/omapl138_lcdk.h +0 -8
index da615e5063..db4a663c53 100644
@@ -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
  */
Signature · 1 line
2.21.0
#4 lore raw

PATCH 3/14 sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

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

---
 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(-)
Makefile +1 -1
index 516260f46d..1b7d893cd3 100644
@@ -936,7 +936,7 @@ ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy)
 endif
 endif
 endif
-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)"
configs/sandbox64_defconfig +0 -1
index 29a9df8ab0..cfe7622a79 100644
@@ -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
configs/sandbox_defconfig +0 -1
index 6894262b89..97b071d3dd 100644
@@ -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
configs/sandbox_flattree_defconfig +0 -1
index af335285c9..a574144cd9 100644
@@ -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
configs/sandbox_noblk_defconfig +0 -1
index da9229fc79..381bad2003 100644
@@ -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
configs/sandbox_spl_defconfig +0 -1
index d355cc3f3b..2b6bc4c3d4 100644
@@ -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
configs/tools-only_defconfig +0 -1
index aa73661a92..4808b49850 100644
@@ -12,7 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 CONFIG_IP_DEFRAG=y
 # 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
Signature · 1 line
2.21.0
#5 lore raw

PATCH 4/14 i2c: remove i2c driver-model compatibility layer

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

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

---
 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
Makefile +0 -7
index 1b7d893cd3..3079415d7f 100644
@@ -936,13 +936,6 @@ ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy)
 endif
 endif
 endif
-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 ======================"
drivers/i2c/Kconfig +1 -12
index 095a9bc6a4..9c26471f94 100644
@@ -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"
drivers/i2c/Makefile +0 -1
index dc40055efb..c2f75d8755 100644
@@ -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
drivers/i2c/i2c-uclass-compat.c deleted +0 -128

128 lines not on this page · raw message

include/_exports.h +1 -2
index c15050e30b..0dee05f077 100644
@@ -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
include/exports.h +1 -2
index a4b862f191..bf8d53c6b0 100644
@@ -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
include/i2c.h +0 -80

86 lines not on this page · raw message

Signature · 1 line
2.21.0
#6 lore raw

PATCH 5/14 omapl138_lcdk_defconfig: don't build support for SPI

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

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.

---
 configs/omapl138_lcdk_defconfig | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
configs/omapl138_lcdk_defconfig +1 -5
index b5d41bd3f6..7752308564 100644
@@ -26,6 +26,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
@@ -44,14 +45,9 @@ 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_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
-CONFIG_SPI=y
-CONFIG_DAVINCI_SPI=y
Signature · 1 line
2.21.0
#7 lore raw

PATCH 6/14 nand: davinci: make davinci_nand_init() static

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

This function is only used within the driver itself. No need to export it.

---
 arch/arm/include/asm/ti-common/davinci_nand.h | 2 --
 drivers/mtd/nand/raw/davinci_nand.c           | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/arm/include/asm/ti-common/davinci_nand.h +0 -2
index e26381c7fd..28842c3b15 100644
@@ -95,6 +95,4 @@ struct davinci_emif_regs {
 #define DAVINCI_ABCR_ASIZE_16BIT			1
 #define DAVINCI_ABCR_ASIZE_8BIT				0
 
-void davinci_nand_init(struct nand_chip *nand);
-
 #endif
drivers/mtd/nand/raw/davinci_nand.c +1 -1
index cfa9b535c8..e1c4498cb9 100644
@@ -730,7 +730,7 @@ static int nand_davinci_dev_ready(struct mtd_info *mtd)
 	return __raw_readl(&davinci_emif_regs->nandfsr) & 0x1;
 }
 
-void davinci_nand_init(struct nand_chip *nand)
+static void davinci_nand_init(struct nand_chip *nand)
 {
 #if defined CONFIG_KEYSTONE_RBL_NAND
 	int i;
Signature · 1 line
2.21.0
#8 lore raw

PATCH 7/14 nand: davinci: add support for driver model

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Extend the davinci NAND driver to support the driver model. For now this doesn't add any device-tree parsing due to the fact that we can't access the actual nand node on the device-tree - it's a subnode of the aemif device and we don't have an aemif driver on davinci at the moment.

---
 drivers/mtd/nand/raw/davinci_nand.c | 46 ++++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)
drivers/mtd/nand/raw/davinci_nand.c +45 -1
index e1c4498cb9..33c2f16be8 100644
@@ -31,6 +31,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <nand.h>
+#include <dm/uclass.h>
 #include <asm/ti-common/davinci_nand.h>
 
 /* Definitions for 4-bit hardware ECC */
@@ -785,10 +786,53 @@ static void davinci_nand_init(struct nand_chip *nand)
 	nand->dev_ready = nand_davinci_dev_ready;
 }
 
-int board_nand_init(struct nand_chip *chip) __attribute__((weak));
+#ifdef CONFIG_SYS_NAND_SELF_INIT
+static int davinci_nand_probe(struct udevice *dev)
+{
+	struct nand_chip *nand = dev_get_priv(dev);
+	struct mtd_info *mtd = nand_to_mtd(nand);
+	int ret;
+
+	nand->IO_ADDR_R = (void __iomem *)CONFIG_SYS_NAND_BASE;
+	nand->IO_ADDR_W = (void __iomem *)CONFIG_SYS_NAND_BASE;
+
+	davinci_nand_init(nand);
+
+	ret = nand_scan(mtd, CONFIG_SYS_NAND_MAX_CHIPS);
+	if (ret)
+		return ret;
+
+	return nand_register(0, mtd);
+}
+
+static const struct udevice_id davinci_nand_ids[] = {
+	{ .compatible = "ti,davinci-nand" },
+	{ }
+};
+
+U_BOOT_DRIVER(davinci_nand) = {
+	.name		= "davinci-nand",
+	.id		= UCLASS_MTD,
+	.of_match	= davinci_nand_ids,
+	.probe		= davinci_nand_probe,
+	.priv_auto_alloc_size = sizeof(struct nand_chip),
+};
+
+void board_nand_init(void)
+{
+	struct udevice *dev;
+	int ret;
 
+	ret = uclass_get_device_by_driver(UCLASS_MTD,
+					  DM_GET_DRIVER(davinci_nand), &dev);
+	if (ret && ret != -ENODEV)
+		pr_err("Failed to initialize %s: %d\n", dev->name, ret);
+}
+#else
+int board_nand_init(struct nand_chip *chip) __attribute__((weak));
 int board_nand_init(struct nand_chip *chip)
 {
 	davinci_nand_init(chip);
 	return 0;
 }
+#endif /* CONFIG_SYS_NAND_SELF_INIT */
Signature · 1 line
2.21.0
#9 lore raw

PATCH 8/14 davinci: omapl138-lcdk: enable driver model for NAND

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Enable the driver-model on da850-lcdk. We need to add a dummy nand node to the device tree, as the real nand node is a sub-node of the aemif device.

On linux the aemif driver populates all its child nodes, but we can't do it in u-boot currently.

---
 arch/arm/dts/da850-lcdk-u-boot.dtsi | 4 ++++
 configs/omapl138_lcdk_defconfig     | 1 +
 include/configs/omapl138_lcdk.h     | 4 ++++
 3 files changed, 9 insertions(+)
arch/arm/dts/da850-lcdk-u-boot.dtsi +4 -0
index 80dda8ef58..541f4ca200 100644
@@ -9,4 +9,8 @@
 	aliases {
 		i2c0 = &i2c0;
 	};
+
+	nand {
+		compatible = "ti,davinci-nand";
+	};
 };
configs/omapl138_lcdk_defconfig +1 -0
index 7752308564..fa4ce692ff 100644
@@ -39,6 +39,7 @@ CONFIG_DM=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
+CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
include/configs/omapl138_lcdk.h +4 -0
index db4a663c53..20fd7ff713 100644
@@ -168,6 +168,10 @@
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
 #define CONFIG_SPL_NAND_LOAD
+
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_SYS_NAND_SELF_INIT
+#endif
 #endif
 
 #ifdef CONFIG_SYS_USE_NOR
Signature · 1 line
2.21.0
#10 lore raw

PATCH 9/14 davinci: da850-evm: enable driver model for NAND

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Enable the driver-model on da850-evm. We need to add a dummy nand node to the device tree, as the real nand node is a sub-node of the aemif device.

On linux the aemif driver populates all its child nodes, but we can't do it in u-boot currently.

---
 arch/arm/dts/da850-evm-u-boot.dtsi    | 4 ++++
 configs/da850evm_defconfig            | 1 +
 configs/da850evm_direct_nor_defconfig | 1 +
 configs/da850evm_nand_defconfig       | 1 +
 include/configs/da850evm.h            | 4 ++++
 5 files changed, 11 insertions(+)
arch/arm/dts/da850-evm-u-boot.dtsi +4 -0
index 1683f3472e..d9e8b9926a 100644
@@ -10,6 +10,10 @@
 	soc at 1c00000 {
 		u-boot,dm-spl;
 	};
+
+	nand {
+		compatible = "ti,davinci-nand";
+	};
 };
 
 &flash {
configs/da850evm_defconfig +1 -0
index f7c679d3b5..0f93d88cc6 100644
@@ -52,6 +52,7 @@ CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
+CONFIG_MTD=y
 CONFIG_MTD_DEVICE=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
configs/da850evm_direct_nor_defconfig +1 -0
index 9b1da07384..152ec7ae9a 100644
@@ -42,6 +42,7 @@ CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/da850evm_nand_defconfig +1 -0
index 8f06b8592b..30ffba2d73 100644
@@ -49,6 +49,7 @@ CONFIG_DM_GPIO=y
 CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
+CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
include/configs/da850evm.h +4 -0
index 5d02c35279..9b4b8f2c94 100644
@@ -174,6 +174,10 @@
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
 #define CONFIG_SPL_NAND_LOAD
+
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_SYS_NAND_SELF_INIT
+#endif
 #endif
 
 /*
Signature · 1 line
2.21.0
#11 lore raw

PATCH 10/14 davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

We're working towards enabling the driver model in SPL for da850-lcdk. Enable SPL_SYS_MALLOC_SIMPLE in defconfig to reduce SPL size.

---
 configs/omapl138_lcdk_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/omapl138_lcdk_defconfig +1 -0
index fa4ce692ff..bfb88e397a 100644
@@ -18,6 +18,7 @@ CONFIG_VERSION_VARIABLE=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_TEXT_BASE=0x80000000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_HUSH_PARSER=y
Signature · 1 line
2.21.0
#12 lore raw

PATCH 11/14 davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

We're working towards enabling the driver-model in SPL for da850-lcdk. Enable CONFIG_USE_TINY_PRINTF in defconfig to reduce SPL size.

---
 configs/omapl138_lcdk_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/omapl138_lcdk_defconfig +1 -0
index bfb88e397a..c4eebb3612 100644
@@ -53,3 +53,4 @@ CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
+CONFIG_USE_TINY_PRINTF=y
Signature · 1 line
2.21.0
#13 lore raw

PATCH 12/14 davinci: omapl138-lcdk: remove unneeded includes

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

There's no SPI on da850-lcdk. Remove unnecessary includes.

---
 board/davinci/da8xxevm/omapl138_lcdk.c | 2 --
 1 file changed, 2 deletions(-)
board/davinci/da8xxevm/omapl138_lcdk.c +0 -2
index dd11551428..7f8c28b953 100644
@@ -11,8 +11,6 @@
 #include <common.h>
 #include <i2c.h>
 #include <net.h>
-#include <spi.h>
-#include <spi_flash.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/io.h>
Signature · 1 line
2.21.0
#14 lore raw

PATCH 13/14 davinci: omapl138-lcdk: enable driver-model in SPL

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Enable CONFIG_SPL_DM and enable the driver model for serial by defining an appropriate device in the board file for da850-lcdk.

---
 board/davinci/da8xxevm/omapl138_lcdk.c | 16 ++++++++++++++++
 configs/omapl138_lcdk_defconfig        |  5 +++++
 2 files changed, 21 insertions(+)
board/davinci/da8xxevm/omapl138_lcdk.c +16 -0
index 7f8c28b953..578d928443 100644
@@ -14,6 +14,8 @@
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/io.h>
+#include <ns16550.h>
+#include <dm/platdata.h>
 #include <linux/errno.h>
 #include <asm/mach-types.h>
 #include <asm/arch/davinci_misc.h>
@@ -355,3 +357,17 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 #endif
+
+#ifdef CONFIG_SPL_BUILD
+static const struct ns16550_platdata serial_pdata = {
+	.base = DAVINCI_UART2_BASE,
+	.reg_shift = 2,
+	.clock = 228000000,
+	.fcr = UART_FCR_DEFVAL,
+};
+
+U_BOOT_DEVICE(omapl138_uart) = {
+	.name = "ns16550_serial",
+	.platdata = &serial_pdata,
+};
+#endif
configs/omapl138_lcdk_defconfig +5 -0
index c4eebb3612..26b4950f8f 100644
@@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_DIAG=y
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="da850-lcdk"
+CONFIG_SPL_OF_PLATDATA=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
@@ -51,6 +54,8 @@ CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_USE_TINY_PRINTF=y
+# CONFIG_SPL_OF_LIBFDT is not set
Signature · 1 line
2.21.0
#15 lore raw

PATCH 13/14 davinci: omapl138-lcdk: enable driver-model in SPL

Quoted 33 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Enable CONFIG_SPL_DM and enable the driver model for serial by defining an appropriate device in the board file for da850-lcdk.

---
 board/davinci/da8xxevm/omapl138_lcdk.c | 16 ++++++++++++++++
 configs/omapl138_lcdk_defconfig        |  5 +++++
 2 files changed, 21 insertions(+)
board/davinci/da8xxevm/omapl138_lcdk.c +6 -0
index 7f8c28b953..578d928443 100644
@@ -14,6 +14,8 @@
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/io.h>
+#include <ns16550.h>
+#include <dm/platdata.h>
 #include <linux/errno.h>
 #include <asm/mach-types.h>
 #include <asm/arch/davinci_misc.h>
@@ -355,3 +357,17 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 #endif
+
+#ifdef CONFIG_SPL_BUILD
+static const struct ns16550_platdata serial_pdata = {
+       .base = DAVINCI_UART2_BASE,

board/davinci/da8xxevm/omapl138_lcdk.c int board_mmc_init(bd_t *bis) · line 373

Quoted 10 lines
board/davinci/da8xxevm/omapl138_lcdk.c +10 -0
+       .reg_shift = 2,
+       .clock = 228000000,
+       .fcr = UART_FCR_DEFVAL,
+};
+
+U_BOOT_DEVICE(omapl138_uart) = {
+       .name = "ns16550_serial",
+       .platdata = &serial_pdata,
+};
+#endif

Is the above part necessary since SPL_OF_CONTROL is defined? I know the da850evm doesn't need this anymore and I was able to remove it when converting to SPL_OF_CONTROL.

See: https://patchwork.ozlabs.org/patch/1048078/

adam

Quoted 30 lines
configs/omapl138_lcdk_defconfig +5 -1
index c4eebb3612..26b4950f8f 100644
@@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_DIAG=y
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="da850-lcdk"
+CONFIG_SPL_OF_PLATDATA=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
@@ -51,6 +54,8 @@ CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_USE_TINY_PRINTF=y
+# CONFIG_SPL_OF_LIBFDT is not set
--

2.21.0

#16 lore raw

PATCH 13/14 davinci: omapl138-lcdk: enable driver-model in SPL

wt., 9 lip 2019 o 15:34 Adam Ford <[email protected]> napisaÅ‚(a):

Quoted 50 lines · Bartosz Golaszewski
Quoted 33 lines

From: Bartosz Golaszewski <[email protected]>

Enable CONFIG_SPL_DM and enable the driver model for serial by defining an appropriate device in the board file for da850-lcdk.

---
 board/davinci/da8xxevm/omapl138_lcdk.c | 16 ++++++++++++++++
 configs/omapl138_lcdk_defconfig        |  5 +++++
 2 files changed, 21 insertions(+)
board/davinci/da8xxevm/omapl138_lcdk.c +6 -0
index 7f8c28b953..578d928443 100644
@@ -14,6 +14,8 @@
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/io.h>
+#include <ns16550.h>
+#include <dm/platdata.h>
 #include <linux/errno.h>
 #include <asm/mach-types.h>
 #include <asm/arch/davinci_misc.h>
@@ -355,3 +357,17 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 #endif
+
+#ifdef CONFIG_SPL_BUILD
+static const struct ns16550_platdata serial_pdata = {
+       .base = DAVINCI_UART2_BASE,

board/davinci/da8xxevm/omapl138_lcdk.c int board_mmc_init(bd_t *bis) · line 373

Quoted 10 lines
board/davinci/da8xxevm/omapl138_lcdk.c +10 -0
+       .reg_shift = 2,
+       .clock = 228000000,
+       .fcr = UART_FCR_DEFVAL,
+};
+
+U_BOOT_DEVICE(omapl138_uart) = {
+       .name = "ns16550_serial",
+       .platdata = &serial_pdata,
+};
+#endif

Is the above part necessary since SPL_OF_CONTROL is defined? I know the da850evm doesn't need this anymore and I was able to remove it when converting to SPL_OF_CONTROL.

Quoted 4 lines

See: https://patchwork.ozlabs.org/patch/1048078/

adam

Hi Adam,

we discussed it last time[1]: I tried to follow your example but got stuck on a nasty build error and we agreed to merge it in this form and try to improve it later.

I hope you're still ok with that.

Bart

[1] https://patchwork.ozlabs.org/patch/1106229/

Quoted 30 lines
Quoted 30 lines
configs/omapl138_lcdk_defconfig +5 -1
index c4eebb3612..26b4950f8f 100644
@@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_DIAG=y
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="da850-lcdk"
+CONFIG_SPL_OF_PLATDATA=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
@@ -51,6 +54,8 @@ CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_USE_TINY_PRINTF=y
+# CONFIG_SPL_OF_LIBFDT is not set
--

2.21.0

#17 lore raw

PATCH 13/14 davinci: omapl138-lcdk: enable driver-model in SPL

Quoted 57 lines · Bartosz Golaszewski

wt., 9 lip 2019 o 15:34 Adam Ford <[email protected]> napisaÅ‚(a):

Quoted 50 lines · Bartosz Golaszewski
Quoted 33 lines

From: Bartosz Golaszewski <[email protected]>

Enable CONFIG_SPL_DM and enable the driver model for serial by defining an appropriate device in the board file for da850-lcdk.

---
 board/davinci/da8xxevm/omapl138_lcdk.c | 16 ++++++++++++++++
 configs/omapl138_lcdk_defconfig        |  5 +++++
 2 files changed, 21 insertions(+)
board/davinci/da8xxevm/omapl138_lcdk.c +6 -0
index 7f8c28b953..578d928443 100644
@@ -14,6 +14,8 @@
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/io.h>
+#include <ns16550.h>
+#include <dm/platdata.h>
 #include <linux/errno.h>
 #include <asm/mach-types.h>
 #include <asm/arch/davinci_misc.h>
@@ -355,3 +357,17 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 #endif
+
+#ifdef CONFIG_SPL_BUILD
+static const struct ns16550_platdata serial_pdata = {
+       .base = DAVINCI_UART2_BASE,

board/davinci/da8xxevm/omapl138_lcdk.c int board_mmc_init(bd_t *bis) · line 373

Quoted 10 lines
board/davinci/da8xxevm/omapl138_lcdk.c +10 -0
+       .reg_shift = 2,
+       .clock = 228000000,
+       .fcr = UART_FCR_DEFVAL,
+};
+
+U_BOOT_DEVICE(omapl138_uart) = {
+       .name = "ns16550_serial",
+       .platdata = &serial_pdata,
+};
+#endif

Is the above part necessary since SPL_OF_CONTROL is defined? I know the da850evm doesn't need this anymore and I was able to remove it when converting to SPL_OF_CONTROL.

Quoted 4 lines

See: https://patchwork.ozlabs.org/patch/1048078/

adam

Quoted 7 lines

Hi Adam,

we discussed it last time[1]: I tried to follow your example but got stuck on a nasty build error and we agreed to merge it in this form and try to improve it later.

I hope you're still ok with that.

I am fine with it, but for some reason, I thought that had resolved itself. I have an LCDK in my possession now. I'll try to help when I can. I haven't had a chance to fire it up yet.

adam

Quoted 35 lines

Bart

[1] https://patchwork.ozlabs.org/patch/1106229/

Quoted 30 lines
Quoted 30 lines
configs/omapl138_lcdk_defconfig +5 -1
index c4eebb3612..26b4950f8f 100644
@@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_DIAG=y
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="da850-lcdk"
+CONFIG_SPL_OF_PLATDATA=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
@@ -51,6 +54,8 @@ CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_DM_ETH=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_USE_TINY_PRINTF=y
+# CONFIG_SPL_OF_LIBFDT is not set
--

2.21.0

#18 lore raw

PATCH 14/14 configs: omapl138_lcdk: enable NAND self-init in SPL

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Now that we have enabled the driver-model in SPL, we can remove the code disabling NAND self-init in SPL from the config include for omapl138-lcdk.

---
 include/configs/omapl138_lcdk.h | 4 ----
 1 file changed, 4 deletions(-)
include/configs/omapl138_lcdk.h +0 -4
index 20fd7ff713..db4a663c53 100644
@@ -168,10 +168,6 @@
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
 #define CONFIG_SPL_NAND_LOAD
-
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
 #endif
 
 #ifdef CONFIG_SYS_USE_NOR
Signature · 1 line
2.21.0
#19 lore raw

cover ARM: davinci: driver-model improvements

In reply to Bartosz Golaszewski

wt., 9 lip 2019 o 09:55 Bartosz Golaszewski <[email protected]> napisaÅ‚(a):

Quoted 16 lines

From: Bartosz Golaszewski <[email protected]>

Hi Tom,

the following series contains all the patches for davinci that have been sent to the mailing list recently rebased on top of v2019.07 and retested on da850-lcdk and da850-evm. I collected all the review and test tags too.

The first patch is the emac driver conversion to driver model. Patches 2-5 fix build warnings due to legacy interfaces usage. Patches 6-9 add support for driver model to the davinci NAND driver. Patches 10-13 enable driver-model support in SPL for davinci. Last patch enables the driver model for NAND in SPL.

Quoted 4 lines

These patches (except for the last, trivial one) have spent a lot of time on the list and have been validated. I think they are ready to be picked up for upstream.

Gentle ping.

Bart

Quoted 57 lines

Bartosz Golaszewski (14):
net: davinci_emac: convert to using the driver model
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
nand: davinci: make davinci_nand_init() static
nand: davinci: add support for driver model
davinci: omapl138-lcdk: enable driver model for NAND
davinci: da850-evm: enable driver model for NAND
davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE
davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF
davinci: omapl138-lcdk: remove unneeded includes
davinci: omapl138-lcdk: enable driver-model in SPL
configs: omapl138_lcdk: enable NAND self-init in SPL

 Makefile                                      |   7 -
 arch/arm/dts/da850-evm-u-boot.dtsi            |   4 +
 arch/arm/dts/da850-lcdk-u-boot.dtsi           |   4 +
 arch/arm/include/asm/ti-common/davinci_nand.h |   2 -
 arch/arm/mach-davinci/cpu.c                   |  13 --
 arch/arm/mach-omap2/omap3/emac.c              |   3 +-
 board/davinci/da8xxevm/da850evm.c             |   6 -
 board/davinci/da8xxevm/omapl138_lcdk.c        |  32 ++---
 board/logicpd/am3517evm/am3517evm.c           |   1 -
 board/ti/ti816x/evm.c                         |   3 +-
 configs/am3517_evm_defconfig                  |   1 +
 configs/da850_am18xxevm_defconfig             |   1 -
 configs/da850evm_defconfig                    |   2 +
 configs/da850evm_direct_nor_defconfig         |   2 +
 configs/da850evm_nand_defconfig               |   2 +
 configs/omapl138_lcdk_defconfig               |  16 ++-
 configs/sandbox64_defconfig                   |   1 -
 configs/sandbox_defconfig                     |   1 -
 configs/sandbox_flattree_defconfig            |   1 -
 configs/sandbox_noblk_defconfig               |   1 -
 configs/sandbox_spl_defconfig                 |   1 -
 configs/ti816x_evm_defconfig                  |   1 +
 configs/tools-only_defconfig                  |   1 -
 drivers/i2c/Kconfig                           |  13 +-
 drivers/i2c/Makefile                          |   1 -
 drivers/i2c/i2c-uclass-compat.c               | 128 ------------------
 drivers/mtd/nand/raw/davinci_nand.c           |  48 ++++++-
 drivers/net/ti/davinci_emac.c                 |  77 ++++++-----
 include/_exports.h                            |   3 +-
 include/configs/am3517_evm.h                  |   1 -
 include/configs/da850evm.h                    |  12 +-
 include/configs/omapl138_lcdk.h               |   8 --
 include/exports.h                             |   3 +-
 include/i2c.h                                 |  80 -----------
 include/netdev.h                              |   1 -
 35 files changed, 139 insertions(+), 342 deletions(-)
 delete mode 100644 drivers/i2c/i2c-uclass-compat.c

--
2.21.0