Commit 37a1f242 authored by Marek Vasut's avatar Marek Vasut
Browse files

rcar_gen3: drivers: qos: D3: Make DBSC settings local to dbsc_setting()



Move the DBSC write enabling and disabling to dbsc_setting() function,
to make it local, instead of having it all over the code.
Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: If8e5657c3230b5d82b551cb89b11c4d13a2d096b
parent 7b24603b
...@@ -20,6 +20,9 @@ static void dbsc_setting(void) ...@@ -20,6 +20,9 @@ static void dbsc_setting(void)
{ {
uint32_t md=0; uint32_t md=0;
/* Register write enable */
io_write_32(DBSC_DBSYSCNT0, 0x00001234U);
/* BUFCAM settings */ /* BUFCAM settings */
io_write_32(DBSC_DBCAM0CNF1, 0x00043218); io_write_32(DBSC_DBCAM0CNF1, 0x00043218);
io_write_32(DBSC_DBCAM0CNF2, 0x000000F4); io_write_32(DBSC_DBCAM0CNF2, 0x000000F4);
...@@ -65,12 +68,13 @@ static void dbsc_setting(void) ...@@ -65,12 +68,13 @@ static void dbsc_setting(void)
io_write_32(DBSC_DBSCHQOS151, 0x00000030); io_write_32(DBSC_DBSCHQOS151, 0x00000030);
io_write_32(DBSC_DBSCHQOS152, 0x00000020); io_write_32(DBSC_DBSCHQOS152, 0x00000020);
io_write_32(DBSC_DBSCHQOS153, 0x00000010); io_write_32(DBSC_DBSCHQOS153, 0x00000010);
/* Register write protect */
io_write_32(DBSC_DBSYSCNT0, 0x00000000U);
} }
void qos_init_d3(void) void qos_init_d3(void)
{ {
io_write_32(DBSC_DBSYSCNT0, 0x00001234);
dbsc_setting(); dbsc_setting();
/* DRAM Split Address mapping */ /* DRAM Split Address mapping */
...@@ -159,5 +163,4 @@ void qos_init_d3(void) ...@@ -159,5 +163,4 @@ void qos_init_d3(void)
/* Resource Alloc start */ /* Resource Alloc start */
io_write_32(QOSCTRL_RAEN, 0x00000001U); io_write_32(QOSCTRL_RAEN, 0x00000001U);
#endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */ #endif /* !(RCAR_QOS_TYPE == RCAR_QOS_NONE) */
io_write_32(DBSC_DBSYSCNT0, 0x00000000);
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment