Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Ardelean, Andrei" <Andrei.Ardelean@idt.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Which Linux driver (source code) is used for tty0 (console) on MALTA?
Date: Fri, 24 Sep 2010 12:29:21 +0100	[thread overview]
Message-ID: <20100924112921.GA17964@linux-mips.org> (raw)
In-Reply-To: <AEA634773855ED4CAD999FBB1A66D07601113E58@CORPEXCH1.na.ads.idt.com>

On Wed, Sep 22, 2010 at 11:49:25AM -0700, Ardelean, Andrei wrote:

> I am using MALTA and my goal is to port MIPS Linux on a new platform.
> Which driver (source code) is used for tty0 (console)? I see the support
> for "early console" but I think that this is not the real Linux driver
> used after boot stage.

Correct.  Early console uses an extremly simple driver which in general
is separate from the full blown driver that takes over later.

> More general, how to find which code source is used for an embedded
> driver (part of the Kernel at compiling time) for each h/w resource.
> MIPS Linux distribution comes with a lot of drivers but I have
> difficulties to figure out which one is used for MALTA. Is it a files
> where all those are registered?

For any modern style driver that information is available through sysfs.
For example on this laptop here:

# cd /sys/devices/platform/serial8250
# ls -l
total 0
lrwxrwxrwx. 1 root root    0 Sep 24 12:20 driver -> ../../../bus/platform/drivers/serial8250
-r--r--r--. 1 root root 4096 Sep 24 12:20 modalias
drwxr-xr-x. 2 root root    0 Sep 24 12:20 power
lrwxrwxrwx. 1 root root    0 Sep 24 12:20 subsystem -> ../../../bus/platform
drwxr-xr-x. 5 root root    0 Sep 24 12:20 tty
-rw-r--r--. 1 root root 4096 Sep 24 12:20 uevent
#

So you see the driver being used is the 8250 driver.  Similar you can
find the driver for a PCI device in /sys/devices/pci* etc.

  Ralf

      parent reply	other threads:[~2010-09-24 11:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-22 18:49 Which Linux driver (source code) is used for tty0 (console) on MALTA? Ardelean, Andrei
2010-09-22 18:49 ` Ardelean, Andrei
2010-09-23  1:13 ` Chen, Tiejun
2010-09-23  1:13   ` Chen, Tiejun
2010-09-24 11:29 ` Ralf Baechle [this message]

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=20100924112921.GA17964@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=Andrei.Ardelean@idt.com \
    --cc=linux-mips@linux-mips.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