ARCv2: IOC: use @ioc_enable not @ioc_exist where intended
authorVineet Gupta <vgupta@synopsys.com>
Thu, 13 Oct 2016 22:58:59 +0000 (15:58 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 24 Oct 2016 16:24:47 +0000 (09:24 -0700)
commitcf986d470208fbdd68b6934a86ccd81c04408484
treed87390ab95834343e6ef9236d847e2f91d5f3720
parent91e040a79df73d371f70792f30380d4e44805250
ARCv2: IOC: use @ioc_enable not @ioc_exist where intended

if user disables IOC from debugger at startup (by clearing @ioc_enable),
@ioc_exists is cleared too. This means boot prints don't capture the
fact that IOC was present but disabled which could be misleading.

So invert how we use @ioc_enable and @ioc_exists and make it more
canonical. @ioc_exists represent whether hardware is present or not and
stays same whether enabled or not. @ioc_enable is still user driven,
but will be auto-disabled if IOC hardware is not present, i.e. if
@ioc_exist=0. This is opposite to what we were doing before, but much
clearer.

This means @ioc_enable is now the "exported" toggle in rest of code such
as dma mapping API.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/cache.h
arch/arc/mm/cache.c
arch/arc/mm/dma.c