From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] x86: base support for the TS-5500 platform
Date: Wed, 24 Aug 2011 18:08:37 -0400 [thread overview]
Message-ID: <20110824180837.6841f3d8@v0nbox> (raw)
In-Reply-To: <4E55670F.90102@zytor.com>
On Wed, 24 Aug 2011 14:03:11 -0700,
"H. Peter Anvin" <hpa@zytor.com> wrote:
> On 08/24/2011 01:23 PM, Vivien Didelot wrote:
> > +
> > +/**
> > + * ts5500_pre_detect() - check for TS-5500 specific features
> > + *
> > + * It is not safe to read ID register if we are not sure that it's
> > a TS SBC.
> > + * Since TS SBCs don't have DMI support, it is safer to check for
> > a TS-5500
> > + * specific feature such as the processor.
> > + */
> > +static int ts5500_pre_detect(void)
> > +{
> > + /* Check for AMD ElanSC520 Microcontroller */
> > + if (!(cpu_info.x86_vendor == X86_VENDOR_AMD &&
> > + cpu_info.x86 == AMD_ELAN_FAMILY &&
> > + cpu_info.x86_model == AMD_ELAN_SC520))
> > + return -ENODEV;
> > +
> > + return 0;
> > +}
> > +
>
> Doesn't this mean you will read this unsafe register on any Elan SC520
> platform? Is that okay?
>
> -hpa
>
Indeed this will be run on any Elan SC520 based platforms if the user
has asked for TS-5500 support in the menuconfig. I could add checks for
other hardware such as the Ethernet controller, but it would require
including pci headers and delaying the initcall (using late_initcall
instead of postcore_initcall).
That's why I think it is not really worth adding more tests. They
could be added later in this function if there is really a need.
Regards,
Vivien.
next prev parent reply other threads:[~2011-08-24 22:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 20:23 [PATCH 0/4] Support for the TS-5500 board Vivien Didelot
2011-08-24 20:23 ` [PATCH 1/4] x86: base support for the TS-5500 platform Vivien Didelot
2011-08-24 21:03 ` H. Peter Anvin
2011-08-24 22:08 ` Vivien Didelot [this message]
2011-08-24 22:10 ` H. Peter Anvin
2011-08-24 22:38 ` Vivien Didelot
2011-08-24 23:04 ` H. Peter Anvin
2011-08-27 0:00 ` Vivien Didelot
2011-08-24 20:23 ` [PATCH 2/4] x86: (TS-5500) add GPIO support Vivien Didelot
2011-08-24 20:23 ` [PATCH 3/4] x86: (TS-5500) add LED support Vivien Didelot
2011-08-24 20:23 ` [PATCH 4/4] x86: (TS-5500) add ADC support Vivien Didelot
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=20110824180837.6841f3d8@v0nbox \
--to=vivien.didelot@savoirfairelinux.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox