示例#1
0
static void __exit hsi_driver_exit(void)
{
	platform_driver_unregister(&hsi_pdriver);
	hsi_debug_exit();
	hsi_bus_exit();
	pr_info(LOG_NAME "HSI DRIVER removed\n");
}
示例#2
0
/* HSI bus and platform driver registration */
static int __init hsi_driver_init(void)
{
    int err = 0;

    pr_info(LOG_NAME "HSI driver version " HSI_DRIVER_VERSION "\n");

    /* Register the (virtual) HSI bus */
    err = hsi_bus_init();
    if (err < 0) {
        pr_err(LOG_NAME "HSI bus_register err %d\n", err);
        return err;
    }

    err = hsi_debug_init();
    if (err < 0) {
        pr_err(LOG_NAME "HSI Debugfs failed %d\n", err);
        goto rback1;
    }

    /* Register the HSI platform driver */
    err = platform_driver_probe(&hsi_pdriver, hsi_platform_device_probe);
    if (err < 0) {
        pr_err(LOG_NAME "Platform DRIVER register FAILED: %d\n", err);
        goto rback2;
    }

    return 0;
rback2:
    hsi_debug_exit();
rback1:
    hsi_bus_exit();
    return err;
}
示例#3
0
static int __init hsi_driver_init(void)
{
	int err = 0;

	pr_info("HSI DRIVER Version " HSI_DRIVER_VERSION "\n");

	hsi_bus_init();
	err = hsi_debug_init();
	if (err < 0) {
		pr_err(LOG_NAME "HSI Debugfs failed %d\n", err);
		goto rback1;
	}
	err = platform_driver_probe(&hsi_pdriver, hsi_probe);
	if (err < 0) {
		pr_err(LOG_NAME "Platform DRIVER register FAILED: %d\n", err);
		goto rback2;
	}

	/* Set the CM_L3INIT_HSI_CLKCTRL to divide HSI_FCLK @192MHz by 2
	 *  to make the HSI works even if the OPP50 is set
	 * TODO : omap2_clk_set_parent() should be used */
	omap_writel(0x01000001, 0X4A009338);

	return 0;
rback2:
	hsi_debug_exit();
rback1:
	hsi_bus_exit();
	return err;
}