Browse Source

rcar_gen3: drivers: qos: V3M: Configure DBSC QoS from a table

Convert the DBSC QoS setting function to a simple table of register-value
pairs and pass it to common rcar_qos_dbsc_setting() to write those values
to matching registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I3e8b0251099b57581ebdcfce5670bff5579dc505
pull/1931/head
Marek Vasut 5 years ago
parent
commit
b5a506abcd
  1. 79
      drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m.c

79
drivers/staging/renesas/rcar/qos/V3M/qos_init_v3m.c

@ -17,55 +17,52 @@
#include "qos_init_v3m_mstat.h"
static void dbsc_setting(void)
{
struct rcar_gen3_dbsc_qos_settings v3m_qos[] = {
/* BUFCAM settings */
//DBSC_DBCAM0CNF0 not set
io_write_32(DBSC_DBCAM0CNF1, 0x00044218);
io_write_32(DBSC_DBCAM0CNF2, 0x000000F4);
//io_write_32(DBSC_DBCAM0CNF3, 0x00000007);
io_write_32(DBSC_DBSCHCNT0, 0x080F003F);
io_write_32(DBSC_DBSCHCNT1, 0x00001010);
io_write_32(DBSC_DBSCHSZ0, 0x00000001);
io_write_32(DBSC_DBSCHRW0, 0x22421111);
io_write_32(DBSC_DBSCHRW1, 0x00180034);
io_write_32(DBSC_SCFCTST0, 0x180B1708);
io_write_32(DBSC_SCFCTST1, 0x0808070C);
io_write_32(DBSC_SCFCTST2, 0x012F1123);
{ DBSC_DBCAM0CNF1, 0x00044218 },
{ DBSC_DBCAM0CNF2, 0x000000F4 },
{ DBSC_DBSCHCNT0, 0x080F003F },
{ DBSC_DBSCHCNT1, 0x00001010 },
{ DBSC_DBSCHSZ0, 0x00000001 },
{ DBSC_DBSCHRW0, 0x22421111 },
{ DBSC_DBSCHRW1, 0x00180034 },
{ DBSC_SCFCTST0, 0x180B1708 },
{ DBSC_SCFCTST1, 0x0808070C },
{ DBSC_SCFCTST2, 0x012F1123 },
/* QoS Settings */
io_write_32(DBSC_DBSCHQOS00, 0x0000F000);
io_write_32(DBSC_DBSCHQOS01, 0x0000E000);
io_write_32(DBSC_DBSCHQOS02, 0x00007000);
io_write_32(DBSC_DBSCHQOS03, 0x00000000);
io_write_32(DBSC_DBSCHQOS40, 0x0000F000);
io_write_32(DBSC_DBSCHQOS41, 0x0000EFFF);
io_write_32(DBSC_DBSCHQOS42, 0x0000B000);
io_write_32(DBSC_DBSCHQOS43, 0x00000000);
io_write_32(DBSC_DBSCHQOS90, 0x0000F000);
io_write_32(DBSC_DBSCHQOS91, 0x0000EFFF);
io_write_32(DBSC_DBSCHQOS92, 0x0000D000);
io_write_32(DBSC_DBSCHQOS93, 0x00000000);
io_write_32(DBSC_DBSCHQOS130, 0x0000F000);
io_write_32(DBSC_DBSCHQOS131, 0x0000EFFF);
io_write_32(DBSC_DBSCHQOS132, 0x0000E800);
io_write_32(DBSC_DBSCHQOS133, 0x00007000);
io_write_32(DBSC_DBSCHQOS140, 0x0000F000);
io_write_32(DBSC_DBSCHQOS141, 0x0000EFFF);
io_write_32(DBSC_DBSCHQOS142, 0x0000E800);
io_write_32(DBSC_DBSCHQOS143, 0x0000B000);
io_write_32(DBSC_DBSCHQOS150, 0x000007D0);
io_write_32(DBSC_DBSCHQOS151, 0x000007CF);
io_write_32(DBSC_DBSCHQOS152, 0x000005D0);
io_write_32(DBSC_DBSCHQOS153, 0x000003D0);
}
{ DBSC_DBSCHQOS00, 0x0000F000 },
{ DBSC_DBSCHQOS01, 0x0000E000 },
{ DBSC_DBSCHQOS02, 0x00007000 },
{ DBSC_DBSCHQOS03, 0x00000000 },
{ DBSC_DBSCHQOS40, 0x0000F000 },
{ DBSC_DBSCHQOS41, 0x0000EFFF },
{ DBSC_DBSCHQOS42, 0x0000B000 },
{ DBSC_DBSCHQOS43, 0x00000000 },
{ DBSC_DBSCHQOS90, 0x0000F000 },
{ DBSC_DBSCHQOS91, 0x0000EFFF },
{ DBSC_DBSCHQOS92, 0x0000D000 },
{ DBSC_DBSCHQOS93, 0x00000000 },
{ DBSC_DBSCHQOS130, 0x0000F000 },
{ DBSC_DBSCHQOS131, 0x0000EFFF },
{ DBSC_DBSCHQOS132, 0x0000E800 },
{ DBSC_DBSCHQOS133, 0x00007000 },
{ DBSC_DBSCHQOS140, 0x0000F000 },
{ DBSC_DBSCHQOS141, 0x0000EFFF },
{ DBSC_DBSCHQOS142, 0x0000E800 },
{ DBSC_DBSCHQOS143, 0x0000B000 },
{ DBSC_DBSCHQOS150, 0x000007D0 },
{ DBSC_DBSCHQOS151, 0x000007CF },
{ DBSC_DBSCHQOS152, 0x000005D0 },
{ DBSC_DBSCHQOS153, 0x000003D0 },
};
void qos_init_v3m(void)
{
return;
dbsc_setting();
rcar_qos_dbsc_setting(v3m_qos, ARRAY_SIZE(v3m_qos), false);
#if !(RCAR_QOS_TYPE == RCAR_QOS_NONE)
#if RCAR_QOS_TYPE == RCAR_QOS_TYPE_DEFAULT

Loading…
Cancel
Save