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>
This commit is contained in:
committed by
Furquan Shaikh
parent
9c30d06bfc
commit
99ce8a9bba
@@ -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 */
|
||||
|
Reference in New Issue
Block a user