hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/platform_data/x86/pmc_atom.h
....@@ -1,20 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Intel Atom SOC Power Management Controller Header File
34 * Copyright (c) 2014, Intel Corporation.
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms and conditions of the GNU General Public License,
7
- * version 2, as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- * more details.
13
- *
145 */
156
167 #ifndef PMC_ATOM_H
178 #define PMC_ATOM_H
9
+
10
+#include <linux/bits.h>
1811
1912 /* ValleyView Power Control Unit PCI Device ID */
2013 #define PCI_DEVICE_ID_VLV_PMC 0x0F1C
....@@ -148,9 +141,9 @@
148141 #define ACPI_MMIO_REG_LEN 0x100
149142
150143 #define PM1_CNT 0x4
151
-#define SLEEP_TYPE_MASK 0xFFFFECFF
144
+#define SLEEP_TYPE_MASK GENMASK(12, 10)
152145 #define SLEEP_TYPE_S5 0x1C00
153
-#define SLEEP_ENABLE 0x2000
146
+#define SLEEP_ENABLE BIT(13)
154147
155148 extern int pmc_atom_read(int offset, u32 *value);
156149 extern int pmc_atom_write(int offset, u32 value);