Line 356... |
Line 356... |
setsprbits (SPR_UPR, SPR_UPR_DCP, val.int_val ? 1 : 0);
|
setsprbits (SPR_UPR, SPR_UPR_DCP, val.int_val ? 1 : 0);
|
}
|
}
|
|
|
void dc_nsets(union param_val val, void *dat)
|
void dc_nsets(union param_val val, void *dat)
|
{
|
{
|
if (is_power2(val.int_val) && val.int_val <= MAX_DC_SETS)
|
if (is_power2(val.int_val) && val.int_val <= MAX_DC_SETS){
|
config.dc.nsets = val.int_val;
|
config.dc.nsets = val.int_val;
|
|
setsprbits (SPR_DCCFGR, SPR_DCCFGR_NCS, log2(val.int_val));
|
|
}
|
else {
|
else {
|
char tmp[200];
|
char tmp[200];
|
sprintf (tmp, "value of power of two and lower or equal than %i expected.", MAX_DC_SETS);
|
sprintf (tmp, "value of power of two and lower or equal than %i expected.", MAX_DC_SETS);
|
CONFIG_ERROR(tmp);
|
CONFIG_ERROR(tmp);
|
}
|
}
|
}
|
}
|
|
|
void dc_nways(union param_val val, void *dat)
|
void dc_nways(union param_val val, void *dat)
|
{
|
{
|
if (val.int_val >= 1 && val.int_val <= MAX_DC_WAYS)
|
if (is_power2(val.int_val) && val.int_val <= MAX_DC_WAYS){
|
config.dc.nways = val.int_val;
|
config.dc.nways = val.int_val;
|
else
|
setsprbits (SPR_DCCFGR, SPR_DCCFGR_NCW, log2(val.int_val));
|
CONFIG_ERROR("value 1, 2, 3 or 4 expected.");
|
}
|
|
else{
|
|
char tmp[200];
|
|
sprintf (tmp, "value of power of two and lower or equal than %i expected.",
|
|
MAX_DC_WAYS);
|
|
CONFIG_ERROR(tmp);
|
|
}
|
}
|
}
|
|
|
void dc_blocksize(union param_val val, void *dat)
|
void dc_blocksize(union param_val val, void *dat)
|
{
|
{
|
if (is_power2(val.int_val))
|
if (is_power2(val.int_val)) {
|
config.dc.blocksize = val.int_val;
|
config.dc.blocksize = val.int_val;
|
else
|
setsprbits (SPR_DCCFGR, SPR_DCCFGR_CBS,log2(val.int_val));
|
|
} else
|
CONFIG_ERROR("value of power of two expected.");
|
CONFIG_ERROR("value of power of two expected.");
|
}
|
}
|
|
|
void dc_ustates(union param_val val, void *dat)
|
void dc_ustates(union param_val val, void *dat)
|
{
|
{
|