linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: James Hogan <james.hogan@imgtec.com>
Cc: linux-arch@vger.kernel.org
Subject: Re: [RFC PATCH v1 32/40] i8042: don't build on METAG
Date: Fri, 16 Nov 2012 15:20:03 +0000	[thread overview]
Message-ID: <201211161520.03974.arnd@arndb.de> (raw)
In-Reply-To: <50A61E51.8000306@imgtec.com>

On Friday 16 November 2012, James Hogan wrote:
> On 09/11/12 14:28, Arnd Bergmann wrote:
> > On Wednesday 31 October 2012, James Hogan wrote:
> >> diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
> >> index 55f2c22..60b2a09 100644
> >> --- a/drivers/input/serio/Kconfig
> >> +++ b/drivers/input/serio/Kconfig
> >> @@ -22,7 +22,7 @@ config SERIO_I8042
> >>         tristate "i8042 PC Keyboard controller" if EXPERT || !X86
> >>         default y
> >>         depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \
> >> -                  (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN
> >> +                  (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !METAG
> >>         help
> >>           i8042 is the chip over which the standard AT keyboard and PS/2
> >>           mouse are connected to the computer. If you use these devices,
> > 
> > Maybe you can turn that list around and introduce a new symbol
> > ARCH_HAS_SERIO_I8042 or similar that architectures can select.
> > I suspect that actually most don't have this, but they have not
> > bothered to update this list.
> 
> Hi Arnd,
> 
> I've starting writing some patches along these lines (for the various PC
> style devices). They all seem to have slightly different rules though so
> I think to be safe we need separate Kconfig symbols for each one.

First of all, thank you very much for your investigation so far!

I think a lot can be done with one Kconfig symbol, if each of the users
lists the difference from the way the generic one is described, e.g.

config SERIO_I8042
	depends on HAVE_LEGACY_PC_IO && !M68K || ARCH_SHARK || FOOTBRIDGE_HOST

to define one that can be set on anything that generally is PC compatible
with the exception of all M68K but also including some ARM platforms.

> With SERIO_I8042 I'm completely guessing. It defaults to y, but the only
> ones I know for certain shouldn't select it are the ones currently
> excluded (parisc, arm (unless shark, footbridge), superh (unless
> cayman), m68k, blackfin, metag). A few I know should allow it due to
> special casing of io operations (mips (jazz, sgi_has_i8042, sni_rm),
> ppc, sparc, x86, ia64, unicore32). Is it okay in this case to select it
> for pretty much all of the arches not excluded and let the maintainers
> NAK if they don't want it?

Yes, that sounds good. You can even do that patch to change over the other
architectures straight away and let the ones that don't actually want it
send a separate patch. Note that S390 and UML can't select SERIO because
they disable INPUT altogether.

It's probably a good idea to separate the inversion of the logic from
any policy change and put those into separate patches.

> PARPORT_PC isn't too difficult (and defaults to n), I can select
> HAVE_PARPORT_PC from any arch that provides asm/parport.h or
> conditionally allowed it before:
> alpha, arm, ia64, m68k (if ISA), microblaze, mips, parisc, powerpc, sh,
> sparc (if PCI), tile, unicore32, x86

Ok. I think in general, we want to enable this one for anything
that has PCI, because the driver also supports parallel ports
on an extension card, not just those with a hardwired address.

> VGA_CONSOLE isn't too bad either (but it does default to y), I can
> select HAVE_VGA_CONSOLE if the arch declares a screen_info struct (which
> is the link error I get on metag):
> alpha, arm (only ARCH_INTEGRATOR, ARCH_FOOTBRIDGE, ARCH_NETWINDER),
> cris, ia64, m32r, mips, PPC (!4xx && !8xx), score, x86, xtensa

Ok. I don't think we can actually support it on m32r or score, but it
doesn't hurt to enable it.

> RTC defaults to n, but I've narrowed it down to alpha, m32r, mips
> (MACH_LOONSON), mn10300, and x86 which provide asm/mc146818rtc.h.
> 
> GEN_RTC defaults to n, and I've narrowed to alpha, m68k, mn10300,
> parisc, ppc, x86 which provide asm/rtc.h.

It's amazing that those are still around after we've had RTC_LIB
for so long. The "modern" driver that is supposed to replace these
two is RTC_DRV_CMOS, which currently builds for X86 || ALPHA || 
ARM || M32R || ATARI || PPC || MIPS || SPARC64.

There is also the nvram driver that is tightly coupled to the RTC
support and that can build only on x86, m68k (atari) and
ARM (if RTC_DRV_CMOS is on).

I think the baseline should be:

config LEGACY_PC_IO
	bool
	# selected by X86 || ALPHA || SPARC || M32R ||
	# (PPC && !4xx && !8xx) || 
        # (ARM && (ARCH_FOOTBRIDGE || ARCH_NETWINDER) ||
	# (M68K && (Q40 || SUN3X)) ||
	# (MIPS && (JAZZ || MALTA || SNI_RM))

config ARCH_MAY_HAVE_PC_FDC
	def_bool LEGACY_PC_IO && !M32R && (!PPC || (PCI && !PPC_PSERIES))
	# selected by ARCH_RPC

config HAVE_PARPORT_PC
	def_bool LEGACY_PC_IO || PCI

config HAVE_VGA_CONSOLE
	def_bool LEGACY_PC_IO
	# selected by ARCH_INTEGRATOR || CRIS || IA64 || MIPS || SCORE || XTENSA

config HAVE_RTC_DRV_CMOS
	def_bool LEGACY_PC_IO
	# selected by ARM || ATARI || PPC || MIPS || SPARC64

config HAVE_RTC_CMOS_LEGACY
	bool
	# selected by MACH_LOONSON || MN10300 || X86 || ALPHA || MN10300 || M32R

config HAVE_GEN_RTC_LEGACY
	def_bool LEGACY_PC_IO && !(ARM || M32R || SPARC)
	# selected by M68K || MN10300 || PARISC || PPC


	Arnd

  reply	other threads:[~2012-11-16 15:20 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-31 16:13 [RFC PATCH v1 00/40] Meta Linux Kernel Port James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 01/40] asm-generic/io.h: remove asm/cacheflush.h include James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 02/40] asm-generic/unistd.h: handle symbol prefixes in cond_syscall James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 03/40] Add CONFIG_HAVE_64BIT_ALIGNED_STRUCT for taskstats James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 04/40] trace/ring_buffer: handle 64bit aligned structs James Hogan
2012-10-31 17:59   ` Steven Rostedt
2012-10-31 18:19     ` James Hogan
2012-11-01 17:32     ` Will Newton
2012-11-01 19:30       ` Steven Rostedt
2012-10-31 16:13 ` [RFC PATCH v1 05/40] Revert some of "binfmt_elf: cleanups" James Hogan
2012-11-01 13:25   ` Mikael Pettersson
2012-11-01 13:25     ` Mikael Pettersson
2012-11-01 13:52     ` James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 06/40] of/vendor-prefixes: add Imagination Technologies James Hogan
2012-11-01  1:38   ` Rob Herring
2012-11-01  9:20     ` James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 07/40] metag: Add MAINTAINERS entry James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 08/40] metag: Boot James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 11/40] metag: Signal handling James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 12/40] metag: Build infrastructure James Hogan
2012-10-31 19:35   ` Sam Ravnborg
2012-10-31 21:34     ` James Hogan
2012-11-02  9:40     ` James Hogan
2012-11-02 17:01       ` Sam Ravnborg
2012-11-09 14:46   ` Arnd Bergmann
2012-11-09 14:55     ` James Hogan
2012-11-20 15:06     ` James Hogan
2012-11-20 15:43       ` Arnd Bergmann
2012-11-20 16:01         ` James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 13/40] metag: Device tree James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 14/40] metag: Ptrace James Hogan
2012-11-08  7:17   ` Jonas Bonn
2012-11-09  9:26     ` James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 15/40] metag: Time keeping James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 16/40] metag: Traps James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 17/40] metag: IRQ handling James Hogan
2012-11-09 14:12   ` Arnd Bergmann
2012-11-20 16:08     ` James Hogan
2012-11-20 16:15       ` Arnd Bergmann
2012-12-18 13:25         ` James Hogan
2012-12-19 15:58           ` Arnd Bergmann
2012-12-20 10:14             ` James Hogan
2012-10-31 16:13 ` [RFC PATCH v1 18/40] metag: System Calls James Hogan
2012-11-09 14:20   ` Arnd Bergmann
2012-11-22 12:01     ` James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 19/40] metag: Scheduling/Process management James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 20/40] metag: Module support James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 21/40] metag: Atomics, locks and bitops James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 22/40] metag: Basic documentation James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 23/40] metag: SMP support James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 24/40] metag: DMA James Hogan
2012-11-09 14:25   ` Arnd Bergmann
2012-11-23 15:53     ` James Hogan
2012-11-23 16:20       ` James Hogan
2012-11-23 16:47         ` Arnd Bergmann
2013-01-09 16:04           ` James Hogan
2013-01-09 16:04             ` James Hogan
2013-01-09 16:08             ` Arnd Bergmann
2012-11-23 16:47       ` Arnd Bergmann
2012-10-31 16:14 ` [RFC PATCH v1 25/40] metag: optimised library functions James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 26/40] metag: Stack unwinding James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 27/40] metag: various other headers James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 28/40] metag: Perf James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 29/40] metag: ftrace support James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 30/40] scripts/checkstack.pl: Add metag support James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 31/40] char: don't build rtc or genrtc on METAG James Hogan
2012-11-01 15:39   ` Greg KH
2012-11-01 17:33     ` James Hogan
2012-11-09 14:38       ` Arnd Bergmann
2012-10-31 16:14 ` [RFC PATCH v1 32/40] i8042: don't build " James Hogan
2012-11-09 14:28   ` Arnd Bergmann
2012-11-16 11:06     ` James Hogan
2012-11-16 15:20       ` Arnd Bergmann [this message]
2012-11-16 16:19         ` Geert Uytterhoeven
2012-11-16 16:43           ` Arnd Bergmann
2012-11-16 16:50         ` James Hogan
2012-11-16 17:20           ` Arnd Bergmann
2012-10-31 16:14 ` [RFC PATCH v1 33/40] parport: " James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 34/40] musb: don't redefine {read,write}s{l,w,b} on metag James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 35/40] vga console: don't build on METAG James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 36/40] metag: OProfile James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 37/40] metag: Various sysfs drivers James Hogan
2012-10-31 19:30   ` Greg KH
2012-10-31 19:41     ` James Hogan
2012-11-09 14:32       ` Arnd Bergmann
2012-11-09 14:35         ` James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 38/40] metag: add JTAG Debug Adapter (DA) support James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 39/40] tty/metag_da: add metag DA TTY driver James Hogan
2012-10-31 16:14 ` [RFC PATCH v1 40/40] fs: dafs: Add DAFS filesystem for metag James Hogan
2012-10-31 16:42   ` Al Viro
2012-10-31 19:39     ` James Hogan
2012-10-31 19:39       ` James Hogan
2012-10-31 19:55   ` Myklebust, Trond
2012-10-31 19:55     ` Myklebust, Trond
2012-10-31 21:39     ` James Hogan
2012-10-31 21:39       ` James Hogan
2012-11-02  9:33     ` James Hogan
2012-11-02  9:33       ` James Hogan
2012-10-31 16:26 ` [RFC PATCH v1 00/40] Meta Linux Kernel Port James Hogan
2012-11-09 15:06   ` Arnd Bergmann
2012-11-09 15:21     ` James Hogan
2012-11-09 15:58       ` Arnd Bergmann
2012-11-09 16:20         ` James Hogan
2012-11-09 21:55           ` Arnd Bergmann
2012-11-09 23:28             ` James Hogan
2012-11-12 16:59           ` James Hogan
2012-11-12 19:10             ` Arnd Bergmann
2012-11-13  9:43               ` James Hogan
2012-11-13  9:55                 ` Arnd Bergmann
2012-10-31 22:33 ` Tony Breeds
2012-11-01 11:42   ` James Hogan
2012-11-01 23:28     ` Tony Breeds
2012-11-09 16:52     ` James Hogan
2012-11-09 15:16 ` Arnd Bergmann
2012-11-09 16:06   ` James Hogan

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=201211161520.03974.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=james.hogan@imgtec.com \
    --cc=linux-arch@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).