Merge remote branch 'common/android-2.6.36' into android-tegra-2.6.36
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-tegra / board-harmony-panel.c
1 /*
2  * arch/arm/mach-tegra/board-harmony-panel.c
3  *
4  * Copyright (C) 2010 Google, Inc.
5  *
6  * This software is licensed under the terms of the GNU General Public
7  * License version 2, as published by the Free Software Foundation, and
8  * may be copied, distributed, and modified under those terms.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  */
16
17 #include <linux/resource.h>
18 #include <linux/platform_device.h>
19 #include <asm/mach-types.h>
20 #include <mach/irqs.h>
21 #include <mach/iomap.h>
22 #include <mach/tegra_fb.h>
23
24 /* Framebuffer */
25 static struct resource fb_resource[] = {
26         [0] = {
27                 .start  = INT_DISPLAY_GENERAL,
28                 .end    = INT_DISPLAY_GENERAL,
29                 .flags  = IORESOURCE_IRQ,
30         },
31         [1] = {
32                 .start  = TEGRA_DISPLAY_BASE,
33                 .end    = TEGRA_DISPLAY_BASE + TEGRA_DISPLAY_SIZE-1,
34                 .flags  = IORESOURCE_MEM,
35         },
36         [2] = {
37                 .start  = 0x1c012000,
38                 .end    = 0x1c012000 + 0x500000 - 1,
39                 .flags  = IORESOURCE_MEM,
40         },
41 };
42
43 static struct tegra_fb_lcd_data tegra_fb_lcd_platform_data = {
44         .lcd_xres       = 1024,
45         .lcd_yres       = 600,
46         .fb_xres        = 1024,
47         .fb_yres        = 600,
48         .bits_per_pixel = 16,
49 };
50
51 static struct platform_device tegra_fb_device = {
52         .name           = "tegrafb",
53         .id             = 0,
54         .resource       = fb_resource,
55         .num_resources  = ARRAY_SIZE(fb_resource),
56         .dev = {
57                 .platform_data = &tegra_fb_lcd_platform_data,
58         },
59 };
60
61 int __init harmony_panel_init(void) {
62         return platform_device_register(&tegra_fb_device);
63 }
64