aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5p/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s5p/include')
-rw-r--r--arch/arm/plat-s5p/include/plat/s5p-iovmm.h46
-rw-r--r--arch/arm/plat-s5p/include/plat/s5p-sysmmu.h31
-rw-r--r--arch/arm/plat-s5p/include/plat/tvout.h16
3 files changed, 93 insertions, 0 deletions
diff --git a/arch/arm/plat-s5p/include/plat/s5p-iovmm.h b/arch/arm/plat-s5p/include/plat/s5p-iovmm.h
index 2e31ce3..f22edc7 100644
--- a/arch/arm/plat-s5p/include/plat/s5p-iovmm.h
+++ b/arch/arm/plat-s5p/include/plat/s5p-iovmm.h
@@ -11,6 +11,50 @@
#ifndef __ASM_PLAT_IOVMM_H
#define __ASM_PLAT_IOVMM_H
+#ifdef CONFIG_DRM_EXYNOS_IOMMU
+#ifdef CONFIG_IOVMM
+void *iovmm_setup(unsigned long s_iova, unsigned long size);
+void iovmm_cleanup(void *in_vmm);
+int iovmm_activate(void *in_vmm, struct device *dev);
+void iovmm_deactivate(void *in_vmm, struct device *dev);
+
+/* iovmm_map() - Maps a list of physical memory chunks
+ * @dev: the owner of the IO address space where the mapping is created
+ * @sg: list of physical memory chunks to map
+ * @offset: length in bytes where the mapping starts
+ * @size: how much memory to map in bytes. @offset + @size must not exceed
+ * total size of @sg
+ *
+ * This function returns mapped IO address in the address space of @dev.
+ * Returns 0 if mapping fails.
+ *
+ * The caller of this function must ensure that iovmm_cleanup() is not called
+ * while this function is called.
+ *
+ */
+dma_addr_t iovmm_map(void *in_vmm, struct scatterlist *sg, off_t offset,
+ size_t size);
+
+/* iovmm_map() - unmaps the given IO address
+ * @dev: the owner of the IO address space where @iova belongs
+ * @iova: IO address that needs to be unmapped and freed.
+ *
+ * The caller of this function must ensure that iovmm_cleanup() is not called
+ * while this function is called.
+ */
+void iovmm_unmap(void *in_vmm, dma_addr_t iova);
+
+#else
+#define iovmm_setup(s_iova, size) (ERR_PTR(-ENOSYS))
+#define iovmm_cleanup(in_vmm)
+#define iovmm_activate(in_vmm, dev) (-ENOSYS)
+#define iovmm_deactivate(in_vmm, dev)
+#define iovmm_map(in_vmm, sg, offset, size) (0)
+#define iovmm_unmap(in_vmm, iova)
+#endif /* CONFIG_IOVMM */
+
+#else
+
#ifdef CONFIG_IOVMM
int iovmm_setup(struct device *dev);
void iovmm_cleanup(struct device *dev);
@@ -52,4 +96,6 @@ void iovmm_unmap(struct device *dev, dma_addr_t iova);
#define iovmm_unmap(dev, iova)
#endif /* CONFIG_IOVMM */
+#endif /* CONFIG_DRM_EXYNOS_IOMMU */
+
#endif /*__ASM_PLAT_IOVMM_H*/
diff --git a/arch/arm/plat-s5p/include/plat/s5p-sysmmu.h b/arch/arm/plat-s5p/include/plat/s5p-sysmmu.h
index ad30a97..05aba31 100644
--- a/arch/arm/plat-s5p/include/plat/s5p-sysmmu.h
+++ b/arch/arm/plat-s5p/include/plat/s5p-sysmmu.h
@@ -40,7 +40,25 @@ enum S5P_SYSMMU_INTERRUPT_TYPE {
typedef int (*s5p_sysmmu_fault_handler_t)(enum S5P_SYSMMU_INTERRUPT_TYPE itype,
unsigned long pgtable_base, unsigned long fault_addr);
+struct sysmmu_drvdata {
+ struct list_head node;
+ struct device *dev;
+ struct device *owner;
+ void __iomem *sfrbase;
+ struct clk *clk;
+ int activations;
+ rwlock_t lock;
+ s5p_sysmmu_fault_handler_t fault_handler;
+ unsigned long version;
+};
+
#ifdef CONFIG_S5P_SYSTEM_MMU
+
+struct sysmmu_drvdata *get_sysmmu_data(struct device *owner,
+ struct sysmmu_drvdata *start);
+
+struct list_head *get_sysmmu_list(void);
+
/**
* s5p_sysmmu_enable() - enable system mmu
* @owner: The device whose System MMU is about to be enabled.
@@ -80,6 +98,19 @@ void s5p_sysmmu_set_tablebase_pgd(struct device *owner, unsigned long pgd);
*/
void s5p_sysmmu_tlb_invalidate(struct device *owner);
+/**
+ * s5p_sysmmu_tlb_invalidate_entry() - flush a TLB entry in system mmu
+ * @owner: The device whose System MMU.
+ * @iova: device address to tlb entry to be invalidated.
+ * @count: entry count.
+ *
+ * This function flush all TLB entry in system mmu
+ */
+void s5p_sysmmu_tlb_invalidate_entry(struct device *owner,
+ unsigned long iova,
+ unsigned int count,
+ unsigned long page_size);
+
/** s5p_sysmmu_set_fault_handler() - Fault handler for System MMUs
* Called when interrupt occurred by the System MMUs
* The device drivers of peripheral devices that has a System MMU can implement
diff --git a/arch/arm/plat-s5p/include/plat/tvout.h b/arch/arm/plat-s5p/include/plat/tvout.h
index e649d69..d701269 100644
--- a/arch/arm/plat-s5p/include/plat/tvout.h
+++ b/arch/arm/plat-s5p/include/plat/tvout.h
@@ -15,6 +15,17 @@
struct platform_device;
+#ifdef CONFIG_HDMI_TX_STRENGTH
+struct s5p_tx_tuning {
+ u8 tx_ch;
+ u8 *tx_val;
+};
+
+struct s5p_platform_tvout {
+ struct s5p_tx_tuning *tx_tune;
+};
+#endif
+
struct s5p_platform_hpd {
void (*int_src_hdmi_hpd)(struct platform_device *pdev);
void (*int_src_ext_hpd)(struct platform_device *pdev);
@@ -41,6 +52,11 @@ struct s5p_platform_cec {
extern void s5p_hdmi_cec_set_platdata(struct s5p_platform_cec *pd);
+
+#ifdef CONFIG_HDMI_TX_STRENGTH
+extern void s5p_hdmi_tvout_set_platdata(struct s5p_platform_tvout *pd);
+#endif
+
/* defined by architecture to configure gpio */
extern void s5p_cec_cfg_gpio(struct platform_device *pdev);