mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
Revert "dm: ns16550: Add support for reg-offset property"
This reverts commit d9a3bec682
.
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>
This commit is contained in:
parent
50dc8677d7
commit
e5e88c6596
2 changed files with 2 additions and 5 deletions
|
@ -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
|
* 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.
|
* 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)
|
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;
|
offset *= 1 << plat->reg_shift;
|
||||||
addr = map_physmem(plat->base, 0, MAP_NOCACHE) + offset;
|
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 */
|
/* 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;
|
return -EINVAL;
|
||||||
|
|
||||||
plat->base = addr;
|
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,
|
plat->reg_shift = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
|
||||||
"reg-shift", 0);
|
"reg-shift", 0);
|
||||||
plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
|
plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
*/
|
*/
|
||||||
struct ns16550_platdata {
|
struct ns16550_platdata {
|
||||||
unsigned long base;
|
unsigned long base;
|
||||||
int reg_offset;
|
|
||||||
int reg_shift;
|
int reg_shift;
|
||||||
int clock;
|
int clock;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue