#ifdef CONFIG_BT /* Normally, the bootloader would have enabled this 32kHz clock but many **boardsstillhaveu-boot1.1.4sowecheckifithasbeenturnedonand
** if not, we turn it on with a warning message. */ staticvoid gumstix_setup_bt_clock(void)
{ int timeout = 500;
if (!(readl(OSCC) & OSCC_OOK))
pr_warn("32kHz clock was not on. Bootloader may need to be updated\n"); else return;
writel(readl(OSCC) | OSCC_OON, OSCC); do { if (readl(OSCC) & OSCC_OOK) break;
udelay(1);
} while (--timeout); if (!timeout)
pr_err("Failed to start 32kHz clock\n");
}
staticvoid __init gumstix_bluetooth_init(void)
{ int err;
gumstix_setup_bt_clock();
err = gpio_request(GPIO_GUMSTIX_BTRESET, "BTRST"); if (err) {
pr_err("gumstix: failed request gpio for bluetooth reset\n"); return;
}
err = gpio_direction_output(GPIO_GUMSTIX_BTRESET, 1); if (err) {
pr_err("gumstix: can't reset bluetooth\n"); return;
}
gpio_set_value(GPIO_GUMSTIX_BTRESET, 0);
udelay(100);
gpio_set_value(GPIO_GUMSTIX_BTRESET, 1);
} #else staticvoid gumstix_bluetooth_init(void)
{
pr_debug("Gumstix Bluetooth is disabled\n");
} #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.