Path: blob/master/arch/arm/mach-mmp/include/mach/pxa910.h
15162 views
#ifndef __ASM_MACH_PXA910_H1#define __ASM_MACH_PXA910_H23struct sys_timer;45extern struct sys_timer pxa910_timer;6extern void __init pxa910_init_irq(void);78#include <linux/i2c.h>9#include <linux/i2c/pxa-i2c.h>10#include <mach/devices.h>11#include <plat/pxa3xx_nand.h>1213extern struct pxa_device_desc pxa910_device_uart1;14extern struct pxa_device_desc pxa910_device_uart2;15extern struct pxa_device_desc pxa910_device_twsi0;16extern struct pxa_device_desc pxa910_device_twsi1;17extern struct pxa_device_desc pxa910_device_pwm1;18extern struct pxa_device_desc pxa910_device_pwm2;19extern struct pxa_device_desc pxa910_device_pwm3;20extern struct pxa_device_desc pxa910_device_pwm4;21extern struct pxa_device_desc pxa910_device_nand;2223static inline int pxa910_add_uart(int id)24{25struct pxa_device_desc *d = NULL;2627switch (id) {28case 1: d = &pxa910_device_uart1; break;29case 2: d = &pxa910_device_uart2; break;30}3132if (d == NULL)33return -EINVAL;3435return pxa_register_device(d, NULL, 0);36}3738static inline int pxa910_add_twsi(int id, struct i2c_pxa_platform_data *data,39struct i2c_board_info *info, unsigned size)40{41struct pxa_device_desc *d = NULL;42int ret;4344switch (id) {45case 0: d = &pxa910_device_twsi0; break;46case 1: d = &pxa910_device_twsi1; break;47default:48return -EINVAL;49}5051ret = i2c_register_board_info(id, info, size);52if (ret)53return ret;5455return pxa_register_device(d, data, sizeof(*data));56}5758static inline int pxa910_add_pwm(int id)59{60struct pxa_device_desc *d = NULL;6162switch (id) {63case 1: d = &pxa910_device_pwm1; break;64case 2: d = &pxa910_device_pwm2; break;65case 3: d = &pxa910_device_pwm3; break;66case 4: d = &pxa910_device_pwm4; break;67default:68return -EINVAL;69}7071return pxa_register_device(d, NULL, 0);72}7374static inline int pxa910_add_nand(struct pxa3xx_nand_platform_data *info)75{76return pxa_register_device(&pxa910_device_nand, info, sizeof(*info));77}78#endif /* __ASM_MACH_PXA910_H */798081