aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/i210/i210.h
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2015-02-13 12:18:58 +0100
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2015-02-24 07:08:11 +0100
commit63693dca06314d44601c9dec713290c694719935 (patch)
treee59d7a73900f726f004cb2dd634493e15b04dd8e /src/drivers/intel/i210/i210.h
parent5b4b024af2159d8a3ea3d6c9cf1eb5cf4cd0ac45 (diff)
drivers/intel/i210: Add new driver for Intel i210 MACPHY
Add a new driver for Intel i210 MACPHY with the goal to update the MAC address in i210 if it is found during PCI scan. Change-Id: I4d4e797543a9f278fb649596f63ae8e1f285b3c3 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: http://review.coreboot.org/8404 Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/drivers/intel/i210/i210.h')
-rw-r--r--src/drivers/intel/i210/i210.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/drivers/intel/i210/i210.h b/src/drivers/intel/i210/i210.h
new file mode 100644
index 0000000000..b4f18ecd1b
--- /dev/null
+++ b/src/drivers/intel/i210/i210.h
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 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
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _INTEL_I210_H_
+#define _INTEL_I210_H_
+
+#define I210_PCI_MEM_BAR_OFFSET 0x10
+#define I210_REG_EECTRL 0x12010 /* Offset for EEPROM control reg */
+#define I210_FLUPD 0x800000 /* Start flash update bit */
+#define I210_FLUDONE 0x4000000 /* Flash update done indicator */
+#define I210_REG_EEREAD 0x12014 /* Offset for EEPROM read reg */
+#define I210_REG_EEWRITE 0x12018 /* Offset for EEPROM write reg */
+#define I210_CMDV 0x01 /* command valid bit */
+#define I210_DONE 0x02 /* command done bit */
+#define I210_TARGET_CHECKSUM 0xBABA /* resulting checksum */
+
+
+/*define some other useful values here */
+#define I210_POLL_TIMEOUT_US 300000 /* 300 ms */
+/*Define some error states here*/
+#define I210_SUCCESS 0x00000000
+#define I210_INVALID_PARAM 0x00000001
+#define I210_NOT_READY 0x00000002
+#define I210_READ_ERROR 0x00000004
+#define I210_WRITE_ERROR 0x00000008
+#define I210_CHECKSUM_ERROR 0x00000010
+#define I210_FLASH_UPDATE_ERROR 0x00000020
+
+#endif /* _INTEL_I210_H_ */