Skip to contentSkip to conversation

rfc about an uncommented string

DISCUSSION Carlo Perassi 5 participants 8 messages Oct 9, 2005 – Oct 10, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

Hi.
As suggested (*) by Arthur Othieno on the kernel-janitors mailing list, I bounce here this email for collecting comments.
The old email refers to 2.6.13-rc6 but the code is still the same on 2.6.14-rc3.
Thank you.

Hi.

I'd like to collect some comments about the following code segment I found in linux-2.6.13-rc6/arch/mips/ite-boards/generic/it8172_setup.c (the "^^^" sequence is not mine, it's in the code)

#ifdef CONFIG_SERIO_I8042
/*
* According to the ITE Special BIOS Note for waking up the
* keyboard controller...
*/
static int init_8712_keyboard(void)

{
	unsigned int cmd_port = 0x14000064;
	unsigned int data_port = 0x14000060;
	                         ^^^^^^^^^^^
	Somebody here doesn't grok the concept of io ports.

(*)
http://lists.osdl.org/pipermail/kernel-janitors/2005-August/004704.html
http://lists.osdl.org/pipermail/kernel-janitors/2005-August/004705.html
http://lists.osdl.org/pipermail/kernel-janitors/2005-August/004707.html
http://lists.osdl.org/pipermail/kernel-janitors/2005-October/004955.html

Signature · 1 line
Carlo Perassi - http://www.linux.it/~carlo/
#1 lore raw
Quoted 7 lines · Carlo Perassi

Hi.
As suggested (*) by Arthur Othieno on the kernel-janitors mailing list, I bounce here this email for collecting comments.
The old email refers to 2.6.13-rc6 but the code is still the same on 2.6.14-rc3.
Thank you.

Quoted 6 lines

Hi.

I'd like to collect some comments about the following code segment I found in linux-2.6.13-rc6/arch/mips/ite-boards/generic/it8172_setup.c (the "^^^" sequence is not mine, it's in the code)

I know, I put it there. The code was obviously broken, so I place this hard to miss not right into the middle of it. It's there since ages and nobody did complain. So unless somebody complains - and that complaint better include some patches - I will delete support for the IT8172 and it's eval board.

Ralf

#2 lore raw

We are using 8172 for 2.4 kernels presently,although may drop it sometime later.

I don't read the 2.6 code,but it seems it remains the same as the copy in 2.4(except that #ifdef changes).I can't see why the code is broken? In case you mean the ioport address,mips_io_port_base for that board is 0xa0000000, inb(0x14000060) is reading from 0xb4000060, which is correct for it.

Quoted 28 lines · Ralf Baechle
Quoted 7 lines · Carlo Perassi

Hi.
As suggested (*) by Arthur Othieno on the kernel-janitors mailing list, I bounce here this email for collecting comments.
The old email refers to 2.6.13-rc6 but the code is still the same on 2.6.14-rc3.
Thank you.

Quoted 6 lines

Hi.

I'd like to collect some comments about the following code segment I found in linux-2.6.13-rc6/arch/mips/ite-boards/generic/it8172_setup.c (the "^^^" sequence is not mine, it's in the code)

I know, I put it there. The code was obviously broken, so I place this hard to miss not right into the middle of it. It's there since ages and nobody did complain. So unless somebody complains - and that complaint better include some patches - I will delete support for the IT8172 and it's eval board.

Ralf

#3 lore raw
Quoted 8 lines · Fuxin Zhang

We are using 8172 for 2.4 kernels presently,although may drop it sometime later.

I don't read the 2.6 code,but it seems it remains the same as the copy in 2.4(except that #ifdef changes).I can't see why the code is broken? In case you mean the ioport address,mips_io_port_base for that board is 0xa0000000, inb(0x14000060) is reading from 0xb4000060, which is correct for it.

Shouldn't mips_io_port_base be 0xb4000000 for your board, so inb(0x60) looks more like a PC-style keyboard controller access?

Quoted 16 lines
Quoted 15 lines · Ralf Baechle
Quoted 12 lines · Carlo Perassi

As suggested (*) by Arthur Othieno on the kernel-janitors mailing list, I bounce here this email for collecting comments.
The old email refers to 2.6.13-rc6 but the code is still the same on 2.6.14-rc3.
Thank you.

Hi.

I'd like to collect some comments about the following code segment I found in linux-2.6.13-rc6/arch/mips/ite-boards/generic/it8172_setup.c (the "^^^" sequence is not mine, it's in the code)

Quoted 5 lines
Quoted 5 lines

I know, I put it there. The code was obviously broken, so I place this hard to miss not right into the middle of it. It's there since ages and nobody did complain. So unless somebody complains - and that complaint better include some patches - I will delete support for the IT8172 and it's eval board.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw
Quoted 12 lines · Geert Uytterhoeven
Quoted 8 lines · Fuxin Zhang

We are using 8172 for 2.4 kernels presently,although may drop it sometime later.

I don't read the 2.6 code,but it seems it remains the same as the copy in 2.4(except that #ifdef changes).I can't see why the code is broken? In case you mean the ioport address,mips_io_port_base for that board is 0xa0000000, inb(0x14000060) is reading from 0xb4000060, which is correct for it.

Quoted 2 lines

Shouldn't mips_io_port_base be 0xb4000000 for your board, so inb(0x60) looks more like a PC-style keyboard controller access?

It is not my code. But anyway the board has more than one discontinuous io ranges(0xb4000000 is in fact for it8712 superio and legacy ios, it8172's system registers are located around 0xb8000000, while others begins at 0xb4010000).

Quoted 40 lines
Quoted 20 lines
Quoted 16 lines · Ralf Baechle
Quoted 12 lines · Carlo Perassi

As suggested (*) by Arthur Othieno on the kernel-janitors mailing list, I bounce here this email for collecting comments.
The old email refers to 2.6.13-rc6 but the code is still the same on 2.6.14-rc3.
Thank you.

Hi.

I'd like to collect some comments about the following code segment I found in linux-2.6.13-rc6/arch/mips/ite-boards/generic/it8172_setup.c (the "^^^" sequence is not mine, it's in the code)

Quoted 5 lines
Quoted 5 lines

I know, I put it there. The code was obviously broken, so I place this hard to miss not right into the middle of it. It's there since ages and nobody did complain. So unless somebody complains - and that complaint better include some patches - I will delete support for the IT8172 and it's eval board.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw
Quoted 11 lines · Fuxin Zhang
Quoted 10 lines · Geert Uytterhoeven
Quoted 8 lines · Fuxin Zhang

We are using 8172 for 2.4 kernels presently,although may drop it sometime later.

I don't read the 2.6 code,but it seems it remains the same as the copy in 2.4(except that #ifdef changes).I can't see why the code is broken? In case you mean the ioport address,mips_io_port_base for that board is 0xa0000000, inb(0x14000060) is reading from 0xb4000060, which is correct for it.

Quoted 4 lines
Quoted 2 lines

Shouldn't mips_io_port_base be 0xb4000000 for your board, so inb(0x60) looks more like a PC-style keyboard controller access?

It is not my code. But anyway the board has more than one discontinuous io ranges(0xb4000000 is in fact for it8712 superio and legacy ios,

So 0xb4000000 is the base for ISA and PCI I/O port accesses, right? Hence if mips_io_port_base is 0xb4000000, all drivers for PCI (and ISA) expansion cards that use inb() and friends will work.

Quoted 2 lines

it8172's system registers are located around 0xb8000000, while others begins at 0xb4010000).

So these can use ITE8172-specific access macros.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#6 lore raw
Quoted 11 lines · Geert Uytterhoeven
Quoted 2 lines

It is not my code. But anyway the board has more than one discontinuous io ranges(0xb4000000 is in fact for it8712 superio and legacy ios,

So 0xb4000000 is the base for ISA and PCI I/O port accesses, right? Hence if mips_io_port_base is 0xb4000000, all drivers for PCI (and ISA) expansion cards that use inb() and friends will work.

Quoted 2 lines

it8172's system registers are located around 0xb8000000, while others begins at 0xb4010000).

So these can use ITE8172-specific access macros.

IOW, MIPS has no concept of I/O space in the CPU, so whatever is decoded
as I/O cycles to PCI/EISA/ISA is I/O and everything else is MMIO. In particular I/O spaces are private to their respective buses -- if there are more than one disjoint PCI/EISA/ISA buses in a given system, then each of them can have its private 4GB or 16MB (or whatever) space reserved for I/O cycles. If there is only one PCI/EISA/ISA bus, then mips_io_port_base should refer to the base address where decoding as I/O cycles for that bus starts, holding an appropriate virtual mapping, typically obtained with ioremap().

Maciej

#7 lore raw
In reply to Geert Uytterhoeven
Quoted 8 lines · Geert Uytterhoeven
Quoted 5 lines

I don't read the 2.6 code,but it seems it remains the same as the copy in 2.4(except that #ifdef changes).I can't see why the code is broken? In case you mean the ioport address,mips_io_port_base for that board is 0xa0000000, inb(0x14000060) is reading from 0xb4000060, which is correct for it.

Shouldn't mips_io_port_base be 0xb4000000 for your board, so inb(0x60) looks more like a PC-style keyboard controller access?

Exactly.

Anyway - what this did actually demonstrate is that at least there's no 2.6 user of the IT8172.

Ralf