src: Add required space after "switch"
Change-Id: I85cf93e30606bc7838852bd300a369e79370629a Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/29623 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
16f9bf83e0
commit
0ce41f1a11
|
@ -125,7 +125,7 @@ void trap_handler(trapframe *tf)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(tf->cause) {
|
switch (tf->cause) {
|
||||||
case CAUSE_MISALIGNED_FETCH:
|
case CAUSE_MISALIGNED_FETCH:
|
||||||
case CAUSE_FETCH_ACCESS:
|
case CAUSE_FETCH_ACCESS:
|
||||||
case CAUSE_ILLEGAL_INSTRUCTION:
|
case CAUSE_ILLEGAL_INSTRUCTION:
|
||||||
|
|
|
@ -73,7 +73,7 @@ static ucode_validity nano_ucode_is_valid(const nano_ucode_header *ucode)
|
||||||
|
|
||||||
static void nano_print_ucode_status(ucode_update_status stat)
|
static void nano_print_ucode_status(ucode_update_status stat)
|
||||||
{
|
{
|
||||||
switch(stat)
|
switch (stat)
|
||||||
{
|
{
|
||||||
case UCODE_UPDATE_SUCCESS:
|
case UCODE_UPDATE_SUCCESS:
|
||||||
printk(BIOS_INFO, "Microcode update successful.\n");
|
printk(BIOS_INFO, "Microcode update successful.\n");
|
||||||
|
|
|
@ -168,7 +168,7 @@ const char *dev_path(const struct device *dev)
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
memcpy(buffer, "<null>", 7);
|
memcpy(buffer, "<null>", 7);
|
||||||
} else {
|
} else {
|
||||||
switch(dev->path.type) {
|
switch (dev->path.type) {
|
||||||
case DEVICE_PATH_NONE:
|
case DEVICE_PATH_NONE:
|
||||||
memcpy(buffer, "NONE", 5);
|
memcpy(buffer, "NONE", 5);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -195,7 +195,7 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print stuff for diagnostic purposes */
|
/* Print stuff for diagnostic purposes */
|
||||||
switch(ast->tx_chip_type) {
|
switch (ast->tx_chip_type) {
|
||||||
case AST_TX_SIL164:
|
case AST_TX_SIL164:
|
||||||
DRM_INFO("Using Sil164 TMDS transmitter\n");
|
DRM_INFO("Using Sil164 TMDS transmitter\n");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -379,7 +379,7 @@ int xgifb_modeset(struct pci_dev *pdev, struct xgifb_video_info *xgifb_info)
|
||||||
|
|
||||||
xgi_fb.reserved_mask_pos = 0;
|
xgi_fb.reserved_mask_pos = 0;
|
||||||
xgi_fb.reserved_mask_size = 0;
|
xgi_fb.reserved_mask_size = 0;
|
||||||
switch(xgifb_info->video_bpp){
|
switch (xgifb_info->video_bpp) {
|
||||||
case 32:
|
case 32:
|
||||||
case 24:
|
case 24:
|
||||||
/* packed into 4-byte words */
|
/* packed into 4-byte words */
|
||||||
|
|
|
@ -91,7 +91,7 @@ static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigP
|
||||||
TempData8 |= Data8;
|
TempData8 |= Data8;
|
||||||
Write64Mem8(GpioMmioAddr+SB_GPIO_REG179, TempData8);
|
Write64Mem8(GpioMmioAddr+SB_GPIO_REG179, TempData8);
|
||||||
|
|
||||||
switch(MemData->ParameterListPtr->DDR3Voltage){
|
switch (MemData->ParameterListPtr->DDR3Voltage) {
|
||||||
case VOLT1_35:
|
case VOLT1_35:
|
||||||
Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178);
|
Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178);
|
||||||
Data8 &= ~(UINT8)BIT6;
|
Data8 &= ~(UINT8)BIT6;
|
||||||
|
|
|
@ -150,7 +150,7 @@ unsigned long mainboard_write_acpi_tables(struct device *device,
|
||||||
current = ALIGN(current, 8);
|
current = ALIGN(current, 8);
|
||||||
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); /* pci0 and pci1 are in dsdt */
|
printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c at %lx\n", c, current); /* pci0 and pci1 are in dsdt */
|
||||||
ssdtx = (acpi_header_t *)current;
|
ssdtx = (acpi_header_t *)current;
|
||||||
switch(sysconf.hcid[i]) {
|
switch (sysconf.hcid[i]) {
|
||||||
case 1:
|
case 1:
|
||||||
file_name = CONFIG_CBFS_PREFIX "/ssdt2.aml";
|
file_name = CONFIG_CBFS_PREFIX "/ssdt2.aml";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -151,7 +151,7 @@ void get_bus_conf(void)
|
||||||
/* check hcid type here */
|
/* check hcid type here */
|
||||||
sysconf.hcid[i] = get_hcid(i);
|
sysconf.hcid[i] = get_hcid(i);
|
||||||
|
|
||||||
switch(sysconf.hcid[i]) {
|
switch (sysconf.hcid[i]) {
|
||||||
|
|
||||||
case 1: /* 8132 */
|
case 1: /* 8132 */
|
||||||
case 3: /* 8131 */
|
case 3: /* 8131 */
|
||||||
|
|
|
@ -70,7 +70,7 @@ static void *smp_write_config_table(void *v)
|
||||||
if (!(sysconf.pci1234[i] & 0x1))
|
if (!(sysconf.pci1234[i] & 0x1))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch(sysconf.hcid[i]) {
|
switch (sysconf.hcid[i]) {
|
||||||
case 1:
|
case 1:
|
||||||
case 3:
|
case 3:
|
||||||
dev = dev_find_slot(m->bus_8132a[j][0], PCI_DEVFN(m->sbdn3a[j], 1));
|
dev = dev_find_slot(m->bus_8132a[j][0], PCI_DEVFN(m->sbdn3a[j], 1));
|
||||||
|
@ -137,7 +137,7 @@ static void *smp_write_config_table(void *v)
|
||||||
int jj;
|
int jj;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
switch(sysconf.hcid[i]) {
|
switch (sysconf.hcid[i]) {
|
||||||
case 1:
|
case 1:
|
||||||
case 3:
|
case 3:
|
||||||
dev = dev_find_slot(m->bus_8132a[j][0], PCI_DEVFN(m->sbdn3a[j], 1));
|
dev = dev_find_slot(m->bus_8132a[j][0], PCI_DEVFN(m->sbdn3a[j], 1));
|
||||||
|
|
|
@ -63,7 +63,7 @@ static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigP
|
||||||
AcpiMmioAddr = (UINT32)Data16 << 16;
|
AcpiMmioAddr = (UINT32)Data16 << 16;
|
||||||
GpioMmioAddr = AcpiMmioAddr + GPIO_BASE;
|
GpioMmioAddr = AcpiMmioAddr + GPIO_BASE;
|
||||||
|
|
||||||
switch(MemData->ParameterListPtr->DDR3Voltage){
|
switch (MemData->ParameterListPtr->DDR3Voltage) {
|
||||||
case VOLT1_35:
|
case VOLT1_35:
|
||||||
Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178);
|
Data8 = Read64Mem8 (GpioMmioAddr+SB_GPIO_REG178);
|
||||||
Data8 &= ~(UINT8)BIT6;
|
Data8 &= ~(UINT8)BIT6;
|
||||||
|
|
|
@ -49,7 +49,7 @@ int mainboard_io_trap_handler(int smif)
|
||||||
|
|
||||||
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);
|
||||||
|
|
|
@ -161,7 +161,7 @@ static int run(int index)
|
||||||
return index;
|
return index;
|
||||||
/* state machine! */
|
/* state machine! */
|
||||||
for(i = index, id = &iodefs[i]; id->op; i++, id++){
|
for(i = index, id = &iodefs[i]; id->op; i++, id++){
|
||||||
switch(id->op){
|
switch (id->op) {
|
||||||
case M:
|
case M:
|
||||||
if (verbose & vmsg) printk(BIOS_SPEW, "%ld: %s\n",
|
if (verbose & vmsg) printk(BIOS_SPEW, "%ld: %s\n",
|
||||||
globalmicroseconds(), id->msg);
|
globalmicroseconds(), id->msg);
|
||||||
|
@ -193,7 +193,7 @@ static int run(int index)
|
||||||
if (id->addr == PCH_PP_CONTROL){
|
if (id->addr == PCH_PP_CONTROL){
|
||||||
if (verbose & vio)
|
if (verbose & vio)
|
||||||
printk(BIOS_SPEW, "PCH_PP_CONTROL\n");
|
printk(BIOS_SPEW, "PCH_PP_CONTROL\n");
|
||||||
switch(id->data & 0xf){
|
switch (id->data & 0xf) {
|
||||||
case 8: break;
|
case 8: break;
|
||||||
case 7: break;
|
case 7: break;
|
||||||
default: udelay(100000);
|
default: udelay(100000);
|
||||||
|
|
|
@ -58,7 +58,7 @@ static int int15_handler(void)
|
||||||
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
|
||||||
__func__, X86_AX);
|
__func__, X86_AX);
|
||||||
|
|
||||||
switch(X86_AX) {
|
switch (X86_AX) {
|
||||||
case 0x5f34:
|
case 0x5f34:
|
||||||
/*
|
/*
|
||||||
* Set Panel Fitting Hook:
|
* Set Panel Fitting Hook:
|
||||||
|
|
|
@ -39,7 +39,7 @@ static int int15_handler(void)
|
||||||
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||||
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
__func__, X86_AX, X86_BX, X86_CX, X86_DX);
|
||||||
|
|
||||||
switch(X86_EAX & 0xffff) {
|
switch (X86_EAX & 0xffff) {
|
||||||
case 0x5f34:
|
case 0x5f34:
|
||||||
/*
|
/*
|
||||||
* Set Panel Fitting Hook:
|
* Set Panel Fitting Hook:
|
||||||
|
|
|
@ -119,7 +119,7 @@ static void mainboard_smi_handle_ec_sci(void)
|
||||||
event = ec_query();
|
event = ec_query();
|
||||||
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();
|
||||||
|
@ -153,7 +153,7 @@ 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);
|
||||||
|
|
|
@ -121,7 +121,7 @@ static void mainboard_smi_handle_ec_sci(void)
|
||||||
event = ec_query();
|
event = ec_query();
|
||||||
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();
|
||||||
|
@ -158,7 +158,7 @@ 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);
|
||||||
|
|
|
@ -121,7 +121,7 @@ static void mainboard_smi_handle_ec_sci(void)
|
||||||
event = ec_query();
|
event = ec_query();
|
||||||
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();
|
||||||
|
@ -155,7 +155,7 @@ 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);
|
||||||
|
|
|
@ -126,7 +126,7 @@ u32 map_oprom_vendev(u32 vendev)
|
||||||
{
|
{
|
||||||
u32 new_vendev = vendev;
|
u32 new_vendev = vendev;
|
||||||
|
|
||||||
switch(vendev) {
|
switch (vendev) {
|
||||||
case 0x10029809:
|
case 0x10029809:
|
||||||
case 0x10029808:
|
case 0x10029808:
|
||||||
case 0x10029807:
|
case 0x10029807:
|
||||||
|
|
|
@ -964,7 +964,7 @@ u32 map_oprom_vendev(u32 vendev)
|
||||||
{
|
{
|
||||||
u32 new_vendev = vendev;
|
u32 new_vendev = vendev;
|
||||||
|
|
||||||
switch(vendev) {
|
switch (vendev) {
|
||||||
case 0x10029900: /* AMD Radeon HD 7660G (Trinity) */
|
case 0x10029900: /* AMD Radeon HD 7660G (Trinity) */
|
||||||
case 0x10029901: /* AMD Radeon HD 7660D (Trinity) */
|
case 0x10029901: /* AMD Radeon HD 7660D (Trinity) */
|
||||||
case 0x10029903: /* AMD Radeon HD 7640G (Trinity) */
|
case 0x10029903: /* AMD Radeon HD 7640G (Trinity) */
|
||||||
|
|
|
@ -989,7 +989,7 @@ u32 map_oprom_vendev(u32 vendev)
|
||||||
{
|
{
|
||||||
u32 new_vendev = vendev;
|
u32 new_vendev = vendev;
|
||||||
|
|
||||||
switch(vendev) {
|
switch (vendev) {
|
||||||
case 0x10029830:
|
case 0x10029830:
|
||||||
case 0x10029831:
|
case 0x10029831:
|
||||||
case 0x10029832:
|
case 0x10029832:
|
||||||
|
|
|
@ -1252,7 +1252,7 @@ static void ht1SetCFGAddrMap(u8 cfgMapIndex, u8 secBus, u8 subBus, u8 targetNode
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
static u8 convertBitsToWidth(u8 value, cNorthBridge *nb)
|
static u8 convertBitsToWidth(u8 value, cNorthBridge *nb)
|
||||||
{
|
{
|
||||||
switch(value) {
|
switch (value) {
|
||||||
case 1: return 16;
|
case 1: return 16;
|
||||||
case 0: return 8;
|
case 0: return 8;
|
||||||
case 5: return 4;
|
case 5: return 4;
|
||||||
|
|
|
@ -132,7 +132,7 @@ static void AMD_CB_EventNotify (u8 evtClass, u16 event, const u8 *pEventData0)
|
||||||
}
|
}
|
||||||
printk(log_level, ": ");
|
printk(log_level, ": ");
|
||||||
|
|
||||||
switch(event) {
|
switch (event) {
|
||||||
case HT_EVENT_COH_EVENTS:
|
case HT_EVENT_COH_EVENTS:
|
||||||
case HT_EVENT_COH_NO_TOPOLOGY:
|
case HT_EVENT_COH_NO_TOPOLOGY:
|
||||||
case HT_EVENT_COH_LINK_EXCEED:
|
case HT_EVENT_COH_LINK_EXCEED:
|
||||||
|
|
|
@ -820,7 +820,7 @@ static void program_dll(struct sysinfo *s)
|
||||||
FOR_EACH_POPULATED_CHANNEL(s->dimms, i) {
|
FOR_EACH_POPULATED_CHANNEL(s->dimms, i) {
|
||||||
const struct dll_setting *setting;
|
const struct dll_setting *setting;
|
||||||
|
|
||||||
switch(s->selected_timings.mem_clk) {
|
switch (s->selected_timings.mem_clk) {
|
||||||
default: /* Should not happen */
|
default: /* Should not happen */
|
||||||
case MEM_CLOCK_667MHz:
|
case MEM_CLOCK_667MHz:
|
||||||
setting = default_ddr2_667_ctrl;
|
setting = default_ddr2_667_ctrl;
|
||||||
|
|
|
@ -101,7 +101,7 @@ static void save_dimm_info(void)
|
||||||
if (src_dimm->Status != DIMM_PRESENT)
|
if (src_dimm->Status != DIMM_PRESENT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch(memory_info_hob->MemoryType) {
|
switch (memory_info_hob->MemoryType) {
|
||||||
case MRC_DDR_TYPE_DDR4:
|
case MRC_DDR_TYPE_DDR4:
|
||||||
ddr_type = MEMORY_TYPE_DDR4;
|
ddr_type = MEMORY_TYPE_DDR4;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -29,7 +29,7 @@ static void f71863fg_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case F71863FG_KBC:
|
case F71863FG_KBC:
|
||||||
res0 = find_resource(dev, PNP_IDX_IO0);
|
res0 = find_resource(dev, PNP_IDX_IO0);
|
||||||
|
|
|
@ -30,7 +30,7 @@ static void f71869ad_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case F71869AD_KBC:
|
case F71869AD_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
|
|
|
@ -28,7 +28,7 @@ static void f71872_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case F71872_KBC:
|
case F71872_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
|
|
|
@ -38,7 +38,7 @@ static void pnp_exit_conf_state(pnp_devfn_t dev)
|
||||||
void f81216h_enable_serial(pnp_devfn_t dev, u16 iobase, mode_key k)
|
void f81216h_enable_serial(pnp_devfn_t dev, u16 iobase, mode_key k)
|
||||||
{
|
{
|
||||||
u8 key;
|
u8 key;
|
||||||
switch(k) {
|
switch (k) {
|
||||||
case MODE_6767:
|
case MODE_6767:
|
||||||
key = 0x67;
|
key = 0x67;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -40,7 +40,7 @@ static void pnp_enter_ext_func_mode(struct device *dev)
|
||||||
*
|
*
|
||||||
* See page 17 of data sheet.
|
* See page 17 of data sheet.
|
||||||
*/
|
*/
|
||||||
switch(conf->conf_key_mode) {
|
switch (conf->conf_key_mode) {
|
||||||
case MODE_6767:
|
case MODE_6767:
|
||||||
case MODE_7777:
|
case MODE_7777:
|
||||||
case MODE_8787:
|
case MODE_8787:
|
||||||
|
@ -74,7 +74,7 @@ static void f81216h_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case F81216H_SP1:
|
case F81216H_SP1:
|
||||||
case F81216H_SP2:
|
case F81216H_SP2:
|
||||||
case F81216H_SP3:
|
case F81216H_SP3:
|
||||||
|
|
|
@ -33,7 +33,7 @@ static void it8728f_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for FDC etc. */
|
/* TODO: Might potentially need code for FDC etc. */
|
||||||
case IT8728F_EC:
|
case IT8728F_EC:
|
||||||
res = find_resource(dev, PNP_IDX_IO0);
|
res = find_resource(dev, PNP_IDX_IO0);
|
||||||
|
|
|
@ -28,7 +28,7 @@ static void init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case PC87360_KBCK:
|
case PC87360_KBCK:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -28,7 +28,7 @@ static void init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case PC87366_KBCK:
|
case PC87366_KBCK:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -26,7 +26,7 @@ static void init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case PC87382_DOCK:
|
case PC87382_DOCK:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ static void init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case PC87417_KBCK:
|
case PC87417_KBCK:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -26,7 +26,7 @@ static void init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case PC97317_KBCK:
|
case PC97317_KBCK:
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
pnp_set_enable(dev, 0); /* Disable keyboard */
|
pnp_set_enable(dev, 0); /* Disable keyboard */
|
||||||
|
|
|
@ -30,7 +30,7 @@ static void set_irq_trigger_type(struct device *dev, bool trig_level)
|
||||||
reg26 |= CR26_LOCK_REG;
|
reg26 |= CR26_LOCK_REG;
|
||||||
pnp_write_config(dev, GLOBAL_OPTION_CR26, reg26);
|
pnp_write_config(dev, GLOBAL_OPTION_CR26, reg26);
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
//SP1 (UARTA) IRQ type selection (1:level,0:edge) is controlled by CR 10, bit 5
|
//SP1 (UARTA) IRQ type selection (1:level,0:edge) is controlled by CR 10, bit 5
|
||||||
case NCT5104D_SP1:
|
case NCT5104D_SP1:
|
||||||
reg10 = pnp_read_config(dev, IRQ_TYPE_SEL_CR10);
|
reg10 = pnp_read_config(dev, IRQ_TYPE_SEL_CR10);
|
||||||
|
@ -116,7 +116,7 @@ static void nct5104d_init(struct device *dev)
|
||||||
|
|
||||||
pnp_enter_conf_mode(dev);
|
pnp_enter_conf_mode(dev);
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case NCT5104D_SP1:
|
case NCT5104D_SP1:
|
||||||
case NCT5104D_SP2:
|
case NCT5104D_SP2:
|
||||||
set_irq_trigger_type(dev, conf->irq_trigger_type != 0);
|
set_irq_trigger_type(dev, conf->irq_trigger_type != 0);
|
||||||
|
|
|
@ -44,7 +44,7 @@ static void nct5572d_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case NCT5572D_KBC:
|
case NCT5572D_KBC:
|
||||||
/* Enable mouse controller */
|
/* Enable mouse controller */
|
||||||
|
|
|
@ -32,7 +32,7 @@ static void nct6779d_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case NCT6779D_KBC:
|
case NCT6779D_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
|
|
|
@ -28,7 +28,7 @@ static void init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case WPCM450_KBCK:
|
case WPCM450_KBCK:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -32,7 +32,7 @@ static void dme1737_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case DME1737_KBC:
|
case DME1737_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static void lpc47b272_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47B272_KBC:
|
case LPC47B272_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static void lpc47b397_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47B397_KBC:
|
case LPC47B397_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
@ -55,7 +55,7 @@ static void lpc47b397_pnp_enable_resources(struct device *dev)
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
|
|
||||||
pnp_enter_conf_mode(dev);
|
pnp_enter_conf_mode(dev);
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47B397_HWM:
|
case LPC47B397_HWM:
|
||||||
printk(BIOS_DEBUG, "LPC47B397 SensorBus register access enabled\n");
|
printk(BIOS_DEBUG, "LPC47B397 SensorBus register access enabled\n");
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
|
|
|
@ -41,7 +41,7 @@ static void lpc47m10x_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47M10X2_KBC:
|
case LPC47M10X2_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -63,7 +63,7 @@ static void lpc47m15x_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47M15X_KBC:
|
case LPC47M15X_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static void lpc47n217_pnp_set_iobase(pnp_devfn_t dev, u16 iobase)
|
||||||
/* LPC47N217 requires base ports to be a multiple of 4. */
|
/* LPC47N217 requires base ports to be a multiple of 4. */
|
||||||
ASSERT(!(iobase & 0x3));
|
ASSERT(!(iobase & 0x3));
|
||||||
|
|
||||||
switch(dev & 0xFF) {
|
switch (dev & 0xFF) {
|
||||||
case LPC47N217_PP:
|
case LPC47N217_PP:
|
||||||
pnp_write_config(dev, 0x23, (iobase >> 2) & 0xff);
|
pnp_write_config(dev, 0x23, (iobase >> 2) & 0xff);
|
||||||
break;
|
break;
|
||||||
|
@ -74,7 +74,7 @@ static void lpc47n217_pnp_set_enable(pnp_devfn_t dev, int enable)
|
||||||
{
|
{
|
||||||
u8 power_register = 0, power_mask = 0, current_power, new_power;
|
u8 power_register = 0, power_mask = 0, current_power, new_power;
|
||||||
|
|
||||||
switch(dev & 0xFF) {
|
switch (dev & 0xFF) {
|
||||||
case LPC47N217_PP:
|
case LPC47N217_PP:
|
||||||
power_register = 0x01;
|
power_register = 0x01;
|
||||||
power_mask = 0x04;
|
power_mask = 0x04;
|
||||||
|
|
|
@ -163,7 +163,7 @@ static void lpc47n217_pnp_set_iobase(struct device *dev, u16 iobase)
|
||||||
{
|
{
|
||||||
ASSERT(!(iobase & 0x3));
|
ASSERT(!(iobase & 0x3));
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47N217_PP:
|
case LPC47N217_PP:
|
||||||
pnp_write_config(dev, 0x23, (iobase >> 2) & 0xff);
|
pnp_write_config(dev, 0x23, (iobase >> 2) & 0xff);
|
||||||
break;
|
break;
|
||||||
|
@ -201,7 +201,7 @@ static void lpc47n217_pnp_set_irq(struct device *dev, u8 irq)
|
||||||
u8 irq_config_register = 0, irq_config_mask = 0;
|
u8 irq_config_register = 0, irq_config_mask = 0;
|
||||||
u8 current_config, new_config;
|
u8 current_config, new_config;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47N217_PP:
|
case LPC47N217_PP:
|
||||||
irq_config_register = 0x27;
|
irq_config_register = 0x27;
|
||||||
irq_config_mask = 0x0F;
|
irq_config_mask = 0x0F;
|
||||||
|
@ -231,7 +231,7 @@ static void lpc47n217_pnp_set_enable(struct device *dev, int enable)
|
||||||
{
|
{
|
||||||
u8 power_register = 0, power_mask = 0, current_power, new_power;
|
u8 power_register = 0, power_mask = 0, current_power, new_power;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case LPC47N217_PP:
|
case LPC47N217_PP:
|
||||||
power_register = 0x01;
|
power_register = 0x01;
|
||||||
power_mask = 0x04;
|
power_mask = 0x04;
|
||||||
|
|
|
@ -31,7 +31,7 @@ static void mec1308_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case MEC1308_KBC:
|
case MEC1308_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -30,7 +30,7 @@ static void sch4037_init(struct device *dev)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case SCH4037_KBC:
|
case SCH4037_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -38,7 +38,7 @@ static void w83627dhg_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case W83627DHG_SP2:
|
case W83627DHG_SP2:
|
||||||
w83627dhg_enable_UR2(dev);
|
w83627dhg_enable_UR2(dev);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -83,7 +83,7 @@ static void w83627ehg_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case W83627EHG_KBC:
|
case W83627EHG_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -90,7 +90,7 @@ static void w83627hf_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case W83627HF_KBC:
|
case W83627HF_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
@ -110,7 +110,7 @@ static void w83627hf_pnp_enable_resources(struct device *dev)
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
|
|
||||||
pnp_enter_conf_mode(dev);
|
pnp_enter_conf_mode(dev);
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case W83627HF_HWM:
|
case W83627HF_HWM:
|
||||||
printk(BIOS_DEBUG, "W83627HF HWM SMBus enabled\n");
|
printk(BIOS_DEBUG, "W83627HF HWM SMBus enabled\n");
|
||||||
enable_hwm_smbus(dev);
|
enable_hwm_smbus(dev);
|
||||||
|
|
|
@ -30,7 +30,7 @@ static void w83627thg_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case W83627THG_KBC:
|
case W83627THG_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -58,7 +58,7 @@ static void w83627uhg_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case W83627UHG_SP1:
|
case W83627UHG_SP1:
|
||||||
set_uart_clock_source(dev, 0);
|
set_uart_clock_source(dev, 0);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -44,7 +44,7 @@ static void w83667hg_a_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
/* TODO: Might potentially need code for HWM or FDC etc. */
|
/* TODO: Might potentially need code for HWM or FDC etc. */
|
||||||
case W83667HG_A_KBC:
|
case W83667HG_A_KBC:
|
||||||
/* Enable mouse controller */
|
/* Enable mouse controller */
|
||||||
|
|
|
@ -31,7 +31,7 @@ static void w83977tf_init(struct device *dev)
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(dev->path.pnp.device) {
|
switch (dev->path.pnp.device) {
|
||||||
case W83977TF_KBC:
|
case W83977TF_KBC:
|
||||||
pc_keyboard_init(NO_AUX_DEVICE);
|
pc_keyboard_init(NO_AUX_DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue