diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-01-10 19:30:54 +0100 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-01-23 20:32:41 +0100 |
commit | 4c8b1ee14a0a293289fe90e4c25032979b35adbb (patch) | |
tree | 4a6f955d646868863281be5023f3df807dd497de /src/mainboard | |
parent | 786c0f5fca4735f4d4b8d680749f6ef8b6198a3f (diff) | |
download | coreboot-4c8b1ee14a0a293289fe90e4c25032979b35adbb.tar.xz |
X201: Enable expresscard hotplug.
Change-Id: Ieefc2ad775c16de9aa974b2602d55ee047c9f568
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4643
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/lenovo/x201/acpi/gpe.asl | 14 | ||||
-rw-r--r-- | src/mainboard/lenovo/x201/devicetree.cb | 5 | ||||
-rw-r--r-- | src/mainboard/lenovo/x201/dsdt.asl | 1 | ||||
-rw-r--r-- | src/mainboard/lenovo/x201/mainboard.c | 8 |
4 files changed, 28 insertions, 0 deletions
diff --git a/src/mainboard/lenovo/x201/acpi/gpe.asl b/src/mainboard/lenovo/x201/acpi/gpe.asl index b160b5015f..2f0ee16695 100644 --- a/src/mainboard/lenovo/x201/acpi/gpe.asl +++ b/src/mainboard/lenovo/x201/acpi/gpe.asl @@ -27,4 +27,18 @@ Scope (\_GPE) /* Read EC register to clear wake status */ Store(\_SB.PCI0.LPCB.EC.WAKE, Local0) } + + Method (_L01, 0, NotSerialized) + { + If (\_SB.PCI0.RP04.HPCS) + { + Sleep (100) + Store (0x01, \_SB.PCI0.RP04.HPCS) + If (\_SB.PCI0.RP04.PDC) + { + Store (0x01, \_SB.PCI0.RP04.PDC) + Notify (\_SB.PCI0.RP04, 0x00) + } + } + } } diff --git a/src/mainboard/lenovo/x201/devicetree.cb b/src/mainboard/lenovo/x201/devicetree.cb index f45fadfc8b..a8831c2691 100644 --- a/src/mainboard/lenovo/x201/devicetree.cb +++ b/src/mainboard/lenovo/x201/devicetree.cb @@ -129,6 +129,11 @@ chip northbridge/intel/nehalem device pci 1b.0 on # Audio Controller subsystemid 0x17aa 0x215e end + + device pci 1c.0 on end # PCIe Port #1 + device pci 1c.3 on end # PCIe Port #4 (Expresscard) + device pci 1c.4 on end # PCIe Port #4 (wlan) + device pci 1d.0 on # USB2 EHCI subsystemid 0x17aa 0x2163 end diff --git a/src/mainboard/lenovo/x201/dsdt.asl b/src/mainboard/lenovo/x201/dsdt.asl index 783122ecb3..0c921a6f9c 100644 --- a/src/mainboard/lenovo/x201/dsdt.asl +++ b/src/mainboard/lenovo/x201/dsdt.asl @@ -23,6 +23,7 @@ #define BRIGHTNESS_UP \_SB.PCI0.GFX0.LCD0.INCB #define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.LCD0.DECB #define ACPI_VIDEO_DEVICE \_SB.PCI0.GFX0 +#define RP04_IS_EXPRESSCARD 1 DefinitionBlock( "dsdt.aml", diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c index 75e44f4856..c16c3a4ccc 100644 --- a/src/mainboard/lenovo/x201/mainboard.c +++ b/src/mainboard/lenovo/x201/mainboard.c @@ -163,6 +163,14 @@ static void mainboard_enable(device_t dev) */ pc_keyboard_init(0); verb_setup(); + + /* Enable expresscard hotplug events. */ + pci_write_config32(dev_find_slot(0, PCI_DEVFN(0x1c, 3)), + 0xd8, + pci_read_config32(dev_find_slot(0, PCI_DEVFN(0x1c, 3)), 0xd8) + | (1 << 30)); + pci_write_config16(dev_find_slot(0, PCI_DEVFN(0x1c, 3)), + 0x42, 0x142); } struct chip_operations mainboard_ops = { |