Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
101ffae2
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
101ffae2
编写于
11月 12, 2005
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[libata sata_mv] move code around
No content changes. Move 60xx code to be closer to other 60xx code.
上级
522479fb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
100 addition
and
100 deletion
+100
-100
drivers/scsi/sata_mv.c
drivers/scsi/sata_mv.c
+100
-100
未找到文件。
drivers/scsi/sata_mv.c
浏览文件 @
101ffae2
...
...
@@ -679,106 +679,6 @@ static void mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val)
}
}
#undef ZERO
#define ZERO(reg) writel(0, mmio + (reg))
static
void
mv_reset_pci_bus
(
struct
pci_dev
*
pdev
,
void
__iomem
*
mmio
)
{
u32
tmp
;
tmp
=
readl
(
mmio
+
MV_PCI_MODE
);
tmp
&=
0xff00ffff
;
writel
(
tmp
,
mmio
+
MV_PCI_MODE
);
ZERO
(
MV_PCI_DISC_TIMER
);
ZERO
(
MV_PCI_MSI_TRIGGER
);
writel
(
0x000100ff
,
mmio
+
MV_PCI_XBAR_TMOUT
);
ZERO
(
HC_MAIN_IRQ_MASK_OFS
);
ZERO
(
MV_PCI_SERR_MASK
);
ZERO
(
PCI_IRQ_CAUSE_OFS
);
ZERO
(
PCI_IRQ_MASK_OFS
);
ZERO
(
MV_PCI_ERR_LOW_ADDRESS
);
ZERO
(
MV_PCI_ERR_HIGH_ADDRESS
);
ZERO
(
MV_PCI_ERR_ATTRIBUTE
);
ZERO
(
MV_PCI_ERR_COMMAND
);
}
#undef ZERO
static
void
mv6_reset_flash
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
)
{
u32
tmp
;
mv5_reset_flash
(
hpriv
,
mmio
);
tmp
=
readl
(
mmio
+
MV_GPIO_PORT_CTL
);
tmp
&=
0x3
;
tmp
|=
(
1
<<
5
)
|
(
1
<<
6
);
writel
(
tmp
,
mmio
+
MV_GPIO_PORT_CTL
);
}
/**
* mv6_reset_hc - Perform the 6xxx global soft reset
* @mmio: base address of the HBA
*
* This routine only applies to 6xxx parts.
*
* LOCKING:
* Inherited from caller.
*/
static
int
mv6_reset_hc
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
)
{
void
__iomem
*
reg
=
mmio
+
PCI_MAIN_CMD_STS_OFS
;
int
i
,
rc
=
0
;
u32
t
;
/* Following procedure defined in PCI "main command and status
* register" table.
*/
t
=
readl
(
reg
);
writel
(
t
|
STOP_PCI_MASTER
,
reg
);
for
(
i
=
0
;
i
<
1000
;
i
++
)
{
udelay
(
1
);
t
=
readl
(
reg
);
if
(
PCI_MASTER_EMPTY
&
t
)
{
break
;
}
}
if
(
!
(
PCI_MASTER_EMPTY
&
t
))
{
printk
(
KERN_ERR
DRV_NAME
": PCI master won't flush
\n
"
);
rc
=
1
;
goto
done
;
}
/* set reset */
i
=
5
;
do
{
writel
(
t
|
GLOB_SFT_RST
,
reg
);
t
=
readl
(
reg
);
udelay
(
1
);
}
while
(
!
(
GLOB_SFT_RST
&
t
)
&&
(
i
--
>
0
));
if
(
!
(
GLOB_SFT_RST
&
t
))
{
printk
(
KERN_ERR
DRV_NAME
": can't set global reset
\n
"
);
rc
=
1
;
goto
done
;
}
/* clear reset and *reenable the PCI master* (not mentioned in spec) */
i
=
5
;
do
{
writel
(
t
&
~
(
GLOB_SFT_RST
|
STOP_PCI_MASTER
),
reg
);
t
=
readl
(
reg
);
udelay
(
1
);
}
while
((
GLOB_SFT_RST
&
t
)
&&
(
i
--
>
0
));
if
(
GLOB_SFT_RST
&
t
)
{
printk
(
KERN_ERR
DRV_NAME
": can't clear global reset
\n
"
);
rc
=
1
;
}
done:
return
rc
;
}
/**
* mv_host_stop - Host specific cleanup/stop routine.
* @host_set: host data structure
...
...
@@ -1386,6 +1286,106 @@ static int mv5_reset_hc(struct mv_host_priv *hpriv, void __iomem *mmio)
return
1
;
}
#undef ZERO
#define ZERO(reg) writel(0, mmio + (reg))
static
void
mv_reset_pci_bus
(
struct
pci_dev
*
pdev
,
void
__iomem
*
mmio
)
{
u32
tmp
;
tmp
=
readl
(
mmio
+
MV_PCI_MODE
);
tmp
&=
0xff00ffff
;
writel
(
tmp
,
mmio
+
MV_PCI_MODE
);
ZERO
(
MV_PCI_DISC_TIMER
);
ZERO
(
MV_PCI_MSI_TRIGGER
);
writel
(
0x000100ff
,
mmio
+
MV_PCI_XBAR_TMOUT
);
ZERO
(
HC_MAIN_IRQ_MASK_OFS
);
ZERO
(
MV_PCI_SERR_MASK
);
ZERO
(
PCI_IRQ_CAUSE_OFS
);
ZERO
(
PCI_IRQ_MASK_OFS
);
ZERO
(
MV_PCI_ERR_LOW_ADDRESS
);
ZERO
(
MV_PCI_ERR_HIGH_ADDRESS
);
ZERO
(
MV_PCI_ERR_ATTRIBUTE
);
ZERO
(
MV_PCI_ERR_COMMAND
);
}
#undef ZERO
static
void
mv6_reset_flash
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
)
{
u32
tmp
;
mv5_reset_flash
(
hpriv
,
mmio
);
tmp
=
readl
(
mmio
+
MV_GPIO_PORT_CTL
);
tmp
&=
0x3
;
tmp
|=
(
1
<<
5
)
|
(
1
<<
6
);
writel
(
tmp
,
mmio
+
MV_GPIO_PORT_CTL
);
}
/**
* mv6_reset_hc - Perform the 6xxx global soft reset
* @mmio: base address of the HBA
*
* This routine only applies to 6xxx parts.
*
* LOCKING:
* Inherited from caller.
*/
static
int
mv6_reset_hc
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
)
{
void
__iomem
*
reg
=
mmio
+
PCI_MAIN_CMD_STS_OFS
;
int
i
,
rc
=
0
;
u32
t
;
/* Following procedure defined in PCI "main command and status
* register" table.
*/
t
=
readl
(
reg
);
writel
(
t
|
STOP_PCI_MASTER
,
reg
);
for
(
i
=
0
;
i
<
1000
;
i
++
)
{
udelay
(
1
);
t
=
readl
(
reg
);
if
(
PCI_MASTER_EMPTY
&
t
)
{
break
;
}
}
if
(
!
(
PCI_MASTER_EMPTY
&
t
))
{
printk
(
KERN_ERR
DRV_NAME
": PCI master won't flush
\n
"
);
rc
=
1
;
goto
done
;
}
/* set reset */
i
=
5
;
do
{
writel
(
t
|
GLOB_SFT_RST
,
reg
);
t
=
readl
(
reg
);
udelay
(
1
);
}
while
(
!
(
GLOB_SFT_RST
&
t
)
&&
(
i
--
>
0
));
if
(
!
(
GLOB_SFT_RST
&
t
))
{
printk
(
KERN_ERR
DRV_NAME
": can't set global reset
\n
"
);
rc
=
1
;
goto
done
;
}
/* clear reset and *reenable the PCI master* (not mentioned in spec) */
i
=
5
;
do
{
writel
(
t
&
~
(
GLOB_SFT_RST
|
STOP_PCI_MASTER
),
reg
);
t
=
readl
(
reg
);
udelay
(
1
);
}
while
((
GLOB_SFT_RST
&
t
)
&&
(
i
--
>
0
));
if
(
GLOB_SFT_RST
&
t
)
{
printk
(
KERN_ERR
DRV_NAME
": can't clear global reset
\n
"
);
rc
=
1
;
}
done:
return
rc
;
}
static
void
mv6_read_preamp
(
struct
mv_host_priv
*
hpriv
,
int
idx
,
void
__iomem
*
mmio
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录