devices-common.h 930 字节
Newer Older
R
Rabin Vincent 已提交
1 2 3 4 5 6 7 8 9 10
/*
 * Copyright (C) ST-Ericsson SA 2010
 *
 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
 * License terms: GNU General Public License (GPL), version 2.
 */

#ifndef __DEVICES_COMMON_H
#define __DEVICES_COMMON_H

11 12 13
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/sys_soc.h>
14
#include <linux/amba/bus.h>
R
Rabin Vincent 已提交
15 16 17 18

struct spi_master_cntlr;

static inline struct amba_device *
19 20
dbx500_add_spi(struct device *parent, const char *name, resource_size_t base,
	       int irq, struct spi_master_cntlr *pdata,
21
	       u32 periphid)
R
Rabin Vincent 已提交
22
{
23 24
	return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
				   pdata, periphid);
R
Rabin Vincent 已提交
25 26
}

27 28
struct amba_pl011_data;

R
Rabin Vincent 已提交
29
static inline struct amba_device *
30 31
dbx500_add_uart(struct device *parent, const char *name, resource_size_t base,
		int irq, struct amba_pl011_data *pdata)
R
Rabin Vincent 已提交
32
{
33
	return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0);
R
Rabin Vincent 已提交
34 35 36
}

#endif