Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
55cca65e
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
55cca65e
编写于
3月 21, 2006
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[libata sata_vsc, sata_svw] Convert #define'd constants to enums
Also, bump sata_vsc version.
上级
c962990a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
73 deletion
+78
-73
drivers/scsi/sata_svw.c
drivers/scsi/sata_svw.c
+29
-27
drivers/scsi/sata_vsc.c
drivers/scsi/sata_vsc.c
+49
-46
未找到文件。
drivers/scsi/sata_svw.c
浏览文件 @
55cca65e
...
...
@@ -56,33 +56,35 @@
#define DRV_NAME "sata_svw"
#define DRV_VERSION "1.07"
/* Taskfile registers offsets */
#define K2_SATA_TF_CMD_OFFSET 0x00
#define K2_SATA_TF_DATA_OFFSET 0x00
#define K2_SATA_TF_ERROR_OFFSET 0x04
#define K2_SATA_TF_NSECT_OFFSET 0x08
#define K2_SATA_TF_LBAL_OFFSET 0x0c
#define K2_SATA_TF_LBAM_OFFSET 0x10
#define K2_SATA_TF_LBAH_OFFSET 0x14
#define K2_SATA_TF_DEVICE_OFFSET 0x18
#define K2_SATA_TF_CMDSTAT_OFFSET 0x1c
#define K2_SATA_TF_CTL_OFFSET 0x20
/* DMA base */
#define K2_SATA_DMA_CMD_OFFSET 0x30
/* SCRs base */
#define K2_SATA_SCR_STATUS_OFFSET 0x40
#define K2_SATA_SCR_ERROR_OFFSET 0x44
#define K2_SATA_SCR_CONTROL_OFFSET 0x48
/* Others */
#define K2_SATA_SICR1_OFFSET 0x80
#define K2_SATA_SICR2_OFFSET 0x84
#define K2_SATA_SIM_OFFSET 0x88
/* Port stride */
#define K2_SATA_PORT_OFFSET 0x100
enum
{
/* Taskfile registers offsets */
K2_SATA_TF_CMD_OFFSET
=
0x00
,
K2_SATA_TF_DATA_OFFSET
=
0x00
,
K2_SATA_TF_ERROR_OFFSET
=
0x04
,
K2_SATA_TF_NSECT_OFFSET
=
0x08
,
K2_SATA_TF_LBAL_OFFSET
=
0x0c
,
K2_SATA_TF_LBAM_OFFSET
=
0x10
,
K2_SATA_TF_LBAH_OFFSET
=
0x14
,
K2_SATA_TF_DEVICE_OFFSET
=
0x18
,
K2_SATA_TF_CMDSTAT_OFFSET
=
0x1c
,
K2_SATA_TF_CTL_OFFSET
=
0x20
,
/* DMA base */
K2_SATA_DMA_CMD_OFFSET
=
0x30
,
/* SCRs base */
K2_SATA_SCR_STATUS_OFFSET
=
0x40
,
K2_SATA_SCR_ERROR_OFFSET
=
0x44
,
K2_SATA_SCR_CONTROL_OFFSET
=
0x48
,
/* Others */
K2_SATA_SICR1_OFFSET
=
0x80
,
K2_SATA_SICR2_OFFSET
=
0x84
,
K2_SATA_SIM_OFFSET
=
0x88
,
/* Port stride */
K2_SATA_PORT_OFFSET
=
0x100
,
};
static
u8
k2_stat_check_status
(
struct
ata_port
*
ap
);
...
...
drivers/scsi/sata_vsc.c
浏览文件 @
55cca65e
...
...
@@ -47,52 +47,55 @@
#include <linux/libata.h>
#define DRV_NAME "sata_vsc"
#define DRV_VERSION "1.1"
/* Interrupt register offsets (from chip base address) */
#define VSC_SATA_INT_STAT_OFFSET 0x00
#define VSC_SATA_INT_MASK_OFFSET 0x04
/* Taskfile registers offsets */
#define VSC_SATA_TF_CMD_OFFSET 0x00
#define VSC_SATA_TF_DATA_OFFSET 0x00
#define VSC_SATA_TF_ERROR_OFFSET 0x04
#define VSC_SATA_TF_FEATURE_OFFSET 0x06
#define VSC_SATA_TF_NSECT_OFFSET 0x08
#define VSC_SATA_TF_LBAL_OFFSET 0x0c
#define VSC_SATA_TF_LBAM_OFFSET 0x10
#define VSC_SATA_TF_LBAH_OFFSET 0x14
#define VSC_SATA_TF_DEVICE_OFFSET 0x18
#define VSC_SATA_TF_STATUS_OFFSET 0x1c
#define VSC_SATA_TF_COMMAND_OFFSET 0x1d
#define VSC_SATA_TF_ALTSTATUS_OFFSET 0x28
#define VSC_SATA_TF_CTL_OFFSET 0x29
/* DMA base */
#define VSC_SATA_UP_DESCRIPTOR_OFFSET 0x64
#define VSC_SATA_UP_DATA_BUFFER_OFFSET 0x6C
#define VSC_SATA_DMA_CMD_OFFSET 0x70
/* SCRs base */
#define VSC_SATA_SCR_STATUS_OFFSET 0x100
#define VSC_SATA_SCR_ERROR_OFFSET 0x104
#define VSC_SATA_SCR_CONTROL_OFFSET 0x108
/* Port stride */
#define VSC_SATA_PORT_OFFSET 0x200
/* Error interrupt status bit offsets */
#define VSC_SATA_INT_ERROR_CRC 0x40
#define VSC_SATA_INT_ERROR_T 0x20
#define VSC_SATA_INT_ERROR_P 0x10
#define VSC_SATA_INT_ERROR_R 0x8
#define VSC_SATA_INT_ERROR_E 0x4
#define VSC_SATA_INT_ERROR_M 0x2
#define VSC_SATA_INT_PHY_CHANGE 0x1
#define VSC_SATA_INT_ERROR (VSC_SATA_INT_ERROR_CRC | VSC_SATA_INT_ERROR_T | \
VSC_SATA_INT_ERROR_P | VSC_SATA_INT_ERROR_R | \
VSC_SATA_INT_ERROR_E | VSC_SATA_INT_ERROR_M | \
VSC_SATA_INT_PHY_CHANGE)
#define DRV_VERSION "1.2"
enum
{
/* Interrupt register offsets (from chip base address) */
VSC_SATA_INT_STAT_OFFSET
=
0x00
,
VSC_SATA_INT_MASK_OFFSET
=
0x04
,
/* Taskfile registers offsets */
VSC_SATA_TF_CMD_OFFSET
=
0x00
,
VSC_SATA_TF_DATA_OFFSET
=
0x00
,
VSC_SATA_TF_ERROR_OFFSET
=
0x04
,
VSC_SATA_TF_FEATURE_OFFSET
=
0x06
,
VSC_SATA_TF_NSECT_OFFSET
=
0x08
,
VSC_SATA_TF_LBAL_OFFSET
=
0x0c
,
VSC_SATA_TF_LBAM_OFFSET
=
0x10
,
VSC_SATA_TF_LBAH_OFFSET
=
0x14
,
VSC_SATA_TF_DEVICE_OFFSET
=
0x18
,
VSC_SATA_TF_STATUS_OFFSET
=
0x1c
,
VSC_SATA_TF_COMMAND_OFFSET
=
0x1d
,
VSC_SATA_TF_ALTSTATUS_OFFSET
=
0x28
,
VSC_SATA_TF_CTL_OFFSET
=
0x29
,
/* DMA base */
VSC_SATA_UP_DESCRIPTOR_OFFSET
=
0x64
,
VSC_SATA_UP_DATA_BUFFER_OFFSET
=
0x6C
,
VSC_SATA_DMA_CMD_OFFSET
=
0x70
,
/* SCRs base */
VSC_SATA_SCR_STATUS_OFFSET
=
0x100
,
VSC_SATA_SCR_ERROR_OFFSET
=
0x104
,
VSC_SATA_SCR_CONTROL_OFFSET
=
0x108
,
/* Port stride */
VSC_SATA_PORT_OFFSET
=
0x200
,
/* Error interrupt status bit offsets */
VSC_SATA_INT_ERROR_CRC
=
0x40
,
VSC_SATA_INT_ERROR_T
=
0x20
,
VSC_SATA_INT_ERROR_P
=
0x10
,
VSC_SATA_INT_ERROR_R
=
0x8
,
VSC_SATA_INT_ERROR_E
=
0x4
,
VSC_SATA_INT_ERROR_M
=
0x2
,
VSC_SATA_INT_PHY_CHANGE
=
0x1
,
VSC_SATA_INT_ERROR
=
(
VSC_SATA_INT_ERROR_CRC
|
VSC_SATA_INT_ERROR_T
|
\
VSC_SATA_INT_ERROR_P
|
VSC_SATA_INT_ERROR_R
|
\
VSC_SATA_INT_ERROR_E
|
VSC_SATA_INT_ERROR_M
|
\
VSC_SATA_INT_PHY_CHANGE
),
};
#define is_vsc_sata_int_err(port_idx, int_status) \
(int_status & (VSC_SATA_INT_ERROR << (8 * port_idx)))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录