All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] cpu: bmips: fix probe to get the address
@ 2018-06-22 16:52 Philippe Reynes
  2018-06-29 15:32 ` Daniel Schwierzeck
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Reynes @ 2018-06-22 16:52 UTC (permalink / raw)
  To: u-boot

In the device tree, the address for cpu is located in
the node "cpus", not in the cpu node (for exemple cpu at 0).
So when probing cpu, the cpu address must be read in the
cpu parent.

The commit "cpu: bmips: convert to use live dt"
(sha1: c444afbbefa103d567f197393d39ec0fcca21a0c)
change this behaviour and read the address in the
cpu node when probing cpu.

We fix this by reading the address in the cpu parent.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 drivers/cpu/bmips_cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
index f5bacd2..78560b0 100644
--- a/drivers/cpu/bmips_cpu.c
+++ b/drivers/cpu/bmips_cpu.c
@@ -407,7 +407,7 @@ int bmips_cpu_probe(struct udevice *dev)
 	const struct bmips_cpu_hw *hw =
 		(const struct bmips_cpu_hw *)dev_get_driver_data(dev);
 
-	priv->regs = dev_remap_addr(dev);
+	priv->regs = dev_remap_addr(dev_get_parent(dev));
 	if (!priv->regs)
 		return -EINVAL;
 
-- 
2.7.4

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

* [U-Boot] [PATCH] cpu: bmips: fix probe to get the address
  2018-06-22 16:52 [U-Boot] [PATCH] cpu: bmips: fix probe to get the address Philippe Reynes
@ 2018-06-29 15:32 ` Daniel Schwierzeck
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Schwierzeck @ 2018-06-29 15:32 UTC (permalink / raw)
  To: u-boot



On 22.06.2018 18:52, Philippe Reynes wrote:
> In the device tree, the address for cpu is located in
> the node "cpus", not in the cpu node (for exemple cpu at 0).
> So when probing cpu, the cpu address must be read in the
> cpu parent.
> 
> The commit "cpu: bmips: convert to use live dt"
> (sha1: c444afbbefa103d567f197393d39ec0fcca21a0c)
> change this behaviour and read the address in the
> cpu node when probing cpu.
> 
> We fix this by reading the address in the cpu parent.
> 
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
> ---
>  drivers/cpu/bmips_cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

applied to u-boot-mips, thanks.

-- 
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180629/6001c20a/attachment.sig>

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

end of thread, other threads:[~2018-06-29 15:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22 16:52 [U-Boot] [PATCH] cpu: bmips: fix probe to get the address Philippe Reynes
2018-06-29 15:32 ` Daniel Schwierzeck

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.