summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2018-01-25 12:05:44 +0100
committerTom Rini <trini@konsulko.com>2018-01-28 12:27:33 -0500
commitfc8523a1474d33dcc5f7fd1823563fbd73aa1876 (patch)
tree4591d0eefcb8c21d84a73710d1a4683adff94ce8
parent55b8a2ddaae407c8e9b4afe5cf33f848f0c4f49f (diff)
serial: bcm283x_mu: Remove support for post-init disabling
We are switching to a model where a serial device doesn't even get probed when it's not muxed properly, so we don't need device specific disabling functionality anymore. Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r--drivers/serial/serial_bcm283x_mu.c18
-rw-r--r--include/dm/platform_data/serial_bcm283x_mu.h1
2 files changed, 1 insertions, 18 deletions
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index 41c26b3d93..7ce990b9b8 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -59,7 +59,7 @@ static int bcm283x_mu_serial_setbrg(struct udevice *dev, int baudrate)
struct bcm283x_mu_regs *regs = priv->regs;
u32 divider;
- if (plat->disabled || plat->skip_init)
+ if (plat->skip_init)
return 0;
divider = plat->clock / (baudrate * 8);
@@ -75,9 +75,6 @@ static int bcm283x_mu_serial_probe(struct udevice *dev)
struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
struct bcm283x_mu_priv *priv = dev_get_priv(dev);
- if (plat->disabled)
- return -ENODEV;
-
priv->regs = (struct bcm283x_mu_regs *)plat->base;
return 0;
@@ -85,14 +82,10 @@ static int bcm283x_mu_serial_probe(struct udevice *dev)
static int bcm283x_mu_serial_getc(struct udevice *dev)
{
- struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
struct bcm283x_mu_priv *priv = dev_get_priv(dev);
struct bcm283x_mu_regs *regs = priv->regs;
u32 data;
- if (plat->disabled)
- return -EAGAIN;
-
/* Wait until there is data in the FIFO */
if (!(readl(&regs->lsr) & BCM283X_MU_LSR_RX_READY))
return -EAGAIN;
@@ -104,13 +97,9 @@ static int bcm283x_mu_serial_getc(struct udevice *dev)
static int bcm283x_mu_serial_putc(struct udevice *dev, const char data)
{
- struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
struct bcm283x_mu_priv *priv = dev_get_priv(dev);
struct bcm283x_mu_regs *regs = priv->regs;
- if (plat->disabled)
- return 0;
-
/* Wait until there is space in the FIFO */
if (!(readl(&regs->lsr) & BCM283X_MU_LSR_TX_EMPTY))
return -EAGAIN;
@@ -123,14 +112,10 @@ static int bcm283x_mu_serial_putc(struct udevice *dev, const char data)
static int bcm283x_mu_serial_pending(struct udevice *dev, bool input)
{
- struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
struct bcm283x_mu_priv *priv = dev_get_priv(dev);
struct bcm283x_mu_regs *regs = priv->regs;
unsigned int lsr;
- if (plat->disabled)
- return 0;
-
lsr = readl(&regs->lsr);
if (input) {
@@ -168,7 +153,6 @@ static int bcm283x_mu_serial_ofdata_to_platdata(struct udevice *dev)
1);
plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
"skip-init");
- plat->disabled = false;
return 0;
}
#endif
diff --git a/include/dm/platform_data/serial_bcm283x_mu.h b/include/dm/platform_data/serial_bcm283x_mu.h
index c47d3c0e60..57ae6adc05 100644
--- a/include/dm/platform_data/serial_bcm283x_mu.h
+++ b/include/dm/platform_data/serial_bcm283x_mu.h
@@ -19,7 +19,6 @@ struct bcm283x_mu_serial_platdata {
unsigned long base;
unsigned int clock;
bool skip_init;
- bool disabled;
};
#endif