[ARM] tegra: add tegra_pwm to devices.c
Gary King [Fri, 3 Sep 2010 23:44:52 +0000 (16:44 -0700)]
Change-Id: I8d861fd9f7748f29879315cd6f0800cec6a84f9e
Signed-off-by: Gary King <gking@nvidia.com>

arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h

index aaa25c4..e2dc822 100644 (file)
@@ -841,3 +841,55 @@ struct platform_device tegra_wdt_device = {
        .num_resources  = ARRAY_SIZE(tegra_wdt_resources),
        .resource       = tegra_wdt_resources,
 };
+
+static struct resource tegra_pwfm0_resource = {
+       .start  = TEGRA_PWFM0_BASE,
+       .end    = TEGRA_PWFM0_BASE + TEGRA_PWFM0_SIZE - 1,
+       .flags  = IORESOURCE_MEM,
+};
+
+static struct resource tegra_pwfm1_resource = {
+       .start  = TEGRA_PWFM1_BASE,
+       .end    = TEGRA_PWFM1_BASE + TEGRA_PWFM1_SIZE - 1,
+       .flags  = IORESOURCE_MEM,
+};
+
+static struct resource tegra_pwfm2_resource = {
+       .start  = TEGRA_PWFM2_BASE,
+       .end    = TEGRA_PWFM2_BASE + TEGRA_PWFM2_SIZE - 1,
+       .flags  = IORESOURCE_MEM,
+};
+
+static struct resource tegra_pwfm3_resource = {
+       .start  = TEGRA_PWFM3_BASE,
+       .end    = TEGRA_PWFM3_BASE + TEGRA_PWFM3_SIZE - 1,
+       .flags  = IORESOURCE_MEM,
+};
+
+struct platform_device tegra_pwfm0_device = {
+       .name           = "tegra_pwm",
+       .id             = 0,
+       .num_resources  = 1,
+       .resource       = &tegra_pwfm0_resource,
+};
+
+struct platform_device tegra_pwfm1_device = {
+       .name           = "tegra_pwm",
+       .id             = 1,
+       .num_resources  = 1,
+       .resource       = &tegra_pwfm1_resource,
+};
+
+struct platform_device tegra_pwfm2_device = {
+       .name           = "tegra_pwm",
+       .id             = 2,
+       .num_resources  = 1,
+       .resource       = &tegra_pwfm2_resource,
+};
+
+struct platform_device tegra_pwfm3_device = {
+       .name           = "tegra_pwm",
+       .id             = 3,
+       .num_resources  = 1,
+       .resource       = &tegra_pwfm3_resource,
+};
index e0906a6..8b7e3e4 100644 (file)
@@ -55,4 +55,8 @@ extern struct platform_device tegra_i2s_device1;
 extern struct platform_device tegra_i2s_device2;
 extern struct platform_device tegra_gart_device;
 extern struct platform_device tegra_wdt_device;
+extern struct platform_device tegra_pwfm0_device;
+extern struct platform_device tegra_pwfm1_device;
+extern struct platform_device tegra_pwfm2_device;
+extern struct platform_device tegra_pwfm3_device;
 #endif