~ubuntu-branches/debian/experimental/linux-2.6/experimental

« back to all changes in this revision

Viewing changes to arch/arm/mach-ux500/devices-common.h

  • Committer: Package Import Robot
  • Author(s): maximilian attems, maximilian attems, Ben Hutchings
  • Date: 2012-06-06 10:25:57 UTC
  • mfrom: (1.2.38)
  • Revision ID: package-import@ubuntu.com-20120606102557-b9j3506wcwrqrnx8
Tags: 3.4.1-1~experimental.1
* New upstream release: http://kernelnewbies.org/Linux_3.4
* New upstream stable update:
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.4.1

[ maximilian attems ]
* Enable DM_VERITY, NF_CONNTRACK_TIMEOUT, NF_CT_NETLINK_TIMEOUT,
  IP_NF_MATCH_RPFILTER, IP6_NF_MATCH_RPFILTER, NETFILTER_NETLINK_ACCT,
  NETFILTER_XT_MATCH_NFACCT, NET_SCH_PLUG, SCSI_UFSHCD, SCSI_VIRTIO,
  NET_TEAM, ATH6KL.

[ Ben Hutchings ]
* DFSG: Remove the new vs6624 driver, which contains non-free firmware
* aufs: Update to aufs3.4-20120521
* [rt] Update to 3.4-rt8 and reenable

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#ifndef __DEVICES_COMMON_H
9
9
#define __DEVICES_COMMON_H
10
10
 
 
11
#include <linux/platform_device.h>
 
12
#include <linux/dma-mapping.h>
 
13
#include <linux/sys_soc.h>
 
14
#include <plat/i2c.h>
 
15
 
11
16
extern struct amba_device *
12
 
dbx500_add_amba_device(const char *name, resource_size_t base,
13
 
                       int irq, void *pdata, unsigned int periphid);
14
 
 
15
 
extern struct platform_device *
16
 
dbx500_add_platform_device_4k1irq(const char *name, int id,
17
 
                                  resource_size_t base,
18
 
                                  int irq, void *pdata);
 
17
dbx500_add_amba_device(struct device *parent, const char *name,
 
18
                       resource_size_t base, int irq, void *pdata,
 
19
                       unsigned int periphid);
19
20
 
20
21
struct spi_master_cntlr;
21
22
 
22
23
static inline struct amba_device *
23
 
dbx500_add_msp_spi(const char *name, resource_size_t base, int irq,
 
24
dbx500_add_msp_spi(struct device *parent, const char *name,
 
25
                   resource_size_t base, int irq,
24
26
                   struct spi_master_cntlr *pdata)
25
27
{
26
 
        return dbx500_add_amba_device(name, base, irq, pdata, 0);
 
28
        return dbx500_add_amba_device(parent, name, base, irq,
 
29
                                      pdata, 0);
27
30
}
28
31
 
29
32
static inline struct amba_device *
30
 
dbx500_add_spi(const char *name, resource_size_t base, int irq,
31
 
               struct spi_master_cntlr *pdata,
 
33
dbx500_add_spi(struct device *parent, const char *name, resource_size_t base,
 
34
               int irq, struct spi_master_cntlr *pdata,
32
35
               u32 periphid)
33
36
{
34
 
        return dbx500_add_amba_device(name, base, irq, pdata, periphid);
 
37
        return dbx500_add_amba_device(parent, name, base, irq,
 
38
                                      pdata, periphid);
35
39
}
36
40
 
37
41
struct mmci_platform_data;
38
42
 
39
43
static inline struct amba_device *
40
 
dbx500_add_sdi(const char *name, resource_size_t base, int irq,
41
 
               struct mmci_platform_data *pdata,
42
 
               u32 periphid)
 
44
dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base,
 
45
               int irq, struct mmci_platform_data *pdata, u32 periphid)
43
46
{
44
 
        return dbx500_add_amba_device(name, base, irq, pdata, periphid);
 
47
        return dbx500_add_amba_device(parent, name, base, irq,
 
48
                                      pdata, periphid);
45
49
}
46
50
 
47
51
struct amba_pl011_data;
48
52
 
49
53
static inline struct amba_device *
50
 
dbx500_add_uart(const char *name, resource_size_t base, int irq,
51
 
                struct amba_pl011_data *pdata)
 
54
dbx500_add_uart(struct device *parent, const char *name, resource_size_t base,
 
55
                int irq, struct amba_pl011_data *pdata)
52
56
{
53
 
        return dbx500_add_amba_device(name, base, irq, pdata, 0);
 
57
        return dbx500_add_amba_device(parent, name, base, irq, pdata, 0);
54
58
}
55
59
 
56
60
struct nmk_i2c_controller;
57
61
 
58
62
static inline struct platform_device *
59
 
dbx500_add_i2c(int id, resource_size_t base, int irq,
60
 
               struct nmk_i2c_controller *pdata)
61
 
{
62
 
        return dbx500_add_platform_device_4k1irq("nmk-i2c", id, base, irq,
63
 
                                                 pdata);
64
 
}
65
 
 
66
 
struct msp_i2s_platform_data;
67
 
 
68
 
static inline struct platform_device *
69
 
dbx500_add_msp_i2s(int id, resource_size_t base, int irq,
70
 
                   struct msp_i2s_platform_data *pdata)
71
 
{
72
 
        return dbx500_add_platform_device_4k1irq("MSP_I2S", id, base, irq,
73
 
                                                 pdata);
 
63
dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq,
 
64
               struct nmk_i2c_controller *data)
 
65
{
 
66
        struct resource res[] = {
 
67
                DEFINE_RES_MEM(base, SZ_4K),
 
68
                DEFINE_RES_IRQ(irq),
 
69
        };
 
70
 
 
71
        struct platform_device_info pdevinfo = {
 
72
                .parent = parent,
 
73
                .name = "nmk-i2c",
 
74
                .id = id,
 
75
                .res = res,
 
76
                .num_res = ARRAY_SIZE(res),
 
77
                .data = data,
 
78
                .size_data = sizeof(*data),
 
79
                .dma_mask = DMA_BIT_MASK(32),
 
80
        };
 
81
 
 
82
        return platform_device_register_full(&pdevinfo);
74
83
}
75
84
 
76
85
static inline struct amba_device *
77
 
dbx500_add_rtc(resource_size_t base, int irq)
 
86
dbx500_add_rtc(struct device *parent, resource_size_t base, int irq)
78
87
{
79
 
        return dbx500_add_amba_device("rtc-pl031", base, irq, NULL, 0);
 
88
        return dbx500_add_amba_device(parent, "rtc-pl031", base, irq, NULL, 0);
80
89
}
81
90
 
82
91
struct nmk_gpio_platform_data;
83
92
 
84
 
void dbx500_add_gpios(resource_size_t *base, int num, int irq,
85
 
                      struct nmk_gpio_platform_data *pdata);
 
93
void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
 
94
                      int irq, struct nmk_gpio_platform_data *pdata);
86
95
 
87
96
#endif