Skip to content

Commit fb481b2

Browse files
committed
Merge tag 'omap-for-v6.4/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/arm
Clean-up for omaps for v6.4 Some clean-up changes for omaps mostly to use of_property_read_bool() and of_address_to_resource(). Also included is removal for an obsolete Kconfig option, a typo fix, a return path change for am33xx_suspend_init(), and a change to use kzalloc instead of kcalloc for a single element. * tag 'omap-for-v6.4/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: hwmod: Use kzalloc for allocating only one element ARM: OMAP2+: Remove the unneeded result variable ARM: OMAP2+: fix repeated words in comments ARM: OMAP2+: remove obsolete config OMAP3_SDRC_AC_TIMING ARM: OMAP2+: Use of_address_to_resource() ARM: OMAP2+: Use of_property_read_bool() for boolean properties Link: https://lore.kernel.org/r/pull-1680180293-92168@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents d605366 + 19050da commit fb481b2

4 files changed

Lines changed: 12 additions & 30 deletions

File tree

arch/arm/mach-omap2/Kconfig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,6 @@ config MACH_NOKIA_N8X0
255255
select MACH_NOKIA_N810
256256
select MACH_NOKIA_N810_WIMAX
257257

258-
config OMAP3_SDRC_AC_TIMING
259-
bool "Enable SDRC AC timing register changes"
260-
depends on ARCH_OMAP3
261-
help
262-
If you know that none of your system initiators will attempt to
263-
access SDRAM during CORE DVFS, select Y here. This should boost
264-
SDRAM performance at lower CORE OPPs. There are relatively few
265-
users who will wish to say yes at this point - almost everyone will
266-
wish to say no. Selecting yes without understanding what is
267-
going on could result in system crashes;
268-
269258
endmenu
270259

271260
endif

arch/arm/mach-omap2/cm33xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright (C) 2011-2012 Texas Instruments Incorporated - https://www.ti.com/
66
* Vaibhav Hiremath <hvaibhav@ti.com>
77
*
8-
* Reference taken from from OMAP4 cminst44xx.c
8+
* Reference taken from OMAP4 cminst44xx.c
99
*/
1010

1111
#include <linux/kernel.h>

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,7 @@ static const struct of_device_id ti_clkctrl_match_table[] __initconst = {
706706

707707
static int __init _setup_clkctrl_provider(struct device_node *np)
708708
{
709-
const __be32 *addrp;
710709
struct clkctrl_provider *provider;
711-
u64 size;
712710
int i;
713711

714712
provider = memblock_alloc(sizeof(*provider), SMP_CACHE_BYTES);
@@ -717,8 +715,7 @@ static int __init _setup_clkctrl_provider(struct device_node *np)
717715

718716
provider->node = np;
719717

720-
provider->num_addrs =
721-
of_property_count_elems_of_size(np, "reg", sizeof(u32)) / 2;
718+
provider->num_addrs = of_address_count(np);
722719

723720
provider->addr =
724721
memblock_alloc(sizeof(void *) * provider->num_addrs,
@@ -733,11 +730,11 @@ static int __init _setup_clkctrl_provider(struct device_node *np)
733730
return -ENOMEM;
734731

735732
for (i = 0; i < provider->num_addrs; i++) {
736-
addrp = of_get_address(np, i, &size, NULL);
737-
provider->addr[i] = (u32)of_translate_address(np, addrp);
738-
provider->size[i] = size;
739-
pr_debug("%s: %pOF: %x...%x\n", __func__, np, provider->addr[i],
740-
provider->addr[i] + provider->size[i]);
733+
struct resource res;
734+
of_address_to_resource(np, i, &res);
735+
provider->addr[i] = res.start;
736+
provider->size[i] = resource_size(&res);
737+
pr_debug("%s: %pOF: %pR\n", __func__, np, &res);
741738
}
742739

743740
list_add(&provider->link, &clkctrl_providers);
@@ -2322,11 +2319,11 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
23222319
static void __init parse_module_flags(struct omap_hwmod *oh,
23232320
struct device_node *np)
23242321
{
2325-
if (of_find_property(np, "ti,no-reset-on-init", NULL))
2322+
if (of_property_read_bool(np, "ti,no-reset-on-init"))
23262323
oh->flags |= HWMOD_INIT_NO_RESET;
2327-
if (of_find_property(np, "ti,no-idle-on-init", NULL))
2324+
if (of_property_read_bool(np, "ti,no-idle-on-init"))
23282325
oh->flags |= HWMOD_INIT_NO_IDLE;
2329-
if (of_find_property(np, "ti,no-idle", NULL))
2326+
if (of_property_read_bool(np, "ti,no-idle"))
23302327
oh->flags |= HWMOD_NO_IDLE;
23312328
}
23322329

@@ -3457,7 +3454,7 @@ static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh,
34573454
}
34583455

34593456
if (list_empty(&oh->slave_ports)) {
3460-
oi = kcalloc(1, sizeof(*oi), GFP_KERNEL);
3457+
oi = kzalloc(sizeof(*oi), GFP_KERNEL);
34613458
if (!oi)
34623459
goto out_free_class;
34633460

arch/arm/mach-omap2/pm33xx-core.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,14 @@ static int amx3_common_init(int (*idle)(u32 wfi_flags))
104104

105105
static int am33xx_suspend_init(int (*idle)(u32 wfi_flags))
106106
{
107-
int ret;
108-
109107
gfx_l4ls_clkdm = clkdm_lookup("gfx_l4ls_gfx_clkdm");
110108

111109
if (!gfx_l4ls_clkdm) {
112110
pr_err("PM: Cannot lookup gfx_l4ls_clkdm clockdomains\n");
113111
return -ENODEV;
114112
}
115113

116-
ret = amx3_common_init(idle);
117-
118-
return ret;
114+
return amx3_common_init(idle);
119115
}
120116

121117
static int am43xx_suspend_init(int (*idle)(u32 wfi_flags))

0 commit comments

Comments
 (0)