firmware: tegra: Refactor BPMP driver
Split BPMP driver into common and chip specific parts to facilitate adding support for previous and future Tegra chips that are using BPMP as co-processor. Signed-off-by: Timo Alho <talho@nvidia.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:

committed by
Thierry Reding

parent
165ce6e01d
commit
cdfa358b24
@@ -23,6 +23,7 @@
|
||||
#include <soc/tegra/bpmp-abi.h>
|
||||
|
||||
struct tegra_bpmp_clk;
|
||||
struct tegra_bpmp_ops;
|
||||
|
||||
struct tegra_bpmp_soc {
|
||||
struct {
|
||||
@@ -32,6 +33,8 @@ struct tegra_bpmp_soc {
|
||||
unsigned int timeout;
|
||||
} cpu_tx, thread, cpu_rx;
|
||||
} channels;
|
||||
|
||||
const struct tegra_bpmp_ops *ops;
|
||||
unsigned int num_resets;
|
||||
};
|
||||
|
||||
@@ -63,12 +66,7 @@ struct tegra_bpmp_mrq {
|
||||
struct tegra_bpmp {
|
||||
const struct tegra_bpmp_soc *soc;
|
||||
struct device *dev;
|
||||
|
||||
struct {
|
||||
struct gen_pool *pool;
|
||||
dma_addr_t phys;
|
||||
void *virt;
|
||||
} tx, rx;
|
||||
void *priv;
|
||||
|
||||
struct {
|
||||
struct mbox_client client;
|
||||
@@ -173,6 +171,8 @@ static inline bool tegra_bpmp_mrq_is_supported(struct tegra_bpmp *bpmp,
|
||||
}
|
||||
#endif
|
||||
|
||||
void tegra_bpmp_handle_rx(struct tegra_bpmp *bpmp);
|
||||
|
||||
#if IS_ENABLED(CONFIG_CLK_TEGRA_BPMP)
|
||||
int tegra_bpmp_init_clocks(struct tegra_bpmp *bpmp);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user