diff options
author | Venkateswarlu Vinjamuri <venkateswarlu.v.vinjamuri@intel.com> | 2017-03-22 18:24:52 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2017-04-13 19:50:34 +0200 |
commit | 99ce8a9bba091f9f57e46c48fa1493525c77b373 (patch) | |
tree | 9d0eb54b0f803fbed3280e36d0ac1372c8601e7e /src/soc/intel/apollolake/acpi.c | |
parent | 9c30d06bfc3ab70234b79922c0603f9a67fe4f0f (diff) | |
download | coreboot-99ce8a9bba091f9f57e46c48fa1493525c77b373.tar.xz |
soc/intel/apollolake: Set sdcard card detect (CD) host ownership
Currently sdcard CD host ownership is always owned by the GPIO driver.
Due to this sdcard detection fails during initial boot process and OS
fails to boot from sdcard.
This implements change in host ownership from acpi to GPIO driver when
kernel starts booting.
BUG=b:35648535
TEST=Check OS boot from sdcard.
Change-Id: I042a8762dc1f9cb73e6a24c1e7169c9746b2ee14
Signed-off-by: Venkateswarlu Vinjamuri <venkateswarlu.v.vinjamuri@intel.com>
Reviewed-on: https://review.coreboot.org/18947
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Vaibhav Shankar <vaibhav.shankar@intel.com>
Diffstat (limited to 'src/soc/intel/apollolake/acpi.c')
-rw-r--r-- | src/soc/intel/apollolake/acpi.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/soc/intel/apollolake/acpi.c b/src/soc/intel/apollolake/acpi.c index 9f57206b38..2adb76e2c4 100644 --- a/src/soc/intel/apollolake/acpi.c +++ b/src/soc/intel/apollolake/acpi.c @@ -30,6 +30,7 @@ #include <soc/pci_devs.h> #include <string.h> #include <soc/gpio.h> +#include <gpio.h> #include "chip.h" #define CSTATE_RES(address_space, width, offset, address) \ @@ -185,9 +186,13 @@ static void acpi_create_gnvs(struct global_nvs_t *gnvs) if (cfg->prt0_gpio != GPIO_PRT0_UDEF) gnvs->prt0 = (uintptr_t)gpio_dwx_address(cfg->prt0_gpio); - /* Assign sdcard cd address if GPIO is defined in devicetree */ - if (cfg->sdcard_cd_gpio) - gnvs->scd0 = (uintptr_t)gpio_dwx_address(cfg->sdcard_cd_gpio); + /* Get sdcard cd GPIO portid if GPIO is defined in devicetree. + * Get offset of sdcard cd pin. + */ + if (cfg->sdcard_cd_gpio) { + gnvs->scdp = gpio_get_pad_portid(cfg->sdcard_cd_gpio); + gnvs->scdo = gpio_acpi_pin(cfg->sdcard_cd_gpio); + } } /* Save wake source information for calculating ACPI _SWS values */ |