Gitweb: http://git.kernel.org/linus/3e3c62ca5395df48319b808379bc9fd487ff3c29
Commit: 3e3c62ca5395df48319b808379bc9fd487ff3c29
Parent: aaedaa2b5c610ae97f863078075d8d3c6ef91575
Author: Rabin Vincent <rabin.vincent@stericsson.com>
AuthorDate: Wed Mar 3 04:52:34 2010 +0100
Committer: Russell King <rmk+kernel@arm.linux.org.uk>
CommitDate: Fri Mar 19 18:29:32 2010 +0000
ARM: 5972/1: nomadik-gpio: convert to platform driver
On the U8500 platform there are four GPIO blocks, each with a 4K address
space, including the peripheral identification. However, each of these
blocks have a varying number of banks, each of which have 32 GPIOs and
an interrupt line.
The current nomadik-gpio driver implementation can handle each of these
sub-banks easily with one instance each, but cannot as-is be hooked up
to them because it is an AMBA driver and it expects to see a peripheral
with the appropriate peripheral ids but having only one bank and only
one interrupt.
Solve this by converting the driver to a platform driver.
Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-nomadik/cpu-8815.c | 83 ++++++++++++++++------------
arch/arm/plat-nomadik/gpio.c | 74 +++++++++++++++-----------
arch/arm/plat-nomadik/include/plat/gpio.h | 1 -
3 files changed, 90 insertions(+), 68 deletions(-)
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 9bf33b3..91c3c90 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -20,6 +20,7 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/amba/bus.h>
+#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <mach/hardware.h>
@@ -30,60 +31,66 @@
...