From: "memorylost@tin.it" <memorylost@tin.it>
To: linuxppc-dev@lists.ozlabs.org
Subject: mpc5125 shared uart-spi driver
Date: Mon, 19 Mar 2012 14:45:39 +0100 (CET) [thread overview]
Message-ID: <1362b34c116.memorylost@tin.it> (raw)
[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]
Hi all,
I am developing on a custom mpc5125 board.
The hardware people designed the board so that the console serial port (PSC1 as ttyPSC0) is "shared" with a 74HC595 shift register (!!),
which drivers some leds.
In other words: when I want to drive the leds I have to "switch" the port in spi mode, do the spi transfer, then return to uart serial mode.
A strobe pin allows not to disturb leds when uart mode is active.
This configuration surely will cause some glitches on the serial port, but finally it is not a big problem, since I use the serial console only as a debug help.
Uart works at 115200 bps, spi works at 10 MHz.
So I am trying to find a "nice and elegant" way to do this by (eventually) tweaking the spi driver : my first idea is
declaring in the dts file uart and spi on the same address, but "tweak" spi so that it does probe and then
puts the port as it was before probing (uart mode).
Then I should modify the spi driver so that before doing transfers it puts the port in spi mode, and after transfers
it puts back to uart.
Kernel is 2.6.29 .
Any suggestions are welcome...
Thanks,
regards
Lucio Dona'
[-- Attachment #2: Type: text/html, Size: 1208 bytes --]
reply other threads:[~2012-03-19 13:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1362b34c116.memorylost@tin.it \
--to=memorylost@tin.it \
--cc=linuxppc-dev@lists.ozlabs.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 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).