* Re: UART detection? [not found] <20040401112624.6957A337F4@rd-server.pie.domain> @ 2004-04-01 11:24 ` mohanlal jangir 2004-04-01 12:36 ` Rui Santos 0 siblings, 1 reply; 4+ messages in thread From: mohanlal jangir @ 2004-04-01 11:24 UTC (permalink / raw) To: Rui Santos; +Cc: linux-kernel I want to detect this inside a kernel module. Any way to do it? Regards Mohanlal ----- Original Message ----- From: "Rui Santos" <rsantos@grupopie.com> To: "'mohanlal jangir'" <mohanlal@samsung.com> Sent: Thursday, April 01, 2004 4:56 PM Subject: RE: UART detection? > Hi, > > You can find them on the kernel boot messages. > Something like: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > > This log is usualy found at /var/log/messages > > Regards > Rui Santos > > > -----Mensagem original----- > De: linux-kernel-owner@vger.kernel.org > [mailto:linux-kernel-owner@vger.kernel.org] Em nome de mohanlal jangir > Enviada: quinta-feira, 1 de Abril de 2004 12:02 > Para: linux-kernel@vger.kernel.org > Assunto: UART detection? > > How can I find in a kernel module, how many UARTs are present in my system? > And how can I find their IO address and IRQ? > > Regards > Mohanlal > > > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: UART detection? 2004-04-01 11:24 ` UART detection? mohanlal jangir @ 2004-04-01 12:36 ` Rui Santos 2004-04-01 13:30 ` mohanlal jangir 0 siblings, 1 reply; 4+ messages in thread From: Rui Santos @ 2004-04-01 12:36 UTC (permalink / raw) To: 'mohanlal jangir'; +Cc: linux-kernel Hi, I do not fully understand what you mean by 'detect this inside a kernel module'. I think you want to compile it as a module and the modprobe it to get the module messages. If you compile the serial as a module on: - Device Drivers -> Character Devices -> Serial Drivers -> 8250/16550 Serial you will get a module called serial.o Remember that if you want do use modprobe to redirect the module messages, You need to turn off the 'Automatic Module loadind when compiling the kernel. You can do this ao Loadable Module Support -> Automatic Kernel Module Loading. Hope it helps Regards, Rui Santos -----Mensagem original----- De: mohanlal jangir [mailto:mohanlal@samsung.com] Enviada: quinta-feira, 1 de Abril de 2004 12:24 Para: Rui Santos Cc: linux-kernel@vger.kernel.org Assunto: Re: UART detection? I want to detect this inside a kernel module. Any way to do it? Regards Mohanlal ----- Original Message ----- From: "Rui Santos" <rsantos@grupopie.com> To: "'mohanlal jangir'" <mohanlal@samsung.com> Sent: Thursday, April 01, 2004 4:56 PM Subject: RE: UART detection? > Hi, > > You can find them on the kernel boot messages. > Something like: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > > This log is usualy found at /var/log/messages > > Regards > Rui Santos > > > -----Mensagem original----- > De: linux-kernel-owner@vger.kernel.org > [mailto:linux-kernel-owner@vger.kernel.org] Em nome de mohanlal jangir > Enviada: quinta-feira, 1 de Abril de 2004 12:02 > Para: linux-kernel@vger.kernel.org > Assunto: UART detection? > > How can I find in a kernel module, how many UARTs are present in my system? > And how can I find their IO address and IRQ? > > Regards > Mohanlal > > > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: UART detection? 2004-04-01 12:36 ` Rui Santos @ 2004-04-01 13:30 ` mohanlal jangir 0 siblings, 0 replies; 4+ messages in thread From: mohanlal jangir @ 2004-04-01 13:30 UTC (permalink / raw) To: Rui Santos; +Cc: linux-kernel Hi Rui Santos, Thanks for your replies. I try to explain my question in detail. In file serial.c, there is one array rs_table defined as follows: static struct serial_state rs_table[RS_TABLE_SIZE] = { SERIAL_PORT_DFNS /* Defined in serial.h */ }; Above array is initialized with following structures. { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ Therefore IO address and IRQ of the UARTs are hardcoded. I want to know, is their no way to find these values at run time? Also I add another question here. Can I use addresses 0x3F8, 0x2F8 directly in driver? Don't I need to remap these addresses? For example, is it ok to say register_data = readb(0x3F8 + some_register_offset); Regards Mohanlal ----- Original Message ----- From: "Rui Santos" <rsantos@grupopie.com> To: "'mohanlal jangir'" <mohanlal@samsung.com> Cc: <linux-kernel@vger.kernel.org> Sent: Thursday, April 01, 2004 6:06 PM Subject: RE: UART detection? > Hi, > > I do not fully understand what you mean by 'detect this inside a kernel > module'. I think you want to compile it as a module and the modprobe it to > get the module messages. > > If you compile the serial as a module on: > - Device Drivers -> Character Devices -> Serial Drivers -> 8250/16550 Serial > you will get a module called serial.o > > Remember that if you want do use modprobe to redirect the module messages, > You need to turn off the 'Automatic Module loadind when compiling the > kernel. You can do this ao Loadable Module Support -> Automatic Kernel > Module Loading. > > Hope it helps > Regards, > Rui Santos > > > > -----Mensagem original----- > De: mohanlal jangir [mailto:mohanlal@samsung.com] > Enviada: quinta-feira, 1 de Abril de 2004 12:24 > Para: Rui Santos > Cc: linux-kernel@vger.kernel.org > Assunto: Re: UART detection? > > I want to detect this inside a kernel module. Any way to do it? > > Regards > Mohanlal > > ----- Original Message ----- > From: "Rui Santos" <rsantos@grupopie.com> > To: "'mohanlal jangir'" <mohanlal@samsung.com> > Sent: Thursday, April 01, 2004 4:56 PM > Subject: RE: UART detection? > > > > Hi, > > > > You can find them on the kernel boot messages. > > Something like: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > > > > This log is usualy found at /var/log/messages > > > > Regards > > Rui Santos > > > > > > -----Mensagem original----- > > De: linux-kernel-owner@vger.kernel.org > > [mailto:linux-kernel-owner@vger.kernel.org] Em nome de mohanlal jangir > > Enviada: quinta-feira, 1 de Abril de 2004 12:02 > > Para: linux-kernel@vger.kernel.org > > Assunto: UART detection? > > > > How can I find in a kernel module, how many UARTs are present in my > system? > > And how can I find their IO address and IRQ? > > > > Regards > > Mohanlal > > > > > > > > - > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://www.tux.org/lkml/ > > > > > > > > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* UART detection? @ 2004-04-01 11:01 mohanlal jangir 0 siblings, 0 replies; 4+ messages in thread From: mohanlal jangir @ 2004-04-01 11:01 UTC (permalink / raw) To: linux-kernel How can I find in a kernel module, how many UARTs are present in my system? And how can I find their IO address and IRQ? Regards Mohanlal ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-04-01 13:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20040401112624.6957A337F4@rd-server.pie.domain>
2004-04-01 11:24 ` UART detection? mohanlal jangir
2004-04-01 12:36 ` Rui Santos
2004-04-01 13:30 ` mohanlal jangir
2004-04-01 11:01 mohanlal jangir
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox