Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'omap-for-v6.6/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/arm

SoC changes for omaps for v6.6

SoC changes to include the correct devicetree headers, and an update to
make use of_range_to_resource(). There is also a non-urgent fix for
pwrdm_read_prev_pwrst() array-bounds warning.

* tag 'omap-for-v6.6/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: omap2: Explicitly include correct DT includes
ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
ARM: omap2: Use of_range_to_resource() for "ranges" parsing

Link: https://lore.kernel.org/r/pull-1691658952-110529@atomide.com-4
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+9 -44
+1 -2
arch/arm/mach-omap2/board-generic.c
··· 9 9 * to support the OMAP2+ device tree boards with an unique board file. 10 10 */ 11 11 #include <linux/io.h> 12 - #include <linux/of_irq.h> 13 - #include <linux/of_platform.h> 14 12 #include <linux/irqdomain.h> 15 13 #include <linux/clocksource.h> 16 14 #include <linux/clockchips.h> 15 + #include <linux/mod_devicetable.h> 17 16 18 17 #include <asm/setup.h> 19 18 #include <asm/mach/arch.h>
+1 -2
arch/arm/mach-omap2/omap4-common.c
··· 12 12 #include <linux/io.h> 13 13 #include <linux/irq.h> 14 14 #include <linux/irqchip.h> 15 - #include <linux/platform_device.h> 16 15 #include <linux/memblock.h> 16 + #include <linux/of.h> 17 17 #include <linux/of_irq.h> 18 - #include <linux/of_platform.h> 19 18 #include <linux/export.h> 20 19 #include <linux/irqchip/arm-gic.h> 21 20 #include <linux/of_address.h>
+6 -39
arch/arm/mach-omap2/omap_hwmod.c
··· 2194 2194 struct resource *res) 2195 2195 { 2196 2196 struct property *prop; 2197 - const __be32 *ranges; 2198 2197 const char *name; 2199 - u32 nr_addr, nr_size; 2200 - u64 base, size; 2201 - int len, error; 2202 - 2203 - if (!res) 2204 - return -EINVAL; 2205 - 2206 - ranges = of_get_property(np, "ranges", &len); 2207 - if (!ranges) 2208 - return -ENOENT; 2209 - 2210 - len /= sizeof(*ranges); 2211 - 2212 - if (len < 3) 2213 - return -EINVAL; 2198 + int err; 2214 2199 2215 2200 of_property_for_each_string(np, "compatible", prop, name) 2216 2201 if (!strncmp("ti,sysc-", name, 8)) ··· 2204 2219 if (!name) 2205 2220 return -ENOENT; 2206 2221 2207 - error = of_property_read_u32(np, "#address-cells", &nr_addr); 2208 - if (error) 2209 - return -ENOENT; 2222 + err = of_range_to_resource(np, 0, res); 2223 + if (err) 2224 + return err; 2210 2225 2211 - error = of_property_read_u32(np, "#size-cells", &nr_size); 2212 - if (error) 2213 - return -ENOENT; 2214 - 2215 - if (nr_addr != 1 || nr_size != 1) { 2216 - pr_err("%s: invalid range for %s->%pOFn\n", __func__, 2217 - oh->name, np); 2218 - return -EINVAL; 2219 - } 2220 - 2221 - ranges++; 2222 - base = of_translate_address(np, ranges++); 2223 - size = be32_to_cpup(ranges); 2224 - 2225 - pr_debug("omap_hwmod: %s %pOFn at 0x%llx size 0x%llx\n", 2226 - oh->name, np, base, size); 2226 + pr_debug("omap_hwmod: %s %pOFn at %pR\n", 2227 + oh->name, np, &res); 2227 2228 2228 2229 if (oh && oh->mpu_rt_idx) { 2229 2230 omap_hwmod_fix_mpu_rt_idx(oh, np, res); 2230 2231 2231 2232 return 0; 2232 2233 } 2233 - 2234 - res->start = base; 2235 - res->end = base + size - 1; 2236 - res->flags = IORESOURCE_MEM; 2237 2234 2238 2235 return 0; 2239 2236 }
+1 -1
arch/arm/mach-omap2/powerdomain.c
··· 174 174 break; 175 175 case PWRDM_STATE_PREV: 176 176 prev = pwrdm_read_prev_pwrst(pwrdm); 177 - if (pwrdm->state != prev) 177 + if (prev >= 0 && pwrdm->state != prev) 178 178 pwrdm->state_counter[prev]++; 179 179 if (prev == PWRDM_POWER_RET) 180 180 _update_logic_membank_counters(pwrdm);