w1: master: tegra_w1: Adds generic mach-tegra w1 support.
authorAndrei Warkentin <andreiw@motorola.com>
Mon, 28 Jun 2010 22:59:01 +0000 (17:59 -0500)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:27:03 +0000 (16:27 -0700)
This adds w1 as a device for mach-tegra boards, fixes wrong
OWR I/O base, and changes OWR clock name.

Change-Id: Idffbdbd05f383ce8e423ee301e197e230db4f2f9
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h

index 05d5f28dee4d3046b9259a8235b8aef2b83a5f53..600b1b484efcf719e0420f3c6f54d6bef3d28d1f 100644 (file)
@@ -261,7 +261,6 @@ static struct resource sdhci_resource4[] = {
        },
 };
 
-
 /* board files should fill in platform_data register the devices themselvs.
  * See board-harmony.c for an example
  */
@@ -292,3 +291,23 @@ struct platform_device tegra_sdhci_device4 = {
        .resource       = sdhci_resource4,
        .num_resources  = ARRAY_SIZE(sdhci_resource4),
 };
+
+static struct resource w1_resources[] = {
+       [0] = {
+               .start = INT_OWR,
+               .end   = INT_OWR,
+               .flags = IORESOURCE_IRQ
+       },
+       [1] = {
+               .start = TEGRA_OWR_BASE,
+               .end = TEGRA_OWR_BASE + TEGRA_OWR_SIZE - 1,
+               .flags = IORESOURCE_MEM
+       }
+};
+
+struct platform_device tegra_w1_device = {
+       .name          = "tegra_w1",
+       .id            = -1,
+       .resource      = w1_resources,
+       .num_resources = ARRAY_SIZE(w1_resources),
+};
index 9539988f08afdb5088ed16af637f032df6190df9..bbe95926842d3813ef9725ae3de7480984881937 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * arch/arm/mach-tegra/devices.c
+ * arch/arm/mach-tegra/devices.h
  *
  * Copyright (C) 2010 Google, Inc.
  *
@@ -35,5 +35,6 @@ extern struct platform_device tegra_spi_device1;
 extern struct platform_device tegra_spi_device2;
 extern struct platform_device tegra_spi_device3;
 extern struct platform_device tegra_spi_device4;
+extern struct platform_device tegra_w1_device;
 
 #endif