U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Revert "dm: ns16550: Add support for reg-offset property"
@ 2016-02-29 15:29 Tom Rini
  2016-02-29 15:32 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2016-02-29 15:29 UTC (permalink / raw)
  To: u-boot

This reverts commit d9a3bec682f9756621615f4306718a356a3230e3.

While this is a correct change to do long term it unfortunately breaks a
number of platforms that are using pdata and not named struct members so
they are getting all of their data after 'base' incorrect.

Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 drivers/serial/ns16550.c |    6 ++----
 include/ns16550.h        |    1 -
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 28da9dd..93dad33 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -105,7 +105,7 @@ static void ns16550_writeb(NS16550_t port, int offset, int value)
 	 * As far as we know it doesn't make sense to support selection of
 	 * these options at run-time, so use the existing CONFIG options.
 	 */
-	serial_out_shift(addr + plat->reg_offset, plat->reg_shift, value);
+	serial_out_shift(addr, plat->reg_shift, value);
 }
 
 static int ns16550_readb(NS16550_t port, int offset)
@@ -116,7 +116,7 @@ static int ns16550_readb(NS16550_t port, int offset)
 	offset *= 1 << plat->reg_shift;
 	addr = map_physmem(plat->base, 0, MAP_NOCACHE) + offset;
 
-	return serial_in_shift(addr + plat->reg_offset, plat->reg_shift);
+	return serial_in_shift(addr, plat->reg_shift);
 }
 
 /* We can clean these up once everything is moved to driver model */
@@ -401,8 +401,6 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
 		return -EINVAL;
 
 	plat->base = addr;
-	plat->reg_offset = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
-				     "reg-offset", 0);
 	plat->reg_shift = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
 					 "reg-shift", 0);
 	plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
diff --git a/include/ns16550.h b/include/ns16550.h
index 5eeacd6..4e62067 100644
--- a/include/ns16550.h
+++ b/include/ns16550.h
@@ -54,7 +54,6 @@
  */
 struct ns16550_platdata {
 	unsigned long base;
-	int reg_offset;
 	int reg_shift;
 	int clock;
 };
-- 
1.7.9.5

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

* [U-Boot] [PATCH] Revert "dm: ns16550: Add support for reg-offset property"
  2016-02-29 15:29 [U-Boot] [PATCH] Revert "dm: ns16550: Add support for reg-offset property" Tom Rini
@ 2016-02-29 15:32 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2016-02-29 15:32 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 29, 2016 at 10:29:21AM -0500, Tom Rini wrote:

> This reverts commit d9a3bec682f9756621615f4306718a356a3230e3.
> 
> While this is a correct change to do long term it unfortunately breaks a
> number of platforms that are using pdata and not named struct members so
> they are getting all of their data after 'base' incorrect.
> 
> Acked-by: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
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/20160229/9c9a2910/attachment.sig>

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 15:29 [U-Boot] [PATCH] Revert "dm: ns16550: Add support for reg-offset property" Tom Rini
2016-02-29 15:32 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox