summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorManoj Chourasia <mchourasia@nvidia.com>2011-10-19 23:25:32 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-11-11 16:02:13 -0800
commit6b93835cef6321f286b8efcd032a1a1cc7a6ae9d (patch)
treef398d89e4518694f8a8a5ff84ecfa4b037297bac /arch
parentf77e726ec89d09ba3174a395d9f98c1b02a83c58 (diff)
tegra: NOR: Add NOR platform device
Added NOR platform device for Tegra. Change-Id: Id32e5d41862b2eccf1b49b953387de16302d6056 Reviewed-on: http://git-master/r/56895 Tested-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/devices.c28
-rw-r--r--arch/arm/mach-tegra/devices.h2
-rw-r--r--arch/arm/mach-tegra/include/mach/iomap.h8
3 files changed, 37 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index 7f067e978b79..6302ca240c45 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -372,7 +372,35 @@ struct platform_device tegra_spi_slave_device6 = {
};
#endif
+static struct resource resources_nor[] = {
+ [0] = {
+ .start = INT_SNOR,
+ .end = INT_SNOR,
+ .flags = IORESOURCE_IRQ,
+ },
+ [1] = {
+ /* Map SNOR Controller */
+ .start = TEGRA_SNOR_BASE,
+ .end = TEGRA_SNOR_BASE + TEGRA_SNOR_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [2] = {
+ /* Map the size of flash */
+ .start = TEGRA_NOR_FLASH_BASE,
+ .end = TEGRA_NOR_FLASH_BASE + TEGRA_NOR_FLASH_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ }
+};
+struct platform_device tegra_nor_device = {
+ .name = "tegra-nor",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(resources_nor),
+ .resource = resources_nor,
+ .dev = {
+ .coherent_dma_mask = 0xffffffff,
+ },
+};
static struct resource sdhci_resource1[] = {
[0] = {
diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h
index cefbee0eda25..2d90c205c7e1 100644
--- a/arch/arm/mach-tegra/devices.h
+++ b/arch/arm/mach-tegra/devices.h
@@ -100,7 +100,7 @@ extern struct platform_device tegra_das_device;
#if !defined(CONFIG_ARCH_TEGRA_2x_SOC)
extern struct platform_device tegra_tsensor_device;
#endif
-
+extern struct platform_device tegra_nor_device;
extern struct platform_device debug_uarta_device;
extern struct platform_device debug_uartb_device;
extern struct platform_device debug_uartc_device;
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h
index 253cb8e08a11..0d28bd0bc0bd 100644
--- a/arch/arm/mach-tegra/include/mach/iomap.h
+++ b/arch/arm/mach-tegra/include/mach/iomap.h
@@ -26,6 +26,14 @@
#include <asm/sizes.h>
#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
+#define TEGRA_NOR_FLASH_BASE 0xD0000000
+#define TEGRA_NOR_FLASH_SIZE SZ_256M
+#else
+#define TEGRA_NOR_FLASH_BASE 0x48000000
+#define TEGRA_NOR_FLASH_SIZE SZ_128M
+#endif
+
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
#define TEGRA_DRAM_BASE 0x00000000
#define TEGRA_DRAM_SIZE SZ_1G /* Maximum size */
#else