Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
ec6baf53
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ec6baf53
编写于
6月 17, 2010
作者:
W
Wolfgang Denk
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'next' of
git://git.denx.de/u-boot-video
into next
上级
bc33f8c8
f0a92151
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
125 addition
and
41 deletion
+125
-41
arch/powerpc/cpu/mpc512x/diu.c
arch/powerpc/cpu/mpc512x/diu.c
+0
-14
board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
+0
-9
drivers/video/cfb_console.c
drivers/video/cfb_console.c
+12
-0
drivers/video/sm501.c
drivers/video/sm501.c
+112
-18
include/pci_ids.h
include/pci_ids.h
+1
-0
未找到文件。
arch/powerpc/cpu/mpc512x/diu.c
浏览文件 @
ec6baf53
...
...
@@ -179,18 +179,4 @@ void *video_hw_init(void)
return
(
void
*
)
pGD
;
}
/**
* Set the LUT
*
* @index: color number
* @r: red
* @b: blue
* @g: green
*/
void
video_set_lut
(
unsigned
int
index
,
unsigned
char
r
,
unsigned
char
g
,
unsigned
char
b
)
{
return
;
}
#endif
/* defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) */
board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
浏览文件 @
ec6baf53
...
...
@@ -183,15 +183,6 @@ void *video_hw_init(void)
return
(
void
*
)
pGD
;
}
void
video_set_lut
(
unsigned
int
index
,
/* color number */
unsigned
char
r
,
/* red */
unsigned
char
g
,
/* green */
unsigned
char
b
/* blue */
)
{
return
;
}
#endif
/* defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) */
#endif
/* CONFIG_FSL_DIU_FB */
drivers/video/cfb_console.c
浏览文件 @
ec6baf53
...
...
@@ -749,6 +749,18 @@ void video_puts (const char *s)
/*****************************************************************************/
/*
* Do not enforce drivers (or board code) to provide empty
* video_set_lut() if they do not support 8 bpp format.
* Implement weak default function instead.
*/
void
__video_set_lut
(
unsigned
int
index
,
unsigned
char
r
,
unsigned
char
g
,
unsigned
char
b
)
{
}
void
video_set_lut
(
unsigned
int
,
unsigned
char
,
unsigned
char
,
unsigned
char
)
__attribute__
((
weak
,
alias
(
"__video_set_lut"
)));
#if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
#define FILL_8BIT_332RGB(r,g,b) { \
...
...
drivers/video/sm501.c
浏览文件 @
ec6baf53
...
...
@@ -31,6 +31,7 @@
#include <common.h>
#include <asm/io.h>
#include <video_fb.h>
#include <sm501.h>
...
...
@@ -54,6 +55,18 @@
GraphicDevice
sm501
;
void
write_be32
(
int
off
,
unsigned
int
val
)
{
out_be32
((
unsigned
__iomem
*
)(
sm501
.
isaBase
+
off
),
val
);
}
void
write_le32
(
int
off
,
unsigned
int
val
)
{
out_le32
((
unsigned
__iomem
*
)(
sm501
.
isaBase
+
off
),
val
);
}
void
(
*
write_reg32
)(
int
off
,
unsigned
int
val
)
=
write_be32
;
/*-----------------------------------------------------------------------------
* SmiSetRegs --
*-----------------------------------------------------------------------------
...
...
@@ -66,7 +79,7 @@ static void SmiSetRegs (void)
*/
const
SMI_REGS
*
preg
=
board_get_regs
();
while
(
preg
->
Index
)
{
write32
(
preg
->
Index
,
preg
->
Value
);
write
_reg
32
(
preg
->
Index
,
preg
->
Value
);
/*
* Insert a delay between
*/
...
...
@@ -75,26 +88,120 @@ static void SmiSetRegs (void)
}
}
#ifdef CONFIG_VIDEO_SM501_PCI
static
struct
pci_device_id
sm501_pci_tbl
[]
=
{
{
PCI_VENDOR_ID_SMI
,
PCI_DEVICE_ID_SMI_501
},
{}
};
#endif
/*
* We do not enforce board code to provide empty/unused
* functions for this driver and define weak default
* functions here.
*/
unsigned
int
__board_video_init
(
void
)
{
return
0
;
}
unsigned
int
board_video_init
(
void
)
__attribute__
((
weak
,
alias
(
"__board_video_init"
)));
unsigned
int
__board_video_get_fb
(
void
)
{
return
0
;
}
unsigned
int
board_video_get_fb
(
void
)
__attribute__
((
weak
,
alias
(
"__board_video_get_fb"
)));
void
__board_validate_screen
(
unsigned
int
base
)
{
}
void
board_validate_screen
(
unsigned
int
base
)
__attribute__
((
weak
,
alias
(
"__board_validate_screen"
)));
/*-----------------------------------------------------------------------------
* video_hw_init --
*-----------------------------------------------------------------------------
*/
void
*
video_hw_init
(
void
)
{
#ifdef CONFIG_VIDEO_SM501_PCI
unsigned
int
pci_mem_base
,
pci_mmio_base
;
unsigned
int
id
;
unsigned
short
device_id
;
pci_dev_t
devbusfn
;
int
mem
;
#endif
unsigned
int
*
vm
,
i
;
memset
(
&
sm501
,
0
,
sizeof
(
GraphicDevice
));
#ifdef CONFIG_VIDEO_SM501_PCI
printf
(
"Video: "
);
/* Look for SM501/SM502 chips */
devbusfn
=
pci_find_devices
(
sm501_pci_tbl
,
0
);
if
(
devbusfn
<
0
)
{
printf
(
"PCI Controller not found.
\n
"
);
goto
not_pci
;
}
/* Setup */
pci_write_config_dword
(
devbusfn
,
PCI_COMMAND
,
(
PCI_COMMAND_MEMORY
|
PCI_COMMAND_IO
));
pci_read_config_word
(
devbusfn
,
PCI_DEVICE_ID
,
&
device_id
);
pci_read_config_dword
(
devbusfn
,
PCI_REVISION_ID
,
&
id
);
pci_read_config_dword
(
devbusfn
,
PCI_BASE_ADDRESS_0
,
&
pci_mem_base
);
pci_read_config_dword
(
devbusfn
,
PCI_BASE_ADDRESS_1
,
&
pci_mmio_base
);
sm501
.
frameAdrs
=
pci_mem_to_phys
(
devbusfn
,
pci_mem_base
);
sm501
.
isaBase
=
pci_mem_to_phys
(
devbusfn
,
pci_mmio_base
);
if
(
sm501
.
isaBase
)
write_reg32
=
write_le32
;
mem
=
in_le32
((
unsigned
__iomem
*
)(
sm501
.
isaBase
+
0x10
));
mem
=
(
mem
&
0x0000e000
)
>>
13
;
switch
(
mem
)
{
case
1
:
mem
=
8
;
break
;
case
2
:
mem
=
16
;
break
;
case
3
:
mem
=
32
;
break
;
case
4
:
mem
=
64
;
break
;
case
5
:
mem
=
2
;
break
;
case
0
:
default:
mem
=
4
;
}
printf
(
"PCI SM50%d %d MB
\n
"
,
((
id
&
0xff
)
==
0xC0
)
?
2
:
1
,
mem
);
not_pci:
#endif
/*
* Initialization of the access to the graphic chipset Retreive base
* address of the chipset (see board/RPXClassic/eccx.c)
*/
if
((
sm501
.
isaBase
=
board_video_init
())
==
0
)
{
return
(
NULL
);
if
(
!
sm501
.
isaBase
)
{
sm501
.
isaBase
=
board_video_init
();
if
(
!
sm501
.
isaBase
)
return
NULL
;
}
if
((
sm501
.
frameAdrs
=
board_video_get_fb
())
==
0
)
{
return
(
NULL
);
if
(
!
sm501
.
frameAdrs
)
{
sm501
.
frameAdrs
=
board_video_get_fb
();
if
(
!
sm501
.
frameAdrs
)
return
NULL
;
}
sm501
.
winSizeX
=
board_get_width
();
...
...
@@ -131,16 +238,3 @@ void *video_hw_init (void)
return
(
&
sm501
);
}
/*-----------------------------------------------------------------------------
* video_set_lut --
*-----------------------------------------------------------------------------
*/
void
video_set_lut
(
unsigned
int
index
,
/* color number */
unsigned
char
r
,
/* red */
unsigned
char
g
,
/* green */
unsigned
char
b
/* blue */
)
{
}
include/pci_ids.h
浏览文件 @
ec6baf53
...
...
@@ -1454,6 +1454,7 @@
#define PCI_DEVICE_ID_SMI_710 0x0710
#define PCI_DEVICE_ID_SMI_712 0x0712
#define PCI_DEVICE_ID_SMI_810 0x0810
#define PCI_DEVICE_ID_SMI_501 0x0501
#define PCI_VENDOR_ID_HUGHES 0x1273
#define PCI_DEVICE_ID_HUGHES_DIRECPC 0x0002
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录