kernel_optimize_test/arch/mips
Manuel Lauss 51e02b02e6 MIPS: Alchemy: Rewrite GPIO support.
The current in-kernel Alchemy GPIO support is far too inflexible for
all my use cases.  To address this, the following changes are made:

* create generic functions which deal with manipulating the on-chip
  GPIO1/2 blocks.  Such functions are universally useful.
* Macros for GPIO2 shared interrupt management and block control.
* support for both built-in CONFIG_GPIOLIB and fast, inlined GPIO macros.

  If CONFIG_GPIOLIB is not enabled, provide linux gpio framework
  compatibility by directly inlining the GPIO1/2 functions.  GPIO access
  is limited to on-chip ones and they can be accessed as documented in
  the datasheets (GPIO0-31 and 200-215).

  If CONFIG_GPIOLIB is selected, two (2) gpio_chip-s, one for GPIO1 and
  one for GPIO2, are registered.  GPIOs can still be accessed by using
  the numberspace established in the databooks.

  However this is not yet flexible enough for my uses:  My Alchemy
  systems have a documented "external" gpio interface (fixed, different
  numberspace) and can support a variety of baseboards, some of which
  are equipped with I2C gpio expanders.  I want to be able to provide
  the default 16 GPIOs of the CPU board numbered as 0..15 and also
  support gpio expanders, if present, starting as gpio16.

  To achieve this, a new Kconfig symbol for Alchemy is introduced,
  CONFIG_ALCHEMY_GPIO_INDIRECT, which boards can enable to signal
  that they don't want the Alchemy numberspace exposed to the outside
  world, but instead want to provide their own.  Boards are now respon-
  sible for providing the linux gpio interface glue code (either in a
  custom gpio.h header (in board include directory) or with gpio_chips).

  To make the board-specific inlined gpio functions work, the MIPS
  Makefile must be changed so that the mach-au1x00/gpio.h header is
  included _after_ the board headers, by moving the inclusion of
  the mach-au1x00/ to the end of the header list.

  See arch/mips/include/asm/mach-au1x00/gpio.h for more info.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-06-17 11:06:28 +01:00
..
alchemy MIPS: Alchemy: Rewrite GPIO support. 2009-06-17 11:06:28 +01:00
basler/excite platform driver: fix incorrect use of 'platform_bus_type' with 'struct device_driver' 2009-03-24 16:38:25 -07:00
bcm47xx
boot
cavium-octeon MIPS: Add Cavium OCTEON PCI support. 2009-06-17 11:06:25 +01:00
cobalt cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
configs i2c/chips: Move max6875 to drivers/misc/eeprom 2009-06-15 18:01:49 +02:00
dec
emma Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-03-30 18:00:26 -07:00
fw
gt64120/wrppmc
include/asm MIPS: Alchemy: Rewrite GPIO support. 2009-06-17 11:06:28 +01:00
jazz Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-03-30 18:00:26 -07:00
kernel MIPS: TXx9: micro optimization for clocksource and clock_event 2009-06-17 11:06:25 +01:00
lasat cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
lemote/lm2e cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
lib MIPS: Fix __ndelay build error and add 'ull' suffix for 32-bit kernel 2009-06-17 11:06:24 +01:00
math-emu
mipssim
mm MIPS: Remove dead case label. 2009-06-17 11:06:26 +01:00
mti-malta irq: change ->set_affinity() to return status 2009-04-28 12:21:16 +02:00
nxp clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
oprofile
pci MIPS: RC32434: Define io_map_base for PCI controller 2009-01-30 21:32:59 +00:00
pmc-sierra MIPS: MSP71xx: Remove the RAMROOT functions 2009-05-14 13:50:29 +01:00
rb532 MIPS: RB532: Check irq number when handling GPIO interrupts 2009-06-17 11:06:27 +01:00
sgi-ip22 MIPS: IP22: Fix hang in power button interrupt handler 2009-05-20 18:53:13 +01:00
sgi-ip27 clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
sgi-ip32 MIPS: IP32: Remove unnecessary if not even harmful volatile keywords. 2009-05-22 13:52:06 +01:00
sibyte MIPS: Sibyte: Remove standalone kernel support 2009-06-17 11:06:27 +01:00
sni mips: remove driver_data direct access of struct device 2009-06-15 21:30:27 -07:00
txx9 MIPS: TXx9: Add TX4939 RNG support 2009-06-17 11:06:27 +01:00
vr41xx cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
Kconfig MIPS: Add Cavium OCTEON PCI support. 2009-06-17 11:06:25 +01:00
Kconfig.debug MIPS: Kconfig: Fix the arch-specific header path 2008-12-12 18:12:23 +00:00
Makefile MIPS: Alchemy: Rewrite GPIO support. 2009-06-17 11:06:28 +01:00