summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/devices.c
blob: 5b062f5f0fd253a490927f75c1f110ec4f69970c (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
#include <common.h>
#include <driver.h>
#include <mach/devices.h>

static inline struct device_d *imx_add_device(char *name, int id, void *base, int size, void *pdata)
{
	return add_generic_device(name, id, NULL, (resource_size_t)base, size,
				  IORESOURCE_MEM, pdata);
}

struct device_d *imx_add_fec(void *base, struct fec_platform_data *pdata)
{
	return imx_add_device("fec_imx", -1, base, 0x1000, pdata);
}

struct device_d *imx_add_spi(void *base, int id, struct spi_imx_master *pdata)
{
	return imx_add_device("imx_spi", id, base, 0x1000, pdata);
}

struct device_d *imx_add_i2c(void *base, int id, struct i2c_platform_data *pdata)
{
	return imx_add_device("i2c-imx", id, base, 0x1000, pdata);
}

struct device_d *imx_add_uart(void *base, int id)
{
	return imx_add_device("imx_serial", id, base, 0x1000, NULL);
}

struct device_d *imx_add_nand(void *base, struct imx_nand_platform_data *pdata)
{
	return imx_add_device("imx_nand", -1, base, 0x1000, pdata);
}

struct device_d *imx_add_fb(void *base, struct imx_fb_platform_data *pdata)
{
	return imx_add_device("imxfb", -1, base, 0x1000, pdata);
}

struct device_d *imx_add_ipufb(void *base, struct imx_ipu_fb_platform_data *pdata)
{
	return imx_add_device("imx-ipu-fb", -1, base, 0x1000, pdata);
}

struct device_d *imx_add_mmc(void *base, int id, void *pdata)
{
	return imx_add_device("imx-mmc", id, base, 0x1000, pdata);
}

struct device_d *imx_add_esdhc(void *base, int id, void *pdata)
{
	return imx_add_device("imx-esdhc", id, base, 0x1000, pdata);
}