| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2017 Linaro Ltd. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License version 2 and |
|---|
| 6 | | - * only version 2 as published by the Free Software Foundation. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 11 | | - * GNU General Public License for more details. |
|---|
| 12 | | - * |
|---|
| 13 | 4 | */ |
|---|
| 14 | 5 | #ifndef __VENUS_FIRMWARE_H__ |
|---|
| 15 | 6 | #define __VENUS_FIRMWARE_H__ |
|---|
| 16 | 7 | |
|---|
| 17 | 8 | struct device; |
|---|
| 18 | 9 | |
|---|
| 19 | | -int venus_boot(struct device *dev, const char *fwname); |
|---|
| 20 | | -int venus_shutdown(struct device *dev); |
|---|
| 10 | +int venus_firmware_init(struct venus_core *core); |
|---|
| 11 | +void venus_firmware_deinit(struct venus_core *core); |
|---|
| 12 | +int venus_boot(struct venus_core *core); |
|---|
| 13 | +int venus_shutdown(struct venus_core *core); |
|---|
| 14 | +int venus_set_hw_state(struct venus_core *core, bool suspend); |
|---|
| 15 | + |
|---|
| 16 | +static inline int venus_set_hw_state_suspend(struct venus_core *core) |
|---|
| 17 | +{ |
|---|
| 18 | + return venus_set_hw_state(core, false); |
|---|
| 19 | +} |
|---|
| 20 | + |
|---|
| 21 | +static inline int venus_set_hw_state_resume(struct venus_core *core) |
|---|
| 22 | +{ |
|---|
| 23 | + return venus_set_hw_state(core, true); |
|---|
| 24 | +} |
|---|
| 21 | 25 | |
|---|
| 22 | 26 | #endif |
|---|