.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * Memory controller driver for ARM PrimeCell PL172 |
---|
3 | 4 | * PrimeCell MultiPort Memory Controller (PL172) |
---|
.. | .. |
---|
6 | 7 | * |
---|
7 | 8 | * Based on: |
---|
8 | 9 | * 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. |
---|
13 | 10 | */ |
---|
14 | 11 | |
---|
15 | 12 | #include <linux/amba/bus.h> |
---|
.. | .. |
---|
24 | 21 | #include <linux/of_platform.h> |
---|
25 | 22 | #include <linux/time.h> |
---|
26 | 23 | |
---|
27 | | -#define MPMC_STATIC_CFG(n) (0x200 + 0x20 * n) |
---|
| 24 | +#define MPMC_STATIC_CFG(n) (0x200 + 0x20 * (n)) |
---|
28 | 25 | #define MPMC_STATIC_CFG_MW_8BIT 0x0 |
---|
29 | 26 | #define MPMC_STATIC_CFG_MW_16BIT 0x1 |
---|
30 | 27 | #define MPMC_STATIC_CFG_MW_32BIT 0x2 |
---|
.. | .. |
---|
34 | 31 | #define MPMC_STATIC_CFG_EW BIT(8) |
---|
35 | 32 | #define MPMC_STATIC_CFG_B BIT(19) |
---|
36 | 33 | #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)) |
---|
38 | 35 | #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)) |
---|
40 | 37 | #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)) |
---|
42 | 39 | #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)) |
---|
44 | 41 | #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)) |
---|
46 | 43 | #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)) |
---|
48 | 45 | #define MPMC_STATIC_WAIT_TURN_MAX 0x0f |
---|
49 | 46 | |
---|
50 | 47 | /* Maximum number of static chip selects */ |
---|
.. | .. |
---|
276 | 273 | return ret; |
---|
277 | 274 | } |
---|
278 | 275 | |
---|
279 | | -static int pl172_remove(struct amba_device *adev) |
---|
| 276 | +static void pl172_remove(struct amba_device *adev) |
---|
280 | 277 | { |
---|
281 | 278 | struct pl172_data *pl172 = amba_get_drvdata(adev); |
---|
282 | 279 | |
---|
283 | 280 | clk_disable_unprepare(pl172->clk); |
---|
284 | 281 | amba_release_regions(adev); |
---|
285 | | - |
---|
286 | | - return 0; |
---|
287 | 282 | } |
---|
288 | 283 | |
---|
289 | 284 | static const struct amba_id pl172_ids[] = { |
---|