linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* mpc5125 shared uart-spi driver
@ 2012-03-19 13:45 memorylost
  0 siblings, 0 replies; only message in thread
From: memorylost @ 2012-03-19 13:45 UTC (permalink / raw)
  To: linuxppc-dev

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-19 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 13:45 mpc5125 shared uart-spi driver memorylost

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).