• Home
  • Raw
  • Download

Lines Matching +full:rc +full:- +full:map +full:- +full:name

18  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38 if (of_get_property(par, "scom-controller", NULL)) in scom_find_parent()
40 p = of_get_property(par, "scom-parent", NULL); in scom_find_parent()
66 * We support "scom-reg" properties for adding scom registers in scom_map_device()
67 * to a random device-tree node with an explicit scom-parent in scom_map_device()
72 * In case both exist, "scom-reg" takes precedence. in scom_map_device()
74 prop = of_get_property(dev, "scom-reg", &size); in scom_map_device()
75 sprop = of_get_property(parent, "#scom-cells", NULL); in scom_map_device()
76 if (!prop && parent == dev->parent) { in scom_map_device()
78 sprop = of_get_property(parent, "#address-cells", NULL); in scom_map_device()
102 char name[16]; member
108 struct scom_debug_entry *ent = filp->private_data; in scom_debug_read()
113 scom_map_t map; in scom_debug_read() local
114 int rc; in scom_debug_read() local
117 return -EINVAL; in scom_debug_read()
121 map = scom_map(ent->dn, reg, reg_cnt); in scom_debug_read()
122 if (!scom_map_ok(map)) in scom_debug_read()
123 return -ENXIO; in scom_debug_read()
126 rc = scom_read(map, reg, &val); in scom_debug_read()
127 if (!rc) in scom_debug_read()
128 rc = put_user(val, ubuf64); in scom_debug_read()
129 if (rc) { in scom_debug_read()
131 done = rc; in scom_debug_read()
138 scom_unmap(map); in scom_debug_read()
145 struct scom_debug_entry *ent = filp->private_data; in scom_debug_write()
150 scom_map_t map; in scom_debug_write() local
151 int rc; in scom_debug_write() local
154 return -EINVAL; in scom_debug_write()
158 map = scom_map(ent->dn, reg, reg_cnt); in scom_debug_write()
159 if (!scom_map_ok(map)) in scom_debug_write()
160 return -ENXIO; in scom_debug_write()
163 rc = get_user(val, ubuf64); in scom_debug_write()
164 if (!rc) in scom_debug_write()
165 rc = scom_write(map, reg, val); in scom_debug_write()
166 if (rc) { in scom_debug_write()
168 done = rc; in scom_debug_write()
174 scom_unmap(map); in scom_debug_write()
193 return -ENOMEM; in scom_debug_init_one()
195 ent->dn = of_node_get(dn); in scom_debug_init_one()
196 snprintf(ent->name, 16, "%08x", i); in scom_debug_init_one()
197 ent->path.data = (void*)kasprintf(GFP_KERNEL, "%pOF", dn); in scom_debug_init_one()
198 ent->path.size = strlen((char *)ent->path.data); in scom_debug_init_one()
200 dir = debugfs_create_dir(ent->name, root); in scom_debug_init_one()
203 kfree(ent->path.data); in scom_debug_init_one()
205 return -1; in scom_debug_init_one()
208 debugfs_create_blob("devspec", 0400, dir, &ent->path); in scom_debug_init_one()
218 int i, rc; in scom_debug_init() local
222 return -1; in scom_debug_init()
224 i = rc = 0; in scom_debug_init()
225 for_each_node_with_property(dn, "scom-controller") { in scom_debug_init()
227 if (id == -1) in scom_debug_init()
229 rc |= scom_debug_init_one(root, dn, id); in scom_debug_init()
233 return rc; in scom_debug_init()