2010-07-15 22:18:32 +08:00
|
|
|
#ifndef __MACH_DEVICE_H
|
|
|
|
#define __MACH_DEVICE_H
|
|
|
|
|
2009-01-20 14:15:18 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
#define MAX_RESOURCE_DMA 2
|
|
|
|
|
|
|
|
/* structure for describing the on-chip devices */
|
|
|
|
struct pxa_device_desc {
|
|
|
|
const char *dev_name;
|
|
|
|
const char *drv_name;
|
|
|
|
int id;
|
|
|
|
int irq;
|
|
|
|
unsigned long start;
|
|
|
|
unsigned long size;
|
|
|
|
int dma[MAX_RESOURCE_DMA];
|
|
|
|
};
|
|
|
|
|
|
|
|
#define PXA168_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...) \
|
|
|
|
struct pxa_device_desc pxa168_device_##_name __initdata = { \
|
|
|
|
.dev_name = "pxa168-" #_name, \
|
|
|
|
.drv_name = _drv, \
|
|
|
|
.id = _id, \
|
|
|
|
.irq = IRQ_PXA168_##_irq, \
|
|
|
|
.start = _start, \
|
|
|
|
.size = _size, \
|
|
|
|
.dma = { _dma }, \
|
|
|
|
};
|
|
|
|
|
2009-03-20 12:50:22 +08:00
|
|
|
#define PXA910_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...) \
|
|
|
|
struct pxa_device_desc pxa910_device_##_name __initdata = { \
|
|
|
|
.dev_name = "pxa910-" #_name, \
|
|
|
|
.drv_name = _drv, \
|
|
|
|
.id = _id, \
|
|
|
|
.irq = IRQ_PXA910_##_irq, \
|
|
|
|
.start = _start, \
|
|
|
|
.size = _size, \
|
|
|
|
.dma = { _dma }, \
|
|
|
|
};
|
2009-12-04 22:41:28 +08:00
|
|
|
|
|
|
|
#define MMP2_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...) \
|
|
|
|
struct pxa_device_desc mmp2_device_##_name __initdata = { \
|
|
|
|
.dev_name = "mmp2-" #_name, \
|
|
|
|
.drv_name = _drv, \
|
|
|
|
.id = _id, \
|
|
|
|
.irq = IRQ_MMP2_##_irq, \
|
|
|
|
.start = _start, \
|
|
|
|
.size = _size, \
|
|
|
|
.dma = { _dma }, \
|
|
|
|
}
|
|
|
|
|
2009-01-20 14:15:18 +08:00
|
|
|
extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);
|
2010-07-15 22:18:32 +08:00
|
|
|
#endif /* __MACH_DEVICE_H */
|