All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model
@ 2015-02-06  4:41 Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 01/19] dm: i2c: Add a dm_ prefix to driver model bus speed functions Simon Glass
                   ` (18 more replies)
  0 siblings, 19 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

This series converts most boards to use Kconfig for driver model. It is
based on the v1 patches but split out so that only one arch is done per
patch. This makes it easier to review and test. Also since DM SPL
support is not fully merged some adjustments have had to be made to
allow this series to work independent of that (since I don't want to
delay the Kconfig conversion any longer).

About 10 boards remain to be cleaned up and these are dealt with
in a small follow-on series.

Changes in v2:
- Add CONFIG_SYS_MALLOC_F as well as CONFIG_SYS_MALLOC_F_LEN
- Add a patch to squash use of 'struct i2c_msg' in drivers
- Drop SPL-specific #ifdef in config_defaults.h since Kconfig will do this
- Fix 'procides' typo
- Move subsystem Kconfigs out of drivers/core
- Split out patch to add CMD_DM and CMD_DEMO to Kconfig
- Split out patch to add Kconfig for driver/demo
- Split out patch to add Kconfig options for driver model SPL support
- Split out patch to add a Kconfig file for test/
- Split out patch to expand/complete Kconfig in drivers/
- Use a dm_ prefix for remaining conflicting I2C functions

Simon Glass (19):
  dm: i2c: Add a dm_ prefix to driver model bus speed functions
  dm: i2c: Make API accessible even without CONFIG_DM
  dm: Add Kconfig for driver/demo
  dm: Expand and complete Kconfig in drivers/
  dm: Add Kconfig options for driver model SPL support
  dm: test: Add a Kconfig file
  dm: Add CMD_DM and CMD_DEMO to Kconfig
  dm: Move Raspberry Pi driver model CONFIGs to Kconfig
  dm: exynos: Move driver model CONFIGs to Kconfig
  dm: x86: Move driver model CONFIGs to Kconfig
  dm: tegra: Move driver model CONFIGs to Kconfig
  dm: at91: snapper: Move driver model CONFIGs to Kconfig
  dm: omap3: Move driver model CONFIGs to Kconfig
  dm: sandbox: Move driver model CONFIGs to Kconfig
  dm: sunxi: Move driver model CONFIGs to Kconfig
  dm: mx6: Move driver model CONFIGs to Kconfig
  dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig
  dm: socfpga: Move driver model CONFIGs to Kconfig
  dm: Drop unused driver model config_defaults

 Kconfig                                   | 21 +++++++++++++
 arch/arm/Kconfig                          |  2 ++
 arch/arm/cpu/arm1176/bcm2835/Kconfig      | 12 ++++++++
 arch/arm/cpu/armv7/exynos/Kconfig         | 21 +++++++++++++
 arch/arm/cpu/armv7/omap3/Kconfig          | 15 ++++++++++
 arch/arm/cpu/armv7/tegra-common/Kconfig   | 24 +++++++++++++++
 arch/arm/cpu/armv7/uniphier/Kconfig       |  6 ++++
 arch/arm/include/asm/arch-at91/at91_pio.h | 12 +++-----
 arch/sandbox/Kconfig                      | 24 +++++++++++++++
 arch/x86/Kconfig                          | 15 ++++++++++
 board/compulab/cm_t335/Kconfig            |  9 ++++++
 board/gumstix/pepper/Kconfig              |  9 ++++++
 board/isee/igep0033/Kconfig               |  9 ++++++
 board/phytec/pcm051/Kconfig               |  9 ++++++
 board/samsung/goni/Kconfig                |  9 ++++++
 board/samsung/smdk5420/Kconfig            |  6 ++++
 board/samsung/smdkc100/Kconfig            |  9 ++++++
 board/silica/pengwyn/Kconfig              |  9 ++++++
 board/ti/am335x/Kconfig                   | 16 ++++++++++
 common/Kconfig                            | 23 ++++++++++++++
 common/cmd_i2c.c                          |  4 +--
 configs/Linksprite_pcDuino3_fdt_defconfig |  4 +++
 configs/am335x_igep0033_defconfig         |  2 ++
 configs/am3517_crane_defconfig            |  3 ++
 configs/am3517_evm_defconfig              |  3 ++
 configs/cm_fx6_defconfig                  |  5 ++++
 configs/cm_t335_defconfig                 |  2 ++
 configs/cm_t3517_defconfig                |  3 ++
 configs/cm_t35_defconfig                  |  3 ++
 configs/devkit8000_defconfig              |  3 ++
 configs/dig297_defconfig                  |  3 ++
 configs/eco5pk_defconfig                  |  3 ++
 configs/gwventana_defconfig               |  2 ++
 configs/mcx_defconfig                     |  3 ++
 configs/mt_ventoux_defconfig              |  3 ++
 configs/mx6dlsabreauto_defconfig          |  2 ++
 configs/mx6qsabreauto_defconfig           |  2 ++
 configs/mx6qsabresd_defconfig             |  2 ++
 configs/mx6sxsabresd_defconfig            |  2 ++
 configs/nokia_rx51_defconfig              |  5 ++++
 configs/omap3_beagle_defconfig            |  3 ++
 configs/omap3_evm_defconfig               |  3 ++
 configs/omap3_evm_quick_mmc_defconfig     |  3 ++
 configs/omap3_evm_quick_nand_defconfig    |  3 ++
 configs/omap3_ha_defconfig                |  3 ++
 configs/omap3_logic_defconfig             |  3 ++
 configs/omap3_mvblx_defconfig             |  3 ++
 configs/omap3_pandora_defconfig           |  3 ++
 configs/omap3_sdp3430_defconfig           |  3 ++
 configs/pcm051_rev1_defconfig             |  2 ++
 configs/pcm051_rev3_defconfig             |  2 ++
 configs/pengwyn_defconfig                 |  2 ++
 configs/pepper_defconfig                  |  2 ++
 configs/rpi_defconfig                     |  2 ++
 configs/s5p_goni_defconfig                |  2 ++
 configs/sandbox_defconfig                 |  2 ++
 configs/smdkc100_defconfig                |  2 ++
 configs/snapper9260_defconfig             |  5 ++++
 configs/snapper9g20_defconfig             |  5 ++++
 configs/socfpga_socrates_defconfig        |  3 ++
 configs/stv0991_defconfig                 |  2 ++
 configs/tao3530_defconfig                 |  3 ++
 configs/tricorder_defconfig               |  3 ++
 configs/tricorder_flash_defconfig         |  3 ++
 configs/twister_defconfig                 |  3 ++
 doc/driver-model/spi-howto.txt            |  4 +--
 drivers/Kconfig                           |  4 +++
 drivers/core/Kconfig                      | 50 +++++++++++++++++++++++++++++--
 drivers/demo/Kconfig                      | 26 ++++++++++++++++
 drivers/gpio/Kconfig                      |  7 +++--
 drivers/i2c/Kconfig                       | 12 ++++++--
 drivers/i2c/adi_i2c.c                     |  6 ++--
 drivers/i2c/i2c-uclass.c                  | 11 ++-----
 drivers/i2c/kona_i2c.c                    | 16 +++++-----
 drivers/i2c/mv_i2c.c                      | 10 +++----
 drivers/misc/Kconfig                      |  9 ++++++
 drivers/mtd/Kconfig                       |  2 ++
 drivers/mtd/spi/Kconfig                   | 14 +++++++++
 drivers/serial/Kconfig                    |  6 ++--
 drivers/spi/Kconfig                       | 10 +++++--
 drivers/thermal/Kconfig                   |  7 +++++
 include/config_defaults.h                 |  6 ----
 include/configs/cm_fx6.h                  |  7 -----
 include/configs/exynos-common.h           |  7 -----
 include/configs/gw_ventana.h              |  1 -
 include/configs/mx6sabre_common.h         |  1 -
 include/configs/mx6sxsabresd.h            |  1 -
 include/configs/novena.h                  |  1 -
 include/configs/peach-pi.h                |  1 -
 include/configs/peach-pit.h               |  1 -
 include/configs/rpi.h                     |  7 -----
 include/configs/s5p_goni.h                |  5 ----
 include/configs/sandbox.h                 | 13 --------
 include/configs/smdkc100.h                |  7 -----
 include/configs/snapper9260.h             |  5 ----
 include/configs/socfpga_common.h          |  7 -----
 include/configs/stv0991.h                 |  1 -
 include/configs/sunxi-common.h            |  4 ---
 include/configs/tegra-common.h            | 11 -------
 include/configs/ti_am335x_common.h        |  7 -----
 include/configs/ti_omap3_common.h         |  5 ----
 include/configs/uniphier.h                |  4 ---
 include/configs/x86-common.h              |  6 ----
 include/i2c.h                             | 13 ++++----
 test/Kconfig                              |  1 +
 test/dm/Kconfig                           |  8 +++++
 test/dm/i2c.c                             |  6 ++--
 107 files changed, 554 insertions(+), 165 deletions(-)
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/Kconfig
 create mode 100644 drivers/demo/Kconfig
 create mode 100644 drivers/mtd/spi/Kconfig
 create mode 100644 drivers/thermal/Kconfig
 create mode 100644 test/Kconfig
 create mode 100644 test/dm/Kconfig

-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 01/19] dm: i2c: Add a dm_ prefix to driver model bus speed functions
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-06  7:12   ` Heiko Schocher
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 02/19] dm: i2c: Make API accessible even without CONFIG_DM Simon Glass
                   ` (17 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

As with i2c_read() and i2c_write(), add a dm_ prefix to the driver model
versions of these functions to avoid conflicts.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Use a dm_ prefix for remaining conflicting I2C functions

 common/cmd_i2c.c         |  4 ++--
 drivers/i2c/i2c-uclass.c | 11 +++--------
 include/i2c.h            |  8 ++++----
 test/dm/i2c.c            |  6 +++---
 4 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 7c3ad00..fe8f77a 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1730,7 +1730,7 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const
 #endif
 	if (argc == 1) {
 #ifdef CONFIG_DM_I2C
-		speed = i2c_get_bus_speed(bus);
+		speed = dm_i2c_get_bus_speed(bus);
 #else
 		speed = i2c_get_bus_speed();
 #endif
@@ -1740,7 +1740,7 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const
 		speed = simple_strtoul(argv[1], NULL, 10);
 		printf("Setting bus speed to %d Hz\n", speed);
 #ifdef CONFIG_DM_I2C
-		ret = i2c_set_bus_speed(bus, speed);
+		ret = dm_i2c_set_bus_speed(bus, speed);
 #else
 		ret = i2c_set_bus_speed(speed);
 #endif
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index eafa457..a6991bf 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -325,7 +325,7 @@ int dm_i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
 	return ret;
 }
 
-int i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
+int dm_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
 {
 	struct dm_i2c_ops *ops = i2c_get_ops(bus);
 	struct dm_i2c_bus *i2c = bus->uclass_priv;
@@ -346,12 +346,7 @@ int i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
 	return 0;
 }
 
-/*
- * i2c_get_bus_speed:
- *
- *  Returns speed of selected I2C bus in Hz
- */
-int i2c_get_bus_speed(struct udevice *bus)
+int dm_i2c_get_bus_speed(struct udevice *bus)
 {
 	struct dm_i2c_ops *ops = i2c_get_ops(bus);
 	struct dm_i2c_bus *i2c = bus->uclass_priv;
@@ -440,7 +435,7 @@ static int i2c_post_probe(struct udevice *dev)
 	i2c->speed_hz = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
 				     "clock-frequency", 100000);
 
-	return i2c_set_bus_speed(dev, i2c->speed_hz);
+	return dm_i2c_set_bus_speed(dev, i2c->speed_hz);
 }
 
 static int i2c_post_bind(struct udevice *dev)
diff --git a/include/i2c.h b/include/i2c.h
index 27fe00f..1635e9a 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -125,21 +125,21 @@ int dm_i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
 		 struct udevice **devp);
 
 /**
- * i2c_set_bus_speed() - set the speed of a bus
+ * dm_i2c_set_bus_speed() - set the speed of a bus
  *
  * @bus:	Bus to adjust
  * @speed:	Requested speed in Hz
  * @return 0 if OK, -EINVAL for invalid values
  */
-int i2c_set_bus_speed(struct udevice *bus, unsigned int speed);
+int dm_i2c_set_bus_speed(struct udevice *bus, unsigned int speed);
 
 /**
- * i2c_get_bus_speed() - get the speed of a bus
+ * dm_i2c_get_bus_speed() - get the speed of a bus
  *
  * @bus:	Bus to check
  * @return speed of selected I2C bus in Hz, -ve on error
  */
-int i2c_get_bus_speed(struct udevice *bus);
+int dm_i2c_get_bus_speed(struct udevice *bus);
 
 /**
  * i2c_set_chip_flags() - set flags for a chip
diff --git a/test/dm/i2c.c b/test/dm/i2c.c
index ef88372..541b73b 100644
--- a/test/dm/i2c.c
+++ b/test/dm/i2c.c
@@ -67,10 +67,10 @@ static int dm_test_i2c_speed(struct dm_test_state *dms)
 
 	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
 	ut_assertok(i2c_get_chip(bus, chip, 1, &dev));
-	ut_assertok(i2c_set_bus_speed(bus, 100000));
+	ut_assertok(dm_i2c_set_bus_speed(bus, 100000));
 	ut_assertok(dm_i2c_read(dev, 0, buf, 5));
-	ut_assertok(i2c_set_bus_speed(bus, 400000));
-	ut_asserteq(400000, i2c_get_bus_speed(bus));
+	ut_assertok(dm_i2c_set_bus_speed(bus, 400000));
+	ut_asserteq(400000, dm_i2c_get_bus_speed(bus));
 	ut_assertok(dm_i2c_read(dev, 0, buf, 5));
 	ut_asserteq(-EINVAL, dm_i2c_write(dev, 0, buf, 5));
 
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 02/19] dm: i2c: Make API accessible even without CONFIG_DM
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 01/19] dm: i2c: Add a dm_ prefix to driver model bus speed functions Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-06  7:15   ` Heiko Schocher
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 03/19] dm: Add Kconfig for driver/demo Simon Glass
                   ` (16 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Make the driver model I2C API available always, even if driver model
is not enabled. This allows for a 'soft' switch-over, where drivers can
use the new structures in code which is compiled but not yet used. This
makes migration easier in some cases.

Fix up the existing drivers which define their own 'struct i2c_msg'.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Add a patch to squash use of 'struct i2c_msg' in drivers

 drivers/i2c/adi_i2c.c  |  6 +++---
 drivers/i2c/kona_i2c.c | 16 ++++++++--------
 drivers/i2c/mv_i2c.c   | 10 +++++-----
 include/i2c.h          |  5 +----
 4 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/drivers/i2c/adi_i2c.c b/drivers/i2c/adi_i2c.c
index 20495b1..c58f14a 100644
--- a/drivers/i2c/adi_i2c.c
+++ b/drivers/i2c/adi_i2c.c
@@ -63,7 +63,7 @@ struct twi_regs {
 #endif
 
 /* All transfers are described by this data structure */
-struct i2c_msg {
+struct adi_i2c_msg {
 	u8 flags;
 #define I2C_M_COMBO		0x4
 #define I2C_M_STOP		0x2
@@ -81,7 +81,7 @@ struct i2c_msg {
  * wait_for_completion - manage the actual i2c transfer
  *	@msg: the i2c msg
  */
-static int wait_for_completion(struct twi_regs *twi, struct i2c_msg *msg)
+static int wait_for_completion(struct twi_regs *twi, struct adi_i2c_msg *msg)
 {
 	u16 int_stat, ctl;
 	ulong timebase = get_timer(0);
@@ -151,7 +151,7 @@ static int i2c_transfer(struct i2c_adapter *adap, uint8_t chip, uint addr,
 		(addr >>  8),
 		(addr >> 16),
 	};
-	struct i2c_msg msg = {
+	struct adi_i2c_msg msg = {
 		.flags = flags | (len >= 0xff ? I2C_M_STOP : 0),
 		.buf   = buffer,
 		.len   = len,
diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
index 5eab338..9af496b 100644
--- a/drivers/i2c/kona_i2c.c
+++ b/drivers/i2c/kona_i2c.c
@@ -156,7 +156,7 @@ static struct bcm_kona_i2c_dev g_i2c_devs[CONFIG_SYS_MAX_I2C_BUS] = {
 #define I2C_M_RD	0x0001	/* read data */
 #define I2C_M_NOSTART	0x4000	/* no restart between msgs */
 
-struct i2c_msg {
+struct kona_i2c_msg {
 	uint16_t addr;
 	uint16_t flags;
 	uint16_t len;
@@ -297,7 +297,7 @@ static int bcm_kona_i2c_read_fifo_single(struct bcm_kona_i2c_dev *dev,
 
 /* Read any amount of data using the RX FIFO from the i2c bus */
 static int bcm_kona_i2c_read_fifo(struct bcm_kona_i2c_dev *dev,
-				  struct i2c_msg *msg)
+				  struct kona_i2c_msg *msg)
 {
 	unsigned int bytes_to_read = MAX_RX_FIFO_SIZE;
 	unsigned int last_byte_nak = 0;
@@ -392,7 +392,7 @@ static int bcm_kona_i2c_write_fifo_single(struct bcm_kona_i2c_dev *dev,
 
 /* Write any amount of data using TX FIFO to the i2c bus */
 static int bcm_kona_i2c_write_fifo(struct bcm_kona_i2c_dev *dev,
-				   struct i2c_msg *msg)
+				   struct kona_i2c_msg *msg)
 {
 	unsigned int bytes_to_write = MAX_TX_FIFO_SIZE;
 	unsigned int bytes_written = 0;
@@ -418,7 +418,7 @@ static int bcm_kona_i2c_write_fifo(struct bcm_kona_i2c_dev *dev,
 
 /* Send i2c address */
 static int bcm_kona_i2c_do_addr(struct bcm_kona_i2c_dev *dev,
-				struct i2c_msg *msg)
+				struct kona_i2c_msg *msg)
 {
 	unsigned char addr;
 
@@ -480,9 +480,9 @@ static void bcm_kona_i2c_config_timing(struct bcm_kona_i2c_dev *dev)
 
 /* Master transfer function */
 static int bcm_kona_i2c_xfer(struct bcm_kona_i2c_dev *dev,
-			     struct i2c_msg msgs[], int num)
+			     struct kona_i2c_msg msgs[], int num)
 {
-	struct i2c_msg *pmsg;
+	struct kona_i2c_msg *pmsg;
 	int rc = 0;
 	int i;
 
@@ -635,7 +635,7 @@ static int kona_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
 			 int alen, uchar *buffer, int len)
 {
 	/* msg[0] writes the addr, msg[1] reads the data */
-	struct i2c_msg msg[2];
+	struct kona_i2c_msg msg[2];
 	unsigned char msgbuf0[64];
 	struct bcm_kona_i2c_dev *dev = kona_get_dev(adap);
 
@@ -663,7 +663,7 @@ static int kona_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
 static int kona_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
 			  int alen, uchar *buffer, int len)
 {
-	struct i2c_msg msg[1];
+	struct kona_i2c_msg msg[1];
 	unsigned char msgbuf0[64];
 	unsigned int i;
 	struct bcm_kona_i2c_dev *dev = kona_get_dev(adap);
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index dac3463..e65cce0 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -31,7 +31,7 @@
 #endif
 
 /* All transfers are described by this data structure */
-struct i2c_msg {
+struct mv_i2c_msg {
 	u8 condition;
 	u8 acknack;
 	u8 direction;
@@ -157,7 +157,7 @@ static int i2c_isr_set_cleared(unsigned long set_mask,
  *          -5: illegal parameters
  *          -6: bus is busy and couldn't be aquired
  */
-int i2c_transfer(struct i2c_msg *msg)
+int i2c_transfer(struct mv_i2c_msg *msg)
 {
 	int ret;
 
@@ -286,7 +286,7 @@ void i2c_init(int speed, int slaveaddr)
  */
 int i2c_probe(uchar chip)
 {
-	struct i2c_msg msg;
+	struct mv_i2c_msg msg;
 
 	i2c_reset();
 
@@ -322,7 +322,7 @@ int i2c_probe(uchar chip)
  */
 int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
 {
-	struct i2c_msg msg;
+	struct mv_i2c_msg msg;
 	u8 addr_bytes[3]; /* lowest...highest byte of data address */
 
 	PRINTD(("i2c_read(chip=0x%02x, addr=0x%02x, alen=0x%02x, "
@@ -410,7 +410,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
  */
 int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
 {
-	struct i2c_msg msg;
+	struct mv_i2c_msg msg;
 	u8 addr_bytes[3]; /* lowest...highest byte of data address */
 
 	PRINTD(("i2c_write(chip=0x%02x, addr=0x%02x, alen=0x%02x, "
diff --git a/include/i2c.h b/include/i2c.h
index 1635e9a..31b0389 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -25,14 +25,13 @@
  * enough as to be incompatible for compilation purposes.
  */
 
-#ifdef CONFIG_DM_I2C
-
 enum dm_i2c_chip_flags {
 	DM_I2C_CHIP_10BIT	= 1 << 0, /* Use 10-bit addressing */
 	DM_I2C_CHIP_RD_ADDRESS	= 1 << 1, /* Send address for each read byte */
 	DM_I2C_CHIP_WR_ADDRESS	= 1 << 2, /* Send address for each write byte */
 };
 
+struct udevice;
 /**
  * struct dm_i2c_chip - information about an i2c chip
  *
@@ -439,8 +438,6 @@ int i2c_get_chip_for_busnum(int busnum, int chip_addr, uint offset_len,
 int i2c_chip_ofdata_to_platdata(const void *blob, int node,
 				struct dm_i2c_chip *chip);
 
-#endif
-
 #ifndef CONFIG_DM_I2C
 
 /*
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 03/19] dm: Add Kconfig for driver/demo
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 01/19] dm: i2c: Add a dm_ prefix to driver model bus speed functions Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 02/19] dm: i2c: Make API accessible even without CONFIG_DM Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-09  3:51   ` Masahiro Yamada
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 04/19] dm: Expand and complete Kconfig in drivers/ Simon Glass
                   ` (15 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Add a suitable Kconfig for this directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Split out patch to add Kconfig for driver/demo

 drivers/Kconfig      |  2 ++
 drivers/demo/Kconfig | 26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 drivers/demo/Kconfig

diff --git a/drivers/Kconfig b/drivers/Kconfig
index 128736d..021293e 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -2,6 +2,8 @@ menu "Device Drivers"
 
 source "drivers/core/Kconfig"
 
+source "drivers/demo/Kconfig"
+
 source "drivers/pci/Kconfig"
 
 source "drivers/pcmcia/Kconfig"
diff --git a/drivers/demo/Kconfig b/drivers/demo/Kconfig
new file mode 100644
index 0000000..7a8ce18
--- /dev/null
+++ b/drivers/demo/Kconfig
@@ -0,0 +1,26 @@
+config DM_DEMO
+	bool "Enable demo uclass support"
+	depends on DM
+	help
+	  This uclass allows you to play around with driver model. It provides
+	  an interface to a couple of demo devices. You can access it using
+	  the 'demo' command or by calling the uclass functions from your
+	  own code.
+
+config DM_DEMO_SIMPLE
+	bool "Enable simple demo device for driver model"
+	depends on DM_DEMO
+	help
+	  This device allows you to play around with driver model. It prints
+	  a message when the 'demo hello' command is executed which targets
+	  this device. It can be used to help understand how driver model
+	  works.
+
+config DM_DEMO_SHAPE
+	bool "Enable shape demo device for driver model"
+	depends on DM_DEMO
+	help
+	  This device allows you to play around with driver model. It prints
+	  a shape when the 'demo hello' command is executed which targets
+	  this device. It can be used to help understand how driver model
+	  works.
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 04/19] dm: Expand and complete Kconfig in drivers/
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (2 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 03/19] dm: Add Kconfig for driver/demo Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-09  3:46   ` Masahiro Yamada
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 05/19] dm: Add Kconfig options for driver model SPL support Simon Glass
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Expand the help messages for each driver. Add missing Kconfig for I2C,
SPI flash and thermal.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Move subsystem Kconfigs out of drivers/core
- Split out patch to expand/complete Kconfig in drivers/

 doc/driver-model/spi-howto.txt |  4 ++--
 drivers/Kconfig                |  2 ++
 drivers/core/Kconfig           |  6 ++++--
 drivers/gpio/Kconfig           |  7 +++++--
 drivers/i2c/Kconfig            | 12 ++++++++++--
 drivers/misc/Kconfig           |  9 +++++++++
 drivers/mtd/Kconfig            |  2 ++
 drivers/mtd/spi/Kconfig        | 14 ++++++++++++++
 drivers/serial/Kconfig         |  6 ++++--
 drivers/spi/Kconfig            | 10 ++++++++--
 drivers/thermal/Kconfig        |  7 +++++++
 11 files changed, 67 insertions(+), 12 deletions(-)
 create mode 100644 drivers/mtd/spi/Kconfig
 create mode 100644 drivers/thermal/Kconfig

diff --git a/doc/driver-model/spi-howto.txt b/doc/driver-model/spi-howto.txt
index 5bc29ad..ee4abf4 100644
--- a/doc/driver-model/spi-howto.txt
+++ b/doc/driver-model/spi-howto.txt
@@ -40,8 +40,8 @@ with only minor changes:
 
 Add these to your board config:
 
-#define CONFIG_DM_SPI
-#define CONFIG_DM_SPI_FLASH
+CONFIG_DM_SPI
+CONFIG_DM_SPI_FLASH
 
 
 2. Add the skeleton
diff --git a/drivers/Kconfig b/drivers/Kconfig
index 021293e..dcce532 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -50,4 +50,6 @@ source "drivers/dma/Kconfig"
 
 source "drivers/crypto/Kconfig"
 
+source "drivers/thermal/Kconfig"
+
 endmenu
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index d2799dc..dc32385 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -2,5 +2,7 @@ config DM
 	bool "Enable Driver Model"
 	depends on !SPL_BUILD
 	help
-	  This config option enables Driver Model.
-	  To use legacy drivers, say N.
+	  This config option enables Driver Model. This brings in the core
+	  support, including scanning of platform data on start-up. If
+	  CONFIG_OF_CONTROL is enabled, the device tree will be scanned also
+	  when available.
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index d21302f..b609e73 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -2,5 +2,8 @@ config DM_GPIO
 	bool "Enable Driver Model for GPIO drivers"
 	depends on DM
 	help
-	  If you want to use driver model for GPIO drivers, say Y.
-	  To use legacy GPIO drivers, say N.
+	  Enable driver model for GPIO access. The standard GPIO
+	  interface (gpio_get_value(), etc.) is then implemented by
+	  the GPIO uclass. Drivers provide methods to query the
+	  particular GPIOs that they provide. The uclass interface
+	  is defined in include/asm-generic/gpio.h.
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 202ea5d..2cc776c 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -2,8 +2,16 @@ config DM_I2C
 	bool "Enable Driver Model for I2C drivers"
 	depends on DM
 	help
-	  If you want to use driver model for I2C drivers, say Y.
-	  To use legacy I2C drivers, say N.
+	  Enable driver model for I2C. This SPI flash interface
+	  (spi_flash_probe(), spi_flash_write(), etc.) is then
+	  implemented by the SPI flash uclass. There is one standard
+	  SPI flash driver which knows how to probe most chips
+	  supported by U-Boot. The uclass interface is defined in
+	  include/spi_flash.h, but is currently fully compatible
+	  with the old interface to avoid confusion and duplication
+	  during the transition parent. SPI and SPI flash must be
+	  enabled together (it is not possible to use driver model
+	  for one and not the other).
 
 config SYS_I2C_UNIPHIER
 	bool "UniPhier I2C driver"
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index e69de29..813d1c2 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -0,0 +1,9 @@
+config DM_CROS_EC
+	bool "Enable Driver Model for Chrome OS EC"
+	depends on DM
+	help
+	  Enable driver model for the Chrome OS EC interface. This
+	  allows the cros_ec SPI driver to operate with CONFIG_DM_SPI
+	  but otherwise makes few changes. Since cros_ec also supports
+	  I2C and LPC (which don't support driver model yet), a full
+	  conversion is not yet possible.
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 415ab4e..59278d1 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -1 +1,3 @@
 source "drivers/mtd/nand/Kconfig"
+
+source "drivers/mtd/spi/Kconfig"
diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig
new file mode 100644
index 0000000..2dc46b4
--- /dev/null
+++ b/drivers/mtd/spi/Kconfig
@@ -0,0 +1,14 @@
+config DM_SPI_FLASH
+	bool "Enable Driver Model for SPI flash"
+	depends on DM && SPI
+	help
+	  Enable driver model for SPI flash. This SPI flash interface
+	  (spi_flash_probe(), spi_flash_write(), etc.) is then
+	  implemented by the SPI flash uclass. There is one standard
+	  SPI flash driver which knows how to probe most chips
+	  supported by U-Boot. The uclass interface is defined in
+	  include/spi_flash.h, but is currently fully compatible
+	  with the old interface to avoid confusion and duplication
+	  during the transition parent. SPI and SPI flash must be
+	  enabled together (it is not possible to use driver model
+	  for one and not the other).
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index a0b6e02..c94353b 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -2,8 +2,10 @@ config DM_SERIAL
 	bool "Enable Driver Model for serial drivers"
 	depends on DM
 	help
-	  If you want to use driver model for serial drivers, say Y.
-	  To use legacy serial drivers, say N.
+	  Enable driver model for serial. This replaces
+	  drivers/serial/serial.c with the serial uclass, which
+	  implements serial_putc() etc. The uclass interface is
+	  defined in include/serial.h.
 
 config UNIPHIER_SERIAL
 	bool "UniPhier on-chip UART support"
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index e1678e6..7ae2727 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -2,5 +2,11 @@ config DM_SPI
 	bool "Enable Driver Model for SPI drivers"
 	depends on DM
 	help
-	  If you want to use driver model for SPI drivers, say Y.
-	  To use legacy SPI drivers, say N.
+	  Enable driver model for SPI. The SPI slave interface
+	  (spi_setup_slave(), spi_xfer(), etc.) is then implemented by
+	  the SPI uclass. Drivers provide methods to access the SPI
+	  buses that they control. The uclass interface is defined in
+	  include/spi.h. The existing spi_slave structure is attached
+	  as 'parent data' to every slave on each bus. Slaves
+	  typically use driver-private data instead of extending the
+	  spi_slave structure.
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
new file mode 100644
index 0000000..3c6b36d
--- /dev/null
+++ b/drivers/thermal/Kconfig
@@ -0,0 +1,7 @@
+config DM_THERMAL
+	bool "Driver support for thermal devices"
+	help
+	  Enable support for temporary-sensing devices. Some SoCs have on-chip
+	  temperature sensors to permit warnings, speed throttling or even
+	  automatic power-off when the temperature gets too high or low. Other
+	  devices may be discrete but connected on a suitable bus.
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 05/19] dm: Add Kconfig options for driver model SPL support
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (3 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 04/19] dm: Expand and complete Kconfig in drivers/ Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-11 19:45   ` Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 06/19] dm: test: Add a Kconfig file Simon Glass
                   ` (13 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

The SPL support cannot be enabled yet, but we can add the Kconfig
options in preparation for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Drop SPL-specific #ifdef in config_defaults.h since Kconfig will do this
- Split out patch to add Kconfig options for driver model SPL support

 drivers/core/Kconfig      | 44 ++++++++++++++++++++++++++++++++++++++++++++
 include/config_defaults.h |  6 ++++++
 2 files changed, 50 insertions(+)

diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index dc32385..f0d6110 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -6,3 +6,47 @@ config DM
 	  support, including scanning of platform data on start-up. If
 	  CONFIG_OF_CONTROL is enabled, the device tree will be scanned also
 	  when available.
+
+config SPL_DM
+	bool "Enable Driver Model for SPL"
+	depends on DM && SPL
+	help
+	  Enable driver model in SPL. You will need to provide a
+	  suitable malloc() implementation. If you are not using the
+	  full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START,
+	  consider using CONFIG_SYS_MALLOC_SIMPLE. In that case you
+	  must provide CONFIG_SYS_MALLOC_F_LEN to set the size.
+	  In most cases driver model will only allocate a few uclasses
+	  and devices in SPL, so 1KB should be enable. See
+	  CONFIG_SYS_MALLOC_F_LEN for more details on how to enable it.
+
+config DM_WARN
+	bool "Enable warnings in driver model"
+	help
+	  The dm_warn() function can use up quite a bit of space for its
+	  strings. By default this is disabled for SPL builds to save space.
+	  This will cause dm_warn() to be compiled out - it will do nothing
+	  when called.
+	depends on DM
+	default y if !SPL_BUILD
+	default n if SPL_BUILD
+
+config DM_DEVICE_REMOVE
+	bool "Support device removal"
+	help
+	  We can save some code space by dropping support for removing a
+	  device. This is not normally required in SPL, so by default this
+	  option is disabled for SPL.
+	depends on DM
+	default y if !SPL_BUILD
+	default n if SPL_BUILD
+
+config DM_STDIO
+	bool "Support stdio registration"
+	help
+	  Normally serial drivers register with stdio so that they can be used
+	  as normal output devices. In SPL we don't normally use stdio, so
+	  we can omit this feature.
+	depends on DM
+	default y if !SPL_BUILD
+	default n if SPL_BUILD
diff --git a/include/config_defaults.h b/include/config_defaults.h
index 4d49315..fa99838 100644
--- a/include/config_defaults.h
+++ b/include/config_defaults.h
@@ -21,9 +21,15 @@
 #define CONFIG_PARTITIONS 1
 
 #ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_DM_WARN
 #define CONFIG_DM_WARN
+#endif
+#ifndef CONFIG_DM_DEVICE_REMOVE
 #define CONFIG_DM_DEVICE_REMOVE
+#endif
+#ifndef CONFIG_DM_STDIO
 #define CONFIG_DM_STDIO
 #endif
+#endif
 
 #endif
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 06/19] dm: test: Add a Kconfig file
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (4 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 05/19] dm: Add Kconfig options for driver model SPL support Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-09  3:51   ` Masahiro Yamada
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 07/19] dm: Add CMD_DM and CMD_DEMO to Kconfig Simon Glass
                   ` (12 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Add a file to control driver model test features.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Split out patch to add a Kconfig file for test/

 Kconfig         | 2 ++
 test/Kconfig    | 1 +
 test/dm/Kconfig | 8 ++++++++
 3 files changed, 11 insertions(+)
 create mode 100644 test/Kconfig
 create mode 100644 test/dm/Kconfig

diff --git a/Kconfig b/Kconfig
index fed488f..8e31410 100644
--- a/Kconfig
+++ b/Kconfig
@@ -165,3 +165,5 @@ source "drivers/Kconfig"
 source "fs/Kconfig"
 
 source "lib/Kconfig"
+
+source "test/Kconfig"
diff --git a/test/Kconfig b/test/Kconfig
new file mode 100644
index 0000000..1fb1716
--- /dev/null
+++ b/test/Kconfig
@@ -0,0 +1 @@
+source "test/dm/Kconfig"
diff --git a/test/dm/Kconfig b/test/dm/Kconfig
new file mode 100644
index 0000000..a9d0298
--- /dev/null
+++ b/test/dm/Kconfig
@@ -0,0 +1,8 @@
+config DM_TEST
+	bool "Enable driver model test command"
+	depends on SANDBOX && CMD_DM
+	help
+	  This enables the 'dm test' command which runs a series of unit
+	  tests on the driver model code. Each subsystem (uclass) is tested.
+	  If all is well then all tests pass although there will be a few
+	  messages printed along the way.
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 07/19] dm: Add CMD_DM and CMD_DEMO to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (5 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 06/19] dm: test: Add a Kconfig file Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-09  4:10   ` Masahiro Yamada
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 08/19] dm: Move Raspberry Pi driver model CONFIGs " Simon Glass
                   ` (11 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Add Kconfig settings for these two options.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Fix 'procides' typo
- Split out patch to add CMD_DM and CMD_DEMO to Kconfig

 common/Kconfig                     | 23 +++++++++++++++++++++++
 include/configs/sandbox.h          |  1 -
 include/configs/sunxi-common.h     |  1 -
 include/configs/ti_am335x_common.h |  1 -
 include/configs/uniphier.h         |  2 --
 5 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/common/Kconfig b/common/Kconfig
index fd84fa0..2ca002d 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -153,6 +153,29 @@ endmenu
 
 menu "Device access commands"
 
+config CMD_DM
+	bool "dm - Access to driver model information"
+	depends on DM
+	default y
+	help
+	  Provides access to driver model data structures and information,
+	  such as a list of devices, list of uclasses and the state of each
+	  device (e.g. activated). This is not required for operation, but
+	  can be useful to see the state of driver model for debugging or
+	  interest.
+
+config CMD_DEMO
+	bool "demo - Demonstration commands for driver model"
+	depends on DM
+	help
+	  Provides a 'demo' command which can be used to play around with
+	  driver model. To use this properly you will need to enable one or
+	  both of the demo devices (DM_DEMO_SHAPE and DM_DEMO_SIMPLE).
+	  Otherwise you will always get an empty list of devices. The demo
+	  devices are defined in the sandbox device tree, so the easiest
+	  option is to use sandbox and pass the -d point to sandbox's
+	  u-boot.dtb file.
+
 config CMD_LOADB
 	bool "loadb"
 	help
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index e9d3f32..deff4d6 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -24,7 +24,6 @@
 #define CONFIG_BOOTSTAGE
 #define CONFIG_BOOTSTAGE_REPORT
 #define CONFIG_CMD_DEMO
-#define CONFIG_CMD_DM
 #define CONFIG_DM_DEMO
 #define CONFIG_DM_DEMO_SIMPLE
 #define CONFIG_DM_DEMO_SHAPE
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 6cfd7e1..b5632d8 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -28,7 +28,6 @@
 #define CONFIG_SYS_TEXT_BASE		0x4a000000
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM)
-# define CONFIG_CMD_DM
 # define CONFIG_DM_GPIO
 # define CONFIG_DM_SERIAL
 # define CONFIG_DW_SERIAL
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index 598526b..35332b5 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -23,7 +23,6 @@
 #ifndef CONFIG_DM
 # define CONFIG_DM
 #endif
-# define CONFIG_CMD_DM
 # define CONFIG_DM_GPIO
 # define CONFIG_DM_SERIAL
 # define CONFIG_OMAP_SERIAL
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 9ad47f6..8a7a20b 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -190,8 +190,6 @@
 #define CONFIG_FAT_WRITE
 #define CONFIG_DOS_PARTITION
 
-#define CONFIG_CMD_DM
-
 /* memtest works on */
 #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x01000000)
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 08/19] dm: Move Raspberry Pi driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (6 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 07/19] dm: Add CMD_DM and CMD_DEMO to Kconfig Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-11 19:45   ` Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 09/19] dm: exynos: Move " Simon Glass
                   ` (10 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config header and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/Kconfig                     |  2 ++
 arch/arm/cpu/arm1176/bcm2835/Kconfig | 12 ++++++++++++
 include/configs/rpi.h                |  6 ------
 3 files changed, 14 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/Kconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 986b4c5..92658cd 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -823,6 +823,8 @@ endchoice
 
 source "arch/arm/cpu/arm926ejs/davinci/Kconfig"
 
+source "arch/arm/cpu/arm1176/bcm2835/Kconfig"
+
 source "arch/arm/cpu/armv7/exynos/Kconfig"
 
 source "arch/arm/cpu/armv7/highbank/Kconfig"
diff --git a/arch/arm/cpu/arm1176/bcm2835/Kconfig b/arch/arm/cpu/arm1176/bcm2835/Kconfig
new file mode 100644
index 0000000..94f57d7
--- /dev/null
+++ b/arch/arm/cpu/arm1176/bcm2835/Kconfig
@@ -0,0 +1,12 @@
+if TARGET_RPI
+
+config DM
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
+endif
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index c94f411..ea19ad8 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -30,12 +30,6 @@
  */
 #define CONFIG_MACH_TYPE		MACH_TYPE_BCM2708
 
-/* Enable driver model */
-#define CONFIG_DM
-#define CONFIG_CMD_DM
-#define CONFIG_DM_GPIO
-#define CONFIG_DM_SERIAL
-
 /* Memory layout */
 #define CONFIG_NR_DRAM_BANKS		1
 #define CONFIG_SYS_SDRAM_BASE		0x00000000
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 09/19] dm: exynos: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (7 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 08/19] dm: Move Raspberry Pi driver model CONFIGs " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-11 19:45   ` Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 10/19] dm: x86: " Simon Glass
                   ` (9 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/cpu/armv7/exynos/Kconfig | 15 +++++++++++++++
 board/samsung/goni/Kconfig        |  9 +++++++++
 board/samsung/smdk5420/Kconfig    |  6 ++++++
 board/samsung/smdkc100/Kconfig    |  9 +++++++++
 include/configs/exynos-common.h   |  6 ------
 include/configs/peach-pi.h        |  1 -
 include/configs/peach-pit.h       |  1 -
 include/configs/s5p_goni.h        |  4 ----
 include/configs/smdkc100.h        |  4 ----
 9 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig
index 7fcb5d2..17ad567 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -65,6 +65,21 @@ endchoice
 config SYS_SOC
 	default "exynos"
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
+config DM_SPI
+	default y if !SPL_BUILD
+
+config DM_SPI_FLASH
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
 source "board/samsung/smdkv310/Kconfig"
 source "board/samsung/trats/Kconfig"
 source "board/samsung/universal_c210/Kconfig"
diff --git a/board/samsung/goni/Kconfig b/board/samsung/goni/Kconfig
index cbbf5a9..2c5d3fc 100644
--- a/board/samsung/goni/Kconfig
+++ b/board/samsung/goni/Kconfig
@@ -12,4 +12,13 @@ config SYS_SOC
 config SYS_CONFIG_NAME
 	default "s5p_goni"
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
 endif
diff --git a/board/samsung/smdk5420/Kconfig b/board/samsung/smdk5420/Kconfig
index a9d62ff..576abae 100644
--- a/board/samsung/smdk5420/Kconfig
+++ b/board/samsung/smdk5420/Kconfig
@@ -22,6 +22,9 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
 	default "peach-pi"
 
+config DM_CROS_EC
+	default y
+
 endif
 
 if TARGET_PEACH_PIT
@@ -35,6 +38,9 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
 	default "peach-pit"
 
+config DM_CROS_EC
+	default y
+
 endif
 
 if TARGET_SMDK5420
diff --git a/board/samsung/smdkc100/Kconfig b/board/samsung/smdkc100/Kconfig
index d2157b4..996fe3c 100644
--- a/board/samsung/smdkc100/Kconfig
+++ b/board/samsung/smdkc100/Kconfig
@@ -12,4 +12,13 @@ config SYS_SOC
 config SYS_CONFIG_NAME
 	default "smdkc100"
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
 endif
diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h
index 1f3ee55..2c4f35a 100644
--- a/include/configs/exynos-common.h
+++ b/include/configs/exynos-common.h
@@ -17,12 +17,6 @@
 #include <linux/sizes.h>
 
 #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_DM
-#define CONFIG_CMD_DM
-#define CONFIG_DM_GPIO
-#define CONFIG_DM_SERIAL
-#define CONFIG_DM_SPI
-#define CONFIG_DM_SPI_FLASH
 
 #define CONFIG_ARCH_CPU_INIT
 #define CONFIG_DISPLAY_CPUINFO
diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h
index a1c980d..f724164 100644
--- a/include/configs/peach-pi.h
+++ b/include/configs/peach-pi.h
@@ -44,7 +44,6 @@
 
 #define CONFIG_POWER_TPS65090_EC
 #define CONFIG_CROS_EC_SPI		/* Support CROS_EC over SPI */
-#define CONFIG_DM_CROS_EC
 
 #define CONFIG_USB_XHCI
 #define CONFIG_USB_XHCI_EXYNOS
diff --git a/include/configs/peach-pit.h b/include/configs/peach-pit.h
index 6516a72..de12a9e 100644
--- a/include/configs/peach-pit.h
+++ b/include/configs/peach-pit.h
@@ -44,7 +44,6 @@
 
 #define CONFIG_POWER_TPS65090_EC
 #define CONFIG_CROS_EC_SPI		/* Support CROS_EC over SPI */
-#define CONFIG_DM_CROS_EC
 
 #define CONFIG_USB_XHCI
 #define CONFIG_USB_XHCI_EXYNOS
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index dfa2e07..26167a4 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -290,9 +290,5 @@
 #define CONFIG_OF_LIBFDT
 
 #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_DM
-#define CONFIG_CMD_DM
-#define CONFIG_DM_GPIO
-#define CONFIG_DM_SERIAL
 
 #endif	/* __CONFIG_H */
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index 982d0dc..a7eb33e 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -224,9 +224,5 @@
 #define CONFIG_OF_LIBFDT
 
 #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_DM
-#define CONFIG_CMD_DM
-#define CONFIG_DM_GPIO
-#define CONFIG_DM_SERIAL
 
 #endif	/* __CONFIG_H */
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 10/19] dm: x86: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (8 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 09/19] dm: exynos: Move " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-11 19:46   ` Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 11/19] dm: tegra: " Simon Glass
                   ` (8 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/x86/Kconfig             | 9 +++++++++
 include/configs/x86-common.h | 5 -----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 90e828a..1de0c91 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -43,6 +43,15 @@ config TARGET_CROWNBAY
 
 endchoice
 
+config DM
+	default y
+
+config DM_GPIO
+	default y
+
+config DM_SERIAL
+	default y
+
 config RAMBASE
 	hex
 	default 0x100000
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index ecedfc3..a2a70d0 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -22,11 +22,6 @@
 #define CONFIG_DISPLAY_BOARDINFO_LATE
 #define CONFIG_DISPLAY_CPUINFO
 
-#define CONFIG_DM
-#define CONFIG_CMD_DM
-#define CONFIG_DM_GPIO
-#define CONFIG_DM_SERIAL
-
 #define CONFIG_LMB
 #define CONFIG_OF_LIBFDT
 
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 11/19] dm: tegra: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (9 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 10/19] dm: x86: " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-11 19:46   ` Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 12/19] dm: at91: snapper: " Simon Glass
                   ` (7 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/cpu/armv7/tegra-common/Kconfig | 18 ++++++++++++++++++
 include/configs/tegra-common.h          | 10 ----------
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index 1446452..93dc732 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -20,6 +20,24 @@ endchoice
 config USE_PRIVATE_LIBGCC
 	default y if SPL_BUILD
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
+config DM_SPI
+	default y if !SPL_BUILD
+
+config DM_SPI_FLASH
+	default y if !SPL_BUILD
+
+config DM_I2C
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
 source "arch/arm/cpu/armv7/tegra20/Kconfig"
 source "arch/arm/cpu/armv7/tegra30/Kconfig"
 source "arch/arm/cpu/armv7/tegra114/Kconfig"
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 8f1e370..ef25980 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -18,16 +18,6 @@
 
 #include <asm/arch/tegra.h>		/* get chip and board defs */
 
-#define CONFIG_DM
-#define CONFIG_CMD_DM
-#define CONFIG_DM_GPIO
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_DM_SERIAL
-#endif
-#define CONFIG_DM_SPI
-#define CONFIG_DM_SPI_FLASH
-#define CONFIG_DM_I2C
-
 #define CONFIG_SYS_TIMER_RATE		1000000
 #define CONFIG_SYS_TIMER_COUNTER	NV_PA_TMRUS_BASE
 
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 12/19] dm: at91: snapper: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (10 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 11/19] dm: tegra: " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-09  3:43   ` Masahiro Yamada
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 13/19] dm: omap3: " Simon Glass
                   ` (6 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/include/asm/arch-at91/at91_pio.h | 12 ++++--------
 configs/snapper9260_defconfig             |  3 +++
 configs/snapper9g20_defconfig             |  3 +++
 include/configs/snapper9260.h             |  4 ----
 4 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/arch/arm/include/asm/arch-at91/at91_pio.h b/arch/arm/include/asm/arch-at91/at91_pio.h
index 50464ff..3012278 100644
--- a/arch/arm/include/asm/arch-at91/at91_pio.h
+++ b/arch/arm/include/asm/arch-at91/at91_pio.h
@@ -114,14 +114,10 @@ typedef union at91_pio {
 		at91_port_t	pioa;
 		at91_port_t	piob;
 		at91_port_t	pioc;
-	#if (ATMEL_PIO_PORTS > 3)
-		at91_port_t	piod;
-	#endif
-	#if (ATMEL_PIO_PORTS > 4)
-		at91_port_t	pioe;
-	#endif
-	} ;
-	at91_port_t port[ATMEL_PIO_PORTS];
+		at91_port_t	piod;	/* not present in all hardware */
+		at91_port_t	pioe;/* not present in all hardware */
+	};
+	at91_port_t port[5];
 } at91_pio_t;
 
 #ifdef CONFIG_AT91_GPIO
diff --git a/configs/snapper9260_defconfig b/configs/snapper9260_defconfig
index 7055e2a..035146c 100644
--- a/configs/snapper9260_defconfig
+++ b/configs/snapper9260_defconfig
@@ -1,3 +1,6 @@
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9260"
 CONFIG_ARM=y
 CONFIG_TARGET_SNAPPER9260=y
+CONFIG_DM=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_SERIAL=y
diff --git a/configs/snapper9g20_defconfig b/configs/snapper9g20_defconfig
index 2faae15..66c44cc 100644
--- a/configs/snapper9g20_defconfig
+++ b/configs/snapper9g20_defconfig
@@ -1,3 +1,6 @@
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20"
 CONFIG_ARM=y
 CONFIG_TARGET_SNAPPER9260=y
+CONFIG_DM=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_SERIAL=y
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 9fa644f..712f9b7 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -21,10 +21,6 @@
 #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000 /* External Crystal, in Hz */
 #define CONFIG_SYS_AT91_SLOW_CLOCK	32768
 #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_DM
-#define CONFIG_CMD_DM
-#define CONFIG_DM_GPIO
-#define CONFIG_DM_SERIAL
 #define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 
 /* CPU */
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 13/19] dm: omap3: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (11 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 12/19] dm: at91: snapper: " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-09  5:35   ` Masahiro Yamada
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 14/19] dm: sandbox: " Simon Glass
                   ` (5 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/cpu/armv7/omap3/Kconfig       |  9 +++++++++
 board/compulab/cm_t335/Kconfig         |  9 +++++++++
 board/gumstix/pepper/Kconfig           |  9 +++++++++
 board/isee/igep0033/Kconfig            |  9 +++++++++
 board/phytec/pcm051/Kconfig            |  9 +++++++++
 board/silica/pengwyn/Kconfig           |  9 +++++++++
 board/ti/am335x/Kconfig                | 10 ++++++++++
 configs/am3517_crane_defconfig         |  3 +++
 configs/am3517_evm_defconfig           |  3 +++
 configs/cm_t3517_defconfig             |  3 +++
 configs/cm_t35_defconfig               |  3 +++
 configs/devkit8000_defconfig           |  3 +++
 configs/dig297_defconfig               |  3 +++
 configs/eco5pk_defconfig               |  3 +++
 configs/mcx_defconfig                  |  3 +++
 configs/mt_ventoux_defconfig           |  3 +++
 configs/nokia_rx51_defconfig           |  3 +++
 configs/omap3_beagle_defconfig         |  3 +++
 configs/omap3_evm_defconfig            |  3 +++
 configs/omap3_evm_quick_mmc_defconfig  |  3 +++
 configs/omap3_evm_quick_nand_defconfig |  3 +++
 configs/omap3_ha_defconfig             |  3 +++
 configs/omap3_logic_defconfig          |  3 +++
 configs/omap3_mvblx_defconfig          |  3 +++
 configs/omap3_pandora_defconfig        |  3 +++
 configs/omap3_sdp3430_defconfig        |  3 +++
 configs/tao3530_defconfig              |  3 +++
 configs/tricorder_defconfig            |  3 +++
 configs/tricorder_flash_defconfig      |  3 +++
 configs/twister_defconfig              |  3 +++
 include/configs/nokia_rx51.h           |  1 +
 include/configs/ti_am335x_common.h     |  5 -----
 include/configs/ti_omap3_common.h      |  4 ----
 33 files changed, 134 insertions(+), 9 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index a029379..2fe3232 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -93,6 +93,15 @@ config TARGET_TWISTER
 
 endchoice
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if DM && !SPL_BUILD
+
+config DM_SERIAL
+	default y if DM && !SPL_BUILD
+
 config SYS_SOC
 	default "omap3"
 
diff --git a/board/compulab/cm_t335/Kconfig b/board/compulab/cm_t335/Kconfig
index 683efde..aadbfbc 100644
--- a/board/compulab/cm_t335/Kconfig
+++ b/board/compulab/cm_t335/Kconfig
@@ -12,4 +12,13 @@ config SYS_SOC
 config SYS_CONFIG_NAME
 	default "cm_t335"
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
 endif
diff --git a/board/gumstix/pepper/Kconfig b/board/gumstix/pepper/Kconfig
index 6f94612..3099a9e 100644
--- a/board/gumstix/pepper/Kconfig
+++ b/board/gumstix/pepper/Kconfig
@@ -12,4 +12,13 @@ config SYS_SOC
 config SYS_CONFIG_NAME
 	default "pepper"
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
 endif
diff --git a/board/isee/igep0033/Kconfig b/board/isee/igep0033/Kconfig
index e989e4b..2fe2ef1 100644
--- a/board/isee/igep0033/Kconfig
+++ b/board/isee/igep0033/Kconfig
@@ -12,4 +12,13 @@ config SYS_SOC
 config SYS_CONFIG_NAME
 	default "am335x_igep0033"
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
 endif
diff --git a/board/phytec/pcm051/Kconfig b/board/phytec/pcm051/Kconfig
index 2cc0d88..65094cf 100644
--- a/board/phytec/pcm051/Kconfig
+++ b/board/phytec/pcm051/Kconfig
@@ -12,4 +12,13 @@ config SYS_SOC
 config SYS_CONFIG_NAME
 	default "pcm051"
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
 endif
diff --git a/board/silica/pengwyn/Kconfig b/board/silica/pengwyn/Kconfig
index f2e1098..6ecda80 100644
--- a/board/silica/pengwyn/Kconfig
+++ b/board/silica/pengwyn/Kconfig
@@ -12,4 +12,13 @@ config SYS_SOC
 config SYS_CONFIG_NAME
 	default "pengwyn"
 
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if !SPL_BUILD
+
+config DM_SERIAL
+	default y if !SPL_BUILD
+
 endif
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index 1ddbb2c..d6581ac 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -37,4 +37,14 @@ config NOR_BOOT
 	  booted via NOR.  In this case we will enable certain pinmux early
 	  as the ROM only partially sets up pinmux.  We also default to using
 	  NOR for environment.
+
+config DM
+	default y if !SPL_BUILD
+
+config DM_GPIO
+	default y if DM && !SPL_BUILD
+
+config DM_SERIAL
+	default y if DM && !SPL_BUILD
+
 endif
diff --git a/configs/am3517_crane_defconfig b/configs/am3517_crane_defconfig
index cf9d8c7..33b63c7 100644
--- a/configs/am3517_crane_defconfig
+++ b/configs/am3517_crane_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_AM3517_CRANE=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index 2336f1e..7558b89 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_AM3517_EVM=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/cm_t3517_defconfig b/configs/cm_t3517_defconfig
index 4000d2c..6eb37c0 100644
--- a/configs/cm_t3517_defconfig
+++ b/configs/cm_t3517_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=n
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_CM_T3517=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/cm_t35_defconfig b/configs/cm_t35_defconfig
index 2bb616f..84a6fb0 100644
--- a/configs/cm_t35_defconfig
+++ b/configs/cm_t35_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_CM_T35=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/devkit8000_defconfig b/configs/devkit8000_defconfig
index 578ae74..05a8700 100644
--- a/configs/devkit8000_defconfig
+++ b/configs/devkit8000_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_DEVKIT8000=y
+CONFIG_DM=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_GPIO=y
diff --git a/configs/dig297_defconfig b/configs/dig297_defconfig
index 95bc353..0d18290 100644
--- a/configs/dig297_defconfig
+++ b/configs/dig297_defconfig
@@ -1,3 +1,6 @@
 CONFIG_ARM=y
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_DIG297=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/eco5pk_defconfig b/configs/eco5pk_defconfig
index e45bdad..e07df8b 100644
--- a/configs/eco5pk_defconfig
+++ b/configs/eco5pk_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_ECO5PK=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/mcx_defconfig b/configs/mcx_defconfig
index c2031f8..6566d40 100644
--- a/configs/mcx_defconfig
+++ b/configs/mcx_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_MCX=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/mt_ventoux_defconfig b/configs/mt_ventoux_defconfig
index a0678bb..a4747c6 100644
--- a/configs/mt_ventoux_defconfig
+++ b/configs/mt_ventoux_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_MT_VENTOUX=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index e03f586..20a51e1 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -1,3 +1,6 @@
 CONFIG_ARM=y
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_NOKIA_RX51=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig
index a3e4c2c..5a2d20b 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -3,3 +3,6 @@ CONFIG_SYS_EXTRA_OPTIONS="NAND"
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_OMAP3_BEAGLE=y
+CONFIG_DM=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_SERIAL=y
diff --git a/configs/omap3_evm_defconfig b/configs/omap3_evm_defconfig
index c749aa7..3bb1911 100644
--- a/configs/omap3_evm_defconfig
+++ b/configs/omap3_evm_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_OMAP3_EVM=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/omap3_evm_quick_mmc_defconfig b/configs/omap3_evm_quick_mmc_defconfig
index e89bb82..4e1471b 100644
--- a/configs/omap3_evm_quick_mmc_defconfig
+++ b/configs/omap3_evm_quick_mmc_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_OMAP3_EVM_QUICK_MMC=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/omap3_evm_quick_nand_defconfig b/configs/omap3_evm_quick_nand_defconfig
index e70fddd..f98672f 100644
--- a/configs/omap3_evm_quick_nand_defconfig
+++ b/configs/omap3_evm_quick_nand_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_OMAP3_EVM_QUICK_NAND=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/omap3_ha_defconfig b/configs/omap3_ha_defconfig
index 50bffa9..1a8b1b4 100644
--- a/configs/omap3_ha_defconfig
+++ b/configs/omap3_ha_defconfig
@@ -3,3 +3,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_BOARD_OMAP3_HA"
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_TAO3530=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index 5f2c063..790ccba 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -1,3 +1,6 @@
 CONFIG_ARM=y
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_OMAP3_LOGIC=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/omap3_mvblx_defconfig b/configs/omap3_mvblx_defconfig
index fb6edc2..b75f513 100644
--- a/configs/omap3_mvblx_defconfig
+++ b/configs/omap3_mvblx_defconfig
@@ -1,3 +1,6 @@
 CONFIG_ARM=y
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_OMAP3_MVBLX=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/omap3_pandora_defconfig b/configs/omap3_pandora_defconfig
index bf28537..dd0f17c 100644
--- a/configs/omap3_pandora_defconfig
+++ b/configs/omap3_pandora_defconfig
@@ -1,3 +1,6 @@
 CONFIG_ARM=y
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_OMAP3_PANDORA=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/omap3_sdp3430_defconfig b/configs/omap3_sdp3430_defconfig
index 1172c2a..b3a8745 100644
--- a/configs/omap3_sdp3430_defconfig
+++ b/configs/omap3_sdp3430_defconfig
@@ -1,3 +1,6 @@
 CONFIG_ARM=y
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_OMAP3_SDP3430=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/tao3530_defconfig b/configs/tao3530_defconfig
index a511389..39ed872 100644
--- a/configs/tao3530_defconfig
+++ b/configs/tao3530_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_TAO3530=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/tricorder_defconfig b/configs/tricorder_defconfig
index 7ea5e02..3efe829 100644
--- a/configs/tricorder_defconfig
+++ b/configs/tricorder_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_TRICORDER=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/tricorder_flash_defconfig b/configs/tricorder_flash_defconfig
index f6e1c46..8f999ff 100644
--- a/configs/tricorder_flash_defconfig
+++ b/configs/tricorder_flash_defconfig
@@ -3,3 +3,6 @@ CONFIG_SYS_EXTRA_OPTIONS="FLASHCARD"
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_TRICORDER=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/configs/twister_defconfig b/configs/twister_defconfig
index 9023736..d21a551 100644
--- a/configs/twister_defconfig
+++ b/configs/twister_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_OMAP34XX=y
 +S:CONFIG_TARGET_TWISTER=y
+CONFIG_DM=n
+CONFIG_DM_SERIAL=n
+CONFIG_DM_GPIO=n
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index 46fc91e..6e1f501 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -72,6 +72,7 @@
 #define CONFIG_UBI_SIZE			(512 << 10)
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + CONFIG_UBI_SIZE + \
 					(128 << 10))
+#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 
 /*
  * Hardware drivers
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index 35332b5..4ce9d49 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -20,11 +20,6 @@
 #define CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
 
 #ifndef CONFIG_SPL_BUILD
-#ifndef CONFIG_DM
-# define CONFIG_DM
-#endif
-# define CONFIG_DM_GPIO
-# define CONFIG_DM_SERIAL
 # define CONFIG_OMAP_SERIAL
 # define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 3c634ee..77211de 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -19,10 +19,6 @@
 #include <asm/arch/omap3.h>
 
 #ifndef CONFIG_SPL_BUILD
-# define CONFIG_DM
-# define CONFIG_CMD_DM
-# define CONFIG_DM_GPIO
-# define CONFIG_DM_SERIAL
 # define CONFIG_OMAP_SERIAL
 # define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 14/19] dm: sandbox: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (12 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 13/19] dm: omap3: " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-11 19:46   ` Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 15/19] dm: sunxi: " Simon Glass
                   ` (4 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/sandbox/Kconfig      | 24 ++++++++++++++++++++++++
 include/configs/sandbox.h | 11 -----------
 2 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig
index 3057325..2098b9c 100644
--- a/arch/sandbox/Kconfig
+++ b/arch/sandbox/Kconfig
@@ -10,4 +10,28 @@ config SYS_BOARD
 config SYS_CONFIG_NAME
 	default "sandbox"
 
+config DM
+	default y
+
+config DM_GPIO
+	default y
+
+config DM_SERIAL
+	default y
+
+config DM_CROS_EC
+	default y
+
+config DM_SPI
+	default y
+
+config DM_SPI_FLASH
+	default y
+
+config DM_I2C
+	default y
+
+config DM_TEST
+	default y
+
 endmenu
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index deff4d6..bff0170 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -23,14 +23,6 @@
 
 #define CONFIG_BOOTSTAGE
 #define CONFIG_BOOTSTAGE_REPORT
-#define CONFIG_CMD_DEMO
-#define CONFIG_DM_DEMO
-#define CONFIG_DM_DEMO_SIMPLE
-#define CONFIG_DM_DEMO_SHAPE
-#define CONFIG_DM_GPIO
-#define CONFIG_DM_TEST
-#define CONFIG_DM_SERIAL
-#define CONFIG_DM_CROS_EC
 
 #define CONFIG_SYS_STDIO_DEREGISTER
 
@@ -95,8 +87,6 @@
 #define CONFIG_CMD_SF_TEST
 #define CONFIG_CMD_SPI
 #define CONFIG_SPI_FLASH
-#define CONFIG_DM_SPI
-#define CONFIG_DM_SPI_FLASH
 #define CONFIG_SPI_FLASH_ATMEL
 #define CONFIG_SPI_FLASH_EON
 #define CONFIG_SPI_FLASH_GIGADEVICE
@@ -107,7 +97,6 @@
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_SPI_FLASH_WINBOND
 
-#define CONFIG_DM_I2C
 #define CONFIG_CMD_I2C
 #define CONFIG_SYS_I2C_SANDBOX
 #define CONFIG_I2C_EDID
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 15/19] dm: sunxi: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (13 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 14/19] dm: sandbox: " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-07  4:22   ` Ian Campbell
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 16/19] dm: mx6: " Simon Glass
                   ` (3 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 configs/Linksprite_pcDuino3_fdt_defconfig | 2 ++
 include/configs/sunxi-common.h            | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig b/configs/Linksprite_pcDuino3_fdt_defconfig
index 3b6dfa6..cfed375 100644
--- a/configs/Linksprite_pcDuino3_fdt_defconfig
+++ b/configs/Linksprite_pcDuino3_fdt_defconfig
@@ -2,6 +2,8 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-pcduino3.dtb"
 CONFIG_DM=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3"
 CONFIG_OF_CONTROL=y
 CONFIG_OF_SEPARATE=y
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index b5632d8..6930bf6 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -28,8 +28,6 @@
 #define CONFIG_SYS_TEXT_BASE		0x4a000000
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM)
-# define CONFIG_DM_GPIO
-# define CONFIG_DM_SERIAL
 # define CONFIG_DW_SERIAL
 # define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 16/19] dm: mx6: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (14 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 15/19] dm: sunxi: " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-11 19:47   ` Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 17/19] dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN " Simon Glass
                   ` (2 subsequent siblings)
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 configs/cm_fx6_defconfig | 3 +++
 include/configs/cm_fx6.h | 4 ----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 3c0d64f..d2ebf69 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -2,3 +2,6 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL,SPL"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_CM_FX6=y
+CONFIG_DM=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_SERIAL=y
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index f7277eb..0a4d93f 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -21,13 +21,9 @@
 #define CONFIG_MACH_TYPE		4273
 
 #ifndef CONFIG_SPL_BUILD
-#define CONFIG_DM
-#define CONFIG_CMD_DM
 
-#define CONFIG_DM_GPIO
 #define CONFIG_CMD_GPIO
 
-#define CONFIG_DM_SERIAL
 #define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #endif
 
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 17/19] dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (15 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 16/19] dm: mx6: " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-18 13:44   ` Alexey Brodkin
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs " Simon Glass
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 19/19] dm: Drop unused driver model config_defaults Simon Glass
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Move this option to Kconfig and update all boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Add CONFIG_SYS_MALLOC_F as well as CONFIG_SYS_MALLOC_F_LEN

 Kconfig                                   | 19 +++++++++++++++++++
 arch/arm/cpu/armv7/exynos/Kconfig         |  6 ++++++
 arch/arm/cpu/armv7/omap3/Kconfig          |  6 ++++++
 arch/arm/cpu/armv7/tegra-common/Kconfig   |  6 ++++++
 arch/arm/cpu/armv7/uniphier/Kconfig       |  6 ++++++
 arch/x86/Kconfig                          |  6 ++++++
 board/ti/am335x/Kconfig                   |  6 ++++++
 configs/Linksprite_pcDuino3_fdt_defconfig |  2 ++
 configs/am335x_igep0033_defconfig         |  2 ++
 configs/cm_fx6_defconfig                  |  2 ++
 configs/cm_t335_defconfig                 |  2 ++
 configs/gwventana_defconfig               |  2 ++
 configs/mx6dlsabreauto_defconfig          |  2 ++
 configs/mx6qsabreauto_defconfig           |  2 ++
 configs/mx6qsabresd_defconfig             |  2 ++
 configs/mx6sxsabresd_defconfig            |  2 ++
 configs/nokia_rx51_defconfig              |  2 ++
 configs/pcm051_rev1_defconfig             |  2 ++
 configs/pcm051_rev3_defconfig             |  2 ++
 configs/pengwyn_defconfig                 |  2 ++
 configs/pepper_defconfig                  |  2 ++
 configs/rpi_defconfig                     |  2 ++
 configs/s5p_goni_defconfig                |  2 ++
 configs/sandbox_defconfig                 |  2 ++
 configs/smdkc100_defconfig                |  2 ++
 configs/snapper9260_defconfig             |  2 ++
 configs/snapper9g20_defconfig             |  2 ++
 configs/stv0991_defconfig                 |  2 ++
 include/configs/cm_fx6.h                  |  3 ---
 include/configs/exynos-common.h           |  1 -
 include/configs/gw_ventana.h              |  1 -
 include/configs/mx6sabre_common.h         |  1 -
 include/configs/mx6sxsabresd.h            |  1 -
 include/configs/nokia_rx51.h              |  1 -
 include/configs/novena.h                  |  1 -
 include/configs/rpi.h                     |  1 -
 include/configs/s5p_goni.h                |  1 -
 include/configs/sandbox.h                 |  1 -
 include/configs/smdkc100.h                |  3 ---
 include/configs/snapper9260.h             |  1 -
 include/configs/stv0991.h                 |  1 -
 include/configs/sunxi-common.h            |  1 -
 include/configs/tegra-common.h            |  1 -
 include/configs/ti_am335x_common.h        |  1 -
 include/configs/ti_omap3_common.h         |  1 -
 include/configs/uniphier.h                |  2 --
 include/configs/x86-common.h              |  1 -
 47 files changed, 97 insertions(+), 24 deletions(-)

diff --git a/Kconfig b/Kconfig
index 8e31410..1951c19 100644
--- a/Kconfig
+++ b/Kconfig
@@ -56,6 +56,25 @@ config CC_OPTIMIZE_FOR_SIZE
 
 	  This option is enabled by default for U-Boot.
 
+config SYS_MALLOC_F
+	bool "Enable malloc() pool before relocation"
+	default 0x400
+	help
+	  Before relocation memory is very limited on many platforms. Still,
+	  we can provide a small malloc() pool if needed. Driver model in
+	  particular needs this to operate, so that it can allocate the
+	  initial serial device and any others that are needed.
+
+config SYS_MALLOC_F_LEN
+	hex "Size of malloc() pool before relocation"
+	depends on SYS_MALLOC_F
+	default 0x400
+	help
+	  Before relocation memory is very limited on many platforms. Still,
+	  we can provide a small malloc() pool if needed. Driver model in
+	  particular needs this to operate, so that it can allocate the
+	  initial serial device and any others that are needed.
+
 menuconfig EXPERT
         bool "Configure standard U-Boot features (expert users)"
         help
diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig
index 17ad567..2064efa 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -80,6 +80,12 @@ config DM_SPI_FLASH
 config DM_GPIO
 	default y if !SPL_BUILD
 
+config SYS_MALLOC_F
+	default y if !SPL_BUILD
+
+config SYS_MALLOC_F_LEN
+	default 0x400 if !SPL_BUILD
+
 source "board/samsung/smdkv310/Kconfig"
 source "board/samsung/trats/Kconfig"
 source "board/samsung/universal_c210/Kconfig"
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index 2fe3232..4644098 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -102,6 +102,12 @@ config DM_GPIO
 config DM_SERIAL
 	default y if DM && !SPL_BUILD
 
+config SYS_MALLOC_F
+	default y if DM && !SPL_BUILD
+
+config SYS_MALLOC_F_LEN
+	default 0x400 if DM && !SPL_BUILD
+
 config SYS_SOC
 	default "omap3"
 
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index 93dc732..ee32469 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -17,6 +17,12 @@ config TEGRA124
 
 endchoice
 
+config SYS_MALLOC_F
+	default y
+
+config SYS_MALLOC_F_LEN
+	default 0x1800
+
 config USE_PRIVATE_LIBGCC
 	default y if SPL_BUILD
 
diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig b/arch/arm/cpu/armv7/uniphier/Kconfig
index 0556e4b..4a38cbd 100644
--- a/arch/arm/cpu/armv7/uniphier/Kconfig
+++ b/arch/arm/cpu/armv7/uniphier/Kconfig
@@ -48,6 +48,12 @@ config DCC_MICRO_SUPPORT_CARD
 
 endchoice
 
+config SYS_MALLOC_F
+	default y
+
+config SYS_MALLOC_F_LEN
+	default 0x2000
+
 config CMD_PINMON
 	bool "Enable boot mode pins monitor command"
 	depends on !SPL_BUILD
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1de0c91..b6c5c5b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -52,6 +52,12 @@ config DM_GPIO
 config DM_SERIAL
 	default y
 
+config SYS_MALLOC_F
+	default y
+
+config SYS_MALLOC_F_LEN
+	default 0x800
+
 config RAMBASE
 	hex
 	default 0x100000
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index d6581ac..a20e0c1 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -47,4 +47,10 @@ config DM_GPIO
 config DM_SERIAL
 	default y if DM && !SPL_BUILD
 
+config SYS_MALLOC_F
+	default y if DM && !SPL_BUILD
+
+config SYS_MALLOC_F_LEN
+	default 0x400 if DM && !SPL_BUILD
+
 endif
diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig b/configs/Linksprite_pcDuino3_fdt_defconfig
index cfed375..1e749cd 100644
--- a/configs/Linksprite_pcDuino3_fdt_defconfig
+++ b/configs/Linksprite_pcDuino3_fdt_defconfig
@@ -13,3 +13,5 @@ CONFIG_OF_SEPARATE=y
 +S:CONFIG_DRAM_CLK=480
 +S:CONFIG_DRAM_ZQ=122
 +S:CONFIG_DRAM_EMR1=4
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/am335x_igep0033_defconfig b/configs/am335x_igep0033_defconfig
index 23f0a32..f3544b5 100644
--- a/configs/am335x_igep0033_defconfig
+++ b/configs/am335x_igep0033_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_AM335X_IGEP0033=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index d2ebf69..631698c 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -5,3 +5,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL,SPL"
 CONFIG_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig
index 5ff4f9c..5c1d3cf 100644
--- a/configs/cm_t335_defconfig
+++ b/configs/cm_t335_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_CM_T335=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig
index 4cddbdd..5b1a4c4 100644
--- a/configs/gwventana_defconfig
+++ b/configs/gwventana_defconfig
@@ -2,3 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_GW_VENTANA=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/mx6dlsabreauto_defconfig b/configs/mx6dlsabreauto_defconfig
index b649935..ccdfe31 100644
--- a/configs/mx6dlsabreauto_defconfig
+++ b/configs/mx6dlsabreauto_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6DL"
 CONFIG_ARM=y
 CONFIG_TARGET_MX6QSABREAUTO=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/mx6qsabreauto_defconfig b/configs/mx6qsabreauto_defconfig
index 7d86700..fe3d797 100644
--- a/configs/mx6qsabreauto_defconfig
+++ b/configs/mx6qsabreauto_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q"
 CONFIG_ARM=y
 CONFIG_TARGET_MX6QSABREAUTO=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig
index 67c1b77..09b0190 100644
--- a/configs/mx6qsabresd_defconfig
+++ b/configs/mx6qsabresd_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg,MX6Q"
 CONFIG_ARM=y
 CONFIG_TARGET_MX6SABRESD=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig
index f23d48f..72e0f10 100644
--- a/configs/mx6sxsabresd_defconfig
+++ b/configs/mx6sxsabresd_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,MX6SX"
 CONFIG_ARM=y
 CONFIG_TARGET_MX6SXSABRESD=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index 20a51e1..1bb7664 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -4,3 +4,5 @@ CONFIG_TARGET_NOKIA_RX51=y
 CONFIG_DM=n
 CONFIG_DM_SERIAL=n
 CONFIG_DM_GPIO=n
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig
index 8b27682..baa2b23 100644
--- a/configs/pcm051_rev1_defconfig
+++ b/configs/pcm051_rev1_defconfig
@@ -2,3 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="REV1"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_PCM051=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig
index 27ad6ff..b5c62a6 100644
--- a/configs/pcm051_rev3_defconfig
+++ b/configs/pcm051_rev3_defconfig
@@ -2,3 +2,5 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="REV3"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_PCM051=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/pengwyn_defconfig b/configs/pengwyn_defconfig
index 1b9aa68..cbdd404 100644
--- a/configs/pengwyn_defconfig
+++ b/configs/pengwyn_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_PENGWYN=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/pepper_defconfig b/configs/pepper_defconfig
index 22c7bb4..14266ef 100644
--- a/configs/pepper_defconfig
+++ b/configs/pepper_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_PEPPER=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index 9379cf0..98d3199 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -1,2 +1,4 @@
 CONFIG_ARM=y
 CONFIG_TARGET_RPI=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/s5p_goni_defconfig b/configs/s5p_goni_defconfig
index 618e590..33e6fb8 100644
--- a/configs/s5p_goni_defconfig
+++ b/configs/s5p_goni_defconfig
@@ -2,3 +2,5 @@ CONFIG_ARM=y
 CONFIG_ARCH_S5PC1XX=y
 CONFIG_TARGET_S5P_GONI=y
 CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-goni"
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 660063e..0bf5ea3 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -5,3 +5,5 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_DM=y
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/smdkc100_defconfig b/configs/smdkc100_defconfig
index 041030f..e933a32 100644
--- a/configs/smdkc100_defconfig
+++ b/configs/smdkc100_defconfig
@@ -2,3 +2,5 @@ CONFIG_ARM=y
 CONFIG_TARGET_SMDKC100=y
 CONFIG_ARCH_S5PC1XX=y
 CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-smdkc100"
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/snapper9260_defconfig b/configs/snapper9260_defconfig
index 035146c..97c49f3 100644
--- a/configs/snapper9260_defconfig
+++ b/configs/snapper9260_defconfig
@@ -4,3 +4,5 @@ CONFIG_TARGET_SNAPPER9260=y
 CONFIG_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/snapper9g20_defconfig b/configs/snapper9g20_defconfig
index 66c44cc..d5f1d9f 100644
--- a/configs/snapper9g20_defconfig
+++ b/configs/snapper9g20_defconfig
@@ -4,3 +4,5 @@ CONFIG_TARGET_SNAPPER9260=y
 CONFIG_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SERIAL=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/stv0991_defconfig b/configs/stv0991_defconfig
index a05e991..37b10ba 100644
--- a/configs/stv0991_defconfig
+++ b/configs/stv0991_defconfig
@@ -1,3 +1,5 @@
 CONFIG_SYS_EXTRA_OPTIONS="stv0991"
 CONFIG_ARM=y
 CONFIG_TARGET_STV0991=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 0a4d93f..94ef7ab 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -21,10 +21,7 @@
 #define CONFIG_MACH_TYPE		4273
 
 #ifndef CONFIG_SPL_BUILD
-
 #define CONFIG_CMD_GPIO
-
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #endif
 
 /* Display information on boot */
diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h
index 2c4f35a..59676ae 100644
--- a/include/configs/exynos-common.h
+++ b/include/configs/exynos-common.h
@@ -36,7 +36,6 @@
 #define CONFIG_ENV_OVERWRITE
 
 /* Size of malloc() pool before and after relocation */
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 << 20))
 
 /* select serial console configuration */
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 4f137fc..620f950 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -39,7 +39,6 @@
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 
 /* Init Functions */
 #define CONFIG_BOARD_EARLY_INIT_F
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index f0f721e..80e48d1 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -27,7 +27,6 @@
 
 #define CONFIG_DM
 #define CONFIG_DM_THERMAL
-#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #define CONFIG_IMX6_THERMAL
 
 #define CONFIG_SYS_GENERIC_BOARD
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index fbaae3f..2041c4b 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -224,7 +224,6 @@
 
 #define CONFIG_DM
 #define CONFIG_DM_THERMAL
-#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #define CONFIG_IMX6_THERMAL
 
 #define CONFIG_CMD_FUSE
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index 6e1f501..46fc91e 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -72,7 +72,6 @@
 #define CONFIG_UBI_SIZE			(512 << 10)
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + CONFIG_UBI_SIZE + \
 					(128 << 10))
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 
 /*
  * Hardware drivers
diff --git a/include/configs/novena.h b/include/configs/novena.h
index ea75d2c..074110c 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -116,7 +116,6 @@
 #define CONFIG_SYS_MEMTEST_END		0x20000000
 
 #define CONFIG_SYS_MALLOC_LEN		(64 * 1024 * 1024)
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 
 /* SPL */
 #define CONFIG_SPL_FAT_SUPPORT
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index ea19ad8..7ad8d08 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -46,7 +46,6 @@
 					 CONFIG_SYS_SDRAM_SIZE - \
 					 GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_MALLOC_LEN		SZ_4M
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #define CONFIG_SYS_MEMTEST_START	0x00100000
 #define CONFIG_SYS_MEMTEST_END		0x00200000
 #define CONFIG_LOADADDR			0x00200000
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 26167a4..8fadc68 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -40,7 +40,6 @@
 #define CONFIG_CMDLINE_EDITING
 
 /* Size of malloc() pool before and after relocation */
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 << 20))
 
 /*
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index bff0170..5c11650 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -60,7 +60,6 @@
 /*
  * Size of malloc() pool, before and after relocation
  */
-#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #define CONFIG_MALLOC_F_ADDR		0x0010000
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)	/* 32MB  */
 
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index a7eb33e..080fc3a 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -48,9 +48,6 @@
  */
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (1 << 20))
 
-/* Small malloc pool before relocation */
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
-
 /*
  * select serial console configuration
  */
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 712f9b7..6c68596 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -21,7 +21,6 @@
 #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000 /* External Crystal, in Hz */
 #define CONFIG_SYS_AT91_SLOW_CLOCK	32768
 #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 
 /* CPU */
 #define CONFIG_ARCH_CPU_INIT
diff --git a/include/configs/stv0991.h b/include/configs/stv0991.h
index fd9bd63..071b1c2 100644
--- a/include/configs/stv0991.h
+++ b/include/configs/stv0991.h
@@ -28,7 +28,6 @@
 	(PHYS_SDRAM_1_SIZE - CONFIG_ENV_SIZE)
 #define CONFIG_SYS_MAXARGS			16
 #define CONFIG_SYS_MALLOC_LEN			(CONFIG_ENV_SIZE + 16 * 1024)
-#define CONFIG_SYS_MALLOC_F_LEN			0x2000
 
 #define CONFIG_DM
 /* serial port (PL011) configuration */
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 6930bf6..8b15518 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -29,7 +29,6 @@
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM)
 # define CONFIG_DW_SERIAL
-# define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
 
 /*
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index ef25980..005fc6a 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -37,7 +37,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN		(4 << 20)	/* 4MB  */
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 
 #define CONFIG_SYS_NONCACHED_MEMORY	(1 << 20)       /* 1 MiB */
 
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index 4ce9d49..20a55f4 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -21,7 +21,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 # define CONFIG_OMAP_SERIAL
-# define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
 
 #include <asm/arch/omap.h>
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 77211de..840e108 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -20,7 +20,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 # define CONFIG_OMAP_SERIAL
-# define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
 
 /* The chip has SDRC controller */
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 8a7a20b..35b019d 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -80,8 +80,6 @@
 #define CONFIG_SMC911X_BASE		CONFIG_SUPPORT_CARD_ETHER_BASE
 #define CONFIG_SMC911X_32_BIT
 
-#define CONFIG_SYS_MALLOC_F_LEN  0x2000
-
 /*-----------------------------------------------------------------------
  * MMU and Cache Setting
  *----------------------------------------------------------------------*/
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index a2a70d0..ba132e9 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -188,7 +188,6 @@
 #define CONFIG_SYS_STACK_SIZE			(32 * 1024)
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MALLOC_LEN			0x200000
-#define CONFIG_SYS_MALLOC_F_LEN			(2 << 10)
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (16 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 17/19] dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  2015-02-06 23:36   ` Dinh Nguyen
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 19/19] dm: Drop unused driver model config_defaults Simon Glass
  18 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

Remove driver model CONFIGs from the board config headers and use Kconfig
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 configs/socfpga_socrates_defconfig | 3 +++
 include/configs/socfpga_common.h   | 7 -------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 0f3896d..888bbb6 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -3,3 +3,6 @@ CONFIG_SPL=y
 +S:CONFIG_TARGET_SOCFPGA_CYCLONE5=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
+CONFIG_DM=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 6b1f967..ee227fe 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -190,10 +190,6 @@ unsigned int cm_get_l4_sp_clk_hz(void);
  * QSPI support
  */
 #ifdef CONFIG_OF_CONTROL	/* QSPI is controlled via DT */
-#define CONFIG_CMD_DM
-#define CONFIG_DM
-#define CONFIG_DM_SPI
-#define CONFIG_DM_SPI_FLASH
 #define CONFIG_CADENCE_QSPI
 /* Enable multiple SPI NOR flash manufacturers */
 #define CONFIG_SPI_FLASH		/* SPI flash subsystem */
@@ -210,9 +206,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #endif
 
 #ifdef CONFIG_OF_CONTROL	/* DW SPI is controlled via DT */
-#define CONFIG_CMD_DM
-#define CONFIG_DM
-#define CONFIG_DM_SPI
 #define CONFIG_DESIGNWARE_SPI
 #define CONFIG_CMD_SPI
 #endif
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 19/19] dm: Drop unused driver model config_defaults
  2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
                   ` (17 preceding siblings ...)
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs " Simon Glass
@ 2015-02-06  4:41 ` Simon Glass
  18 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-06  4:41 UTC (permalink / raw)
  To: u-boot

These are now in Kconfig so we can drop them from the header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 include/config_defaults.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/include/config_defaults.h b/include/config_defaults.h
index fa99838..ad08c1d 100644
--- a/include/config_defaults.h
+++ b/include/config_defaults.h
@@ -20,16 +20,4 @@
 #define CONFIG_ZLIB 1
 #define CONFIG_PARTITIONS 1
 
-#ifndef CONFIG_SPL_BUILD
-#ifndef CONFIG_DM_WARN
-#define CONFIG_DM_WARN
-#endif
-#ifndef CONFIG_DM_DEVICE_REMOVE
-#define CONFIG_DM_DEVICE_REMOVE
-#endif
-#ifndef CONFIG_DM_STDIO
-#define CONFIG_DM_STDIO
-#endif
-#endif
-
 #endif
-- 
2.2.0.rc0.207.ga3a616c

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

* [U-Boot] [PATCH v2 01/19] dm: i2c: Add a dm_ prefix to driver model bus speed functions
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 01/19] dm: i2c: Add a dm_ prefix to driver model bus speed functions Simon Glass
@ 2015-02-06  7:12   ` Heiko Schocher
  2015-02-11 19:44     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Heiko Schocher @ 2015-02-06  7:12 UTC (permalink / raw)
  To: u-boot

Hello Simon,

Am 06.02.2015 05:41, schrieb Simon Glass:
> As with i2c_read() and i2c_write(), add a dm_ prefix to the driver model
> versions of these functions to avoid conflicts.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Use a dm_ prefix for remaining conflicting I2C functions
>
>   common/cmd_i2c.c         |  4 ++--
>   drivers/i2c/i2c-uclass.c | 11 +++--------
>   include/i2c.h            |  8 ++++----
>   test/dm/i2c.c            |  6 +++---
>   4 files changed, 12 insertions(+), 17 deletions(-)

Thanks!

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

bye,
Heiko
>
> diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
> index 7c3ad00..fe8f77a 100644
> --- a/common/cmd_i2c.c
> +++ b/common/cmd_i2c.c
> @@ -1730,7 +1730,7 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const
>   #endif
>   	if (argc == 1) {
>   #ifdef CONFIG_DM_I2C
> -		speed = i2c_get_bus_speed(bus);
> +		speed = dm_i2c_get_bus_speed(bus);
>   #else
>   		speed = i2c_get_bus_speed();
>   #endif
> @@ -1740,7 +1740,7 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const
>   		speed = simple_strtoul(argv[1], NULL, 10);
>   		printf("Setting bus speed to %d Hz\n", speed);
>   #ifdef CONFIG_DM_I2C
> -		ret = i2c_set_bus_speed(bus, speed);
> +		ret = dm_i2c_set_bus_speed(bus, speed);
>   #else
>   		ret = i2c_set_bus_speed(speed);
>   #endif
> diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
> index eafa457..a6991bf 100644
> --- a/drivers/i2c/i2c-uclass.c
> +++ b/drivers/i2c/i2c-uclass.c
> @@ -325,7 +325,7 @@ int dm_i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
>   	return ret;
>   }
>
> -int i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
> +int dm_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
>   {
>   	struct dm_i2c_ops *ops = i2c_get_ops(bus);
>   	struct dm_i2c_bus *i2c = bus->uclass_priv;
> @@ -346,12 +346,7 @@ int i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
>   	return 0;
>   }
>
> -/*
> - * i2c_get_bus_speed:
> - *
> - *  Returns speed of selected I2C bus in Hz
> - */
> -int i2c_get_bus_speed(struct udevice *bus)
> +int dm_i2c_get_bus_speed(struct udevice *bus)
>   {
>   	struct dm_i2c_ops *ops = i2c_get_ops(bus);
>   	struct dm_i2c_bus *i2c = bus->uclass_priv;
> @@ -440,7 +435,7 @@ static int i2c_post_probe(struct udevice *dev)
>   	i2c->speed_hz = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
>   				     "clock-frequency", 100000);
>
> -	return i2c_set_bus_speed(dev, i2c->speed_hz);
> +	return dm_i2c_set_bus_speed(dev, i2c->speed_hz);
>   }
>
>   static int i2c_post_bind(struct udevice *dev)
> diff --git a/include/i2c.h b/include/i2c.h
> index 27fe00f..1635e9a 100644
> --- a/include/i2c.h
> +++ b/include/i2c.h
> @@ -125,21 +125,21 @@ int dm_i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
>   		 struct udevice **devp);
>
>   /**
> - * i2c_set_bus_speed() - set the speed of a bus
> + * dm_i2c_set_bus_speed() - set the speed of a bus
>    *
>    * @bus:	Bus to adjust
>    * @speed:	Requested speed in Hz
>    * @return 0 if OK, -EINVAL for invalid values
>    */
> -int i2c_set_bus_speed(struct udevice *bus, unsigned int speed);
> +int dm_i2c_set_bus_speed(struct udevice *bus, unsigned int speed);
>
>   /**
> - * i2c_get_bus_speed() - get the speed of a bus
> + * dm_i2c_get_bus_speed() - get the speed of a bus
>    *
>    * @bus:	Bus to check
>    * @return speed of selected I2C bus in Hz, -ve on error
>    */
> -int i2c_get_bus_speed(struct udevice *bus);
> +int dm_i2c_get_bus_speed(struct udevice *bus);
>
>   /**
>    * i2c_set_chip_flags() - set flags for a chip
> diff --git a/test/dm/i2c.c b/test/dm/i2c.c
> index ef88372..541b73b 100644
> --- a/test/dm/i2c.c
> +++ b/test/dm/i2c.c
> @@ -67,10 +67,10 @@ static int dm_test_i2c_speed(struct dm_test_state *dms)
>
>   	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
>   	ut_assertok(i2c_get_chip(bus, chip, 1, &dev));
> -	ut_assertok(i2c_set_bus_speed(bus, 100000));
> +	ut_assertok(dm_i2c_set_bus_speed(bus, 100000));
>   	ut_assertok(dm_i2c_read(dev, 0, buf, 5));
> -	ut_assertok(i2c_set_bus_speed(bus, 400000));
> -	ut_asserteq(400000, i2c_get_bus_speed(bus));
> +	ut_assertok(dm_i2c_set_bus_speed(bus, 400000));
> +	ut_asserteq(400000, dm_i2c_get_bus_speed(bus));
>   	ut_assertok(dm_i2c_read(dev, 0, buf, 5));
>   	ut_asserteq(-EINVAL, dm_i2c_write(dev, 0, buf, 5));
>
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH v2 02/19] dm: i2c: Make API accessible even without CONFIG_DM
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 02/19] dm: i2c: Make API accessible even without CONFIG_DM Simon Glass
@ 2015-02-06  7:15   ` Heiko Schocher
  2015-02-11 19:45     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Heiko Schocher @ 2015-02-06  7:15 UTC (permalink / raw)
  To: u-boot

Hello Simon,

Am 06.02.2015 05:41, schrieb Simon Glass:
> Make the driver model I2C API available always, even if driver model
> is not enabled. This allows for a 'soft' switch-over, where drivers can
> use the new structures in code which is compiled but not yet used. This
> makes migration easier in some cases.
>
> Fix up the existing drivers which define their own 'struct i2c_msg'.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Add a patch to squash use of 'struct i2c_msg' in drivers
>
>   drivers/i2c/adi_i2c.c  |  6 +++---
>   drivers/i2c/kona_i2c.c | 16 ++++++++--------
>   drivers/i2c/mv_i2c.c   | 10 +++++-----
>   include/i2c.h          |  5 +----
>   4 files changed, 17 insertions(+), 20 deletions(-)

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

bye,
Heiko
>
> diff --git a/drivers/i2c/adi_i2c.c b/drivers/i2c/adi_i2c.c
> index 20495b1..c58f14a 100644
> --- a/drivers/i2c/adi_i2c.c
> +++ b/drivers/i2c/adi_i2c.c
> @@ -63,7 +63,7 @@ struct twi_regs {
>   #endif
>
>   /* All transfers are described by this data structure */
> -struct i2c_msg {
> +struct adi_i2c_msg {
>   	u8 flags;
>   #define I2C_M_COMBO		0x4
>   #define I2C_M_STOP		0x2
> @@ -81,7 +81,7 @@ struct i2c_msg {
>    * wait_for_completion - manage the actual i2c transfer
>    *	@msg: the i2c msg
>    */
> -static int wait_for_completion(struct twi_regs *twi, struct i2c_msg *msg)
> +static int wait_for_completion(struct twi_regs *twi, struct adi_i2c_msg *msg)
>   {
>   	u16 int_stat, ctl;
>   	ulong timebase = get_timer(0);
> @@ -151,7 +151,7 @@ static int i2c_transfer(struct i2c_adapter *adap, uint8_t chip, uint addr,
>   		(addr >>  8),
>   		(addr >> 16),
>   	};
> -	struct i2c_msg msg = {
> +	struct adi_i2c_msg msg = {
>   		.flags = flags | (len >= 0xff ? I2C_M_STOP : 0),
>   		.buf   = buffer,
>   		.len   = len,
> diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
> index 5eab338..9af496b 100644
> --- a/drivers/i2c/kona_i2c.c
> +++ b/drivers/i2c/kona_i2c.c
> @@ -156,7 +156,7 @@ static struct bcm_kona_i2c_dev g_i2c_devs[CONFIG_SYS_MAX_I2C_BUS] = {
>   #define I2C_M_RD	0x0001	/* read data */
>   #define I2C_M_NOSTART	0x4000	/* no restart between msgs */
>
> -struct i2c_msg {
> +struct kona_i2c_msg {
>   	uint16_t addr;
>   	uint16_t flags;
>   	uint16_t len;
> @@ -297,7 +297,7 @@ static int bcm_kona_i2c_read_fifo_single(struct bcm_kona_i2c_dev *dev,
>
>   /* Read any amount of data using the RX FIFO from the i2c bus */
>   static int bcm_kona_i2c_read_fifo(struct bcm_kona_i2c_dev *dev,
> -				  struct i2c_msg *msg)
> +				  struct kona_i2c_msg *msg)
>   {
>   	unsigned int bytes_to_read = MAX_RX_FIFO_SIZE;
>   	unsigned int last_byte_nak = 0;
> @@ -392,7 +392,7 @@ static int bcm_kona_i2c_write_fifo_single(struct bcm_kona_i2c_dev *dev,
>
>   /* Write any amount of data using TX FIFO to the i2c bus */
>   static int bcm_kona_i2c_write_fifo(struct bcm_kona_i2c_dev *dev,
> -				   struct i2c_msg *msg)
> +				   struct kona_i2c_msg *msg)
>   {
>   	unsigned int bytes_to_write = MAX_TX_FIFO_SIZE;
>   	unsigned int bytes_written = 0;
> @@ -418,7 +418,7 @@ static int bcm_kona_i2c_write_fifo(struct bcm_kona_i2c_dev *dev,
>
>   /* Send i2c address */
>   static int bcm_kona_i2c_do_addr(struct bcm_kona_i2c_dev *dev,
> -				struct i2c_msg *msg)
> +				struct kona_i2c_msg *msg)
>   {
>   	unsigned char addr;
>
> @@ -480,9 +480,9 @@ static void bcm_kona_i2c_config_timing(struct bcm_kona_i2c_dev *dev)
>
>   /* Master transfer function */
>   static int bcm_kona_i2c_xfer(struct bcm_kona_i2c_dev *dev,
> -			     struct i2c_msg msgs[], int num)
> +			     struct kona_i2c_msg msgs[], int num)
>   {
> -	struct i2c_msg *pmsg;
> +	struct kona_i2c_msg *pmsg;
>   	int rc = 0;
>   	int i;
>
> @@ -635,7 +635,7 @@ static int kona_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
>   			 int alen, uchar *buffer, int len)
>   {
>   	/* msg[0] writes the addr, msg[1] reads the data */
> -	struct i2c_msg msg[2];
> +	struct kona_i2c_msg msg[2];
>   	unsigned char msgbuf0[64];
>   	struct bcm_kona_i2c_dev *dev = kona_get_dev(adap);
>
> @@ -663,7 +663,7 @@ static int kona_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
>   static int kona_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
>   			  int alen, uchar *buffer, int len)
>   {
> -	struct i2c_msg msg[1];
> +	struct kona_i2c_msg msg[1];
>   	unsigned char msgbuf0[64];
>   	unsigned int i;
>   	struct bcm_kona_i2c_dev *dev = kona_get_dev(adap);
> diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
> index dac3463..e65cce0 100644
> --- a/drivers/i2c/mv_i2c.c
> +++ b/drivers/i2c/mv_i2c.c
> @@ -31,7 +31,7 @@
>   #endif
>
>   /* All transfers are described by this data structure */
> -struct i2c_msg {
> +struct mv_i2c_msg {
>   	u8 condition;
>   	u8 acknack;
>   	u8 direction;
> @@ -157,7 +157,7 @@ static int i2c_isr_set_cleared(unsigned long set_mask,
>    *          -5: illegal parameters
>    *          -6: bus is busy and couldn't be aquired
>    */
> -int i2c_transfer(struct i2c_msg *msg)
> +int i2c_transfer(struct mv_i2c_msg *msg)
>   {
>   	int ret;
>
> @@ -286,7 +286,7 @@ void i2c_init(int speed, int slaveaddr)
>    */
>   int i2c_probe(uchar chip)
>   {
> -	struct i2c_msg msg;
> +	struct mv_i2c_msg msg;
>
>   	i2c_reset();
>
> @@ -322,7 +322,7 @@ int i2c_probe(uchar chip)
>    */
>   int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
>   {
> -	struct i2c_msg msg;
> +	struct mv_i2c_msg msg;
>   	u8 addr_bytes[3]; /* lowest...highest byte of data address */
>
>   	PRINTD(("i2c_read(chip=0x%02x, addr=0x%02x, alen=0x%02x, "
> @@ -410,7 +410,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
>    */
>   int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
>   {
> -	struct i2c_msg msg;
> +	struct mv_i2c_msg msg;
>   	u8 addr_bytes[3]; /* lowest...highest byte of data address */
>
>   	PRINTD(("i2c_write(chip=0x%02x, addr=0x%02x, alen=0x%02x, "
> diff --git a/include/i2c.h b/include/i2c.h
> index 1635e9a..31b0389 100644
> --- a/include/i2c.h
> +++ b/include/i2c.h
> @@ -25,14 +25,13 @@
>    * enough as to be incompatible for compilation purposes.
>    */
>
> -#ifdef CONFIG_DM_I2C
> -
>   enum dm_i2c_chip_flags {
>   	DM_I2C_CHIP_10BIT	= 1 << 0, /* Use 10-bit addressing */
>   	DM_I2C_CHIP_RD_ADDRESS	= 1 << 1, /* Send address for each read byte */
>   	DM_I2C_CHIP_WR_ADDRESS	= 1 << 2, /* Send address for each write byte */
>   };
>
> +struct udevice;
>   /**
>    * struct dm_i2c_chip - information about an i2c chip
>    *
> @@ -439,8 +438,6 @@ int i2c_get_chip_for_busnum(int busnum, int chip_addr, uint offset_len,
>   int i2c_chip_ofdata_to_platdata(const void *blob, int node,
>   				struct dm_i2c_chip *chip);
>
> -#endif
> -
>   #ifndef CONFIG_DM_I2C
>
>   /*
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs " Simon Glass
@ 2015-02-06 23:36   ` Dinh Nguyen
  2015-02-07  0:11     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Dinh Nguyen @ 2015-02-06 23:36 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On 02/05/2015 10:41 PM, Simon Glass wrote:
> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2: None
> 
>  configs/socfpga_socrates_defconfig | 3 +++
>  include/configs/socfpga_common.h   | 7 -------
>  2 files changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
> index 0f3896d..888bbb6 100644
> --- a/configs/socfpga_socrates_defconfig
> +++ b/configs/socfpga_socrates_defconfig
> @@ -3,3 +3,6 @@ CONFIG_SPL=y
>  +S:CONFIG_TARGET_SOCFPGA_CYCLONE5=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
> +CONFIG_DM=y
> +CONFIG_DM_SPI=y
> +CONFIG_DM_SPI_FLASH=y

Would you need to also update socfpga_cyclone5_defconfig or is that not
needed?

Thanks,
Dinh

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

* [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs to Kconfig
  2015-02-06 23:36   ` Dinh Nguyen
@ 2015-02-07  0:11     ` Simon Glass
  2015-02-09  7:29       ` Stefan Roese
  0 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-07  0:11 UTC (permalink / raw)
  To: u-boot

Hi Dinh,

On 6 February 2015 at 16:36, Dinh Nguyen <dinguyen@opensource.altera.com> wrote:
> Hi Simon,
>
> On 02/05/2015 10:41 PM, Simon Glass wrote:
>> Remove driver model CONFIGs from the board config headers and use Kconfig
>> instead.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2: None
>>
>>  configs/socfpga_socrates_defconfig | 3 +++
>>  include/configs/socfpga_common.h   | 7 -------
>>  2 files changed, 3 insertions(+), 7 deletions(-)
>>
>> diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
>> index 0f3896d..888bbb6 100644
>> --- a/configs/socfpga_socrates_defconfig
>> +++ b/configs/socfpga_socrates_defconfig
>> @@ -3,3 +3,6 @@ CONFIG_SPL=y
>>  +S:CONFIG_TARGET_SOCFPGA_CYCLONE5=y
>>  CONFIG_OF_CONTROL=y
>>  CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
>> +CONFIG_DM=y
>> +CONFIG_DM_SPI=y
>> +CONFIG_DM_SPI_FLASH=y
>
> Would you need to also update socfpga_cyclone5_defconfig or is that not
> needed?

From what I can tell it does not use driver model yet (it doesn't
define CONFIG_OF_CONTROL either).

Regards,
Simon

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

* [U-Boot] [PATCH v2 15/19] dm: sunxi: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 15/19] dm: sunxi: " Simon Glass
@ 2015-02-07  4:22   ` Ian Campbell
  2015-02-07 15:12     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Ian Campbell @ 2015-02-07  4:22 UTC (permalink / raw)
  To: u-boot

On Thu, 2015-02-05 at 21:41 -0700, Simon Glass wrote:
> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

I assume you'll take this via the dm tree along with the rest of the
series.

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

* [U-Boot] [PATCH v2 15/19] dm: sunxi: Move driver model CONFIGs to Kconfig
  2015-02-07  4:22   ` Ian Campbell
@ 2015-02-07 15:12     ` Simon Glass
  2015-02-11 19:46       ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-07 15:12 UTC (permalink / raw)
  To: u-boot

On 6 February 2015 at 21:22, Ian Campbell <ijc@hellion.org.uk> wrote:
> On Thu, 2015-02-05 at 21:41 -0700, Simon Glass wrote:
>> Remove driver model CONFIGs from the board config headers and use Kconfig
>> instead.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
>
> I assume you'll take this via the dm tree along with the rest of the
> series.

Thanks - yes, but will give it a few days to wait for more comments.

Regards,
Simon

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

* [U-Boot] [PATCH v2 12/19] dm: at91: snapper: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 12/19] dm: at91: snapper: " Simon Glass
@ 2015-02-09  3:43   ` Masahiro Yamada
  2015-02-10  5:04     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Masahiro Yamada @ 2015-02-09  3:43 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Thu,  5 Feb 2015 21:41:43 -0700
Simon Glass <sjg@chromium.org> wrote:

> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/include/asm/arch-at91/at91_pio.h | 12 ++++--------
>  configs/snapper9260_defconfig             |  3 +++
>  configs/snapper9g20_defconfig             |  3 +++
>  include/configs/snapper9260.h             |  4 ----
>  4 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/include/asm/arch-at91/at91_pio.h b/arch/arm/include/asm/arch-at91/at91_pio.h
> index 50464ff..3012278 100644
> --- a/arch/arm/include/asm/arch-at91/at91_pio.h
> +++ b/arch/arm/include/asm/arch-at91/at91_pio.h
> @@ -114,14 +114,10 @@ typedef union at91_pio {
>  		at91_port_t	pioa;
>  		at91_port_t	piob;
>  		at91_port_t	pioc;
> -	#if (ATMEL_PIO_PORTS > 3)
> -		at91_port_t	piod;
> -	#endif
> -	#if (ATMEL_PIO_PORTS > 4)
> -		at91_port_t	pioe;
> -	#endif
> -	} ;
> -	at91_port_t port[ATMEL_PIO_PORTS];
> +		at91_port_t	piod;	/* not present in all hardware */
> +		at91_port_t	pioe;/* not present in all hardware */
> +	};
> +	at91_port_t port[5];
>  } at91_pio_t;
>  
>  #ifdef CONFIG_AT91_GPIO


I could not understand why this change is
related to "Move driver model CONFIGs to Kconfig".

Nothing's mentioned about this change in your commit description.


Perhaps, split into two patches?



Best Regards
Masahiro Yamada

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

* [U-Boot] [PATCH v2 04/19] dm: Expand and complete Kconfig in drivers/
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 04/19] dm: Expand and complete Kconfig in drivers/ Simon Glass
@ 2015-02-09  3:46   ` Masahiro Yamada
  2015-02-11 19:45     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Masahiro Yamada @ 2015-02-09  3:46 UTC (permalink / raw)
  To: u-boot

Hi Simon,


On Thu,  5 Feb 2015 21:41:35 -0700
Simon Glass <sjg@chromium.org> wrote:

> Expand the help messages for each driver. Add missing Kconfig for I2C,
> SPI flash and thermal.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2:
> - Move subsystem Kconfigs out of drivers/core
> - Split out patch to expand/complete Kconfig in drivers/



We can remove the duplicated description from the top-level README.

Please update this patch or send a follow-up patch later.
Either will do.

Assuming you can do that,

Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

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

* [U-Boot] [PATCH v2 03/19] dm: Add Kconfig for driver/demo
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 03/19] dm: Add Kconfig for driver/demo Simon Glass
@ 2015-02-09  3:51   ` Masahiro Yamada
  2015-02-11 19:45     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Masahiro Yamada @ 2015-02-09  3:51 UTC (permalink / raw)
  To: u-boot


On Thu,  5 Feb 2015 21:41:34 -0700
Simon Glass <sjg@chromium.org> wrote:

> Add a suitable Kconfig for this directory.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2:
> - Split out patch to add Kconfig for driver/demo


Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

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

* [U-Boot] [PATCH v2 06/19] dm: test: Add a Kconfig file
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 06/19] dm: test: Add a Kconfig file Simon Glass
@ 2015-02-09  3:51   ` Masahiro Yamada
  2015-02-11 19:45     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Masahiro Yamada @ 2015-02-09  3:51 UTC (permalink / raw)
  To: u-boot


On Thu,  5 Feb 2015 21:41:37 -0700
Simon Glass <sjg@chromium.org> wrote:

> Add a file to control driver model test features.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2:
> - Split out patch to add a Kconfig file for test/

Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

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

* [U-Boot] [PATCH v2 07/19] dm: Add CMD_DM and CMD_DEMO to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 07/19] dm: Add CMD_DM and CMD_DEMO to Kconfig Simon Glass
@ 2015-02-09  4:10   ` Masahiro Yamada
  2015-02-11 19:45     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Masahiro Yamada @ 2015-02-09  4:10 UTC (permalink / raw)
  To: u-boot


On Thu,  5 Feb 2015 21:41:38 -0700
Simon Glass <sjg@chromium.org> wrote:

> Add Kconfig settings for these two options.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2:
> - Fix 'procides' typo
> - Split out patch to add CMD_DM and CMD_DEMO to Kconfig


I still doubt if these two commands are "Device access commands"
because they just manipulate memory data
instead of getting access to real hardware devices.

But, it might not be a big deal.
Now we are more focusing on moving CONFIGs to Kconfig, so


Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

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

* [U-Boot] [PATCH v2 13/19] dm: omap3: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 13/19] dm: omap3: " Simon Glass
@ 2015-02-09  5:35   ` Masahiro Yamada
  2015-02-10  5:04     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Masahiro Yamada @ 2015-02-09  5:35 UTC (permalink / raw)
  To: u-boot

Hi Simon,


On Thu,  5 Feb 2015 21:41:44 -0700
Simon Glass <sjg@chromium.org> wrote:

> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/cpu/armv7/omap3/Kconfig       |  9 +++++++++
>  board/compulab/cm_t335/Kconfig         |  9 +++++++++
>  board/gumstix/pepper/Kconfig           |  9 +++++++++
>  board/isee/igep0033/Kconfig            |  9 +++++++++
>  board/phytec/pcm051/Kconfig            |  9 +++++++++
>  board/silica/pengwyn/Kconfig           |  9 +++++++++
>  board/ti/am335x/Kconfig                | 10 ++++++++++
>  configs/am3517_crane_defconfig         |  3 +++
>  configs/am3517_evm_defconfig           |  3 +++
>  configs/cm_t3517_defconfig             |  3 +++
>  configs/cm_t35_defconfig               |  3 +++
>  configs/devkit8000_defconfig           |  3 +++
>  configs/dig297_defconfig               |  3 +++
>  configs/eco5pk_defconfig               |  3 +++
>  configs/mcx_defconfig                  |  3 +++
>  configs/mt_ventoux_defconfig           |  3 +++
>  configs/nokia_rx51_defconfig           |  3 +++
>  configs/omap3_beagle_defconfig         |  3 +++
>  configs/omap3_evm_defconfig            |  3 +++
>  configs/omap3_evm_quick_mmc_defconfig  |  3 +++
>  configs/omap3_evm_quick_nand_defconfig |  3 +++
>  configs/omap3_ha_defconfig             |  3 +++
>  configs/omap3_logic_defconfig          |  3 +++
>  configs/omap3_mvblx_defconfig          |  3 +++
>  configs/omap3_pandora_defconfig        |  3 +++
>  configs/omap3_sdp3430_defconfig        |  3 +++
>  configs/tao3530_defconfig              |  3 +++
>  configs/tricorder_defconfig            |  3 +++
>  configs/tricorder_flash_defconfig      |  3 +++
>  configs/twister_defconfig              |  3 +++
>  include/configs/nokia_rx51.h           |  1 +
>  include/configs/ti_am335x_common.h     |  5 -----
>  include/configs/ti_omap3_common.h      |  4 ----
>  33 files changed, 134 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
> index a029379..2fe3232 100644
> --- a/arch/arm/cpu/armv7/omap3/Kconfig
> +++ b/arch/arm/cpu/armv7/omap3/Kconfig
> @@ -93,6 +93,15 @@ config TARGET_TWISTER
>  
>  endchoice
>  
> +config DM
> +	default y if !SPL_BUILD
> +
> +config DM_GPIO
> +	default y if DM && !SPL_BUILD
> +
> +config DM_SERIAL
> +	default y if DM && !SPL_BUILD
> +
>  config SYS_SOC
>  	default "omap3"
>  

I realized a problem when I looked at this patch.

In order to put the default values into board-Kconfig files,
we have to describe the "if ..." part correctly.
(otherwise, the dependencies between CONFIGs get broken.)

We had already added the same dependencies in the common parts:

config DM
        bool "Enable Driver Model"
        depends on !SPL_BUILD


config DM_SERIAL
        bool "Enable Driver Model for serial drivers"
        depends on DM



Now, we are duplicating the same dependencies in each board-Kconfig.
This is not nice.

I am very sorry, I have misguided you.
(What is worse, I can not suggest a good idea to solve this problem.)


Best Regards
Masahiro Yamada

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

* [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs to Kconfig
  2015-02-07  0:11     ` Simon Glass
@ 2015-02-09  7:29       ` Stefan Roese
  2015-02-09 16:45         ` Dinh Nguyen
  0 siblings, 1 reply; 55+ messages in thread
From: Stefan Roese @ 2015-02-09  7:29 UTC (permalink / raw)
  To: u-boot

Hi,

(added Marek to Cc)

On 07.02.2015 01:11, Simon Glass wrote:
> Hi Dinh,
>
> On 6 February 2015 at 16:36, Dinh Nguyen <dinguyen@opensource.altera.com> wrote:
>> Hi Simon,
>>
>> On 02/05/2015 10:41 PM, Simon Glass wrote:
>>> Remove driver model CONFIGs from the board config headers and use Kconfig
>>> instead.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>> ---
>>>
>>> Changes in v2: None
>>>
>>>   configs/socfpga_socrates_defconfig | 3 +++
>>>   include/configs/socfpga_common.h   | 7 -------
>>>   2 files changed, 3 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
>>> index 0f3896d..888bbb6 100644
>>> --- a/configs/socfpga_socrates_defconfig
>>> +++ b/configs/socfpga_socrates_defconfig
>>> @@ -3,3 +3,6 @@ CONFIG_SPL=y
>>>   +S:CONFIG_TARGET_SOCFPGA_CYCLONE5=y
>>>   CONFIG_OF_CONTROL=y
>>>   CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
>>> +CONFIG_DM=y
>>> +CONFIG_DM_SPI=y
>>> +CONFIG_DM_SPI_FLASH=y
>>
>> Would you need to also update socfpga_cyclone5_defconfig or is that not
>> needed?
>
>  From what I can tell it does not use driver model yet (it doesn't
> define CONFIG_OF_CONTROL either).

socrates was the first SoCFPGA board to use DT and DM. IIRC, Marek has a 
patch series queued to move the other SoCFPGA boards over to DT based 
probing (with DM enabled) as well.

Thanks,
Stefan

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

* [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs to Kconfig
  2015-02-09  7:29       ` Stefan Roese
@ 2015-02-09 16:45         ` Dinh Nguyen
  2015-02-09 17:04           ` Marek Vasut
  0 siblings, 1 reply; 55+ messages in thread
From: Dinh Nguyen @ 2015-02-09 16:45 UTC (permalink / raw)
  To: u-boot

On 02/09/2015 01:29 AM, Stefan Roese wrote:
> Hi,
> 
> (added Marek to Cc)
> 
> On 07.02.2015 01:11, Simon Glass wrote:
>> Hi Dinh,
>>
>> On 6 February 2015 at 16:36, Dinh Nguyen
>> <dinguyen@opensource.altera.com> wrote:
>>> Hi Simon,
>>>
>>> On 02/05/2015 10:41 PM, Simon Glass wrote:
>>>> Remove driver model CONFIGs from the board config headers and use
>>>> Kconfig
>>>> instead.
>>>>
>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>>> ---
>>>>
>>>> Changes in v2: None
>>>>
>>>>   configs/socfpga_socrates_defconfig | 3 +++
>>>>   include/configs/socfpga_common.h   | 7 -------
>>>>   2 files changed, 3 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/configs/socfpga_socrates_defconfig
>>>> b/configs/socfpga_socrates_defconfig
>>>> index 0f3896d..888bbb6 100644
>>>> --- a/configs/socfpga_socrates_defconfig
>>>> +++ b/configs/socfpga_socrates_defconfig
>>>> @@ -3,3 +3,6 @@ CONFIG_SPL=y
>>>>   +S:CONFIG_TARGET_SOCFPGA_CYCLONE5=y
>>>>   CONFIG_OF_CONTROL=y
>>>>   CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
>>>> +CONFIG_DM=y
>>>> +CONFIG_DM_SPI=y
>>>> +CONFIG_DM_SPI_FLASH=y
>>>
>>> Would you need to also update socfpga_cyclone5_defconfig or is that not
>>> needed?
>>
>>  From what I can tell it does not use driver model yet (it doesn't
>> define CONFIG_OF_CONTROL either).
> 
> socrates was the first SoCFPGA board to use DT and DM. IIRC, Marek has a
> patch series queued to move the other SoCFPGA boards over to DT based
> probing (with DM enabled) as well.
> 

Ah ok, thanks for the clarification.

Dinh

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

* [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs to Kconfig
  2015-02-09 16:45         ` Dinh Nguyen
@ 2015-02-09 17:04           ` Marek Vasut
  2015-02-11 19:47             ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Marek Vasut @ 2015-02-09 17:04 UTC (permalink / raw)
  To: u-boot

On Monday, February 09, 2015 at 05:45:37 PM, Dinh Nguyen wrote:
> On 02/09/2015 01:29 AM, Stefan Roese wrote:
> > Hi,
> > 
> > (added Marek to Cc)

[...]

> >>> Would you need to also update socfpga_cyclone5_defconfig or is that not
> >>> needed?
> >>> 
> >>  From what I can tell it does not use driver model yet (it doesn't
> >> 
> >> define CONFIG_OF_CONTROL either).
> > 
> > socrates was the first SoCFPGA board to use DT and DM. IIRC, Marek has a
> > patch series queued to move the other SoCFPGA boards over to DT based
> > probing (with DM enabled) as well.
> 
> Ah ok, thanks for the clarification.

Hi!

it's only DT, not DM. It's the Arria V patchset I sent out that Stefan is
referring to. I'll address his comment this week and will repost then.

In case you want to base on top of that patchset, it's in the u-boot-socfpga
repository, branch "topic/vip-arriav" .

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH v2 13/19] dm: omap3: Move driver model CONFIGs to Kconfig
  2015-02-09  5:35   ` Masahiro Yamada
@ 2015-02-10  5:04     ` Simon Glass
  2015-02-11 19:46       ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Simon Glass @ 2015-02-10  5:04 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

On 8 February 2015 at 22:35, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Hi Simon,
>
>
> On Thu,  5 Feb 2015 21:41:44 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
>> Remove driver model CONFIGs from the board config headers and use Kconfig
>> instead.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2: None
>>
>>  arch/arm/cpu/armv7/omap3/Kconfig       |  9 +++++++++
>>  board/compulab/cm_t335/Kconfig         |  9 +++++++++
>>  board/gumstix/pepper/Kconfig           |  9 +++++++++
>>  board/isee/igep0033/Kconfig            |  9 +++++++++
>>  board/phytec/pcm051/Kconfig            |  9 +++++++++
>>  board/silica/pengwyn/Kconfig           |  9 +++++++++
>>  board/ti/am335x/Kconfig                | 10 ++++++++++
>>  configs/am3517_crane_defconfig         |  3 +++
>>  configs/am3517_evm_defconfig           |  3 +++
>>  configs/cm_t3517_defconfig             |  3 +++
>>  configs/cm_t35_defconfig               |  3 +++
>>  configs/devkit8000_defconfig           |  3 +++
>>  configs/dig297_defconfig               |  3 +++
>>  configs/eco5pk_defconfig               |  3 +++
>>  configs/mcx_defconfig                  |  3 +++
>>  configs/mt_ventoux_defconfig           |  3 +++
>>  configs/nokia_rx51_defconfig           |  3 +++
>>  configs/omap3_beagle_defconfig         |  3 +++
>>  configs/omap3_evm_defconfig            |  3 +++
>>  configs/omap3_evm_quick_mmc_defconfig  |  3 +++
>>  configs/omap3_evm_quick_nand_defconfig |  3 +++
>>  configs/omap3_ha_defconfig             |  3 +++
>>  configs/omap3_logic_defconfig          |  3 +++
>>  configs/omap3_mvblx_defconfig          |  3 +++
>>  configs/omap3_pandora_defconfig        |  3 +++
>>  configs/omap3_sdp3430_defconfig        |  3 +++
>>  configs/tao3530_defconfig              |  3 +++
>>  configs/tricorder_defconfig            |  3 +++
>>  configs/tricorder_flash_defconfig      |  3 +++
>>  configs/twister_defconfig              |  3 +++
>>  include/configs/nokia_rx51.h           |  1 +
>>  include/configs/ti_am335x_common.h     |  5 -----
>>  include/configs/ti_omap3_common.h      |  4 ----
>>  33 files changed, 134 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
>> index a029379..2fe3232 100644
>> --- a/arch/arm/cpu/armv7/omap3/Kconfig
>> +++ b/arch/arm/cpu/armv7/omap3/Kconfig
>> @@ -93,6 +93,15 @@ config TARGET_TWISTER
>>
>>  endchoice
>>
>> +config DM
>> +     default y if !SPL_BUILD
>> +
>> +config DM_GPIO
>> +     default y if DM && !SPL_BUILD
>> +
>> +config DM_SERIAL
>> +     default y if DM && !SPL_BUILD
>> +
>>  config SYS_SOC
>>       default "omap3"
>>
>
> I realized a problem when I looked at this patch.
>
> In order to put the default values into board-Kconfig files,
> we have to describe the "if ..." part correctly.
> (otherwise, the dependencies between CONFIGs get broken.)
>
> We had already added the same dependencies in the common parts:
>
> config DM
>         bool "Enable Driver Model"
>         depends on !SPL_BUILD
>
>
> config DM_SERIAL
>         bool "Enable Driver Model for serial drivers"
>         depends on DM
>
>
>
> Now, we are duplicating the same dependencies in each board-Kconfig.
> This is not nice.
>
> I am very sorry, I have misguided you.
> (What is worse, I can not suggest a good idea to solve this problem.)

Yes it is unfortunate. However the problem of SPL not working for DM
is only waiting on the removal of gdata. In fact I have a series which
adds an #ifndef CONFIG_DM to the gdata and enables SPL for Tegra. I'll
send it soon.

So I think we can live with this for a while until we can remove the
'depends on !SPL_BUILD' everywhere. It does seem to work well
enough...

Regards,
Simon

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

* [U-Boot] [PATCH v2 12/19] dm: at91: snapper: Move driver model CONFIGs to Kconfig
  2015-02-09  3:43   ` Masahiro Yamada
@ 2015-02-10  5:04     ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-10  5:04 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

On 8 February 2015 at 20:43, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Hi Simon,
>
> On Thu,  5 Feb 2015 21:41:43 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
>> Remove driver model CONFIGs from the board config headers and use Kconfig
>> instead.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2: None
>>
>>  arch/arm/include/asm/arch-at91/at91_pio.h | 12 ++++--------
>>  configs/snapper9260_defconfig             |  3 +++
>>  configs/snapper9g20_defconfig             |  3 +++
>>  include/configs/snapper9260.h             |  4 ----
>>  4 files changed, 10 insertions(+), 12 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/arch-at91/at91_pio.h b/arch/arm/include/asm/arch-at91/at91_pio.h
>> index 50464ff..3012278 100644
>> --- a/arch/arm/include/asm/arch-at91/at91_pio.h
>> +++ b/arch/arm/include/asm/arch-at91/at91_pio.h
>> @@ -114,14 +114,10 @@ typedef union at91_pio {
>>               at91_port_t     pioa;
>>               at91_port_t     piob;
>>               at91_port_t     pioc;
>> -     #if (ATMEL_PIO_PORTS > 3)
>> -             at91_port_t     piod;
>> -     #endif
>> -     #if (ATMEL_PIO_PORTS > 4)
>> -             at91_port_t     pioe;
>> -     #endif
>> -     } ;
>> -     at91_port_t port[ATMEL_PIO_PORTS];
>> +             at91_port_t     piod;   /* not present in all hardware */
>> +             at91_port_t     pioe;/* not present in all hardware */
>> +     };
>> +     at91_port_t port[5];
>>  } at91_pio_t;
>>
>>  #ifdef CONFIG_AT91_GPIO
>
>
> I could not understand why this change is
> related to "Move driver model CONFIGs to Kconfig".
>
> Nothing's mentioned about this change in your commit description.
>
>
> Perhaps, split into two patches?

With driver model, ATMEL_PIO_PORTS is defined by the platform data so
we can't have a #define for it. I will see if I can split it.

Regards,
Simon

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

* [U-Boot] [PATCH v2 01/19] dm: i2c: Add a dm_ prefix to driver model bus speed functions
  2015-02-06  7:12   ` Heiko Schocher
@ 2015-02-11 19:44     ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:44 UTC (permalink / raw)
  To: u-boot

On 6 February 2015 at 00:12, Heiko Schocher <hs@denx.de> wrote:
> Hello Simon,
>
> Am 06.02.2015 05:41, schrieb Simon Glass:
>>
>> As with i2c_read() and i2c_write(), add a dm_ prefix to the driver model
>> versions of these functions to avoid conflicts.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2:
>> - Use a dm_ prefix for remaining conflicting I2C functions
>>
>>   common/cmd_i2c.c         |  4 ++--
>>   drivers/i2c/i2c-uclass.c | 11 +++--------
>>   include/i2c.h            |  8 ++++----
>>   test/dm/i2c.c            |  6 +++---
>>   4 files changed, 12 insertions(+), 17 deletions(-)
>
>
> Thanks!
>
> Acked-by: Heiko Schocher <hs@denx.de>

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 02/19] dm: i2c: Make API accessible even without CONFIG_DM
  2015-02-06  7:15   ` Heiko Schocher
@ 2015-02-11 19:45     ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:45 UTC (permalink / raw)
  To: u-boot

On 6 February 2015 at 00:15, Heiko Schocher <hs@denx.de> wrote:
> Hello Simon,
>
> Am 06.02.2015 05:41, schrieb Simon Glass:
>>
>> Make the driver model I2C API available always, even if driver model
>> is not enabled. This allows for a 'soft' switch-over, where drivers can
>> use the new structures in code which is compiled but not yet used. This
>> makes migration easier in some cases.
>>
>> Fix up the existing drivers which define their own 'struct i2c_msg'.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2:
>> - Add a patch to squash use of 'struct i2c_msg' in drivers
>>
>>   drivers/i2c/adi_i2c.c  |  6 +++---
>>   drivers/i2c/kona_i2c.c | 16 ++++++++--------
>>   drivers/i2c/mv_i2c.c   | 10 +++++-----
>>   include/i2c.h          |  5 +----
>>   4 files changed, 17 insertions(+), 20 deletions(-)
>
>
> Acked-by: Heiko Schocher <hs@denx.de>

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 03/19] dm: Add Kconfig for driver/demo
  2015-02-09  3:51   ` Masahiro Yamada
@ 2015-02-11 19:45     ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:45 UTC (permalink / raw)
  To: u-boot

On 8 February 2015 at 20:51, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>
> On Thu,  5 Feb 2015 21:41:34 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
>> Add a suitable Kconfig for this directory.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2:
>> - Split out patch to add Kconfig for driver/demo
>
>
> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>
>
Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 04/19] dm: Expand and complete Kconfig in drivers/
  2015-02-09  3:46   ` Masahiro Yamada
@ 2015-02-11 19:45     ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:45 UTC (permalink / raw)
  To: u-boot

On 8 February 2015 at 20:46, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Hi Simon,
>
>
> On Thu,  5 Feb 2015 21:41:35 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
>> Expand the help messages for each driver. Add missing Kconfig for I2C,
>> SPI flash and thermal.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2:
>> - Move subsystem Kconfigs out of drivers/core
>> - Split out patch to expand/complete Kconfig in drivers/
>
>
>
> We can remove the duplicated description from the top-level README.
>
> Please update this patch or send a follow-up patch later.
> Either will do.
>
> Assuming you can do that,
>
> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>

Good point. I'll send a new patch.

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 05/19] dm: Add Kconfig options for driver model SPL support
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 05/19] dm: Add Kconfig options for driver model SPL support Simon Glass
@ 2015-02-11 19:45   ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:45 UTC (permalink / raw)
  To: u-boot

On 5 February 2015 at 21:41, Simon Glass <sjg@chromium.org> wrote:
> The SPL support cannot be enabled yet, but we can add the Kconfig
> options in preparation for this.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Drop SPL-specific #ifdef in config_defaults.h since Kconfig will do this
> - Split out patch to add Kconfig options for driver model SPL support
>
>  drivers/core/Kconfig      | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  include/config_defaults.h |  6 ++++++
>  2 files changed, 50 insertions(+)

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 06/19] dm: test: Add a Kconfig file
  2015-02-09  3:51   ` Masahiro Yamada
@ 2015-02-11 19:45     ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:45 UTC (permalink / raw)
  To: u-boot

On 8 February 2015 at 20:51, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>
> On Thu,  5 Feb 2015 21:41:37 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
>> Add a file to control driver model test features.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2:
>> - Split out patch to add a Kconfig file for test/
>
> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>
>

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 07/19] dm: Add CMD_DM and CMD_DEMO to Kconfig
  2015-02-09  4:10   ` Masahiro Yamada
@ 2015-02-11 19:45     ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:45 UTC (permalink / raw)
  To: u-boot

On 8 February 2015 at 21:10, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>
> On Thu,  5 Feb 2015 21:41:38 -0700
> Simon Glass <sjg@chromium.org> wrote:
>
>> Add Kconfig settings for these two options.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2:
>> - Fix 'procides' typo
>> - Split out patch to add CMD_DM and CMD_DEMO to Kconfig
>
>
> I still doubt if these two commands are "Device access commands"
> because they just manipulate memory data
> instead of getting access to real hardware devices.

Fair enough - we can rename it if you like.

>
> But, it might not be a big deal.
> Now we are more focusing on moving CONFIGs to Kconfig, so
>
>
> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 08/19] dm: Move Raspberry Pi driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 08/19] dm: Move Raspberry Pi driver model CONFIGs " Simon Glass
@ 2015-02-11 19:45   ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:45 UTC (permalink / raw)
  To: u-boot

On 5 February 2015 at 21:41, Simon Glass <sjg@chromium.org> wrote:
> Remove driver model CONFIGs from the board config header and use Kconfig
> instead.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  arch/arm/Kconfig                     |  2 ++
>  arch/arm/cpu/arm1176/bcm2835/Kconfig | 12 ++++++++++++
>  include/configs/rpi.h                |  6 ------
>  3 files changed, 14 insertions(+), 6 deletions(-)
>  create mode 100644 arch/arm/cpu/arm1176/bcm2835/Kconfig

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 09/19] dm: exynos: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 09/19] dm: exynos: Move " Simon Glass
@ 2015-02-11 19:45   ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:45 UTC (permalink / raw)
  To: u-boot

On 5 February 2015 at 21:41, Simon Glass <sjg@chromium.org> wrote:
> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  arch/arm/cpu/armv7/exynos/Kconfig | 15 +++++++++++++++
>  board/samsung/goni/Kconfig        |  9 +++++++++
>  board/samsung/smdk5420/Kconfig    |  6 ++++++
>  board/samsung/smdkc100/Kconfig    |  9 +++++++++
>  include/configs/exynos-common.h   |  6 ------
>  include/configs/peach-pi.h        |  1 -
>  include/configs/peach-pit.h       |  1 -
>  include/configs/s5p_goni.h        |  4 ----
>  include/configs/smdkc100.h        |  4 ----
>  9 files changed, 39 insertions(+), 16 deletions(-)

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 10/19] dm: x86: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 10/19] dm: x86: " Simon Glass
@ 2015-02-11 19:46   ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:46 UTC (permalink / raw)
  To: u-boot

On 5 February 2015 at 21:41, Simon Glass <sjg@chromium.org> wrote:
> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  arch/x86/Kconfig             | 9 +++++++++
>  include/configs/x86-common.h | 5 -----
>  2 files changed, 9 insertions(+), 5 deletions(-)

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 11/19] dm: tegra: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 11/19] dm: tegra: " Simon Glass
@ 2015-02-11 19:46   ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:46 UTC (permalink / raw)
  To: u-boot

On 5 February 2015 at 21:41, Simon Glass <sjg@chromium.org> wrote:
> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  arch/arm/cpu/armv7/tegra-common/Kconfig | 18 ++++++++++++++++++
>  include/configs/tegra-common.h          | 10 ----------
>  2 files changed, 18 insertions(+), 10 deletions(-)

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 13/19] dm: omap3: Move driver model CONFIGs to Kconfig
  2015-02-10  5:04     ` Simon Glass
@ 2015-02-11 19:46       ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:46 UTC (permalink / raw)
  To: u-boot

On 9 February 2015 at 22:04, Simon Glass <sjg@chromium.org> wrote:
> Hi Masahiro,
>
> On 8 February 2015 at 22:35, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>> Hi Simon,
>>
>>
>> On Thu,  5 Feb 2015 21:41:44 -0700
>> Simon Glass <sjg@chromium.org> wrote:
>>
>>> Remove driver model CONFIGs from the board config headers and use Kconfig
>>> instead.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>> ---
>>>
>>> Changes in v2: None
>>>
>>>  arch/arm/cpu/armv7/omap3/Kconfig       |  9 +++++++++
>>>  board/compulab/cm_t335/Kconfig         |  9 +++++++++
>>>  board/gumstix/pepper/Kconfig           |  9 +++++++++
>>>  board/isee/igep0033/Kconfig            |  9 +++++++++
>>>  board/phytec/pcm051/Kconfig            |  9 +++++++++
>>>  board/silica/pengwyn/Kconfig           |  9 +++++++++
>>>  board/ti/am335x/Kconfig                | 10 ++++++++++
>>>  configs/am3517_crane_defconfig         |  3 +++
>>>  configs/am3517_evm_defconfig           |  3 +++
>>>  configs/cm_t3517_defconfig             |  3 +++
>>>  configs/cm_t35_defconfig               |  3 +++
>>>  configs/devkit8000_defconfig           |  3 +++
>>>  configs/dig297_defconfig               |  3 +++
>>>  configs/eco5pk_defconfig               |  3 +++
>>>  configs/mcx_defconfig                  |  3 +++
>>>  configs/mt_ventoux_defconfig           |  3 +++
>>>  configs/nokia_rx51_defconfig           |  3 +++
>>>  configs/omap3_beagle_defconfig         |  3 +++
>>>  configs/omap3_evm_defconfig            |  3 +++
>>>  configs/omap3_evm_quick_mmc_defconfig  |  3 +++
>>>  configs/omap3_evm_quick_nand_defconfig |  3 +++
>>>  configs/omap3_ha_defconfig             |  3 +++
>>>  configs/omap3_logic_defconfig          |  3 +++
>>>  configs/omap3_mvblx_defconfig          |  3 +++
>>>  configs/omap3_pandora_defconfig        |  3 +++
>>>  configs/omap3_sdp3430_defconfig        |  3 +++
>>>  configs/tao3530_defconfig              |  3 +++
>>>  configs/tricorder_defconfig            |  3 +++
>>>  configs/tricorder_flash_defconfig      |  3 +++
>>>  configs/twister_defconfig              |  3 +++
>>>  include/configs/nokia_rx51.h           |  1 +
>>>  include/configs/ti_am335x_common.h     |  5 -----
>>>  include/configs/ti_omap3_common.h      |  4 ----
>>>  33 files changed, 134 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
>>> index a029379..2fe3232 100644
>>> --- a/arch/arm/cpu/armv7/omap3/Kconfig
>>> +++ b/arch/arm/cpu/armv7/omap3/Kconfig
>>> @@ -93,6 +93,15 @@ config TARGET_TWISTER
>>>
>>>  endchoice
>>>
>>> +config DM
>>> +     default y if !SPL_BUILD
>>> +
>>> +config DM_GPIO
>>> +     default y if DM && !SPL_BUILD
>>> +
>>> +config DM_SERIAL
>>> +     default y if DM && !SPL_BUILD
>>> +
>>>  config SYS_SOC
>>>       default "omap3"
>>>
>>
>> I realized a problem when I looked at this patch.
>>
>> In order to put the default values into board-Kconfig files,
>> we have to describe the "if ..." part correctly.
>> (otherwise, the dependencies between CONFIGs get broken.)
>>
>> We had already added the same dependencies in the common parts:
>>
>> config DM
>>         bool "Enable Driver Model"
>>         depends on !SPL_BUILD
>>
>>
>> config DM_SERIAL
>>         bool "Enable Driver Model for serial drivers"
>>         depends on DM
>>
>>
>>
>> Now, we are duplicating the same dependencies in each board-Kconfig.
>> This is not nice.
>>
>> I am very sorry, I have misguided you.
>> (What is worse, I can not suggest a good idea to solve this problem.)
>
> Yes it is unfortunate. However the problem of SPL not working for DM
> is only waiting on the removal of gdata. In fact I have a series which
> adds an #ifndef CONFIG_DM to the gdata and enables SPL for Tegra. I'll
> send it soon.
>
> So I think we can live with this for a while until we can remove the
> 'depends on !SPL_BUILD' everywhere. It does seem to work well
> enough...
>
> Regards,
> Simon

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 14/19] dm: sandbox: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 14/19] dm: sandbox: " Simon Glass
@ 2015-02-11 19:46   ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:46 UTC (permalink / raw)
  To: u-boot

On 5 February 2015 at 21:41, Simon Glass <sjg@chromium.org> wrote:
> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  arch/sandbox/Kconfig      | 24 ++++++++++++++++++++++++
>  include/configs/sandbox.h | 11 -----------
>  2 files changed, 24 insertions(+), 11 deletions(-)

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 15/19] dm: sunxi: Move driver model CONFIGs to Kconfig
  2015-02-07 15:12     ` Simon Glass
@ 2015-02-11 19:46       ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:46 UTC (permalink / raw)
  To: u-boot

On 7 February 2015 at 08:12, Simon Glass <sjg@chromium.org> wrote:
> On 6 February 2015 at 21:22, Ian Campbell <ijc@hellion.org.uk> wrote:
>> On Thu, 2015-02-05 at 21:41 -0700, Simon Glass wrote:
>>> Remove driver model CONFIGs from the board config headers and use Kconfig
>>> instead.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>
>> Acked-by: Ian Campbell <ijc@hellion.org.uk>
>>
>> I assume you'll take this via the dm tree along with the rest of the
>> series.
>
> Thanks - yes, but will give it a few days to wait for more comments.
>
> Regards,
> Simon

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 16/19] dm: mx6: Move driver model CONFIGs to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 16/19] dm: mx6: " Simon Glass
@ 2015-02-11 19:47   ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:47 UTC (permalink / raw)
  To: u-boot

On 5 February 2015 at 21:41, Simon Glass <sjg@chromium.org> wrote:
> Remove driver model CONFIGs from the board config headers and use Kconfig
> instead.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  configs/cm_fx6_defconfig | 3 +++
>  include/configs/cm_fx6.h | 4 ----
>  2 files changed, 3 insertions(+), 4 deletions(-)

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs to Kconfig
  2015-02-09 17:04           ` Marek Vasut
@ 2015-02-11 19:47             ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-11 19:47 UTC (permalink / raw)
  To: u-boot

On 9 February 2015 at 10:04, Marek Vasut <marex@denx.de> wrote:
> On Monday, February 09, 2015 at 05:45:37 PM, Dinh Nguyen wrote:
>> On 02/09/2015 01:29 AM, Stefan Roese wrote:
>> > Hi,
>> >
>> > (added Marek to Cc)
>
> [...]
>
>> >>> Would you need to also update socfpga_cyclone5_defconfig or is that not
>> >>> needed?
>> >>>
>> >>  From what I can tell it does not use driver model yet (it doesn't
>> >>
>> >> define CONFIG_OF_CONTROL either).
>> >
>> > socrates was the first SoCFPGA board to use DT and DM. IIRC, Marek has a
>> > patch series queued to move the other SoCFPGA boards over to DT based
>> > probing (with DM enabled) as well.
>>
>> Ah ok, thanks for the clarification.
>
> Hi!
>
> it's only DT, not DM. It's the Arria V patchset I sent out that Stefan is
> referring to. I'll address his comment this week and will repost then.
>
> In case you want to base on top of that patchset, it's in the u-boot-socfpga
> repository, branch "topic/vip-arriav" .
>
> Best regards,
> Marek Vasut

Applied to u-boot-dm.

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

* [U-Boot] [PATCH v2 17/19] dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig
  2015-02-06  4:41 ` [U-Boot] [PATCH v2 17/19] dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN " Simon Glass
@ 2015-02-18 13:44   ` Alexey Brodkin
  2015-02-19 14:06     ` Simon Glass
  0 siblings, 1 reply; 55+ messages in thread
From: Alexey Brodkin @ 2015-02-18 13:44 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Thu, 2015-02-05 at 21:41 -0700, Simon Glass wrote:
> +config SYS_MALLOC_F
> +	bool "Enable malloc() pool before relocation"
> +	default 0x400

I'm wondering if default value here should be of type "bool" but not a
hex value?

Probably this is just a copy paste from the following SYS_MALLOC_F_LEN?

> +	help
> +	  Before relocation memory is very limited on many platforms. Still,
> +	  we can provide a small malloc() pool if needed. Driver model in
> +	  particular needs this to operate, so that it can allocate the
> +	  initial serial device and any others that are needed.
> +
> +config SYS_MALLOC_F_LEN
> +	hex "Size of malloc() pool before relocation"
> +	depends on SYS_MALLOC_F
> +	default 0x400
> +	help
> +	  Before relocation memory is very limited on many platforms. Still,
> +	  we can provide a small malloc() pool if needed. Driver model in
> +	  particular needs this to operate, so that it can allocate the
> +	  initial serial device and any others that are needed.

-Alexey

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

* [U-Boot] [PATCH v2 17/19] dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig
  2015-02-18 13:44   ` Alexey Brodkin
@ 2015-02-19 14:06     ` Simon Glass
  0 siblings, 0 replies; 55+ messages in thread
From: Simon Glass @ 2015-02-19 14:06 UTC (permalink / raw)
  To: u-boot

Hi Alexey,

On 18 February 2015 at 06:44, Alexey Brodkin
<Alexey.Brodkin@synopsys.com> wrote:
> Hi Simon,
>
> On Thu, 2015-02-05 at 21:41 -0700, Simon Glass wrote:
>> +config SYS_MALLOC_F
>> +     bool "Enable malloc() pool before relocation"
>> +     default 0x400
>
> I'm wondering if default value here should be of type "bool" but not a
> hex value?
>
> Probably this is just a copy paste from the following SYS_MALLOC_F_LEN?
>

Thanks. I found another problem also but may have a solution now so
will see a few patches,

>> +     help
>> +       Before relocation memory is very limited on many platforms. Still,
>> +       we can provide a small malloc() pool if needed. Driver model in
>> +       particular needs this to operate, so that it can allocate the
>> +       initial serial device and any others that are needed.
>> +
>> +config SYS_MALLOC_F_LEN
>> +     hex "Size of malloc() pool before relocation"
>> +     depends on SYS_MALLOC_F
>> +     default 0x400
>> +     help
>> +       Before relocation memory is very limited on many platforms. Still,
>> +       we can provide a small malloc() pool if needed. Driver model in
>> +       particular needs this to operate, so that it can allocate the
>> +       initial serial device and any others that are needed.
>
> -Alexey

Regards,
Simon

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

end of thread, other threads:[~2015-02-19 14:06 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-06  4:41 [U-Boot] [PATCH v2 0/19] dm: Convert boards to Kconfig for driver model Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 01/19] dm: i2c: Add a dm_ prefix to driver model bus speed functions Simon Glass
2015-02-06  7:12   ` Heiko Schocher
2015-02-11 19:44     ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 02/19] dm: i2c: Make API accessible even without CONFIG_DM Simon Glass
2015-02-06  7:15   ` Heiko Schocher
2015-02-11 19:45     ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 03/19] dm: Add Kconfig for driver/demo Simon Glass
2015-02-09  3:51   ` Masahiro Yamada
2015-02-11 19:45     ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 04/19] dm: Expand and complete Kconfig in drivers/ Simon Glass
2015-02-09  3:46   ` Masahiro Yamada
2015-02-11 19:45     ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 05/19] dm: Add Kconfig options for driver model SPL support Simon Glass
2015-02-11 19:45   ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 06/19] dm: test: Add a Kconfig file Simon Glass
2015-02-09  3:51   ` Masahiro Yamada
2015-02-11 19:45     ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 07/19] dm: Add CMD_DM and CMD_DEMO to Kconfig Simon Glass
2015-02-09  4:10   ` Masahiro Yamada
2015-02-11 19:45     ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 08/19] dm: Move Raspberry Pi driver model CONFIGs " Simon Glass
2015-02-11 19:45   ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 09/19] dm: exynos: Move " Simon Glass
2015-02-11 19:45   ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 10/19] dm: x86: " Simon Glass
2015-02-11 19:46   ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 11/19] dm: tegra: " Simon Glass
2015-02-11 19:46   ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 12/19] dm: at91: snapper: " Simon Glass
2015-02-09  3:43   ` Masahiro Yamada
2015-02-10  5:04     ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 13/19] dm: omap3: " Simon Glass
2015-02-09  5:35   ` Masahiro Yamada
2015-02-10  5:04     ` Simon Glass
2015-02-11 19:46       ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 14/19] dm: sandbox: " Simon Glass
2015-02-11 19:46   ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 15/19] dm: sunxi: " Simon Glass
2015-02-07  4:22   ` Ian Campbell
2015-02-07 15:12     ` Simon Glass
2015-02-11 19:46       ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 16/19] dm: mx6: " Simon Glass
2015-02-11 19:47   ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 17/19] dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN " Simon Glass
2015-02-18 13:44   ` Alexey Brodkin
2015-02-19 14:06     ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 18/19] dm: socfpga: Move driver model CONFIGs " Simon Glass
2015-02-06 23:36   ` Dinh Nguyen
2015-02-07  0:11     ` Simon Glass
2015-02-09  7:29       ` Stefan Roese
2015-02-09 16:45         ` Dinh Nguyen
2015-02-09 17:04           ` Marek Vasut
2015-02-11 19:47             ` Simon Glass
2015-02-06  4:41 ` [U-Boot] [PATCH v2 19/19] dm: Drop unused driver model config_defaults Simon Glass

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.