diff options
author | Steve Longerbeam <slongerbeam@gmail.com> | 2014-06-26 03:05:47 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2014-08-18 14:17:41 +0200 |
commit | 7d2691da901d71ff62ad974510ea7149b391bdfe (patch) | |
tree | c86091bbb9219ebe50196a2bab3250b0bc869fa2 /drivers/gpu/ipu-v3/ipu-prv.h | |
parent | Linux 3.17-rc1 (diff) | |
download | linux-7d2691da901d71ff62ad974510ea7149b391bdfe.tar.xz linux-7d2691da901d71ff62ad974510ea7149b391bdfe.zip |
gpu: ipu-v3: Add ipu-cpmem unit
Move channel parameter memory setup functions and macros into a new
submodule ipu-cpmem. In the process, cleanup arguments to the functions
to take a channel pointer instead of a pointer into cpmem for that
channel. That allows the structure of the parameter memory to be
private to ipu-cpmem.c.
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/ipu-v3/ipu-prv.h')
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-prv.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h index c93f50ec04f7..0a7b2adaba39 100644 --- a/drivers/gpu/ipu-v3/ipu-prv.h +++ b/drivers/gpu/ipu-v3/ipu-prv.h @@ -148,6 +148,7 @@ struct ipuv3_channel { struct ipu_soc *ipu; }; +struct ipu_cpmem; struct ipu_dc_priv; struct ipu_dmfc_priv; struct ipu_di; @@ -164,7 +165,6 @@ struct ipu_soc { void __iomem *cm_reg; void __iomem *idmac_reg; - struct ipu_ch_param __iomem *cpmem_base; int usecount; @@ -176,6 +176,7 @@ struct ipu_soc { int irq_err; struct irq_domain *domain; + struct ipu_cpmem *cpmem_priv; struct ipu_dc_priv *dc_priv; struct ipu_dp_priv *dp_priv; struct ipu_dmfc_priv *dmfc_priv; @@ -183,6 +184,17 @@ struct ipu_soc { struct ipu_smfc_priv *smfc_priv; }; +static inline u32 ipu_idmac_read(struct ipu_soc *ipu, unsigned offset) +{ + return readl(ipu->idmac_reg + offset); +} + +static inline void ipu_idmac_write(struct ipu_soc *ipu, u32 value, + unsigned offset) +{ + writel(value, ipu->idmac_reg + offset); +} + void ipu_srm_dp_sync_update(struct ipu_soc *ipu); int ipu_module_enable(struct ipu_soc *ipu, u32 mask); |