Subject: Re: [PATCH] Fix the LPC47M192 SuperIO on the MPC8641 HPCN

From: Segher Boessenkool <[email-masked]>
Date: Thu, 7 Jun 2007 15:03:20 +0200

>> +       /* LPC47M192 Super I/O configuration */
>> +       outb(0x55, 0x4e);       /* enter superio config mode */
>> +
>> +       /* Enable keyboard and mouse */
>> +       outb(0x07, 0x4e);       /* device selector register */
>> +       outb(0x07, 0x4f);       /* select keyboard registers (device 
>> 7) */
>> +       outb(0x30, 0x4e);       /* keyboard activation register */
>> +       outb(0x01, 0x4f);       /* activate keyboard */
>
> Hardcoded I/O port numbers always worry me a little. I know that this 
> is
> supposed to work in general, but can't you read the I/O port range from
> a device tree property?

This code is writing hardcoded values into IRQ#
and address window registers, the superio configuration
address should be the least of your worries ;-)

Segher