aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Büsch <mb@bu3sch.de>2008-03-19 10:35:56 +0000
committerMichael Büsch <mb@bu3sch.de>2008-03-19 10:35:56 +0000
commitc7ac9d32824c4f0585b3dcad1a0d60a5e257c0cb (patch)
tree7609cedb441334e3d457ba29c551e4774d8fd9e0
parenta4920f613a96a7d8c39bc2491dcc36553e2e9666 (diff)
downloadupstream-c7ac9d32824c4f0585b3dcad1a0d60a5e257c0cb.tar.gz
upstream-c7ac9d32824c4f0585b3dcad1a0d60a5e257c0cb.tar.bz2
upstream-c7ac9d32824c4f0585b3dcad1a0d60a5e257c0cb.zip
bcm47xx: Register a GPIODEV platform device to allow GPIO access via /dev/gpio
SVN-Revision: 10623
-rw-r--r--target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c b/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c
index 5856d8fc69..41d7b0b758 100644
--- a/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c
+++ b/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c
@@ -226,4 +226,21 @@ void __init plat_mem_setup(void)
board_time_init = bcm47xx_time_init;
}
+static int __init bcm47xx_register_gpiodev(void)
+{
+ static struct resource res = {
+ .start = 0xFFFFFFFF,
+ };
+ struct platform_device *pdev;
+
+ pdev = platform_device_register_simple("GPIODEV", 0, &res, 1);
+ if (!pdev) {
+ printk(KERN_ERR "bcm47xx: GPIODEV init failed\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+device_initcall(bcm47xx_register_gpiodev);
+
EXPORT_SYMBOL(ssb);