📄 bus.h
字号:
/* * linux/include/asm-arm/arch-omap2/bus.h * * Virtual bus for OMAP2. Allows better power management, such as managing * shared clocks, and mapping of bus addresses to Local Bus addresses. * * Copyright (C) 2004 Texas Instruments, Inc. * * This package is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */#ifndef __ASM_ARM_ARCH_OMAP2_BUS_H#define __ASM_ARM_ARCH_OMAP2_BUS_Hextern struct bus_type omap_bus_types[];/* * Description for physical device */struct omap_dev { struct device dev; /* Standard device description */ char *name; unsigned int devid; /* OMAP device id */ unsigned int busid; /* OMAP virtual busid */ struct resource res; /* Standard resource description */ void *mapbase; /* OMAP physical address */ unsigned int irq[6]; /* OMAP interrupts */};#define OMAP_DEV(_d) container_of((_d), struct omap_dev, dev)#define omap_get_drvdata(d) dev_get_drvdata(&(d)->dev)#define omap_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, p)#define OMAP24xx_MMC_DEVID 2#define OMAP24xx_CAM_DEVID 0/* * Description for device driver */struct omap_driver { struct device_driver drv; /* Standard driver description */ unsigned int devid; /* OMAP device id for bus */ unsigned int busid; /* OMAP virtual busid */ unsigned int clocks; /* OMAP shared clocks */ int (*probe) (struct omap_dev *); int (*remove) (struct omap_dev *); int (*suspend) (struct omap_dev *, u32); int (*resume) (struct omap_dev *);};#define OMAP_DRV(_d) container_of((_d), struct omap_driver, drv)#define OMAP_DRIVER_NAME(_omapdev) ((_omapdev)->dev.driver->name)/* * Device ID numbers for bus types *//* * Virtual bus definitions for OMAP */#define OMAP_NR_BUSES 2#define OMAP_BUS_NAME_L3 "l3"#define OMAP_BUS_NAME_L4 "l4"enum { OMAP_BUS_L3 = 0, OMAP_BUS_L4,};/* See arch/arm/mach-omap2/bus.c for the rest of the bus definitions. */extern int omap_driver_register(struct omap_driver *driver);extern void omap_driver_unregister(struct omap_driver *driver);extern int omap_device_register(struct omap_dev *odev);extern void omap_device_unregister(struct omap_dev *odev);#endif /* __ASM_ARM_ARCH_OMAP2_BUS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -