drivers/bus/intel-ixp4xx-eb.c

Source file repositories/reference/linux-study-clean/drivers/bus/intel-ixp4xx-eb.c

File Facts

System
Linux kernel
Corpus path
drivers/bus/intel-ixp4xx-eb.c
Extension
.c
Size
11343 bytes
Lines
426
Domain
Driver Families
Bucket
drivers/bus
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ixp4xx_eb {
	struct device *dev;
	struct regmap *rmap;
	u32 bus_base;
	bool is_42x;
	bool is_43x;
};

struct ixp4xx_exp_tim_prop {
	const char *prop;
	u32 max;
	u32 mask;
	u16 shift;
};

static const struct ixp4xx_exp_tim_prop ixp4xx_exp_tim_props[] = {
	{
		.prop = "intel,ixp4xx-eb-t1",
		.max = 3,
		.mask = IXP4XX_EXP_T1_MASK,
		.shift = IXP4XX_EXP_T1_SHIFT,
	},
	{
		.prop = "intel,ixp4xx-eb-t2",
		.max = 3,
		.mask = IXP4XX_EXP_T2_MASK,
		.shift = IXP4XX_EXP_T2_SHIFT,
	},
	{
		.prop = "intel,ixp4xx-eb-t3",
		.max = 15,
		.mask = IXP4XX_EXP_T3_MASK,
		.shift = IXP4XX_EXP_T3_SHIFT,
	},
	{
		.prop = "intel,ixp4xx-eb-t4",
		.max = 3,
		.mask = IXP4XX_EXP_T4_MASK,
		.shift = IXP4XX_EXP_T4_SHIFT,
	},
	{
		.prop = "intel,ixp4xx-eb-t5",
		.max = 15,
		.mask = IXP4XX_EXP_T5_MASK,
		.shift = IXP4XX_EXP_T5_SHIFT,
	},
	{
		.prop = "intel,ixp4xx-eb-byte-access-on-halfword",
		.max = 1,
		.mask = IXP4XX_EXP_BYTE_RD16,
	},
	{
		.prop = "intel,ixp4xx-eb-hpi-hrdy-pol-high",
		.max = 1,
		.mask = IXP4XX_EXP_HRDY_POL,
	},
	{
		.prop = "intel,ixp4xx-eb-mux-address-and-data",
		.max = 1,
		.mask = IXP4XX_EXP_MUX_EN,
	},
	{
		.prop = "intel,ixp4xx-eb-ahb-split-transfers",
		.max = 1,
		.mask = IXP4XX_EXP_SPLT_EN,
	},
	{
		.prop = "intel,ixp4xx-eb-write-enable",
		.max = 1,
		.mask = IXP4XX_EXP_WR_EN,
	},
	{
		.prop = "intel,ixp4xx-eb-byte-access",
		.max = 1,
		.mask = IXP4XX_EXP_BYTE_EN,
	},
};

static void ixp4xx_exp_setup_chipselect(struct ixp4xx_eb *eb,
					struct device_node *np,
					u32 cs_index,
					u32 cs_size)
{
	u32 cs_cfg;
	u32 val;
	u32 cur_cssize;
	u32 cs_order;
	int ret;
	int i;

Annotation

Implementation Notes