#include <mach/suspend.h>
#include <mach/system.h>
#include <mach/tegra_fiq_debugger.h>
+#include <mach/nvmap.h>
#include <linux/usb/android_composite.h>
#include "clock.h"
#include "gpio-names.h"
#include "devices.h"
-#include "nv/include/linux/nvmem_ioctl.h"
/* NVidia bootloader tags */
#define ATAG_NVIDIA 0x41000801
.resource = tegra_gart_resources
};
-static struct resource tegra_grhost_resources[] = {
- {
- .start = TEGRA_HOST1X_BASE,
- .end = TEGRA_HOST1X_BASE + TEGRA_HOST1X_SIZE - 1,
- .flags = IORESOURCE_MEM,
- },
- {
- .start = TEGRA_DISPLAY_BASE,
- .end = TEGRA_DISPLAY_BASE + TEGRA_DISPLAY_SIZE - 1,
- .flags = IORESOURCE_MEM,
- },
- {
- .start = TEGRA_DISPLAY2_BASE,
- .end = TEGRA_DISPLAY2_BASE + TEGRA_DISPLAY2_SIZE - 1,
- .flags = IORESOURCE_MEM,
- },
- {
- .start = TEGRA_VI_BASE,
- .end = TEGRA_VI_BASE + TEGRA_VI_SIZE - 1,
- .flags = IORESOURCE_MEM,
- },
- {
- .start = TEGRA_ISP_BASE,
- .end = TEGRA_ISP_BASE + TEGRA_ISP_SIZE - 1,
- .flags = IORESOURCE_MEM,
- },
- {
- .start = TEGRA_MPE_BASE,
- .end = TEGRA_MPE_BASE + TEGRA_MPE_SIZE - 1,
- .flags = IORESOURCE_MEM,
- },
- {
- .start = INT_SYNCPT_THRESH_BASE,
- .end = INT_SYNCPT_THRESH_BASE + INT_SYNCPT_THRESH_NR - 1,
- .flags = IORESOURCE_IRQ,
- },
- {
- .start = INT_HOST1X_MPCORE_GENERAL,
- .end = INT_HOST1X_MPCORE_GENERAL,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct platform_device tegra_grhost_dev = {
- .name = "tegra_grhost",
- .id = -1,
- .resource = tegra_grhost_resources,
- .num_resources = ARRAY_SIZE(tegra_grhost_resources),
-};
-
static struct platform_device bcm4329_rfkill = {
.name = "bcm4329_rfkill",
.id = -1,
.resource = ram_console_resources,
};
+static struct nvmap_platform_carveout stingray_carveouts[] = {
+ [0] = {
+ .name = "iram",
+ .usage_mask = NVMAP_HEAP_CARVEOUT_IRAM,
+ .base = TEGRA_IRAM_BASE,
+ .size = TEGRA_IRAM_SIZE,
+ .buddy_size = 0,
+ },
+ [1] = {
+ .name = "generic-0",
+ .usage_mask = NVMAP_HEAP_CARVEOUT_GENERIC,
+ .base = 0x1c600000, /* 1M aligned above disp1 fbmem */
+ .size = SZ_64M - 0x600000,
+ .buddy_size = SZ_32K,
+ },
+};
+
+static struct nvmap_platform_data stingray_nvmap_data = {
+ .carveouts = stingray_carveouts,
+ .nr_carveouts = ARRAY_SIZE(stingray_carveouts),
+};
+
+static struct platform_device stingray_nvmap_device = {
+ .name = "tegra-nvmap",
+ .id = -1,
+ .dev = {
+ .platform_data = &stingray_nvmap_data,
+ },
+};
+
static struct platform_device *stingray_devices[] __initdata = {
&cpcap_otg,
&bq24617_device,
&tegra_spi_device3,
&tegra_spi_device4,
&tegra_gart_dev,
- &tegra_grhost_dev,
+ &stingray_nvmap_device,
+ &tegra_grhost_device,
&ram_console_device,
&tegra_camera,
&tegra_i2s_device1,
APB_MISC_DAS_DAC_INPUT_DATA_CLK_SEL_0 + 4);
}
-extern int nvmap_add_carveout_heap(unsigned long, size_t, const char *,
- unsigned int);
-
static void __init tegra_stingray_init(void)
{
struct clk *clk;
tegra_serial_debug_init(TEGRA_UARTB_BASE, INT_UARTB,
clk, INT_QUAD_RES_31, -1);
- nvmap_add_carveout_heap(TEGRA_IRAM_BASE, TEGRA_IRAM_SIZE, "iram",
- NVMEM_HEAP_CARVEOUT_IRAM);
-
init_das();
tegra_i2s_device1.dev.platform_data = &tegra_audio_pdata;
tegra_i2s_device2.dev.platform_data = &tegra_audio2_pdata;