Peter Lemenkov uploaded patch set #2 to this change.

View Change

Unify all Lenovo t520 variants

It looks that L520 is almost the same as other two T520 variants. So
let's remove duplicated code.

The only difference between l520 and t520/w520 which i'm not sure is
cmos.layout and cmos.defaults settings. Here is a diff:

============================
diff --git a/src/mainboard/lenovo/t520/cmos.default b/src/mainboard/lenovo/t520/cmos.default
index 979f132863..6e61dae340 100644
--- a/src/mainboard/lenovo/t520/cmos.default
+++ b/src/mainboard/lenovo/t520/cmos.default
@@ -13,4 +13,5 @@ fn_ctrl_swap=Disable
sticky_fn=Disable
trackpoint=Enable
backlight=Both
+hybrid_graphics_mode=Integrated Only
usb_always_on=Disable
diff --git a/src/mainboard/lenovo/t520/cmos.layout b/src/mainboard/lenovo/t520/cmos.layout
index 60292a401b..1a7943e5a4 100644
--- a/src/mainboard/lenovo/t520/cmos.layout
+++ b/src/mainboard/lenovo/t520/cmos.layout
@@ -68,7 +68,7 @@ entries
416 1 e 1 trackpoint
417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn
-419 2 e 12 usb_always_on
+419 2 e 13 usb_always_on
421 1 e 9 sata_mode
422 2 e 10 backlight

@@ -77,7 +77,8 @@ entries

# coreboot config options: northbridge
432 3 e 11 gfx_uma_size
-#435 5 r 0 unused
+435 2 e 12 hybrid_graphics_mode
+#437 3 r 0 unused
440 8 h 0 volume

# SandyBridge MRC Scrambler Seed values
@@ -126,9 +127,12 @@ enumerations
11 4 160M
11 5 192M
11 6 224M
-12 0 Disable
-12 1 AC and battery
-12 2 AC only
+12 0 Integrated Only
+12 1 Discrete Only
+12 2 Dual Graphics
+13 0 Disable
+13 1 AC and battery
+13 2 AC only

# -----------------------------------------------------------------
checksums

============================

The only change from L520 is the addition of a hybrid graphics field
(12) and change usb_always_on from this 12 to the next value, e.g. 13.

I believe this is ok, since these numbers are used by Coreboot itself so
any new L520 user will have the updated cmos mappings.

In the mean time I'm going to unify more Lenovo (if anyone finds it
interesting and valuable). Then I'll try to fix autoport utility
accordingly.

Change-Id: I936ec6e51dc74637439d8562070443904071708c
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
D src/mainboard/lenovo/l520/Kconfig
D src/mainboard/lenovo/l520/Kconfig.name
D src/mainboard/lenovo/l520/Makefile.inc
D src/mainboard/lenovo/l520/acpi/ec.asl
D src/mainboard/lenovo/l520/acpi/platform.asl
D src/mainboard/lenovo/l520/acpi/superio.asl
D src/mainboard/lenovo/l520/acpi_tables.c
D src/mainboard/lenovo/l520/cmos.default
D src/mainboard/lenovo/l520/cmos.layout
D src/mainboard/lenovo/l520/dsdt.asl
D src/mainboard/lenovo/l520/hda_verb.c
D src/mainboard/lenovo/l520/mainboard.c
D src/mainboard/lenovo/l520/smihandler.c
D src/mainboard/lenovo/l520/thermal.h
M src/mainboard/lenovo/t520/Kconfig
M src/mainboard/lenovo/t520/Kconfig.name
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t520/acpi/platform.asl
M src/mainboard/lenovo/t520/acpi/superio.asl
M src/mainboard/lenovo/t520/acpi_tables.c
M src/mainboard/lenovo/t520/dsdt.asl
M src/mainboard/lenovo/t520/hda_verb.c
M src/mainboard/lenovo/t520/mainboard.c
M src/mainboard/lenovo/t520/smihandler.c
M src/mainboard/lenovo/t520/thermal.h
R src/mainboard/lenovo/t520/variants/l520/board_info.txt
R src/mainboard/lenovo/t520/variants/l520/devicetree.cb
R src/mainboard/lenovo/t520/variants/l520/gpio.c
R src/mainboard/lenovo/t520/variants/l520/romstage.c
29 files changed, 151 insertions(+), 629 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/28936/2

To view, visit change 28936. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I936ec6e51dc74637439d8562070443904071708c
Gerrit-Change-Number: 28936
Gerrit-PatchSet: 2
Gerrit-Owner: Peter Lemenkov <lemenkov@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>