forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/ata/ahci.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * ahci.h - Common AHCI SATA definitions and declarations
34 *
....@@ -7,29 +8,12 @@
78 *
89 * Copyright 2004-2005 Red Hat, Inc.
910 *
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation; either version 2, or (at your option)
14
- * any later version.
15
- *
16
- * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program; see the file COPYING. If not, write to
23
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24
- *
25
- *
2611 * libata documentation is available via 'make {ps|pdf}docs',
2712 * as Documentation/driver-api/libata.rst
2813 *
2914 * AHCI hardware documentation:
3015 * http://www.intel.com/technology/serialata/pdf/rev1_0.pdf
3116 * http://www.intel.com/technology/serialata/pdf/rev1_1.pdf
32
- *
3317 */
3418
3519 #ifndef _AHCI_H
....@@ -254,6 +238,11 @@
254238 AHCI_HFLAG_IS_MOBILE = (1 << 25), /* mobile chipset, use
255239 SATA_MOBILE_LPM_POLICY
256240 as default lpm_policy */
241
+ AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during
242
+ suspend/resume */
243
+ AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 << 27), /* ignore -EOPNOTSUPP
244
+ from phy_power_on() */
245
+ AHCI_HFLAG_NO_SXS = (1 << 28), /* SXS not supported */
257246
258247 /* ap->flags bits */
259248
....@@ -265,7 +254,7 @@
265254 PCS_7 = 0x94, /* 7+ port PCS (Denverton) */
266255
267256 /* em constants */
268
- EM_MAX_SLOTS = 8,
257
+ EM_MAX_SLOTS = SATA_PMP_MAX_PORTS,
269258 EM_MAX_RETRY = 5,
270259
271260 /* em_ctl bits */
....@@ -350,10 +339,13 @@
350339 u32 em_loc; /* enclosure management location */
351340 u32 em_buf_sz; /* EM buffer size in byte */
352341 u32 em_msg_type; /* EM message type */
342
+ u32 remapped_nvme; /* NVMe remapped device count */
353343 bool got_runtime_pm; /* Did we do pm_runtime_get? */
354344 struct clk *clks[AHCI_MAX_CLKS]; /* Optional */
355345 struct reset_control *rsts; /* Optional */
356346 struct regulator **target_pwrs; /* Optional */
347
+ struct regulator *ahci_regulator;/* Optional */
348
+ struct regulator *phy_regulator;/* Optional */
357349 /*
358350 * If platform uses PHYs. There is a 1:1 relation between the port number and
359351 * the PHY position in this array.