aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2021-10-29 23:02:09 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-10-30 11:46:40 +0200
commitf94bff1337ff525e2ff458b8e4cd57f9561acde3 (patch)
tree9b42f20abc02cd2365d73ce61a31c2e279c14d43 /hw/intc
parent221389657aa77ced7a17936747f288193e321d3f (diff)
downloadqemu-f94bff1337ff525e2ff458b8e4cd57f9561acde3.zip
qemu-f94bff1337ff525e2ff458b8e4cd57f9561acde3.tar.gz
qemu-f94bff1337ff525e2ff458b8e4cd57f9561acde3.tar.bz2
hw/sh4: Coding style: White space fixes
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> Message-Id: <91698c54fa493a4cfe93546211206439787d4b78.1635541329.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/sh_intc.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c
index 84eec7d..6700508 100644
--- a/hw/intc/sh_intc.c
+++ b/hw/intc/sh_intc.c
@@ -71,18 +71,18 @@ void sh_intc_toggle_source(struct intc_source *source,
enable_changed == -1 ? "disabled " : "",
source->pending ? "pending" : "");
#endif
- }
+ }
}
-static void sh_intc_set_irq (void *opaque, int n, int level)
+static void sh_intc_set_irq(void *opaque, int n, int level)
{
- struct intc_desc *desc = opaque;
- struct intc_source *source = &(desc->sources[n]);
+ struct intc_desc *desc = opaque;
+ struct intc_source *source = &(desc->sources[n]);
- if (level && !source->asserted)
- sh_intc_toggle_source(source, 0, 1);
- else if (!level && source->asserted)
- sh_intc_toggle_source(source, 0, -1);
+ if (level && !source->asserted)
+ sh_intc_toggle_source(source, 0, 1);
+ else if (!level && source->asserted)
+ sh_intc_toggle_source(source, 0, -1);
}
int sh_intc_get_pending_vector(struct intc_desc *desc, int imask)
@@ -236,7 +236,7 @@ static uint64_t sh_intc_read(void *opaque, hwaddr offset,
printf("sh_intc_read 0x%lx\n", (unsigned long) offset);
#endif
- sh_intc_locate(desc, (unsigned long)offset, &valuep,
+ sh_intc_locate(desc, (unsigned long)offset, &valuep,
&enum_ids, &first, &width, &mode);
return *valuep;
}
@@ -257,14 +257,20 @@ static void sh_intc_write(void *opaque, hwaddr offset,
printf("sh_intc_write 0x%lx 0x%08x\n", (unsigned long) offset, value);
#endif
- sh_intc_locate(desc, (unsigned long)offset, &valuep,
+ sh_intc_locate(desc, (unsigned long)offset, &valuep,
&enum_ids, &first, &width, &mode);
switch (mode) {
- case INTC_MODE_ENABLE_REG | INTC_MODE_IS_PRIO: break;
- case INTC_MODE_DUAL_SET: value |= *valuep; break;
- case INTC_MODE_DUAL_CLR: value = *valuep & ~value; break;
- default: abort();
+ case INTC_MODE_ENABLE_REG | INTC_MODE_IS_PRIO:
+ break;
+ case INTC_MODE_DUAL_SET:
+ value |= *valuep;
+ break;
+ case INTC_MODE_DUAL_CLR:
+ value = *valuep & ~value;
+ break;
+ default:
+ abort();
}
for (k = 0; k <= first; k++) {
@@ -465,7 +471,7 @@ int sh_intc_init(MemoryRegion *sysmem,
}
desc->irqs = qemu_allocate_irqs(sh_intc_set_irq, desc, nr_sources);
-
+
memory_region_init_io(&desc->iomem, NULL, &sh_intc_ops, desc,
"interrupt-controller", 0x100000000ULL);
@@ -507,7 +513,8 @@ void sh_intc_set_irl(void *opaque, int n, int level)
int i, irl = level ^ 15;
for (i = 0; (s = sh_intc_source(s->parent, s->next_enum_id)); i++) {
if (i == irl)
- sh_intc_toggle_source(s, s->enable_count?0:1, s->asserted?0:1);
+ sh_intc_toggle_source(s, s->enable_count ? 0 : 1,
+ s->asserted ? 0 : 1);
else
if (s->asserted)
sh_intc_toggle_source(s, 0, -1);