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/gpio.c | |
parent | 9c30d06bfc3ab70234b79922c0603f9a67fe4f0f (diff) |
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/gpio.c')
-rw-r--r-- | src/soc/intel/apollolake/gpio.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/gpio.c b/src/soc/intel/apollolake/gpio.c index cb41925cd4..d9957726eb 100644 --- a/src/soc/intel/apollolake/gpio.c +++ b/src/soc/intel/apollolake/gpio.c @@ -186,6 +186,16 @@ void *gpio_dwx_address(const uint16_t pad) PAD_CFG_OFFSET(pad - comm->first_pad)); } +uint8_t gpio_get_pad_portid(const uint16_t pad) +{ + /* Get the port id of given pad + * pad - GPIO number + * returns - given pad port id + */ + const struct pad_community *comm = gpio_get_community(pad); + return comm->port; +} + void gpio_input_pulldown(gpio_t gpio) { struct pad_config cfg = PAD_CFG_GPI(gpio, DN_20K, DEEP); |