Skip to contentSkip to conversation

driver model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm

PATCH New Mugunthan V N 4 participants 68 messages Dec 24, 2015 – Jan 18, 2016

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

v2 cover driver model bring-up of omap timer on dra72, dra74, am335x and am437x-sk evm

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]

[1] - http://pastebin.ubuntu.com/14190309/
[2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer-v2

Changes from initial->v2:
* Moved get timer either from choosen/first available timer from dm_timer_init to timer_init.
* Fixed typo errors in doc and comments
* Changed omap_timer_get_count dedfinition as per latest code base.

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             |  43 ++++++++++++
 include/configs/am335x_evm.h             |   1 +
 include/configs/am43xx_evm.h             |   1 +
 include/configs/ti_omap5_common.h        |   1 +
 lib/time.c                               |  13 +---
 22 files changed, 230 insertions(+), 11 deletions(-)
 create mode 100644 doc/device-tree-bindings/chosen.txt
 create mode 100644 drivers/timer/omap-timer.c
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#1 lore raw

PATCH v2 1/19 arm: omap-common: do not build timer when CONFIG_TIMER defined

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.

---
 arch/arm/cpu/armv7/omap-common/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/cpu/armv7/omap-common/Makefile +6 -0
index 464a5d1..87a7ac0 100644
@@ -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),)
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#2 lore raw

PATCH v2 1/19 arm: omap-common: do not build timer when CONFIG_TIMER defined

Quoted 6 lines · Mugunthan V N

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/fb803767/attachment.sig>
#3 lore raw

PATCH v2 1/19 arm: omap-common: do not build timer when CONFIG_TIMER defined

Quoted 7 lines · Tom Rini
Quoted 5 lines · Mugunthan V N

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.

Quoted 6 lines
Quoted 1 line

--
Tom

Applied to u-boot-dm, thanks!

#4 lore raw

PATCH v2 2/19 dm: timer: uclass: add timer init to add timer device

In reply to Mugunthan V N

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.

---
 doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c        | 42 ++++++++++++++++++++++++++++++++++++
 lib/time.c                          | 13 ++---------
 3 files changed, 87 insertions(+), 11 deletions(-)
 create mode 100644 doc/device-tree-bindings/chosen.txt
doc/device-tree-bindings/chosen.txt new file +43 -0
new file mode 100644
index 0000000..bf9a30a
@@ -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 at f00";
+	};
+
+	timer2 at f00 {
+		compatible = "vendor,some-timer";
+		reg = <0xf00 0x10>;
+	};
+};
drivers/timer/timer-uclass.c +42 -0

54 lines not on this page · raw message

lib/time.c +2 -11
index f37a662..d4060f1 100644
@@ -43,17 +43,8 @@ extern unsigned long __weak timer_read_counter(void);
 #ifdef CONFIG_TIMER
 static int notrace dm_timer_init(void)
 {
-	struct udevice *dev;
-	int ret;
-
-	if (!gd->timer) {
-		ret = uclass_first_device(UCLASS_TIMER, &dev);
-		if (ret)
-			return ret;
-		if (!dev)
-			return -ENODEV;
-		gd->timer = dev;
-	}
+	if (!gd->timer)
+		return timer_init();
 
 	return 0;
 }
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#5 lore raw

PATCH v2 2/19 dm: timer: uclass: add timer init to add timer device

Hi Mugunthan,

Quoted 81 lines · Mugunthan V N

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.

---
 doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c        | 42 ++++++++++++++++++++++++++++++++++++
 lib/time.c                          | 13 ++---------
 3 files changed, 87 insertions(+), 11 deletions(-)
 create mode 100644 doc/device-tree-bindings/chosen.txt
doc/device-tree-bindings/chosen.txt new file +43 -0
new file mode 100644
index 0000000..bf9a30a
@@ -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 at f00";
+       };
+
+       timer2 at f00 {
+               compatible = "vendor,some-timer";
+               reg = <0xf00 0x10>;
+       };
+};
drivers/timer/timer-uclass.c +3 -0
index aca421b..db43611 100644
@@ -6,6 +6,8 @@
 
 #include <common.h>
 #include <dm.h>
+#include <dm/lists.h>
+#include <dm/device-internal.h>
 #include <errno.h>
 #include <timer.h>
 
@@ -56,6 +58,46 @@ u64 timer_conv_64(u32 count)
        return ((u64)gd->timebase_h << 32) | gd->timebase_l;
 }
 
+int timer_init(void)

drivers/timer/timer-uclass.c u64 timer_conv_64(u32 count) · line 71

Quoted 10 lines
drivers/timer/timer-uclass.c +10 -0
+{
+       const void *blob = gd->fdt_blob;
+       struct udevice *dev;
+       int node;
+       int ret;
+
+       /* Check for a chosen timer to be used for tick */
+       node = fdtdec_get_chosen_node(blob, "tick-timer");
+       if (node < 0)
+               return -ENODEV;

This changes now require every device tree provide a "tick-timer" under /chosen, which break all the existing dm timer enabled boards, and is not necessary.

We should do:

    if (node < 0) {
        ret = uclass_first_device(UCLASS_TIMER, &dev);
        if (ret)
            return ret;
        if (!dev)
            return -ENODEV;
        gd->timer = dev;
    } else {
    ....
    }
Quoted 43 lines
drivers/timer/timer-uclass.c +29 -0
+
+       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;
+               }
+       }
+
+       if (dev) {
+               gd->timer = dev;
+               return 0;
+       }
+
+       ret = uclass_first_device(UCLASS_TIMER, &dev);
+       if (ret)
+               return ret;
+       if (!dev)
+               return -ENODEV;
+
+       gd->timer = dev;
+       return 0;
+}
+
 UCLASS_DRIVER(timer) = {
        .id             = UCLASS_TIMER,
        .name           = "timer",
lib/time.c +0 -3
index f37a662..d4060f1 100644
@@ -43,17 +43,8 @@ extern unsigned long __weak timer_read_counter(void);
 #ifdef CONFIG_TIMER
 static int notrace dm_timer_init(void)
 {
-       struct udevice *dev;
-       int ret;
-

lib/time.c extern unsigned long __weak timer_read_counter(void); · line 47

Quoted 10 lines
lib/time.c +2 -8
-       if (!gd->timer) {
-               ret = uclass_first_device(UCLASS_TIMER, &dev);
-               if (ret)
-                       return ret;
-               if (!dev)
-                       return -ENODEV;
-               gd->timer = dev;
-       }
+       if (!gd->timer)
+               return timer_init();

Looks timer_init() is only called in timer-uclass.c, should we declare it as static? Otherwise timer_init() will be called in either board_f.c or board_r.c on different architectures. This causes timer devices to be probed twice. We may just simply move all codes in timer_init() into dm_timer_init().

lib/time.c extern unsigned long __weak timer_read_counter(void);

Quoted 4 lines
lib/time.c +0 -1
        return 0;
 }
--

Regards,
Bin

#6 lore raw

PATCH v2 2/19 dm: timer: uclass: add timer init to add timer device

Quoted 10 lines · Bin Meng
Quoted 4 lines

+ /* Check for a chosen timer to be used for tick */

Quoted 3 lines
drivers/timer/timer-uclass.c +3 -0
+       node = fdtdec_get_chosen_node(blob, "tick-timer");
+       if (node < 0)
+               return -ENODEV;

This changes now require every device tree provide a "tick-timer" under /chosen, which break all the existing dm timer enabled boards, and is not necessary.

We should do:

Quoted 11 lines
    if (node < 0) {
        ret = uclass_first_device(UCLASS_TIMER, &dev);
        if (ret)
            return ret;
        if (!dev)
            return -ENODEV;
        gd->timer = dev;
    } else {
    ....
    }

Oops!, will fix it in next version.

Regards
Mugunthan V N

#7 lore raw

PATCH v3 2/19 dm: timer: uclass: add timer init to add timer device

In reply to Mugunthan V N

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.

---

Submitting 02/19 only for v3 as there is no change on other patches and to reduce traffic.

This patch is verified on AM437x SK and DRA74 EVM logs [1] and pushed a branch for testing

[1] - http://pastebin.ubuntu.com/14205433/
[2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer-v3

Changes from v2->v3:
* Fixed issue which is in v2 that if no chosen timer node is present in DT then timer init always fails without trying first available timer.

---
 doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c        | 41 +++++++++++++++++++++++++++++++++++
 lib/time.c                          | 13 ++---------
 3 files changed, 86 insertions(+), 11 deletions(-)
 create mode 100644 doc/device-tree-bindings/chosen.txt
doc/device-tree-bindings/chosen.txt new file +43 -0
new file mode 100644
index 0000000..bf9a30a
@@ -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 at f00";
+	};
+
+	timer2 at f00 {
+		compatible = "vendor,some-timer";
+		reg = <0xf00 0x10>;
+	};
+};
drivers/timer/timer-uclass.c +41 -0

53 lines not on this page · raw message

lib/time.c +2 -11
index f37a662..d4060f1 100644
@@ -43,17 +43,8 @@ extern unsigned long __weak timer_read_counter(void);
 #ifdef CONFIG_TIMER
 static int notrace dm_timer_init(void)
 {
-	struct udevice *dev;
-	int ret;
-
-	if (!gd->timer) {
-		ret = uclass_first_device(UCLASS_TIMER, &dev);
-		if (ret)
-			return ret;
-		if (!dev)
-			return -ENODEV;
-		gd->timer = dev;
-	}
+	if (!gd->timer)
+		return timer_init();
 
 	return 0;
 }
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#8 lore raw

PATCH v3 2/19 dm: timer: uclass: add timer init to add timer device

Hi Mugunthan,

Quoted 102 lines · Mugunthan V N

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.

---

Submitting 02/19 only for v3 as there is no change on other patches and to reduce traffic.

This patch is verified on AM437x SK and DRA74 EVM logs [1] and pushed a branch for testing

[1] - http://pastebin.ubuntu.com/14205433/
[2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer-v3

Changes from v2->v3:
* Fixed issue which is in v2 that if no chosen timer node is present in DT then timer init always fails without trying first available timer.

---
 doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c        | 41 +++++++++++++++++++++++++++++++++++
 lib/time.c                          | 13 ++---------
 3 files changed, 86 insertions(+), 11 deletions(-)
 create mode 100644 doc/device-tree-bindings/chosen.txt
doc/device-tree-bindings/chosen.txt new file +43 -0
new file mode 100644
index 0000000..bf9a30a
@@ -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 at f00";
+       };
+
+       timer2 at f00 {
+               compatible = "vendor,some-timer";
+               reg = <0xf00 0x10>;
+       };
+};
drivers/timer/timer-uclass.c +8 -0
index aca421b..b6699f2 100644
@@ -6,6 +6,8 @@
 
 #include <common.h>
 #include <dm.h>
+#include <dm/lists.h>
+#include <dm/device-internal.h>
 #include <errno.h>
 #include <timer.h>
 
@@ -56,6 +58,45 @@ u64 timer_conv_64(u32 count)
        return ((u64)gd->timebase_h << 32) | gd->timebase_l;
 }
 
+int timer_init(void)
+{
+       const void *blob = gd->fdt_blob;
+       struct udevice *dev = NULL;
+       int node;
+       int ret;

drivers/timer/timer-uclass.c u64 timer_conv_64(u32 count) · line 76

Quoted 10 lines
drivers/timer/timer-uclass.c +10 -0
+
+       /* Check for a chosen timer to be used for tick */
+       node = fdtdec_get_chosen_node(blob, "tick-timer");
+       if (node < 0) {
+               /* No chosen timer, trying first available timer */
+               ret = uclass_first_device(UCLASS_TIMER, &dev);
+               if (ret)
+                       return ret;
+               if (!dev)
+                       return -ENODEV;

Thanks for the quick v3!

drivers/timer/timer-uclass.c u64 timer_conv_64(u32 count) · line 85

Quoted 9 lines
drivers/timer/timer-uclass.c +9 -0
+       } else {
+               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);

nits: no need to declare another ret. Just "ret = device_probe(dev)".

Quoted 28 lines
drivers/timer/timer-uclass.c +14 -0
+                               if (ret)
+                                       return ret;
+                       }
+               }
+       }
+
+       if (dev) {
+               gd->timer = dev;
+               return 0;
+       }
+
+       return -ENODEV;
+}
+
 UCLASS_DRIVER(timer) = {
        .id             = UCLASS_TIMER,
        .name           = "timer",
lib/time.c +0 -3
index f37a662..d4060f1 100644
@@ -43,17 +43,8 @@ extern unsigned long __weak timer_read_counter(void);
 #ifdef CONFIG_TIMER
 static int notrace dm_timer_init(void)
 {
-       struct udevice *dev;
-       int ret;
-

lib/time.c extern unsigned long __weak timer_read_counter(void); · line 47

Quoted 10 lines
lib/time.c +2 -8
-       if (!gd->timer) {
-               ret = uclass_first_device(UCLASS_TIMER, &dev);
-               if (ret)
-                       return ret;
-               if (!dev)
-                       return -ENODEV;
-               gd->timer = dev;
-       }
+       if (!gd->timer)
+               return timer_init();

What about my comments in v2, that make timer_init() static or just move codes in timer_init() into this dm_timer_init()?

lib/time.c extern unsigned long __weak timer_read_counter(void);

Quoted 4 lines
lib/time.c +0 -1
        return 0;
 }
--

Regards,
Bin

#9 lore raw

PATCH v3 2/19 dm: timer: uclass: add timer init to add timer device

Quoted 128 lines · Bin Meng

Hi Mugunthan,

Quoted 102 lines · Mugunthan V N

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.

---

Submitting 02/19 only for v3 as there is no change on other patches and to reduce traffic.

This patch is verified on AM437x SK and DRA74 EVM logs [1] and pushed a branch for testing

[1] - http://pastebin.ubuntu.com/14205433/
[2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer-v3

Changes from v2->v3:
* Fixed issue which is in v2 that if no chosen timer node is present in DT then timer init always fails without trying first available timer.

---
 doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c        | 41 +++++++++++++++++++++++++++++++++++
 lib/time.c                          | 13 ++---------
 3 files changed, 86 insertions(+), 11 deletions(-)
 create mode 100644 doc/device-tree-bindings/chosen.txt
doc/device-tree-bindings/chosen.txt new file +43 -0
new file mode 100644
index 0000000..bf9a30a
@@ -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 at f00";
+       };
+
+       timer2 at f00 {
+               compatible = "vendor,some-timer";
+               reg = <0xf00 0x10>;
+       };
+};
drivers/timer/timer-uclass.c +8 -0
index aca421b..b6699f2 100644
@@ -6,6 +6,8 @@
 
 #include <common.h>
 #include <dm.h>
+#include <dm/lists.h>
+#include <dm/device-internal.h>
 #include <errno.h>
 #include <timer.h>
 
@@ -56,6 +58,45 @@ u64 timer_conv_64(u32 count)
        return ((u64)gd->timebase_h << 32) | gd->timebase_l;
 }
 
+int timer_init(void)
+{
+       const void *blob = gd->fdt_blob;
+       struct udevice *dev = NULL;
+       int node;
+       int ret;

drivers/timer/timer-uclass.c u64 timer_conv_64(u32 count) · line 76

Quoted 10 lines
drivers/timer/timer-uclass.c +10 -0
+
+       /* Check for a chosen timer to be used for tick */
+       node = fdtdec_get_chosen_node(blob, "tick-timer");
+       if (node < 0) {
+               /* No chosen timer, trying first available timer */
+               ret = uclass_first_device(UCLASS_TIMER, &dev);
+               if (ret)
+                       return ret;
+               if (!dev)
+                       return -ENODEV;

Thanks for the quick v3!

drivers/timer/timer-uclass.c u64 timer_conv_64(u32 count) · line 85

Quoted 9 lines
drivers/timer/timer-uclass.c +9 -0
+       } else {
+               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);
Quoted 1 line

nits: no need to declare another ret. Just "ret = device_probe(dev)".

Hmmm, yep not needed.

Quoted 34 lines
Quoted 34 lines
drivers/timer/timer-uclass.c +14 -0
+                               if (ret)
+                                       return ret;
+                       }
+               }
+       }
+
+       if (dev) {
+               gd->timer = dev;
+               return 0;
+       }
+
+       return -ENODEV;
+}
+
 UCLASS_DRIVER(timer) = {
        .id             = UCLASS_TIMER,
        .name           = "timer",
lib/time.c +0 -8
index f37a662..d4060f1 100644
@@ -43,17 +43,8 @@ extern unsigned long __weak timer_read_counter(void);
 #ifdef CONFIG_TIMER
 static int notrace dm_timer_init(void)
 {
-       struct udevice *dev;
-       int ret;
-
-       if (!gd->timer) {
-               ret = uclass_first_device(UCLASS_TIMER, &dev);
-               if (ret)
-                       return ret;
-               if (!dev)
Quoted 8 lines

lib/time.c extern unsigned long __weak timer_read_counter(void); · line 47

Quoted 5 lines
lib/time.c +2 -3
-                       return -ENODEV;
-               gd->timer = dev;
-       }
+       if (!gd->timer)
+               return timer_init();

What about my comments in v2, that make timer_init() static or just move codes in timer_init() into this dm_timer_init()?

Oops, missed :)

The timer_init() code can be moved to dm_timer_init(), but since it provides timer uclass functionality I kept the code in timer-uclass driver.

Now since dm_timer_init() doesn't have any thing other than calling timer_init, I will move the dm_timer_init() to timer_uclass and move timer_init code to it.

Regards
Mugunthan V N

#10 lore raw

PATCH v3 2/19 dm: timer: uclass: add timer init to add timer device

Quoted 181 lines · Mugunthan V N
Quoted 128 lines · Bin Meng

Hi Mugunthan,

Quoted 102 lines · Mugunthan V N

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.

---

Submitting 02/19 only for v3 as there is no change on other patches and to reduce traffic.

This patch is verified on AM437x SK and DRA74 EVM logs [1] and pushed a branch for testing

[1] - http://pastebin.ubuntu.com/14205433/
[2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer-v3

Changes from v2->v3:
* Fixed issue which is in v2 that if no chosen timer node is present in DT then timer init always fails without trying first available timer.

---
 doc/device-tree-bindings/chosen.txt | 43 +++++++++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c        | 41 +++++++++++++++++++++++++++++++++++
 lib/time.c                          | 13 ++---------
 3 files changed, 86 insertions(+), 11 deletions(-)
 create mode 100644 doc/device-tree-bindings/chosen.txt
doc/device-tree-bindings/chosen.txt new file +43 -0
new file mode 100644
index 0000000..bf9a30a
@@ -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 at f00";
+       };
+
+       timer2 at f00 {
+               compatible = "vendor,some-timer";
+               reg = <0xf00 0x10>;
+       };
+};
drivers/timer/timer-uclass.c +8 -0
index aca421b..b6699f2 100644
@@ -6,6 +6,8 @@
 
 #include <common.h>
 #include <dm.h>
+#include <dm/lists.h>
+#include <dm/device-internal.h>
 #include <errno.h>
 #include <timer.h>
 
@@ -56,6 +58,45 @@ u64 timer_conv_64(u32 count)
        return ((u64)gd->timebase_h << 32) | gd->timebase_l;
 }
 
+int timer_init(void)
+{
+       const void *blob = gd->fdt_blob;
+       struct udevice *dev = NULL;
+       int node;
+       int ret;

drivers/timer/timer-uclass.c u64 timer_conv_64(u32 count) · line 76

Quoted 10 lines
drivers/timer/timer-uclass.c +10 -0
+
+       /* Check for a chosen timer to be used for tick */
+       node = fdtdec_get_chosen_node(blob, "tick-timer");
+       if (node < 0) {
+               /* No chosen timer, trying first available timer */
+               ret = uclass_first_device(UCLASS_TIMER, &dev);
+               if (ret)
+                       return ret;
+               if (!dev)
+                       return -ENODEV;

Thanks for the quick v3!

drivers/timer/timer-uclass.c u64 timer_conv_64(u32 count) · line 85

Quoted 9 lines
drivers/timer/timer-uclass.c +9 -0
+       } else {
+               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);
Quoted 1 line

nits: no need to declare another ret. Just "ret = device_probe(dev)".

Hmmm, yep not needed.

Quoted 34 lines
Quoted 34 lines
drivers/timer/timer-uclass.c +14 -0
+                               if (ret)
+                                       return ret;
+                       }
+               }
+       }
+
+       if (dev) {
+               gd->timer = dev;
+               return 0;
+       }
+
+       return -ENODEV;
+}
+
 UCLASS_DRIVER(timer) = {
        .id             = UCLASS_TIMER,
        .name           = "timer",
lib/time.c +0 -8
index f37a662..d4060f1 100644
@@ -43,17 +43,8 @@ extern unsigned long __weak timer_read_counter(void);
 #ifdef CONFIG_TIMER
 static int notrace dm_timer_init(void)
 {
-       struct udevice *dev;
-       int ret;
-
-       if (!gd->timer) {
-               ret = uclass_first_device(UCLASS_TIMER, &dev);
-               if (ret)
-                       return ret;
-               if (!dev)
Quoted 8 lines

lib/time.c extern unsigned long __weak timer_read_counter(void); · line 47

Quoted 5 lines
lib/time.c +2 -3
-                       return -ENODEV;
-               gd->timer = dev;
-       }
+       if (!gd->timer)
+               return timer_init();

What about my comments in v2, that make timer_init() static or just move codes in timer_init() into this dm_timer_init()?

Oops, missed :)

The timer_init() code can be moved to dm_timer_init(), but since it provides timer uclass functionality I kept the code in timer-uclass driver.

Quoted 6 lines

Now since dm_timer_init() doesn't have any thing other than calling timer_init, I will move the dm_timer_init() to timer_uclass and move timer_init code to it.

Regards
Mugunthan V N

Can you please add these changes in a follow-up commit? I'd like to apply this series.

Applied to u-boot-dm, thanks!

#11 lore raw

PATCH v4 2/19 dm: timer: uclass: add timer init in uclass driver to add timer device

In reply to Mugunthan V N

Adding timer init function in timer-uclass driver 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.

---
 doc/device-tree-bindings/chosen.txt | 43 ++++++++++++++++++++++++++++++++++++
 drivers/timer/timer-uclass.c        | 44 +++++++++++++++++++++++++++++++++++++
 include/timer.h                     |  9 ++++++++
 lib/time.c                          | 17 --------------
 4 files changed, 96 insertions(+), 17 deletions(-)
 create mode 100644 doc/device-tree-bindings/chosen.txt

Changes from v3:
* removed dm_timer_init() in lib/time.c as it doesn't add anything and simply calls uclass driver's init and also renamed timer_init() to dm_timer_init() as many platforms calls timer_init() before dm init.
* removed re-declaring of ret in dm_timer_init()

Tested this patch on DRA74x EVM (logs [1]) with sleep 10 with minicom timestamps and pushed a branch [2] for testing.

[1] - http://pastebin.ubuntu.com/14520385/
[2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-timer-v4

---

doc/device-tree-bindings/chosen.txt new file +43 -0
new file mode 100644
index 0000000..bf9a30a
@@ -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 at f00";
+	};
+
+	timer2 at f00 {
+		compatible = "vendor,some-timer";
+		reg = <0xf00 0x10>;
+	};
+};
drivers/timer/timer-uclass.c +44 -0

56 lines not on this page · raw message

include/timer.h +9 -0
index 7fee17e..f14725c 100644
@@ -8,6 +8,15 @@
 #define _TIMER_H_
 
 /*
+ * dm_timer_init - initialize a timer for time keeping. On success
+ * initializes gd->timer so that lib/timer can use it for future
+ * referrence.
+ *
+ * @return - 0 on success or error number
+ */
+int dm_timer_init(void);
+
+/*
  * timer_conv_64 - convert 32-bit counter value to 64-bit
  *
  * @count: 32-bit counter value
lib/time.c +0 -17
index f37a662..e9f6861 100644
@@ -41,23 +41,6 @@ extern unsigned long __weak timer_read_counter(void);
 #endif
 
 #ifdef CONFIG_TIMER
-static int notrace dm_timer_init(void)
-{
-	struct udevice *dev;
-	int ret;
-
-	if (!gd->timer) {
-		ret = uclass_first_device(UCLASS_TIMER, &dev);
-		if (ret)
-			return ret;
-		if (!dev)
-			return -ENODEV;
-		gd->timer = dev;
-	}
-
-	return 0;
-}
-
 ulong notrace get_tbclk(void)
 {
 	int ret;
Signature · 1 line
2.7.0.rc3
#12 lore raw

PATCH v4 2/19 dm: timer: uclass: add timer init in uclass driver to add timer device

Quoted 7 lines · Mugunthan V N

Adding timer init function in timer-uclass driver 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.

Please drop this patch, will send a fixup patch as the series is already applied to u-boot-dm tree.

Regards
Mugunthan V N

#13 lore raw

PATCH v4 2/19 dm: timer: uclass: add timer init in uclass driver to add timer device

Hi Mugunthan,

Quoted 11 lines · Mugunthan V N
Quoted 7 lines · Mugunthan V N

Adding timer init function in timer-uclass driver 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.

Please drop this patch, will send a fixup patch as the series is already applied to u-boot-dm tree.

You can send a new patch if you like and I can replace it. Either works for me.

Regards,
Simon

#14 lore raw

PATCH v4 2/19 dm: timer: uclass: add timer init in uclass driver to add timer device

Quoted 10 lines · Simon Glass

Hi Mugunthan,

Quoted 7 lines · Mugunthan V N
Quoted 6 lines · Mugunthan V N

Adding timer init function in timer-uclass driver 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.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Please drop this patch, will send a fixup patch as the series is already applied to u-boot-dm tree.

You can send a new patch if you like and I can replace it. Either works for me.

Just sent a follow-up patch. Its good to not change the pushed history.

Regards
Mugunthan V N

#15 lore raw

PATCH v4 2/19 dm: timer: uclass: add timer init in uclass driver to add timer device

Hi Mugunthan,

Quoted 13 lines · Mugunthan V N
Quoted 12 lines · Simon Glass

Hi Mugunthan,

Quoted 9 lines · Mugunthan V N
Quoted 7 lines · Mugunthan V N

Adding timer init function in timer-uclass driver 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.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Please drop this patch, will send a fixup patch as the series is already applied to u-boot-dm tree.

You can send a new patch if you like and I can replace it. Either works for me.

Just sent a follow-up patch. Its good to not change the pushed history.

I actually do this all the time as I rebase against master before testing and sending pull requests. It helps to avoid conflicts for Tom to deal with.

So since you have given me two options, I've pick up this patch and replaced the v3 patch with it. I checked that the effect is the same as applying your fix-up. The patches were sitting around since Christmas so I wanted to get them in to permit the maximum possible testing window.

Applied to u-boot-dm, thanks!

Regards,
Simon

#16 lore raw

PATCH v2 3/19 dm: timer: uclass: Add flag to control sequence numbering

In reply to Mugunthan V N

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.

---
 drivers/timer/timer-uclass.c | 1 +
 1 file changed, 1 insertion(+)
drivers/timer/timer-uclass.c +1 -0
index db43611..abeb060 100644
@@ -102,5 +102,6 @@ UCLASS_DRIVER(timer) = {
 	.id		= UCLASS_TIMER,
 	.name		= "timer",
 	.pre_probe	= timer_pre_probe,
+	.flags		= DM_UC_FLAG_SEQ_ALIAS,
 	.per_device_auto_alloc_size = sizeof(struct timer_dev_priv),
 };
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#17 lore raw

PATCH v2 3/19 dm: timer: uclass: Add flag to control sequence numbering

Quoted 7 lines · Mugunthan V N

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/bb9585bb/attachment.sig>
#18 lore raw

PATCH v2 3/19 dm: timer: uclass: Add flag to control sequence numbering

In reply to Mugunthan V N
Quoted 10 lines · Mugunthan V N

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.

---
 drivers/timer/timer-uclass.c | 1 +
 1 file changed, 1 insertion(+)
#19 lore raw

PATCH v2 3/19 dm: timer: uclass: Add flag to control sequence numbering

Quoted 5 lines · Simon Glass
Quoted 4 lines · Mugunthan V N

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.

Quoted 8 lines
Quoted 6 lines
---
 drivers/timer/timer-uclass.c | 1 +
 1 file changed, 1 insertion(+)

Applied to u-boot-dm, thanks!

#20 lore raw

PATCH v2 4/19 drivers: timer: omap_timer: add timer driver for omap devices based on dm

In reply to Mugunthan V N

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

---
 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
drivers/timer/Kconfig +6 -0
index 2b10d2b..ff65a73 100644
@@ -30,4 +30,10 @@ config X86_TSC_TIMER
 	help
 	  Select this to enable Time-Stamp Counter (TSC) timer for x86.
 
+config OMAP_TIMER
+	bool "Omap timer support"
+	depends on TIMER
+	help
+	  Select this to enable an timer for Omap devices.
+
 endmenu
drivers/timer/Makefile +1 -0
index fe954ec..f351fbb 100644
@@ -8,3 +8,4 @@ obj-$(CONFIG_TIMER)		+= timer-uclass.o
 obj-$(CONFIG_ALTERA_TIMER)	+= altera_timer.o
 obj-$(CONFIG_SANDBOX_TIMER)	+= sandbox_timer.o
 obj-$(CONFIG_X86_TSC_TIMER)	+= tsc_timer.o
+obj-$(CONFIG_OMAP_TIMER)	+= omap-timer.o
drivers/timer/omap-timer.c new file +108 -0

108 lines not on this page · raw message

Signature · 1 line
2.7.0.rc1.5.gf3adf45
#21 lore raw

PATCH v2 4/19 drivers: timer: omap_timer: add timer driver for omap devices based on dm

Quoted 4 lines · Mugunthan V N

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

[snip]

drivers/timer/omap-timer.c line 97

Quoted 6 lines
drivers/timer/omap-timer.c new file +6 -0
+static const struct udevice_id omap_timer_ids[] = {
+	{ .compatible = "ti,am335x-timer" },
+	{ .compatible = "ti,am4372-timer" },
+	{ .compatible = "ti,omap5430-timer" },
+	{}
+};

This is the same IP block that's been used "forever" yes? Can we add in the compatibles for omap3 (and ti81xx?) as well so it will just work as those get brought over as well?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/d9ee0b3e/attachment.sig>
#22 lore raw

PATCH v2 4/19 drivers: timer: omap_timer: add timer driver for omap devices based on dm

In reply to Mugunthan V N
Quoted 10 lines · Mugunthan V N

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

---
 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

Applied to u-boot-dm, thanks!

Please address comments in a follow-up patch.

#23 lore raw

PATCH v2 5/19 am43xx_evm: timer: do not define CONFIG_TIMER for spl

In reply to Mugunthan V N

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

---
 include/configs/am43xx_evm.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/am43xx_evm.h +1 -0
index aac550a..9980203 100644
@@ -142,6 +142,7 @@
  */
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
+#undef CONFIG_TIMER
 #endif
 
 #ifndef CONFIG_SPL_BUILD
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#24 lore raw

PATCH v2 5/19 am43xx_evm: timer: do not define CONFIG_TIMER for spl

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/aa413720/attachment.sig>
#25 lore raw

PATCH v2 5/19 am43xx_evm: timer: do not define CONFIG_TIMER for spl

In reply to Mugunthan V N
Quoted 7 lines · Mugunthan V N

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

---
 include/configs/am43xx_evm.h | 1 +
 1 file changed, 1 insertion(+)

Applied to u-boot-dm, thanks!

#26 lore raw

PATCH v2 6/19 arm: dts: am437x-sk-evm: add tick-timer to chosen node

In reply to Mugunthan V N

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

---
 arch/arm/dts/am437x-sk-evm.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/am437x-sk-evm.dts +1 -0
index 3f9d808..85d3381 100644
@@ -26,6 +26,7 @@
 
 	chosen {
 		stdout-path = &uart0;
+		tick-timer = &timer2;
 	};
 
 	backlight {
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#27 lore raw

PATCH v2 6/19 arm: dts: am437x-sk-evm: add tick-timer to chosen node

Quoted 3 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/c690eaf5/attachment.sig>
#29 lore raw

PATCH v2 7/19 defconfig: am437x_sk_evm: enable timer driver model

In reply to Mugunthan V N

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

---
 configs/am437x_sk_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/am437x_sk_evm_defconfig +2 -0
index a9b6f52..56a7b11 100644
@@ -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
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#30 lore raw

PATCH v2 7/19 defconfig: am437x_sk_evm: enable timer driver model

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/3b8abb7d/attachment.sig>
#32 lore raw

PATCH v2 8/19 arm: dts: am437x-gp-evm: add tick-timer to chosen node

In reply to Mugunthan V N

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

---
 arch/arm/dts/am437x-gp-evm.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/am437x-gp-evm.dts +1 -0
index b5f0b4e..8e23b96 100644
@@ -26,6 +26,7 @@
 
 	chosen {
 		stdout-path = &uart0;
+		tick-timer = &timer2;
 	};
 
 	vmmcsd_fixed: fixedregulator-sd {
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#33 lore raw

PATCH v2 8/19 arm: dts: am437x-gp-evm: add tick-timer to chosen node

Quoted 3 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/2547ff03/attachment.sig>
#35 lore raw

PATCH v2 9/19 defconfig: am437x_gp_evm: enable timer driver model

In reply to Mugunthan V N

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

---
 configs/am437x_gp_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/am437x_gp_evm_defconfig +2 -0
index 7155c98..1d79ba19 100644
@@ -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
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#36 lore raw

PATCH v2 9/19 defconfig: am437x_gp_evm: enable timer driver model

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/5bc8d708/attachment.sig>
#38 lore raw

PATCH v2 10/19 am335x_evm: timer: do not define CONFIG_TIMER for spl

In reply to Mugunthan V N

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

---
 include/configs/am335x_evm.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/am335x_evm.h +1 -0
index c51db8c..d93fdf1 100644
@@ -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)
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#39 lore raw

PATCH v2 10/19 am335x_evm: timer: do not define CONFIG_TIMER for spl

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/9070d45c/attachment.sig>
#41 lore raw

PATCH v2 11/19 arm: dts: am335x-boneblack: add tick-timer to chosen node

In reply to Mugunthan V N

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

---
 arch/arm/dts/am335x-boneblack.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/am335x-boneblack.dts +1 -0
index 679248a..27ebe4a 100644
@@ -15,6 +15,7 @@
 	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
 	chosen {
 		stdout-path = &uart0;
+		tick-timer = &timer2;
 	};
 };
 
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#42 lore raw

PATCH v2 11/19 arm: dts: am335x-boneblack: add tick-timer to chosen node

Quoted 3 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/dec4b318/attachment.sig>
#44 lore raw

PATCH v2 12/19 defconfig: am335x_boneblack_vboot: enable timer driver model

In reply to Mugunthan V N

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

---
 configs/am335x_boneblack_vboot_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/am335x_boneblack_vboot_defconfig +2 -0
index ad40b07..888d5b1 100644
@@ -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
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#45 lore raw

PATCH v2 12/19 defconfig: am335x_boneblack_vboot: enable timer driver model

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/c0972411/attachment.sig>
#47 lore raw

PATCH v2 13/19 arm: dts: am335x-evm: add tick-timer to chosen node

In reply to Mugunthan V N

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

---
 arch/arm/dts/am335x-evm.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/am335x-evm.dts +1 -0
index e1c5d4f..c0bc2af 100644
@@ -16,6 +16,7 @@
 
 	chosen {
 		stdout-path = &uart0;
+		tick-timer = &timer2;
 	};
 
 	cpus {
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#48 lore raw

PATCH v2 13/19 arm: dts: am335x-evm: add tick-timer to chosen node

Quoted 3 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/f39d7d97/attachment.sig>
#50 lore raw

PATCH v2 14/19 defconfig: am335x_gp_evm: enable timer driver model

In reply to Mugunthan V N

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

---
 configs/am335x_gp_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/am335x_gp_evm_defconfig +2 -0
index 74d9ffb..49461e2 100644
@@ -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
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#51 lore raw

PATCH v2 14/19 defconfig: am335x_gp_evm: enable timer driver model

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/a39d5675/attachment.sig>
#53 lore raw

PATCH v2 15/19 ti_omap5_common: timer: do not define CONFIG_TIMER for spl

In reply to Mugunthan V N

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

---
 include/configs/ti_omap5_common.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/ti_omap5_common.h +1 -0
index 2d492f8..d164e6a 100644
@@ -164,6 +164,7 @@
  */
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
+#undef CONFIG_TIMER
 #endif
 
 #endif /* __CONFIG_TI_OMAP5_COMMON_H */
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#54 lore raw

PATCH v2 15/19 ti_omap5_common: timer: do not define CONFIG_TIMER for spl

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/09584f3a/attachment.sig>
#56 lore raw

PATCH v2 16/19 arm: dts: dra72-evm: add tick-timer to chosen node

In reply to Mugunthan V N

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

---
 arch/arm/dts/dra72-evm.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/dra72-evm.dts +1 -0
index efb544c..6e3bbfd 100644
@@ -16,6 +16,7 @@
 
 	chosen {
 		stdout-path = &uart1;
+		tick-timer = &timer2;
 	};
 
 	memory {
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#57 lore raw

PATCH v2 16/19 arm: dts: dra72-evm: add tick-timer to chosen node

Quoted 3 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/948f0850/attachment.sig>
#59 lore raw

PATCH v2 17/19 defconfig: dra72_evm: enable timer driver model

In reply to Mugunthan V N

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

---
 configs/dra72_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/dra72_evm_defconfig +2 -0
index 3205bd5..530a25e 100644
@@ -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
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#60 lore raw

PATCH v2 17/19 defconfig: dra72_evm: enable timer driver model

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/0c317fcf/attachment.sig>
#62 lore raw

PATCH v2 18/19 arm: dts: dra7-evm: add tick-timer to chosen node

In reply to Mugunthan V N

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

---
 arch/arm/dts/dra7-evm.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/dra7-evm.dts +1 -0
index e4daa99..2568aad 100644
@@ -16,6 +16,7 @@
 
 	chosen {
 		stdout-path = &uart1;
+		tick-timer = &timer2;
 	};
 
 	memory {
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#63 lore raw

PATCH v2 18/19 arm: dts: dra7-evm: add tick-timer to chosen node

Quoted 3 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/6d946821/attachment.sig>
#65 lore raw

PATCH v2 19/19 defconfig: dra74_evm: enable timer driver model

In reply to Mugunthan V N

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

---
 configs/dra74_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/dra74_evm_defconfig +2 -0
index 394edbe..a68870e 100644
@@ -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
Signature · 1 line
2.7.0.rc1.5.gf3adf45
#66 lore raw

PATCH v2 19/19 defconfig: dra74_evm: enable timer driver model

Quoted 4 lines · Mugunthan V N

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/3d1ce496/attachment.sig>