From 344797db328ff712bf9ea6e3b5056512c647718e Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 14 Jun 2019 02:07:18 +0200 Subject: [PATCH] rcar_gen3: drivers: qos: V3M: Factor out mstat fix into separate file Pull out the mstat fix array into separate file, to align the structure of the driver with the other SoCs. No functional change. Signed-off-by: Marek Vasut Change-Id: Ifb6644063d8f463e2eb20bdadc5b69ab74ac591d --- .../renesas/rcar/qos/V3M/qos_init_v3m.c | 92 +---------------- .../renesas/rcar/qos/V3M/qos_init_v3m_mstat.h | 98 +++++++++++++++++++ 2 files changed, 99 insertions(+), 91 deletions(-) create mode 100644 drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h diff --git a/drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m.c b/drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m.c index 27a3a2ab4..315813fb3 100644 --- a/drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m.c +++ b/drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m.c @@ -15,97 +15,7 @@ #define RCAR_QOS_VERSION "rev.0.01" -#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT -static const mstat_slot_t mstat_fix[] = { - {0x0000U, 0x000000000000FFFFU}, - {0x0008U, 0x000000000000FFFFU}, - {0x0010U, 0x000000000000FFFFU}, - {0x0018U, 0x000000000000FFFFU}, - {0x0020U, 0x001414090000FFFFU}, - {0x0028U, 0x000C00000000FFFFU}, - {0x0030U, 0x001008040000FFFFU}, - {0x0038U, 0x001004040000FFFFU}, - {0x0040U, 0x001004040000FFFFU}, - {0x0048U, 0x000000000000FFFFU}, - {0x0050U, 0x001004040000FFFFU}, - {0x0058U, 0x001004040000FFFFU}, - {0x0060U, 0x000000000000FFFFU}, - {0x0068U, 0x001404040000FFFFU}, - {0x0070U, 0x001008030000FFFFU}, - {0x0078U, 0x001004030000FFFFU}, - {0x0080U, 0x001004030000FFFFU}, - {0x0088U, 0x000000000000FFFFU}, - {0x0090U, 0x001004040000FFFFU}, - {0x0098U, 0x001004040000FFFFU}, - {0x00A0U, 0x000000000000FFFFU}, - {0x00A8U, 0x000000000000FFFFU}, - {0x00B0U, 0x000000000000FFFFU}, - {0x00B8U, 0x000000000000FFFFU}, - {0x00C0U, 0x000000000000FFFFU}, - {0x00C8U, 0x000000000000FFFFU}, - {0x00D0U, 0x000000000000FFFFU}, - {0x00D8U, 0x000000000000FFFFU}, - {0x00E0U, 0x001404020000FFFFU}, - {0x00E8U, 0x000000000000FFFFU}, - {0x00F0U, 0x000000000000FFFFU}, - {0x00F8U, 0x000000000000FFFFU}, - {0x0100U, 0x000000000000FFFFU}, - {0x0108U, 0x000C04020000FFFFU}, - {0x0110U, 0x000000000000FFFFU}, - {0x0118U, 0x001404020000FFFFU}, - {0x0120U, 0x000000000000FFFFU}, - {0x0128U, 0x000000000000FFFFU}, - {0x0130U, 0x000000000000FFFFU}, - {0x0138U, 0x000000000000FFFFU}, - {0x0140U, 0x000000000000FFFFU}, - {0x0148U, 0x000000000000FFFFU}, -}; - -static const mstat_slot_t mstat_be[] = { - {0x0000U, 0x00100020447FFC01U}, - {0x0008U, 0x00100020447FFC01U}, - {0x0010U, 0x00100040447FFC01U}, - {0x0018U, 0x00100040447FFC01U}, - {0x0020U, 0x0000000000000000U}, - {0x0028U, 0x0000000000000000U}, - {0x0030U, 0x0000000000000000U}, - {0x0038U, 0x0000000000000000U}, - {0x0040U, 0x0000000000000000U}, - {0x0048U, 0x0000000000000000U}, - {0x0050U, 0x0000000000000000U}, - {0x0058U, 0x0000000000000000U}, - {0x0060U, 0x0000000000000000U}, - {0x0068U, 0x0000000000000000U}, - {0x0070U, 0x0000000000000000U}, - {0x0078U, 0x0000000000000000U}, - {0x0080U, 0x0000000000000000U}, - {0x0088U, 0x0000000000000000U}, - {0x0090U, 0x0000000000000000U}, - {0x0098U, 0x0000000000000000U}, - {0x00A0U, 0x00100010447FFC01U}, - {0x00A8U, 0x00100010447FFC01U}, - {0x00B0U, 0x00100010447FFC01U}, - {0x00B8U, 0x00100010447FFC01U}, - {0x00C0U, 0x00100010447FFC01U}, - {0x00C8U, 0x00100010447FFC01U}, - {0x00D0U, 0x0000000000000000U}, - {0x00D8U, 0x00100010447FFC01U}, - {0x00E0U, 0x0000000000000000U}, - {0x00E8U, 0x00100010447FFC01U}, - {0x00F0U, 0x00100010447FFC01U}, - {0x00F8U, 0x00100010447FFC01U}, - {0x0100U, 0x00100010447FFC01U}, - {0x0108U, 0x0000000000000000U}, - {0x0110U, 0x00100010447FFC01U}, - {0x0118U, 0x0000000000000000U}, - {0x0120U, 0x00100010447FFC01U}, - {0x0128U, 0x00100010447FFC01U}, - {0x0130U, 0x00100010447FFC01U}, - {0x0138U, 0x00100010447FFC01U}, - {0x0140U, 0x00100020447FFC01U}, - {0x0148U, 0x00100020447FFC01U}, -}; -#endif +#include "qos_init_v3m_mstat.h" static void dbsc_setting(void) { diff --git a/drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h b/drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h new file mode 100644 index 000000000..866324b4f --- /dev/null +++ b/drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2015-2019, Renesas Electronics Corporation + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT +static const mstat_slot_t mstat_fix[] = { + {0x0000U, 0x000000000000FFFFU}, + {0x0008U, 0x000000000000FFFFU}, + {0x0010U, 0x000000000000FFFFU}, + {0x0018U, 0x000000000000FFFFU}, + {0x0020U, 0x001414090000FFFFU}, + {0x0028U, 0x000C00000000FFFFU}, + {0x0030U, 0x001008040000FFFFU}, + {0x0038U, 0x001004040000FFFFU}, + {0x0040U, 0x001004040000FFFFU}, + {0x0048U, 0x000000000000FFFFU}, + {0x0050U, 0x001004040000FFFFU}, + {0x0058U, 0x001004040000FFFFU}, + {0x0060U, 0x000000000000FFFFU}, + {0x0068U, 0x001404040000FFFFU}, + {0x0070U, 0x001008030000FFFFU}, + {0x0078U, 0x001004030000FFFFU}, + {0x0080U, 0x001004030000FFFFU}, + {0x0088U, 0x000000000000FFFFU}, + {0x0090U, 0x001004040000FFFFU}, + {0x0098U, 0x001004040000FFFFU}, + {0x00A0U, 0x000000000000FFFFU}, + {0x00A8U, 0x000000000000FFFFU}, + {0x00B0U, 0x000000000000FFFFU}, + {0x00B8U, 0x000000000000FFFFU}, + {0x00C0U, 0x000000000000FFFFU}, + {0x00C8U, 0x000000000000FFFFU}, + {0x00D0U, 0x000000000000FFFFU}, + {0x00D8U, 0x000000000000FFFFU}, + {0x00E0U, 0x001404020000FFFFU}, + {0x00E8U, 0x000000000000FFFFU}, + {0x00F0U, 0x000000000000FFFFU}, + {0x00F8U, 0x000000000000FFFFU}, + {0x0100U, 0x000000000000FFFFU}, + {0x0108U, 0x000C04020000FFFFU}, + {0x0110U, 0x000000000000FFFFU}, + {0x0118U, 0x001404020000FFFFU}, + {0x0120U, 0x000000000000FFFFU}, + {0x0128U, 0x000000000000FFFFU}, + {0x0130U, 0x000000000000FFFFU}, + {0x0138U, 0x000000000000FFFFU}, + {0x0140U, 0x000000000000FFFFU}, + {0x0148U, 0x000000000000FFFFU}, +}; + +static const mstat_slot_t mstat_be[] = { + {0x0000U, 0x00100020447FFC01U}, + {0x0008U, 0x00100020447FFC01U}, + {0x0010U, 0x00100040447FFC01U}, + {0x0018U, 0x00100040447FFC01U}, + {0x0020U, 0x0000000000000000U}, + {0x0028U, 0x0000000000000000U}, + {0x0030U, 0x0000000000000000U}, + {0x0038U, 0x0000000000000000U}, + {0x0040U, 0x0000000000000000U}, + {0x0048U, 0x0000000000000000U}, + {0x0050U, 0x0000000000000000U}, + {0x0058U, 0x0000000000000000U}, + {0x0060U, 0x0000000000000000U}, + {0x0068U, 0x0000000000000000U}, + {0x0070U, 0x0000000000000000U}, + {0x0078U, 0x0000000000000000U}, + {0x0080U, 0x0000000000000000U}, + {0x0088U, 0x0000000000000000U}, + {0x0090U, 0x0000000000000000U}, + {0x0098U, 0x0000000000000000U}, + {0x00A0U, 0x00100010447FFC01U}, + {0x00A8U, 0x00100010447FFC01U}, + {0x00B0U, 0x00100010447FFC01U}, + {0x00B8U, 0x00100010447FFC01U}, + {0x00C0U, 0x00100010447FFC01U}, + {0x00C8U, 0x00100010447FFC01U}, + {0x00D0U, 0x0000000000000000U}, + {0x00D8U, 0x00100010447FFC01U}, + {0x00E0U, 0x0000000000000000U}, + {0x00E8U, 0x00100010447FFC01U}, + {0x00F0U, 0x00100010447FFC01U}, + {0x00F8U, 0x00100010447FFC01U}, + {0x0100U, 0x00100010447FFC01U}, + {0x0108U, 0x0000000000000000U}, + {0x0110U, 0x00100010447FFC01U}, + {0x0118U, 0x0000000000000000U}, + {0x0120U, 0x00100010447FFC01U}, + {0x0128U, 0x00100010447FFC01U}, + {0x0130U, 0x00100010447FFC01U}, + {0x0138U, 0x00100010447FFC01U}, + {0x0140U, 0x00100020447FFC01U}, + {0x0148U, 0x00100020447FFC01U}, +}; +#endif