Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7d3e9e8 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

Merge branch 'for_2.6.38' of git://gitorious.org/iommu_mailbox/iommu_mailbox...

Merge branch 'for_2.6.38' of git://gitorious.org/iommu_mailbox/iommu_mailbox into devel-iommu-mailbox
parents 28257f7f 1cd25df4
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@ static struct omap_mbox_ops omap2_mbox_ops = {

/* FIXME: the following structs should be filled automatically by the user id */

#if defined(CONFIG_ARCH_OMAP3430) || defined(CONFIG_ARCH_OMAP2420)
#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP2)
/* DSP */
static struct omap_mbox2_priv omap2_mbox_dsp_priv = {
	.tx_fifo = {
@@ -306,7 +306,7 @@ struct omap_mbox mbox_dsp_info = {
};
#endif

#if defined(CONFIG_ARCH_OMAP3430)
#if defined(CONFIG_ARCH_OMAP3)
struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL };
#endif

@@ -394,15 +394,19 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)

	if (false)
		;
#if defined(CONFIG_ARCH_OMAP3430)
	else if (cpu_is_omap3430()) {
#if defined(CONFIG_ARCH_OMAP3)
	else if (cpu_is_omap34xx()) {
		list = omap3_mboxes;

		list[0]->irq = platform_get_irq_byname(pdev, "dsp");
	}
#endif
#if defined(CONFIG_ARCH_OMAP2420)
	else if (cpu_is_omap2420()) {
#if defined(CONFIG_ARCH_OMAP2)
	else if (cpu_is_omap2430()) {
		list = omap2_mboxes;

		list[0]->irq = platform_get_irq_byname(pdev, "dsp");
	} else if (cpu_is_omap2420()) {
		list = omap2_mboxes;

		list[0]->irq = platform_get_irq_byname(pdev, "dsp");
@@ -432,9 +436,8 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
		iounmap(mbox_base);
		return ret;
	}
	return 0;

	return ret;
	return 0;
}

static int __devexit omap2_mbox_remove(struct platform_device *pdev)
+9 −1
Original line number Diff line number Diff line
@@ -33,9 +33,11 @@ static struct iommu_device omap3_devices[] = {
			.name = "isp",
			.nr_tlb_entries = 8,
			.clk_name = "cam_ick",
			.da_start = 0x0,
			.da_end = 0xFFFFF000,
		},
	},
#if defined(CONFIG_MPU_BRIDGE_IOMMU)
#if defined(CONFIG_OMAP_IOMMU_IVA2)
	{
		.base = 0x5d000000,
		.irq = 28,
@@ -43,6 +45,8 @@ static struct iommu_device omap3_devices[] = {
			.name = "iva2",
			.nr_tlb_entries = 32,
			.clk_name = "iva2_ck",
			.da_start = 0x11000000,
			.da_end = 0xFFFFF000,
		},
	},
#endif
@@ -64,6 +68,8 @@ static struct iommu_device omap4_devices[] = {
			.name = "ducati",
			.nr_tlb_entries = 32,
			.clk_name = "ducati_ick",
			.da_start = 0x0,
			.da_end = 0xFFFFF000,
		},
	},
#if defined(CONFIG_MPU_TESLA_IOMMU)
@@ -74,6 +80,8 @@ static struct iommu_device omap4_devices[] = {
			.name = "tesla",
			.nr_tlb_entries = 32,
			.clk_name = "tesla_ick",
			.da_start = 0x0,
			.da_end = 0xFFFFF000,
		},
	},
#endif
+3 −0
Original line number Diff line number Diff line
@@ -109,6 +109,9 @@ config OMAP_IOMMU_DEBUG

         Say N unless you know you need this.

config OMAP_IOMMU_IVA2
	bool

choice
	prompt "System timer"
	default OMAP_32K_TIMER if !ARCH_OMAP15XX
+5 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ struct iommu {
	int (*isr)(struct iommu *obj);

	void *ctx; /* iommu context: registres saved area */
	u32 da_start;
	u32 da_end;
};

struct cr_regs {
@@ -103,6 +105,8 @@ struct iommu_platform_data {
	const char *name;
	const char *clk_name;
	const int nr_tlb_entries;
	u32 da_start;
	u32 da_end;
};

#if defined(CONFIG_ARCH_OMAP1)
@@ -152,6 +156,7 @@ extern void flush_iotlb_all(struct iommu *obj);
extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e);
extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova);

extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end);
extern struct iommu *iommu_get(const char *name);
extern void iommu_put(struct iommu *obj);

+5 −3
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ struct omap_mbox_queue {
	struct kfifo		fifo;
	struct work_struct	work;
	struct tasklet_struct	tasklet;
	int	(*callback)(void *);
	struct omap_mbox	*mbox;
	bool full;
};

struct omap_mbox {
@@ -57,13 +57,15 @@ struct omap_mbox {
	struct omap_mbox_ops	*ops;
	struct device		*dev;
	void			*priv;
	int			use_count;
	struct blocking_notifier_head   notifier;
};

int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg);
void omap_mbox_init_seq(struct omap_mbox *);

struct omap_mbox *omap_mbox_get(const char *);
void omap_mbox_put(struct omap_mbox *);
struct omap_mbox *omap_mbox_get(const char *, struct notifier_block *nb);
void omap_mbox_put(struct omap_mbox *mbox, struct notifier_block *nb);

int omap_mbox_register(struct device *parent, struct omap_mbox **);
int omap_mbox_unregister(void);
Loading