diff options
author | Andrei Warkentin <andreiw@motorola.com> | 2010-06-28 17:59:01 -0500 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-10-06 16:27:03 -0700 |
commit | 6fb715de6a8a981f696953795fcfb8aff1742e03 (patch) | |
tree | 9c90d2985992f710ef06892c3edcfa0a7acbc32e /arch/arm/mach-tegra | |
parent | 366a15f41d50d8991d72bd9e063bc0a7e9296574 (diff) |
w1: master: tegra_w1: Adds generic mach-tegra w1 support.
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>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/devices.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-tegra/devices.h | 3 |
2 files changed, 22 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c index 05d5f28dee4d..600b1b484efc 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c @@ -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), +}; diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h index 9539988f08af..bbe95926842d 100644 --- a/arch/arm/mach-tegra/devices.h +++ b/arch/arm/mach-tegra/devices.h @@ -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 |