summaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/common
diff options
context:
space:
mode:
authorManuel Lauss <mano@roarinelk.homelinux.net>2008-01-27 18:14:52 +0100
committerJean Delvare <khali@hyperion.delvare>2008-01-27 18:14:52 +0100
commit8b798c4d16b762d15f4055597ff8d87f73b35552 (patch)
tree5e25f828d4eb3930a724c2f04f40bb6a8addff01 /arch/mips/au1000/common
parent91f27958d686da713c3b0a1dc205288898e44124 (diff)
downloadop-kernel-dev-8b798c4d16b762d15f4055597ff8d87f73b35552.zip
op-kernel-dev-8b798c4d16b762d15f4055597ff8d87f73b35552.tar.gz
i2c-au1550: Convert to platform driver
Convert the i2c-au1550 bus driver to platform driver, and register a platform device for the Alchemy Db/Pb series of boards. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'arch/mips/au1000/common')
-rw-r--r--arch/mips/au1000/common/platform.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c
index d51e18f..841904c 100644
--- a/arch/mips/au1000/common/platform.c
+++ b/arch/mips/au1000/common/platform.c
@@ -270,6 +270,24 @@ static struct platform_device smc91x_device = {
#endif
+/* All Alchemy demoboards with I2C have this #define in their headers */
+#ifdef SMBUS_PSC_BASE
+static struct resource pbdb_smbus_resources[] = {
+ {
+ .start = SMBUS_PSC_BASE,
+ .end = SMBUS_PSC_BASE + 0x24 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device pbdb_smbus_device = {
+ .name = "au1xpsc_smbus",
+ .id = 0, /* bus number */
+ .num_resources = ARRAY_SIZE(pbdb_smbus_resources),
+ .resource = pbdb_smbus_resources,
+};
+#endif
+
static struct platform_device *au1xxx_platform_devices[] __initdata = {
&au1xxx_usb_ohci_device,
&au1x00_pcmcia_device,
@@ -287,6 +305,9 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
#ifdef CONFIG_MIPS_DB1200
&smc91x_device,
#endif
+#ifdef SMBUS_PSC_BASE
+ &pbdb_smbus_device,
+#endif
};
int __init au1xxx_platform_init(void)
OpenPOWER on IntegriCloud