diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-09-05 18:21:22 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-09-05 18:21:22 -0400 |
commit | 2c910cb75e1fe6de52d95c8e32caedd1629a33a5 (patch) | |
tree | 94a0eea6f8cde689d11e7583ddd0a930b8785ab4 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 627212c9d49ba2759b699450f5d8f45f73e062fa (diff) | |
parent | b53b1c08a23eb1091982daacb2122f90a7094a77 (diff) |
Merge branch 'uverbs_dev_cleanups' into rdma.git for-next
For dependencies, branch based on rdma.git 'for-rc' of
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/
Pull 'uverbs_dev_cleanups' from Leon Romanovsky:
====================
Reuse the char device code interfaces to simplify ib_uverbs_device
creation and destruction. As part of this series, we are sending fix to
cleanup path, which was discovered during internal review,
The fix definitely can go to -rc, but it means that this series will be
dependent on rdma-rc.
====================
* branch 'uverbs_dev_cleanups':
RDMA/uverbs: Use device.groups to initialize device attributes
RDMA/uverbs: Use cdev_device_add() instead of cdev_add()
RDMA/core: Depend on device_add() to add device attributes
RDMA/uverbs: Fix error cleanup path of ib_uverbs_add_one()
Resolved conflict in ib_device_unregister_sysfs()
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 2ceffd85dd3d..cd65ea4e9c54 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -2161,6 +2161,37 @@ static int of_dev_hwmod_lookup(struct device_node *np, | |||
2161 | } | 2161 | } |
2162 | 2162 | ||
2163 | /** | 2163 | /** |
2164 | * omap_hwmod_fix_mpu_rt_idx - fix up mpu_rt_idx register offsets | ||
2165 | * | ||
2166 | * @oh: struct omap_hwmod * | ||
2167 | * @np: struct device_node * | ||
2168 | * | ||
2169 | * Fix up module register offsets for modules with mpu_rt_idx. | ||
2170 | * Only needed for cpsw with interconnect target module defined | ||
2171 | * in device tree while still using legacy hwmod platform data | ||
2172 | * for rev, sysc and syss registers. | ||
2173 | * | ||
2174 | * Can be removed when all cpsw hwmod platform data has been | ||
2175 | * dropped. | ||
2176 | */ | ||
2177 | static void omap_hwmod_fix_mpu_rt_idx(struct omap_hwmod *oh, | ||
2178 | struct device_node *np, | ||
2179 | struct resource *res) | ||
2180 | { | ||
2181 | struct device_node *child = NULL; | ||
2182 | int error; | ||
2183 | |||
2184 | child = of_get_next_child(np, child); | ||
2185 | if (!child) | ||
2186 | return; | ||
2187 | |||
2188 | error = of_address_to_resource(child, oh->mpu_rt_idx, res); | ||
2189 | if (error) | ||
2190 | pr_err("%s: error mapping mpu_rt_idx: %i\n", | ||
2191 | __func__, error); | ||
2192 | } | ||
2193 | |||
2194 | /** | ||
2164 | * omap_hwmod_parse_module_range - map module IO range from device tree | 2195 | * omap_hwmod_parse_module_range - map module IO range from device tree |
2165 | * @oh: struct omap_hwmod * | 2196 | * @oh: struct omap_hwmod * |
2166 | * @np: struct device_node * | 2197 | * @np: struct device_node * |
@@ -2220,7 +2251,13 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh, | |||
2220 | size = be32_to_cpup(ranges); | 2251 | size = be32_to_cpup(ranges); |
2221 | 2252 | ||
2222 | pr_debug("omap_hwmod: %s %s at 0x%llx size 0x%llx\n", | 2253 | pr_debug("omap_hwmod: %s %s at 0x%llx size 0x%llx\n", |
2223 | oh->name, np->name, base, size); | 2254 | oh ? oh->name : "", np->name, base, size); |
2255 | |||
2256 | if (oh && oh->mpu_rt_idx) { | ||
2257 | omap_hwmod_fix_mpu_rt_idx(oh, np, res); | ||
2258 | |||
2259 | return 0; | ||
2260 | } | ||
2224 | 2261 | ||
2225 | res->start = base; | 2262 | res->start = base; |
2226 | res->end = base + size - 1; | 2263 | res->end = base + size - 1; |