Skip to content

Commit

Permalink
Merge tag 'ata-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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
  ...
  • Loading branch information
torvalds committed Apr 26, 2023
2 parents 48dc810 + 140b260 commit 36006b1
Show file tree
Hide file tree
Showing 27 changed files with 683 additions and 1,545 deletions.
49 changes: 45 additions & 4 deletions Documentation/devicetree/bindings/ata/ahci-platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ select:
- marvell,armada-3700-ahci
- marvell,armada-8k-ahci
- marvell,berlin2q-ahci
- socionext,uniphier-pro4-ahci
- socionext,uniphier-pxs2-ahci
- socionext,uniphier-pxs3-ahci
required:
- compatible

allOf:
- $ref: "ahci-common.yaml#"

properties:
compatible:
oneOf:
Expand All @@ -45,6 +45,9 @@ properties:
- marvell,armada-8k-ahci
- marvell,berlin2-ahci
- marvell,berlin2q-ahci
- socionext,uniphier-pro4-ahci
- socionext,uniphier-pxs2-ahci
- socionext,uniphier-pxs3-ahci
- const: generic-ahci
- enum:
- cavium,octeon-7130-ahci
Expand Down Expand Up @@ -74,7 +77,8 @@ properties:
maxItems: 1

resets:
maxItems: 1
minItems: 1
maxItems: 3

patternProperties:
"^sata-port@[0-9a-f]+$":
Expand All @@ -91,6 +95,43 @@ required:
- reg
- interrupts

allOf:
- $ref: ahci-common.yaml#
- if:
properties:
compatible:
contains:
const: socionext,uniphier-pro4-ahci
then:
properties:
resets:
items:
- description: reset line for the parent
- description: reset line for the glue logic
- description: reset line for the controller
required:
- resets
else:
if:
properties:
compatible:
contains:
enum:
- socionext,uniphier-pxs2-ahci
- socionext,uniphier-pxs3-ahci
then:
properties:
resets:
items:
- description: reset for the glue logic
- description: reset for the controller
required:
- resets
else:
properties:
resets:
maxItems: 1

unevaluatedProperties: false

examples:
Expand Down
1 change: 1 addition & 0 deletions drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ config AHCI_XGENE
config AHCI_QORIQ
tristate "Freescale QorIQ AHCI SATA support"
depends on OF
depends on SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
select SATA_HOST
help
This option enables support for the Freescale QorIQ AHCI SoC's
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/ahci_mtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static int mtk_ahci_parse_property(struct ahci_host_priv *hpriv,
struct device_node *np = dev->of_node;

/* enable SATA function if needed */
if (of_find_property(np, "mediatek,phy-mode", NULL)) {
if (of_property_present(np, "mediatek,phy-mode")) {
plat->mode = syscon_regmap_lookup_by_phandle(
np, "mediatek,phy-mode");
if (IS_ERR(plat->mode)) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/libahci_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port,
switch (rc) {
case -ENOSYS:
/* No PHY support. Check if PHY is required. */
if (of_find_property(node, "phys", NULL)) {
if (of_property_present(node, "phys")) {
dev_err(dev,
"couldn't get PHY in node %pOFn: ENOSYS\n",
node);
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/pata_parport/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ config PATA_PARPORT_BPCK

config PATA_PARPORT_BPCK6
tristate "MicroSolutions backpack (Series 6) protocol"
depends on (PATA_PARPORT) && !64BIT
depends on PATA_PARPORT
help
This option enables support for the Micro Solutions BACKPACK
parallel port Series 6 IDE protocol. (Most BACKPACK drives made
Expand Down
45 changes: 11 additions & 34 deletions drivers/ata/pata_parport/aten.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,14 @@
*/

/* Changes:
1.01 GRG 1998.05.05 init_proto, release_proto
*/

#define ATEN_VERSION "1.01"

#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/wait.h>
#include <linux/types.h>
#include <asm/io.h>

#include <linux/pata_parport.h>
#include "pata_parport.h"

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

Expand All @@ -35,7 +26,7 @@

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

static void aten_write_regr( PIA *pi, int cont, int regr, int val)
static void aten_write_regr(struct pi_adapter *pi, int cont, int regr, int val)

{ int r;

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

static int aten_read_regr( PIA *pi, int cont, int regr )
static int aten_read_regr(struct pi_adapter *pi, int cont, int regr)

{ int a, b, r;

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

static void aten_read_block( PIA *pi, char * buf, int count )
static void aten_read_block(struct pi_adapter *pi, char *buf, int count)

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

Expand Down Expand Up @@ -95,7 +86,7 @@ static void aten_read_block( PIA *pi, char * buf, int count )
}
}

static void aten_write_block( PIA *pi, char * buf, int count )
static void aten_write_block(struct pi_adapter *pi, char *buf, int count)

{ int k;

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

static void aten_connect ( PIA *pi )
static void aten_connect(struct pi_adapter *pi)

{ pi->saved_r0 = r0();
pi->saved_r2 = r2();
w2(0xc);
}

static void aten_disconnect ( PIA *pi )
static void aten_disconnect(struct pi_adapter *pi)

{ w0(pi->saved_r0);
w2(pi->saved_r2);
}

static void aten_log_adapter( PIA *pi, char * scratch, int verbose )
static void aten_log_adapter(struct pi_adapter *pi)

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

printk("%s: aten %s, ATEN EH-100 at 0x%x, ",
pi->device,ATEN_VERSION,pi->port);
printk("mode %d (%s), delay %d\n",pi->mode,
mode_string[pi->mode],pi->delay);

dev_info(&pi->dev, "ATEN EH-100 at 0x%x, mode %d (%s), delay %d\n",
pi->port, pi->mode, mode_string[pi->mode], pi->delay);
}

static struct pi_protocol aten = {
Expand All @@ -147,16 +135,5 @@ static struct pi_protocol aten = {
.log_adapter = aten_log_adapter,
};

static int __init aten_init(void)
{
return paride_register(&aten);
}

static void __exit aten_exit(void)
{
paride_unregister( &aten );
}

MODULE_LICENSE("GPL");
module_init(aten_init)
module_exit(aten_exit)
module_pata_parport_driver(aten);
Loading

0 comments on commit 36006b1

Please sign in to comment.