summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/iommu-omap.h
blob: 5b429c43a29778ae9b9fb8b545599c2464a736c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * omap iommu: main structures
 *
 * Copyright (C) 2008-2009 Nokia Corporation
 *
 * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/platform_device.h>

#define MMU_REG_SIZE		256

/**
 * struct iommu_arch_data - omap iommu private data
 * @name: name of the iommu device
 * @iommu_dev: handle of the iommu device
 *
 * This is an omap iommu private data object, which binds an iommu user
 * to its iommu device. This object should be placed at the iommu user's
 * dev_archdata so generic IOMMU API can be used without having to
 * utilize omap-specific plumbing anymore.
 */
struct omap_iommu_arch_data {
	const char *name;
	struct omap_iommu *iommu_dev;
};

/**
 * struct omap_mmu_dev_attr - OMAP mmu device attributes for omap_hwmod
 * @da_start:		device address where the va space starts.
 * @da_end:		device address where the va space ends.
 * @nr_tlb_entries:	number of entries supported by the translation
 *			look-aside buffer (TLB).
 */
struct omap_mmu_dev_attr {
	u32 da_start;
	u32 da_end;
	int nr_tlb_entries;
};

struct iommu_platform_data {
	const char *name;
	const char *reset_name;
	int nr_tlb_entries;
	u32 da_start;
	u32 da_end;

	int (*assert_reset)(struct platform_device *pdev, const char *name);
	int (*deassert_reset)(struct platform_device *pdev, const char *name);
};