Среда, 29 января 2014, 10:30 +01:00 от Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>: > Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> > --- ... > +++ b/drivers/misc/sram.c > @@ -0,0 +1,75 @@ > +/* > + * drivers/misc/sram.c - generic memory mapped SRAM driver ... > +static int sram_probe(struct device_d *dev) > +{ > + struct sram *sram; > + struct resource *res; > + void __iomem *base; > + int ret; > + > + base = dev_request_mem_region(dev, 0); > + if (!base) > + return -EBUSY; > + > + sram = xzalloc(sizeof(*sram)); > + > + sram->cdev.name = asprintf("sram%d", > + cdev_find_free_index("sram")); > + > + res = dev_get_resource(dev, 0); > + > + sram->cdev.size = (unsigned long)resource_size(res); > + sram->cdev.ops = &memops; > + sram->cdev.dev = dev; > + > + ret = devfs_create(&sram->cdev); > + if (ret) > + return ret; > + > + return 0; > +} Probably we should include clock handling in this driver to make it compatible with kernel version of this driver. --- _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox