All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm
@ 2015-11-27  8:31 Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 01/19] arm: omap-common: do not build timer when CONFIG_TIMER defined Mugunthan V N
                   ` (19 more replies)
  0 siblings, 20 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

This patch series enables omap timer to adopt driver model. This
has been tested on the following evms (logs [1]) by invoking
'sleep 10' command with minicom timestamps.
* dra72 evm
* dra74 evm
* am335x evm
* am335x bbb
* am437x-sk evm
* am437x-gp evm

Also pushed a branch for testing [2]

This patch series depends on [3] for chosen node in dra74 evm
dts file.

[1] - http://pastebin.ubuntu.com/13524650/
[2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer
[3] - https://www.mail-archive.com/u-boot at lists.denx.de/msg193763.html

Mugunthan V N (19):
  arm: omap-common: do not build timer when CONFIG_TIMER defined
  dm: timer: uclass: add timer init to add timer device
  dm: timer: uclass: Add flag to control sequence numbering
  drivers: timer: omap_timer: add timer driver for omap devices based on
    dm
  am43xx_evm: timer: do not define CONFIG_TIMER for spl
  arm: dts: am437x-sk-evm: add tick-timer to chosen node
  defconfig: am437x_sk_evm: enable timer driver model
  arm: dts: am437x-gp-evm: add tick-timer to chosen node
  defconfig: am437x_gp_evm: enable timer driver model
  am335x_evm: timer: do not define CONFIG_TIMER for spl
  arm: dts: am335x-boneblack: add tick-timer to chosen node
  defconfig: am335x_boneblack_vboot: enable timer driver model
  arm: dts: am335x-evm: add tick-timer to chosen node
  defconfig: am335x_gp_evm: enable timer driver model
  ti_omap5_common: timer: do not define CONFIG_TIMER for spl
  arm: dts: dra72-evm: add tick-timer to chosen node
  defconfig: dra72_evm: enable timer driver model
  arm: dts: dra7-evm: add tick-timer to chosen node
  defconfig: dra74_evm: enable timer driver model

 arch/arm/cpu/armv7/omap-common/Makefile  |   6 ++
 arch/arm/dts/am335x-boneblack.dts        |   1 +
 arch/arm/dts/am335x-evm.dts              |   1 +
 arch/arm/dts/am437x-gp-evm.dts           |   1 +
 arch/arm/dts/am437x-sk-evm.dts           |   1 +
 arch/arm/dts/dra7-evm.dts                |   1 +
 arch/arm/dts/dra72-evm.dts               |   1 +
 configs/am335x_boneblack_vboot_defconfig |   2 +
 configs/am335x_gp_evm_defconfig          |   2 +
 configs/am437x_gp_evm_defconfig          |   2 +
 configs/am437x_sk_evm_defconfig          |   2 +
 configs/dra72_evm_defconfig              |   2 +
 configs/dra74_evm_defconfig              |   2 +
 doc/device-tree-bindings/chosen.txt      |  43 ++++++++++++
 drivers/timer/Kconfig                    |   6 ++
 drivers/timer/Makefile                   |   1 +
 drivers/timer/omap-timer.c               | 108 +++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c             |  35 ++++++++++
 include/configs/am335x_evm.h             |   1 +
 include/configs/am43xx_evm.h             |   1 +
 include/configs/ti_omap5_common.h        |   1 +
 lib/time.c                               |   5 ++
 22 files changed, 225 insertions(+)
 create mode 100644 doc/device-tree-bindings/chosen.txt
 create mode 100644 drivers/timer/omap-timer.c

-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 01/19] arm: omap-common: do not build timer when CONFIG_TIMER defined
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device Mugunthan V N
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

To prepare timer driver to DM/DT conversion do not build the
exiting timer driver when CONFIG_TIMER is defined. But since
omap's SPL doesn't support DM yet so built timer driver only for
SPL build when CONFIG_TIMER is defined.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 arch/arm/cpu/armv7/omap-common/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap-common/Makefile b/arch/arm/cpu/armv7/omap-common/Makefile
index 464a5d1..87a7ac0 100644
--- a/arch/arm/cpu/armv7/omap-common/Makefile
+++ b/arch/arm/cpu/armv7/omap-common/Makefile
@@ -6,7 +6,13 @@
 #
 
 obj-y	:= reset.o
+ifeq ($(CONFIG_TIMER),)
 obj-y	+= timer.o
+else
+ifdef CONFIG_SPL_BUILD
+obj-y	+= timer.o
+endif
+endif
 obj-y	+= utils.o
 
 ifneq ($(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 01/19] arm: omap-common: do not build timer when CONFIG_TIMER defined Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27 19:40   ` Simon Glass
  2015-11-28  8:26   ` Bin Meng
  2015-11-27  8:31 ` [U-Boot] [PATCH 03/19] dm: timer: uclass: Add flag to control sequence numbering Mugunthan V N
                   ` (17 subsequent siblings)
  19 siblings, 2 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Adding timer_init function to create and initialize the timer
device on platforms where u-boot,dm-pre-reloc is not used. Since
there will be multiple timer devices in the system, adding a
tick-timer node in chosen node to know which timer device to be
used as tick timer in u-boot.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c        | 34 +++++++++++++++++++++++++++++
 lib/time.c                          |  5 +++++
 3 files changed, 82 insertions(+)
 create mode 100644 doc/device-tree-bindings/chosen.txt

diff --git a/doc/device-tree-bindings/chosen.txt b/doc/device-tree-bindings/chosen.txt
new file mode 100644
index 0000000..58f29f9
--- /dev/null
+++ b/doc/device-tree-bindings/chosen.txt
@@ -0,0 +1,43 @@
+The chosen node
+---------------
+The chosen node does not represent a real device, but serves as a place
+for passing data like which serial device to used to print the logs etc
+
+
+stdout-path property
+--------------------
+Device trees may specify the device to be used for boot console output
+with a stdout-path property under /chosen.
+
+Example
+-------
+/ {
+	chosen {
+		stdout-path = "/serial at f00:115200";
+	};
+
+	serial at f00 {
+		compatible = "vendor,some-uart";
+		reg = <0xf00 0x10>;
+	};
+};
+
+tick-timer property
+-------------------
+In a system there are multiple timers, specify which timer to be used
+as the tick-timer. Earlier it was hardcoded in the timer driver now
+since device tree has all the timer nodes. Specify which timer to be
+used as tick timer.
+
+Example
+-------
+/ {
+	chosen {
+		tick-timer = &timer2;
+	};
+
+	timer2 at f00 {
+		compatible = "vendor,some-uart";
+		reg = <0xf00 0x10>;
+	};
+};
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index 12aee5b..78ec989 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -6,9 +6,13 @@
 
 #include <common.h>
 #include <dm.h>
+#include <dm/lists.h>
+#include <dm/device-internal.h>
 #include <errno.h>
 #include <timer.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  * Implement a Timer uclass to work with lib/time.c. The timer is usually
  * a 32 bits free-running up counter. The get_rate() method is used to get
@@ -35,6 +39,36 @@ unsigned long timer_get_rate(struct udevice *dev)
 	return uc_priv->clock_rate;
 }
 
+int timer_init(void)
+{
+	const void *blob = gd->fdt_blob;
+	struct udevice *dev;
+	int node;
+
+	if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {
+		/* Check for a chosen timer to be used for tick */
+		node = fdtdec_get_chosen_node(blob, "tick-timer");
+		if (node < 0)
+			return -ENODEV;
+
+		if (uclass_get_device_by_of_offset(UCLASS_TIMER, node, &dev)) {
+			/*
+			 * If the timer is not marked to be bound before
+			 * relocation, bind it anyway.
+			 */
+			if (node > 0 &&
+			    !lists_bind_fdt(gd->dm_root, blob, node, &dev)) {
+				int ret = device_probe(dev);
+				if (ret)
+					return ret;
+			}
+		}
+	}
+
+	gd->timer = dev;
+	return 0;
+}
+
 UCLASS_DRIVER(timer) = {
 	.id		= UCLASS_TIMER,
 	.name		= "timer",
diff --git a/lib/time.c b/lib/time.c
index b001745..22f7d23 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -47,6 +47,11 @@ static int notrace dm_timer_init(void)
 	int ret;
 
 	if (!gd->timer) {
+		/* Check if we have a chosen timer */
+		timer_init();
+		if (gd->timer)
+			return 0;
+
 		ret = uclass_first_device(UCLASS_TIMER, &dev);
 		if (ret)
 			return ret;
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 03/19] dm: timer: uclass: Add flag to control sequence numbering
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 01/19] arm: omap-common: do not build timer when CONFIG_TIMER defined Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27 19:40   ` Simon Glass
  2015-11-28  8:30   ` Bin Meng
  2015-11-27  8:31 ` [U-Boot] [PATCH 04/19] drivers: timer: omap_timer: add timer driver for omap devices based on dm Mugunthan V N
                   ` (16 subsequent siblings)
  19 siblings, 2 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Like SPI and I2C, timer devices also have multiple chip
instances. This patch adds the flag 'DM_UC_FLAG_SEQ_ALIAS' in
timer_uclass driver to control device sequence numbering.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 drivers/timer/timer-uclass.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index 78ec989..5840cb4 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -72,5 +72,6 @@ int timer_init(void)
 UCLASS_DRIVER(timer) = {
 	.id		= UCLASS_TIMER,
 	.name		= "timer",
+	.flags		= DM_UC_FLAG_SEQ_ALIAS,
 	.per_device_auto_alloc_size = sizeof(struct timer_dev_priv),
 };
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 04/19] drivers: timer: omap_timer: add timer driver for omap devices based on dm
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (2 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 03/19] dm: timer: uclass: Add flag to control sequence numbering Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-28 11:52   ` Bin Meng
  2015-11-27  8:31 ` [U-Boot] [PATCH 05/19] am43xx_evm: timer: do not define CONFIG_TIMER for spl Mugunthan V N
                   ` (15 subsequent siblings)
  19 siblings, 1 reply; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Adding a timer driver for omap devices based on driver model
and device tree.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 drivers/timer/Kconfig      |   6 +++
 drivers/timer/Makefile     |   1 +
 drivers/timer/omap-timer.c | 108 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 115 insertions(+)
 create mode 100644 drivers/timer/omap-timer.c

diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
index 601e493..98ba012 100644
--- a/drivers/timer/Kconfig
+++ b/drivers/timer/Kconfig
@@ -23,4 +23,10 @@ config SANDBOX_TIMER
 	  Select this to enable an emulated timer for sandbox. It gets
 	  time from host os.
 
+config OMAP_TIMER
+	bool "Omap Timer support"
+	depends on TIMER
+	help
+	  Select this to enable an timer for Omap devices.
+
 endmenu
diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile
index 300946e..2eb9cfc 100644
--- a/drivers/timer/Makefile
+++ b/drivers/timer/Makefile
@@ -7,3 +7,4 @@
 obj-$(CONFIG_TIMER)		+= timer-uclass.o
 obj-$(CONFIG_ALTERA_TIMER)	+= altera_timer.o
 obj-$(CONFIG_SANDBOX_TIMER)	+= sandbox_timer.o
+obj-$(CONFIG_OMAP_TIMER)	+= omap-timer.o
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
new file mode 100644
index 0000000..2532e74
--- /dev/null
+++ b/drivers/timer/omap-timer.c
@@ -0,0 +1,108 @@
+/*
+ * TI OMAP Timer driver
+ *
+ * Copyright (C) 2015, Texas Instruments, Incorporated
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <timer.h>
+#include <asm/io.h>
+#include <asm/arch/clock.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* Timer register bits */
+#define TCLR_START			BIT(0)	/* Start=1 */
+#define TCLR_AUTO_RELOAD		BIT(1)	/* Auto reload */
+#define TCLR_PRE_EN			BIT(5)	/* Pre-scaler enable */
+#define TCLR_PTV_SHIFT			(2)	/* Pre-scaler shift value */
+
+#define TIMER_CLOCK             (V_SCLK / (2 << CONFIG_SYS_PTV))
+
+struct omap_gptimer_regs {
+	unsigned int tidr;		/* offset 0x00 */
+	unsigned char res1[12];
+	unsigned int tiocp_cfg;		/* offset 0x10 */
+	unsigned char res2[12];
+	unsigned int tier;		/* offset 0x20 */
+	unsigned int tistatr;		/* offset 0x24 */
+	unsigned int tistat;		/* offset 0x28 */
+	unsigned int tisr;		/* offset 0x2c */
+	unsigned int tcicr;		/* offset 0x30 */
+	unsigned int twer;		/* offset 0x34 */
+	unsigned int tclr;		/* offset 0x38 */
+	unsigned int tcrr;		/* offset 0x3c */
+	unsigned int tldr;		/* offset 0x40 */
+	unsigned int ttgr;		/* offset 0x44 */
+	unsigned int twpc;		/* offset 0x48 */
+	unsigned int tmar;		/* offset 0x4c */
+	unsigned int tcar1;		/* offset 0x50 */
+	unsigned int tscir;		/* offset 0x54 */
+	unsigned int tcar2;		/* offset 0x58 */
+};
+
+/* Omap Timer Priv */
+struct omap_timer_priv {
+	struct omap_gptimer_regs *regs;
+};
+
+static int omap_timer_get_count(struct udevice *dev, unsigned long *count)
+{
+	struct omap_timer_priv *priv = dev_get_priv(dev);
+
+	*count = readl(&priv->regs->tcrr);
+
+	return 0;
+}
+
+static int omap_timer_probe(struct udevice *dev)
+{
+	struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
+	struct omap_timer_priv *priv = dev_get_priv(dev);
+
+	uc_priv->clock_rate = TIMER_CLOCK;
+
+	/* start the counter ticking up, reload value on overflow */
+	writel(0, &priv->regs->tldr);
+	/* enable timer */
+	writel((CONFIG_SYS_PTV << 2) | TCLR_PRE_EN | TCLR_AUTO_RELOAD |
+	       TCLR_START, &priv->regs->tclr);
+
+	return 0;
+}
+
+static int omap_timer_ofdata_to_platdata(struct udevice *dev)
+{
+	struct omap_timer_priv *priv = dev_get_priv(dev);
+
+	priv->regs = (struct omap_gptimer_regs *)dev_get_addr(dev);
+
+	return 0;
+}
+
+
+static const struct timer_ops omap_timer_ops = {
+	.get_count = omap_timer_get_count,
+};
+
+static const struct udevice_id omap_timer_ids[] = {
+	{ .compatible = "ti,am335x-timer" },
+	{ .compatible = "ti,am4372-timer" },
+	{ .compatible = "ti,omap5430-timer" },
+	{}
+};
+
+U_BOOT_DRIVER(omap_timer) = {
+	.name	= "omap_timer",
+	.id	= UCLASS_TIMER,
+	.of_match = omap_timer_ids,
+	.ofdata_to_platdata = omap_timer_ofdata_to_platdata,
+	.priv_auto_alloc_size = sizeof(struct omap_timer_priv),
+	.probe = omap_timer_probe,
+	.ops	= &omap_timer_ops,
+	.flags = DM_FLAG_PRE_RELOC,
+};
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 05/19] am43xx_evm: timer: do not define CONFIG_TIMER for spl
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (3 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 04/19] drivers: timer: omap_timer: add timer driver for omap devices based on dm Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 06/19] arm: dts: am437x-sk-evm: add tick-timer to chosen node Mugunthan V N
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Since OMAP's spl doesn't support DM currently, do not define
CONFIG_TIMER for spl build.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 include/configs/am43xx_evm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index aac550a..9980203 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -142,6 +142,7 @@
  */
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
+#undef CONFIG_TIMER
 #endif
 
 #ifndef CONFIG_SPL_BUILD
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 06/19] arm: dts: am437x-sk-evm: add tick-timer to chosen node
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (4 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 05/19] am43xx_evm: timer: do not define CONFIG_TIMER for spl Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 07/19] defconfig: am437x_sk_evm: enable timer driver model Mugunthan V N
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 arch/arm/dts/am437x-sk-evm.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/dts/am437x-sk-evm.dts b/arch/arm/dts/am437x-sk-evm.dts
index 3f9d808..85d3381 100644
--- a/arch/arm/dts/am437x-sk-evm.dts
+++ b/arch/arm/dts/am437x-sk-evm.dts
@@ -26,6 +26,7 @@
 
 	chosen {
 		stdout-path = &uart0;
+		tick-timer = &timer2;
 	};
 
 	backlight {
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 07/19] defconfig: am437x_sk_evm: enable timer driver model
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (5 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 06/19] arm: dts: am437x-sk-evm: add tick-timer to chosen node Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 08/19] arm: dts: am437x-gp-evm: add tick-timer to chosen node Mugunthan V N
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Enable timer driver model for am437x_sk_evm as omap-timer supports
driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 configs/am437x_sk_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index a9b6f52..56a7b11 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -18,3 +18,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_TIMER=y
+CONFIG_OMAP_TIMER=y
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 08/19] arm: dts: am437x-gp-evm: add tick-timer to chosen node
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (6 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 07/19] defconfig: am437x_sk_evm: enable timer driver model Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 09/19] defconfig: am437x_gp_evm: enable timer driver model Mugunthan V N
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 arch/arm/dts/am437x-gp-evm.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/dts/am437x-gp-evm.dts b/arch/arm/dts/am437x-gp-evm.dts
index b5f0b4e..8e23b96 100644
--- a/arch/arm/dts/am437x-gp-evm.dts
+++ b/arch/arm/dts/am437x-gp-evm.dts
@@ -26,6 +26,7 @@
 
 	chosen {
 		stdout-path = &uart0;
+		tick-timer = &timer2;
 	};
 
 	vmmcsd_fixed: fixedregulator-sd {
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 09/19] defconfig: am437x_gp_evm: enable timer driver model
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (7 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 08/19] arm: dts: am437x-gp-evm: add tick-timer to chosen node Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 10/19] am335x_evm: timer: do not define CONFIG_TIMER for spl Mugunthan V N
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Enable timer driver model for am437x_gp_evm as omap-timer supports
driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 configs/am437x_gp_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index 7155c98..1d79ba19 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -18,3 +18,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_TIMER=y
+CONFIG_OMAP_TIMER=y
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 10/19] am335x_evm: timer: do not define CONFIG_TIMER for spl
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (8 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 09/19] defconfig: am437x_gp_evm: enable timer driver model Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 11/19] arm: dts: am335x-boneblack: add tick-timer to chosen node Mugunthan V N
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Since OMAP's spl doesn't support DM currently, do not define
CONFIG_TIMER for spl build.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 include/configs/am335x_evm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index c51db8c..d93fdf1 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -361,6 +361,7 @@
  */
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
+#undef CONFIG_TIMER
 #endif
 
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 11/19] arm: dts: am335x-boneblack: add tick-timer to chosen node
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (9 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 10/19] am335x_evm: timer: do not define CONFIG_TIMER for spl Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 12/19] defconfig: am335x_boneblack_vboot: enable timer driver model Mugunthan V N
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 arch/arm/dts/am335x-boneblack.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/dts/am335x-boneblack.dts b/arch/arm/dts/am335x-boneblack.dts
index 679248a..27ebe4a 100644
--- a/arch/arm/dts/am335x-boneblack.dts
+++ b/arch/arm/dts/am335x-boneblack.dts
@@ -15,6 +15,7 @@
 	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
 	chosen {
 		stdout-path = &uart0;
+		tick-timer = &timer2;
 	};
 };
 
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 12/19] defconfig: am335x_boneblack_vboot: enable timer driver model
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (10 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 11/19] arm: dts: am335x-boneblack: add tick-timer to chosen node Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 13/19] arm: dts: am335x-evm: add tick-timer to chosen node Mugunthan V N
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Enable timer driver model for am335x_boneblack_vboot as
omap-timer supports driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 configs/am335x_boneblack_vboot_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index ad40b07..888d5b1 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -18,3 +18,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_ETH=y
 CONFIG_SYS_NS16550=y
+CONFIG_TIMER=y
+CONFIG_OMAP_TIMER=y
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 13/19] arm: dts: am335x-evm: add tick-timer to chosen node
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (11 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 12/19] defconfig: am335x_boneblack_vboot: enable timer driver model Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 14/19] defconfig: am335x_gp_evm: enable timer driver model Mugunthan V N
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 arch/arm/dts/am335x-evm.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/dts/am335x-evm.dts b/arch/arm/dts/am335x-evm.dts
index e1c5d4f..c0bc2af 100644
--- a/arch/arm/dts/am335x-evm.dts
+++ b/arch/arm/dts/am335x-evm.dts
@@ -16,6 +16,7 @@
 
 	chosen {
 		stdout-path = &uart0;
+		tick-timer = &timer2;
 	};
 
 	cpus {
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 14/19] defconfig: am335x_gp_evm: enable timer driver model
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (12 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 13/19] arm: dts: am335x-evm: add tick-timer to chosen node Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 15/19] ti_omap5_common: timer: do not define CONFIG_TIMER for spl Mugunthan V N
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Enable timer driver model for am335x_gp_evm as omap-timer supports
driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 configs/am335x_gp_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/am335x_gp_evm_defconfig b/configs/am335x_gp_evm_defconfig
index 74d9ffb..49461e2 100644
--- a/configs/am335x_gp_evm_defconfig
+++ b/configs/am335x_gp_evm_defconfig
@@ -16,3 +16,5 @@ CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_ETH=y
 CONFIG_SYS_NS16550=y
 CONFIG_RSA=y
+CONFIG_TIMER=y
+CONFIG_OMAP_TIMER=y
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 15/19] ti_omap5_common: timer: do not define CONFIG_TIMER for spl
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (13 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 14/19] defconfig: am335x_gp_evm: enable timer driver model Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 16/19] arm: dts: dra72-evm: add tick-timer to chosen node Mugunthan V N
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Since OMAP's spl doesn't support DM currently, do not define
CONFIG_TIMER for spl build.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 include/configs/ti_omap5_common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 2d492f8..d164e6a 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -164,6 +164,7 @@
  */
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
+#undef CONFIG_TIMER
 #endif
 
 #endif /* __CONFIG_TI_OMAP5_COMMON_H */
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 16/19] arm: dts: dra72-evm: add tick-timer to chosen node
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (14 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 15/19] ti_omap5_common: timer: do not define CONFIG_TIMER for spl Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 17/19] defconfig: dra72_evm: enable timer driver model Mugunthan V N
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 arch/arm/dts/dra72-evm.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/dts/dra72-evm.dts b/arch/arm/dts/dra72-evm.dts
index efb544c..6e3bbfd 100644
--- a/arch/arm/dts/dra72-evm.dts
+++ b/arch/arm/dts/dra72-evm.dts
@@ -16,6 +16,7 @@
 
 	chosen {
 		stdout-path = &uart1;
+		tick-timer = &timer2;
 	};
 
 	memory {
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 17/19] defconfig: dra72_evm: enable timer driver model
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (15 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 16/19] arm: dts: dra72-evm: add tick-timer to chosen node Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 18/19] arm: dts: dra7-evm: add tick-timer to chosen node Mugunthan V N
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Enable timer driver model for dra72_evm_defconfig as omap-timer
supports driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 configs/dra72_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index 3205bd5..530a25e 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -20,3 +20,5 @@ CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_TIMER=y
+CONFIG_OMAP_TIMER=y
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 18/19] arm: dts: dra7-evm: add tick-timer to chosen node
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (16 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 17/19] defconfig: dra72_evm: enable timer driver model Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27  8:31 ` [U-Boot] [PATCH 19/19] defconfig: dra74_evm: enable timer driver model Mugunthan V N
  2015-11-27 19:40 ` [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Simon Glass
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 arch/arm/dts/dra7-evm.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/dts/dra7-evm.dts b/arch/arm/dts/dra7-evm.dts
index e4daa99..2568aad 100644
--- a/arch/arm/dts/dra7-evm.dts
+++ b/arch/arm/dts/dra7-evm.dts
@@ -16,6 +16,7 @@
 
 	chosen {
 		stdout-path = &uart1;
+		tick-timer = &timer2;
 	};
 
 	memory {
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 19/19] defconfig: dra74_evm: enable timer driver model
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (17 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 18/19] arm: dts: dra7-evm: add tick-timer to chosen node Mugunthan V N
@ 2015-11-27  8:31 ` Mugunthan V N
  2015-11-27 19:40 ` [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Simon Glass
  19 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-27  8:31 UTC (permalink / raw)
  To: u-boot

Enable timer driver model for dra74_evm_defconfig as omap-timer
supports driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 configs/dra74_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 394edbe..a68870e 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -19,3 +19,5 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
+CONFIG_TIMER=y
+CONFIG_OMAP_TIMER=y
-- 
2.6.3.368.gf34be46

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

* [U-Boot] [PATCH 03/19] dm: timer: uclass: Add flag to control sequence numbering
  2015-11-27  8:31 ` [U-Boot] [PATCH 03/19] dm: timer: uclass: Add flag to control sequence numbering Mugunthan V N
@ 2015-11-27 19:40   ` Simon Glass
  2015-11-28  8:30   ` Bin Meng
  1 sibling, 0 replies; 36+ messages in thread
From: Simon Glass @ 2015-11-27 19:40 UTC (permalink / raw)
  To: u-boot

On 27 November 2015 at 00:31, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> Like SPI and I2C, timer devices also have multiple chip
> instances. This patch adds the flag 'DM_UC_FLAG_SEQ_ALIAS' in
> timer_uclass driver to control device sequence numbering.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  drivers/timer/timer-uclass.c | 1 +
>  1 file changed, 1 insertion(+)

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

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-11-27  8:31 ` [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device Mugunthan V N
@ 2015-11-27 19:40   ` Simon Glass
  2015-11-28  6:13     ` Mugunthan V N
  2015-11-28  8:26   ` Bin Meng
  1 sibling, 1 reply; 36+ messages in thread
From: Simon Glass @ 2015-11-27 19:40 UTC (permalink / raw)
  To: u-boot

Hi Mugunthan,

On 27 November 2015 at 00:31, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> Adding timer_init function to create and initialize the timer
> device on platforms where u-boot,dm-pre-reloc is not used. Since
> there will be multiple timer devices in the system, adding a
> tick-timer node in chosen node to know which timer device to be
> used as tick timer in u-boot.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
>  drivers/timer/timer-uclass.c        | 34 +++++++++++++++++++++++++++++
>  lib/time.c                          |  5 +++++
>  3 files changed, 82 insertions(+)
>  create mode 100644 doc/device-tree-bindings/chosen.txt
>
> diff --git a/doc/device-tree-bindings/chosen.txt b/doc/device-tree-bindings/chosen.txt
> new file mode 100644
> index 0000000..58f29f9
> --- /dev/null
> +++ b/doc/device-tree-bindings/chosen.txt
> @@ -0,0 +1,43 @@
> +The chosen node
> +---------------
> +The chosen node does not represent a real device, but serves as a place
> +for passing data like which serial device to used to print the logs etc
> +
> +
> +stdout-path property
> +--------------------
> +Device trees may specify the device to be used for boot console output
> +with a stdout-path property under /chosen.
> +
> +Example
> +-------
> +/ {
> +       chosen {
> +               stdout-path = "/serial at f00:115200";
> +       };
> +
> +       serial at f00 {
> +               compatible = "vendor,some-uart";
> +               reg = <0xf00 0x10>;
> +       };
> +};
> +
> +tick-timer property
> +-------------------
> +In a system there are multiple timers, specify which timer to be used
> +as the tick-timer. Earlier it was hardcoded in the timer driver now
> +since device tree has all the timer nodes. Specify which timer to be
> +used as tick timer.
> +
> +Example
> +-------
> +/ {
> +       chosen {
> +               tick-timer = &timer2;
> +       };
> +
> +       timer2 at f00 {
> +               compatible = "vendor,some-uart";
> +               reg = <0xf00 0x10>;
> +       };
> +};
> diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
> index 12aee5b..78ec989 100644
> --- a/drivers/timer/timer-uclass.c
> +++ b/drivers/timer/timer-uclass.c
> @@ -6,9 +6,13 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <dm/lists.h>
> +#include <dm/device-internal.h>
>  #include <errno.h>
>  #include <timer.h>
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
>  /*
>   * Implement a Timer uclass to work with lib/time.c. The timer is usually
>   * a 32 bits free-running up counter. The get_rate() method is used to get
> @@ -35,6 +39,36 @@ unsigned long timer_get_rate(struct udevice *dev)
>         return uc_priv->clock_rate;
>  }
>
> +int timer_init(void)
> +{
> +       const void *blob = gd->fdt_blob;
> +       struct udevice *dev;
> +       int node;
> +
> +       if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {
> +               /* Check for a chosen timer to be used for tick */
> +               node = fdtdec_get_chosen_node(blob, "tick-timer");
> +               if (node < 0)
> +                       return -ENODEV;

Please add a debug() here to help people diagnose problems.

> +
> +               if (uclass_get_device_by_of_offset(UCLASS_TIMER, node, &dev)) {
> +                       /*
> +                        * If the timer is not marked to be bound before
> +                        * relocation, bind it anyway.
> +                        */
> +                       if (node > 0 &&
> +                           !lists_bind_fdt(gd->dm_root, blob, node, &dev)) {
> +                               int ret = device_probe(dev);
> +                               if (ret)

debug()

> +                                       return ret;
> +                       }
> +               }
> +       }
> +
> +       gd->timer = dev;
> +       return 0;
> +}
> +
>  UCLASS_DRIVER(timer) = {
>         .id             = UCLASS_TIMER,
>         .name           = "timer",
> diff --git a/lib/time.c b/lib/time.c
> index b001745..22f7d23 100644
> --- a/lib/time.c
> +++ b/lib/time.c
> @@ -47,6 +47,11 @@ static int notrace dm_timer_init(void)
>         int ret;
>
>         if (!gd->timer) {
> +               /* Check if we have a chosen timer */
> +               timer_init();
> +               if (gd->timer)
> +                       return 0;
> +
>                 ret = uclass_first_device(UCLASS_TIMER, &dev);
>                 if (ret)
>                         return ret;

This code should move up into the timer_init() function. So the sequence is:

- look for a device with 'chosen'
- find the first device

Regards,
Simon

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

* [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm
  2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
                   ` (18 preceding siblings ...)
  2015-11-27  8:31 ` [U-Boot] [PATCH 19/19] defconfig: dra74_evm: enable timer driver model Mugunthan V N
@ 2015-11-27 19:40 ` Simon Glass
  2015-11-28  6:15   ` Mugunthan V N
  19 siblings, 1 reply; 36+ messages in thread
From: Simon Glass @ 2015-11-27 19:40 UTC (permalink / raw)
  To: u-boot

Hi Mugunthan,

On 27 November 2015 at 00:31, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> This patch series enables omap timer to adopt driver model. This
> has been tested on the following evms (logs [1]) by invoking
> 'sleep 10' command with minicom timestamps.
> * dra72 evm
> * dra74 evm
> * am335x evm
> * am335x bbb
> * am437x-sk evm
> * am437x-gp evm
>
> Also pushed a branch for testing [2]
>
> This patch series depends on [3] for chosen node in dra74 evm
> dts file.
>
> [1] - http://pastebin.ubuntu.com/13524650/
> [2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer
> [3] - https://www.mail-archive.com/u-boot at lists.denx.de/msg193763.html
>

Just a nit - your cover letter subject says 'device model'. Mostly we
call it 'driver model'. This is somewhat arbitrary but it's good to be
consistent to avoid confusion, so if you end up resending this series,
can you rename it?

Regards,
Simon

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-11-27 19:40   ` Simon Glass
@ 2015-11-28  6:13     ` Mugunthan V N
  0 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-28  6:13 UTC (permalink / raw)
  To: u-boot

On Saturday 28 November 2015 01:10 AM, Simon Glass wrote:
> Hi Mugunthan,
> 
> On 27 November 2015 at 00:31, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>> Adding timer_init function to create and initialize the timer
>> device on platforms where u-boot,dm-pre-reloc is not used. Since
>> there will be multiple timer devices in the system, adding a
>> tick-timer node in chosen node to know which timer device to be
>> used as tick timer in u-boot.
>>
>> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
>> ---
>>  doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
>>  drivers/timer/timer-uclass.c        | 34 +++++++++++++++++++++++++++++
>>  lib/time.c                          |  5 +++++
>>  3 files changed, 82 insertions(+)
>>  create mode 100644 doc/device-tree-bindings/chosen.txt
>>
>> diff --git a/doc/device-tree-bindings/chosen.txt b/doc/device-tree-bindings/chosen.txt
>> new file mode 100644
>> index 0000000..58f29f9
>> --- /dev/null
>> +++ b/doc/device-tree-bindings/chosen.txt
>> @@ -0,0 +1,43 @@
>> +The chosen node
>> +---------------
>> +The chosen node does not represent a real device, but serves as a place
>> +for passing data like which serial device to used to print the logs etc
>> +
>> +
>> +stdout-path property
>> +--------------------
>> +Device trees may specify the device to be used for boot console output
>> +with a stdout-path property under /chosen.
>> +
>> +Example
>> +-------
>> +/ {
>> +       chosen {
>> +               stdout-path = "/serial at f00:115200";
>> +       };
>> +
>> +       serial at f00 {
>> +               compatible = "vendor,some-uart";
>> +               reg = <0xf00 0x10>;
>> +       };
>> +};
>> +
>> +tick-timer property
>> +-------------------
>> +In a system there are multiple timers, specify which timer to be used
>> +as the tick-timer. Earlier it was hardcoded in the timer driver now
>> +since device tree has all the timer nodes. Specify which timer to be
>> +used as tick timer.
>> +
>> +Example
>> +-------
>> +/ {
>> +       chosen {
>> +               tick-timer = &timer2;
>> +       };
>> +
>> +       timer2 at f00 {
>> +               compatible = "vendor,some-uart";
>> +               reg = <0xf00 0x10>;
>> +       };
>> +};
>> diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
>> index 12aee5b..78ec989 100644
>> --- a/drivers/timer/timer-uclass.c
>> +++ b/drivers/timer/timer-uclass.c
>> @@ -6,9 +6,13 @@
>>
>>  #include <common.h>
>>  #include <dm.h>
>> +#include <dm/lists.h>
>> +#include <dm/device-internal.h>
>>  #include <errno.h>
>>  #include <timer.h>
>>
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>>  /*
>>   * Implement a Timer uclass to work with lib/time.c. The timer is usually
>>   * a 32 bits free-running up counter. The get_rate() method is used to get
>> @@ -35,6 +39,36 @@ unsigned long timer_get_rate(struct udevice *dev)
>>         return uc_priv->clock_rate;
>>  }
>>
>> +int timer_init(void)
>> +{
>> +       const void *blob = gd->fdt_blob;
>> +       struct udevice *dev;
>> +       int node;
>> +
>> +       if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {
>> +               /* Check for a chosen timer to be used for tick */
>> +               node = fdtdec_get_chosen_node(blob, "tick-timer");
>> +               if (node < 0)
>> +                       return -ENODEV;
> 
> Please add a debug() here to help people diagnose problems.

timer_init is called even before we have serial_init in
common/board_f.c. So we don't have console yet to add debug logs.

> 
>> +
>> +               if (uclass_get_device_by_of_offset(UCLASS_TIMER, node, &dev)) {
>> +                       /*
>> +                        * If the timer is not marked to be bound before
>> +                        * relocation, bind it anyway.
>> +                        */
>> +                       if (node > 0 &&
>> +                           !lists_bind_fdt(gd->dm_root, blob, node, &dev)) {
>> +                               int ret = device_probe(dev);
>> +                               if (ret)
> 
> debug()
> 
>> +                                       return ret;
>> +                       }
>> +               }
>> +       }
>> +
>> +       gd->timer = dev;
>> +       return 0;
>> +}
>> +
>>  UCLASS_DRIVER(timer) = {
>>         .id             = UCLASS_TIMER,
>>         .name           = "timer",
>> diff --git a/lib/time.c b/lib/time.c
>> index b001745..22f7d23 100644
>> --- a/lib/time.c
>> +++ b/lib/time.c
>> @@ -47,6 +47,11 @@ static int notrace dm_timer_init(void)
>>         int ret;
>>
>>         if (!gd->timer) {
>> +               /* Check if we have a chosen timer */
>> +               timer_init();
>> +               if (gd->timer)
>> +                       return 0;
>> +
>>                 ret = uclass_first_device(UCLASS_TIMER, &dev);
>>                 if (ret)
>>                         return ret;
> 
> This code should move up into the timer_init() function. So the sequence is:
> 
> - look for a device with 'chosen'
> - find the first device
> 

Will do it in v2.

Regards
Mugunthan V N

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

* [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm
  2015-11-27 19:40 ` [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Simon Glass
@ 2015-11-28  6:15   ` Mugunthan V N
  0 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-28  6:15 UTC (permalink / raw)
  To: u-boot

On Saturday 28 November 2015 01:10 AM, Simon Glass wrote:
> Hi Mugunthan,
> 
> On 27 November 2015 at 00:31, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>> > This patch series enables omap timer to adopt driver model. This
>> > has been tested on the following evms (logs [1]) by invoking
>> > 'sleep 10' command with minicom timestamps.
>> > * dra72 evm
>> > * dra74 evm
>> > * am335x evm
>> > * am335x bbb
>> > * am437x-sk evm
>> > * am437x-gp evm
>> >
>> > Also pushed a branch for testing [2]
>> >
>> > This patch series depends on [3] for chosen node in dra74 evm
>> > dts file.
>> >
>> > [1] - http://pastebin.ubuntu.com/13524650/
>> > [2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer
>> > [3] - https://www.mail-archive.com/u-boot at lists.denx.de/msg193763.html
>> >
> Just a nit - your cover letter subject says 'device model'. Mostly we
> call it 'driver model'. This is somewhat arbitrary but it's good to be
> consistent to avoid confusion, so if you end up resending this series,
> can you rename it?

Sorry for the confusion, will fix on my future cover letters.

Regards
Mugunthan V N

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-11-27  8:31 ` [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device Mugunthan V N
  2015-11-27 19:40   ` Simon Glass
@ 2015-11-28  8:26   ` Bin Meng
  2015-11-28 11:38     ` Mugunthan V N
  1 sibling, 1 reply; 36+ messages in thread
From: Bin Meng @ 2015-11-28  8:26 UTC (permalink / raw)
  To: u-boot

Hi Mugunthan,

On Fri, Nov 27, 2015 at 4:31 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> Adding timer_init function to create and initialize the timer
> device on platforms where u-boot,dm-pre-reloc is not used. Since
> there will be multiple timer devices in the system, adding a
> tick-timer node in chosen node to know which timer device to be
> used as tick timer in u-boot.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
>  drivers/timer/timer-uclass.c        | 34 +++++++++++++++++++++++++++++
>  lib/time.c                          |  5 +++++
>  3 files changed, 82 insertions(+)
>  create mode 100644 doc/device-tree-bindings/chosen.txt
>
> diff --git a/doc/device-tree-bindings/chosen.txt b/doc/device-tree-bindings/chosen.txt
> new file mode 100644
> index 0000000..58f29f9
> --- /dev/null
> +++ b/doc/device-tree-bindings/chosen.txt
> @@ -0,0 +1,43 @@
> +The chosen node
> +---------------
> +The chosen node does not represent a real device, but serves as a place
> +for passing data like which serial device to used to print the logs etc
> +
> +
> +stdout-path property
> +--------------------
> +Device trees may specify the device to be used for boot console output
> +with a stdout-path property under /chosen.
> +
> +Example
> +-------
> +/ {
> +       chosen {
> +               stdout-path = "/serial at f00:115200";
> +       };
> +
> +       serial at f00 {
> +               compatible = "vendor,some-uart";
> +               reg = <0xf00 0x10>;
> +       };
> +};
> +
> +tick-timer property
> +-------------------
> +In a system there are multiple timers, specify which timer to be used
> +as the tick-timer. Earlier it was hardcoded in the timer driver now
> +since device tree has all the timer nodes. Specify which timer to be
> +used as tick timer.
> +
> +Example
> +-------
> +/ {
> +       chosen {
> +               tick-timer = &timer2;

I believe this is a wrong device tree syntax as timer2 is not a label.

> +       };
> +
> +       timer2 at f00 {
> +               compatible = "vendor,some-uart";

some-timer

> +               reg = <0xf00 0x10>;
> +       };
> +};
> diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
> index 12aee5b..78ec989 100644
> --- a/drivers/timer/timer-uclass.c
> +++ b/drivers/timer/timer-uclass.c
> @@ -6,9 +6,13 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <dm/lists.h>
> +#include <dm/device-internal.h>
>  #include <errno.h>
>  #include <timer.h>
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
>  /*
>   * Implement a Timer uclass to work with lib/time.c. The timer is usually
>   * a 32 bits free-running up counter. The get_rate() method is used to get
> @@ -35,6 +39,36 @@ unsigned long timer_get_rate(struct udevice *dev)
>         return uc_priv->clock_rate;
>  }
>
> +int timer_init(void)

This introduces a timer_init() which won't build for x86 as x86 has a
timer_init() already.

> +{
> +       const void *blob = gd->fdt_blob;
> +       struct udevice *dev;
> +       int node;
> +
> +       if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {

Why do we need this if check? I think it can be removed.

> +               /* Check for a chosen timer to be used for tick */
> +               node = fdtdec_get_chosen_node(blob, "tick-timer");
> +               if (node < 0)
> +                       return -ENODEV;
> +
> +               if (uclass_get_device_by_of_offset(UCLASS_TIMER, node, &dev)) {
> +                       /*
> +                        * If the timer is not marked to be bound before
> +                        * relocation, bind it anyway.
> +                        */
> +                       if (node > 0 &&
> +                           !lists_bind_fdt(gd->dm_root, blob, node, &dev)) {
> +                               int ret = device_probe(dev);
> +                               if (ret)
> +                                       return ret;
> +                       }
> +               }
> +       }
> +
> +       gd->timer = dev;
> +       return 0;
> +}
> +
>  UCLASS_DRIVER(timer) = {
>         .id             = UCLASS_TIMER,
>         .name           = "timer",
> diff --git a/lib/time.c b/lib/time.c
> index b001745..22f7d23 100644
> --- a/lib/time.c
> +++ b/lib/time.c
> @@ -47,6 +47,11 @@ static int notrace dm_timer_init(void)
>         int ret;
>
>         if (!gd->timer) {
> +               /* Check if we have a chosen timer */
> +               timer_init();

timer_init() is already called in board_r.c. Can we avoid duplicate
calls? Maybe we should remove the call in board_r.c for DM.

> +               if (gd->timer)
> +                       return 0;
> +
>                 ret = uclass_first_device(UCLASS_TIMER, &dev);
>                 if (ret)
>                         return ret;
> --

Regards,
Bin

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

* [U-Boot] [PATCH 03/19] dm: timer: uclass: Add flag to control sequence numbering
  2015-11-27  8:31 ` [U-Boot] [PATCH 03/19] dm: timer: uclass: Add flag to control sequence numbering Mugunthan V N
  2015-11-27 19:40   ` Simon Glass
@ 2015-11-28  8:30   ` Bin Meng
  1 sibling, 0 replies; 36+ messages in thread
From: Bin Meng @ 2015-11-28  8:30 UTC (permalink / raw)
  To: u-boot

On Fri, Nov 27, 2015 at 4:31 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> Like SPI and I2C, timer devices also have multiple chip
> instances. This patch adds the flag 'DM_UC_FLAG_SEQ_ALIAS' in
> timer_uclass driver to control device sequence numbering.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  drivers/timer/timer-uclass.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
> index 78ec989..5840cb4 100644
> --- a/drivers/timer/timer-uclass.c
> +++ b/drivers/timer/timer-uclass.c
> @@ -72,5 +72,6 @@ int timer_init(void)
>  UCLASS_DRIVER(timer) = {
>         .id             = UCLASS_TIMER,
>         .name           = "timer",
> +       .flags          = DM_UC_FLAG_SEQ_ALIAS,
>         .per_device_auto_alloc_size = sizeof(struct timer_dev_priv),
>  };
> --

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-11-28  8:26   ` Bin Meng
@ 2015-11-28 11:38     ` Mugunthan V N
  2015-11-28 11:46       ` Bin Meng
  0 siblings, 1 reply; 36+ messages in thread
From: Mugunthan V N @ 2015-11-28 11:38 UTC (permalink / raw)
  To: u-boot

On Saturday 28 November 2015 01:56 PM, Bin Meng wrote:
> Hi Mugunthan,
> 
> On Fri, Nov 27, 2015 at 4:31 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>> Adding timer_init function to create and initialize the timer
>> device on platforms where u-boot,dm-pre-reloc is not used. Since
>> there will be multiple timer devices in the system, adding a
>> tick-timer node in chosen node to know which timer device to be
>> used as tick timer in u-boot.
>>
>> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
>> ---
>>  doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
>>  drivers/timer/timer-uclass.c        | 34 +++++++++++++++++++++++++++++
>>  lib/time.c                          |  5 +++++
>>  3 files changed, 82 insertions(+)
>>  create mode 100644 doc/device-tree-bindings/chosen.txt
>>
>> diff --git a/doc/device-tree-bindings/chosen.txt b/doc/device-tree-bindings/chosen.txt
>> new file mode 100644
>> index 0000000..58f29f9
>> --- /dev/null
>> +++ b/doc/device-tree-bindings/chosen.txt
>> @@ -0,0 +1,43 @@
>> +The chosen node
>> +---------------
>> +The chosen node does not represent a real device, but serves as a place
>> +for passing data like which serial device to used to print the logs etc
>> +
>> +
>> +stdout-path property
>> +--------------------
>> +Device trees may specify the device to be used for boot console output
>> +with a stdout-path property under /chosen.
>> +
>> +Example
>> +-------
>> +/ {
>> +       chosen {
>> +               stdout-path = "/serial at f00:115200";
>> +       };
>> +
>> +       serial at f00 {
>> +               compatible = "vendor,some-uart";
>> +               reg = <0xf00 0x10>;
>> +       };
>> +};
>> +
>> +tick-timer property
>> +-------------------
>> +In a system there are multiple timers, specify which timer to be used
>> +as the tick-timer. Earlier it was hardcoded in the timer driver now
>> +since device tree has all the timer nodes. Specify which timer to be
>> +used as tick timer.
>> +
>> +Example
>> +-------
>> +/ {
>> +       chosen {
>> +               tick-timer = &timer2;
> 
> I believe this is a wrong device tree syntax as timer2 is not a label.

Will fix it in next version.

> 
>> +       };
>> +
>> +       timer2 at f00 {
>> +               compatible = "vendor,some-uart";
> 
> some-timer
> 
>> +               reg = <0xf00 0x10>;
>> +       };
>> +};
>> diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
>> index 12aee5b..78ec989 100644
>> --- a/drivers/timer/timer-uclass.c
>> +++ b/drivers/timer/timer-uclass.c
>> @@ -6,9 +6,13 @@
>>
>>  #include <common.h>
>>  #include <dm.h>
>> +#include <dm/lists.h>
>> +#include <dm/device-internal.h>
>>  #include <errno.h>
>>  #include <timer.h>
>>
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>>  /*
>>   * Implement a Timer uclass to work with lib/time.c. The timer is usually
>>   * a 32 bits free-running up counter. The get_rate() method is used to get
>> @@ -35,6 +39,36 @@ unsigned long timer_get_rate(struct udevice *dev)
>>         return uc_priv->clock_rate;
>>  }
>>
>> +int timer_init(void)
> 
> This introduces a timer_init() which won't build for x86 as x86 has a
> timer_init() already.

You mean init_timer() in arch/x86/lib/tsc_timer.c, once x86 timer is
converted to driver model the init_timer() should be removed. Similar
init_timer() is also present in omap as well, but with patch 01 of this
series timer driver is removed from build when CONFIG_TIMER is defined
in defconfig.

> 
>> +{
>> +       const void *blob = gd->fdt_blob;
>> +       struct udevice *dev;
>> +       int node;
>> +
>> +       if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {
> 
> Why do we need this if check? I think it can be removed.
> 
>> +               /* Check for a chosen timer to be used for tick */
>> +               node = fdtdec_get_chosen_node(blob, "tick-timer");
>> +               if (node < 0)
>> +                       return -ENODEV;
>> +
>> +               if (uclass_get_device_by_of_offset(UCLASS_TIMER, node, &dev)) {
>> +                       /*
>> +                        * If the timer is not marked to be bound before
>> +                        * relocation, bind it anyway.
>> +                        */
>> +                       if (node > 0 &&
>> +                           !lists_bind_fdt(gd->dm_root, blob, node, &dev)) {
>> +                               int ret = device_probe(dev);
>> +                               if (ret)
>> +                                       return ret;
>> +                       }
>> +               }
>> +       }
>> +
>> +       gd->timer = dev;
>> +       return 0;
>> +}
>> +
>>  UCLASS_DRIVER(timer) = {
>>         .id             = UCLASS_TIMER,
>>         .name           = "timer",
>> diff --git a/lib/time.c b/lib/time.c
>> index b001745..22f7d23 100644
>> --- a/lib/time.c
>> +++ b/lib/time.c
>> @@ -47,6 +47,11 @@ static int notrace dm_timer_init(void)
>>         int ret;
>>
>>         if (!gd->timer) {
>> +               /* Check if we have a chosen timer */
>> +               timer_init();
> 
> timer_init() is already called in board_r.c. Can we avoid duplicate
> calls? Maybe we should remove the call in board_r.c for DM.

from board_r.c, timer_init is added only for MICROBLAZE, AVR32 and M68K
architectures. May be those who work on these architectures can initiate
of this removal during timer dm conversion.

Regards
Mugunthan V N

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-11-28 11:38     ` Mugunthan V N
@ 2015-11-28 11:46       ` Bin Meng
  2015-11-29 13:16         ` Mugunthan V N
  0 siblings, 1 reply; 36+ messages in thread
From: Bin Meng @ 2015-11-28 11:46 UTC (permalink / raw)
  To: u-boot

Hi Mugunthan,

On Sat, Nov 28, 2015 at 7:38 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> On Saturday 28 November 2015 01:56 PM, Bin Meng wrote:
>> Hi Mugunthan,
>>
>> On Fri, Nov 27, 2015 at 4:31 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>>> Adding timer_init function to create and initialize the timer
>>> device on platforms where u-boot,dm-pre-reloc is not used. Since
>>> there will be multiple timer devices in the system, adding a
>>> tick-timer node in chosen node to know which timer device to be
>>> used as tick timer in u-boot.
>>>
>>> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
>>> ---
>>>  doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
>>>  drivers/timer/timer-uclass.c        | 34 +++++++++++++++++++++++++++++
>>>  lib/time.c                          |  5 +++++
>>>  3 files changed, 82 insertions(+)
>>>  create mode 100644 doc/device-tree-bindings/chosen.txt
>>>
>>> diff --git a/doc/device-tree-bindings/chosen.txt b/doc/device-tree-bindings/chosen.txt
>>> new file mode 100644
>>> index 0000000..58f29f9
>>> --- /dev/null
>>> +++ b/doc/device-tree-bindings/chosen.txt
>>> @@ -0,0 +1,43 @@
>>> +The chosen node
>>> +---------------
>>> +The chosen node does not represent a real device, but serves as a place
>>> +for passing data like which serial device to used to print the logs etc
>>> +
>>> +
>>> +stdout-path property
>>> +--------------------
>>> +Device trees may specify the device to be used for boot console output
>>> +with a stdout-path property under /chosen.
>>> +
>>> +Example
>>> +-------
>>> +/ {
>>> +       chosen {
>>> +               stdout-path = "/serial at f00:115200";
>>> +       };
>>> +
>>> +       serial at f00 {
>>> +               compatible = "vendor,some-uart";
>>> +               reg = <0xf00 0x10>;
>>> +       };
>>> +};
>>> +
>>> +tick-timer property
>>> +-------------------
>>> +In a system there are multiple timers, specify which timer to be used
>>> +as the tick-timer. Earlier it was hardcoded in the timer driver now
>>> +since device tree has all the timer nodes. Specify which timer to be
>>> +used as tick timer.
>>> +
>>> +Example
>>> +-------
>>> +/ {
>>> +       chosen {
>>> +               tick-timer = &timer2;
>>
>> I believe this is a wrong device tree syntax as timer2 is not a label.
>
> Will fix it in next version.
>
>>
>>> +       };
>>> +
>>> +       timer2 at f00 {
>>> +               compatible = "vendor,some-uart";
>>
>> some-timer
>>
>>> +               reg = <0xf00 0x10>;
>>> +       };
>>> +};
>>> diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
>>> index 12aee5b..78ec989 100644
>>> --- a/drivers/timer/timer-uclass.c
>>> +++ b/drivers/timer/timer-uclass.c
>>> @@ -6,9 +6,13 @@
>>>
>>>  #include <common.h>
>>>  #include <dm.h>
>>> +#include <dm/lists.h>
>>> +#include <dm/device-internal.h>
>>>  #include <errno.h>
>>>  #include <timer.h>
>>>
>>> +DECLARE_GLOBAL_DATA_PTR;
>>> +
>>>  /*
>>>   * Implement a Timer uclass to work with lib/time.c. The timer is usually
>>>   * a 32 bits free-running up counter. The get_rate() method is used to get
>>> @@ -35,6 +39,36 @@ unsigned long timer_get_rate(struct udevice *dev)
>>>         return uc_priv->clock_rate;
>>>  }
>>>
>>> +int timer_init(void)
>>
>> This introduces a timer_init() which won't build for x86 as x86 has a
>> timer_init() already.
>
> You mean init_timer() in arch/x86/lib/tsc_timer.c, once x86 timer is
> converted to driver model the init_timer() should be removed. Similar

x86 timer has already been converted to driver model. Please rebase
your series on top of dm/master and you can see the converted driver
there.

> init_timer() is also present in omap as well, but with patch 01 of this
> series timer driver is removed from build when CONFIG_TIMER is defined
> in defconfig.

Yes, but your patch 01 will break x86. I can prepare a patch for x86
if you like.

>
>>
>>> +{
>>> +       const void *blob = gd->fdt_blob;
>>> +       struct udevice *dev;
>>> +       int node;
>>> +
>>> +       if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {
>>
>> Why do we need this if check? I think it can be removed.
>>
>>> +               /* Check for a chosen timer to be used for tick */
>>> +               node = fdtdec_get_chosen_node(blob, "tick-timer");
>>> +               if (node < 0)
>>> +                       return -ENODEV;
>>> +
>>> +               if (uclass_get_device_by_of_offset(UCLASS_TIMER, node, &dev)) {
>>> +                       /*
>>> +                        * If the timer is not marked to be bound before
>>> +                        * relocation, bind it anyway.
>>> +                        */
>>> +                       if (node > 0 &&
>>> +                           !lists_bind_fdt(gd->dm_root, blob, node, &dev)) {
>>> +                               int ret = device_probe(dev);
>>> +                               if (ret)
>>> +                                       return ret;
>>> +                       }
>>> +               }
>>> +       }
>>> +
>>> +       gd->timer = dev;
>>> +       return 0;
>>> +}
>>> +
>>>  UCLASS_DRIVER(timer) = {
>>>         .id             = UCLASS_TIMER,
>>>         .name           = "timer",
>>> diff --git a/lib/time.c b/lib/time.c
>>> index b001745..22f7d23 100644
>>> --- a/lib/time.c
>>> +++ b/lib/time.c
>>> @@ -47,6 +47,11 @@ static int notrace dm_timer_init(void)
>>>         int ret;
>>>
>>>         if (!gd->timer) {
>>> +               /* Check if we have a chosen timer */
>>> +               timer_init();
>>
>> timer_init() is already called in board_r.c. Can we avoid duplicate
>> calls? Maybe we should remove the call in board_r.c for DM.
>
> from board_r.c, timer_init is added only for MICROBLAZE, AVR32 and M68K
> architectures. May be those who work on these architectures can initiate
> of this removal during timer dm conversion.

Regards,
Bin

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

* [U-Boot] [PATCH 04/19] drivers: timer: omap_timer: add timer driver for omap devices based on dm
  2015-11-27  8:31 ` [U-Boot] [PATCH 04/19] drivers: timer: omap_timer: add timer driver for omap devices based on dm Mugunthan V N
@ 2015-11-28 11:52   ` Bin Meng
  2015-11-29 13:19     ` Mugunthan V N
  0 siblings, 1 reply; 36+ messages in thread
From: Bin Meng @ 2015-11-28 11:52 UTC (permalink / raw)
  To: u-boot

Hi Mugunthan,

On Fri, Nov 27, 2015 at 4:31 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> Adding a timer driver for omap devices based on driver model
> and device tree.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  drivers/timer/Kconfig      |   6 +++
>  drivers/timer/Makefile     |   1 +
>  drivers/timer/omap-timer.c | 108 +++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 115 insertions(+)
>  create mode 100644 drivers/timer/omap-timer.c
>
> diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
> index 601e493..98ba012 100644
> --- a/drivers/timer/Kconfig
> +++ b/drivers/timer/Kconfig
> @@ -23,4 +23,10 @@ config SANDBOX_TIMER
>           Select this to enable an emulated timer for sandbox. It gets
>           time from host os.
>
> +config OMAP_TIMER
> +       bool "Omap Timer support"

nits: Timer -> timer. Please see dm/master branch which has a commit
to fix all these nits in the existing timer drivers.

> +       depends on TIMER
> +       help
> +         Select this to enable an timer for Omap devices.
> +
>  endmenu
> diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile
> index 300946e..2eb9cfc 100644
> --- a/drivers/timer/Makefile
> +++ b/drivers/timer/Makefile
> @@ -7,3 +7,4 @@
>  obj-$(CONFIG_TIMER)            += timer-uclass.o
>  obj-$(CONFIG_ALTERA_TIMER)     += altera_timer.o
>  obj-$(CONFIG_SANDBOX_TIMER)    += sandbox_timer.o
> +obj-$(CONFIG_OMAP_TIMER)       += omap-timer.o
> diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
> new file mode 100644
> index 0000000..2532e74
> --- /dev/null
> +++ b/drivers/timer/omap-timer.c
> @@ -0,0 +1,108 @@
> +/*
> + * TI OMAP Timer driver

nits: Timer -> timer

> + *
> + * Copyright (C) 2015, Texas Instruments, Incorporated
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <dm.h>
> +#include <errno.h>
> +#include <timer.h>
> +#include <asm/io.h>
> +#include <asm/arch/clock.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +/* Timer register bits */
> +#define TCLR_START                     BIT(0)  /* Start=1 */
> +#define TCLR_AUTO_RELOAD               BIT(1)  /* Auto reload */
> +#define TCLR_PRE_EN                    BIT(5)  /* Pre-scaler enable */
> +#define TCLR_PTV_SHIFT                 (2)     /* Pre-scaler shift value */
> +
> +#define TIMER_CLOCK             (V_SCLK / (2 << CONFIG_SYS_PTV))
> +
> +struct omap_gptimer_regs {
> +       unsigned int tidr;              /* offset 0x00 */
> +       unsigned char res1[12];
> +       unsigned int tiocp_cfg;         /* offset 0x10 */
> +       unsigned char res2[12];
> +       unsigned int tier;              /* offset 0x20 */
> +       unsigned int tistatr;           /* offset 0x24 */
> +       unsigned int tistat;            /* offset 0x28 */
> +       unsigned int tisr;              /* offset 0x2c */
> +       unsigned int tcicr;             /* offset 0x30 */
> +       unsigned int twer;              /* offset 0x34 */
> +       unsigned int tclr;              /* offset 0x38 */
> +       unsigned int tcrr;              /* offset 0x3c */
> +       unsigned int tldr;              /* offset 0x40 */
> +       unsigned int ttgr;              /* offset 0x44 */
> +       unsigned int twpc;              /* offset 0x48 */
> +       unsigned int tmar;              /* offset 0x4c */
> +       unsigned int tcar1;             /* offset 0x50 */
> +       unsigned int tscir;             /* offset 0x54 */
> +       unsigned int tcar2;             /* offset 0x58 */
> +};
> +
> +/* Omap Timer Priv */
> +struct omap_timer_priv {
> +       struct omap_gptimer_regs *regs;
> +};
> +
> +static int omap_timer_get_count(struct udevice *dev, unsigned long *count)

Please rebase your series on top of dm/master, where this API
parameter 'count' has been changed to u64.

> +{
> +       struct omap_timer_priv *priv = dev_get_priv(dev);
> +
> +       *count = readl(&priv->regs->tcrr);
> +
> +       return 0;
> +}
> +
> +static int omap_timer_probe(struct udevice *dev)
> +{
> +       struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
> +       struct omap_timer_priv *priv = dev_get_priv(dev);
> +
> +       uc_priv->clock_rate = TIMER_CLOCK;
> +
> +       /* start the counter ticking up, reload value on overflow */
> +       writel(0, &priv->regs->tldr);
> +       /* enable timer */
> +       writel((CONFIG_SYS_PTV << 2) | TCLR_PRE_EN | TCLR_AUTO_RELOAD |
> +              TCLR_START, &priv->regs->tclr);
> +
> +       return 0;
> +}
> +
> +static int omap_timer_ofdata_to_platdata(struct udevice *dev)
> +{
> +       struct omap_timer_priv *priv = dev_get_priv(dev);
> +
> +       priv->regs = (struct omap_gptimer_regs *)dev_get_addr(dev);
> +
> +       return 0;
> +}
> +
> +
> +static const struct timer_ops omap_timer_ops = {
> +       .get_count = omap_timer_get_count,
> +};
> +
> +static const struct udevice_id omap_timer_ids[] = {
> +       { .compatible = "ti,am335x-timer" },
> +       { .compatible = "ti,am4372-timer" },
> +       { .compatible = "ti,omap5430-timer" },
> +       {}
> +};
> +
> +U_BOOT_DRIVER(omap_timer) = {
> +       .name   = "omap_timer",
> +       .id     = UCLASS_TIMER,
> +       .of_match = omap_timer_ids,
> +       .ofdata_to_platdata = omap_timer_ofdata_to_platdata,
> +       .priv_auto_alloc_size = sizeof(struct omap_timer_priv),
> +       .probe = omap_timer_probe,
> +       .ops    = &omap_timer_ops,
> +       .flags = DM_FLAG_PRE_RELOC,
> +};
> --

Regards,
Bin

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-11-28 11:46       ` Bin Meng
@ 2015-11-29 13:16         ` Mugunthan V N
  2015-12-01  2:39           ` Bin Meng
  0 siblings, 1 reply; 36+ messages in thread
From: Mugunthan V N @ 2015-11-29 13:16 UTC (permalink / raw)
  To: u-boot

On Saturday 28 November 2015 05:16 PM, Bin Meng wrote:
> Yes, but your patch 01 will break x86. I can prepare a patch for x86
> if you like

Can you send the patch so that I can include it on my next series.

Regards
Mugunthan V N

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

* [U-Boot] [PATCH 04/19] drivers: timer: omap_timer: add timer driver for omap devices based on dm
  2015-11-28 11:52   ` Bin Meng
@ 2015-11-29 13:19     ` Mugunthan V N
  0 siblings, 0 replies; 36+ messages in thread
From: Mugunthan V N @ 2015-11-29 13:19 UTC (permalink / raw)
  To: u-boot

On Saturday 28 November 2015 05:22 PM, Bin Meng wrote:
> Hi Mugunthan,
> 
> On Fri, Nov 27, 2015 at 4:31 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>> Adding a timer driver for omap devices based on driver model
>> and device tree.
>>
>> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
>> ---
>>  drivers/timer/Kconfig      |   6 +++
>>  drivers/timer/Makefile     |   1 +
>>  drivers/timer/omap-timer.c | 108 +++++++++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 115 insertions(+)
>>  create mode 100644 drivers/timer/omap-timer.c
>>
>> diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
>> index 601e493..98ba012 100644
>> --- a/drivers/timer/Kconfig
>> +++ b/drivers/timer/Kconfig
>> @@ -23,4 +23,10 @@ config SANDBOX_TIMER
>>           Select this to enable an emulated timer for sandbox. It gets
>>           time from host os.
>>
>> +config OMAP_TIMER
>> +       bool "Omap Timer support"
> 
> nits: Timer -> timer. Please see dm/master branch which has a commit
> to fix all these nits in the existing timer drivers.

Will fix it in next revision

> 
>> +       depends on TIMER
>> +       help
>> +         Select this to enable an timer for Omap devices.
>> +
>>  endmenu
>> diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile
>> index 300946e..2eb9cfc 100644
>> --- a/drivers/timer/Makefile
>> +++ b/drivers/timer/Makefile
>> @@ -7,3 +7,4 @@
>>  obj-$(CONFIG_TIMER)            += timer-uclass.o
>>  obj-$(CONFIG_ALTERA_TIMER)     += altera_timer.o
>>  obj-$(CONFIG_SANDBOX_TIMER)    += sandbox_timer.o
>> +obj-$(CONFIG_OMAP_TIMER)       += omap-timer.o
>> diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
>> new file mode 100644
>> index 0000000..2532e74
>> --- /dev/null
>> +++ b/drivers/timer/omap-timer.c
>> @@ -0,0 +1,108 @@
>> +/*
>> + * TI OMAP Timer driver
> 
> nits: Timer -> timer
> 
>> + *
>> + * Copyright (C) 2015, Texas Instruments, Incorporated
>> + *
>> + * SPDX-License-Identifier: GPL-2.0+
>> + */
>> +
>> +#include <common.h>
>> +#include <dm.h>
>> +#include <errno.h>
>> +#include <timer.h>
>> +#include <asm/io.h>
>> +#include <asm/arch/clock.h>
>> +
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>> +/* Timer register bits */
>> +#define TCLR_START                     BIT(0)  /* Start=1 */
>> +#define TCLR_AUTO_RELOAD               BIT(1)  /* Auto reload */
>> +#define TCLR_PRE_EN                    BIT(5)  /* Pre-scaler enable */
>> +#define TCLR_PTV_SHIFT                 (2)     /* Pre-scaler shift value */
>> +
>> +#define TIMER_CLOCK             (V_SCLK / (2 << CONFIG_SYS_PTV))
>> +
>> +struct omap_gptimer_regs {
>> +       unsigned int tidr;              /* offset 0x00 */
>> +       unsigned char res1[12];
>> +       unsigned int tiocp_cfg;         /* offset 0x10 */
>> +       unsigned char res2[12];
>> +       unsigned int tier;              /* offset 0x20 */
>> +       unsigned int tistatr;           /* offset 0x24 */
>> +       unsigned int tistat;            /* offset 0x28 */
>> +       unsigned int tisr;              /* offset 0x2c */
>> +       unsigned int tcicr;             /* offset 0x30 */
>> +       unsigned int twer;              /* offset 0x34 */
>> +       unsigned int tclr;              /* offset 0x38 */
>> +       unsigned int tcrr;              /* offset 0x3c */
>> +       unsigned int tldr;              /* offset 0x40 */
>> +       unsigned int ttgr;              /* offset 0x44 */
>> +       unsigned int twpc;              /* offset 0x48 */
>> +       unsigned int tmar;              /* offset 0x4c */
>> +       unsigned int tcar1;             /* offset 0x50 */
>> +       unsigned int tscir;             /* offset 0x54 */
>> +       unsigned int tcar2;             /* offset 0x58 */
>> +};
>> +
>> +/* Omap Timer Priv */
>> +struct omap_timer_priv {
>> +       struct omap_gptimer_regs *regs;
>> +};
>> +
>> +static int omap_timer_get_count(struct udevice *dev, unsigned long *count)
> 
> Please rebase your series on top of dm/master, where this API
> parameter 'count' has been changed to u64.

Hmmm, will rebase to dm/master and submit my next revision.

Regards
Mugunthan V N

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-11-29 13:16         ` Mugunthan V N
@ 2015-12-01  2:39           ` Bin Meng
  2015-12-02  9:29             ` Bin Meng
  0 siblings, 1 reply; 36+ messages in thread
From: Bin Meng @ 2015-12-01  2:39 UTC (permalink / raw)
  To: u-boot

Hi Mugunthan,

On Sun, Nov 29, 2015 at 9:16 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> On Saturday 28 November 2015 05:16 PM, Bin Meng wrote:
>> Yes, but your patch 01 will break x86. I can prepare a patch for x86
>> if you like
>
> Can you send the patch so that I can include it on my next series.
>

Sure, I will prepare a patch for x86 soon.

> Regards
> Mugunthan V N

Regards,
Bin

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-12-01  2:39           ` Bin Meng
@ 2015-12-02  9:29             ` Bin Meng
  2015-12-02  9:50               ` Mugunthan V N
  0 siblings, 1 reply; 36+ messages in thread
From: Bin Meng @ 2015-12-02  9:29 UTC (permalink / raw)
  To: u-boot

Hi Mugunthan,

On Tue, Dec 1, 2015 at 10:39 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Mugunthan,
>
> On Sun, Nov 29, 2015 at 9:16 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>> On Saturday 28 November 2015 05:16 PM, Bin Meng wrote:
>>> Yes, but your patch 01 will break x86. I can prepare a patch for x86
>>> if you like
>>
>> Can you send the patch so that I can include it on my next series.
>>
>
> Sure, I will prepare a patch for x86 soon.
>

Please check my x86 patch @ http://patchwork.ozlabs.org/patch/551259/

Feel free to create your v2 on top of mine, or just include mine in your v2.

Regards,
Bin

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-12-02  9:29             ` Bin Meng
@ 2015-12-02  9:50               ` Mugunthan V N
  2015-12-10  1:48                 ` Bin Meng
  0 siblings, 1 reply; 36+ messages in thread
From: Mugunthan V N @ 2015-12-02  9:50 UTC (permalink / raw)
  To: u-boot

On Wednesday 02 December 2015 02:59 PM, Bin Meng wrote:
> Hi Mugunthan,
> 
> On Tue, Dec 1, 2015 at 10:39 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Mugunthan,
>>
>> On Sun, Nov 29, 2015 at 9:16 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>>> On Saturday 28 November 2015 05:16 PM, Bin Meng wrote:
>>>> Yes, but your patch 01 will break x86. I can prepare a patch for x86
>>>> if you like
>>>
>>> Can you send the patch so that I can include it on my next series.
>>>
>>
>> Sure, I will prepare a patch for x86 soon.
>>
> 
> Please check my x86 patch @ http://patchwork.ozlabs.org/patch/551259/
> 
> Feel free to create your v2 on top of mine, or just include mine in your v2.
> 

Thanks, will pick your patch for v2 series.

Regards
Mugunthan V N

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

* [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device
  2015-12-02  9:50               ` Mugunthan V N
@ 2015-12-10  1:48                 ` Bin Meng
  0 siblings, 0 replies; 36+ messages in thread
From: Bin Meng @ 2015-12-10  1:48 UTC (permalink / raw)
  To: u-boot

Hi Mugunthan,

On Wed, Dec 2, 2015 at 5:50 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> On Wednesday 02 December 2015 02:59 PM, Bin Meng wrote:
>> Hi Mugunthan,
>>
>> On Tue, Dec 1, 2015 at 10:39 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Mugunthan,
>>>
>>> On Sun, Nov 29, 2015 at 9:16 PM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>>>> On Saturday 28 November 2015 05:16 PM, Bin Meng wrote:
>>>>> Yes, but your patch 01 will break x86. I can prepare a patch for x86
>>>>> if you like
>>>>
>>>> Can you send the patch so that I can include it on my next series.
>>>>
>>>
>>> Sure, I will prepare a patch for x86 soon.
>>>
>>
>> Please check my x86 patch @ http://patchwork.ozlabs.org/patch/551259/
>>
>> Feel free to create your v2 on top of mine, or just include mine in your v2.
>>
>
> Thanks, will pick your patch for v2 series.
>

Just let you know my patches are in mainline.

Regards,
Bin

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

end of thread, other threads:[~2015-12-10  1:48 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27  8:31 [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 01/19] arm: omap-common: do not build timer when CONFIG_TIMER defined Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 02/19] dm: timer: uclass: add timer init to add timer device Mugunthan V N
2015-11-27 19:40   ` Simon Glass
2015-11-28  6:13     ` Mugunthan V N
2015-11-28  8:26   ` Bin Meng
2015-11-28 11:38     ` Mugunthan V N
2015-11-28 11:46       ` Bin Meng
2015-11-29 13:16         ` Mugunthan V N
2015-12-01  2:39           ` Bin Meng
2015-12-02  9:29             ` Bin Meng
2015-12-02  9:50               ` Mugunthan V N
2015-12-10  1:48                 ` Bin Meng
2015-11-27  8:31 ` [U-Boot] [PATCH 03/19] dm: timer: uclass: Add flag to control sequence numbering Mugunthan V N
2015-11-27 19:40   ` Simon Glass
2015-11-28  8:30   ` Bin Meng
2015-11-27  8:31 ` [U-Boot] [PATCH 04/19] drivers: timer: omap_timer: add timer driver for omap devices based on dm Mugunthan V N
2015-11-28 11:52   ` Bin Meng
2015-11-29 13:19     ` Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 05/19] am43xx_evm: timer: do not define CONFIG_TIMER for spl Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 06/19] arm: dts: am437x-sk-evm: add tick-timer to chosen node Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 07/19] defconfig: am437x_sk_evm: enable timer driver model Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 08/19] arm: dts: am437x-gp-evm: add tick-timer to chosen node Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 09/19] defconfig: am437x_gp_evm: enable timer driver model Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 10/19] am335x_evm: timer: do not define CONFIG_TIMER for spl Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 11/19] arm: dts: am335x-boneblack: add tick-timer to chosen node Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 12/19] defconfig: am335x_boneblack_vboot: enable timer driver model Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 13/19] arm: dts: am335x-evm: add tick-timer to chosen node Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 14/19] defconfig: am335x_gp_evm: enable timer driver model Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 15/19] ti_omap5_common: timer: do not define CONFIG_TIMER for spl Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 16/19] arm: dts: dra72-evm: add tick-timer to chosen node Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 17/19] defconfig: dra72_evm: enable timer driver model Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 18/19] arm: dts: dra7-evm: add tick-timer to chosen node Mugunthan V N
2015-11-27  8:31 ` [U-Boot] [PATCH 19/19] defconfig: dra74_evm: enable timer driver model Mugunthan V N
2015-11-27 19:40 ` [U-Boot] [PATCH 00/19] device model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm Simon Glass
2015-11-28  6:15   ` Mugunthan V N

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.