Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
22814904
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,发现更多精彩内容 >>
提交
22814904
编写于
3月 12, 2006
作者:
W
Wolfgang Denk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Word alignment fixes for word aligned NS16550 UART
Patch by Jean-Paul Saman, 01 Mar 2005
上级
d509b812
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
10 deletion
+22
-10
CHANGELOG
CHANGELOG
+12
-0
include/ns16550.h
include/ns16550.h
+10
-10
未找到文件。
CHANGELOG
浏览文件 @
22814904
...
...
@@ -2,6 +2,18 @@
Changes since U-Boot 1.1.4:
======================================================================
* Word alignment fixes for word aligned NS16550 UART
Patch by Jean-Paul Saman, 01 Mar 2005
Fixes bug with UART that only supports word aligned access: removed
"__attribute__ ((packed));" for "(CFG_NS16550_REG_SIZE == 4)" some
(broken!) versions of GCC generate byte accesses when encountering
the packed attribute regardless if the struct is already correctly
aligned for a platform. Peripherals that can only handle word
aligned access won't work properly when accessed with byte access.
The struct NS16550 is already word aligned for REG_SIZE = 4, so
there is no need to packed the struct in that case.
* Fix behaviour if gatewayip is not set
Patch by Robin Gilks, 23 Dec 2004
...
...
include/ns16550.h
浏览文件 @
22814904
...
...
@@ -45,15 +45,15 @@ struct NS16550 {
}
__attribute__
((
packed
));
#elif (CFG_NS16550_REG_SIZE == 4)
struct
NS16550
{
unsigned
long
rbr
;
/* 0 */
unsigned
long
ier
;
/* 1 */
unsigned
long
fcr
;
/* 2 */
unsigned
long
lcr
;
/* 3 */
unsigned
long
mcr
;
/* 4 */
unsigned
long
lsr
;
/* 5 */
unsigned
long
msr
;
/* 6 */
unsigned
long
scr
;
/* 7 */
}
__attribute__
((
packed
));
unsigned
long
rbr
;
/* 0
r
*/
unsigned
long
ier
;
/* 1
rw
*/
unsigned
long
fcr
;
/* 2
w
*/
unsigned
long
lcr
;
/* 3
rw
*/
unsigned
long
mcr
;
/* 4
rw
*/
unsigned
long
lsr
;
/* 5
r
*/
unsigned
long
msr
;
/* 6
r
*/
unsigned
long
scr
;
/* 7
rw
*/
}
;
/* No need to pack an already aligned struct */
#elif (CFG_NS16550_REG_SIZE == -4)
struct
NS16550
{
unsigned
char
rbr
;
/* 0 */
...
...
@@ -102,7 +102,7 @@ typedef volatile struct NS16550 *NS16550_t;
#define MCR_DMA_EN 0x04
#define MCR_TX_DFR 0x08
#define LCR_WLS_MSK 0x03
/* character length slect mask */
#define LCR_WLS_MSK 0x03
/* character length s
e
lect mask */
#define LCR_WLS_5 0x00
/* 5 bit character length */
#define LCR_WLS_6 0x01
/* 6 bit character length */
#define LCR_WLS_7 0x02
/* 7 bit character length */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录