[ARM] S3C64XX: Provide device for IIS ports
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Jun 2009 19:08:38 +0000 (20:08 +0100)
committerBen Dooks <ben-linux@fluff.org>
Tue, 16 Jun 2009 22:30:50 +0000 (23:30 +0100)
This allows the S3C64XX IIS drivers to be converted to the standard
driver model and allows fixes there for problems with attempting to
acquire the clocks for the IIS blocks via the clock API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/plat-s3c/Makefile
arch/arm/plat-s3c/dev-audio.c [new file with mode: 0644]
arch/arm/plat-s3c/include/plat/devs.h

index 610651455a78615bbd74415cbcdf7802c0b44407..74bb7cb5da49571766c568ec3ad5ad90a4d434a4 100644 (file)
@@ -34,6 +34,7 @@ obj-$(CONFIG_S3C_DEV_HSMMC)   += dev-hsmmc.o
 obj-$(CONFIG_S3C_DEV_HSMMC1)   += dev-hsmmc1.o
 obj-y                          += dev-i2c0.o
 obj-$(CONFIG_S3C_DEV_I2C1)     += dev-i2c1.o
+obj-$(CONFIG_SND_S3C24XX_SOC)  += dev-audio.o
 obj-$(CONFIG_S3C_DEV_FB)       += dev-fb.o
 obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
 obj-$(CONFIG_S3C_DEV_USB_HSOTG)        += dev-usb-hsotg.o
diff --git a/arch/arm/plat-s3c/dev-audio.c b/arch/arm/plat-s3c/dev-audio.c
new file mode 100644 (file)
index 0000000..ccdd815
--- /dev/null
@@ -0,0 +1,52 @@
+/* linux/arch/arm/plat-s3c/dev-audio.c
+ *
+ * Copyright 2009 Wolfson Microelectronics
+ *      Mark Brown <broonie@opensource.wolfsonmicro.com>
+ *
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/devs.h>
+
+
+static struct resource s3c64xx_iis0_resource[] = {
+       [0] = {
+               .start = S3C64XX_PA_IIS0,
+               .end   = S3C64XX_PA_IIS0 + 0x100 - 1,
+               .flags = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device s3c64xx_device_iis0 = {
+       .name             = "s3c64xx-iis",
+       .id               = 0,
+       .num_resources    = ARRAY_SIZE(s3c64xx_iis0_resource),
+       .resource         = s3c64xx_iis0_resource,
+};
+EXPORT_SYMBOL(s3c64xx_device_iis0);
+
+static struct resource s3c64xx_iis1_resource[] = {
+       [0] = {
+               .start = S3C64XX_PA_IIS1,
+               .end   = S3C64XX_PA_IIS1 + 0x100 - 1,
+               .flags = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device s3c64xx_device_iis1 = {
+       .name             = "s3c64xx-iis",
+       .id               = 1,
+       .num_resources    = ARRAY_SIZE(s3c64xx_iis1_resource),
+       .resource         = s3c64xx_iis1_resource,
+};
+EXPORT_SYMBOL(s3c64xx_device_iis1);
index a0b6768fddcffda46ddd905cbc413975bc8196b5..91de11be274aa2844cbd65755f58d2439cff6306 100644 (file)
@@ -24,13 +24,15 @@ extern struct platform_device *s3c24xx_uart_src[];
 
 extern struct platform_device s3c_device_timer[];
 
+extern struct platform_device s3c64xx_device_iis0;
+extern struct platform_device s3c64xx_device_iis1;
+
 extern struct platform_device s3c_device_fb;
 extern struct platform_device s3c_device_usb;
 extern struct platform_device s3c_device_lcd;
 extern struct platform_device s3c_device_wdt;
 extern struct platform_device s3c_device_i2c0;
 extern struct platform_device s3c_device_i2c1;
-extern struct platform_device s3c_device_iis;
 extern struct platform_device s3c_device_rtc;
 extern struct platform_device s3c_device_adc;
 extern struct platform_device s3c_device_sdi;