Commit 57aaf913 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'ata-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata updates from Niklas Cassel:

 - Do not enable LPM for external ports (hotplug-capable ports or eSATA
   ports), as the HBA will not be able to detect hot plug removal events
   when LPM is enabled (me)

 - Drop the board type board_ahci_low_power. Now when we make sure that
   we won't enable LPM for external ports, we can always set the LPM
   policy to CONFIG_SATA_MOBILE_LPM_POLICY for internal ports. There is
   thus no longer any need for the board type board_ahci_low_power, so
   it can be removed. (As before, LPM features not supported by the HBA
   and/or the device will not be enabled, regardless of the LPM policy
   Kconfig) (Mario Limonciello)

   Note that the default CONFIG_SATA_MOBILE_LPM_POLICY value is still 0
   (which will not try to enable any LPM features), however, most Linux
   distributions override this and set it to 3 (Medium power with DIPM).
   We intend to change the default to 3 in the coming cycles, but we
   will wait a cycle or two.

 - Add board type board_ahci_pcs_quirk and make all legacy Intel
   platforms use it. The Intel PCS quirk was being applied to basically
   all Intel platforms, which caused some issues (the device failing to
   come back after a reset), when being applied to newer Intel platforms
   where it shouldn't have been applied.

   New platforms can be added using board type board_ahci, which will
   not have the quirk applied (me)

 - Rename board_ahci_nosntf to board_ahci_pcs_quirk_no_sntf to more
   clearly highlight that it applies two different quirks (me)

 - Modify the ahci_broken_devslp() quirk to be implemented like all the
   other quirks (i.e. define a board type for the quirk) (me)

 - Drop unused board_ahci_noncq board type (me)

 - Rename board_ahci_nomsi to board_ahci_no_msi to match the other board
   types (me)

 - Make pata_parport_bus_type const (Ricardo B. Marliere)

 - Remove at91 compact flash device tree binding. (The binding is not
   used by any driver.) (from Hari Prasath Gujulan Elango)

 - Convert MediaTek device tree binding to json-schema (Rafał Miłecki)

 - At boot, print the number of implemented ports, instead of printing
   the maximum number of ports supported by the HBA silicon (me)

* tag 'ata-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ahci: print the number of implemented ports
  dt-bindings: ata: convert MediaTek controller to the json-schema
  ahci: rename board_ahci_nomsi
  ahci: drop unused board_ahci_noncq
  ahci: clean up ahci_broken_devslp quirk
  ahci: rename board_ahci_nosntf
  ahci: clean up intel_pcs_quirk
  ata: ahci: Drop low power policy board type
  ata: ahci: do not enable LPM on external ports
  ata: ahci: drop hpriv param from ahci_update_initial_lpm_policy()
  ata: ahci: a hotplug capable port is an external port
  ata: ahci: move marking of external port earlier
  dt-bindings: ata: atmel: remove at91 compact flash documentation
  ata: pata_parport: make pata_parport_bus_type const
parents 7d62cb2a 13ec4098
MediaTek Serial ATA controller
Required properties:
- compatible : Must be "mediatek,<chip>-ahci", "mediatek,mtk-ahci".
When using "mediatek,mtk-ahci" compatible strings, you
need SoC specific ones in addition, one of:
- "mediatek,mt7622-ahci"
- reg : Physical base addresses and length of register sets.
- interrupts : Interrupt associated with the SATA device.
- interrupt-names : Associated name must be: "hostc".
- clocks : A list of phandle and clock specifier pairs, one for each
entry in clock-names.
- clock-names : Associated names must be: "ahb", "axi", "asic", "rbc", "pm".
- phys : A phandle and PHY specifier pair for the PHY port.
- phy-names : Associated name must be: "sata-phy".
- ports-implemented : See ./ahci-platform.txt for details.
Optional properties:
- power-domains : A phandle and power domain specifier pair to the power
domain which is responsible for collapsing and restoring
power to the peripheral.
- resets : Must contain an entry for each entry in reset-names.
See ../reset/reset.txt for details.
- reset-names : Associated names must be: "axi", "sw", "reg".
- mediatek,phy-mode : A phandle to the system controller, used to enable
SATA function.
Example:
sata: sata@1a200000 {
compatible = "mediatek,mt7622-ahci",
"mediatek,mtk-ahci";
reg = <0 0x1a200000 0 0x1100>;
interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "hostc";
clocks = <&pciesys CLK_SATA_AHB_EN>,
<&pciesys CLK_SATA_AXI_EN>,
<&pciesys CLK_SATA_ASIC_EN>,
<&pciesys CLK_SATA_RBC_EN>,
<&pciesys CLK_SATA_PM_EN>;
clock-names = "ahb", "axi", "asic", "rbc", "pm";
phys = <&u3port1 PHY_TYPE_SATA>;
phy-names = "sata-phy";
ports-implemented = <0x1>;
power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
resets = <&pciesys MT7622_SATA_AXI_BUS_RST>,
<&pciesys MT7622_SATA_PHY_SW_RST>,
<&pciesys MT7622_SATA_PHY_REG_RST>;
reset-names = "axi", "sw", "reg";
mediatek,phy-mode = <&pciesys>;
};
Atmel AT91RM9200 CompactFlash
Required properties:
- compatible : "atmel,at91rm9200-cf".
- reg : should specify localbus address and size used.
- gpios : specifies the gpio pins to control the CF device. Detect
and reset gpio's are mandatory while irq and vcc gpio's are
optional and may be set to 0 if not present.
Example:
compact-flash@50000000 {
compatible = "atmel,at91rm9200-cf";
reg = <0x50000000 0x30000000>;
gpios = <&pioC 13 0 /* irq */
&pioC 15 0 /* detect */
0 /* vcc */
&pioC 5 0 /* reset */
>;
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/ata/mediatek,mtk-ahci.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek Serial ATA controller
maintainers:
- Ryder Lee <ryder.lee@mediatek.com>
allOf:
- $ref: ahci-common.yaml#
properties:
compatible:
items:
- enum:
- mediatek,mt7622-ahci
- const: mediatek,mtk-ahci
reg:
maxItems: 1
interrupts:
maxItems: 1
interrupt-names:
const: hostc
clocks:
maxItems: 5
clock-names:
items:
- const: ahb
- const: axi
- const: asic
- const: rbc
- const: pm
power-domains:
maxItems: 1
resets:
maxItems: 3
reset-names:
items:
- const: axi
- const: sw
- const: reg
mediatek,phy-mode:
description: System controller phandle, used to enable SATA function
$ref: /schemas/types.yaml#/definitions/phandle
required:
- reg
- interrupts
- interrupt-names
- clocks
- clock-names
- phys
- phy-names
- ports-implemented
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/mt7622-clk.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/power/mt7622-power.h>
#include <dt-bindings/reset/mt7622-reset.h>
sata@1a200000 {
compatible = "mediatek,mt7622-ahci", "mediatek,mtk-ahci";
reg = <0x1a200000 0x1100>;
interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "hostc";
clocks = <&pciesys CLK_SATA_AHB_EN>,
<&pciesys CLK_SATA_AXI_EN>,
<&pciesys CLK_SATA_ASIC_EN>,
<&pciesys CLK_SATA_RBC_EN>,
<&pciesys CLK_SATA_PM_EN>;
clock-names = "ahb", "axi", "asic", "rbc", "pm";
phys = <&u3port1 PHY_TYPE_SATA>;
phy-names = "sata-phy";
ports-implemented = <0x1>;
power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
resets = <&pciesys MT7622_SATA_AXI_BUS_RST>,
<&pciesys MT7622_SATA_PHY_SW_RST>,
<&pciesys MT7622_SATA_PHY_REG_RST>;
reset-names = "axi", "sw", "reg";
mediatek,phy-mode = <&pciesys>;
};
......@@ -116,15 +116,14 @@ config SATA_AHCI
If unsure, say N.
config SATA_MOBILE_LPM_POLICY
int "Default SATA Link Power Management policy for low power chipsets"
int "Default SATA Link Power Management policy"
range 0 4
default 0
depends on SATA_AHCI
help
Select the Default SATA Link Power Management (LPM) policy to use
for chipsets / "South Bridges" supporting low-power modes. Such
chipsets are typically found on most laptops but desktops and
servers now also widely use chipsets supporting low power modes.
chipsets are ubiquitous across laptops, desktops and servers.
The value set has the following meanings:
0 => Keep firmware settings
......
This diff is collapsed.
......@@ -241,13 +241,11 @@ enum {
AHCI_HFLAG_YES_ALPM = BIT(23), /* force ALPM cap on */
AHCI_HFLAG_NO_WRITE_TO_RO = BIT(24), /* don't write to read
only registers */
AHCI_HFLAG_USE_LPM_POLICY = BIT(25), /* chipset that should use
SATA_MOBILE_LPM_POLICY
as default lpm_policy */
AHCI_HFLAG_SUSPEND_PHYS = BIT(26), /* handle PHYs during
AHCI_HFLAG_SUSPEND_PHYS = BIT(25), /* handle PHYs during
suspend/resume */
AHCI_HFLAG_NO_SXS = BIT(28), /* SXS not supported */
AHCI_HFLAG_43BIT_ONLY = BIT(29), /* 43bit DMA addr limit */
AHCI_HFLAG_NO_SXS = BIT(26), /* SXS not supported */
AHCI_HFLAG_43BIT_ONLY = BIT(27), /* 43bit DMA addr limit */
AHCI_HFLAG_INTEL_PCS_QUIRK = BIT(28), /* apply Intel PCS quirk */
/* ap->flags bits */
......
......@@ -1280,10 +1280,8 @@ static void ahci_port_init(struct device *dev, struct ata_port *ap,
int port_no, void __iomem *mmio,
void __iomem *port_mmio)
{
struct ahci_host_priv *hpriv = ap->host->private_data;
const char *emsg = NULL;
int rc;
u32 tmp;
/* make sure port is not active */
rc = ahci_deinit_port(ap, &emsg);
......@@ -1291,11 +1289,6 @@ static void ahci_port_init(struct device *dev, struct ata_port *ap,
dev_warn(dev, "%s (%d)\n", emsg, rc);
ahci_port_clear_pending_irq(ap);
/* mark esata ports */
tmp = readl(port_mmio + PORT_CMD);
if ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS))
ap->pflags |= ATA_PFLAG_EXTERNAL;
}
void ahci_init_controller(struct ata_host *host)
......@@ -2627,8 +2620,8 @@ void ahci_print_info(struct ata_host *host, const char *scc_s)
speed_s = "?";
dev_info(host->dev,
"AHCI %02x%02x.%02x%02x "
"%u slots %u ports %s Gbps 0x%x impl %s mode\n"
"AHCI vers %02x%02x.%02x%02x, "
"%u command slots, %s Gbps, %s mode\n"
,
(vers >> 24) & 0xff,
......@@ -2637,11 +2630,17 @@ void ahci_print_info(struct ata_host *host, const char *scc_s)
vers & 0xff,
((cap >> 8) & 0x1f) + 1,
(cap & 0x1f) + 1,
speed_s,
impl,
scc_s);
dev_info(host->dev,
"%u/%u ports implemented (port mask 0x%x)\n"
,
hweight32(impl),
(cap & 0x1f) + 1,
impl);
dev_info(host->dev,
"flags: "
"%s%s%s%s%s%s%s"
......
......@@ -464,7 +464,7 @@ static void pata_parport_bus_release(struct device *dev)
/* nothing to do here but required to avoid warning on device removal */
}
static struct bus_type pata_parport_bus_type = {
static const struct bus_type pata_parport_bus_type = {
.name = DRV_NAME,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment