Skip to content

Commit 36006b1

Browse files
committed
Merge tag 'ata-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull ata updates from Damien Le Moal: - Many cleanups of the pata_parport driver and of its protocol modules (Ondrej) - Remove unused code (ata_id_xxx() functions) (Sergey) - Add Add UniPhier SATA controller DT bindings (Kunihiko) - Fix dependencies for the Freescale QorIQ AHCI SATA controller driver (Geert) - DT property handling improvements (Rob) * tag 'ata-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: (57 commits) ata: pata_parport-bpck6: Declare mode_map as static ata: pata_parport-bpck6: Remove dependency on 64BIT ata: pata_parport-bpck6: reduce indents in bpck6_open ata: pata_parport-bpck6: delete ppc6lnx.c ata: pata_parport-bpck6: move defines and mode_map to bpck6.c ata: pata_parport-bpck6: move ppc6_wr_data_byte to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_rd_data_byte to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_send_cmd to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_deselect to bpck6.c and rename ata: pata_parport-bpck6: merge ppc6_select into bpck6_open ata: pata_parport-bpck6: move ppc6_open to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_wr_extout to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_wait_for_fifo to bpck6.c and rename ata: pata_parport-bpck6: merge ppc6_wr_data_blk into bpck6_write_block ata: pata_parport-bpck6: merge ppc6_rd_data_blk into bpck6_read_block ata: pata_parport-bpck6: merge ppc6_wr_port16_blk into bpck6_write_block ata: pata_parport-bpck6: merge ppc6_rd_port16_blk into bpck6_read_block ata: pata_parport-bpck6: merge ppc6_wr_port into bpck6_write_regr ata: pata_parport-bpck6: merge ppc6_rd_port into bpck6_read_regr ata: pata_parport-bpck6: remove ppc6_close ...
2 parents 48dc810 + 140b260 commit 36006b1

File tree

27 files changed

+683
-1545
lines changed

27 files changed

+683
-1545
lines changed

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

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ select:
3030
- marvell,armada-3700-ahci
3131
- marvell,armada-8k-ahci
3232
- marvell,berlin2q-ahci
33+
- socionext,uniphier-pro4-ahci
34+
- socionext,uniphier-pxs2-ahci
35+
- socionext,uniphier-pxs3-ahci
3336
required:
3437
- compatible
3538

36-
allOf:
37-
- $ref: "ahci-common.yaml#"
38-
3939
properties:
4040
compatible:
4141
oneOf:
@@ -45,6 +45,9 @@ properties:
4545
- marvell,armada-8k-ahci
4646
- marvell,berlin2-ahci
4747
- marvell,berlin2q-ahci
48+
- socionext,uniphier-pro4-ahci
49+
- socionext,uniphier-pxs2-ahci
50+
- socionext,uniphier-pxs3-ahci
4851
- const: generic-ahci
4952
- enum:
5053
- cavium,octeon-7130-ahci
@@ -74,7 +77,8 @@ properties:
7477
maxItems: 1
7578

7679
resets:
77-
maxItems: 1
80+
minItems: 1
81+
maxItems: 3
7882

7983
patternProperties:
8084
"^sata-port@[0-9a-f]+$":
@@ -91,6 +95,43 @@ required:
9195
- reg
9296
- interrupts
9397

98+
allOf:
99+
- $ref: ahci-common.yaml#
100+
- if:
101+
properties:
102+
compatible:
103+
contains:
104+
const: socionext,uniphier-pro4-ahci
105+
then:
106+
properties:
107+
resets:
108+
items:
109+
- description: reset line for the parent
110+
- description: reset line for the glue logic
111+
- description: reset line for the controller
112+
required:
113+
- resets
114+
else:
115+
if:
116+
properties:
117+
compatible:
118+
contains:
119+
enum:
120+
- socionext,uniphier-pxs2-ahci
121+
- socionext,uniphier-pxs3-ahci
122+
then:
123+
properties:
124+
resets:
125+
items:
126+
- description: reset for the glue logic
127+
- description: reset for the controller
128+
required:
129+
- resets
130+
else:
131+
properties:
132+
resets:
133+
maxItems: 1
134+
94135
unevaluatedProperties: false
95136

96137
examples:

drivers/ata/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ config AHCI_XGENE
276276
config AHCI_QORIQ
277277
tristate "Freescale QorIQ AHCI SATA support"
278278
depends on OF
279+
depends on SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
279280
select SATA_HOST
280281
help
281282
This option enables support for the Freescale QorIQ AHCI SoC's

drivers/ata/ahci_mtk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static int mtk_ahci_parse_property(struct ahci_host_priv *hpriv,
106106
struct device_node *np = dev->of_node;
107107

108108
/* enable SATA function if needed */
109-
if (of_find_property(np, "mediatek,phy-mode", NULL)) {
109+
if (of_property_present(np, "mediatek,phy-mode")) {
110110
plat->mode = syscon_regmap_lookup_by_phandle(
111111
np, "mediatek,phy-mode");
112112
if (IS_ERR(plat->mode)) {

drivers/ata/libahci_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port,
363363
switch (rc) {
364364
case -ENOSYS:
365365
/* No PHY support. Check if PHY is required. */
366-
if (of_find_property(node, "phys", NULL)) {
366+
if (of_property_present(node, "phys")) {
367367
dev_err(dev,
368368
"couldn't get PHY in node %pOFn: ENOSYS\n",
369369
node);

drivers/ata/pata_parport/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ config PATA_PARPORT_BPCK
2525

2626
config PATA_PARPORT_BPCK6
2727
tristate "MicroSolutions backpack (Series 6) protocol"
28-
depends on (PATA_PARPORT) && !64BIT
28+
depends on PATA_PARPORT
2929
help
3030
This option enables support for the Micro Solutions BACKPACK
3131
parallel port Series 6 IDE protocol. (Most BACKPACK drives made

drivers/ata/pata_parport/aten.c

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,14 @@
99
1010
*/
1111

12-
/* Changes:
13-
14-
1.01 GRG 1998.05.05 init_proto, release_proto
15-
16-
*/
17-
18-
#define ATEN_VERSION "1.01"
19-
2012
#include <linux/module.h>
2113
#include <linux/init.h>
2214
#include <linux/delay.h>
2315
#include <linux/kernel.h>
2416
#include <linux/wait.h>
2517
#include <linux/types.h>
2618
#include <asm/io.h>
27-
28-
#include <linux/pata_parport.h>
19+
#include "pata_parport.h"
2920

3021
#define j44(a,b) ((((a>>4)&0x0f)|(b&0xf0))^0x88)
3122

@@ -35,7 +26,7 @@
3526

3627
static int cont_map[2] = { 0x08, 0x20 };
3728

38-
static void aten_write_regr( PIA *pi, int cont, int regr, int val)
29+
static void aten_write_regr(struct pi_adapter *pi, int cont, int regr, int val)
3930

4031
{ int r;
4132

@@ -44,7 +35,7 @@ static void aten_write_regr( PIA *pi, int cont, int regr, int val)
4435
w0(r); w2(0xe); w2(6); w0(val); w2(7); w2(6); w2(0xc);
4536
}
4637

47-
static int aten_read_regr( PIA *pi, int cont, int regr )
38+
static int aten_read_regr(struct pi_adapter *pi, int cont, int regr)
4839

4940
{ int a, b, r;
5041

@@ -67,7 +58,7 @@ static int aten_read_regr( PIA *pi, int cont, int regr )
6758
return -1;
6859
}
6960

70-
static void aten_read_block( PIA *pi, char * buf, int count )
61+
static void aten_read_block(struct pi_adapter *pi, char *buf, int count)
7162

7263
{ int k, a, b, c, d;
7364

@@ -95,7 +86,7 @@ static void aten_read_block( PIA *pi, char * buf, int count )
9586
}
9687
}
9788

98-
static void aten_write_block( PIA *pi, char * buf, int count )
89+
static void aten_write_block(struct pi_adapter *pi, char *buf, int count)
9990

10091
{ int k;
10192

@@ -107,28 +98,25 @@ static void aten_write_block( PIA *pi, char * buf, int count )
10798
w2(0xc);
10899
}
109100

110-
static void aten_connect ( PIA *pi )
101+
static void aten_connect(struct pi_adapter *pi)
111102

112103
{ pi->saved_r0 = r0();
113104
pi->saved_r2 = r2();
114105
w2(0xc);
115106
}
116107

117-
static void aten_disconnect ( PIA *pi )
108+
static void aten_disconnect(struct pi_adapter *pi)
118109

119110
{ w0(pi->saved_r0);
120111
w2(pi->saved_r2);
121112
}
122113

123-
static void aten_log_adapter( PIA *pi, char * scratch, int verbose )
114+
static void aten_log_adapter(struct pi_adapter *pi)
124115

125116
{ char *mode_string[2] = {"4-bit","8-bit"};
126117

127-
printk("%s: aten %s, ATEN EH-100 at 0x%x, ",
128-
pi->device,ATEN_VERSION,pi->port);
129-
printk("mode %d (%s), delay %d\n",pi->mode,
130-
mode_string[pi->mode],pi->delay);
131-
118+
dev_info(&pi->dev, "ATEN EH-100 at 0x%x, mode %d (%s), delay %d\n",
119+
pi->port, pi->mode, mode_string[pi->mode], pi->delay);
132120
}
133121

134122
static struct pi_protocol aten = {
@@ -147,16 +135,5 @@ static struct pi_protocol aten = {
147135
.log_adapter = aten_log_adapter,
148136
};
149137

150-
static int __init aten_init(void)
151-
{
152-
return paride_register(&aten);
153-
}
154-
155-
static void __exit aten_exit(void)
156-
{
157-
paride_unregister( &aten );
158-
}
159-
160138
MODULE_LICENSE("GPL");
161-
module_init(aten_init)
162-
module_exit(aten_exit)
139+
module_pata_parport_driver(aten);

0 commit comments

Comments
 (0)