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>
This commit is contained in:
Andrei Warkentin
2010-06-28 17:59:01 -05:00
committed by Colin Cross
parent 366a15f41d
commit 6fb715de6a
2 changed files with 22 additions and 2 deletions

View 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),
};

View 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