Skip to contentSkip to conversation

SoC base drivers: ASIC3 support for iPaq rx3715

RFC PATCH In review Paul Sokolovsky 1 participant 1 message May 1, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 4/4 SoC base drivers: ASIC3 support for iPaq rx3715

Hello linux-kernel,

mach-rx3715: Add support for builtin ASIC3 chip, based on the asic3_base driver.

 arch/arm/mach-s3c2440/mach-rx3715.c         |   84 +++++++++++++++++++++++++++
 include/asm-arm/arch-s3c2410/rx3000-asic3.h |   63 ++++++++++++++++++++
 include/asm-arm/arch-s3c2410/rx3000.h       |   19 ++++++
 3 files changed, 166 insertions(+), 0 deletions(-)
arch/arm/mach-s3c2440/mach-rx3715.c +84 -0
index ae1d0a8..0c7285f 100644
@@ -2,6 +2,7 @@
  *
  * Copyright (c) 2003,2004 Simtec Electronics
  *	Ben Dooks <[email protected]>
+ * Copyright 2006 Roman Moravcik <[email protected]>
  *
  * http://www.handhelds.org/projects/rx3715.html
  *
@@ -50,6 +51,11 @@
 #include <asm/plat-s3c24xx/cpu.h>
 #include <asm/plat-s3c24xx/pm.h>
 
+#include <linux/soc/asic3_base.h>
+#include <asm/hardware/ipaq-asic3.h>
+#include <asm/arch/rx3000.h>
+#include <asm/arch/rx3000-asic3.h>
+
 static struct map_desc rx3715_iodesc[] __initdata = {
 	/* dump ISA space somewhere unused */
 
@@ -107,6 +113,84 @@ static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
 	}
 };
 
+/* ASIC3 SoC data */
+static struct asic3_platform_data rx3715_asic3_cfg = {
+	.gpio_a = {
+		.dir            = 0xffff,
+		.init           = 0x0028,
+		.sleep_mask     = 0xffff,
+		.sleep_out      = 0x0030,
+		.batt_fault_out = 0x0030,
+		.alt_function   = 0x0000,
+		.sleep_conf     = 0x0008,
+	},
+	.gpio_b = {
+		.dir            = 0xffff,
+		.init           = 0x1a02,
+		.sleep_mask     = 0xffff,
+		.sleep_out      = 0x0402,
+		.batt_fault_out = 0x0402,
+		.alt_function   = 0x0000,
+		.sleep_conf     = 0x0008,
+	},
+	.gpio_c = {
+		.dir            = 0xffff,
+		.init           = 0x0600,
+		.sleep_mask     = 0xffff,
+		.sleep_out      = 0x0000,
+		.batt_fault_out = 0x0000,
+		.alt_function   = 0x0007,
+		.sleep_conf     = 0x0008,
+	},
+	.gpio_d = {
+		.dir            = 0xfff0,
+		.init           = 0x0040,
+		.sleep_mask     = 0xfff0,
+		.sleep_out      = 0x0000,
+		.batt_fault_out = 0x0000,
+		.alt_function   = 0x0000,
+		.sleep_conf     = 0x0008,
+	},
+	.irq_base = RX3000_ASIC3_IRQ_BASE,
+
+	/*.child_platform_devs = child_devices,
+	.num_child_platform_devs = ARRAY_SIZE(child_devices),*/
+};
+
+static struct resource s3c_asic3_resources[] = {
+	[0] = {
+		.start  = 0x08000000,
+		.end    = 0x08000000 + IPAQ_ASIC3_MAP_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start  = IRQ_EINT12,
+		.end    = IRQ_EINT12,
+		.flags  = IORESOURCE_IRQ,
+	},
+	/* SD part */
+	[2] = {
+		.start	= 0x10000000,
+		.end	= 0x10000000 + IPAQ_ASIC3_MAP_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[3] = {
+		.start	= IRQ_EINT14,
+		.end	= IRQ_EINT14,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+struct platform_device s3c_device_asic3 = {
+	.name           = "asic3",
+	.id             = 0,
+	.num_resources  = ARRAY_SIZE(s3c_asic3_resources),
+	.resource       = s3c_asic3_resources,
+	.dev = { .platform_data = &rx3715_asic3_cfg, }
+};
+
+EXPORT_SYMBOL(s3c_device_asic3);
+
 /* framebuffer lcd controller information */
 
 static struct s3c2410fb_mach_info rx3715_lcdcfg __initdata = {
include/asm-arm/arch-s3c2410/rx3000-asic3.h new file +63 -0

63 lines not on this page · raw message

include/asm-arm/arch-s3c2410/rx3000.h new file +19 -0
new file mode 100644
index 0000000..faa32ea
@@ -0,0 +1,19 @@
+/*
+ * linux/include/asm-arm/arch-s3c2410/rx3000.h
+ *
+ * Written by Roman Moravcik <[email protected]>
+ *
+ * Use consistent with the GNU GPL is permitted,
+ * provided that this copyright notice is
+ * preserved in its entirety in all copies and derived works.
+ *
+ */
+
+#ifndef __ASM_ARCH_RX3000_H
+#define __ASM_ARCH_RX3000_H
+
+#include <asm/arch/irqs.h>
+
+#define RX3000_ASIC3_IRQ_BASE (IRQ_S3C2440_AC97 + 1)
+
+#endif  // __ASM_ARCH_RX3000_H
Signature · 2 lines
Best regards,
 Paul                          mailto:[email protected]