From 340fa9396b4b73fd894a15fe48882c98d74292ce Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 10 Nov 2010 14:53:36 +0000 Subject: Random Winbond Super I/O cosmetic and coding-style fixes. - Whitespace, coding style, and typo fixes. - Drop unused/obsolete "#config chip.h". - Use u8/u16/etc. everywhere. - Use pnp_read_config()/pnp_write_config() instead of open-coding them. - Use pnp_set_logical_device() instead of open-coding it. - W83627EHG: Fix incorrect enable_hwm_smbus() code comment. - Use ARRAY_SIZE. - w83627hf/superio.c: w83627hf_16_bit_addr_qual(): Bugfix, the code was using 'dev->path.pnp.port >> 8' as config port, which is incorrect in superio.c (which has a "real" device_t struct, in contrast to *_early_serial.c which uses "unsigned" as device_t where 'dev >> 8' is required). Signed-off-by: Uwe Hermann Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6057 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/superio/winbond/w83627ehg/w83627ehg.h | 35 ++++++++++++++++--------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/superio/winbond/w83627ehg/w83627ehg.h') diff --git a/src/superio/winbond/w83627ehg/w83627ehg.h b/src/superio/winbond/w83627ehg/w83627ehg.h index f03cf0672d..60c2b064b2 100644 --- a/src/superio/winbond/w83627ehg/w83627ehg.h +++ b/src/superio/winbond/w83627ehg/w83627ehg.h @@ -23,35 +23,36 @@ #define SUPERIO_WINBOND_W83627EHG_W83627EHG_H #define W83627EHG_FDC 0 /* Floppy */ -#define W83627EHG_PP 1 /* Parallel Port */ +#define W83627EHG_PP 1 /* Parallel port */ #define W83627EHG_SP1 2 /* Com1 */ #define W83627EHG_SP2 3 /* Com2 */ -#define W83627EHG_KBC 5 /* Keyboard & Mouse */ -#define W83627EHG_GPIO_GAME_MIDI 7 /* GPIO1, GPIO6, Game Port and MIDI Port */ +#define W83627EHG_KBC 5 /* PS/2 keyboard & mouse */ +#define W83627EHG_GPIO_GAME_MIDI 7 /* GPIO1, GPIO6, Game port, MIDI port */ #define W83627EHG_WDTO_PLED 8 /* TODO */ -#define W83627EHG_GPIO_SUSLED 9 /* GPIO2, GPIO3, GPIO4, GPIO5 and SUSLED */ +#define W83627EHG_GPIO_SUSLED 9 /* GPIO2, GPIO3, GPIO4, GPIO5, SUSLED */ #define W83627EHG_ACPI 10 /* ACPI */ -#define W83627EHG_HWM 11 /* Hardware Monitor */ +#define W83627EHG_HWM 11 /* Hardware monitor */ -/* virtual devices sharing the enables are encoded as follows: +/* + * Virtual devices sharing the enables are encoded as follows: * VLDN = baseLDN[7:0] | [10:8] bitpos of enable in 0x30 of baseLDN */ -#define W83627EHG_SFI ((1 << 8) | 6) /* Flash has bit1 as enable */ -#define W83627EHG_GPIO1 W83627EHG_GPIO_GAME_MIDI /* GPIO1 is at LDN 7, bit 0 */ -#define W83627EHG_GAME ((1 << 8) | 7) -#define W83627EHG_MIDI ((2 << 8) | 7) -#define W83627EHG_GPIO6 ((3 << 8) | 7) +#define W83627EHG_SFI ((1 << 8) | 6) /* Flash has bit1 as enable */ +#define W83627EHG_GPIO1 W83627EHG_GPIO_GAME_MIDI /* GPIO1: LDN 7, bit 0 */ +#define W83627EHG_GAME ((1 << 8) | 7) +#define W83627EHG_MIDI ((2 << 8) | 7) +#define W83627EHG_GPIO6 ((3 << 8) | 7) -#define W83627EHG_GPIO2 W83627EHG_GPIO_SUSLED /* GPIO2 is at LDN 9, bit 0 */ -#define W83627EHG_GPIO3 ((1 << 8) | 9) -#define W83627EHG_GPIO4 ((2 << 8) | 9) -#define W83627EHG_GPIO5 ((3 << 8) | 9) +#define W83627EHG_GPIO2 W83627EHG_GPIO_SUSLED /* GPIO2: LDN 9, bit 0 */ +#define W83627EHG_GPIO3 ((1 << 8) | 9) +#define W83627EHG_GPIO4 ((2 << 8) | 9) +#define W83627EHG_GPIO5 ((3 << 8) | 9) #if defined(__PRE_RAM__) && !defined(__ROMCC__) -void w83627ehg_enable_dev(device_t dev, unsigned iobase); +void w83627ehg_enable_dev(device_t dev, u16 iobase); void w83627ehg_disable_dev(device_t dev); -void w83627ehg_enable_serial(device_t dev, unsigned iobase); +void w83627ehg_enable_serial(device_t dev, u16 iobase); #endif #endif -- cgit v1.2.3