coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
stdint.h
>
4
#include <
ec/acpi/ec.h
>
5
#include <
device/smbus_host.h
>
6
#include <
northbridge/intel/ironlake/ironlake.h
>
7
8
const
struct
southbridge_usb_port
mainboard_usb_ports
[] = {
9
/* Enabled, Current table lookup index, OC map */
10
{ 1,
IF1_557
, 0 },
11
{ 1,
IF1_55F
, 1 },
12
{ 1,
IF1_74B
, 3 },
13
{ 1,
IF1_74B
, 3 },
14
{ 1,
IF1_557
, 3 },
15
{ 1,
IF1_14B
, 3 },
16
{ 1,
IF1_74B
, 3 },
17
{ 1,
IF1_74B
, 3 },
18
{ 1,
IF1_74B
, 4 },
19
{ 1,
IF1_74B
, 5 },
20
{ 1,
IF1_55F
, 7 },
21
{ 1,
IF1_55F
, 7 },
22
{ 1,
IF1_557
, 7 },
23
{ 1,
IF1_55F
, 7 },
24
};
25
26
static
void
set_fsb_frequency
(
void
)
27
{
28
u8
block[5];
29
u16
fsbfreq = 62879;
30
smbus_block_read
(0x69, 0, 5, block);
31
block[0] = fsbfreq;
32
block[1] = fsbfreq >> 8;
33
34
smbus_block_write
(0x69, 0, 5, block);
35
}
36
37
void
mainboard_pre_raminit
(
void
)
38
{
39
set_fsb_frequency
();
40
}
41
42
void
mainboard_get_spd_map
(
u8
*spd_addrmap)
43
{
44
spd_addrmap[0] = 0x50;
45
spd_addrmap[2] = 0x51;
46
}
smbus_block_write
int smbus_block_write(struct device *dev, u8 cmd, u8 bytes, const u8 *buffer)
Definition:
smbus_ops.c:34
smbus_block_read
int smbus_block_read(struct device *dev, u8 cmd, u8 bytes, u8 *buffer)
Definition:
smbus_ops.c:26
mainboard_pre_raminit
__weak void mainboard_pre_raminit(struct romstage_params *params)
Definition:
romstage.c:133
ec.h
ironlake.h
mainboard_get_spd_map
void mainboard_get_spd_map(u8 *spd_addrmap)
Definition:
romstage.c:55
mainboard_usb_ports
const struct southbridge_usb_port mainboard_usb_ports[]
Definition:
romstage.c:9
set_fsb_frequency
static void set_fsb_frequency(void)
Definition:
romstage.c:26
smbus_host.h
IF1_14B
@ IF1_14B
Definition:
pch.h:46
IF1_557
@ IF1_557
Definition:
pch.h:48
IF1_74B
@ IF1_74B
Definition:
pch.h:47
IF1_55F
@ IF1_55F
Definition:
pch.h:50
stdint.h
u16
uint16_t u16
Definition:
stdint.h:48
u8
uint8_t u8
Definition:
stdint.h:45
southbridge_usb_port
Definition:
pch.h:56
src
mainboard
lenovo
x201
romstage.c
Generated by
1.9.1