powerpc/5200: Rework GPT driver to also be an IRQ controller
authorGrant Likely <grant.likely@secretlab.ca>
Wed, 4 Feb 2009 20:35:42 +0000 (13:35 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 4 Feb 2009 20:35:42 +0000 (13:35 -0700)
commit5496eab2434f2a2dfe0d35496fd9605d548b7fbc
tree43e45be097642a04258263663818659bee938e84
parent8f2558ded599c10d96a56fbf12849a27f6ab7997
powerpc/5200: Rework GPT driver to also be an IRQ controller

This patch adds IRQ controller support to the MPC5200 General
Purpose Timer (GPT) device driver.  With this patch the mpc5200-gpt
driver supports both GPIO and IRQ functions.

The GPT driver was contained within the mpc52xx_gpio.c file, but this
patch moves it out into a new file (mpc52xx_gpt.c) since it has more
than just GPIO functionality now and it was only grouped with the
mpc52xx-gpio drivers as a matter of convenience before.  Also, this
driver will most likely get extended again to also provide support
for the timer function.

Implementation note: Alternately, I could have tried to implement
the IRQ support as a separate driver and left the GPIO portion alone.
However, multiple functions of this device (ie. GPIO input+interrupt
controller, or timer+GPIO) can be active at the same time and the
registers are shared so it is safer to contain all functionality
within a single driver.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
arch/powerpc/platforms/52xx/Makefile
arch/powerpc/platforms/52xx/mpc52xx_gpio.c
arch/powerpc/platforms/52xx/mpc52xx_gpt.c [new file with mode: 0644]