public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* Question about sh-sci on SH7723
@ 2009-04-08  6:40 morimoto.kuninori
  2009-04-08 13:32 ` takasi-y
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: morimoto.kuninori @ 2009-04-08  6:40 UTC (permalink / raw)
  To: linux-sh


Hi all

I have question about sh-sci on SH7723.
There are SCSPTRx define on sh-sci.h

--------------------------------------------
#elif defined(CONFIG_CPU_SUBTYPE_SH7723)
# define SCSPTR0                0xa4050160
# define SCSPTR1                0xa405013e
# define SCSPTR2                0xa4050160
# define SCSPTR3                0xa405013e
# define SCSPTR4                0xa4050128
# define SCSPTR5                0xa4050128
--------------------------------------------

0xa4050xxxx are IO port.
And this define is used on sci_rxd_in function.

--------------------------------------------
#elif defined(CONFIG_CPU_SUBTYPE_SH7723)
static inline int sci_rxd_in(struct uart_port *port)
{
        if (port->mapbase = 0xffe00000)
                return ctrl_inb(SCSPTR0) & 0x0008 ? 1 : 0; /* SCIF0 */
        if (port->mapbase = 0xffe10000)
                return ctrl_inb(SCSPTR1) & 0x0020 ? 1 : 0; /* SCIF1 */
        if (port->mapbase = 0xffe20000)
                return ctrl_inb(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF2 */
        if (port->mapbase = 0xa4e30000)
                return ctrl_inb(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF3 */
        if (port->mapbase = 0xa4e40000)
                return ctrl_inb(SCSPTR4) & 0x0001 ? 1 : 0; /* SCIF4 */
        if (port->mapbase = 0xa4e50000)
                return ctrl_inb(SCSPTR5) & 0x0008 ? 1 : 0; /* SCIF5 */
        return 1;
}
--------------------------------------------

This function seems check "rx break".
But, for example
------------------------------
ctrl_inb(SCSPTR0) & 0x0008 ? 1 : 0; /* SCIF0 */
------------------------------

seems return SCIF0_TXD value.
                   ~~~
But TXD is output isn't it ?
Can we read this value though it is output ?
And why TXD ?
Can not we use SCFSR :: BRK value ?

Best regards
--
Kuninori Morimoto
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-04-16  2:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08  6:40 Question about sh-sci on SH7723 morimoto.kuninori
2009-04-08 13:32 ` takasi-y
2009-04-09  2:03 ` morimoto.kuninori
2009-04-09  2:51 ` Nobuhiro Iwamatsu
2009-04-09  4:03 ` morimoto.kuninori
2009-04-09  4:25 ` morimoto.kuninori
2009-04-09  5:53 ` Nobuhiro Iwamatsu
2009-04-09  7:42 ` morimoto.kuninori
2009-04-10  5:24 ` morimoto.kuninori
2009-04-15  2:52 ` Nobuhiro Iwamatsu
2009-04-16  2:56 ` Kuninori Morimoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox