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