X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Farch%2Farm%2Fmach-mmp%2Finclude%2Fmach%2Fdevices.h;fp=kernel%2Farch%2Farm%2Fmach-mmp%2Finclude%2Fmach%2Fdevices.h;h=21217ef11b64f38639221e2717fbcf20cd63d487;hb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;hp=0000000000000000000000000000000000000000;hpb=98260f3884f4a202f9ca5eabed40b1354c489b29;p=kvmfornfv.git diff --git a/kernel/arch/arm/mach-mmp/include/mach/devices.h b/kernel/arch/arm/mach-mmp/include/mach/devices.h new file mode 100644 index 000000000..21217ef11 --- /dev/null +++ b/kernel/arch/arm/mach-mmp/include/mach/devices.h @@ -0,0 +1,56 @@ +#ifndef __MACH_DEVICE_H +#define __MACH_DEVICE_H + +#include + +#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 }, \ +}; + +#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 }, \ +}; + +#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 }, \ +} + +extern int pxa_register_device(struct pxa_device_desc *, void *, size_t); +extern int pxa_usb_phy_init(void __iomem *phy_reg); +extern void pxa_usb_phy_deinit(void __iomem *phy_reg); + +#endif /* __MACH_DEVICE_H */