Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
18bbff9f
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
18bbff9f
编写于
3月 25, 2012
作者:
R
Russell King
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'sa11x0-lcd' into sa11x0
Conflicts: arch/arm/mach-sa1100/assabet.c
上级
e7d863d0
7cb66dcc
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
492 addition
and
470 deletion
+492
-470
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/assabet.c
+100
-30
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/collie.c
+17
-0
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/generic.c
+7
-7
arch/arm/mach-sa1100/generic.h
arch/arm/mach-sa1100/generic.h
+3
-3
arch/arm/mach-sa1100/h3100.c
arch/arm/mach-sa1100/h3100.c
+21
-2
arch/arm/mach-sa1100/h3600.c
arch/arm/mach-sa1100/h3600.c
+30
-2
arch/arm/mach-sa1100/include/mach/SA-1100.h
arch/arm/mach-sa1100/include/mach/SA-1100.h
+0
-10
arch/arm/mach-sa1100/include/mach/shannon.h
arch/arm/mach-sa1100/include/mach/shannon.h
+1
-1
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/lart.c
+79
-0
arch/arm/mach-sa1100/shannon.c
arch/arm/mach-sa1100/shannon.c
+17
-0
drivers/video/sa1100fb.c
drivers/video/sa1100fb.c
+141
-352
drivers/video/sa1100fb.h
drivers/video/sa1100fb.h
+13
-63
include/video/sa1100fb.h
include/video/sa1100fb.h
+63
-0
未找到文件。
arch/arm/mach-sa1100/assabet.c
浏览文件 @
18bbff9f
...
...
@@ -20,6 +20,8 @@
#include <linux/delay.h>
#include <linux/mm.h>
#include <video/sa1100fb.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
...
...
@@ -69,33 +71,6 @@ void ASSABET_BCR_frob(unsigned int mask, unsigned int val)
EXPORT_SYMBOL
(
ASSABET_BCR_frob
);
static
void
assabet_backlight_power
(
int
on
)
{
#ifndef ASSABET_PAL_VIDEO
if
(
on
)
ASSABET_BCR_set
(
ASSABET_BCR_LIGHT_ON
);
else
#endif
ASSABET_BCR_clear
(
ASSABET_BCR_LIGHT_ON
);
}
/*
* Turn on/off the backlight. When turning the backlight on,
* we wait 500us after turning it on so we don't cause the
* supplies to droop when we enable the LCD controller (and
* cause a hard reset.)
*/
static
void
assabet_lcd_power
(
int
on
)
{
#ifndef ASSABET_PAL_VIDEO
if
(
on
)
{
ASSABET_BCR_set
(
ASSABET_BCR_LCD_ON
);
udelay
(
500
);
}
else
#endif
ASSABET_BCR_clear
(
ASSABET_BCR_LCD_ON
);
}
/*
* Assabet flash support code.
...
...
@@ -197,6 +172,99 @@ static struct mcp_plat_data assabet_mcp_data = {
.
sclk_rate
=
11981000
,
};
static
void
assabet_lcd_set_visual
(
u32
visual
)
{
u_int
is_true_color
=
visual
==
FB_VISUAL_TRUECOLOR
;
if
(
machine_is_assabet
())
{
#if 1 // phase 4 or newer Assabet's
if
(
is_true_color
)
ASSABET_BCR_set
(
ASSABET_BCR_LCD_12RGB
);
else
ASSABET_BCR_clear
(
ASSABET_BCR_LCD_12RGB
);
#else
// older Assabet's
if
(
is_true_color
)
ASSABET_BCR_clear
(
ASSABET_BCR_LCD_12RGB
);
else
ASSABET_BCR_set
(
ASSABET_BCR_LCD_12RGB
);
#endif
}
}
#ifndef ASSABET_PAL_VIDEO
static
void
assabet_lcd_backlight_power
(
int
on
)
{
if
(
on
)
ASSABET_BCR_set
(
ASSABET_BCR_LIGHT_ON
);
else
ASSABET_BCR_clear
(
ASSABET_BCR_LIGHT_ON
);
}
/*
* Turn on/off the backlight. When turning the backlight on, we wait
* 500us after turning it on so we don't cause the supplies to droop
* when we enable the LCD controller (and cause a hard reset.)
*/
static
void
assabet_lcd_power
(
int
on
)
{
if
(
on
)
{
ASSABET_BCR_set
(
ASSABET_BCR_LCD_ON
);
udelay
(
500
);
}
else
ASSABET_BCR_clear
(
ASSABET_BCR_LCD_ON
);
}
/*
* The assabet uses a sharp LQ039Q2DS54 LCD module. It is actually
* takes an RGB666 signal, but we provide it with an RGB565 signal
* instead (def_rgb_16).
*/
static
struct
sa1100fb_mach_info
lq039q2ds54_info
=
{
.
pixclock
=
171521
,
.
bpp
=
16
,
.
xres
=
320
,
.
yres
=
240
,
.
hsync_len
=
5
,
.
vsync_len
=
1
,
.
left_margin
=
61
,
.
upper_margin
=
3
,
.
right_margin
=
9
,
.
lower_margin
=
0
,
.
sync
=
FB_SYNC_HOR_HIGH_ACT
|
FB_SYNC_VERT_HIGH_ACT
,
.
lccr0
=
LCCR0_Color
|
LCCR0_Sngl
|
LCCR0_Act
,
.
lccr3
=
LCCR3_OutEnH
|
LCCR3_PixRsEdg
|
LCCR3_ACBsDiv
(
2
),
.
backlight_power
=
assabet_lcd_backlight_power
,
.
lcd_power
=
assabet_lcd_power
,
.
set_visual
=
assabet_lcd_set_visual
,
};
#else
static
void
assabet_pal_backlight_power
(
int
on
)
{
ASSABET_BCR_clear
(
ASSABET_BCR_LIGHT_ON
);
}
static
void
assabet_pal_power
(
int
on
)
{
ASSABET_BCR_clear
(
ASSABET_BCR_LCD_ON
);
}
static
struct
sa1100fb_mach_info
pal_info
=
{
.
pixclock
=
67797
,
.
bpp
=
16
,
.
xres
=
640
,
.
yres
=
512
,
.
hsync_len
=
64
,
.
vsync_len
=
6
,
.
left_margin
=
125
,
.
upper_margin
=
70
,
.
right_margin
=
115
,
.
lower_margin
=
36
,
.
lccr0
=
LCCR0_Color
|
LCCR0_Sngl
|
LCCR0_Act
,
.
lccr3
=
LCCR3_OutEnH
|
LCCR3_PixRsEdg
|
LCCR3_ACBsDiv
(
512
),
.
backlight_power
=
assabet_pal_backlight_power
,
.
lcd_power
=
assabet_pal_power
,
.
set_visual
=
assabet_lcd_set_visual
,
};
#endif
#ifdef CONFIG_ASSABET_NEPONSET
static
struct
resource
neponset_resources
[]
=
{
DEFINE_RES_MEM
(
0x10000000
,
0x08000000
),
...
...
@@ -241,9 +309,6 @@ static void __init assabet_init(void)
PPDR
|=
PPC_TXD3
|
PPC_TXD1
;
PPSR
|=
PPC_TXD3
|
PPC_TXD1
;
sa1100fb_lcd_power
=
assabet_lcd_power
;
sa1100fb_backlight_power
=
assabet_backlight_power
;
if
(
machine_has_neponset
())
{
/*
* Angel sets this, but other bootloaders may not.
...
...
@@ -262,6 +327,11 @@ static void __init assabet_init(void)
#endif
}
#ifndef ASSABET_PAL_VIDEO
sa11x0_register_lcd
(
&
lq039q2ds54_info
);
#else
sa11x0_register_lcd
(
&
pal_video
);
#endif
sa11x0_register_mtd
(
&
assabet_flash_data
,
assabet_flash_resources
,
ARRAY_SIZE
(
assabet_flash_resources
));
sa11x0_register_irda
(
&
assabet_irda_data
);
...
...
arch/arm/mach-sa1100/collie.c
浏览文件 @
18bbff9f
...
...
@@ -28,6 +28,8 @@
#include <linux/gpio.h>
#include <linux/pda_power.h>
#include <video/sa1100fb.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
...
...
@@ -294,6 +296,20 @@ static struct resource collie_flash_resources[] = {
DEFINE_RES_MEM
(
SA1100_CS0_PHYS
,
SZ_32M
),
};
static
struct
sa1100fb_mach_info
collie_lcd_info
=
{
.
pixclock
=
171521
,
.
bpp
=
16
,
.
xres
=
320
,
.
yres
=
240
,
.
hsync_len
=
5
,
.
vsync_len
=
1
,
.
left_margin
=
11
,
.
upper_margin
=
2
,
.
right_margin
=
30
,
.
lower_margin
=
0
,
.
sync
=
FB_SYNC_HOR_HIGH_ACT
|
FB_SYNC_VERT_HIGH_ACT
,
.
lccr0
=
LCCR0_Color
|
LCCR0_Sngl
|
LCCR0_Act
,
.
lccr3
=
LCCR3_OutEnH
|
LCCR3_PixRsEdg
|
LCCR3_ACBsDiv
(
2
),
};
static
void
__init
collie_init
(
void
)
{
int
ret
=
0
;
...
...
@@ -332,6 +348,7 @@ static void __init collie_init(void)
printk
(
KERN_WARNING
"collie: Unable to register LoCoMo device
\n
"
);
}
sa11x0_register_lcd
(
&
collie_lcd_info
);
sa11x0_register_mtd
(
&
collie_flash_data
,
collie_flash_resources
,
ARRAY_SIZE
(
collie_flash_resources
));
sa11x0_register_mcp
(
&
collie_mcp_data
);
...
...
arch/arm/mach-sa1100/generic.c
浏览文件 @
18bbff9f
...
...
@@ -20,6 +20,8 @@
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <video/sa1100fb.h>
#include <asm/div64.h>
#include <mach/hardware.h>
#include <asm/system.h>
...
...
@@ -247,6 +249,11 @@ static struct platform_device sa11x0fb_device = {
.
resource
=
sa11x0fb_resources
,
};
void
sa11x0_register_lcd
(
struct
sa1100fb_mach_info
*
inf
)
{
sa11x0_register_device
(
&
sa11x0fb_device
,
inf
);
}
static
struct
platform_device
sa11x0pcmcia_device
=
{
.
name
=
"sa11x0-pcmcia"
,
.
id
=
-
1
,
...
...
@@ -319,7 +326,6 @@ static struct platform_device *sa11x0_devices[] __initdata = {
&
sa11x0uart3_device
,
&
sa11x0ssp_device
,
&
sa11x0pcmcia_device
,
&
sa11x0fb_device
,
&
sa11x0rtc_device
,
&
sa11x0dma_device
,
};
...
...
@@ -332,12 +338,6 @@ static int __init sa1100_init(void)
arch_initcall
(
sa1100_init
);
void
(
*
sa1100fb_backlight_power
)(
int
on
);
void
(
*
sa1100fb_lcd_power
)(
int
on
);
EXPORT_SYMBOL
(
sa1100fb_backlight_power
);
EXPORT_SYMBOL
(
sa1100fb_lcd_power
);
/*
* Common I/O mapping:
...
...
arch/arm/mach-sa1100/generic.h
浏览文件 @
18bbff9f
...
...
@@ -16,9 +16,6 @@ extern void sa11x0_restart(char, const char *);
mi->bank[__nr].start = (__start), \
mi->bank[__nr].size = (__size)
extern
void
(
*
sa1100fb_backlight_power
)(
int
on
);
extern
void
(
*
sa1100fb_lcd_power
)(
int
on
);
extern
void
sa1110_mb_enable
(
void
);
extern
void
sa1110_mb_disable
(
void
);
...
...
@@ -40,3 +37,6 @@ void sa11x0_register_irda(struct irda_platform_data *irda);
struct
mcp_plat_data
;
void
sa11x0_register_mcp
(
struct
mcp_plat_data
*
data
);
struct
sa1100fb_mach_info
;
void
sa11x0_register_lcd
(
struct
sa1100fb_mach_info
*
inf
);
arch/arm/mach-sa1100/h3100.c
浏览文件 @
18bbff9f
...
...
@@ -14,6 +14,8 @@
#include <linux/kernel.h>
#include <linux/gpio.h>
#include <video/sa1100fb.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/irda.h>
...
...
@@ -36,13 +38,28 @@ static void h3100_lcd_power(int enable)
}
}
static
struct
sa1100fb_mach_info
h3100_lcd_info
=
{
.
pixclock
=
406977
,
.
bpp
=
4
,
.
xres
=
320
,
.
yres
=
240
,
.
hsync_len
=
26
,
.
vsync_len
=
41
,
.
left_margin
=
4
,
.
upper_margin
=
0
,
.
right_margin
=
4
,
.
lower_margin
=
0
,
.
sync
=
FB_SYNC_HOR_HIGH_ACT
|
FB_SYNC_VERT_HIGH_ACT
,
.
cmap_greyscale
=
1
,
.
cmap_inverse
=
1
,
.
lccr0
=
LCCR0_Mono
|
LCCR0_4PixMono
|
LCCR0_Sngl
|
LCCR0_Pas
,
.
lccr3
=
LCCR3_OutEnH
|
LCCR3_PixRsEdg
|
LCCR3_ACBsDiv
(
2
),
.
lcd_power
=
h3100_lcd_power
,
};
static
void
__init
h3100_map_io
(
void
)
{
h3xxx_map_io
();
sa1100fb_lcd_power
=
h3100_lcd_power
;
/* Older bootldrs put GPIO2-9 in alternate mode on the
assumption that they are used for video */
GAFR
&=
~
0x000001fb
;
...
...
@@ -80,6 +97,8 @@ static void __init h3100_mach_init(void)
{
h3xxx_init_gpio
(
h3100_default_gpio
,
ARRAY_SIZE
(
h3100_default_gpio
));
h3xxx_mach_init
();
sa11x0_register_lcd
(
&
h3100_lcd_info
);
sa11x0_register_irda
(
&
h3100_irda_data
);
}
...
...
arch/arm/mach-sa1100/h3600.c
浏览文件 @
18bbff9f
...
...
@@ -14,6 +14,8 @@
#include <linux/kernel.h>
#include <linux/gpio.h>
#include <video/sa1100fb.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/irda.h>
...
...
@@ -56,11 +58,35 @@ err2: gpio_free(H3XXX_EGPIO_LCD_ON);
err1:
return
;
}
static
const
struct
sa1100fb_rgb
h3600_rgb_16
=
{
.
red
=
{
.
offset
=
12
,
.
length
=
4
,
},
.
green
=
{
.
offset
=
7
,
.
length
=
4
,
},
.
blue
=
{
.
offset
=
1
,
.
length
=
4
,
},
.
transp
=
{
.
offset
=
0
,
.
length
=
0
,
},
};
static
struct
sa1100fb_mach_info
h3600_lcd_info
=
{
.
pixclock
=
174757
,
.
bpp
=
16
,
.
xres
=
320
,
.
yres
=
240
,
.
hsync_len
=
3
,
.
vsync_len
=
3
,
.
left_margin
=
12
,
.
upper_margin
=
10
,
.
right_margin
=
17
,
.
lower_margin
=
1
,
.
cmap_static
=
1
,
.
lccr0
=
LCCR0_Color
|
LCCR0_Sngl
|
LCCR0_Act
,
.
lccr3
=
LCCR3_OutEnH
|
LCCR3_PixRsEdg
|
LCCR3_ACBsDiv
(
2
),
.
rgb
[
RGB_16
]
=
&
h3600_rgb_16
,
.
lcd_power
=
h3600_lcd_power
,
};
static
void
__init
h3600_map_io
(
void
)
{
h3xxx_map_io
();
sa1100fb_lcd_power
=
h3600_lcd_power
;
}
/*
...
...
@@ -121,6 +147,8 @@ static void __init h3600_mach_init(void)
{
h3xxx_init_gpio
(
h3600_default_gpio
,
ARRAY_SIZE
(
h3600_default_gpio
));
h3xxx_mach_init
();
sa11x0_register_lcd
(
&
h3600_lcd_info
);
sa11x0_register_irda
(
&
h3600_irda_data
);
}
...
...
arch/arm/mach-sa1100/include/mach/SA-1100.h
浏览文件 @
18bbff9f
...
...
@@ -1688,16 +1688,6 @@
#define LCD_Int100_0A 0xF
/* LCD Intensity = 100.0% = 1 */
/* (Alternative) */
#define LCCR0 __REG(0xB0100000)
/* LCD Control Reg. 0 */
#define LCSR __REG(0xB0100004)
/* LCD Status Reg. */
#define DBAR1 __REG(0xB0100010)
/* LCD DMA Base Address Reg. channel 1 */
#define DCAR1 __REG(0xB0100014)
/* LCD DMA Current Address Reg. channel 1 */
#define DBAR2 __REG(0xB0100018)
/* LCD DMA Base Address Reg. channel 2 */
#define DCAR2 __REG(0xB010001C)
/* LCD DMA Current Address Reg. channel 2 */
#define LCCR1 __REG(0xB0100020)
/* LCD Control Reg. 1 */
#define LCCR2 __REG(0xB0100024)
/* LCD Control Reg. 2 */
#define LCCR3 __REG(0xB0100028)
/* LCD Control Reg. 3 */
#define LCCR0_LEN 0x00000001
/* LCD ENable */
#define LCCR0_CMS 0x00000002
/* Color/Monochrome display Select */
#define LCCR0_Color (LCCR0_CMS*0)
/* Color display */
...
...
arch/arm/mach-sa1100/include/mach/shannon.h
浏览文件 @
18bbff9f
...
...
@@ -21,7 +21,7 @@
#define SHANNON_GPIO_U3_RTS GPIO_GPIO (19)
/* ?? */
#define SHANNON_GPIO_U3_CTS GPIO_GPIO (20)
/* ?? */
#define SHANNON_GPIO_SENSE_12V GPIO_GPIO (21)
/* Input, 12v flash unprotect detected */
#define SHANNON_GPIO_DISP_EN
GPIO_GPIO (22)
/* out */
#define SHANNON_GPIO_DISP_EN
22
/* out */
/* XXX GPIO 23 unaccounted for */
#define SHANNON_GPIO_EJECT_0 GPIO_GPIO (24)
/* in */
#define SHANNON_IRQ_GPIO_EJECT_0 IRQ_GPIO24
...
...
arch/arm/mach-sa1100/lart.c
浏览文件 @
18bbff9f
...
...
@@ -6,6 +6,8 @@
#include <linux/kernel.h>
#include <linux/tty.h>
#include <video/sa1100fb.h>
#include <mach/hardware.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
...
...
@@ -26,8 +28,85 @@ static struct mcp_plat_data lart_mcp_data = {
.
sclk_rate
=
11981000
,
};
#ifdef LART_GREY_LCD
static
struct
sa1100fb_mach_info
lart_grey_info
=
{
.
pixclock
=
150000
,
.
bpp
=
4
,
.
xres
=
320
,
.
yres
=
240
,
.
hsync_len
=
1
,
.
vsync_len
=
1
,
.
left_margin
=
4
,
.
upper_margin
=
0
,
.
right_margin
=
2
,
.
lower_margin
=
0
,
.
cmap_greyscale
=
1
,
.
sync
=
FB_SYNC_HOR_HIGH_ACT
|
FB_SYNC_VERT_HIGH_ACT
,
.
lccr0
=
LCCR0_Mono
|
LCCR0_Sngl
|
LCCR0_Pas
|
LCCR0_4PixMono
,
.
lccr3
=
LCCR3_OutEnH
|
LCCR3_PixRsEdg
|
LCCR3_ACBsDiv
(
512
),
};
#endif
#ifdef LART_COLOR_LCD
static
struct
sa1100fb_mach_info
lart_color_info
=
{
.
pixclock
=
150000
,
.
bpp
=
16
,
.
xres
=
320
,
.
yres
=
240
,
.
hsync_len
=
2
,
.
vsync_len
=
3
,
.
left_margin
=
69
,
.
upper_margin
=
14
,
.
right_margin
=
8
,
.
lower_margin
=
4
,
.
lccr0
=
LCCR0_Color
|
LCCR0_Sngl
|
LCCR0_Act
,
.
lccr3
=
LCCR3_OutEnH
|
LCCR3_PixFlEdg
|
LCCR3_ACBsDiv
(
512
),
};
#endif
#ifdef LART_VIDEO_OUT
static
struct
sa1100fb_mach_info
lart_video_info
=
{
.
pixclock
=
39721
,
.
bpp
=
16
,
.
xres
=
640
,
.
yres
=
480
,
.
hsync_len
=
95
,
.
vsync_len
=
2
,
.
left_margin
=
40
,
.
upper_margin
=
32
,
.
right_margin
=
24
,
.
lower_margin
=
11
,
.
sync
=
FB_SYNC_HOR_HIGH_ACT
|
FB_SYNC_VERT_HIGH_ACT
,
.
lccr0
=
LCCR0_Color
|
LCCR0_Sngl
|
LCCR0_Act
,
.
lccr3
=
LCCR3_OutEnL
|
LCCR3_PixFlEdg
|
LCCR3_ACBsDiv
(
512
),
};
#endif
#ifdef LART_KIT01_LCD
static
struct
sa1100fb_mach_info
lart_kit01_info
=
{
.
pixclock
=
63291
,
.
bpp
=
16
,
.
xres
=
640
,
.
yres
=
480
,
.
hsync_len
=
64
,
.
vsync_len
=
3
,
.
left_margin
=
122
,
.
upper_margin
=
45
,
.
right_margin
=
10
,
.
lower_margin
=
10
,
.
lccr0
=
LCCR0_Color
|
LCCR0_Sngl
|
LCCR0_Act
,
.
lccr3
=
LCCR3_OutEnH
|
LCCR3_PixFlEdg
};
#endif
static
void
__init
lart_init
(
void
)
{
struct
sa1100fb_mach_info
*
inf
=
NULL
;
#ifdef LART_GREY_LCD
inf
=
&
lart_grey_info
;
#endif
#ifdef LART_COLOR_LCD
inf
=
&
lart_color_info
;
#endif
#ifdef LART_VIDEO_OUT
inf
=
&
lart_video_info
;
#endif
#ifdef LART_KIT01_LCD
inf
=
&
lart_kit01_info
;
#endif
if
(
inf
)
sa11x0_register_lcd
(
inf
);
sa11x0_register_mcp
(
&
lart_mcp_data
);
}
...
...
arch/arm/mach-sa1100/shannon.c
浏览文件 @
18bbff9f
...
...
@@ -9,6 +9,8 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <video/sa1100fb.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/setup.h>
...
...
@@ -54,8 +56,23 @@ static struct mcp_plat_data shannon_mcp_data = {
.
sclk_rate
=
11981000
,
};
static
struct
sa1100fb_mach_info
shannon_lcd_info
=
{
.
pixclock
=
152500
,
.
bpp
=
8
,
.
xres
=
640
,
.
yres
=
480
,
.
hsync_len
=
4
,
.
vsync_len
=
3
,
.
left_margin
=
2
,
.
upper_margin
=
0
,
.
right_margin
=
1
,
.
lower_margin
=
0
,
.
sync
=
FB_SYNC_HOR_HIGH_ACT
|
FB_SYNC_VERT_HIGH_ACT
,
.
lccr0
=
LCCR0_Color
|
LCCR0_Dual
|
LCCR0_Pas
,
.
lccr3
=
LCCR3_ACBsDiv
(
512
),
};
static
void
__init
shannon_init
(
void
)
{
sa11x0_register_lcd
(
&
shannon_lcd_info
);
sa11x0_register_mtd
(
&
shannon_flash_data
,
&
shannon_flash_resource
,
1
);
sa11x0_register_mcp
(
&
shannon_mcp_data
);
}
...
...
drivers/video/sa1100fb.c
浏览文件 @
18bbff9f
此差异已折叠。
点击以展开。
drivers/video/sa1100fb.h
浏览文件 @
18bbff9f
...
...
@@ -10,44 +10,15 @@
* for more details.
*/
/*
* These are the bitfields for each
* display depth that we support.
*/
struct
sa1100fb_rgb
{
struct
fb_bitfield
red
;
struct
fb_bitfield
green
;
struct
fb_bitfield
blue
;
struct
fb_bitfield
transp
;
};
/*
* This structure describes the machine which we are running on.
*/
struct
sa1100fb_mach_info
{
u_long
pixclock
;
u_short
xres
;
u_short
yres
;
u_char
bpp
;
u_char
hsync_len
;
u_char
left_margin
;
u_char
right_margin
;
u_char
vsync_len
;
u_char
upper_margin
;
u_char
lower_margin
;
u_char
sync
;
u_int
cmap_greyscale
:
1
,
cmap_inverse:
1
,
cmap_static:
1
,
unused:
29
;
u_int
lccr0
;
u_int
lccr3
;
};
#define LCCR0 0x0000
/* LCD Control Reg. 0 */
#define LCSR 0x0004
/* LCD Status Reg. */
#define DBAR1 0x0010
/* LCD DMA Base Address Reg. channel 1 */
#define DCAR1 0x0014
/* LCD DMA Current Address Reg. channel 1 */
#define DBAR2 0x0018
/* LCD DMA Base Address Reg. channel 2 */
#define DCAR2 0x001C
/* LCD DMA Current Address Reg. channel 2 */
#define LCCR1 0x0020
/* LCD Control Reg. 1 */
#define LCCR2 0x0024
/* LCD Control Reg. 2 */
#define LCCR3 0x0028
/* LCD Control Reg. 3 */
/* Shadows for LCD controller registers */
struct
sa1100fb_lcd_reg
{
...
...
@@ -57,19 +28,11 @@ struct sa1100fb_lcd_reg {
unsigned
long
lccr3
;
};
#define RGB_4 (0)
#define RGB_8 (1)
#define RGB_16 (2)
#define NR_RGB 3
struct
sa1100fb_info
{
struct
fb_info
fb
;
struct
device
*
dev
;
struct
sa1100fb_rgb
*
rgb
[
NR_RGB
];
u_int
max_bpp
;
u_int
max_xres
;
u_int
max_yres
;
const
struct
sa1100fb_rgb
*
rgb
[
NR_RGB
];
void
__iomem
*
base
;
/*
* These are the addresses we mapped
...
...
@@ -88,12 +51,6 @@ struct sa1100fb_info {
dma_addr_t
dbar1
;
dma_addr_t
dbar2
;
u_int
lccr0
;
u_int
lccr3
;
u_int
cmap_inverse
:
1
,
cmap_static:
1
,
unused:
30
;
u_int
reg_lccr0
;
u_int
reg_lccr1
;
u_int
reg_lccr2
;
...
...
@@ -109,6 +66,8 @@ struct sa1100fb_info {
struct
notifier_block
freq_transition
;
struct
notifier_block
freq_policy
;
#endif
const
struct
sa1100fb_mach_info
*
inf
;
};
#define TO_INF(ptr,member) container_of(ptr,struct sa1100fb_info,member)
...
...
@@ -129,15 +88,6 @@ struct sa1100fb_info {
#define SA1100_NAME "SA1100"
/*
* Debug macros
*/
#if DEBUG
# define DPRINTK(fmt, args...) printk("%s: " fmt, __func__ , ## args)
#else
# define DPRINTK(fmt, args...)
#endif
/*
* Minimum X and Y resolutions
*/
...
...
include/video/sa1100fb.h
0 → 100644
浏览文件 @
18bbff9f
/*
* StrongARM 1100 LCD Controller Frame Buffer Device
*
* Copyright (C) 1999 Eric A. Thomas
* Based on acornfb.c Copyright (C) Russell King.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*/
#ifndef _VIDEO_SA1100FB_H
#define _VIDEO_SA1100FB_H
#include <linux/fb.h>
#include <linux/types.h>
#define RGB_4 0
#define RGB_8 1
#define RGB_16 2
#define NR_RGB 3
/* These are the bitfields for each display depth that we support. */
struct
sa1100fb_rgb
{
struct
fb_bitfield
red
;
struct
fb_bitfield
green
;
struct
fb_bitfield
blue
;
struct
fb_bitfield
transp
;
};
/* This structure describes the machine which we are running on. */
struct
sa1100fb_mach_info
{
u_long
pixclock
;
u_short
xres
;
u_short
yres
;
u_char
bpp
;
u_char
hsync_len
;
u_char
left_margin
;
u_char
right_margin
;
u_char
vsync_len
;
u_char
upper_margin
;
u_char
lower_margin
;
u_char
sync
;
u_int
cmap_greyscale
:
1
,
cmap_inverse:
1
,
cmap_static:
1
,
unused:
29
;
u_int
lccr0
;
u_int
lccr3
;
/* Overrides for the default RGB maps */
const
struct
sa1100fb_rgb
*
rgb
[
NR_RGB
];
void
(
*
backlight_power
)(
int
);
void
(
*
lcd_power
)(
int
);
void
(
*
set_visual
)(
u32
);
};
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录