Loading drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.c +4 −2 Original line number Original line Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only /* /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. */ */ #include <linux/of.h> #include <linux/of.h> Loading Loading @@ -44,7 +44,8 @@ static int cam_ope_top_reset(struct ope_hw *ope_hw_info, top_reg = ope_hw_info->top_reg; top_reg = ope_hw_info->top_reg; top_reg_val = ope_hw_info->top_reg_val; top_reg_val = ope_hw_info->top_reg_val; init_completion(&ope_top_info.reset_complete); mutex_lock(&ope_top_info.ope_hw_mutex); reinit_completion(&ope_top_info.reset_complete); /* enable interrupt mask */ /* enable interrupt mask */ cam_io_w_mb(top_reg_val->irq_mask, cam_io_w_mb(top_reg_val->irq_mask, Loading @@ -70,6 +71,7 @@ static int cam_ope_top_reset(struct ope_hw *ope_hw_info, cam_io_w_mb(top_reg_val->irq_mask, cam_io_w_mb(top_reg_val->irq_mask, ope_hw_info->top_reg->base + top_reg->irq_mask); ope_hw_info->top_reg->base + top_reg->irq_mask); mutex_unlock(&ope_top_info.ope_hw_mutex); return rc; return rc; } } Loading drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.h +3 −1 Original line number Original line Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */ /* /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. */ */ #ifndef OPE_TOP_H #ifndef OPE_TOP_H Loading Loading @@ -32,10 +32,12 @@ struct ope_top_ctx { * @ope_hw_info: OPE hardware info * @ope_hw_info: OPE hardware info * @top_ctx: OPE top context * @top_ctx: OPE top context * @reset_complete: Reset complete flag * @reset_complete: Reset complete flag * @ope_mutex: OPE hardware mutex */ */ struct ope_top { struct ope_top { struct ope_hw *ope_hw_info; struct ope_hw *ope_hw_info; struct ope_top_ctx top_ctx[OPE_CTX_MAX]; struct ope_top_ctx top_ctx[OPE_CTX_MAX]; struct completion reset_complete; struct completion reset_complete; struct mutex ope_hw_mutex; }; }; #endif /* OPE_TOP_H */ #endif /* OPE_TOP_H */ Loading
drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.c +4 −2 Original line number Original line Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only /* /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. */ */ #include <linux/of.h> #include <linux/of.h> Loading Loading @@ -44,7 +44,8 @@ static int cam_ope_top_reset(struct ope_hw *ope_hw_info, top_reg = ope_hw_info->top_reg; top_reg = ope_hw_info->top_reg; top_reg_val = ope_hw_info->top_reg_val; top_reg_val = ope_hw_info->top_reg_val; init_completion(&ope_top_info.reset_complete); mutex_lock(&ope_top_info.ope_hw_mutex); reinit_completion(&ope_top_info.reset_complete); /* enable interrupt mask */ /* enable interrupt mask */ cam_io_w_mb(top_reg_val->irq_mask, cam_io_w_mb(top_reg_val->irq_mask, Loading @@ -70,6 +71,7 @@ static int cam_ope_top_reset(struct ope_hw *ope_hw_info, cam_io_w_mb(top_reg_val->irq_mask, cam_io_w_mb(top_reg_val->irq_mask, ope_hw_info->top_reg->base + top_reg->irq_mask); ope_hw_info->top_reg->base + top_reg->irq_mask); mutex_unlock(&ope_top_info.ope_hw_mutex); return rc; return rc; } } Loading
drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.h +3 −1 Original line number Original line Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */ /* /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. */ */ #ifndef OPE_TOP_H #ifndef OPE_TOP_H Loading Loading @@ -32,10 +32,12 @@ struct ope_top_ctx { * @ope_hw_info: OPE hardware info * @ope_hw_info: OPE hardware info * @top_ctx: OPE top context * @top_ctx: OPE top context * @reset_complete: Reset complete flag * @reset_complete: Reset complete flag * @ope_mutex: OPE hardware mutex */ */ struct ope_top { struct ope_top { struct ope_hw *ope_hw_info; struct ope_hw *ope_hw_info; struct ope_top_ctx top_ctx[OPE_CTX_MAX]; struct ope_top_ctx top_ctx[OPE_CTX_MAX]; struct completion reset_complete; struct completion reset_complete; struct mutex ope_hw_mutex; }; }; #endif /* OPE_TOP_H */ #endif /* OPE_TOP_H */