<p>Anonymous Coward #1001983 has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26137">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Remove backuped file<br><br>Change-Id: Ib048b47f5d4a597b27ebce367204ca480a40e65e<br>Signed-off-by: ch1p <me@ch1p.com><br>---<br>D src/mainboard/lenovo/w530/smihandler.c.bak<br>1 file changed, 0 insertions(+), 103 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/26137/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/mainboard/lenovo/w530/smihandler.c.bak b/src/mainboard/lenovo/w530/smihandler.c.bak</span><br><span>deleted file mode 100644</span><br><span>index 88460be..0000000</span><br><span>--- a/src/mainboard/lenovo/w530/smihandler.c.bak</span><br><span>+++ /dev/null</span><br><span>@@ -1,103 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span style="color: hsl(0, 100%, 40%);">- * This file is part of the coreboot project.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (C) 2008-2009 coresystems GmbH</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (C) 2014 Vladimir Serbinenko</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or</span><br><span style="color: hsl(0, 100%, 40%);">- * modify it under the terms of the GNU General Public License as</span><br><span style="color: hsl(0, 100%, 40%);">- * published by the Free Software Foundation; version 2 of</span><br><span style="color: hsl(0, 100%, 40%);">- * the License.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(0, 100%, 40%);">- * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(0, 100%, 40%);">- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(0, 100%, 40%);">- * GNU General Public License for more details.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include <arch/io.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <console/console.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <cpu/x86/smm.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <ec/acpi/ec.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <ec/lenovo/h8/h8.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <delay.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <southbridge/intel/bd82x6x/pch.h></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#define GPE_EC_SCI      1</span><br><span style="color: hsl(0, 100%, 40%);">-/* FIXME: check this */</span><br><span style="color: hsl(0, 100%, 40%);">-#define GPE_EC_WAKE     13</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-static void mainboard_smm_init(void)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">- printk(BIOS_DEBUG, "initializing SMI\n");</span><br><span style="color: hsl(0, 100%, 40%);">-     /* Enable 0x1600/0x1600 register pair */</span><br><span style="color: hsl(0, 100%, 40%);">-        ec_set_bit(0x00, 0x05);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-int mainboard_io_trap_handler(int smif)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-        static int smm_initialized;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-     if (!smm_initialized) {</span><br><span style="color: hsl(0, 100%, 40%);">-         mainboard_smm_init();</span><br><span style="color: hsl(0, 100%, 40%);">-           smm_initialized = 1;</span><br><span style="color: hsl(0, 100%, 40%);">-    }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-       return 0;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-static void mainboard_smi_handle_ec_sci(void)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-        u8 status = inb(EC_SC);</span><br><span style="color: hsl(0, 100%, 40%);">- u8 event;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-       if (!(status & EC_SCI_EVT))</span><br><span style="color: hsl(0, 100%, 40%);">-         return;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- event = ec_query();</span><br><span style="color: hsl(0, 100%, 40%);">-     printk(BIOS_DEBUG, "EC event %02x\n", event);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-void mainboard_smi_gpi(u32 gpi_sts)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-    if (gpi_sts & (1 << GPE_EC_SCI))</span><br><span style="color: hsl(0, 100%, 40%);">-              mainboard_smi_handle_ec_sci();</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-int mainboard_smi_apmc(u8 data)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">- switch (data) {</span><br><span style="color: hsl(0, 100%, 40%);">- case APM_CNT_ACPI_ENABLE:</span><br><span style="color: hsl(0, 100%, 40%);">-               /* use 0x1600/0x1604 to prevent races with userspace */</span><br><span style="color: hsl(0, 100%, 40%);">-         ec_set_ports(0x1604, 0x1600);</span><br><span style="color: hsl(0, 100%, 40%);">-           /* route EC_SCI to SCI */</span><br><span style="color: hsl(0, 100%, 40%);">-               gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SCI);</span><br><span style="color: hsl(0, 100%, 40%);">-            /* discard all events, and enable attention */</span><br><span style="color: hsl(0, 100%, 40%);">-          ec_write(0x80, 0x01);</span><br><span style="color: hsl(0, 100%, 40%);">-           break;</span><br><span style="color: hsl(0, 100%, 40%);">-  case APM_CNT_ACPI_DISABLE:</span><br><span style="color: hsl(0, 100%, 40%);">-              /* we have to use port 0x62/0x66, as 0x1600/0x1604 doesn't</span><br><span style="color: hsl(0, 100%, 40%);">-             provide a EC query function */</span><br><span style="color: hsl(0, 100%, 40%);">-               ec_set_ports(0x66, 0x62);</span><br><span style="color: hsl(0, 100%, 40%);">-               /* route EC_SCI to SMI */</span><br><span style="color: hsl(0, 100%, 40%);">-               gpi_route_interrupt(GPE_EC_SCI, GPI_IS_SMI);</span><br><span style="color: hsl(0, 100%, 40%);">-            /* discard all events, and enable attention */</span><br><span style="color: hsl(0, 100%, 40%);">-          ec_write(0x80, 0x01);</span><br><span style="color: hsl(0, 100%, 40%);">-           break;</span><br><span style="color: hsl(0, 100%, 40%);">-  default:</span><br><span style="color: hsl(0, 100%, 40%);">-                break;</span><br><span style="color: hsl(0, 100%, 40%);">-  }</span><br><span style="color: hsl(0, 100%, 40%);">-       return 0;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-void mainboard_smi_sleep(u8 slp_typ)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">- if (slp_typ == 3) {</span><br><span style="color: hsl(0, 100%, 40%);">-             u8 ec_wake = ec_read(0x32);</span><br><span style="color: hsl(0, 100%, 40%);">-             /* If EC wake events are enabled, enable wake on EC WAKE GPE.  */</span><br><span style="color: hsl(0, 100%, 40%);">-               if (ec_wake & 0x14) {</span><br><span style="color: hsl(0, 100%, 40%);">-                       /* Redirect EC WAKE GPE to SCI.  */</span><br><span style="color: hsl(0, 100%, 40%);">-                     gpi_route_interrupt(GPE_EC_WAKE, GPI_IS_SCI);</span><br><span style="color: hsl(0, 100%, 40%);">-           }</span><br><span style="color: hsl(0, 100%, 40%);">-       }</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26137">change 26137</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/26137"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib048b47f5d4a597b27ebce367204ca480a40e65e </div>
<div style="display:none"> Gerrit-Change-Number: 26137 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Anonymous Coward #1001983 </div>