include/linux/bcma/bcma_driver_chipcommon.h

Source file repositories/reference/linux-study-clean/include/linux/bcma/bcma_driver_chipcommon.h

File Facts

System
Linux kernel
Corpus path
include/linux/bcma/bcma_driver_chipcommon.h
Extension
.h
Size
32579 bytes
Lines
723
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct bcma_chipcommon_pmu {
	struct bcma_device *core;	/* Can be separated core or just ChipCommon one */
	u8 rev;			/* PMU revision */
	u32 crystalfreq;	/* The active crystal frequency (in kHz) */
};

#ifdef CONFIG_BCMA_PFLASH
struct bcma_pflash {
	bool present;
};
#endif

#ifdef CONFIG_BCMA_SFLASH
struct mtd_info;

struct bcma_sflash {
	bool present;
	u32 blocksize;
	u16 numblocks;
	u32 size;
};
#endif

#ifdef CONFIG_BCMA_NFLASH
struct bcma_nflash {
	/* Must be the fist member for the brcmnand driver to
	 * de-reference that structure.
	 */
	struct brcmnand_platform_data brcmnand_info;
	bool present;
	bool boot;		/* This is the flash the SoC boots from */
};
#endif

#ifdef CONFIG_BCMA_DRIVER_MIPS
struct bcma_serial_port {
	void *regs;
	unsigned long clockspeed;
	unsigned int irq;
	unsigned int baud_base;
	unsigned int reg_shift;
};
#endif /* CONFIG_BCMA_DRIVER_MIPS */

struct bcma_drv_cc {
	struct bcma_device *core;
	u32 status;
	u32 capabilities;
	u32 capabilities_ext;
	u8 setup_done:1;
	u8 early_setup_done:1;
	/* Fast Powerup Delay constant */
	u16 fast_pwrup_delay;
	struct bcma_chipcommon_pmu pmu;
#ifdef CONFIG_BCMA_PFLASH
	struct bcma_pflash pflash;
#endif
#ifdef CONFIG_BCMA_SFLASH
	struct bcma_sflash sflash;
#endif
#ifdef CONFIG_BCMA_NFLASH
	struct bcma_nflash nflash;
#endif

#ifdef CONFIG_BCMA_DRIVER_MIPS
	int nr_serial_ports;
	struct bcma_serial_port serial_ports[4];
#endif /* CONFIG_BCMA_DRIVER_MIPS */
	u32 ticks_per_ms;
	struct platform_device *watchdog;

	/* Lock for GPIO register access. */
	spinlock_t gpio_lock;
#ifdef CONFIG_BCMA_DRIVER_GPIO
	struct gpio_chip gpio;
#endif
};

struct bcma_drv_cc_b {
	struct bcma_device *core;
	u8 setup_done:1;
	void __iomem *mii;
};

/* Register access */
#define bcma_cc_read32(cc, offset) \
	bcma_read32((cc)->core, offset)
#define bcma_cc_write32(cc, offset, val) \
	bcma_write32((cc)->core, offset, val)

Annotation

Implementation Notes