aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/lippert/spacerunner-lx/mainboard.c
diff options
context:
space:
mode:
authorJens Rottmann <JRottmann@LiPPERTEmbedded.de>2010-08-31 19:19:16 +0000
committerMyles Watson <mylesgw@gmail.com>2010-08-31 19:19:16 +0000
commitb9ee31d881879ab1d95b4bfb485bd6586367649d (patch)
tree0e1fcd791ea376b0af9e8d6782abf035a291dad4 /src/mainboard/lippert/spacerunner-lx/mainboard.c
parent3063d5dfdee3ccf674b863ca6d22a229210c04a7 (diff)
SMC_CONFIG is needed before the device tree is ready and some people
would rather not have mainboard settings like sio_gp1x_config in the device tree anyway. So found a nice united home for both in Kconfig, where users can change them without having to mess around in the C code. Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5760 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/lippert/spacerunner-lx/mainboard.c')
-rw-r--r--src/mainboard/lippert/spacerunner-lx/mainboard.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mainboard/lippert/spacerunner-lx/mainboard.c b/src/mainboard/lippert/spacerunner-lx/mainboard.c
index 7977969315..34cd8c40f9 100644
--- a/src/mainboard/lippert/spacerunner-lx/mainboard.c
+++ b/src/mainboard/lippert/spacerunner-lx/mainboard.c
@@ -29,6 +29,13 @@
#include <device/pci_ids.h>
#include "chip.h"
+/* Bit0 turns off the Live LED, bit1 switches Com1 to RS485, bit2 same for Com2. */
+#if CONFIG_ONBOARD_UARTS_RS485
+ #define SIO_GP1X_CONFIG 0x07
+#else
+ #define SIO_GP1X_CONFIG 0x01
+#endif
+
static const u16 ec_init_table[] = { /* hi=data, lo=index */
0x1900, /* Enable monitoring */
0x3050, /* VIN4,5 enabled */
@@ -41,7 +48,6 @@ static const u16 ec_init_table[] = { /* hi=data, lo=index */
static void init(struct device *dev)
{
- struct mainboard_config *mb = dev->chip_info;
unsigned int gpio_base, i;
printk(BIOS_DEBUG, "LiPPERT SpaceRunner-LX ENTER %s\n", __func__);
@@ -65,7 +71,9 @@ static void init(struct device *dev)
outb(val >> 8, 0x0296);
}
- outb(mb->sio_gp1x_config, 0x1220); /* Simple-I/O GP17-10 */
+ /* bit2 = RS485_EN2, bit1 = RS485_EN1, bit0 = Live LED */
+ outb(SIO_GP1X_CONFIG, 0x1220); /* Simple-I/O GP17-10 */
+
printk(BIOS_DEBUG, "LiPPERT SpaceRunner-LX EXIT %s\n", __func__);
}