All of lore.kernel.org
 help / color / mirror / Atom feed
From: jim.cromie@gmail.com (Jim Cromie)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] Address configuration for scx200_acb
Date: Mon, 01 May 2006 11:15:07 +0000	[thread overview]
Message-ID: <4455EDBB.4000905@gmail.com> (raw)
In-Reply-To: <20060427234114.941c9657.khali@linux-fr.org>

Thomas Andrews wrote:
> On Thu, Apr 27, 2006 at 11:41:14PM +0200, Jean Delvare wrote:
>
>   
>> Can you please comment on this?
>> http://bugzilla.kernel.org/show_bug.cgi?idd45#c15
>>
>> This is a propsal to make the scx200_acb driver's default base
>> addresses configurable through Kconfig. What do you think?
>>
>> Another possibility would be to detect them at runtime depending on
>> some platform data. Sounds more complex, if possible at all.
>>
>> Or we can stick to the current state (default addresses, can be
>> overriden with module parameters).
>>
>> What makes the current default addresses (0x820 and 0x840) more
>> legitimate than what Alexander has (0x810 and 0x820)?
>>     
>
> I've been wondering about this myself. I also use the wrap boards, and
> I've found that the address can be automatically set using something
> like this:
>
> static void detect_acb_base_addresses(int *acb1, int* acb2)
> {
>     unsigned char h1 = 0;
>     unsigned char l1 = 0;
>     unsigned char h2 = 0;
>     unsigned char l2 = 0;
>
>     /* Select ACB1  (LDN 5) */
>     outb(0x07,CFG_INDEX);
>     outb(0x05,CFG_DATA);
>     outb(0x60,CFG_INDEX);
>     h1 = inb(CFG_DATA);
>     outb(0x61,CFG_INDEX);
>     l1 = inb(CFG_DATA);
>
>     /* ACB2 (LDN 6) */
>     outb(0x07,CFG_INDEX);
>     outb(0x06,CFG_DATA);
>     outb(0x60,CFG_INDEX);
>     h2 = inb(CFG_DATA);
>     outb(0x61,CFG_INDEX);
>     l2 = inb(CFG_DATA);
>     *acb1 = (h1 << 8) | l1;
>     *acb2 = (h2 << 8) | l2;    
>     DEBUG(1,printk("ACB1 at %x, ACB2 at %x",*acb1,*acb2));
> }
>
> Would this not work for the whole family ?
>
> Regards,
> Thomas
>   

I have a soekris net4801 which has the same sc-1100.
On my board, ISA addys 2e, 2f talk to a separate Super-IO chip, pc87360.
which IIRC has an acb unit also.
Back when I got the board, the presence of 2 superio devices was somewhat
confusing, until Id read both datasheets - 2x.

FWIW, the pc87360 has these (from a pre-proto-patch I still have)

+char* funcblocks[] = {
+       "Floppy Disk Controller (FDC)",
+       "Parallel Port (PP)",
+       "Serial Port 2 with IR (SP2)",
+       "Serial Port 1 (SP1)",
+       "System Wake-Up Control (SWC)",
+       "Keyboard and Mouse Controller (KBC) - Mouse interface",
+       "Keyboard and Mouse Controller (KBC) - Keyboard interface",
+       "General-Purpose I/O (GPIO) Ports",
+       "ACCESS.bus Interface (ACB)",
+       "Fan Speed Control and Monitor (FSCM)",
+       "WATCHDOG Timer (WDT)",
+       "Game Port (GMP)",
+       "Musical Instrument Digital Interface (MIDI) Port",
+       "Voltage Level Monitor (VLM)",
+       "Temperature Sensor (TMS)",
+       NULL
+};
+
+
+struct pc87366_unit pc87366_units[] = {
+       { 8,    "Floppy Disk Controller (FDC)" },
+       { 0x10, "Parallel Port (PP)" },
+       { 8, "Serial Port 2 with IR (SP2)" },
+       { 8, "Serial Port 1 (SP1)" },
+       { 0x10, "System Wake-Up Control (SWC)" },
+       { 0x10, "Keyboard and Mouse Controller (KBC) - Mouse interface" },
+       { 0x10, "Keyboard and Mouse Controller (KBC) - Keyboard 
interface" },
+       { 0x0c, "General-Purpose I/O (GPIO) Ports" },
+       { 6,    "ACCESS.bus Interface (ACB)" },
+       { 0,    "Fan Speed Control and Monitor (FSCM)" },
+       { 4,    "WATCHDOG Timer (WDT)" },
+       { 0x0d, "Game Port (GMP)" },
+       { 3,    "Musical Instrument Digital Interface (MIDI) Port" },
+       { 0x10, "Voltage Level Monitor (VLM)" },
+       { 0x0f, "Temperature Sensor (TMS)" },
+       { 0,    NULL }
+};


the sc-1100 has fewer functional units; I dimly recall poking at them 
this same way,
but I cant dig up any old bones.


  parent reply	other threads:[~2006-05-01 11:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-27 21:41 [lm-sensors] Address configuration for scx200_acb Jean Delvare
2006-04-28  6:47 ` Thomas Andrews
2006-04-30  7:43 ` Jean Delvare
2006-04-30 10:12 ` Thomas Andrews
2006-04-30 12:17 ` Jean Delvare
2006-05-01 11:15 ` Jim Cromie [this message]
2006-05-01 12:22 ` Jean Delvare
2006-05-01 13:58 ` Thomas Andrews
2006-05-01 15:12 ` Jim Cromie
2006-05-01 17:26 ` Thomas Andrews
2006-05-02 14:08 ` Alexander Krause
2006-05-03 11:17 ` Thomas Andrews
2006-05-03 11:39 ` Alexander Krause
2006-05-03 12:21 ` Thomas Andrews
2006-05-03 19:59 ` Thomas Andrews
2006-05-04  3:24 ` Jim Cromie
2006-05-04  6:32 ` Thomas Andrews
2006-05-10 18:36 ` Thomas Andrews
2006-06-09 21:28 ` Jim Cromie
2007-04-26 12:45 ` Jean Delvare

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=4455EDBB.4000905@gmail.com \
    --to=jim.cromie@gmail.com \
    --cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.