From e8fcf1bf8df1e94f84a15815343660360cd12299 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Mon, 30 Mar 2020 16:47:28 +0200 Subject: superio/winbond: Improve code formatting Change-Id: Ia63e21b957d89690f36929f9ffbe8a7bf8f0e84c Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/39932 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Angel Pons --- src/superio/winbond/w83627dhg/acpi/superio.asl | 8 +- src/superio/winbond/w83627dhg/w83627dhg.h | 24 ++-- src/superio/winbond/w83627ehg/w83627ehg.h | 22 ++-- src/superio/winbond/w83627hf/acpi/superio.asl | 160 ++++++++++++------------- src/superio/winbond/w83977tf/acpi/superio.asl | 18 +-- 5 files changed, 116 insertions(+), 116 deletions(-) diff --git a/src/superio/winbond/w83627dhg/acpi/superio.asl b/src/superio/winbond/w83627dhg/acpi/superio.asl index f86f16946e..ea4aebafd2 100644 --- a/src/superio/winbond/w83627dhg/acpi/superio.asl +++ b/src/superio/winbond/w83627dhg/acpi/superio.asl @@ -50,7 +50,7 @@ Device(SUPERIO_DEV) { Field (CREG, ByteAcc, NoLock, Preserve) { PNP_ADDR_REG, 8, - PNP_DATA_REG, 8 + PNP_DATA_REG, 8 } IndexField (PNP_ADDR_REG, PNP_DATA_REG, ByteAcc, NoLock, Preserve) { @@ -118,14 +118,14 @@ Device(SUPERIO_DEV) { Else { Return (0) } } - /* PM: Switch to D0 by setting IPD low */ + /* PM: Switch to D0 by setting IPD low */ Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) Store (Zero, IPD) EXIT_CONFIG_MODE () } - /* PM: Switch to D3 by setting IPD high */ + /* PM: Switch to D3 by setting IPD high */ Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) Store (One, IPD) @@ -133,7 +133,7 @@ Device(SUPERIO_DEV) { } /* Suspend LED: Write given three-bit value into appropriate register. - From the datasheet: + From the datasheet: 000 - drive pin constantly high 001 - drive 0.5Hz pulses 010 - drive pin constantly low diff --git a/src/superio/winbond/w83627dhg/w83627dhg.h b/src/superio/winbond/w83627dhg/w83627dhg.h index 889c4f1bed..8d7c4a9651 100644 --- a/src/superio/winbond/w83627dhg/w83627dhg.h +++ b/src/superio/winbond/w83627dhg/w83627dhg.h @@ -6,20 +6,20 @@ #include -#define W83627DHG_FDC 0 /* Floppy */ -#define W83627DHG_PP 1 /* Parallel port */ -#define W83627DHG_SP1 2 /* Com1 */ -#define W83627DHG_SP2 3 /* Com2 */ -#define W83627DHG_KBC 5 /* PS/2 keyboard & mouse */ -#define W83627DHG_SPI 6 /* Serial peripheral interface */ -#define W83627DHG_WDTO_PLED 8 /* WDTO#, PLED */ -#define W83627DHG_ACPI 10 /* ACPI */ -#define W83627DHG_HWM 11 /* Hardware monitor */ -#define W83627DHG_PECI_SST 12 /* PECI, SST */ +#define W83627DHG_FDC 0 /* Floppy */ +#define W83627DHG_PP 1 /* Parallel port */ +#define W83627DHG_SP1 2 /* Com1 */ +#define W83627DHG_SP2 3 /* Com2 */ +#define W83627DHG_KBC 5 /* PS/2 keyboard & mouse */ +#define W83627DHG_SPI 6 /* Serial peripheral interface */ +#define W83627DHG_WDTO_PLED 8 /* WDTO#, PLED */ +#define W83627DHG_ACPI 10 /* ACPI */ +#define W83627DHG_HWM 11 /* Hardware monitor */ +#define W83627DHG_PECI_SST 12 /* PECI, SST */ /* The following are handled using "virtual LDNs" (hence the _V suffix). */ -#define W83627DHG_GPIO6_V 7 /* GPIO6 */ -#define W83627DHG_GPIO2345_V 9 /* GPIO2, GPIO3, GPIO4, GPIO5 */ +#define W83627DHG_GPIO6_V 7 /* GPIO6 */ +#define W83627DHG_GPIO2345_V 9 /* GPIO2, GPIO3, GPIO4, GPIO5 */ /* * Virtual devices sharing the enables are encoded as follows: diff --git a/src/superio/winbond/w83627ehg/w83627ehg.h b/src/superio/winbond/w83627ehg/w83627ehg.h index 1dc7376c04..c22c7dbe98 100644 --- a/src/superio/winbond/w83627ehg/w83627ehg.h +++ b/src/superio/winbond/w83627ehg/w83627ehg.h @@ -4,19 +4,19 @@ #ifndef SUPERIO_WINBOND_W83627EHG_H #define SUPERIO_WINBOND_W83627EHG_H -#define W83627EHG_FDC 0 /* Floppy */ -#define W83627EHG_PP 1 /* Parallel port */ -#define W83627EHG_SP1 2 /* Com1 */ -#define W83627EHG_SP2 3 /* Com2 */ -#define W83627EHG_KBC 5 /* PS/2 keyboard & mouse */ -#define W83627EHG_WDTO_PLED 8 /* Watchdog timer timeout, power LED */ -#define W83627EHG_ACPI 10 /* ACPI */ -#define W83627EHG_HWM 11 /* Hardware monitor */ +#define W83627EHG_FDC 0 /* Floppy */ +#define W83627EHG_PP 1 /* Parallel port */ +#define W83627EHG_SP1 2 /* Com1 */ +#define W83627EHG_SP2 3 /* Com2 */ +#define W83627EHG_KBC 5 /* PS/2 keyboard & mouse */ +#define W83627EHG_WDTO_PLED 8 /* Watchdog timer timeout, power LED */ +#define W83627EHG_ACPI 10 /* ACPI */ +#define W83627EHG_HWM 11 /* Hardware monitor */ /* The following are handled using "virtual LDNs" (hence the _V suffix). */ -#define W83627EHG_SFI_V 6 /* Serial flash interface (SFI) */ -#define W83627EHG_GPIO_GAME_MIDI_V 7 /* GPIO1, GPIO6, game port, MIDI */ -#define W83627EHG_GPIO_SUSLED_V 9 /* GPIO2, GPIO3, GPIO4, GPIO5, SUSLED */ +#define W83627EHG_SFI_V 6 /* Serial flash interface (SFI) */ +#define W83627EHG_GPIO_GAME_MIDI_V 7 /* GPIO1, GPIO6, game port, MIDI */ +#define W83627EHG_GPIO_SUSLED_V 9 /* GPIO2, GPIO3, GPIO4, GPIO5, SUSLED */ /* * Virtual devices sharing the enables are encoded as follows: diff --git a/src/superio/winbond/w83627hf/acpi/superio.asl b/src/superio/winbond/w83627hf/acpi/superio.asl index 8f1861259a..4d2fd2d5d3 100644 --- a/src/superio/winbond/w83627hf/acpi/superio.asl +++ b/src/superio/winbond/w83627hf/acpi/superio.asl @@ -57,83 +57,83 @@ Device(SIO) { OperationRegion (CREG, SystemIO, SUPERIO_PNP_BASE, 0x02) Field (CREG, ByteAcc, NoLock, Preserve) { - PNP_ADDR_REG, 8, - PNP_DATA_REG, 8 + PNP_ADDR_REG, 8, + PNP_DATA_REG, 8 } IndexField (PNP_ADDR_REG, PNP_DATA_REG, ByteAcc, NoLock, Preserve) { Offset (0x02), - RST, 1, /* Soft reset */ - , 7, + RST, 1, /* Soft reset */ + , 7, Offset (0x07), - LDN, 8, /* Logical device selector */ + LDN, 8, /* Logical device selector */ Offset (0x20), - DID, 8, /* Device ID */ - DREV, 8, /* Device Revision */ - FDPW, 1, /* FDC Power Down */ - , 2, - PRPW, 1, /* PRT Power Down */ - UAPW, 1, /* UART A Power Down */ - UBPW, 1, /* UART B Power Down */ - HWPW, 1, /* HWM Power Down */ - , 1, - IPD, 1, /* Immediate Chip Power Down */ - , 7, - PNPS, 1, /* PnP Address Select Register Default Value Mode */ - , 1, - KBCR, 1, /* KBC enabled after system reset (read-only) */ - , 3, - CLKS, 1, /* Clock select */ - AQ16, 1, /* 16bit Address Qualification */ - FDCT, 1, /* Tristate FDC (?) */ - , 2, - PRTT, 1, /* Tristate parallel port (?) */ - URAT, 1, /* Tristate UART A (?) */ - URBT, 1, /* Tristate UART B (?) */ - , 2, - URAI, 1, /* UART A Legacy IRQ Select Disable */ - URBI, 1, /* UART B Legacy IRQ Select Disable */ - PRTI, 1, /* Parallel Port Legacy IRQ/DRQ Select Disable */ - FDCI, 1, /* FDC Legacy IRQ/DRQ Select Disable */ - , 1, - LCKC, 1, /* Lock Configuration Registers */ + DID, 8, /* Device ID */ + DREV, 8, /* Device Revision */ + FDPW, 1, /* FDC Power Down */ + , 2, + PRPW, 1, /* PRT Power Down */ + UAPW, 1, /* UART A Power Down */ + UBPW, 1, /* UART B Power Down */ + HWPW, 1, /* HWM Power Down */ + , 1, + IPD, 1, /* Immediate Chip Power Down */ + , 7, + PNPS, 1, /* PnP Address Select Register Default Value Mode */ + , 1, + KBCR, 1, /* KBC enabled after system reset (read-only) */ + , 3, + CLKS, 1, /* Clock select */ + AQ16, 1, /* 16bit Address Qualification */ + FDCT, 1, /* Tristate FDC (?) */ + , 2, + PRTT, 1, /* Tristate parallel port (?) */ + URAT, 1, /* Tristate UART A (?) */ + URBT, 1, /* Tristate UART B (?) */ + , 2, + URAI, 1, /* UART A Legacy IRQ Select Disable */ + URBI, 1, /* UART B Legacy IRQ Select Disable */ + PRTI, 1, /* Parallel Port Legacy IRQ/DRQ Select Disable */ + FDCI, 1, /* FDC Legacy IRQ/DRQ Select Disable */ + , 1, + LCKC, 1, /* Lock Configuration Registers */ Offset (0x29), - IO3S, 8, /* GPIO3 pin selection register */ + IO3S, 8, /* GPIO3 pin selection register */ Offset (0x30), - ACTR, 1, /* Logical device activation */ - ACT1, 1, /* Logical part activation 1 (mostly unused) */ - ACT2, 1, /* Logical part activation 2 (mostly unused) */ - , 5, + ACTR, 1, /* Logical device activation */ + ACT1, 1, /* Logical part activation 1 (mostly unused) */ + ACT2, 1, /* Logical part activation 2 (mostly unused) */ + , 5, Offset (0x60), - IO1H, 8, /* First I/O port base - high byte */ - IO1L, 8, /* First I/O port base - low byte */ - IO2H, 8, /* Second I/O port base - high byte */ - IO2L, 8, /* Second I/O port base - low byte */ + IO1H, 8, /* First I/O port base - high byte */ + IO1L, 8, /* First I/O port base - low byte */ + IO2H, 8, /* Second I/O port base - high byte */ + IO2L, 8, /* Second I/O port base - low byte */ Offset (0x70), - IRQ0, 8, /* First IRQ */ + IRQ0, 8, /* First IRQ */ Offset (0x72), - IRQ1, 8, /* First IRQ */ + IRQ1, 8, /* First IRQ */ Offset (0x74), - DMA0, 8, /* DMA */ + DMA0, 8, /* DMA */ Offset (0xE0), /* CRE0-CRE4: function logical device dependant, seems to be reserved for ACPI settings */ - CRE0, 8, - CRE1, 8, - CRE2, 8, - CRE3, 8, - CRE4, 8, + CRE0, 8, + CRE1, 8, + CRE2, 8, + CRE3, 8, + CRE4, 8, Offset (0xF0), /* OPT1-OPTA aka CRF0-CRF9: function logical device dependant */ - OPT1, 8, - OPT2, 8, - OPT3, 8, - OPT4, 8, - OPT5, 8, - OPT6, 8, - OPT7, 8, - OPT8, 8, - OPT9, 8, - OPTA, 8 + OPT1, 8, + OPT2, 8, + OPT3, 8, + OPT4, 8, + OPT5, 8, + OPT6, 8, + OPT7, 8, + OPT8, 8, + OPT9, 8, + OPTA, 8 } Method (_CRS) @@ -177,14 +177,14 @@ Device(SIO) { Else { Return (0) } } - /* PM: Switch to D0 by setting IPD low */ + /* PM: Switch to D0 by setting IPD low */ Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) Store (Zero, IPD) EXIT_CONFIG_MODE () } - /* PM: Switch to D3 by setting IPD high */ + /* PM: Switch to D3 by setting IPD high */ Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) Store (One, IPD) @@ -315,23 +315,23 @@ Device(SIO) { Field (FIO1, ByteAcc, NoLock, Preserve) { Offset(0x02), - SELE, 2, - RSTL, 1, - IDMA, 1, - ACT1, 1, - ACT2, 1, - ACT3, 1, - ACT4, 1, + SELE, 2, + RSTL, 1, + IDMA, 1, + ACT1, 1, + ACT2, 1, + ACT3, 1, + ACT4, 1, Offset(0x04), - BSY1, 1, - BSY2, 1, - BSY3, 1, - BSY4, 1, - BUSY, 1, - NDMA, 1, - IODI, 1, - RDY, 1, - DATA, 8, + BSY1, 1, + BSY2, 1, + BSY3, 1, + BSY4, 1, + BUSY, 1, + NDMA, 1, + IODI, 1, + RDY, 1, + DATA, 8, } OperationRegion (FIO2, SystemIO, 0x3F7, 0x01) Field (FIO2, ByteAcc, NoLock, Preserve) @@ -567,7 +567,7 @@ Device(SIO) { If (LEqual(IOAL, 4)) { Store(0x0, Local2) - } else { + } else { Store(0x1, Local2) } diff --git a/src/superio/winbond/w83977tf/acpi/superio.asl b/src/superio/winbond/w83977tf/acpi/superio.asl index 0a37ac9908..918d1e1398 100644 --- a/src/superio/winbond/w83977tf/acpi/superio.asl +++ b/src/superio/winbond/w83977tf/acpi/superio.asl @@ -67,9 +67,9 @@ IndexField (PNP_ADDR_REG, PNP_DATA_REG, ByteAcc, NoLock, Preserve) OPT1, 8 } -#define PNP_ENTER_MAGIC_1ST 0x87 -#define PNP_ENTER_MAGIC_2ND 0x87 -#define PNP_EXIT_MAGIC_1ST 0xaa +#define PNP_ENTER_MAGIC_1ST 0x87 +#define PNP_ENTER_MAGIC_2ND 0x87 +#define PNP_EXIT_MAGIC_1ST 0xaa #include /* PM: indicate IPD (Immediate Power Down) bit state as D0/D3 */ @@ -84,13 +84,13 @@ Method (_PSC) { #ifdef SUPERIO_SHOW_FDC Device (FDC0) { - Name (_HID, EisaId ("PNP0700")) // _HID: Hardware ID - Method (_STA, 0, NotSerialized) // _STA: Status + Name (_HID, EisaId ("PNP0700")) // _HID: Hardware ID + Method (_STA, 0, NotSerialized) // _STA: Status { PNP_GENERIC_STA(W83977TF_FDC) } - Method (_DIS, 0, NotSerialized) // _DIS: Disable Device + Method (_DIS, 0, NotSerialized) // _DIS: Disable Device { PNP_GENERIC_DIS(W83977TF_FDC) } @@ -300,7 +300,7 @@ Device (ECP) Return (BUF6) } - Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings + Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings { StartDependentFn (0x01, 0x01) { @@ -326,7 +326,7 @@ Device (ECP) EndDependentFn () }) - Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings + Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings { CreateByteField (Arg0, 0x02, IOLO) CreateByteField (Arg0, 0x03, IOHI) @@ -366,5 +366,5 @@ Device (ECP) */ #define SUPERIO_KBC_LDN W83977TF_KBC -#define SUPERIO_KBC_PS2M /* Mouse shares same LDN */ +#define SUPERIO_KBC_PS2M /* Mouse shares same LDN */ #include -- cgit v1.2.3