cregit-Linux how code gets into the kernel

Release 4.14 arch/mips/pic32/pic32mzda/time.c

/*
 * Joshua Henderson <joshua.henderson@microchip.com>
 * Copyright (C) 2015 Microchip Technology Inc.  All rights reserved.
 *
 *  This program is free software; you can distribute it and/or modify it
 *  under the terms of the GNU General Public License (Version 2) as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 *  for more details.
 */
#include <linux/clk-provider.h>
#include <linux/clocksource.h>
#include <linux/init.h>
#include <linux/irqdomain.h>
#include <linux/of.h>
#include <linux/of_irq.h>

#include <asm/time.h>

#include "pic32mzda.h"


static const struct of_device_id pic32_infra_match[] = {
	{ .compatible = "microchip,pic32mzda-infra", },
	{ },
};


#define DEFAULT_CORE_TIMER_INTERRUPT 0


static unsigned int pic32_xlate_core_timer_irq(void) { static struct device_node *node; unsigned int irq; node = of_find_matching_node(NULL, pic32_infra_match); if (WARN_ON(!node)) goto default_map; irq = irq_of_parse_and_map(node, 0); if (!irq) goto default_map; return irq; default_map: return irq_create_mapping(NULL, DEFAULT_CORE_TIMER_INTERRUPT); }

Contributors

PersonTokensPropCommitsCommitProp
Joshua Henderson69100.00%1100.00%
Total69100.00%1100.00%


unsigned int get_c0_compare_int(void) { return pic32_xlate_core_timer_irq(); }

Contributors

PersonTokensPropCommitsCommitProp
Joshua Henderson12100.00%1100.00%
Total12100.00%1100.00%


void __init plat_time_init(void) { unsigned long rate = pic32_get_pbclk(7); of_clk_init(NULL); pr_info("CPU Clock: %ldMHz\n", rate / 1000000); mips_hpt_frequency = rate / 2; timer_probe(); }

Contributors

PersonTokensPropCommitsCommitProp
Joshua Henderson2972.50%133.33%
Purna Chandra Mandal1025.00%133.33%
Daniel Lezcano12.50%133.33%
Total40100.00%3100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Joshua Henderson15491.67%133.33%
Purna Chandra Mandal137.74%133.33%
Daniel Lezcano10.60%133.33%
Total168100.00%3100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.