dm: Use access methods for dev/uclass private data

Most drivers use these access methods but a few do not. Update them.

In some cases the access is not permitted, so mark those with a FIXME tag
for the maintainer to check.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 2603fa8..e5795da 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -264,7 +264,7 @@
 
 int mxc_serial_setbrg(struct udevice *dev, int baudrate)
 {
-	struct mxc_serial_plat *plat = dev->plat;
+	struct mxc_serial_plat *plat = dev_get_plat(dev);
 	u32 clk = imx_get_uartclk();
 
 	_mxc_serial_setbrg(plat->reg, clk, baudrate, plat->use_dte);
@@ -274,7 +274,7 @@
 
 static int mxc_serial_probe(struct udevice *dev)
 {
-	struct mxc_serial_plat *plat = dev->plat;
+	struct mxc_serial_plat *plat = dev_get_plat(dev);
 
 	_mxc_serial_init(plat->reg, plat->use_dte);
 
@@ -283,7 +283,7 @@
 
 static int mxc_serial_getc(struct udevice *dev)
 {
-	struct mxc_serial_plat *plat = dev->plat;
+	struct mxc_serial_plat *plat = dev_get_plat(dev);
 	struct mxc_uart *const uart = plat->reg;
 
 	if (readl(&uart->ts) & UTS_RXEMPTY)
@@ -294,7 +294,7 @@
 
 static int mxc_serial_putc(struct udevice *dev, const char ch)
 {
-	struct mxc_serial_plat *plat = dev->plat;
+	struct mxc_serial_plat *plat = dev_get_plat(dev);
 	struct mxc_uart *const uart = plat->reg;
 
 	if (!(readl(&uart->ts) & UTS_TXEMPTY))
@@ -307,7 +307,7 @@
 
 static int mxc_serial_pending(struct udevice *dev, bool input)
 {
-	struct mxc_serial_plat *plat = dev->plat;
+	struct mxc_serial_plat *plat = dev_get_plat(dev);
 	struct mxc_uart *const uart = plat->reg;
 	uint32_t sr2 = readl(&uart->sr2);
 
@@ -327,7 +327,7 @@
 #if CONFIG_IS_ENABLED(OF_CONTROL)
 static int mxc_serial_of_to_plat(struct udevice *dev)
 {
-	struct mxc_serial_plat *plat = dev->plat;
+	struct mxc_serial_plat *plat = dev_get_plat(dev);
 	fdt_addr_t addr;
 
 	addr = dev_read_addr(dev);