// SPDX-License-Identifier: GPL-2.0-only /* * linux/arch/arm/mach-pxa/gumstix.c * * Support for the Gumstix motherboards. * * Original Author: Craig Hughes * Created: Feb 14, 2008 * Copyright: Craig Hughes * * Implemented based on lubbock.c by Nicolas Pitre and code from Craig * Hughes
*/
#ifdef CONFIG_BT /* Normally, the bootloader would have enabled this 32kHz clock but many ** boards still have u-boot 1.1.4 so we check if it has been turned on and
** 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
int __attribute__((weak)) am200_init(void)
{ return 0;
}
int __attribute__((weak)) am300_init(void)
{ return 0;
}
staticvoid __init carrier_board_init(void)
{ /* * put carrier/expansion board init here if * they cannot be detected programatically
*/
am200_init();
am300_init();
}
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.