cregit-Linux how code gets into the kernel

Release 4.14 arch/mips/ralink/clk.c

Directory: arch/mips/ralink
/*
 *  This program is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License version 2 as published
 *  by the Free Software Foundation.
 *
 *  Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
 *  Copyright (C) 2013 John Crispin <john@phrozen.org>
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/clkdev.h>
#include <linux/clk.h>

#include <asm/time.h>

#include "common.h"


struct clk {
	
struct clk_lookup cl;
	
unsigned long rate;
};


void ralink_clk_add(const char *dev, unsigned long rate) { struct clk *clk = kzalloc(sizeof(struct clk), GFP_KERNEL); if (!clk) panic("failed to add clock"); clk->cl.dev_id = dev; clk->cl.clk = clk; clk->rate = rate; clkdev_add(&clk->cl); }

Contributors

PersonTokensPropCommitsCommitProp
John Crispin6998.57%150.00%
Ralf Bächle11.43%150.00%
Total70100.00%2100.00%

/* * Linux clock API */
int clk_enable(struct clk *clk) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
John Crispin13100.00%1100.00%
Total13100.00%1100.00%

EXPORT_SYMBOL_GPL(clk_enable);
void clk_disable(struct clk *clk) { }

Contributors

PersonTokensPropCommitsCommitProp
John Crispin9100.00%1100.00%
Total9100.00%1100.00%

EXPORT_SYMBOL_GPL(clk_disable);
unsigned long clk_get_rate(struct clk *clk) { if (!clk) return 0; return clk->rate; }

Contributors

PersonTokensPropCommitsCommitProp
John Crispin1666.67%150.00%
Jonas Gorski833.33%150.00%
Total24100.00%2100.00%

EXPORT_SYMBOL_GPL(clk_get_rate);
int clk_set_rate(struct clk *clk, unsigned long rate) { return -1; }

Contributors

PersonTokensPropCommitsCommitProp
John Crispin18100.00%1100.00%
Total18100.00%1100.00%

EXPORT_SYMBOL_GPL(clk_set_rate);
long clk_round_rate(struct clk *clk, unsigned long rate) { return -1; }

Contributors

PersonTokensPropCommitsCommitProp
John Crispin18100.00%1100.00%
Total18100.00%1100.00%

EXPORT_SYMBOL_GPL(clk_round_rate);
void __init plat_time_init(void) { struct clk *clk; ralink_of_remap(); ralink_clk_init(); clk = clk_get_sys("cpu", NULL); if (IS_ERR(clk)) panic("unable to get CPU clock, err=%ld", PTR_ERR(clk)); pr_info("CPU Clock: %ldMHz\n", clk_get_rate(clk) / 1000000); mips_hpt_frequency = clk_get_rate(clk) / 2; clk_put(clk); timer_probe(); }

Contributors

PersonTokensPropCommitsCommitProp
John Crispin7398.65%266.67%
Daniel Lezcano11.35%133.33%
Total74100.00%3100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
John Crispin27395.12%555.56%
Jonas Gorski82.79%111.11%
Paul Gortmaker41.39%111.11%
Daniel Lezcano10.35%111.11%
Ralf Bächle10.35%111.11%
Total287100.00%9100.00%
Directory: arch/mips/ralink
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.