Lines Matching defs:ocelot

11 #include "ocelot.h"
13 u32 __ocelot_read_ix(struct ocelot *ocelot, u32 reg, u32 offset)
20 regmap_read(ocelot->targets[target],
21 ocelot->map[target][reg & REG_MASK] + offset, &val);
26 void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset)
32 regmap_write(ocelot->targets[target],
33 ocelot->map[target][reg & REG_MASK] + offset, val);
37 void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg,
44 regmap_update_bits(ocelot->targets[target],
45 ocelot->map[target][reg & REG_MASK] + offset,
52 struct ocelot *ocelot = port->ocelot;
58 regmap_read(port->target, ocelot->map[target][reg & REG_MASK], &val);
65 struct ocelot *ocelot = port->ocelot;
70 regmap_write(port->target, ocelot->map[target][reg & REG_MASK], val);
82 u32 __ocelot_target_read_ix(struct ocelot *ocelot, enum ocelot_target target,
87 regmap_read(ocelot->targets[target],
88 ocelot->map[target][reg] + offset, &val);
92 void __ocelot_target_write_ix(struct ocelot *ocelot, enum ocelot_target target,
95 regmap_write(ocelot->targets[target],
96 ocelot->map[target][reg] + offset, val);
99 int ocelot_regfields_init(struct ocelot *ocelot,
114 regfield.reg = ocelot->map[target][reg & REG_MASK];
120 ocelot->regfields[i] =
121 devm_regmap_field_alloc(ocelot->dev,
122 ocelot->targets[target],
125 if (IS_ERR(ocelot->regfields[i]))
126 return PTR_ERR(ocelot->regfields[i]);
139 struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res)
143 regs = devm_ioremap_resource(ocelot->dev, res);
149 return devm_regmap_init_mmio(ocelot->dev, regs, &ocelot_regmap_config);