18 #include <linux/device.h>
19 #include <linux/module.h>
27 #include <linux/slab.h>
28 #include <mach/sram.h>
30 #define DRV_NAME "pruss_uio"
31 #define DRV_VERSION "1.0"
33 static int sram_pool_sz =
SZ_16K;
37 static int extram_pool_sz =
SZ_256K;
55 #define MAX_PRUSS_EVT 8
57 #define PINTC_HIDISR 0x0038
58 #define PINTC_HIPIR 0x0900
59 #define HIPIR_NOPEND 0x80000000
60 #define PINTC_HIER 0x1500
146 dev_err(&dev->
dev,
"No PRUSS I/O resource specified\n");
150 if (!regs_prussio->
start) {
151 dev_err(&dev->
dev,
"Invalid memory resource\n");
157 dev_err(&dev->
dev,
"Could not allocate SRAM pool\n");
164 dev_err(&dev->
dev,
"Could not allocate external memory\n");
168 len = resource_size(regs_prussio);
171 dev_err(&dev->
dev,
"Can't remap PRUSS I/O address range\n");
178 for (cnt = 0, p = gdev->
info; cnt < MAX_PRUSS_EVT; cnt++, p++) {
179 p->
mem[0].addr = regs_prussio->
start;
180 p->
mem[0].size = resource_size(regs_prussio);
184 p->
mem[1].size = sram_pool_sz;
188 p->
mem[2].size = extram_pool_sz;
204 platform_set_drvdata(dev, gdev);
208 pruss_cleanup(dev, gdev);
216 pruss_cleanup(dev, gdev);
217 platform_set_drvdata(dev,
NULL);
222 .probe = pruss_probe,