summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-01-26 18:05:21 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-01-27 19:25:36 +0000
commitcbd5bb9cc755ad406e7e13572ff104af1f8b269d (patch)
treef3718fbd4fa9f6a1a8ab693e143b0b1b095d7ac3 /src/soc
parent78f52fb7d6cdc3bceef0a9a7c411253e136e5626 (diff)
soc/amd/picasso/chip: use switch/case statement in enable_dev()
The default case is only needed to make the compiler happy. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Idf54e7128f9e9d96f15ac7ab121f22621e033fac Reviewed-on: https://review.coreboot.org/c/coreboot/+/49941 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/picasso/chip.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c
index d31e94a277..91dd4c4956 100644
--- a/src/soc/amd/picasso/chip.c
+++ b/src/soc/amd/picasso/chip.c
@@ -82,12 +82,18 @@ static void set_mmio_dev_ops(struct device *dev)
static void enable_dev(struct device *dev)
{
/* Set the operations if it is a special bus type */
- if (dev->path.type == DEVICE_PATH_DOMAIN) {
+ switch (dev->path.type) {
+ case DEVICE_PATH_DOMAIN:
dev->ops = &pci_domain_ops;
- } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
+ break;
+ case DEVICE_PATH_CPU_CLUSTER:
dev->ops = &cpu_bus_ops;
- } else if (dev->path.type == DEVICE_PATH_MMIO) {
+ break;
+ case DEVICE_PATH_MMIO:
set_mmio_dev_ops(dev);
+ break;
+ default:
+ break;
}
}