From: "Sébastien Chrétien" <sebastien.chretien.enseirb@gmail.com>
To: linuxppc-dev@ozlabs.org
Subject: [TTY] driver sriel tty on ppc board
Date: Wed, 27 Aug 2008 17:37:41 +0200 [thread overview]
Message-ID: <319b0ac50808270837ofa75as3b47f975ad3ffaa2@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]
Hello,
I am trying to code a tty serial driver (UART link). The initialization is :
(model LDD 3)
static int __init tiny_tty_init(void)
{
int i, retval;
printk("Initialization of ttyS -> \n");
tiny_tty_driver=alloc_tty_driver(NB_TTY);
if(!tiny_tty_driver)
return -ENOMEM;
/*Initialize the tty driver*/
tiny_tty_driver->owner =THIS_MODULE;
tiny_tty_driver->driver_name = "ttyS";
tiny_tty_driver->name = "ttyS";
tiny_tty_driver->major = TTY_MAJOR;
tiny_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
tiny_tty_driver->subtype = SERIAL_TYPE_NORMAL;
tiny_tty_driver->flags = TTY_DRIVER_REAL_RAW;
tiny_tty_driver->init_termios = tty_std_termios;
tiny_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD
|HUPCL|CLOCAL;
tty_set_operations(tiny_tty_driver, &serial_ops);
/*register the tty driver*/
retval=tty_register_driver(tiny_tty_driver);
if(retval)
{
printk(KERN_ERR "Failed to register tiny tty driver");
put_tty_driver(tiny_tty_driver);
return retval;
}
for(i=0; i< NB_TTY; ++i)
tty_register_device(tiny_tty_driver,i,NULL);
printk("<-Initialization of ttyS \n");
return retval;
}
module_init(tiny_tty_init);
but I have a kernel panic :
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Kernel panic - not syncing: Couldn't register /dev/tty0 driver
Can someone help me to trace the failure ?
Thanks
[-- Attachment #2: Type: text/html, Size: 2348 bytes --]
reply other threads:[~2008-08-27 15:37 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=319b0ac50808270837ofa75as3b47f975ad3ffaa2@mail.gmail.com \
--to=sebastien.chretien.enseirb@gmail.com \
--cc=linuxppc-dev@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).