Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
2a47ce06
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看板
提交
2a47ce06
编写于
11月 12, 2005
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[libata sata_mv] call phy fixups during init, as well as phy reset
上级
101ffae2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
12 deletion
+26
-12
drivers/scsi/sata_mv.c
drivers/scsi/sata_mv.c
+26
-12
未找到文件。
drivers/scsi/sata_mv.c
浏览文件 @
2a47ce06
...
@@ -293,7 +293,8 @@ struct mv_port_signal {
...
@@ -293,7 +293,8 @@ struct mv_port_signal {
struct
mv_host_priv
;
struct
mv_host_priv
;
struct
mv_hw_ops
{
struct
mv_hw_ops
{
void
(
*
phy_errata
)(
struct
ata_port
*
ap
);
void
(
*
phy_errata
)(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
,
unsigned
int
port
);
void
(
*
enable_leds
)(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
);
void
(
*
enable_leds
)(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
);
void
(
*
read_preamp
)(
struct
mv_host_priv
*
hpriv
,
int
idx
,
void
(
*
read_preamp
)(
struct
mv_host_priv
*
hpriv
,
int
idx
,
void
__iomem
*
mmio
);
void
__iomem
*
mmio
);
...
@@ -322,7 +323,8 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance,
...
@@ -322,7 +323,8 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance,
static
void
mv_eng_timeout
(
struct
ata_port
*
ap
);
static
void
mv_eng_timeout
(
struct
ata_port
*
ap
);
static
int
mv_init_one
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
);
static
int
mv_init_one
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
);
static
void
mv5_phy_errata
(
struct
ata_port
*
ap
);
static
void
mv5_phy_errata
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
,
unsigned
int
port
);
static
void
mv5_enable_leds
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
);
static
void
mv5_enable_leds
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
);
static
void
mv5_read_preamp
(
struct
mv_host_priv
*
hpriv
,
int
idx
,
static
void
mv5_read_preamp
(
struct
mv_host_priv
*
hpriv
,
int
idx
,
void
__iomem
*
mmio
);
void
__iomem
*
mmio
);
...
@@ -330,7 +332,8 @@ static int mv5_reset_hc(struct mv_host_priv *hpriv, void __iomem *mmio);
...
@@ -330,7 +332,8 @@ static int mv5_reset_hc(struct mv_host_priv *hpriv, void __iomem *mmio);
static
void
mv5_reset_flash
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
);
static
void
mv5_reset_flash
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
);
static
void
mv5_reset_bus
(
struct
pci_dev
*
pdev
,
void
__iomem
*
mmio
);
static
void
mv5_reset_bus
(
struct
pci_dev
*
pdev
,
void
__iomem
*
mmio
);
static
void
mv6_phy_errata
(
struct
ata_port
*
ap
);
static
void
mv6_phy_errata
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
,
unsigned
int
port
);
static
void
mv6_enable_leds
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
);
static
void
mv6_enable_leds
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
);
static
void
mv6_read_preamp
(
struct
mv_host_priv
*
hpriv
,
int
idx
,
static
void
mv6_read_preamp
(
struct
mv_host_priv
*
hpriv
,
int
idx
,
void
__iomem
*
mmio
);
void
__iomem
*
mmio
);
...
@@ -1275,7 +1278,8 @@ static void mv5_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio)
...
@@ -1275,7 +1278,8 @@ static void mv5_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio)
writel
(
tmp
,
mmio
+
MV_PCI_EXP_ROM_BAR_CTL
);
writel
(
tmp
,
mmio
+
MV_PCI_EXP_ROM_BAR_CTL
);
}
}
static
void
mv5_phy_errata
(
struct
ata_port
*
ap
)
static
void
mv5_phy_errata
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
mmio
,
unsigned
int
port
)
{
{
/* FIXME */
/* FIXME */
}
}
...
@@ -1411,11 +1415,10 @@ static void mv6_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio)
...
@@ -1411,11 +1415,10 @@ static void mv6_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio)
writel
(
0x00000060
,
mmio
+
MV_GPIO_PORT_CTL
);
writel
(
0x00000060
,
mmio
+
MV_GPIO_PORT_CTL
);
}
}
static
void
mv6_phy_errata
(
struct
ata_port
*
ap
)
static
void
mv6_phy_errata
(
struct
mv_host_priv
*
hpriv
,
void
__iomem
*
port_mmio
,
unsigned
int
port
)
{
{
struct
mv_host_priv
*
hpriv
=
ap
->
host_set
->
private_data
;
u32
hp_flags
=
hpriv
->
hp_flags
;
u32
hp_flags
=
hpriv
->
hp_flags
;
void
__iomem
*
port_mmio
=
mv_ap_base
(
ap
);
int
fix_phy_mode2
=
int
fix_phy_mode2
=
hp_flags
&
(
MV_HP_ERRATA_60X1B2
|
MV_HP_ERRATA_60X1C0
);
hp_flags
&
(
MV_HP_ERRATA_60X1B2
|
MV_HP_ERRATA_60X1C0
);
int
fix_phy_mode4
=
int
fix_phy_mode4
=
...
@@ -1463,8 +1466,8 @@ static void mv6_phy_errata(struct ata_port *ap)
...
@@ -1463,8 +1466,8 @@ static void mv6_phy_errata(struct ata_port *ap)
m2
=
readl
(
port_mmio
+
PHY_MODE2
);
m2
=
readl
(
port_mmio
+
PHY_MODE2
);
m2
&=
~
MV_M2_PREAMP_MASK
;
m2
&=
~
MV_M2_PREAMP_MASK
;
m2
|=
hpriv
->
signal
[
ap
->
port_no
].
amps
;
m2
|=
hpriv
->
signal
[
port
].
amps
;
m2
|=
hpriv
->
signal
[
ap
->
port_no
].
pre
;
m2
|=
hpriv
->
signal
[
port
].
pre
;
m2
&=
~
(
1
<<
16
);
m2
&=
~
(
1
<<
16
);
writel
(
m2
,
port_mmio
+
PHY_MODE2
);
writel
(
m2
,
port_mmio
+
PHY_MODE2
);
...
@@ -1509,7 +1512,7 @@ static void mv_phy_reset(struct ata_port *ap)
...
@@ -1509,7 +1512,7 @@ static void mv_phy_reset(struct ata_port *ap)
*/
*/
writelfl
(
0
,
port_mmio
+
EDMA_CMD_OFS
);
writelfl
(
0
,
port_mmio
+
EDMA_CMD_OFS
);
hpriv
->
ops
->
phy_errata
(
ap
);
hpriv
->
ops
->
phy_errata
(
hpriv
,
port_mmio
,
ap
->
port_no
);
DPRINTK
(
"S-regs after ATA_RST: SStat 0x%08x SErr 0x%08x "
DPRINTK
(
"S-regs after ATA_RST: SStat 0x%08x SErr 0x%08x "
"SCtrl 0x%08x
\n
"
,
mv_scr_read
(
ap
,
SCR_STATUS
),
"SCtrl 0x%08x
\n
"
,
mv_scr_read
(
ap
,
SCR_STATUS
),
...
@@ -1747,7 +1750,6 @@ static int mv_init_host(struct pci_dev *pdev, struct ata_probe_ent *probe_ent,
...
@@ -1747,7 +1750,6 @@ static int mv_init_host(struct pci_dev *pdev, struct ata_probe_ent *probe_ent,
{
{
int
rc
=
0
,
n_hc
,
port
,
hc
;
int
rc
=
0
,
n_hc
,
port
,
hc
;
void
__iomem
*
mmio
=
probe_ent
->
mmio_base
;
void
__iomem
*
mmio
=
probe_ent
->
mmio_base
;
void
__iomem
*
port_mmio
;
struct
mv_host_priv
*
hpriv
=
probe_ent
->
private_data
;
struct
mv_host_priv
*
hpriv
=
probe_ent
->
private_data
;
/* global interrupt mask */
/* global interrupt mask */
...
@@ -1772,7 +1774,19 @@ static int mv_init_host(struct pci_dev *pdev, struct ata_probe_ent *probe_ent,
...
@@ -1772,7 +1774,19 @@ static int mv_init_host(struct pci_dev *pdev, struct ata_probe_ent *probe_ent,
hpriv
->
ops
->
enable_leds
(
hpriv
,
mmio
);
hpriv
->
ops
->
enable_leds
(
hpriv
,
mmio
);
for
(
port
=
0
;
port
<
probe_ent
->
n_ports
;
port
++
)
{
for
(
port
=
0
;
port
<
probe_ent
->
n_ports
;
port
++
)
{
port_mmio
=
mv_port_base
(
mmio
,
port
);
void
__iomem
*
port_mmio
=
mv_port_base
(
mmio
,
port
);
if
(
IS_60XX
(
hpriv
))
{
u32
ifctl
=
readl
(
port_mmio
+
SATA_INTERFACE_CTL
);
ifctl
|=
(
1
<<
12
);
writelfl
(
ifctl
,
port_mmio
+
SATA_INTERFACE_CTL
);
}
hpriv
->
ops
->
phy_errata
(
hpriv
,
port_mmio
,
port
);
}
for
(
port
=
0
;
port
<
probe_ent
->
n_ports
;
port
++
)
{
void
__iomem
*
port_mmio
=
mv_port_base
(
mmio
,
port
);
mv_port_init
(
&
probe_ent
->
port
[
port
],
port_mmio
);
mv_port_init
(
&
probe_ent
->
port
[
port
],
port_mmio
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录