Commit e5e88c65965b7c7e2d5dabd458b0e57dde2d6c17

Authored by Tom Rini
1 parent 50dc8677d7

Revert "dm: ns16550: Add support for reg-offset property"

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>

Showing 2 changed files with 2 additions and 5 deletions Side-by-side Diff

drivers/serial/ns16550.c
... ... @@ -105,7 +105,7 @@
105 105 * As far as we know it doesn't make sense to support selection of
106 106 * these options at run-time, so use the existing CONFIG options.
107 107 */
108   - serial_out_shift(addr + plat->reg_offset, plat->reg_shift, value);
  108 + serial_out_shift(addr, plat->reg_shift, value);
109 109 }
110 110  
111 111 static int ns16550_readb(NS16550_t port, int offset)
... ... @@ -116,7 +116,7 @@
116 116 offset *= 1 << plat->reg_shift;
117 117 addr = map_physmem(plat->base, 0, MAP_NOCACHE) + offset;
118 118  
119   - return serial_in_shift(addr + plat->reg_offset, plat->reg_shift);
  119 + return serial_in_shift(addr, plat->reg_shift);
120 120 }
121 121  
122 122 /* We can clean these up once everything is moved to driver model */
... ... @@ -401,8 +401,6 @@
401 401 return -EINVAL;
402 402  
403 403 plat->base = addr;
404   - plat->reg_offset = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
405   - "reg-offset", 0);
406 404 plat->reg_shift = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
407 405 "reg-shift", 0);
408 406 plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
... ... @@ -54,7 +54,6 @@
54 54 */
55 55 struct ns16550_platdata {
56 56 unsigned long base;
57   - int reg_offset;
58 57 int reg_shift;
59 58 int clock;
60 59 };