hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/memory/pl172.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Memory controller driver for ARM PrimeCell PL172
34 * PrimeCell MultiPort Memory Controller (PL172)
....@@ -6,10 +7,6 @@
67 *
78 * Based on:
89 * TI AEMIF driver, Copyright (C) 2010 - 2013 Texas Instruments Inc.
9
- *
10
- * This file is licensed under the terms of the GNU General Public
11
- * License version 2. This program is licensed "as is" without any
12
- * warranty of any kind, whether express or implied.
1310 */
1411
1512 #include <linux/amba/bus.h>
....@@ -24,7 +21,7 @@
2421 #include <linux/of_platform.h>
2522 #include <linux/time.h>
2623
27
-#define MPMC_STATIC_CFG(n) (0x200 + 0x20 * n)
24
+#define MPMC_STATIC_CFG(n) (0x200 + 0x20 * (n))
2825 #define MPMC_STATIC_CFG_MW_8BIT 0x0
2926 #define MPMC_STATIC_CFG_MW_16BIT 0x1
3027 #define MPMC_STATIC_CFG_MW_32BIT 0x2
....@@ -34,17 +31,17 @@
3431 #define MPMC_STATIC_CFG_EW BIT(8)
3532 #define MPMC_STATIC_CFG_B BIT(19)
3633 #define MPMC_STATIC_CFG_P BIT(20)
37
-#define MPMC_STATIC_WAIT_WEN(n) (0x204 + 0x20 * n)
34
+#define MPMC_STATIC_WAIT_WEN(n) (0x204 + 0x20 * (n))
3835 #define MPMC_STATIC_WAIT_WEN_MAX 0x0f
39
-#define MPMC_STATIC_WAIT_OEN(n) (0x208 + 0x20 * n)
36
+#define MPMC_STATIC_WAIT_OEN(n) (0x208 + 0x20 * (n))
4037 #define MPMC_STATIC_WAIT_OEN_MAX 0x0f
41
-#define MPMC_STATIC_WAIT_RD(n) (0x20c + 0x20 * n)
38
+#define MPMC_STATIC_WAIT_RD(n) (0x20c + 0x20 * (n))
4239 #define MPMC_STATIC_WAIT_RD_MAX 0x1f
43
-#define MPMC_STATIC_WAIT_PAGE(n) (0x210 + 0x20 * n)
40
+#define MPMC_STATIC_WAIT_PAGE(n) (0x210 + 0x20 * (n))
4441 #define MPMC_STATIC_WAIT_PAGE_MAX 0x1f
45
-#define MPMC_STATIC_WAIT_WR(n) (0x214 + 0x20 * n)
42
+#define MPMC_STATIC_WAIT_WR(n) (0x214 + 0x20 * (n))
4643 #define MPMC_STATIC_WAIT_WR_MAX 0x1f
47
-#define MPMC_STATIC_WAIT_TURN(n) (0x218 + 0x20 * n)
44
+#define MPMC_STATIC_WAIT_TURN(n) (0x218 + 0x20 * (n))
4845 #define MPMC_STATIC_WAIT_TURN_MAX 0x0f
4946
5047 /* Maximum number of static chip selects */
....@@ -276,14 +273,12 @@
276273 return ret;
277274 }
278275
279
-static int pl172_remove(struct amba_device *adev)
276
+static void pl172_remove(struct amba_device *adev)
280277 {
281278 struct pl172_data *pl172 = amba_get_drvdata(adev);
282279
283280 clk_disable_unprepare(pl172->clk);
284281 amba_release_regions(adev);
285
-
286
- return 0;
287282 }
288283
289284 static const struct amba_id pl172_ids[] = {