Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8113
-gerrit
commit c232f7e3de9abae02a9e4d0eed454a33bcf4a766
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Mon Jan 5 13:05:44 2015 -0800
superio: Drop print_ implementation from non-romcc boards
Because we have no stack on romcc boards, we had a separate, not as
powerful clone of printk: print_*. Back in the day, like more than
half a decade ago, we migrated a lot of boards to printk, but we never
cleaned up the existing code to be consistent. instead, we worked around
the problem with a very messy console.h (nowadays the mess is hidden in
romstage_console.c and early_print.h)
This patch cleans up the superio code to use printk() on all non-ROMCC
boards.
Change-Id: I23fc307f1346cdb7adaaeccfafe17d9205e909ac
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/superio/serverengines/pilot/early_init.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/superio/serverengines/pilot/early_init.c b/src/superio/serverengines/pilot/early_init.c
index 6635645..b609572 100644
--- a/src/superio/serverengines/pilot/early_init.c
+++ b/src/superio/serverengines/pilot/early_init.c
@@ -36,11 +36,9 @@ void pilot_early_init(pnp_devfn_t dev)
{
u16 port = dev >> 8;
- print_debug("Using port: ");
- print_debug_hex16(port);
- print_debug("\n");
+ printk(BIOS_DEBUG, "Using port: %04x\n", port);
pilot_disable_serial(PNP_DEV(port, 0x1));
- print_debug("disable serial 1\n");
+ printk(BIOS_DEBUG, "disable serial 1\n");
pnp_enter_ext_func_mode(dev);
pnp_set_logical_device(PNP_DEV(port, 0x3));
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8112
-gerrit
commit 79a91233f3c802e1c1077b5c664abe679973d465
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Mon Jan 5 13:03:43 2015 -0800
superio/smsc/lpc47n217: Drop dead code
This code is unused, and the same functionality is in superiotool
already.
Change-Id: I7bf667e2e2bfc8fdedcdbe09bf420abf47b1ee97
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/superio/smsc/lpc47n217/superio.c | 40 ------------------------------------
1 file changed, 40 deletions(-)
diff --git a/src/superio/smsc/lpc47n217/superio.c b/src/superio/smsc/lpc47n217/superio.c
index 96dd4e2..85de359 100644
--- a/src/superio/smsc/lpc47n217/superio.c
+++ b/src/superio/smsc/lpc47n217/superio.c
@@ -276,43 +276,3 @@ static void pnp_exit_conf_state(struct device *dev)
{
outb(0xaa, dev->path.pnp.port);
}
-
-#if 0
-/**
- * Print the values of all of the LPC47N217's configuration registers.
- *
- * NOTE: The LPC47N217 must be in config mode when this function is called.
- *
- * @param dev Pointer to structure describing a Super I/O device.
- */
-static void dump_pnp_device(struct device *dev)
-{
- int i;
- print_debug("\n");
-
- for (i = 0; i <= LPC47N217_MAX_CONFIG_REGISTER; i++) {
- u8 register_value;
-
- if ((i & 0x0f) == 0) {
- print_debug_hex8(i);
- print_debug_char(':');
- }
-
- /*
- * Skip over 'register' that would cause exit from
- * configuration mode.
- */
- if (i == 0xaa)
- register_value = 0xaa;
- else
- register_value = pnp_read_config(dev, i);
-
- print_debug_char(' ');
- print_debug_hex8(register_value);
- if ((i & 0x0f) == 0x0f)
- print_debug("\n");
- }
-
- print_debug("\n");
-}
-#endif
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8109
-gerrit
commit 77f924f8239af067a40b43bdc7ab27abd0dbb904
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Mon Jan 5 11:09:11 2015 -0800
Move container_of() macro to stddef.h
It's not a SPI related macro, hence move it to stddef.h where
other similar macros live.
Change-Id: I1008894af7a272f1bc36d3ae6cee3881132b6ba9
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/include/spi_flash.h | 11 -----------
src/include/stddef.h | 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h
index 7cf0229..8b8b0c5 100644
--- a/src/include/spi_flash.h
+++ b/src/include/spi_flash.h
@@ -28,17 +28,6 @@
#include <console/console.h>
#include <spi-generic.h>
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
struct spi_flash {
struct spi_slave *spi;
diff --git a/src/include/stddef.h b/src/include/stddef.h
index 137de04..2c41c5e 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -32,6 +32,17 @@ typedef unsigned int wint_t;
offsetof(struct structure, member) == offset, \
"`struct " #structure "` offset for `" #member "` is not " #offset )
+/**
+ * container_of - cast a member of a structure out to the containing structure
+ * @ptr: the pointer to the member.
+ * @type: the type of the container struct this is embedded in.
+ * @member: the name of the member within the struct.
+ *
+ */
+#define container_of(ptr, type, member) ({ \
+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
+ (type *)( (char *)__mptr - offsetof(type,member) );})
+
#ifdef __PRE_RAM__
#define ROMSTAGE_CONST const
#else
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8109
-gerrit
commit a68bde222cd70e1c61f497ff2931611402d1d5e4
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Mon Jan 5 11:09:11 2015 -0800
Move container_of() macro to stddef.h
It's not a SPI related macro, hence move it to stddef.h where
other similar macros live.
Change-Id: I1008894af7a272f1bc36d3ae6cee3881132b6ba9
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
src/include/spi_flash.h | 11 -----------
src/include/stddef.h | 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h
index 7cf0229..8b8b0c5 100644
--- a/src/include/spi_flash.h
+++ b/src/include/spi_flash.h
@@ -28,17 +28,6 @@
#include <console/console.h>
#include <spi-generic.h>
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
struct spi_flash {
struct spi_slave *spi;
diff --git a/src/include/stddef.h b/src/include/stddef.h
index 137de04..2c41c5e 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -32,6 +32,17 @@ typedef unsigned int wint_t;
offsetof(struct structure, member) == offset, \
"`struct " #structure "` offset for `" #member "` is not " #offset )
+/**
+ * container_of - cast a member of a structure out to the containing structure
+ * @ptr: the pointer to the member.
+ * @type: the type of the container struct this is embedded in.
+ * @member: the name of the member within the struct.
+ *
+ */
+#define container_of(ptr, type, member) ({ \
+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
+ (type *)( (char *)__mptr - offsetof(type,member) );})
+
#ifdef __PRE_RAM__
#define ROMSTAGE_CONST const
#else