Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sdhci/sdhci.c
Show First 20 Lines • Show All 1,045 Lines • ▼ Show 20 Lines | callout_reset(&slot->card_poll_callout, | ||||
SDHCI_CARD_PRESENT_TICKS, sdhci_card_poll, slot); | SDHCI_CARD_PRESENT_TICKS, sdhci_card_poll, slot); | ||||
} | } | ||||
sdhci_init(slot); | sdhci_init(slot); | ||||
return (0); | return (0); | ||||
} | } | ||||
#ifndef MMCCAM | |||||
void | void | ||||
sdhci_start_slot(struct sdhci_slot *slot) | sdhci_start_slot(struct sdhci_slot *slot) | ||||
{ | { | ||||
sdhci_card_task(slot, 0); | sdhci_card_task(slot, 0); | ||||
} | } | ||||
#endif | |||||
int | int | ||||
sdhci_cleanup_slot(struct sdhci_slot *slot) | sdhci_cleanup_slot(struct sdhci_slot *slot) | ||||
{ | { | ||||
device_t d; | device_t d; | ||||
callout_drain(&slot->timeout_callout); | callout_drain(&slot->timeout_callout); | ||||
callout_drain(&slot->card_poll_callout); | callout_drain(&slot->card_poll_callout); | ||||
▲ Show 20 Lines • Show All 1,310 Lines • ▼ Show 20 Lines | sdhci_generic_write_ivar(device_t bus, device_t child, int which, | ||||
case MMCBR_IVAR_RETUNE_REQ: | case MMCBR_IVAR_RETUNE_REQ: | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
#ifdef MMCCAM | #ifdef MMCCAM | ||||
void | void | ||||
sdhci_cam_start_slot(struct sdhci_slot *slot) | sdhci_start_slot(struct sdhci_slot *slot) | ||||
{ | { | ||||
if ((slot->devq = cam_simq_alloc(1)) == NULL) { | if ((slot->devq = cam_simq_alloc(1)) == NULL) { | ||||
goto fail; | goto fail; | ||||
} | } | ||||
mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); | mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); | ||||
slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, | slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, | ||||
"sdhci_slot", slot, device_get_unit(slot->bus), | "sdhci_slot", slot, device_get_unit(slot->bus), | ||||
▲ Show 20 Lines • Show All 304 Lines • Show Last 20 Lines |