From 9db833bec394b886ca990965970cdb100b65d9ac Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Mon, 28 Dec 2009 09:59:44 +0000 Subject: trival. All the changes is about comment and spaces. In superio folder. 1. Delete trailing white spaces. 2. Change the // comment to /* */. 3. Add some copyright header. 4. reindent. 5. delete multi blank lines. I tried my best to find them. If anything left, please fix it or tell me. Signed-off-by: Zheng Bao Acked-by: Zheng Bao git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4993 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/superio/via/vt1211/vt1211.c | 50 +++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 27 deletions(-) (limited to 'src/superio/via/vt1211/vt1211.c') diff --git a/src/superio/via/vt1211/vt1211.c b/src/superio/via/vt1211/vt1211.c index 53e4523cd8..ae5624055a 100644 --- a/src/superio/via/vt1211/vt1211.c +++ b/src/superio/via/vt1211/vt1211.c @@ -1,6 +1,7 @@ /* - * (C) Copyright 2004 Nick Barker + * This file is part of the coreboot project. * + * Copyright (C) 2004 Nick Barker * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -20,7 +21,6 @@ /* vt1211 routines and defines*/ - #include #include #include @@ -31,37 +31,36 @@ #include "vt1211.h" #include "chip.h" - static unsigned char vt1211hwmonitorinits[]={ - 0x10,0x3, 0x11,0x10, 0x12,0xd, 0x13,0x7f, - 0x14,0x21, 0x15,0x81, 0x16,0xbd, 0x17,0x8a, - 0x18,0x0, 0x19,0x0, 0x1a,0x0, 0x1b,0x0, - 0x1d,0xff, 0x1e,0x0, 0x1f,0x73, 0x20,0x67, - 0x21,0xc1, 0x22,0xca, 0x23,0x74, 0x24,0xc2, - 0x25,0xc7, 0x26,0xc9, 0x27,0x7f, 0x29,0x0, - 0x2a,0x0, 0x2b,0xff, 0x2c,0x0, 0x2d,0xff, - 0x2e,0x0, 0x2f,0xff, 0x30,0x0, 0x31,0xff, - 0x32,0x0, 0x33,0xff, 0x34,0x0, 0x39,0xff, - 0x3a,0x0, 0x3b,0xff, 0x3c,0xff, 0x3d,0xff, - 0x3e,0x0, 0x3f,0xb0, 0x43,0xff, 0x44,0xff, - 0x46,0xff, 0x47,0x50, 0x4a,0x3, 0x4b,0xc0, - 0x4c,0x0, 0x4d,0x0, 0x4e,0xf, 0x5d,0x77, - 0x5c,0x0, 0x5f,0x33, 0x40,0x1}; - -static void pnp_enter_ext_func_mode(device_t dev) + 0x10,0x3, 0x11,0x10, 0x12,0xd, 0x13,0x7f, + 0x14,0x21, 0x15,0x81, 0x16,0xbd, 0x17,0x8a, + 0x18,0x0, 0x19,0x0, 0x1a,0x0, 0x1b,0x0, + 0x1d,0xff, 0x1e,0x0, 0x1f,0x73, 0x20,0x67, + 0x21,0xc1, 0x22,0xca, 0x23,0x74, 0x24,0xc2, + 0x25,0xc7, 0x26,0xc9, 0x27,0x7f, 0x29,0x0, + 0x2a,0x0, 0x2b,0xff, 0x2c,0x0, 0x2d,0xff, + 0x2e,0x0, 0x2f,0xff, 0x30,0x0, 0x31,0xff, + 0x32,0x0, 0x33,0xff, 0x34,0x0, 0x39,0xff, + 0x3a,0x0, 0x3b,0xff, 0x3c,0xff, 0x3d,0xff, + 0x3e,0x0, 0x3f,0xb0, 0x43,0xff, 0x44,0xff, + 0x46,0xff, 0x47,0x50, 0x4a,0x3, 0x4b,0xc0, + 0x4c,0x0, 0x4d,0x0, 0x4e,0xf, 0x5d,0x77, + 0x5c,0x0, 0x5f,0x33, 0x40,0x1 +}; + +static void pnp_enter_ext_func_mode(device_t dev) { outb(0x87, dev->path.pnp.port); outb(0x87, dev->path.pnp.port); } -static void pnp_exit_ext_func_mode(device_t dev) +static void pnp_exit_ext_func_mode(device_t dev) { outb(0xaa, dev->path.pnp.port); } static void vt1211_set_iobase(device_t dev, unsigned index, unsigned iobase) { - switch (dev->path.pnp.device) { case VT1211_FDC: case VT1211_PP: @@ -75,14 +74,13 @@ static void vt1211_set_iobase(device_t dev, unsigned index, unsigned iobase) pnp_write_config(dev, index + 1, iobase & 0xff); break; } - } static void init_hwm(unsigned long base) { int i; - // initialize vt1211 hardware monitor registers, which are at 0xECXX + /* initialize vt1211 hardware monitor registers, which are at 0xECXX */ for(i = 0; i < sizeof(vt1211hwmonitorinits); i += 2) { outb(vt1211hwmonitorinits[i + 1], base + vt1211hwmonitorinits[i]); @@ -117,8 +115,6 @@ static void vt1211_init(struct device *dev) default: printk_info("vt1211 asked to initialise unknown device!\n"); } - - } void vt1211_pnp_enable_resources(device_t dev) @@ -139,7 +135,7 @@ void vt1211_pnp_set_resources(struct device *dev) for( i = 0 ; i < dev->resources; i++){ resource = &dev->resource[i]; resource->flags |= IORESOURCE_STORED; - report_resource_stored(dev, resource, ""); + report_resource_stored(dev, resource, ""); } return; } @@ -176,7 +172,7 @@ void vt1211_pnp_set_resources(struct device *dev) } resource->flags |= IORESOURCE_STORED; - report_resource_stored(dev, resource, ""); + report_resource_stored(dev, resource, ""); } pnp_exit_ext_func_mode(dev); -- cgit v1.2.3