From: Michael Buesch <mb@bu3sch.de>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, bcm43xx-dev@lists.berlios.de,
Aurelien Jarno <aurelien@aurel32.net>
Subject: [patch 3/5] ssb: Read the UART divisor instead of setting it
Date: Sat, 11 Aug 2007 02:03:57 +0200 [thread overview]
Message-ID: <20070811000357.090532000@bu3sch.de> (raw)
In-Reply-To: 20070811000354.611868000@bu3sch.de
From: Aurelien Jarno <aurelien@aurel32.net>
I finally have one more patch for the SSB bus driver. I have ported the
BCM947xx code to the CFE API that is already in the kernel, and I have
seen that when the chip common driver initializes the serial port, it
breaks the CFE console (used as an early console until the serial port
is initialized). This is due to the change of the UART clock in
ssb_chipco_serial_init().
The patch below reads the current UART divisor value and use it to
compute baud_base instead of forcing a fixed divisor value. This limits
the maximum speed of the serial port, but don't forget the SSB bus runs
at around 100MHz. CFE initializes the divisor so that baud_base equals
1.8432MHz, which is already fast for a serial port.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Index: ssb-merge/drivers/ssb/driver_chipcommon.c
===================================================================
--- ssb-merge.orig/drivers/ssb/driver_chipcommon.c 2007-08-10 13:30:21.000000000 +0200
+++ ssb-merge/drivers/ssb/driver_chipcommon.c 2007-08-10 13:31:14.000000000 +0200
@@ -375,10 +375,8 @@ int ssb_chipco_serial_init(struct ssb_ch
} else if (cc->dev->id.revision >= 3) {
/* Internal backplane clock */
baud_base = ssb_clockspeed(bus);
- div = 2; /* Minimum divisor */
- chipco_write32(cc, SSB_CHIPCO_CLKDIV,
- (chipco_read32(cc, SSB_CHIPCO_CLKDIV)
- & ~SSB_CHIPCO_CLKDIV_UART) | div);
+ div = chipco_read32(cc, SSB_CHIPCO_CLKDIV)
+ & SSB_CHIPCO_CLKDIV_UART;
} else {
/* Fixed internal backplane clock */
baud_base = 88000000;
--
next prev parent reply other threads:[~2007-08-11 0:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070811000354.611868000@bu3sch.de>
2007-08-11 0:03 ` [patch 1/5] ssb: pcicore compile fix Michael Buesch
2007-08-11 0:03 ` [patch 2/5] ssb: pci core driver fixes Michael Buesch
2007-08-11 0:03 ` Michael Buesch [this message]
2007-08-11 0:03 ` [patch 4/5] ssb: Fix EXPERIMENTAL annotations Michael Buesch
2007-08-11 0:03 ` [patch 5/5] ssb: Remove verbose coreswitch printk Michael Buesch
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=20070811000357.090532000@bu3sch.de \
--to=mb@bu3sch.de \
--cc=aurelien@aurel32.net \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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;
as well as URLs for NNTP newsgroup(s).