linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* not able to understand 'icedcc_putc'
@ 2010-01-29 16:48 Chetan Nanda
  2010-02-02  8:33 ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Chetan Nanda @ 2010-01-29 16:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I am newbie to ARM core. This might be a very silly question, but I am not
able to understand how 'icedcc_putc' function prints a character on console
(UART).

############3
static void icedcc_putc(int ch)
{
    int status, i = 0x4000000;

    do {
        if (--i < 0)
            return;

        asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status));
    } while (status & 2);

    asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
}
#############

Thanks for your help

~cnanda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100129/22e360fb/attachment-0001.htm>

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

* not able to understand 'icedcc_putc'
  2010-01-29 16:48 not able to understand 'icedcc_putc' Chetan Nanda
@ 2010-02-02  8:33 ` Uwe Kleine-König
  2010-02-02  8:41   ` Chetan Nanda
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2010-02-02  8:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Fri, Jan 29, 2010 at 10:18:55PM +0530, Chetan Nanda wrote:
> Hello,
> 
> I am newbie to ARM core. This might be a very silly question, but I am not
> able to understand how 'icedcc_putc' function prints a character on console
> (UART).
It doesn't, so no wonder you don't see how it does.

icedcc_putc uses the debug communications channel.  You can read it via
jtag.

If you want to understand the output on the serial console, you have to
look into <mach/uncompress.h>.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-K?nig            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

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

* not able to understand 'icedcc_putc'
  2010-02-02  8:33 ` Uwe Kleine-König
@ 2010-02-02  8:41   ` Chetan Nanda
  0 siblings, 0 replies; 3+ messages in thread
From: Chetan Nanda @ 2010-02-02  8:41 UTC (permalink / raw)
  To: linux-arm-kernel

2010/2/2 Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

> Hello,
>
> On Fri, Jan 29, 2010 at 10:18:55PM +0530, Chetan Nanda wrote:
> > Hello,
> >
> > I am newbie to ARM core. This might be a very silly question, but I am
> not
> > able to understand how 'icedcc_putc' function prints a character on
> console
> > (UART).
> It doesn't, so no wonder you don't see how it does.
>
> icedcc_putc uses the debug communications channel.  You can read it via
> jtag.
>
> If you want to understand the output on the serial console, you have to
> look into <mach/uncompress.h>.
>
> Yhea, on closely looking at code I was able to figure out the code.

~cnanda

> Best regards
> Uwe
>
> --
> Pengutronix e.K.                              | Uwe Kleine-K?nig
>  |
> Industrial Linux Solutions                    | http://www.pengutronix.de/ |
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100202/e464808c/attachment-0001.htm>

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

end of thread, other threads:[~2010-02-02  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29 16:48 not able to understand 'icedcc_putc' Chetan Nanda
2010-02-02  8:33 ` Uwe Kleine-König
2010-02-02  8:41   ` Chetan Nanda

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