Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14439
-gerrit
commit d9203f040b50aecd39f16fd2ddaa3e8c019b708a
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Wed Apr 20 18:00:27 2016 +0200
nb/intel/sandybridge/raminit: fix regression "always use mrccache"
Fix regression introduced by:
Ib48fe8380446846df17d37b22968f7d4fd6b9b13
Don't run channel_test on S3 resume as it overrides memory
that might be in use.
Fixes MCE events reported by the GNU/Linux kernel that
low memory has been modified.
Reset on failed s3 resume.
Change-Id: Ibadea286619c7906225f86a93aaa0b4caf26cabe
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/northbridge/intel/sandybridge/raminit.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 042898d..3c606e1 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -4038,7 +4038,7 @@ static void restore_timings(ramctr_timing * ctrl)
}
static int try_init_dram_ddr3(ramctr_timing *ctrl, int fast_boot,
- int me_uma_size)
+ int s3_resume, int me_uma_size)
{
int err;
@@ -4148,9 +4148,11 @@ static int try_init_dram_ddr3(ramctr_timing *ctrl, int fast_boot,
write_controller_mr(ctrl);
- err = channel_test(ctrl);
- if (err)
- return err;
+ if (!s3_resume) {
+ err = channel_test(ctrl);
+ if (err)
+ return err;
+ }
return 0;
}
@@ -4228,9 +4230,14 @@ void init_dram_ddr3(spd_raw_data *spds, int mobile, int min_tck,
printk(BIOS_DEBUG, "Trying stored timings.\n");
memcpy(&ctrl, ctrl_cached, sizeof(ctrl));
- err = try_init_dram_ddr3(&ctrl, fast_boot, me_uma_size);
+ err = try_init_dram_ddr3(&ctrl, fast_boot, s3resume, me_uma_size);
if (err) {
- /* no need to erase bad mrc cache here, it gets overritten on
+ if (s3resume) {
+ /* Failed S3 resume, reset to come up cleanly */
+ outb(0x6, 0xcf9);
+ halt();
+ }
+ /* no need to erase bad mrc cache here, it gets overwritten on
* successful boot. */
printk(BIOS_ERR, "Stored timings are invalid !\n");
fast_boot = 0;
@@ -4243,7 +4250,7 @@ void init_dram_ddr3(spd_raw_data *spds, int mobile, int min_tck,
/* Get DDR3 SPD data */
dram_find_spds_ddr3(spds, &ctrl);
- err = try_init_dram_ddr3(&ctrl, fast_boot, me_uma_size);
+ err = try_init_dram_ddr3(&ctrl, fast_boot, s3resume, me_uma_size);
}
if (err)
die("raminit failed");
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14532
-gerrit
commit 7f0fa67ad09b043832829a6fbf5918117f4a971c
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Thu Apr 28 09:39:34 2016 +0200
fsp_baytrail: Fix missing "$" when using Kconfig switch
To include gfx.c in ramstage, there is a Kconfig option
(FSP_BAYTRAIL_GFX_INIT) which can be activated on demand.
Unfortunately, the "$"-character is missing so that this switch is
never active.
Change-Id: I0c3c562b3caca53ac6510c2c5dc30e7f606f5ad0
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/soc/intel/fsp_baytrail/Makefile.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/soc/intel/fsp_baytrail/Makefile.inc b/src/soc/intel/fsp_baytrail/Makefile.inc
index 92b5f98..6e16b42 100644
--- a/src/soc/intel/fsp_baytrail/Makefile.inc
+++ b/src/soc/intel/fsp_baytrail/Makefile.inc
@@ -57,7 +57,7 @@ ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smm.c
ramstage-y += placeholders.c
ramstage-y += i2c.c
-ramstage-(CONFIG_FSP_BAYTRAIL_GFX_INIT) += gfx.c
+ramstage-$(CONFIG_FSP_BAYTRAIL_GFX_INIT) += gfx.c
CPPFLAGS_common += -I$(src)/soc/intel/fsp_baytrail/include
CPPFLAGS_common += -I$(src)/soc/intel/fsp_baytrail/fsp
the following patch was just integrated into master:
commit 608d991cf8032bbacf67961a15905621ec2034f3
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Tue Apr 26 09:26:14 2016 +0200
drivers/intel/i210: Use uint8_t and friends instead of u8
Switch all types to uint8_t and the like instead of u8.
Change-Id: Ia12c4ee9e21e2d3166c2f895c819357fa2ed9a94
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/14515
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/14515 for details.
-gerrit
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14515
-gerrit
commit 7363bce113e5518acca9220650eaea2e99148b47
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Tue Apr 26 09:26:14 2016 +0200
drivers/intel/i210: Use uint8_t and friends instead of u8
Switch all types to uint8_t and the like instead of u8.
Change-Id: Ia12c4ee9e21e2d3166c2f895c819357fa2ed9a94
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/drivers/intel/i210/i210.c | 67 ++++++++++++++++---------------
src/mainboard/siemens/mc_tcu3/mainboard.c | 5 ++-
src/vendorcode/siemens/hwilib/hwilib.h | 3 +-
3 files changed, 40 insertions(+), 35 deletions(-)
diff --git a/src/drivers/intel/i210/i210.c b/src/drivers/intel/i210/i210.c
index e821d48..c5e0c4e 100644
--- a/src/drivers/intel/i210/i210.c
+++ b/src/drivers/intel/i210/i210.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2014 Siemens AG.
+ * Copyright (C) 2014-2016 Siemens AG.
*
* 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
@@ -25,13 +25,14 @@
/* We need one function we can call to get a MAC address to use */
/* This function can be coded somewhere else but must exist. */
-extern enum cb_err mainboard_get_mac_address(u16 bus, u8 devfn, u8 mac[6]);
+extern enum cb_err mainboard_get_mac_address(uint16_t bus, uint8_t devfn,
+ uint8_t mac[6]);
/* This is a private function to wait for a bit mask in a given register */
/* To avoid endless loops, a time-out is implemented here. */
-static int wait_done(u32* reg, u32 mask)
+static int wait_done(uint32_t* reg, uint32_t mask)
{
- u32 timeout = I210_POLL_TIMEOUT_US;
+ uint32_t timeout = I210_POLL_TIMEOUT_US;
while (!(*reg & mask)) {
udelay(1);
@@ -50,17 +51,18 @@ static int wait_done(u32* reg, u32 mask)
* @param *buffer Pointer to the buffer where to store read data
* @return void I210_NO_ERROR or an error code
*/
-static u32 read_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
+static uint32_t read_flash(struct device *dev, uint32_t address,
+ uint32_t count, uint16_t *buffer)
{
- u32 bar;
- u32 *eeprd;
- u32 i;
+ uint32_t bar;
+ uint32_t *eeprd;
+ uint32_t i;
/* Get the BAR to memory mapped space*/
bar = pci_read_config32(dev, PCI_BASE_ADDRESS_0);
if ((!bar) || ((address + count) > 0x40))
return I210_INVALID_PARAM;
- eeprd = (u32*)(bar + I210_REG_EEREAD);
+ eeprd = (uint32_t*)(bar + I210_REG_EEREAD);
/* Prior to start ensure flash interface is ready by checking DONE-bit */
if (wait_done(eeprd, I210_DONE))
return I210_NOT_READY;
@@ -84,10 +86,10 @@ static u32 read_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
* @param *checksum Pointer to the buffer where to store the checksum
* @return void I210_NO_ERROR or an error code
*/
-static u32 compute_checksum(struct device *dev, u16 *checksum)
+static uint32_t compute_checksum(struct device *dev, uint16_t *checksum)
{
- u16 eep_data[0x40];
- u32 i;
+ uint16_t eep_data[0x40];
+ uint32_t i;
/* First read back data to compute the checksum for */
if (read_flash(dev, 0, 0x3f, eep_data))
@@ -111,20 +113,21 @@ static u32 compute_checksum(struct device *dev, u16 *checksum)
* @param *buffer Pointer to the buffer where data to write is stored in
* @return void I210_NO_ERROR or an error code
*/
-static u32 write_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
+static uint32_t write_flash(struct device *dev, uint32_t address,
+ uint32_t count, uint16_t *buffer)
{
- u32 bar;
- u32 *eepwr;
- u32 *eectrl;
- u16 checksum;
- u32 i;
+ uint32_t bar;
+ uint32_t *eepwr;
+ uint32_t *eectrl;
+ uint16_t checksum;
+ uint32_t i;
/* Get the BAR to memory mapped space */
bar = pci_read_config32(dev, 0x10);
if ((!bar) || ((address + count) > 0x40))
return I210_INVALID_PARAM;
- eepwr = (u32*)(bar + I210_REG_EEWRITE);
- eectrl = (u32*)(bar + I210_REG_EECTRL);
+ eepwr = (uint32_t*)(bar + I210_REG_EEWRITE);
+ eectrl = (uint32_t*)(bar + I210_REG_EECTRL);
/* Prior to start ensure flash interface is ready by checking DONE-bit */
if (wait_done(eepwr, I210_DONE))
return I210_NOT_READY;
@@ -145,8 +148,8 @@ static u32 write_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
if (wait_done(eepwr, I210_DONE))
return I210_WRITE_ERROR;
/* Up to now, desired data was written into shadowed RAM. We now need */
- /* to perform a flash cycle to bring the shadowed RAM into flash memory. */
- /* To start a flash cycle we need to set FLUPD-bit and wait for FLDONE. */
+ /* to perform a flash cycle to bring the shadowed RAM into flash. */
+ /* To start a flash cycle we need to set FLUPD and wait for FLDONE. */
*eectrl = *eectrl | I210_FLUPD;
if (wait_done(eectrl, I210_FLUDONE))
return I210_FLASH_UPDATE_ERROR;
@@ -158,16 +161,16 @@ static u32 write_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
* @param *MACAdr Pointer to the buffer where to store read MAC address
* @return void I210_NO_ERROR or an error code
*/
-static u32 read_mac_adr(struct device *dev, u8 *mac_adr)
+static uint32_t read_mac_adr(struct device *dev, uint8_t *mac_adr)
{
- u16 adr[3];
+ uint16_t adr[3];
if (!dev || !mac_adr)
return I210_INVALID_PARAM;
if (read_flash(dev, 0, 3, adr))
return I210_READ_ERROR;
- /* Copy the address into destination. This is done because of */
- /* possible not matching alignment for destination to u16 boundary. */
- memcpy(mac_adr, (u8*)adr, 6);
+ /* Copy the address into destination. This is done because of possible */
+ /* not matching alignment for destination to uint16_t boundary. */
+ memcpy(mac_adr, (uint8_t*)adr, 6);
return I210_SUCCESS;
}
@@ -176,13 +179,13 @@ static u32 read_mac_adr(struct device *dev, u8 *mac_adr)
* @param *MACAdr Pointer to the buffer where the desired MAC address is
* @return void I210_NO_ERROR or an error code
*/
-static u32 write_mac_adr(struct device *dev, u8 *mac_adr)
+static uint32_t write_mac_adr(struct device *dev, uint8_t *mac_adr)
{
- u16 adr[3];
+ uint16_t adr[3];
if (!dev || !mac_adr)
return I210_INVALID_PARAM;
/* Copy desired address into a local buffer to avoid alignment issues */
- memcpy((u8*)adr, mac_adr, 6);
+ memcpy((uint8_t*)adr, mac_adr, 6);
return write_flash(dev, 0, 3, adr);
}
@@ -194,8 +197,8 @@ static u32 write_mac_adr(struct device *dev, u8 *mac_adr)
*/
static void init(struct device *dev)
{
- u8 cur_adr[6];
- u8 adr_to_set[6];
+ uint8_t cur_adr[6];
+ uint8_t adr_to_set[6];
enum cb_err status;
/*Check first whether there is a valid MAC address available */
diff --git a/src/mainboard/siemens/mc_tcu3/mainboard.c b/src/mainboard/siemens/mc_tcu3/mainboard.c
index e9c29a0..009c34d 100644
--- a/src/mainboard/siemens/mc_tcu3/mainboard.c
+++ b/src/mainboard/siemens/mc_tcu3/mainboard.c
@@ -39,10 +39,11 @@
* @param mac buffer where to store the MAC address
* @return cb_err CB_ERR or CB_SUCCESS
*/
-enum cb_err mainboard_get_mac_address(u16 bus, u8 devfn, u8 mac[6])
+enum cb_err mainboard_get_mac_address(uint16_t bus, uint8_t devfn,
+ uint8_t mac[6])
{
uint8_t mac_adr[6];
- u32 i;
+ uint32_t i;
/* Open main hwinfo block */
if (hwilib_find_blocks("hwinfo.hex") != CB_SUCCESS)
diff --git a/src/vendorcode/siemens/hwilib/hwilib.h b/src/vendorcode/siemens/hwilib/hwilib.h
index fb0798b..c66a99c 100644
--- a/src/vendorcode/siemens/hwilib/hwilib.h
+++ b/src/vendorcode/siemens/hwilib/hwilib.h
@@ -70,5 +70,6 @@ enum cb_err hwilib_find_blocks (const char *hwi_filename);
uint32_t hwilib_get_field (hwinfo_field_t field, uint8_t *data, uint32_t maxlen);
/* This functions needs to be implemented for every mainboard that uses i210. */
-enum cb_err mainboard_get_mac_address(u16 bus, u8 devfn, u8 mac[6]);
+enum cb_err mainboard_get_mac_address(uint16_t bus, uint8_t devfn,
+ uint8_t mac[6]);
#endif /* SIEMENS_HWI_LIB_H_ */
the following patch was just integrated into master:
commit bf13d3f567795324a587af745c71e58ce680ab3f
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Mon Apr 25 12:24:17 2016 +0200
mc_tcu3: Switch to hwilib instead of own hwinfo implementation
Use hwilib in vendorcode/siemens/hwilib to get fields from hwinfo
instead of having mainboard specific hwinfo code.
This patch does not change the functional behavior in any way.
Change-Id: Idb226a82a08b1b753f654c5cde106236e72f33c3
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/14506
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/14506 for details.
-gerrit
the following patch was just integrated into master:
commit 223498fa16c8de69b2649c669d2fba43ecf364d8
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Fri Apr 22 14:14:45 2016 +0200
vendorcode/siemens: Add hwilib for Siemens specific info struct
Add a library which unifies access to Siemens specific hardware information
data. This library is meant to be used with Siemens platforms and can be
selected in Kconfig. The needed source of information has to be present
in cbfs.
This lib can be used in romstage and ramstage.
Change-Id: I2c6e003b0c123b4cf6a84906c2b133b8c38c8b1a
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/14505
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Tested-by: build bot (Jenkins)
See https://review.coreboot.org/14505 for details.
-gerrit
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14515
-gerrit
commit a4361b538cab5461b963b355e66addba327e1a5c
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Tue Apr 26 09:26:14 2016 +0200
drivers/intel/i210: Use uint8_t and friends instead of u8
Switch all types to uint8_t and the like instead of u8.
Change-Id: Ia12c4ee9e21e2d3166c2f895c819357fa2ed9a94
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/drivers/intel/i210/i210.c | 67 ++++++++++++++++---------------
src/mainboard/siemens/mc_tcu3/mainboard.c | 5 ++-
src/vendorcode/siemens/hwilib/hwilib.h | 3 +-
3 files changed, 40 insertions(+), 35 deletions(-)
diff --git a/src/drivers/intel/i210/i210.c b/src/drivers/intel/i210/i210.c
index e821d48..c5e0c4e 100644
--- a/src/drivers/intel/i210/i210.c
+++ b/src/drivers/intel/i210/i210.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2014 Siemens AG.
+ * Copyright (C) 2014-2016 Siemens AG.
*
* 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
@@ -25,13 +25,14 @@
/* We need one function we can call to get a MAC address to use */
/* This function can be coded somewhere else but must exist. */
-extern enum cb_err mainboard_get_mac_address(u16 bus, u8 devfn, u8 mac[6]);
+extern enum cb_err mainboard_get_mac_address(uint16_t bus, uint8_t devfn,
+ uint8_t mac[6]);
/* This is a private function to wait for a bit mask in a given register */
/* To avoid endless loops, a time-out is implemented here. */
-static int wait_done(u32* reg, u32 mask)
+static int wait_done(uint32_t* reg, uint32_t mask)
{
- u32 timeout = I210_POLL_TIMEOUT_US;
+ uint32_t timeout = I210_POLL_TIMEOUT_US;
while (!(*reg & mask)) {
udelay(1);
@@ -50,17 +51,18 @@ static int wait_done(u32* reg, u32 mask)
* @param *buffer Pointer to the buffer where to store read data
* @return void I210_NO_ERROR or an error code
*/
-static u32 read_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
+static uint32_t read_flash(struct device *dev, uint32_t address,
+ uint32_t count, uint16_t *buffer)
{
- u32 bar;
- u32 *eeprd;
- u32 i;
+ uint32_t bar;
+ uint32_t *eeprd;
+ uint32_t i;
/* Get the BAR to memory mapped space*/
bar = pci_read_config32(dev, PCI_BASE_ADDRESS_0);
if ((!bar) || ((address + count) > 0x40))
return I210_INVALID_PARAM;
- eeprd = (u32*)(bar + I210_REG_EEREAD);
+ eeprd = (uint32_t*)(bar + I210_REG_EEREAD);
/* Prior to start ensure flash interface is ready by checking DONE-bit */
if (wait_done(eeprd, I210_DONE))
return I210_NOT_READY;
@@ -84,10 +86,10 @@ static u32 read_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
* @param *checksum Pointer to the buffer where to store the checksum
* @return void I210_NO_ERROR or an error code
*/
-static u32 compute_checksum(struct device *dev, u16 *checksum)
+static uint32_t compute_checksum(struct device *dev, uint16_t *checksum)
{
- u16 eep_data[0x40];
- u32 i;
+ uint16_t eep_data[0x40];
+ uint32_t i;
/* First read back data to compute the checksum for */
if (read_flash(dev, 0, 0x3f, eep_data))
@@ -111,20 +113,21 @@ static u32 compute_checksum(struct device *dev, u16 *checksum)
* @param *buffer Pointer to the buffer where data to write is stored in
* @return void I210_NO_ERROR or an error code
*/
-static u32 write_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
+static uint32_t write_flash(struct device *dev, uint32_t address,
+ uint32_t count, uint16_t *buffer)
{
- u32 bar;
- u32 *eepwr;
- u32 *eectrl;
- u16 checksum;
- u32 i;
+ uint32_t bar;
+ uint32_t *eepwr;
+ uint32_t *eectrl;
+ uint16_t checksum;
+ uint32_t i;
/* Get the BAR to memory mapped space */
bar = pci_read_config32(dev, 0x10);
if ((!bar) || ((address + count) > 0x40))
return I210_INVALID_PARAM;
- eepwr = (u32*)(bar + I210_REG_EEWRITE);
- eectrl = (u32*)(bar + I210_REG_EECTRL);
+ eepwr = (uint32_t*)(bar + I210_REG_EEWRITE);
+ eectrl = (uint32_t*)(bar + I210_REG_EECTRL);
/* Prior to start ensure flash interface is ready by checking DONE-bit */
if (wait_done(eepwr, I210_DONE))
return I210_NOT_READY;
@@ -145,8 +148,8 @@ static u32 write_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
if (wait_done(eepwr, I210_DONE))
return I210_WRITE_ERROR;
/* Up to now, desired data was written into shadowed RAM. We now need */
- /* to perform a flash cycle to bring the shadowed RAM into flash memory. */
- /* To start a flash cycle we need to set FLUPD-bit and wait for FLDONE. */
+ /* to perform a flash cycle to bring the shadowed RAM into flash. */
+ /* To start a flash cycle we need to set FLUPD and wait for FLDONE. */
*eectrl = *eectrl | I210_FLUPD;
if (wait_done(eectrl, I210_FLUDONE))
return I210_FLASH_UPDATE_ERROR;
@@ -158,16 +161,16 @@ static u32 write_flash(struct device *dev, u32 address, u32 count, u16 *buffer)
* @param *MACAdr Pointer to the buffer where to store read MAC address
* @return void I210_NO_ERROR or an error code
*/
-static u32 read_mac_adr(struct device *dev, u8 *mac_adr)
+static uint32_t read_mac_adr(struct device *dev, uint8_t *mac_adr)
{
- u16 adr[3];
+ uint16_t adr[3];
if (!dev || !mac_adr)
return I210_INVALID_PARAM;
if (read_flash(dev, 0, 3, adr))
return I210_READ_ERROR;
- /* Copy the address into destination. This is done because of */
- /* possible not matching alignment for destination to u16 boundary. */
- memcpy(mac_adr, (u8*)adr, 6);
+ /* Copy the address into destination. This is done because of possible */
+ /* not matching alignment for destination to uint16_t boundary. */
+ memcpy(mac_adr, (uint8_t*)adr, 6);
return I210_SUCCESS;
}
@@ -176,13 +179,13 @@ static u32 read_mac_adr(struct device *dev, u8 *mac_adr)
* @param *MACAdr Pointer to the buffer where the desired MAC address is
* @return void I210_NO_ERROR or an error code
*/
-static u32 write_mac_adr(struct device *dev, u8 *mac_adr)
+static uint32_t write_mac_adr(struct device *dev, uint8_t *mac_adr)
{
- u16 adr[3];
+ uint16_t adr[3];
if (!dev || !mac_adr)
return I210_INVALID_PARAM;
/* Copy desired address into a local buffer to avoid alignment issues */
- memcpy((u8*)adr, mac_adr, 6);
+ memcpy((uint8_t*)adr, mac_adr, 6);
return write_flash(dev, 0, 3, adr);
}
@@ -194,8 +197,8 @@ static u32 write_mac_adr(struct device *dev, u8 *mac_adr)
*/
static void init(struct device *dev)
{
- u8 cur_adr[6];
- u8 adr_to_set[6];
+ uint8_t cur_adr[6];
+ uint8_t adr_to_set[6];
enum cb_err status;
/*Check first whether there is a valid MAC address available */
diff --git a/src/mainboard/siemens/mc_tcu3/mainboard.c b/src/mainboard/siemens/mc_tcu3/mainboard.c
index e9c29a0..009c34d 100644
--- a/src/mainboard/siemens/mc_tcu3/mainboard.c
+++ b/src/mainboard/siemens/mc_tcu3/mainboard.c
@@ -39,10 +39,11 @@
* @param mac buffer where to store the MAC address
* @return cb_err CB_ERR or CB_SUCCESS
*/
-enum cb_err mainboard_get_mac_address(u16 bus, u8 devfn, u8 mac[6])
+enum cb_err mainboard_get_mac_address(uint16_t bus, uint8_t devfn,
+ uint8_t mac[6])
{
uint8_t mac_adr[6];
- u32 i;
+ uint32_t i;
/* Open main hwinfo block */
if (hwilib_find_blocks("hwinfo.hex") != CB_SUCCESS)
diff --git a/src/vendorcode/siemens/hwilib/hwilib.h b/src/vendorcode/siemens/hwilib/hwilib.h
index fb0798b..c66a99c 100644
--- a/src/vendorcode/siemens/hwilib/hwilib.h
+++ b/src/vendorcode/siemens/hwilib/hwilib.h
@@ -70,5 +70,6 @@ enum cb_err hwilib_find_blocks (const char *hwi_filename);
uint32_t hwilib_get_field (hwinfo_field_t field, uint8_t *data, uint32_t maxlen);
/* This functions needs to be implemented for every mainboard that uses i210. */
-enum cb_err mainboard_get_mac_address(u16 bus, u8 devfn, u8 mac[6]);
+enum cb_err mainboard_get_mac_address(uint16_t bus, uint8_t devfn,
+ uint8_t mac[6]);
#endif /* SIEMENS_HWI_LIB_H_ */