Merge c903327d32 ("Merge tag 'printk-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux") into android-mainline
Steps on the way to 6.12-rc1 Bug: 367265496 Change-Id: I0d94aa9be16f183bf187f91dc4916add32722775 Signed-off-by: Matthias Maennich <maennich@google.com>
This commit is contained in:
@@ -25,6 +25,10 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
static void *suspend_resume_cb_data;
|
||||
|
||||
static void (*suspend_resume_callback)(void *data, bool suspend);
|
||||
|
||||
/*
|
||||
* The I/O port the PMTMR resides at.
|
||||
* The location is detected during setup_arch(),
|
||||
@@ -58,6 +62,32 @@ u32 acpi_pm_read_verified(void)
|
||||
return v2;
|
||||
}
|
||||
|
||||
void acpi_pmtmr_register_suspend_resume_callback(void (*cb)(void *data, bool suspend), void *data)
|
||||
{
|
||||
suspend_resume_callback = cb;
|
||||
suspend_resume_cb_data = data;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_pmtmr_register_suspend_resume_callback);
|
||||
|
||||
void acpi_pmtmr_unregister_suspend_resume_callback(void)
|
||||
{
|
||||
suspend_resume_callback = NULL;
|
||||
suspend_resume_cb_data = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_pmtmr_unregister_suspend_resume_callback);
|
||||
|
||||
static void acpi_pm_suspend(struct clocksource *cs)
|
||||
{
|
||||
if (suspend_resume_callback)
|
||||
suspend_resume_callback(suspend_resume_cb_data, true);
|
||||
}
|
||||
|
||||
static void acpi_pm_resume(struct clocksource *cs)
|
||||
{
|
||||
if (suspend_resume_callback)
|
||||
suspend_resume_callback(suspend_resume_cb_data, false);
|
||||
}
|
||||
|
||||
static u64 acpi_pm_read(struct clocksource *cs)
|
||||
{
|
||||
return (u64)read_pmtmr();
|
||||
@@ -69,6 +99,8 @@ static struct clocksource clocksource_acpi_pm = {
|
||||
.read = acpi_pm_read,
|
||||
.mask = (u64)ACPI_PM_MASK,
|
||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
.suspend = acpi_pm_suspend,
|
||||
.resume = acpi_pm_resume,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1594,7 +1594,6 @@ static int __init arch_timer_mem_of_init(struct device_node *np)
|
||||
{
|
||||
struct arch_timer_mem *timer_mem;
|
||||
struct arch_timer_mem_frame *frame;
|
||||
struct device_node *frame_node;
|
||||
struct resource res;
|
||||
int ret = -EINVAL;
|
||||
u32 rate;
|
||||
@@ -1608,33 +1607,29 @@ static int __init arch_timer_mem_of_init(struct device_node *np)
|
||||
timer_mem->cntctlbase = res.start;
|
||||
timer_mem->size = resource_size(&res);
|
||||
|
||||
for_each_available_child_of_node(np, frame_node) {
|
||||
for_each_available_child_of_node_scoped(np, frame_node) {
|
||||
u32 n;
|
||||
struct arch_timer_mem_frame *frame;
|
||||
|
||||
if (of_property_read_u32(frame_node, "frame-number", &n)) {
|
||||
pr_err(FW_BUG "Missing frame-number.\n");
|
||||
of_node_put(frame_node);
|
||||
goto out;
|
||||
}
|
||||
if (n >= ARCH_TIMER_MEM_MAX_FRAMES) {
|
||||
pr_err(FW_BUG "Wrong frame-number, only 0-%u are permitted.\n",
|
||||
ARCH_TIMER_MEM_MAX_FRAMES - 1);
|
||||
of_node_put(frame_node);
|
||||
goto out;
|
||||
}
|
||||
frame = &timer_mem->frame[n];
|
||||
|
||||
if (frame->valid) {
|
||||
pr_err(FW_BUG "Duplicated frame-number.\n");
|
||||
of_node_put(frame_node);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (of_address_to_resource(frame_node, 0, &res)) {
|
||||
of_node_put(frame_node);
|
||||
if (of_address_to_resource(frame_node, 0, &res))
|
||||
goto out;
|
||||
}
|
||||
|
||||
frame->cntbase = res.start;
|
||||
frame->size = resource_size(&res);
|
||||
|
||||
|
||||
@@ -210,6 +210,7 @@ static int __init asm9260_timer_init(struct device_node *np)
|
||||
DRIVER_NAME, &event_dev);
|
||||
if (ret) {
|
||||
pr_err("Failed to setup irq!\n");
|
||||
clk_disable_unprepare(clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,14 +93,10 @@ static int __init ingenic_ost_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(map);
|
||||
}
|
||||
|
||||
ost->clk = devm_clk_get(dev, "ost");
|
||||
ost->clk = devm_clk_get_enabled(dev, "ost");
|
||||
if (IS_ERR(ost->clk))
|
||||
return PTR_ERR(ost->clk);
|
||||
|
||||
err = clk_prepare_enable(ost->clk);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Clear counter high/low registers */
|
||||
if (soc_info->is64bit)
|
||||
regmap_write(map, TCU_REG_OST_CNTL, 0);
|
||||
@@ -129,7 +125,6 @@ static int __init ingenic_ost_probe(struct platform_device *pdev)
|
||||
err = clocksource_register_hz(cs, rate);
|
||||
if (err) {
|
||||
dev_err(dev, "clocksource registration failed");
|
||||
clk_disable_unprepare(ost->clk);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ static int jcore_pit_local_init(unsigned cpu)
|
||||
|
||||
static irqreturn_t jcore_timer_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct jcore_pit *pit = this_cpu_ptr(dev_id);
|
||||
struct jcore_pit *pit = dev_id;
|
||||
|
||||
if (clockevent_state_oneshot(&pit->ced))
|
||||
jcore_pit_disable(pit);
|
||||
@@ -168,9 +168,8 @@ static int __init jcore_pit_init(struct device_node *node)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
err = request_irq(pit_irq, jcore_timer_interrupt,
|
||||
IRQF_TIMER | IRQF_PERCPU,
|
||||
"jcore_pit", jcore_pit_percpu);
|
||||
err = request_percpu_irq(pit_irq, jcore_timer_interrupt,
|
||||
"jcore_pit", jcore_pit_percpu);
|
||||
if (err) {
|
||||
pr_err("pit irq request failed: %d\n", err);
|
||||
free_percpu(jcore_pit_percpu);
|
||||
|
||||
@@ -435,7 +435,7 @@ static int __init ttc_setup_clockevent(struct clk *clk,
|
||||
&ttcce->ttc.clk_rate_change_nb);
|
||||
if (err) {
|
||||
pr_warn("Unable to register clock notifier.\n");
|
||||
goto out_kfree;
|
||||
goto out_clk_unprepare;
|
||||
}
|
||||
|
||||
ttcce->ttc.freq = clk_get_rate(ttcce->ttc.clk);
|
||||
@@ -465,13 +465,15 @@ static int __init ttc_setup_clockevent(struct clk *clk,
|
||||
err = request_irq(irq, ttc_clock_event_interrupt,
|
||||
IRQF_TIMER, ttcce->ce.name, ttcce);
|
||||
if (err)
|
||||
goto out_kfree;
|
||||
goto out_clk_unprepare;
|
||||
|
||||
clockevents_config_and_register(&ttcce->ce,
|
||||
ttcce->ttc.freq / PRESCALE, 1, 0xfffe);
|
||||
|
||||
return 0;
|
||||
|
||||
out_clk_unprepare:
|
||||
clk_disable_unprepare(ttcce->ttc.clk);
|
||||
out_kfree:
|
||||
kfree(ttcce);
|
||||
return err;
|
||||
|
||||
@@ -233,6 +233,7 @@ static int __init msm_dt_timer_init(struct device_node *np)
|
||||
}
|
||||
|
||||
if (of_property_read_u32(np, "clock-frequency", &freq)) {
|
||||
iounmap(cpu0_base);
|
||||
pr_err("Unknown frequency\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -243,7 +244,11 @@ static int __init msm_dt_timer_init(struct device_node *np)
|
||||
freq /= 4;
|
||||
writel_relaxed(DGT_CLK_CTL_DIV_4, source_base + DGT_CLK_CTL);
|
||||
|
||||
return msm_timer_init(freq, 32, irq, !!percpu_offset);
|
||||
ret = msm_timer_init(freq, 32, irq, !!percpu_offset);
|
||||
if (ret)
|
||||
iounmap(cpu0_base);
|
||||
|
||||
return ret;
|
||||
}
|
||||
TIMER_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
|
||||
TIMER_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
|
||||
|
||||
Reference in New Issue
Block a user