Skip to content

Commit 8996b89

Browse files
Mark LangsdorfJeff Garzik
authored andcommitted
ata: add platform driver for Calxeda AHCI controller
Calxeda highbank SATA phy has intermittent problems bringing up a link with Gen3 drives. Retrying the phy hard reset can work-around this issue, but each reset also disables spread spectrum support. The reset function also needs to reprogram the phy to enable spread spectrum support. Create a new driver based on ahci_platform to support the Calxeda Highbank SATA controller. Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
1 parent 100f586 commit 8996b89

File tree

7 files changed

+501
-1
lines changed

7 files changed

+501
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Calxeda Highbank Combination Phys for SATA
2+
3+
Properties:
4+
- compatible : Should be "calxeda,hb-combophy"
5+
- #phy-cells: Should be 1.
6+
- reg : Address and size for Combination Phy registers.
7+
- phydev: device ID for programming the combophy.
8+
9+
Example:
10+
11+
combophy5: combo-phy@fff5d000 {
12+
compatible = "calxeda,hb-combophy";
13+
#phy-cells = <1>;
14+
reg = <0xfff5d000 0x1000>;
15+
phydev = <31>;
16+
};
17+

Documentation/devicetree/bindings/ata/ahci-platform.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ Required properties:
88
- interrupts : <interrupt mapping for SATA IRQ>
99
- reg : <registers mapping>
1010

11+
Optional properties:
12+
- calxeda,port-phys: phandle-combophy and lane assignment, which maps each
13+
SATA port to a combophy and a lane within that
14+
combophy
15+
1116
Example:
1217
sata@ffe08000 {
1318
compatible = "calxeda,hb-ahci";
1419
reg = <0xffe08000 0x1000>;
1520
interrupts = <115>;
21+
calxeda,port-phys = <&combophy5 0 &combophy0 0 &combophy0 1
22+
&combophy0 2 &combophy0 3>;
23+
1624
};

arch/arm/boot/dts/highbank.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@
121121
compatible = "calxeda,hb-ahci";
122122
reg = <0xffe08000 0x10000>;
123123
interrupts = <0 83 4>;
124+
calxeda,port-phys = <&combophy5 0 &combophy0 0
125+
&combophy0 1 &combophy0 2
126+
&combophy0 3>;
124127
};
125128

126129
sdhci@ffe0e000 {
@@ -306,5 +309,19 @@
306309
reg = <0xfff51000 0x1000>;
307310
interrupts = <0 80 4 0 81 4 0 82 4>;
308311
};
312+
313+
combophy0: combo-phy@fff58000 {
314+
compatible = "calxeda,hb-combophy";
315+
#phy-cells = <1>;
316+
reg = <0xfff58000 0x1000>;
317+
phydev = <5>;
318+
};
319+
320+
combophy5: combo-phy@fff5d000 {
321+
compatible = "calxeda,hb-combophy";
322+
#phy-cells = <1>;
323+
reg = <0xfff5d000 0x1000>;
324+
phydev = <31>;
325+
};
309326
};
310327
};

drivers/ata/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,14 @@ config SATA_DWC_VDEBUG
214214
help
215215
This option enables the taskfile dumping and NCQ debugging.
216216

217+
config SATA_HIGHBANK
218+
tristate "Calxeda Highbank SATA support"
219+
help
220+
This option enables support for the Calxeda Highbank SoC's
221+
onboard SATA.
222+
223+
If unsure, say N.
224+
217225
config SATA_MV
218226
tristate "Marvell SATA support"
219227
help

drivers/ata/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ obj-$(CONFIG_SATA_FSL) += sata_fsl.o
99
obj-$(CONFIG_SATA_INIC162X) += sata_inic162x.o
1010
obj-$(CONFIG_SATA_SIL24) += sata_sil24.o
1111
obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o
12+
obj-$(CONFIG_SATA_HIGHBANK) += sata_highbank.o
1213

1314
# SFF w/ custom DMA
1415
obj-$(CONFIG_PDC_ADMA) += pdc_adma.o

drivers/ata/ahci_platform.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ static int ahci_resume(struct device *dev)
277277
SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume);
278278

279279
static const struct of_device_id ahci_of_match[] = {
280-
{ .compatible = "calxeda,hb-ahci", },
281280
{ .compatible = "snps,spear-ahci", },
282281
{},
283282
};

0 commit comments

Comments
 (0)