Lines Matching +full:1 +full:eb

58 #define IXP4XX_EXP_WR_EN		BIT(1)
93 .prop = "intel,ixp4xx-eb-t1",
99 .prop = "intel,ixp4xx-eb-t2",
105 .prop = "intel,ixp4xx-eb-t3",
111 .prop = "intel,ixp4xx-eb-t4",
117 .prop = "intel,ixp4xx-eb-t5",
123 .prop = "intel,ixp4xx-eb-byte-access-on-halfword",
124 .max = 1,
128 .prop = "intel,ixp4xx-eb-hpi-hrdy-pol-high",
129 .max = 1,
133 .prop = "intel,ixp4xx-eb-mux-address-and-data",
134 .max = 1,
138 .prop = "intel,ixp4xx-eb-ahb-split-transfers",
139 .max = 1,
143 .prop = "intel,ixp4xx-eb-write-enable",
144 .max = 1,
148 .prop = "intel,ixp4xx-eb-byte-access",
149 .max = 1,
154 static void ixp4xx_exp_setup_chipselect(struct ixp4xx_eb *eb, in ixp4xx_exp_setup_chipselect() argument
166 if (eb->is_42x && (cs_index > 7)) { in ixp4xx_exp_setup_chipselect()
167 dev_err(eb->dev, in ixp4xx_exp_setup_chipselect()
172 if (eb->is_43x && (cs_index > 3)) { in ixp4xx_exp_setup_chipselect()
173 dev_err(eb->dev, in ixp4xx_exp_setup_chipselect()
191 regmap_read(eb->rmap, IXP4XX_EXP_TIMING_CS0 + in ixp4xx_exp_setup_chipselect()
193 dev_info(eb->dev, "CS%d at %#08x, size %#08x, config before: %#08x\n", in ixp4xx_exp_setup_chipselect()
194 cs_index, eb->bus_base + IXP4XX_EXP_STRIDE * cs_index, in ixp4xx_exp_setup_chipselect()
203 dev_err(eb->dev, "illegal size order %d\n", cs_order); in ixp4xx_exp_setup_chipselect()
206 dev_dbg(eb->dev, "CS%d size order: %d\n", cs_index, cs_order); in ixp4xx_exp_setup_chipselect()
219 if (ip->max == 1) { in ixp4xx_exp_setup_chipselect()
224 dev_info(eb->dev, "CS%d %s %s\n", cs_index, in ixp4xx_exp_setup_chipselect()
231 dev_err(eb->dev, in ixp4xx_exp_setup_chipselect()
239 dev_info(eb->dev, "CS%d set %s to %u\n", cs_index, ip->prop, val); in ixp4xx_exp_setup_chipselect()
242 ret = of_property_read_u32(np, "intel,ixp4xx-eb-cycle-type", &val); in ixp4xx_exp_setup_chipselect()
245 dev_err(eb->dev, "illegal cycle type %d\n", val); in ixp4xx_exp_setup_chipselect()
248 dev_info(eb->dev, "CS%d set cycle type %d\n", cs_index, val); in ixp4xx_exp_setup_chipselect()
253 if (eb->is_43x) { in ixp4xx_exp_setup_chipselect()
261 dev_info(eb->dev, "claims to be Intel strata flash\n"); in ixp4xx_exp_setup_chipselect()
265 regmap_write(eb->rmap, in ixp4xx_exp_setup_chipselect()
268 dev_info(eb->dev, "CS%d wrote %#08x into CS config\n", cs_index, cs_cfg); in ixp4xx_exp_setup_chipselect()
277 ixp4xx_exp_setup_chipselect(eb, np, in ixp4xx_exp_setup_chipselect()
278 cs_index + 1, in ixp4xx_exp_setup_chipselect()
282 static void ixp4xx_exp_setup_child(struct ixp4xx_eb *eb, in ixp4xx_exp_setup_child() argument
295 dev_dbg(eb->dev, "child %s has %d register sets\n", in ixp4xx_exp_setup_child()
309 i * IXP4XX_OF_REG_SIZE + 1, &rbase); in ixp4xx_exp_setup_child()
318 dev_err(eb->dev, "illegal CS %d\n", csindex); in ixp4xx_exp_setup_child()
330 dev_dbg(eb->dev, "CS%d size %#08x\n", csindex, cssize); in ixp4xx_exp_setup_child()
340 ixp4xx_exp_setup_chipselect(eb, np, csindex, cssize); in ixp4xx_exp_setup_child()
348 struct ixp4xx_eb *eb; in ixp4xx_exp_probe() local
354 eb = devm_kzalloc(dev, sizeof(*eb), GFP_KERNEL); in ixp4xx_exp_probe()
355 if (!eb) in ixp4xx_exp_probe()
358 eb->dev = dev; in ixp4xx_exp_probe()
359 eb->is_42x = of_device_is_compatible(np, "intel,ixp42x-expansion-bus-controller"); in ixp4xx_exp_probe()
360 eb->is_43x = of_device_is_compatible(np, "intel,ixp43x-expansion-bus-controller"); in ixp4xx_exp_probe()
362 eb->rmap = syscon_node_to_regmap(np); in ixp4xx_exp_probe()
363 if (IS_ERR(eb->rmap)) in ixp4xx_exp_probe()
364 return dev_err_probe(dev, PTR_ERR(eb->rmap), "no regmap\n"); in ixp4xx_exp_probe()
367 ret = regmap_read(eb->rmap, IXP4XX_EXP_CNFG0, &val); in ixp4xx_exp_probe()
371 eb->bus_base = IXP4XX_EXP_BOOT_BASE; in ixp4xx_exp_probe()
373 eb->bus_base = IXP4XX_EXP_NORMAL_BASE; in ixp4xx_exp_probe()
374 dev_info(dev, "expansion bus at %08x\n", eb->bus_base); in ixp4xx_exp_probe()
376 if (eb->is_43x) { in ixp4xx_exp_probe()
378 regmap_read(eb->rmap, IXP43X_EXP_UNIT_FUSE_RESET, &val); in ixp4xx_exp_probe()
383 case 1: in ixp4xx_exp_probe()
397 ixp4xx_exp_setup_child(eb, child); in ixp4xx_exp_probe()