From d7ff2a4a28ceadc03df2f5a20897165fda306382 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Tue, 4 Mar 2008 15:16:57 +0100 Subject: avr32: Rename at32ap.c -> pdc.c The only thing left in at32ap.c is some PDC stuff. Rename the file to reflect what it actually does. Signed-off-by: Haavard Skinnemoen --- arch/avr32/mach-at32ap/Makefile | 2 +- arch/avr32/mach-at32ap/at32ap.c | 48 ----------------------------------------- arch/avr32/mach-at32ap/pdc.c | 48 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 49 deletions(-) delete mode 100644 arch/avr32/mach-at32ap/at32ap.c create mode 100644 arch/avr32/mach-at32ap/pdc.c (limited to 'arch/avr32') diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile index e89009439e4a..cb44182d3868 100644 --- a/arch/avr32/mach-at32ap/Makefile +++ b/arch/avr32/mach-at32ap/Makefile @@ -1,3 +1,3 @@ -obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o +obj-y += pdc.o clock.o intc.o extint.o pio.o hsmc.o obj-$(CONFIG_CPU_AT32AP700X) += at32ap700x.o pm-at32ap700x.o obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o diff --git a/arch/avr32/mach-at32ap/at32ap.c b/arch/avr32/mach-at32ap/at32ap.c deleted file mode 100644 index 1040bda4fda7..000000000000 --- a/arch/avr32/mach-at32ap/at32ap.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 -#include -#include -#include - -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 = { - .probe = pdc_probe, - .driver = { - .name = "pdc", - }, -}; - -static int __init pdc_init(void) -{ - return platform_driver_register(&pdc_driver); -} -arch_initcall(pdc_init); 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 @@ +/* + * 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 +#include +#include +#include + +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 = { + .probe = pdc_probe, + .driver = { + .name = "pdc", + }, +}; + +static int __init pdc_init(void) +{ + return platform_driver_register(&pdc_driver); +} +arch_initcall(pdc_init); -- cgit v1.2.3-59-g8ed1b