2009-01-26 21:13:40 +08:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2012-11-20 09:05:50 +08:00
|
|
|
#include <linux/platform_device.h>
|
|
|
|
|
2012-11-03 03:24:06 +08:00
|
|
|
#define MMU_REG_SIZE 256
|
2009-01-26 21:13:40 +08:00
|
|
|
|
2012-11-03 03:24:06 +08:00
|
|
|
/**
|
|
|
|
* 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;
|
2009-01-26 21:13:40 +08:00
|
|
|
};
|
|
|
|
|
2012-09-24 07:28:23 +08:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
};
|
|
|
|
|
2009-01-26 21:13:40 +08:00
|
|
|
struct iommu_platform_data {
|
|
|
|
const char *name;
|
2012-11-20 09:05:50 +08:00
|
|
|
const char *reset_name;
|
|
|
|
int nr_tlb_entries;
|
2010-12-15 08:54:03 +08:00
|
|
|
u32 da_start;
|
|
|
|
u32 da_end;
|
2012-11-20 09:05:50 +08:00
|
|
|
|
|
|
|
int (*assert_reset)(struct platform_device *pdev, const char *name);
|
|
|
|
int (*deassert_reset)(struct platform_device *pdev, const char *name);
|
2009-01-26 21:13:40 +08:00
|
|
|
};
|