From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/7] serial: bcm283x_mu: Remove support for post-init disabling
Date: Wed, 17 Jan 2018 09:54:55 +0100 [thread overview]
Message-ID: <20180117085458.27293-5-agraf@suse.de> (raw)
In-Reply-To: <20180117085458.27293-1-agraf@suse.de>
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>
---
drivers/serial/serial_bcm283x_mu.c | 18 +-----------------
include/dm/platform_data/serial_bcm283x_mu.h | 1 -
2 files changed, 1 insertion(+), 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(®s->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(®s->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(®s->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
--
2.12.3
next prev parent reply other threads:[~2018-01-17 8:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 8:54 [U-Boot] [PATCH v2 0/7] RPi: Properly handle dynamic serial configuration Alexander Graf
2018-01-17 8:54 ` [U-Boot] [PATCH v2 1/7] serial: Use next serial device if probing fails Alexander Graf
2018-01-17 10:54 ` Heinrich Schuchardt
2018-01-17 19:34 ` Simon Glass
2018-01-17 22:02 ` Alexander Graf
2018-01-17 8:54 ` [U-Boot] [PATCH v2 2/7] serial: Allow boards to determine whether a serial device is usable Alexander Graf
2018-01-17 19:39 ` Simon Glass
2018-01-17 22:03 ` Alexander Graf
2018-01-17 22:11 ` Simon Glass
2018-01-17 22:37 ` Alexander Graf
2018-01-17 23:18 ` Simon Glass
2018-01-17 8:54 ` [U-Boot] [PATCH v2 3/7] rpi: Remove runtime disabling support for serial Alexander Graf
2018-01-17 8:54 ` Alexander Graf [this message]
2018-01-17 8:54 ` [U-Boot] [PATCH v2 5/7] rpi: Properly detect which serial device is active Alexander Graf
2018-01-17 19:46 ` Simon Glass
2018-01-17 22:05 ` Alexander Graf
2018-01-17 23:18 ` Simon Glass
2018-01-17 8:54 ` [U-Boot] [PATCH v2 6/7] rpi: Determine PL011/Mini-UART availability at runtime Alexander Graf
2018-01-17 8:54 ` [U-Boot] [PATCH v2 7/7] rpi: Force skip_init on serial devices Alexander Graf
2018-01-17 19:40 ` Simon Glass
2018-01-17 22:08 ` Alexander Graf
2018-01-17 23:18 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180117085458.27293-5-agraf@suse.de \
--to=agraf@suse.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox