diff options
-rw-r--r-- | src/mainboard/apple/macbook21/smihandler.c | 20 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-q35/memmap.c | 8 | ||||
-rw-r--r-- | src/mainboard/google/auron/variants/samus/board_version.c | 20 | ||||
-rw-r--r-- | src/mainboard/lenovo/t420/smihandler.c | 38 | ||||
-rw-r--r-- | src/mainboard/lenovo/t60/smihandler.c | 74 | ||||
-rw-r--r-- | src/mainboard/roda/rk9/ti_pci7xx1.c | 10 |
6 files changed, 85 insertions, 85 deletions
diff --git a/src/mainboard/apple/macbook21/smihandler.c b/src/mainboard/apple/macbook21/smihandler.c index 7df92d9da2..f4c8ad229f 100644 --- a/src/mainboard/apple/macbook21/smihandler.c +++ b/src/mainboard/apple/macbook21/smihandler.c @@ -8,16 +8,16 @@ int mainboard_smi_apmc(u8 data) { switch (data) { - case APM_CNT_ACPI_ENABLE: - /* route H8SCI to SCI */ - gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); - break; - case APM_CNT_ACPI_DISABLE: - /* route H8SCI# to SMI */ - gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); - break; - default: - break; + case APM_CNT_ACPI_ENABLE: + /* route H8SCI to SCI */ + gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); + break; + case APM_CNT_ACPI_DISABLE: + /* route H8SCI# to SMI */ + gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); + break; + default: + break; } return 0; } diff --git a/src/mainboard/emulation/qemu-q35/memmap.c b/src/mainboard/emulation/qemu-q35/memmap.c index 3f3ced23f8..150ea113bd 100644 --- a/src/mainboard/emulation/qemu-q35/memmap.c +++ b/src/mainboard/emulation/qemu-q35/memmap.c @@ -15,10 +15,10 @@ static uint32_t encode_pciexbar_length(void) { switch (CONFIG_ECAM_MMCONF_BUS_NUMBER) { - case 256: return 0 << 1; - case 128: return 1 << 1; - case 64: return 2 << 1; - default: return dead_code_t(uint32_t); + case 256: return 0 << 1; + case 128: return 1 << 1; + case 64: return 2 << 1; + default: return dead_code_t(uint32_t); } } diff --git a/src/mainboard/google/auron/variants/samus/board_version.c b/src/mainboard/google/auron/variants/samus/board_version.c index 70e372ac71..1ee209d3d8 100644 --- a/src/mainboard/google/auron/variants/samus/board_version.c +++ b/src/mainboard/google/auron/variants/samus/board_version.c @@ -9,15 +9,15 @@ const char *samus_board_version(void) google_chromeec_get_board_version(&board_version); switch (board_version) { - case SAMUS_EC_BOARD_VERSION_EVT1: - return "EVT1"; - case SAMUS_EC_BOARD_VERSION_EVT2: - return "EVT2"; - case SAMUS_EC_BOARD_VERSION_EVT3: - return "EVT3"; - case SAMUS_EC_BOARD_VERSION_EVT4: - return "EVT4"; - default: - return "Unknown"; + case SAMUS_EC_BOARD_VERSION_EVT1: + return "EVT1"; + case SAMUS_EC_BOARD_VERSION_EVT2: + return "EVT2"; + case SAMUS_EC_BOARD_VERSION_EVT3: + return "EVT3"; + case SAMUS_EC_BOARD_VERSION_EVT4: + return "EVT4"; + default: + return "Unknown"; } } diff --git a/src/mainboard/lenovo/t420/smihandler.c b/src/mainboard/lenovo/t420/smihandler.c index e72ef43617..81cbc487f6 100644 --- a/src/mainboard/lenovo/t420/smihandler.c +++ b/src/mainboard/lenovo/t420/smihandler.c @@ -32,25 +32,25 @@ void mainboard_smi_gpi(u32 gpi_sts) int mainboard_smi_apmc(u8 data) { switch (data) { - case APM_CNT_ACPI_ENABLE: - /* use 0x1600/0x1604 to prevent races with userspace */ - ec_set_ports(0x1604, 0x1600); - /* route EC_SCI to SCI */ - gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); - /* discard all events, and enable attention */ - ec_write(0x80, 0x01); - break; - case APM_CNT_ACPI_DISABLE: - /* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't - provide a EC query function */ - ec_set_ports(0x66, 0x62); - /* route EC_SCI to SMI */ - gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); - /* discard all events, and enable attention */ - ec_write(0x80, 0x01); - break; - default: - break; + case APM_CNT_ACPI_ENABLE: + /* use 0x1600/0x1604 to prevent races with userspace */ + ec_set_ports(0x1604, 0x1600); + /* route EC_SCI to SCI */ + gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); + /* discard all events, and enable attention */ + ec_write(0x80, 0x01); + break; + case APM_CNT_ACPI_DISABLE: + /* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't + provide a EC query function */ + ec_set_ports(0x66, 0x62); + /* route EC_SCI to SMI */ + gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); + /* discard all events, and enable attention */ + ec_write(0x80, 0x01); + break; + default: + break; } return 0; } diff --git a/src/mainboard/lenovo/t60/smihandler.c b/src/mainboard/lenovo/t60/smihandler.c index e87362bd92..f3c34e51f0 100644 --- a/src/mainboard/lenovo/t60/smihandler.c +++ b/src/mainboard/lenovo/t60/smihandler.c @@ -112,28 +112,28 @@ static void mainboard_smi_handle_ec_sci(void) printk(BIOS_DEBUG, "EC event %#02x\n", event); switch (event) { - /* brightness up */ - case 0x14: - mainboard_smi_brightness_up(); - break; - /* brightness down */ - case 0x15: - mainboard_smi_brightness_down(); - break; - /* Fn-F9 Key */ - case 0x18: - /* power loss */ - case 0x27: - /* undock event */ - case 0x50: - mainboard_smi_dock_disconnect(); - break; - /* dock event */ - case 0x37: - mainboard_smi_dock_connect(); - break; - default: - break; + /* brightness up */ + case 0x14: + mainboard_smi_brightness_up(); + break; + /* brightness down */ + case 0x15: + mainboard_smi_brightness_down(); + break; + /* Fn-F9 Key */ + case 0x18: + /* power loss */ + case 0x27: + /* undock event */ + case 0x50: + mainboard_smi_dock_disconnect(); + break; + /* dock event */ + case 0x37: + mainboard_smi_dock_connect(); + break; + default: + break; } } @@ -146,21 +146,21 @@ void mainboard_smi_gpi(u32 gpi) int mainboard_smi_apmc(u8 data) { switch (data) { - case APM_CNT_ACPI_ENABLE: - /* use 0x1600/0x1604 to prevent races with userspace */ - ec_set_ports(0x1604, 0x1600); - /* route H8SCI to SCI */ - gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); - break; - case APM_CNT_ACPI_DISABLE: - /* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't - provide a EC query function */ - ec_set_ports(0x66, 0x62); - /* route H8SCI# to SMI */ - gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); - break; - default: - break; + case APM_CNT_ACPI_ENABLE: + /* use 0x1600/0x1604 to prevent races with userspace */ + ec_set_ports(0x1604, 0x1600); + /* route H8SCI to SCI */ + gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI); + break; + case APM_CNT_ACPI_DISABLE: + /* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't + provide a EC query function */ + ec_set_ports(0x66, 0x62); + /* route H8SCI# to SMI */ + gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI); + break; + default: + break; } return 0; } diff --git a/src/mainboard/roda/rk9/ti_pci7xx1.c b/src/mainboard/roda/rk9/ti_pci7xx1.c index a980f5c129..3ff339ce00 100644 --- a/src/mainboard/roda/rk9/ti_pci7xx1.c +++ b/src/mainboard/roda/rk9/ti_pci7xx1.c @@ -24,11 +24,11 @@ static void pci7xx1_enable(struct device *const dev) printk(BIOS_DEBUG, "%s: Hiding function #%d.\n", __func__, fn); switch (fn) { - case 1: gcr |= 1 << 4; break; /* CardBus B */ - case 2: gcr |= 1 << 3; break; /* OHCI 1394 */ - case 3: gcr |= 1 << 5; break; /* Flash media */ - case 4: gcr |= 1 << 6; break; /* SD card */ - case 5: gcr |= 1 << 7; break; /* Smart Card */ + case 1: gcr |= 1 << 4; break; /* CardBus B */ + case 2: gcr |= 1 << 3; break; /* OHCI 1394 */ + case 3: gcr |= 1 << 5; break; /* Flash media */ + case 4: gcr |= 1 << 6; break; /* SD card */ + case 5: gcr |= 1 << 7; break; /* Smart Card */ } } pci_write_config16(dev, 0x86, gcr); |