mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 18:21:35 +03:00
This patch adds a debugfs node to show DCE boot status. It also adds following dce boot marker in logs - DCE_BOOT_DONE - DCE_BOOT_FAILED JIRA TDS-5691 Change-Id: Iada5c1234e5e5f1a5e7afd88dcb94c2da6a3fe1c Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-t23x/+/2361287 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Santosh Galma <galmar@nvidia.com> Reviewed-by: Arun Swain <arswain@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: Santosh Galma <galmar@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
78 lines
1.7 KiB
C
78 lines
1.7 KiB
C
/*
|
|
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*/
|
|
|
|
#include <dce.h>
|
|
#include <dce-util-common.h>
|
|
|
|
/**
|
|
* dce_driver_init - Initializes the various sw components
|
|
* and few hw elements dce.
|
|
*
|
|
* @d : Pointer to tegra_dce struct.
|
|
*
|
|
* Return : 0 if successful.
|
|
*/
|
|
int dce_driver_init(struct tegra_dce *d)
|
|
{
|
|
int ret = 0;
|
|
|
|
ret = dce_boot_interface_init(d);
|
|
if (ret) {
|
|
dce_err(d, "dce boot interface init failed");
|
|
goto err_boot_interface_init;
|
|
}
|
|
|
|
ret = dce_admin_init(d);
|
|
if (ret) {
|
|
dce_err(d, "dce admin interface init failed");
|
|
goto err_admin_interface_init;
|
|
}
|
|
|
|
ret = dce_worker_thread_init(d);
|
|
if (ret) {
|
|
dce_err(d, "dce worker thread init failed");
|
|
goto err_worker_thread_init;
|
|
}
|
|
|
|
return ret;
|
|
|
|
err_worker_thread_init:
|
|
dce_admin_deinit(d);
|
|
err_admin_interface_init:
|
|
dce_boot_interface_deinit(d);
|
|
err_boot_interface_init:
|
|
d->boot_status |= DCE_STATUS_FAILED;
|
|
return ret;
|
|
}
|
|
|
|
/**
|
|
* dce_driver_deinit - Release various sw resources
|
|
* associated with dce.
|
|
*
|
|
* @d : Pointer to tegra_dce struct.
|
|
*
|
|
* Return : Void
|
|
*/
|
|
|
|
void dce_driver_deinit(struct tegra_dce *d)
|
|
{
|
|
/* TODO : Reset DCE ? */
|
|
dce_worker_thread_deinit(d);
|
|
|
|
dce_admin_deinit(d);
|
|
|
|
dce_boot_interface_deinit(d);
|
|
|
|
dce_release_fw(d, d->fw_data);
|
|
}
|