blob: c8dd3619c8bf7bc85b3e1eab625c375e0524a239 [file] [log] [blame]
Stefan Reinauer1a08f582009-10-28 16:52:48 +00001/*
2 * This file is part of the coreboot project.
Stefan Reinauer14e22772010-04-27 06:56:47 +00003 *
Stefan Reinauer1a08f582009-10-28 16:52:48 +00004 * Copyright (C) 2007-2008 coresystems GmbH
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
Uwe Hermann2d2f0c12009-10-28 17:36:11 +00008 * published by the Free Software Foundation; version 2 of the License.
Stefan Reinauer1a08f582009-10-28 16:52:48 +00009 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Stefan Reinauer1a08f582009-10-28 16:52:48 +000014 */
15
Arthur Heymansc5839202019-11-12 23:48:42 +010016#include <bootblock_common.h>
Edward O'Callaghancf5ac3d2014-06-03 08:40:34 +100017#include <superio/smsc/lpc47m15x/lpc47m15x.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +110018#include <northbridge/intel/i945/i945.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +110019#include <southbridge/intel/i82801gx/i82801gx.h>
Patrick Georgid0835952010-10-05 09:07:10 +000020
Edward O'Callaghancf5ac3d2014-06-03 08:40:34 +100021#define SERIAL_DEV PNP_DEV(0x2e, LPC47M15X_SP1)
22#define PME_DEV PNP_DEV(0x2e, LPC47M15X_PME)
Uwe Hermann57b2ff82010-11-21 17:29:59 +000023
Arthur Heymansdc584c32019-11-12 20:37:21 +010024void mainboard_late_rcba_config(void)
Stefan Reinauer1a08f582009-10-28 16:52:48 +000025{
26 /* Set up virtual channel 0 */
27 //RCBA32(0x0014) = 0x80000001;
Stefan Reinauer1a08f582009-10-28 16:52:48 +000028
Stefan Reinauer1a08f582009-10-28 16:52:48 +000029 /* dev irq route register */
Arthur Heymansb451df22017-08-15 20:59:09 +020030 RCBA16(D31IR) = 0x0132;
31 RCBA16(D30IR) = 0x0146;
32 RCBA16(D29IR) = 0x0237;
33 RCBA16(D28IR) = 0x3201;
34 RCBA16(D27IR) = 0x0146;
Stefan Reinauer1a08f582009-10-28 16:52:48 +000035
Stefan Reinauer1a08f582009-10-28 16:52:48 +000036 /* Disable unused devices */
Arthur Heymans6267f5d2018-12-15 23:46:48 +010037 RCBA32(FD) |= FD_INTLAN;
Stefan Reinauer1a08f582009-10-28 16:52:48 +000038
39 /* Enable PCIe Root Port Clock Gate */
40 // RCBA32(0x341c) = 0x00000001;
41}
42
Arthur Heymansc5839202019-11-12 23:48:42 +010043void bootblock_mainboard_early_init(void)
Stefan Reinauer1a08f582009-10-28 16:52:48 +000044{
Edward O'Callaghancf5ac3d2014-06-03 08:40:34 +100045 /* Enable SuperIO PM */
46 lpc47m15x_enable_serial(PME_DEV, 0x680);
47 lpc47m15x_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); /* 0x3f8 */
Stefan Reinauer1a08f582009-10-28 16:52:48 +000048}