Line 222... |
Line 222... |
setsprbits (SPR_UPR, SPR_UPR_ICP, val.int_val ? 1 : 0);
|
setsprbits (SPR_UPR, SPR_UPR_ICP, val.int_val ? 1 : 0);
|
}
|
}
|
|
|
void ic_nsets(union param_val val, void *dat)
|
void ic_nsets(union param_val val, void *dat)
|
{
|
{
|
if (is_power2(val.int_val) && val.int_val <= MAX_IC_SETS)
|
if (is_power2(val.int_val) && val.int_val <= MAX_IC_SETS){
|
config.ic.nsets = val.int_val;
|
config.ic.nsets = val.int_val;
|
|
setsprbits (SPR_ICCFGR, SPR_ICCFGR_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_IC_SETS);
|
sprintf (tmp, "value of power of two and lower or equal than %i expected.", MAX_IC_SETS);
|
CONFIG_ERROR(tmp);
|
CONFIG_ERROR(tmp);
|
}
|
}
|
}
|
}
|
|
|
void ic_nways(union param_val val, void *dat)
|
void ic_nways(union param_val val, void *dat)
|
{
|
{
|
if (val.int_val >= 1 && val.int_val <= MAX_IC_WAYS)
|
if (is_power2(val.int_val) && val.int_val <= MAX_IC_WAYS) {
|
config.ic.nways = val.int_val;
|
config.ic.nways = val.int_val;
|
else
|
setsprbits (SPR_ICCFGR, SPR_ICCFGR_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_IC_WAYS);
|
|
CONFIG_ERROR(tmp);
|
|
}
|
}
|
}
|
|
|
void ic_blocksize(union param_val val, void *dat)
|
void ic_blocksize(union param_val val, void *dat)
|
{
|
{
|
if (is_power2(val.int_val))
|
if (is_power2(val.int_val)){
|
config.ic.blocksize = val.int_val;
|
config.ic.blocksize = val.int_val;
|
else
|
setsprbits (SPR_ICCFGR, SPR_ICCFGR_CBS,log2(val.int_val));
|
|
} else
|
CONFIG_ERROR("value of power of two expected.");
|
CONFIG_ERROR("value of power of two expected.");
|
}
|
}
|
|
|
void ic_ustates(union param_val val, void *dat)
|
void ic_ustates(union param_val val, void *dat)
|
{
|
{
|