From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: [PATCH 4/4] MIPS: BCM47xx: Setup and register serial early
Date: Wed, 28 Jul 2010 17:23:49 +0400 [thread overview]
Message-ID: <4C502F65.2020701@mvista.com> (raw)
In-Reply-To: <1280261566-8247-5-git-send-email-hauke@hauke-m.de>
Hello.
Hauke Mehrtens wrote:
> Swap the first and second serial if console=ttyS1 was set.
> Set it up and register it for early serial support.
> This patch has been in OpenWRT for a long time.
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[...]
> diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
> index 516ac89..a40d88e 100644
> --- a/arch/mips/bcm47xx/setup.c
> +++ b/arch/mips/bcm47xx/setup.c
[...]
> @@ -190,12 +192,45 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
>
> void __init plat_mem_setup(void)
> {
> - int err;
> + int i, err;
> + char buf[100];
> + struct ssb_mipscore *mcore;
>
> err = ssb_bus_ssbbus_register(&ssb_bcm47xx, SSB_ENUM_BASE,
> bcm47xx_get_invariants);
> if (err)
> panic("Failed to initialize SSB bus (err %d)\n", err);
> + mcore = &ssb_bcm47xx.mipscore;
> +
> + nvram_getenv("kernel_args", buf, sizeof(buf));
> + if (!strncmp(buf, "console=ttyS1", 13)) {
Perhaps strstr()? Else you're limiting the console= parameter to always
come first in the command line...
> + for (i = 0; i < mcore->nr_serial_ports; i++) {
> + struct ssb_serial_port *port = &(mcore->serial_ports[i]);
> + struct uart_port s;
> +
> + memset(&s, 0, sizeof(s));
> + s.line = i;
> + s.mapbase = (unsigned int) port->regs;
> + s.membase = port->regs;
Is the MMIO region identity-mapped? Why you have the same value in the
'mapbase' and 'membase' fields?
WBR, Sergei
next prev parent reply other threads:[~2010-07-28 13:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 20:12 [PATCH 0/4] MIPS: BCM47xx: Platfrom updates from OpenWRT Hauke Mehrtens
2010-07-27 20:12 ` [PATCH 1/4] MIPS: BCM47xx: Really fix 128MB RAM problem Hauke Mehrtens
2010-08-02 15:20 ` Ralf Baechle
2010-07-27 20:12 ` [PATCH 2/4] MIPS: BCM47xx: Fill values for b43 into ssb sprom Hauke Mehrtens
2010-08-02 15:31 ` Ralf Baechle
2010-08-02 19:25 ` Ralf Baechle
2010-08-02 21:46 ` Hauke Mehrtens
2010-07-27 20:12 ` [PATCH 3/4] MIPS: BCM47xx: Activate SSB_B43_PCI_BRIDGE by default Hauke Mehrtens
2010-08-02 15:35 ` Ralf Baechle
2010-07-27 20:12 ` [PATCH 4/4] MIPS: BCM47xx: Setup and register serial early Hauke Mehrtens
2010-07-28 13:23 ` Sergei Shtylyov [this message]
2010-08-02 15:37 ` Ralf Baechle
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=4C502F65.2020701@mvista.com \
--to=sshtylyov@mvista.com \
--cc=hauke@hauke-m.de \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.