Skip to contentSkip to conversation

watchdog: dm: Support manual relocation for watchdogs

PATCH New Michal Simek 3 participants 10 messages Jul 11, 2018 – Jul 20, 2018 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
drivers/watchdog/wdt-uclass.c +23 -0
index f6f2fe3739d3..23b7e3360d32 100644
@@ -63,8 +63,31 @@ int wdt_expire_now(struct udevice *dev, ulong flags)
 	return ret;
 }
 
+static int wdt_post_bind(struct udevice *dev)
+{
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
+	struct wdt_ops *ops = (struct wdt_ops *)device_get_ops(dev);
+	static int reloc_done;
+
+	if (!reloc_done) {
+		if (ops->start)
+			ops->start += gd->reloc_off;
+		if (ops->stop)
+			ops->stop += gd->reloc_off;
+		if (ops->reset)
+			ops->reset += gd->reloc_off;
+		if (ops->expire_now)
+			ops->expire_now += gd->reloc_off;
+
+		reloc_done++;
+	}
+#endif
+	return 0;
+}
+
 UCLASS_DRIVER(wdt) = {
 	.id		= UCLASS_WDT,
 	.name		= "watchdog",
 	.flags		= DM_UC_FLAG_SEQ_ALIAS,
+	.post_bind	= wdt_post_bind,
 };
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Quoted 4 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

Quoted 9 lines

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

When will the toolchain be fixed?

#2 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Quoted 10 lines · Simon Glass
Quoted 9 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

Quoted 8 lines
Quoted 4 lines
---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

When will the toolchain be fixed?

It is really several years back when I have looked at it last time but I think that toolchain is fixed for quite some time and only changes in microblaze u-boot code are needed but really I would have to check and start to play with it.

Thanks,
Michal

#3 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Hi Michal,

Quoted 16 lines · Michal Simek
Quoted 15 lines · Simon Glass
Quoted 13 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
Quoted 8 lines
Quoted 3 lines

When will the toolchain be fixed?

It is really several years back when I have looked at it last time but I think that toolchain is fixed for quite some time and only changes in microblaze u-boot code are needed but really I would have to check and start to play with it.

I think someone should sort this out. It would be good to remove this code. Is there a toolchain group at Xilinx?

Regards,
Simon

#4 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Quoted 23 lines · Simon Glass

Hi Michal,

Quoted 20 lines · Michal Simek
Quoted 18 lines · Simon Glass
Quoted 4 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

Quoted 9 lines

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

When will the toolchain be fixed?

Quoted 7 lines
Quoted 4 lines

It is really several years back when I have looked at it last time but I think that toolchain is fixed for quite some time and only changes in microblaze u-boot code are needed but really I would have to check and start to play with it.

I think someone should sort this out. It would be good to remove this code. Is there a toolchain group at Xilinx?

Xilinx has a toolchain group. I just looked a I was playing with it in January 2015 but didn't finish that. It is still on my long todo list. Will see when I have a time to look at it.

Thanks,
Michal

#5 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Hi Michal,

Quoted 29 lines · Michal Simek
Quoted 28 lines · Simon Glass

Hi Michal,

Quoted 24 lines · Michal Simek
Quoted 10 lines · Simon Glass
Quoted 9 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

Quoted 8 lines
Quoted 4 lines
---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

When will the toolchain be fixed?

It is really several years back when I have looked at it last time but I think that toolchain is fixed for quite some time and only changes in microblaze u-boot code are needed but really I would have to check and start to play with it.

Quoted 6 lines
Quoted 2 lines

I think someone should sort this out. It would be good to remove this code. Is there a toolchain group at Xilinx?

Xilinx has a toolchain group. I just looked a I was playing with it in January 2015 but didn't finish that. It is still on my long todo list. Will see when I have a time to look at it.

Hoe about next week? -:) I think this is pretty important.

Regards,
Simon

#6 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Hi Simon,

Quoted 32 lines · Simon Glass

Hi Michal,

Quoted 29 lines · Michal Simek
Quoted 28 lines · Simon Glass

Hi Michal,

Quoted 24 lines · Michal Simek
Quoted 10 lines · Simon Glass
Quoted 9 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

Quoted 8 lines
Quoted 4 lines
---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

When will the toolchain be fixed?

It is really several years back when I have looked at it last time but I think that toolchain is fixed for quite some time and only changes in microblaze u-boot code are needed but really I would have to check and start to play with it.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

I think someone should sort this out. It would be good to remove this code. Is there a toolchain group at Xilinx?

Xilinx has a toolchain group. I just looked a I was playing with it in January 2015 but didn't finish that. It is still on my long todo list. Will see when I have a time to look at it.

Hoe about next week? -:) I think this is pretty important.

will see but I need to do some Linux work first. Based on grep I see that m68k is also enabling CONFIG_NEEDS_MANUAL_RELOC.
Is m68k going to be removed soon?

Thanks,
Michal

#7 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

+Tom

Hi Michal,

Quoted 42 lines · Michal Simek

Hi Simon,

Quoted 39 lines · Simon Glass

Hi Michal,

Quoted 35 lines · Michal Simek
Quoted 23 lines · Simon Glass

Hi Michal,

Quoted 20 lines · Michal Simek
Quoted 18 lines · Simon Glass
Quoted 4 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

Quoted 9 lines

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

When will the toolchain be fixed?

Quoted 7 lines
Quoted 4 lines

It is really several years back when I have looked at it last time but I think that toolchain is fixed for quite some time and only changes in microblaze u-boot code are needed but really I would have to check and start to play with it.

I think someone should sort this out. It would be good to remove this code. Is there a toolchain group at Xilinx?

Xilinx has a toolchain group. I just looked a I was playing with it in January 2015 but didn't finish that. It is still on my long todo list. Will see when I have a time to look at it.

Quoted 5 lines
Quoted 1 line

Hoe about next week? -:) I think this is pretty important.

will see but I need to do some Linux work first. Based on grep I see that m68k is also enabling CONFIG_NEEDS_MANUAL_RELOC.
Is m68k going to be removed soon?

I am not sure about that. Tom, do you know?

Regards,
Simon

#8 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Quoted 47 lines · Simon Glass

+Tom

Hi Michal,

Quoted 42 lines · Michal Simek

Hi Simon,

Quoted 39 lines · Simon Glass

Hi Michal,

Quoted 35 lines · Michal Simek
Quoted 23 lines · Simon Glass

Hi Michal,

Quoted 20 lines · Michal Simek
Quoted 18 lines · Simon Glass
Quoted 4 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

Quoted 9 lines

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

When will the toolchain be fixed?

Quoted 7 lines
Quoted 4 lines

It is really several years back when I have looked at it last time but I think that toolchain is fixed for quite some time and only changes in microblaze u-boot code are needed but really I would have to check and start to play with it.

I think someone should sort this out. It would be good to remove this code. Is there a toolchain group at Xilinx?

Xilinx has a toolchain group. I just looked a I was playing with it in January 2015 but didn't finish that. It is still on my long todo list. Will see when I have a time to look at it.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Hoe about next week? -:) I think this is pretty important.

will see but I need to do some Linux work first. Based on grep I see that m68k is also enabling CONFIG_NEEDS_MANUAL_RELOC.
Is m68k going to be removed soon?

I am not sure about that. Tom, do you know?

m68k is still active, so no, it's not being removed and we can't drop CONFIG_NEEDS_MANUAL_RELOC just yet.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180719/61ae9a61/attachment.sig>
#9 lore raw

PATCH 1/1 watchdog: dm: Support manual relocation for watchdogs

Hi,

Quoted 50 lines · Tom Rini
Quoted 49 lines · Simon Glass

+Tom

Hi Michal,

Quoted 44 lines · Michal Simek

Hi Simon,

Quoted 40 lines · Simon Glass

Hi Michal,

Quoted 29 lines · Michal Simek
Quoted 28 lines · Simon Glass

Hi Michal,

Quoted 24 lines · Michal Simek
Quoted 10 lines · Simon Glass
Quoted 9 lines · Michal Simek

Relocate watchdog ops as was done by:
"dm: Add support for all targets which requires MANUAL_RELOC" (sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)

---

based on https://lists.denx.de/pipermail/u-boot/2018-July/334227.html

Quoted 8 lines
Quoted 4 lines
---
 drivers/watchdog/wdt-uclass.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

When will the toolchain be fixed?

It is really several years back when I have looked at it last time but I think that toolchain is fixed for quite some time and only changes in microblaze u-boot code are needed but really I would have to check and start to play with it.

Quoted 6 lines
Quoted 2 lines

I think someone should sort this out. It would be good to remove this code. Is there a toolchain group at Xilinx?

Xilinx has a toolchain group. I just looked a I was playing with it in January 2015 but didn't finish that. It is still on my long todo list. Will see when I have a time to look at it.

Hoe about next week? -:) I think this is pretty important.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

will see but I need to do some Linux work first. Based on grep I see that m68k is also enabling CONFIG_NEEDS_MANUAL_RELOC.
Is m68k going to be removed soon?

I am not sure about that. Tom, do you know?

m68k is still active, so no, it's not being removed and we can't drop CONFIG_NEEDS_MANUAL_RELOC just yet.

Thanks Tom.

That begs the question - how is relocation support coming along with m68k?

Regards,
Simon