diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-15 18:29:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-15 18:29:07 -0400 |
commit | 82638844d9a8581bbf33201cc209a14876eca167 (patch) | |
tree | 961d7f9360194421a71aa644a9d0c176a960ce49 /arch/avr32/mach-at32ap/pdc.c | |
parent | 9982fbface82893e77d211fbabfbd229da6bdde6 (diff) | |
parent | 63cf13b77ab785e87c867defa8545e6d4a989774 (diff) |
Merge branch 'linus' into cpus4096
Conflicts:
arch/x86/xen/smp.c
kernel/sched_rt.c
net/iucv/iucv.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/avr32/mach-at32ap/pdc.c')
-rw-r--r-- | arch/avr32/mach-at32ap/pdc.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/pdc.c b/arch/avr32/mach-at32ap/pdc.c new file mode 100644 index 000000000000..1040bda4fda7 --- /dev/null +++ b/arch/avr32/mach-at32ap/pdc.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <linux/clk.h> | ||
10 | #include <linux/err.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/platform_device.h> | ||
13 | |||
14 | static int __init pdc_probe(struct platform_device *pdev) | ||
15 | { | ||
16 | struct clk *pclk, *hclk; | ||
17 | |||
18 | pclk = clk_get(&pdev->dev, "pclk"); | ||
19 | if (IS_ERR(pclk)) { | ||
20 | dev_err(&pdev->dev, "no pclk defined\n"); | ||
21 | return PTR_ERR(pclk); | ||
22 | } | ||
23 | hclk = clk_get(&pdev->dev, "hclk"); | ||
24 | if (IS_ERR(hclk)) { | ||
25 | dev_err(&pdev->dev, "no hclk defined\n"); | ||
26 | clk_put(pclk); | ||
27 | return PTR_ERR(hclk); | ||
28 | } | ||
29 | |||
30 | clk_enable(pclk); | ||
31 | clk_enable(hclk); | ||
32 | |||
33 | dev_info(&pdev->dev, "Atmel Peripheral DMA Controller enabled\n"); | ||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | static struct platform_driver pdc_driver = { | ||
38 | .probe = pdc_probe, | ||
39 | .driver = { | ||
40 | .name = "pdc", | ||
41 | }, | ||
42 | }; | ||
43 | |||
44 | static int __init pdc_init(void) | ||
45 | { | ||
46 | return platform_driver_register(&pdc_driver); | ||
47 | } | ||
48 | arch_initcall(pdc_init); | ||