summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/devices.c
diff options
context:
space:
mode:
authorYen Lin <yelin@nvidia.com>2011-01-13 12:37:10 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:42:11 -0800
commitb043bd2cc95f3e61c89a6084ed48a03df425b1a5 (patch)
treefd90c0083f70cf3b0e82ea657304017fd069e749 /arch/arm/mach-tegra/devices.c
parent2ebec3713c183e9214ef0b3294b755dce92dc1cc (diff)
arm: tegra: Add SATA support
Original-Change-Id: I18c63f1c69e155ddc1cec1718af9684d861815b7 Reviewed-on: http://git-master/r/15863 Tested-by: Yen Lin <yelin@nvidia.com> Reviewed-by: Rhyland Klein <rklein@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-on: http://git-master/r/16485 Original-Change-Id: I6afa5a097b4fc7d6c45614107118458da0d9d888 Rebase-Id: R18ae88707c208faafc26de033e9f34a7466fa608
Diffstat (limited to 'arch/arm/mach-tegra/devices.c')
-rw-r--r--arch/arm/mach-tegra/devices.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index aca1984794f1..2ed27a8017c9 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -28,6 +28,7 @@
#include <mach/irqs.h>
#include <mach/iomap.h>
#include <mach/dma.h>
+#include <mach/sata.h>
#include <mach/usb_phy.h>
#include "gpio-names.h"
@@ -816,6 +817,42 @@ struct platform_device tegra_spdif_device = {
.num_resources = ARRAY_SIZE(spdif_resource),
};
+#ifdef CONFIG_SATA_AHCI_TEGRA
+static u64 tegra_sata_dma_mask = DMA_BIT_MASK(32);
+
+static struct tegra_sata_platform_data tegra_sata_pdata;
+
+static struct resource tegra_sata_resources[] = {
+ [0] = {
+ .start = TEGRA_SATA_BAR5_BASE,
+ .end = TEGRA_SATA_BAR5_BASE + TEGRA_SATA_BAR5_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = TEGRA_SATA_CONFIG_BASE,
+ .end = TEGRA_SATA_CONFIG_BASE + TEGRA_SATA_CONFIG_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [2] = {
+ .start = INT_SATA_CTL,
+ .end = INT_SATA_CTL,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device tegra_sata_device = {
+ .name = "tegra-sata",
+ .id = 0,
+ .dev = {
+ .platform_data = &tegra_sata_pdata,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ .dma_mask = &tegra_sata_dma_mask,
+ },
+ .resource = tegra_sata_resources,
+ .num_resources = ARRAY_SIZE(tegra_sata_resources),
+};
+#endif
+
#if defined(CONFIG_TEGRA_IOVMM_GART)
static struct resource tegra_gart_resources[] = {
[0] = {