diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-11-19 13:42:14 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-11-19 13:42:14 +0000 |
commit | 86c9b8839217675cb1cc4830aa7d758864ee43f9 (patch) | |
tree | 3e66948c84653ea05bff591a34f8ac66ed414fd6 /src/mainboard/lippert/roadrunner-lx/mainboard.c | |
parent | f31ca16793ca2898e5983a12bdd706bfdd0d0efe (diff) |
Coding-style and whitespace fixes (also to make the code more similar
the Lippert Cool SpaceRunner LX which is already in svn).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3761 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/lippert/roadrunner-lx/mainboard.c')
-rw-r--r-- | src/mainboard/lippert/roadrunner-lx/mainboard.c | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/src/mainboard/lippert/roadrunner-lx/mainboard.c b/src/mainboard/lippert/roadrunner-lx/mainboard.c index cb3c2306ea..a09e77dd89 100644 --- a/src/mainboard/lippert/roadrunner-lx/mainboard.c +++ b/src/mainboard/lippert/roadrunner-lx/mainboard.c @@ -3,8 +3,6 @@ * * Copyright (C) 2008 LiPPERT Embedded Computers GmbH * - * Based on mainboard.c from AMD's DB800 mainboard. - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -20,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/* Based on mainboard.c from AMD's DB800 mainboard. */ + #include <stdlib.h> #include <stdint.h> #include <console/console.h> @@ -29,13 +29,13 @@ #include <device/pci_ids.h> #include "chip.h" -static const u16 ec_init_table[] = { // hi=data, lo=index - 0x1900, // enable monitoring - 0x0351, // TMPIN1,2 diode mode, TMPIN3 off - 0x805C, // unlock zero adjust - 0x7056, 0x3C57, // zero adjust TMPIN1,2 - 0x005C, // lock zero adjust - 0xD014 // also set FAN_CTL polarity to Active High +static const u16 ec_init_table[] = { /* hi=data, lo=index */ + 0x1900, /* Enable monitoring */ + 0x0351, /* TMPIN1,2 diode mode, TMPIN3 off */ + 0x805C, /* Unlock zero adjust */ + 0x7056, 0x3C57, /* Zero adjust TMPIN1,2 */ + 0x005C, /* Lock zero adjust */ + 0xD014 /* Also set FAN_CTL polarity to Active High */ }; static void init(struct device *dev) @@ -44,22 +44,24 @@ static void init(struct device *dev) unsigned int gpio_base, i; printk_debug("LiPPERT RoadRunner-LX ENTER %s\n", __FUNCTION__); - /* Init CS5536 GPIOs */ - gpio_base = pci_read_config32(dev_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, 0), - PCI_BASE_ADDRESS_1) - 1; - outl(0x00000040, gpio_base + 0x00); // GPIO6 value 1 - LAN_PD# - outl(0x00000040, gpio_base + 0x04); // GPIO6 output 1 - LAN_PD# - outl(0x00000400, gpio_base + 0x34); // GPIO10 in aux1 1 - THRM_ALRM# - outl(0x00000400, gpio_base + 0x20); // GPIO10 input 1 - THRM_ALRM# - outl(0x08000000, gpio_base + 0x98); // GPIO27 pull up 0 - PM-LED + /* Init CS5536 GPIOs. */ + gpio_base = pci_read_config32(dev_find_device(PCI_VENDOR_ID_AMD, + PCI_DEVICE_ID_AMD_CS5536_ISA, 0), PCI_BASE_ADDRESS_1) - 1; + + outl(0x00000040, gpio_base + 0x00); // GPIO6 value 1 - LAN_PD# + outl(0x00000040, gpio_base + 0x04); // GPIO6 output 1 - LAN_PD# + outl(0x00000400, gpio_base + 0x34); // GPIO10 in aux1 1 - THRM_ALRM# + outl(0x00000400, gpio_base + 0x20); // GPIO10 input 1 - THRM_ALRM# + outl(0x08000000, gpio_base + 0x98); // GPIO27 pull up 0 - PM-LED - /* Init Environment Controller */ - for (i=0; i<ARRAY_SIZE(ec_init_table); i++) { + /* Init Environment Controller. */ + for (i = 0; i < ARRAY_SIZE(ec_init_table); i++) { u16 val = ec_init_table[i]; - outb((u8)val, 0x0295); outb(val>>8, 0x0296); + outb((u8)val, 0x0295); + outb(val >> 8, 0x0296); } - outb(mb->sio_gp1x_config, 0x1220); // Simple-I/O GP17-10 + outb(mb->sio_gp1x_config, 0x1220); /* Simple-I/O GP17-10 */ printk_debug("LiPPERT RoadRunner-LX EXIT %s\n", __FUNCTION__); } |