[coreboot-gerrit] New patch to review for coreboot: ab8b6d4 lenovo: Move pc_keyboard_init to h8 init.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Thu May 28 11:28:11 CEST 2015


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10348

-gerrit

commit ab8b6d4710d762a57591df53654c3fd0611dad5b
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Wed May 27 08:30:47 2015 +0200

    lenovo: Move pc_keyboard_init to h8 init.
    
    PS/2 emulation is part of H8, so should be inited in relevant files.
    
    Change-Id: Ie873ea7f6f88f68f622351799462d0b000d17585
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/ec/lenovo/h8/h8.c                  | 9 ++++++++-
 src/mainboard/lenovo/t420s/mainboard.c | 2 --
 src/mainboard/lenovo/t430s/mainboard.c | 2 --
 src/mainboard/lenovo/t520/mainboard.c  | 2 --
 src/mainboard/lenovo/t530/mainboard.c  | 5 -----
 src/mainboard/lenovo/x200/mainboard.c  | 9 ---------
 src/mainboard/lenovo/x201/mainboard.c  | 4 ----
 src/mainboard/lenovo/x220/mainboard.c  | 5 -----
 src/mainboard/lenovo/x230/mainboard.c  | 5 -----
 9 files changed, 8 insertions(+), 35 deletions(-)

diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 70424a1..46480f4 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <smbios.h>
 #include <pc80/mc146818rtc.h>
+#include <pc80/keyboard.h>
 
 #include "h8.h"
 #include "chip.h"
@@ -176,8 +177,14 @@ static void h8_smbios_strings(struct device *dev, struct smbios_type11 *t)
 	t->count = smbios_add_string(t->eos, tpec);
 }
 
+static void h8_init(device_t dev)
+{
+	pc_keyboard_init();
+}
+
 struct device_operations h8_dev_ops = {
-	.get_smbios_strings = h8_smbios_strings
+	.get_smbios_strings = h8_smbios_strings,
+	.init = h8_init,
 };
 
 static void h8_enable(struct device *dev)
diff --git a/src/mainboard/lenovo/t420s/mainboard.c b/src/mainboard/lenovo/t420s/mainboard.c
index afe14ab..96180ec 100644
--- a/src/mainboard/lenovo/t420s/mainboard.c
+++ b/src/mainboard/lenovo/t420s/mainboard.c
@@ -39,8 +39,6 @@ static void mainboard_init(device_t dev)
 	RCBA32(0x38c8) = 0x00002005;
 	RCBA32(0x38c4) = 0x00802005;
 	RCBA32(0x38c0) = 0x00000007;
-
-	pc_keyboard_init();
 }
 
 static void mainboard_enable(device_t dev)
diff --git a/src/mainboard/lenovo/t430s/mainboard.c b/src/mainboard/lenovo/t430s/mainboard.c
index f759499..a5cd083 100644
--- a/src/mainboard/lenovo/t430s/mainboard.c
+++ b/src/mainboard/lenovo/t430s/mainboard.c
@@ -39,8 +39,6 @@ static void mainboard_init(device_t dev)
 	RCBA32(0x38c8) = 0x00002005;
 	RCBA32(0x38c4) = 0x00802005;
 	RCBA32(0x38c0) = 0x00000007;
-
-	pc_keyboard_init();
 }
 
 static void mainboard_enable(device_t dev)
diff --git a/src/mainboard/lenovo/t520/mainboard.c b/src/mainboard/lenovo/t520/mainboard.c
index 7034c8a..a67459d 100644
--- a/src/mainboard/lenovo/t520/mainboard.c
+++ b/src/mainboard/lenovo/t520/mainboard.c
@@ -43,8 +43,6 @@ static void mainboard_init(device_t dev)
 	RCBA32(0x38c8) = 0x00002005;
 	RCBA32(0x38c4) = 0x00802005;
 	RCBA32(0x38c0) = 0x00000007;
-
-	pc_keyboard_init();
 }
 
 /* mainboard_enable is executed as first thing after
diff --git a/src/mainboard/lenovo/t530/mainboard.c b/src/mainboard/lenovo/t530/mainboard.c
index 9cc0baf..c258731 100644
--- a/src/mainboard/lenovo/t530/mainboard.c
+++ b/src/mainboard/lenovo/t530/mainboard.c
@@ -43,11 +43,6 @@ static void mainboard_init(device_t dev)
 	RCBA32(0x38c8) = 0x00002005;
 	RCBA32(0x38c4) = 0x00802005;
 	RCBA32(0x38c0) = 0x00000007;
-
-	/* This sneaked in here, because X201 SuperIO chip isn't really
-	   connected to anything and hence we don't init it.
-	 */
-	pc_keyboard_init();
 }
 
 // mainboard_enable is executed as first thing after
diff --git a/src/mainboard/lenovo/x200/mainboard.c b/src/mainboard/lenovo/x200/mainboard.c
index 518b51a..3ec615f 100644
--- a/src/mainboard/lenovo/x200/mainboard.c
+++ b/src/mainboard/lenovo/x200/mainboard.c
@@ -37,19 +37,10 @@ static void fill_ssdt(void)
 	drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
 }
 
-static void mainboard_init(device_t dev)
-{
-	/* This sneaked in here, because X200 SuperIO chip isn't really
-	   connected to anything and hence we don't init it.
-	 */
-	pc_keyboard_init();
-}
-
 static void mainboard_enable(device_t dev)
 {
 	install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 2);
 
-	dev->ops->init = mainboard_init;
 	dev->ops->acpi_fill_ssdt_generator = fill_ssdt;
 }
 
diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c
index 85c27b2..a4da528 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -85,10 +85,6 @@ static void mainboard_init(device_t dev)
 	RCBA32(0x3804) = 0x3f04e008;
 
 	printk(BIOS_SPEW, "SPI configured\n");
-	/* This sneaked in here, because X201 SuperIO chip isn't really
-	   connected to anything and hence we don't init it.
-	 */
-	pc_keyboard_init();
 }
 
 static void fill_ssdt(void)
diff --git a/src/mainboard/lenovo/x220/mainboard.c b/src/mainboard/lenovo/x220/mainboard.c
index c22744b..c557031 100644
--- a/src/mainboard/lenovo/x220/mainboard.c
+++ b/src/mainboard/lenovo/x220/mainboard.c
@@ -38,11 +38,6 @@ static void mainboard_init(device_t dev)
 	RCBA32(0x38c8) = 0x00002005;
 	RCBA32(0x38c4) = 0x00802005;
 	RCBA32(0x38c0) = 0x00000007;
-
-	/* This sneaked in here, because X201 SuperIO chip isn't really
-	   connected to anything and hence we don't init it.
-	 */
-	pc_keyboard_init();
 }
 
 // mainboard_enable is executed as first thing after
diff --git a/src/mainboard/lenovo/x230/mainboard.c b/src/mainboard/lenovo/x230/mainboard.c
index dfbc244..285020f 100644
--- a/src/mainboard/lenovo/x230/mainboard.c
+++ b/src/mainboard/lenovo/x230/mainboard.c
@@ -39,11 +39,6 @@ static void mainboard_init(device_t dev)
 	RCBA32(0x38c8) = 0x00002005;
 	RCBA32(0x38c4) = 0x00802005;
 	RCBA32(0x38c0) = 0x00000007;
-
-	/* This sneaked in here, because X201 SuperIO chip isn't really
-	   connected to anything and hence we don't init it.
-	 */
-	pc_keyboard_init();
 }
 
 // mainboard_enable is executed as first thing after



More information about the coreboot-gerrit mailing list