mainboard: Use same indent levels for switch/case

Use same indent levels for switch/case in order to comply with the
linter.

Change-Id: I602cf024ec84b15b783d36014c725826f9d6595e
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79418
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Singer 2023-12-08 10:52:34 +01:00 committed by Felix Singer
parent 6ff711c48f
commit df98b8168f
6 changed files with 85 additions and 85 deletions

View File

@ -8,16 +8,16 @@
int mainboard_smi_apmc(u8 data) int mainboard_smi_apmc(u8 data)
{ {
switch (data) { switch (data) {
case APM_CNT_ACPI_ENABLE: case APM_CNT_ACPI_ENABLE:
/* route H8SCI to SCI */ /* route H8SCI to SCI */
gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI);
break; break;
case APM_CNT_ACPI_DISABLE: case APM_CNT_ACPI_DISABLE:
/* route H8SCI# to SMI */ /* route H8SCI# to SMI */
gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI);
break; break;
default: default:
break; break;
} }
return 0; return 0;
} }

View File

@ -15,10 +15,10 @@
static uint32_t encode_pciexbar_length(void) static uint32_t encode_pciexbar_length(void)
{ {
switch (CONFIG_ECAM_MMCONF_BUS_NUMBER) { switch (CONFIG_ECAM_MMCONF_BUS_NUMBER) {
case 256: return 0 << 1; case 256: return 0 << 1;
case 128: return 1 << 1; case 128: return 1 << 1;
case 64: return 2 << 1; case 64: return 2 << 1;
default: return dead_code_t(uint32_t); default: return dead_code_t(uint32_t);
} }
} }

View File

@ -9,15 +9,15 @@ const char *samus_board_version(void)
google_chromeec_get_board_version(&board_version); google_chromeec_get_board_version(&board_version);
switch (board_version) { switch (board_version) {
case SAMUS_EC_BOARD_VERSION_EVT1: case SAMUS_EC_BOARD_VERSION_EVT1:
return "EVT1"; return "EVT1";
case SAMUS_EC_BOARD_VERSION_EVT2: case SAMUS_EC_BOARD_VERSION_EVT2:
return "EVT2"; return "EVT2";
case SAMUS_EC_BOARD_VERSION_EVT3: case SAMUS_EC_BOARD_VERSION_EVT3:
return "EVT3"; return "EVT3";
case SAMUS_EC_BOARD_VERSION_EVT4: case SAMUS_EC_BOARD_VERSION_EVT4:
return "EVT4"; return "EVT4";
default: default:
return "Unknown"; return "Unknown";
} }
} }

View File

@ -32,25 +32,25 @@ void mainboard_smi_gpi(u32 gpi_sts)
int mainboard_smi_apmc(u8 data) int mainboard_smi_apmc(u8 data)
{ {
switch (data) { switch (data) {
case APM_CNT_ACPI_ENABLE: case APM_CNT_ACPI_ENABLE:
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route EC_SCI to SCI */ /* route EC_SCI to SCI */
gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI);
/* discard all events, and enable attention */ /* discard all events, and enable attention */
ec_write(0x80, 0x01); ec_write(0x80, 0x01);
break; break;
case APM_CNT_ACPI_DISABLE: case APM_CNT_ACPI_DISABLE:
/* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't /* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't
provide a EC query function */ provide a EC query function */
ec_set_ports(0x66, 0x62); ec_set_ports(0x66, 0x62);
/* route EC_SCI to SMI */ /* route EC_SCI to SMI */
gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI);
/* discard all events, and enable attention */ /* discard all events, and enable attention */
ec_write(0x80, 0x01); ec_write(0x80, 0x01);
break; break;
default: default:
break; break;
} }
return 0; return 0;
} }

View File

@ -112,28 +112,28 @@ static void mainboard_smi_handle_ec_sci(void)
printk(BIOS_DEBUG, "EC event %#02x\n", event); printk(BIOS_DEBUG, "EC event %#02x\n", event);
switch (event) { switch (event) {
/* brightness up */ /* brightness up */
case 0x14: case 0x14:
mainboard_smi_brightness_up(); mainboard_smi_brightness_up();
break; break;
/* brightness down */ /* brightness down */
case 0x15: case 0x15:
mainboard_smi_brightness_down(); mainboard_smi_brightness_down();
break; break;
/* Fn-F9 Key */ /* Fn-F9 Key */
case 0x18: case 0x18:
/* power loss */ /* power loss */
case 0x27: case 0x27:
/* undock event */ /* undock event */
case 0x50: case 0x50:
mainboard_smi_dock_disconnect(); mainboard_smi_dock_disconnect();
break; break;
/* dock event */ /* dock event */
case 0x37: case 0x37:
mainboard_smi_dock_connect(); mainboard_smi_dock_connect();
break; break;
default: default:
break; break;
} }
} }
@ -146,21 +146,21 @@ void mainboard_smi_gpi(u32 gpi)
int mainboard_smi_apmc(u8 data) int mainboard_smi_apmc(u8 data)
{ {
switch (data) { switch (data) {
case APM_CNT_ACPI_ENABLE: case APM_CNT_ACPI_ENABLE:
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI);
break; break;
case APM_CNT_ACPI_DISABLE: case APM_CNT_ACPI_DISABLE:
/* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't /* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't
provide a EC query function */ provide a EC query function */
ec_set_ports(0x66, 0x62); ec_set_ports(0x66, 0x62);
/* route H8SCI# to SMI */ /* route H8SCI# to SMI */
gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI);
break; break;
default: default:
break; break;
} }
return 0; return 0;
} }

View File

@ -24,11 +24,11 @@ static void pci7xx1_enable(struct device *const dev)
printk(BIOS_DEBUG, printk(BIOS_DEBUG,
"%s: Hiding function #%d.\n", __func__, fn); "%s: Hiding function #%d.\n", __func__, fn);
switch (fn) { switch (fn) {
case 1: gcr |= 1 << 4; break; /* CardBus B */ case 1: gcr |= 1 << 4; break; /* CardBus B */
case 2: gcr |= 1 << 3; break; /* OHCI 1394 */ case 2: gcr |= 1 << 3; break; /* OHCI 1394 */
case 3: gcr |= 1 << 5; break; /* Flash media */ case 3: gcr |= 1 << 5; break; /* Flash media */
case 4: gcr |= 1 << 6; break; /* SD card */ case 4: gcr |= 1 << 6; break; /* SD card */
case 5: gcr |= 1 << 7; break; /* Smart Card */ case 5: gcr |= 1 << 7; break; /* Smart Card */
} }
} }
pci_write_config16(dev, 0x86, gcr); pci_write_config16(dev, 0x86, gcr);