diff options
author | Bitan Biswas <bbiswas@nvidia.com> | 2011-02-22 18:43:43 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:47:24 -0800 |
commit | 3a515d19515bed05ed720e8b34a86f9be04a766f (patch) | |
tree | a4393e168d0e4364611b9432a461f2727db197ed | |
parent | 3fe6afb47e87dda83af7b00ef36f0bba185b1e7b (diff) |
arm:tegra:tsensor: device definitions
Tegra internal temperature sensor addresses defined
Bug 661228
Original-Change-Id: I061ac9e7da3115d1e832e645582353f93378d291
Reviewed-on: http://git-master/r/36119
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Narendra Damahe <ndamahe@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Rebase-Id: R62de8521a55164f582eb2b0f8ad5a83bbc02876c
-rw-r--r-- | arch/arm/mach-tegra/devices.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-tegra/devices.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/iomap.h | 3 |
3 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c index b1b71b950979..0254aad613ff 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c @@ -1462,6 +1462,37 @@ struct platform_device tegra_kbc_device = { }; #if !defined(CONFIG_ARCH_TEGRA_2x_SOC) +static struct resource tegra_tsensor_resources[]= { + { + .start = TEGRA_TSENSOR_BASE, + .end = TEGRA_TSENSOR_BASE + TEGRA_TSENSOR_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = INT_TSENSOR, + .end = INT_TSENSOR, + .flags = IORESOURCE_IRQ, + }, + { + .start = TEGRA_PMC_BASE + 0x1B0, + /* 2 pmc registers mapped */ + .end = TEGRA_PMC_BASE + 0x1B0 + (2 * 4), + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device tegra_tsensor_device = { + .name = "tegra-tsensor", + .id = -1, + .num_resources = ARRAY_SIZE(tegra_tsensor_resources), + .resource = tegra_tsensor_resources, + .dev = { + .platform_data = 0, + }, +}; +#endif + +#if !defined(CONFIG_ARCH_TEGRA_2x_SOC) static u64 tegra_se_dma_mask = DMA_BIT_MASK(32); struct resource tegra_se_resources[] = { @@ -1488,3 +1519,4 @@ struct platform_device tegra_se_device = { .num_resources = ARRAY_SIZE(tegra_se_resources), }; #endif + diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h index b391eccafd75..76d4eb916cf7 100644 --- a/arch/arm/mach-tegra/devices.h +++ b/arch/arm/mach-tegra/devices.h @@ -102,6 +102,9 @@ extern struct platform_device tegra_grhost_device; extern struct platform_device tegra_spdif_device; extern struct platform_device tegra_avp_device; extern struct platform_device tegra_aes_device; +#if !defined(CONFIG_ARCH_TEGRA_2x_SOC) +extern struct platform_device tegra_tsensor_device; +#endif extern struct platform_device debug_uarta_device; extern struct platform_device debug_uartb_device; diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h index 73a907f2a7ae..7c8b5d1df892 100644 --- a/arch/arm/mach-tegra/include/mach/iomap.h +++ b/arch/arm/mach-tegra/include/mach/iomap.h @@ -245,6 +245,9 @@ #elif defined(CONFIG_ARCH_TEGRA_3x_SOC) +#define TEGRA_TSENSOR_BASE 0x70014000 +#define TEGRA_TSENSOR_SIZE SZ_4K + #define TEGRA_HDA_BASE 0x70030000 #define TEGRA_HDA_SIZE SZ_64K |