Skip to content

Commit e5d9875

Browse files
committed
Merge tag 'omap-for-v4.18/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
ti-sysc driver related changes for omap variants This series improves the ti-sysc interconnect target module driver to the point where a most of SoC can be booted with interconnect target module data configured in device tree instead of legacy platform data. The related device tree changes need some more work though, and can wait for v4.19. Also some drivers using nested interconnects like DSS need more work. We can now remove the unused pm-noop code that is not doing anything any longer. And we can now initialize things for PM and display pdata later to prepare things for using ti-sysc driver. We also need to add some more quirk handling so we can boot both with platform data and dts data. * tag 'omap-for-v4.18/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Show module information for suspend if DEBUG is enabled bus: ti-sysc: Tag sdio and wdt with legacy mode for suspend bus: ti-sysc: Detect UARTs for SYSC_QUIRK_LEGACY_IDLE quirk on omap4 bus: ti-sysc: Detect omap4 type timers for quirk bus: ti-sysc: Add initial support for external resets bus: ti-sysc: Improve suspend and resume handling bus: ti-sysc: Tag some modules resource providers for noirq suspend bus: ti-sysc: Add handling for clkctrl opt clocks bus: ti-sysc: Make child clock alias handling more generic bus: ti-sysc: Handle simple-bus for nested children ARM: OMAP2+: Make display related init into device_initcall ARM: OMAP2+: Initialize SoC PM later ARM: OMAP2+: Only probe SDMA via ti-sysc if configured in dts ARM: OMAP2+: Use signed value for sysc register offsets ARM: OMAP2+: Allow using ti-sysc for system timers ARM: OMAP2+: Drop unused pm-noop Signed-off-by: Olof Johansson <olof@lixom.net>
2 parents de6037f + dc4c85e commit e5d9875

30 files changed

Lines changed: 494 additions & 559 deletions

‎Documentation/devicetree/bindings/bus/ti-sysc.txt‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ Optional properties:
7979
mode as for example omap4 L4_CFG_CLKCTRL
8080

8181
- clock-names should contain at least "fck", and optionally also "ick"
82-
depending on the SoC and the interconnect target module
82+
depending on the SoC and the interconnect target module,
83+
some interconnect target modules also need additional
84+
optional clocks that can be specified as listed in TRM
85+
for the related CLKCTRL register bits 8 to 15 such as
86+
"dbclk" or "clk32k" depending on their role
8387

8488
- ti,hwmods optional TI interconnect module name to use legacy
8589
hwmod platform data

‎arch/arm/mach-omap2/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ endif
7878
omap-4-5-pm-common = omap-mpuss-lowpower.o
7979
obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-pm-common)
8080
obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-pm-common)
81-
obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o
8281

8382
ifeq ($(CONFIG_PM),y)
8483
obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o

‎arch/arm/mach-omap2/board-generic.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ static const struct of_device_id omap_dt_match_table[] __initconst = {
3131
static void __init __maybe_unused omap_generic_init(void)
3232
{
3333
pdata_quirks_init(omap_dt_match_table);
34-
35-
omapdss_init_of();
3634
omap_soc_device_init();
3735
}
3836

‎arch/arm/mach-omap2/common.h‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444

4545
#define OMAP_INTC_START NR_IRQS
4646

47+
extern int (*omap_pm_soc_init)(void);
48+
int omap_pm_nop_init(void);
49+
4750
#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP2)
4851
int omap2_pm_init(void);
4952
#else
@@ -79,9 +82,12 @@ static inline int omap4_pm_init_early(void)
7982

8083
#if defined(CONFIG_PM) && (defined(CONFIG_SOC_AM33XX) || \
8184
defined(CONFIG_SOC_AM43XX))
82-
void amx3_common_pm_init(void);
85+
int amx3_common_pm_init(void);
8386
#else
84-
static inline void amx3_common_pm_init(void) { }
87+
static inline int amx3_common_pm_init(void)
88+
{
89+
return 0;
90+
}
8591
#endif
8692

8793
extern void omap2_init_common_infrastructure(void);
@@ -122,14 +128,10 @@ void am43xx_init_early(void);
122128
void am43xx_init_late(void);
123129
void omap4430_init_early(void);
124130
void omap5_init_early(void);
125-
void omap3_init_late(void); /* Do not use this one */
131+
void omap3_init_late(void);
126132
void omap4430_init_late(void);
127133
void omap2420_init_late(void);
128134
void omap2430_init_late(void);
129-
void omap3430_init_late(void);
130-
void omap35xx_init_late(void);
131-
void omap3630_init_late(void);
132-
void am35xx_init_late(void);
133135
void ti81xx_init_late(void);
134136
void am33xx_init_late(void);
135137
void omap5_init_late(void);
@@ -350,7 +352,5 @@ extern int omap_dss_reset(struct omap_hwmod *);
350352
/* SoC specific clock initializer */
351353
int omap_clk_init(void);
352354

353-
int __init omapdss_init_of(void);
354-
355355
#endif /* __ASSEMBLER__ */
356356
#endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */

‎arch/arm/mach-omap2/display.c‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include <linux/platform_data/omapdss.h>
3333
#include "omap_hwmod.h"
3434
#include "omap_device.h"
35-
#include "omap-pm.h"
3635
#include "common.h"
3736

3837
#include "soc.h"
@@ -126,11 +125,6 @@ static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask)
126125
omap4_dsi_mux_pads(dsi_id, 0);
127126
}
128127

129-
static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput)
130-
{
131-
return omap_pm_set_min_bus_tput(dev, OCP_INITIATOR_AGENT, tput);
132-
}
133-
134128
static enum omapdss_version __init omap_display_get_version(void)
135129
{
136130
if (cpu_is_omap24xx())
@@ -169,7 +163,6 @@ static int __init omapdss_init_fbdev(void)
169163
static struct omap_dss_board_info board_data = {
170164
.dsi_enable_pads = omap_dsi_enable_pads,
171165
.dsi_disable_pads = omap_dsi_disable_pads,
172-
.set_min_bus_tput = omap_dss_set_min_bus_tput,
173166
};
174167
struct device_node *node;
175168
int r;
@@ -392,7 +385,7 @@ static struct device_node * __init omapdss_find_dss_of_node(void)
392385
return NULL;
393386
}
394387

395-
int __init omapdss_init_of(void)
388+
static int __init omapdss_init_of(void)
396389
{
397390
int r;
398391
struct device_node *node;
@@ -422,3 +415,4 @@ int __init omapdss_init_of(void)
422415

423416
return omapdss_init_fbdev();
424417
}
418+
omap_device_initcall(omapdss_init_of);

‎arch/arm/mach-omap2/hsmmc.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#include "soc.h"
2020
#include "omap_device.h"
21-
#include "omap-pm.h"
2221

2322
#include "hsmmc.h"
2423
#include "control.h"

‎arch/arm/mach-omap2/i2c.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "soc.h"
2323
#include "omap_hwmod.h"
2424
#include "omap_device.h"
25-
#include "omap-pm.h"
2625

2726
#include "prm.h"
2827
#include "common.h"

‎arch/arm/mach-omap2/io.c‎

Lines changed: 9 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include "clock.h"
3838
#include "clock2xxx.h"
3939
#include "clock3xxx.h"
40-
#include "omap-pm.h"
4140
#include "sdrc.h"
4241
#include "control.h"
4342
#include "serial.h"
@@ -421,13 +420,6 @@ static void __init __maybe_unused omap_hwmod_init_postsetup(void)
421420
postsetup_state = _HWMOD_STATE_ENABLED;
422421
#endif
423422
omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state);
424-
425-
omap_pm_if_early_init();
426-
}
427-
428-
static void __init __maybe_unused omap_common_late_init(void)
429-
{
430-
omap2_common_pm_late_init();
431423
}
432424

433425
#ifdef CONFIG_SOC_OMAP2420
@@ -450,9 +442,7 @@ void __init omap2420_init_early(void)
450442

451443
void __init omap2420_init_late(void)
452444
{
453-
omap_common_late_init();
454-
omap2_pm_init();
455-
omap2_clk_enable_autoidle_all();
445+
omap_pm_soc_init = omap2_pm_init;
456446
}
457447
#endif
458448

@@ -476,9 +466,7 @@ void __init omap2430_init_early(void)
476466

477467
void __init omap2430_init_late(void)
478468
{
479-
omap_common_late_init();
480-
omap2_pm_init();
481-
omap2_clk_enable_autoidle_all();
469+
omap_pm_soc_init = omap2_pm_init;
482470
}
483471
#endif
484472

@@ -529,43 +517,12 @@ void __init am35xx_init_early(void)
529517

530518
void __init omap3_init_late(void)
531519
{
532-
omap_common_late_init();
533-
omap3_pm_init();
534-
omap2_clk_enable_autoidle_all();
535-
}
536-
537-
void __init omap3430_init_late(void)
538-
{
539-
omap_common_late_init();
540-
omap3_pm_init();
541-
omap2_clk_enable_autoidle_all();
542-
}
543-
544-
void __init omap35xx_init_late(void)
545-
{
546-
omap_common_late_init();
547-
omap3_pm_init();
548-
omap2_clk_enable_autoidle_all();
549-
}
550-
551-
void __init omap3630_init_late(void)
552-
{
553-
omap_common_late_init();
554-
omap3_pm_init();
555-
omap2_clk_enable_autoidle_all();
556-
}
557-
558-
void __init am35xx_init_late(void)
559-
{
560-
omap_common_late_init();
561-
omap3_pm_init();
562-
omap2_clk_enable_autoidle_all();
520+
omap_pm_soc_init = omap3_pm_init;
563521
}
564522

565523
void __init ti81xx_init_late(void)
566524
{
567-
omap_common_late_init();
568-
omap2_clk_enable_autoidle_all();
525+
omap_pm_soc_init = omap_pm_nop_init;
569526
}
570527
#endif
571528

@@ -621,8 +578,7 @@ void __init am33xx_init_early(void)
621578

622579
void __init am33xx_init_late(void)
623580
{
624-
omap_common_late_init();
625-
amx3_common_pm_init();
581+
omap_pm_soc_init = amx3_common_pm_init;
626582
}
627583
#endif
628584

@@ -645,9 +601,7 @@ void __init am43xx_init_early(void)
645601

646602
void __init am43xx_init_late(void)
647603
{
648-
omap_common_late_init();
649-
omap2_clk_enable_autoidle_all();
650-
amx3_common_pm_init();
604+
omap_pm_soc_init = amx3_common_pm_init;
651605
}
652606
#endif
653607

@@ -675,9 +629,7 @@ void __init omap4430_init_early(void)
675629

676630
void __init omap4430_init_late(void)
677631
{
678-
omap_common_late_init();
679-
omap4_pm_init();
680-
omap2_clk_enable_autoidle_all();
632+
omap_pm_soc_init = omap4_pm_init;
681633
}
682634
#endif
683635

@@ -703,9 +655,7 @@ void __init omap5_init_early(void)
703655

704656
void __init omap5_init_late(void)
705657
{
706-
omap_common_late_init();
707-
omap4_pm_init();
708-
omap2_clk_enable_autoidle_all();
658+
omap_pm_soc_init = omap4_pm_init;
709659
}
710660
#endif
711661

@@ -728,9 +678,7 @@ void __init dra7xx_init_early(void)
728678

729679
void __init dra7xx_init_late(void)
730680
{
731-
omap_common_late_init();
732-
omap4_pm_init();
733-
omap2_clk_enable_autoidle_all();
681+
omap_pm_soc_init = omap4_pm_init;
734682
}
735683
#endif
736684

0 commit comments

Comments
 (0)