https://github.com/torvalds/linux
Revision ebe80544338a393e94b65995120c3028c80abc62 authored by Linus Torvalds on 17 April 2013, 23:12:43 UTC, committed by Linus Torvalds on 17 April 2013, 23:12:43 UTC
Pull idle patches from Len Brown:
 "A pair of small patches for 3.9-rc7.

  This CPU-id should have been included in the ones that we updated
  earlier in 3.9.  This pair of patches will allow this flavor of
  Haswell to behave like the other flavors."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  tools/power turbostat: additional Haswell CPU-id
  intel_idle: additional Haswell CPU-id
2 parent s 1ce6ec9 + 149c231
Raw File
Tip revision: ebe80544338a393e94b65995120c3028c80abc62 authored by Linus Torvalds on 17 April 2013, 23:12:43 UTC
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Tip revision: ebe8054
pdc.c
/*
 * Copyright (C) 2006 Atmel Corporation
 *
 * 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.
 */

#include <linux/clk.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/platform_device.h>

static int __init pdc_probe(struct platform_device *pdev)
{
	struct clk *pclk, *hclk;

	pclk = clk_get(&pdev->dev, "pclk");
	if (IS_ERR(pclk)) {
		dev_err(&pdev->dev, "no pclk defined\n");
		return PTR_ERR(pclk);
	}
	hclk = clk_get(&pdev->dev, "hclk");
	if (IS_ERR(hclk)) {
		dev_err(&pdev->dev, "no hclk defined\n");
		clk_put(pclk);
		return PTR_ERR(hclk);
	}

	clk_enable(pclk);
	clk_enable(hclk);

	dev_info(&pdev->dev, "Atmel Peripheral DMA Controller enabled\n");
	return 0;
}

static struct platform_driver pdc_driver = {
	.driver		= {
		.name	= "pdc",
	},
};

static int __init pdc_init(void)
{
	return platform_driver_probe(&pdc_driver, pdc_probe);
}
arch_initcall(pdc_init);
back to top