Lines Matching full:sysc

3  * ti-sysc.c - Texas Instruments sysc interconnect target driver
35 #include <linux/platform_data/ti-sysc.h>
37 #include <dt-bindings/bus/ti-sysc.h>
69 struct sysc *ddata;
97 static const char * const reg_names[] = { "rev", "sysc", "syss", };
107 * struct sysc - TI sysc interconnect target module registers and capabilities
113 * @mdata: ti-sysc to hwmod translation data for a module
126 * @enabled: sysc runtime enabled status
138 struct sysc { struct
161 void (*pre_reset_quirk)(struct sysc *sysc); argument
162 void (*post_reset_quirk)(struct sysc *sysc); argument
163 void (*reset_done_quirk)(struct sysc *sysc); argument
164 void (*module_enable_quirk)(struct sysc *sysc); argument
165 void (*module_disable_quirk)(struct sysc *sysc); argument
166 void (*module_unlock_quirk)(struct sysc *sysc); argument
167 void (*module_lock_quirk)(struct sysc *sysc); argument
170 static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
172 static int sysc_reset(struct sysc *ddata);
174 static void sysc_write(struct sysc *ddata, int offset, u32 value) in sysc_write()
193 static u32 sysc_read(struct sysc *ddata, int offset) in sysc_read()
214 static bool sysc_opt_clks_needed(struct sysc *ddata) in sysc_opt_clks_needed()
219 static u32 sysc_read_revision(struct sysc *ddata) in sysc_read_revision()
229 static u32 sysc_read_sysconfig(struct sysc *ddata) in sysc_read_sysconfig()
239 static u32 sysc_read_sysstatus(struct sysc *ddata) in sysc_read_sysstatus()
249 static int sysc_poll_reset_sysstatus(struct sysc *ddata) in sysc_poll_reset_sysstatus()
277 static int sysc_poll_reset_sysconfig(struct sysc *ddata) in sysc_poll_reset_sysconfig()
303 static int sysc_wait_softreset(struct sysc *ddata) in sysc_wait_softreset()
320 static int sysc_add_named_clock_from_child(struct sysc *ddata, in sysc_add_named_clock_from_child()
370 static int sysc_init_ext_opt_clock(struct sysc *ddata, const char *name) in sysc_init_ext_opt_clock()
395 static int sysc_get_one_clock(struct sysc *ddata, const char *name) in sysc_get_one_clock()
437 static int sysc_get_clocks(struct sysc *ddata) in sysc_get_clocks()
507 static int sysc_enable_main_clocks(struct sysc *ddata) in sysc_enable_main_clocks()
543 static void sysc_disable_main_clocks(struct sysc *ddata) in sysc_disable_main_clocks()
560 static int sysc_enable_opt_clocks(struct sysc *ddata) in sysc_enable_opt_clocks()
594 static void sysc_disable_opt_clocks(struct sysc *ddata) in sysc_disable_opt_clocks()
613 static void sysc_clkdm_deny_idle(struct sysc *ddata) in sysc_clkdm_deny_idle()
625 static void sysc_clkdm_allow_idle(struct sysc *ddata) in sysc_clkdm_allow_idle()
643 static int sysc_init_resets(struct sysc *ddata) in sysc_init_resets()
655 * In general we only need rev, syss, and sysc registers and not the whole
660 static int sysc_parse_and_check_child_range(struct sysc *ddata) in sysc_parse_and_check_child_range()
702 static int sysc_defer_non_critical(struct sysc *ddata) in sysc_defer_non_critical()
727 static void sysc_init_stdout_path(struct sysc *ddata) in sysc_init_stdout_path()
758 static void sysc_check_quirk_stdout(struct sysc *ddata, in sysc_check_quirk_stdout()
778 static void sysc_check_one_child(struct sysc *ddata, in sysc_check_one_child()
784 if (name && !of_device_is_compatible(np, "ti,sysc")) in sysc_check_one_child()
791 static void sysc_check_children(struct sysc *ddata) in sysc_check_children()
805 static void sysc_check_quirk_16bit(struct sysc *ddata, struct resource *res) in sysc_check_quirk_16bit()
816 static int sysc_parse_one(struct sysc *ddata, enum sysc_registers reg) in sysc_parse_one()
846 static int sysc_parse_registers(struct sysc *ddata) in sysc_parse_registers()
863 static int sysc_check_registers(struct sysc *ddata) in sysc_check_registers()
908 static int sysc_ioremap(struct sysc *ddata) in sysc_ioremap()
941 static int sysc_map_and_check_registers(struct sysc *ddata) in sysc_map_and_check_registers()
979 static int sysc_show_rev(char *bufp, struct sysc *ddata) in sysc_show_rev()
991 static int sysc_show_reg(struct sysc *ddata, in sysc_show_reg()
1000 static int sysc_show_name(char *bufp, struct sysc *ddata) in sysc_show_name()
1012 static void sysc_show_registers(struct sysc *ddata) in sysc_show_registers()
1034 static void sysc_write_sysconfig(struct sysc *ddata, u32 value) in sysc_write_sysconfig()
1051 struct sysc *ddata; in sysc_enable_module()
1190 struct sysc *ddata; in sysc_disable_module()
1267 struct sysc *ddata) in sysc_runtime_suspend_legacy()
1290 struct sysc *ddata) in sysc_runtime_resume_legacy()
1314 struct sysc *ddata; in sysc_runtime_suspend()
1351 struct sysc *ddata; in sysc_runtime_resume()
1409 static int sysc_check_context(struct sysc *ddata) in sysc_check_context()
1423 static int sysc_reinit_module(struct sysc *ddata, bool leave_enabled) in sysc_reinit_module()
1467 struct sysc *ddata; in sysc_noirq_suspend()
1484 struct sysc *ddata; in sysc_noirq_resume()
1715 static void sysc_init_early_quirks(struct sysc *ddata) in sysc_init_early_quirks()
1744 static void sysc_init_revision_quirks(struct sysc *ddata) in sysc_init_revision_quirks()
1778 static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset, in sysc_quirk_dispc()
1860 static void sysc_pre_reset_quirk_dss(struct sysc *ddata) in sysc_pre_reset_quirk_dss()
1897 static void sysc_pre_reset_quirk_hdq1w(struct sysc *ddata) in sysc_pre_reset_quirk_hdq1w()
1908 static void sysc_module_enable_quirk_aess(struct sysc *ddata) in sysc_module_enable_quirk_aess()
1916 static void sysc_clk_quirk_i2c(struct sysc *ddata, bool enable) in sysc_clk_quirk_i2c()
1936 static void sysc_pre_reset_quirk_i2c(struct sysc *ddata) in sysc_pre_reset_quirk_i2c()
1941 static void sysc_post_reset_quirk_i2c(struct sysc *ddata) in sysc_post_reset_quirk_i2c()
1947 static void sysc_quirk_rtc(struct sysc *ddata, bool lock) in sysc_quirk_rtc()
1970 static void sysc_module_unlock_quirk_rtc(struct sysc *ddata) in sysc_module_unlock_quirk_rtc()
1975 static void sysc_module_lock_quirk_rtc(struct sysc *ddata) in sysc_module_lock_quirk_rtc()
1981 static void sysc_module_enable_quirk_otg(struct sysc *ddata) in sysc_module_enable_quirk_otg()
1988 static void sysc_module_disable_quirk_otg(struct sysc *ddata) in sysc_module_disable_quirk_otg()
1997 static void sysc_module_enable_quirk_sgx(struct sysc *ddata) in sysc_module_enable_quirk_sgx()
2006 static void sysc_reset_done_quirk_wdt(struct sysc *ddata) in sysc_reset_done_quirk_wdt()
2030 static void sysc_module_disable_quirk_pruss(struct sysc *ddata) in sysc_module_disable_quirk_pruss()
2039 static void sysc_init_module_quirks(struct sysc *ddata) in sysc_init_module_quirks()
2095 static int sysc_clockdomain_init(struct sysc *ddata) in sysc_clockdomain_init()
2127 static int sysc_legacy_init(struct sysc *ddata) in sysc_legacy_init()
2146 static int sysc_reset(struct sysc *ddata) in sysc_reset()
2202 static int sysc_init_module(struct sysc *ddata) in sysc_init_module()
2274 static int sysc_init_sysc_mask(struct sysc *ddata) in sysc_init_sysc_mask()
2280 error = of_property_read_u32(np, "ti,sysc-mask", &val); in sysc_init_sysc_mask()
2289 static int sysc_init_idlemode(struct sysc *ddata, u8 *idlemodes, in sysc_init_idlemode()
2306 static int sysc_init_idlemodes(struct sysc *ddata) in sysc_init_idlemodes()
2311 "ti,sysc-midle"); in sysc_init_idlemodes()
2316 "ti,sysc-sidle"); in sysc_init_idlemodes()
2328 * Depends on SYSC being parsed first.
2330 static int sysc_init_syss_mask(struct sysc *ddata) in sysc_init_syss_mask()
2358 static int sysc_child_add_named_clock(struct sysc *ddata, in sysc_child_add_named_clock()
2388 static int sysc_child_add_clocks(struct sysc *ddata, in sysc_child_add_clocks()
2411 static struct sysc *sysc_child_to_parent(struct device *dev) in sysc_child_to_parent()
2423 struct sysc *ddata; in sysc_child_runtime_suspend()
2440 struct sysc *ddata; in sysc_child_runtime_resume()
2459 struct sysc *ddata; in sysc_reinit_modules()
2501 static void sysc_add_restored(struct sysc *ddata) in sysc_add_restored()
2529 struct sysc *ddata; in sysc_notifier_call()
2568 static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np, in sysc_parse_dts_quirks()
2588 static int sysc_init_dts_quirks(struct sysc *ddata) in sysc_init_dts_quirks()
2597 error = of_property_read_u32(np, "ti,sysc-delay-us", &val); in sysc_init_dts_quirks()
2600 dev_warn(ddata->dev, "bad ti,sysc-delay-us: %i\n", in sysc_init_dts_quirks()
2610 static void sysc_unprepare(struct sysc *ddata) in sysc_unprepare()
2624 * Common sysc register bits found on omap2, also known as type1
2656 * SHAM2 (SHA1/MD5) sysc found on omap3, a variant of sysc_regbits_omap2
2698 * Common sysc register bits found on omap4, also known as type2
2726 * Common sysc register bits found on omap4, also known as type3
2745 * SmartReflex sysc found on omap34xx
2766 * SmartReflex sysc found on omap36xx and later
2868 static int sysc_init_pdata(struct sysc *ddata) in sysc_init_pdata()
2895 static int sysc_init_match(struct sysc *ddata) in sysc_init_match()
2912 struct sysc *ddata; in ti_sysc_idle()
2914 ddata = container_of(work, struct sysc, idle_work.work); in ti_sysc_idle()
3004 * Note that we initialize static data shared across all ti-sysc instances
3008 static int sysc_init_static_data(struct sysc *ddata) in sysc_init_static_data()
3047 "ti-sysc: Incomplete old dtb, please update\n"); in sysc_init_static_data()
3115 static int sysc_check_disabled_devices(struct sysc *ddata) in sysc_check_disabled_devices()
3138 static int sysc_check_active_timer(struct sysc *ddata) in sysc_check_active_timer()
3173 struct sysc *ddata; in sysc_probe()
3300 struct sysc *ddata = platform_get_drvdata(pdev); in sysc_remove()
3326 { .compatible = "ti,sysc-omap2", .data = &sysc_omap2, },
3327 { .compatible = "ti,sysc-omap2-timer", .data = &sysc_omap2_timer, },
3328 { .compatible = "ti,sysc-omap4", .data = &sysc_omap4, },
3329 { .compatible = "ti,sysc-omap4-timer", .data = &sysc_omap4_timer, },
3330 { .compatible = "ti,sysc-omap4-simple", .data = &sysc_omap4_simple, },
3331 { .compatible = "ti,sysc-omap3430-sr", .data = &sysc_34xx_sr, },
3332 { .compatible = "ti,sysc-omap3630-sr", .data = &sysc_36xx_sr, },
3333 { .compatible = "ti,sysc-omap4-sr", .data = &sysc_omap4_sr, },
3334 { .compatible = "ti,sysc-omap3-sham", .data = &sysc_omap3_sham, },
3335 { .compatible = "ti,sysc-omap-aes", .data = &sysc_omap3_aes, },
3336 { .compatible = "ti,sysc-mcasp", .data = &sysc_omap4_mcasp, },
3337 { .compatible = "ti,sysc-dra7-mcasp", .data = &sysc_dra7_mcasp, },
3338 { .compatible = "ti,sysc-usb-host-fs",
3340 { .compatible = "ti,sysc-dra7-mcan", .data = &sysc_dra7_mcan, },
3341 { .compatible = "ti,sysc-pruss", .data = &sysc_pruss, },
3350 .name = "ti-sysc",
3372 MODULE_DESCRIPTION("TI sysc interconnect target driver");