diff options
| author | Viresh Kumar <viresh.kumar@st.com> | 2012-03-21 11:12:51 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-04-22 16:41:33 -0400 |
| commit | f08472f298627f110fb596d7a94e2621dba1953d (patch) | |
| tree | cc9cbc917ddb601e357fb746f42dad2ad2fcedf3 /arch/arm/mach-spear3xx | |
| parent | 5b4f95e570dd76a4606c4bbd0dec652db8a32fd0 (diff) | |
SPEAr: Use CLKDEV_INIT for defining clk_lookups
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Diffstat (limited to 'arch/arm/mach-spear3xx')
| -rw-r--r-- | arch/arm/mach-spear3xx/clock.c | 111 |
1 files changed, 56 insertions, 55 deletions
diff --git a/arch/arm/mach-spear3xx/clock.c b/arch/arm/mach-spear3xx/clock.c index 6c4841f55223..6b2cd9ba4fd9 100644 --- a/arch/arm/mach-spear3xx/clock.c +++ b/arch/arm/mach-spear3xx/clock.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | * warranty of any kind, whether express or implied. | 11 | * warranty of any kind, whether express or implied. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #include <linux/clkdev.h> | ||
| 14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 15 | #include <linux/io.h> | 16 | #include <linux/io.h> |
| 16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
| @@ -652,85 +653,85 @@ static struct clk pwm_clk = { | |||
| 652 | 653 | ||
| 653 | /* array of all spear 3xx clock lookups */ | 654 | /* array of all spear 3xx clock lookups */ |
| 654 | static struct clk_lookup spear_clk_lookups[] = { | 655 | static struct clk_lookup spear_clk_lookups[] = { |
| 655 | { .con_id = "apb_pclk", .clk = &dummy_apb_pclk}, | 656 | CLKDEV_INIT(NULL, "apb_pclk", &dummy_apb_pclk), |
| 656 | /* root clks */ | 657 | /* root clks */ |
| 657 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, | 658 | CLKDEV_INIT(NULL, "osc_32k_clk", &osc_32k_clk), |
| 658 | { .con_id = "osc_24m_clk", .clk = &osc_24m_clk}, | 659 | CLKDEV_INIT(NULL, "osc_24m_clk", &osc_24m_clk), |
| 659 | /* clock derived from 32 KHz osc clk */ | 660 | /* clock derived from 32 KHz osc clk */ |
| 660 | { .dev_id = "rtc-spear", .clk = &rtc_clk}, | 661 | CLKDEV_INIT("rtc-spear", NULL, &rtc_clk), |
| 661 | /* clock derived from 24 MHz osc clk */ | 662 | /* clock derived from 24 MHz osc clk */ |
| 662 | { .con_id = "pll1_clk", .clk = &pll1_clk}, | 663 | CLKDEV_INIT(NULL, "pll1_clk", &pll1_clk), |
| 663 | { .con_id = "pll3_48m_clk", .clk = &pll3_48m_clk}, | 664 | CLKDEV_INIT(NULL, "pll3_48m_clk", &pll3_48m_clk), |
| 664 | { .dev_id = "wdt", .clk = &wdt_clk}, | 665 | CLKDEV_INIT("wdt", NULL, &wdt_clk), |
| 665 | /* clock derived from pll1 clk */ | 666 | /* clock derived from pll1 clk */ |
| 666 | { .con_id = "cpu_clk", .clk = &cpu_clk}, | 667 | CLKDEV_INIT(NULL, "cpu_clk", &cpu_clk), |
| 667 | { .con_id = "ahb_clk", .clk = &ahb_clk}, | 668 | CLKDEV_INIT(NULL, "ahb_clk", &ahb_clk), |
| 668 | { .con_id = "uart_synth_clk", .clk = &uart_synth_clk}, | 669 | CLKDEV_INIT(NULL, "uart_synth_clk", &uart_synth_clk), |
| 669 | { .con_id = "firda_synth_clk", .clk = &firda_synth_clk}, | 670 | CLKDEV_INIT(NULL, "firda_synth_clk", &firda_synth_clk), |
| 670 | { .con_id = "gpt0_synth_clk", .clk = &gpt0_synth_clk}, | 671 | CLKDEV_INIT(NULL, "gpt0_synth_clk", &gpt0_synth_clk), |
| 671 | { .con_id = "gpt1_synth_clk", .clk = &gpt1_synth_clk}, | 672 | CLKDEV_INIT(NULL, "gpt1_synth_clk", &gpt1_synth_clk), |
| 672 | { .con_id = "gpt2_synth_clk", .clk = &gpt2_synth_clk}, | 673 | CLKDEV_INIT(NULL, "gpt2_synth_clk", &gpt2_synth_clk), |
| 673 | { .dev_id = "uart", .clk = &uart_clk}, | 674 | CLKDEV_INIT("uart", NULL, &uart_clk), |
| 674 | { .dev_id = "firda", .clk = &firda_clk}, | 675 | CLKDEV_INIT("firda", NULL, &firda_clk), |
| 675 | { .dev_id = "gpt0", .clk = &gpt0_clk}, | 676 | CLKDEV_INIT("gpt0", NULL, &gpt0_clk), |
| 676 | { .dev_id = "gpt1", .clk = &gpt1_clk}, | 677 | CLKDEV_INIT("gpt1", NULL, &gpt1_clk), |
| 677 | { .dev_id = "gpt2", .clk = &gpt2_clk}, | 678 | CLKDEV_INIT("gpt2", NULL, &gpt2_clk), |
| 678 | /* clock derived from pll3 clk */ | 679 | /* clock derived from pll3 clk */ |
| 679 | { .dev_id = "designware_udc", .clk = &usbd_clk}, | 680 | CLKDEV_INIT("designware_udc", NULL, &usbd_clk), |
| 680 | { .con_id = "usbh_clk", .clk = &usbh_clk}, | 681 | CLKDEV_INIT(NULL, "usbh_clk", &usbh_clk), |
| 681 | /* clock derived from ahb clk */ | 682 | /* clock derived from ahb clk */ |
| 682 | { .con_id = "apb_clk", .clk = &apb_clk}, | 683 | CLKDEV_INIT(NULL, "apb_clk", &apb_clk), |
| 683 | { .dev_id = "i2c_designware.0", .clk = &i2c_clk}, | 684 | CLKDEV_INIT("i2c_designware.0", NULL, &i2c_clk), |
| 684 | { .dev_id = "dma", .clk = &dma_clk}, | 685 | CLKDEV_INIT("dma", NULL, &dma_clk), |
| 685 | { .dev_id = "jpeg", .clk = &jpeg_clk}, | 686 | CLKDEV_INIT("jpeg", NULL, &jpeg_clk), |
| 686 | { .dev_id = "gmac", .clk = &gmac_clk}, | 687 | CLKDEV_INIT("gmac", NULL, &gmac_clk), |
| 687 | { .dev_id = "smi", .clk = &smi_clk}, | 688 | CLKDEV_INIT("smi", NULL, &smi_clk), |
| 688 | { .dev_id = "c3", .clk = &c3_clk}, | 689 | CLKDEV_INIT("c3", NULL, &c3_clk), |
| 689 | /* clock derived from apb clk */ | 690 | /* clock derived from apb clk */ |
| 690 | { .dev_id = "adc", .clk = &adc_clk}, | 691 | CLKDEV_INIT("adc", NULL, &adc_clk), |
| 691 | { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk}, | 692 | CLKDEV_INIT("ssp-pl022.0", NULL, &ssp0_clk), |
| 692 | { .dev_id = "gpio", .clk = &gpio_clk}, | 693 | CLKDEV_INIT("gpio", NULL, &gpio_clk), |
| 693 | }; | 694 | }; |
| 694 | 695 | ||
| 695 | /* array of all spear 300 clock lookups */ | 696 | /* array of all spear 300 clock lookups */ |
| 696 | #ifdef CONFIG_MACH_SPEAR300 | 697 | #ifdef CONFIG_MACH_SPEAR300 |
| 697 | static struct clk_lookup spear300_clk_lookups[] = { | 698 | static struct clk_lookup spear300_clk_lookups[] = { |
| 698 | { .dev_id = "clcd", .clk = &clcd_clk}, | 699 | CLKDEV_INIT("clcd", NULL, &clcd_clk), |
| 699 | { .con_id = "fsmc", .clk = &fsmc_clk}, | 700 | CLKDEV_INIT("fsmc", NULL, &fsmc_clk), |
| 700 | { .dev_id = "gpio1", .clk = &gpio1_clk}, | 701 | CLKDEV_INIT("gpio1", NULL, &gpio1_clk), |
| 701 | { .dev_id = "keyboard", .clk = &kbd_clk}, | 702 | CLKDEV_INIT("keyboard", NULL, &kbd_clk), |
| 702 | { .dev_id = "sdhci", .clk = &sdhci_clk}, | 703 | CLKDEV_INIT("sdhci", NULL, &sdhci_clk), |
| 703 | }; | 704 | }; |
| 704 | #endif | 705 | #endif |
| 705 | 706 | ||
| 706 | /* array of all spear 310 clock lookups */ | 707 | /* array of all spear 310 clock lookups */ |
| 707 | #ifdef CONFIG_MACH_SPEAR310 | 708 | #ifdef CONFIG_MACH_SPEAR310 |
| 708 | static struct clk_lookup spear310_clk_lookups[] = { | 709 | static struct clk_lookup spear310_clk_lookups[] = { |
| 709 | { .con_id = "fsmc", .clk = &fsmc_clk}, | 710 | CLKDEV_INIT("fsmc", NULL, &fsmc_clk), |
| 710 | { .con_id = "emi", .clk = &emi_clk}, | 711 | CLKDEV_INIT(NULL, "emi", &emi_clk), |
| 711 | { .dev_id = "uart1", .clk = &uart1_clk}, | 712 | CLKDEV_INIT("uart1", NULL, &uart1_clk), |
| 712 | { .dev_id = "uart2", .clk = &uart2_clk}, | 713 | CLKDEV_INIT("uart2", NULL, &uart2_clk), |
| 713 | { .dev_id = "uart3", .clk = &uart3_clk}, | 714 | CLKDEV_INIT("uart3", NULL, &uart3_clk), |
| 714 | { .dev_id = "uart4", .clk = &uart4_clk}, | 715 | CLKDEV_INIT("uart4", NULL, &uart4_clk), |
| 715 | { .dev_id = "uart5", .clk = &uart5_clk}, | 716 | CLKDEV_INIT("uart5", NULL, &uart5_clk), |
| 716 | }; | 717 | }; |
| 717 | #endif | 718 | #endif |
| 718 | 719 | ||
| 719 | /* array of all spear 320 clock lookups */ | 720 | /* array of all spear 320 clock lookups */ |
| 720 | #ifdef CONFIG_MACH_SPEAR320 | 721 | #ifdef CONFIG_MACH_SPEAR320 |
| 721 | static struct clk_lookup spear320_clk_lookups[] = { | 722 | static struct clk_lookup spear320_clk_lookups[] = { |
| 722 | { .dev_id = "clcd", .clk = &clcd_clk}, | 723 | CLKDEV_INIT("clcd", NULL, &clcd_clk), |
| 723 | { .con_id = "fsmc", .clk = &fsmc_clk}, | 724 | CLKDEV_INIT("fsmc", NULL, &fsmc_clk), |
| 724 | { .dev_id = "i2c_designware.1", .clk = &i2c1_clk}, | 725 | CLKDEV_INIT("i2c_designware.1", NULL, &i2c1_clk), |
| 725 | { .con_id = "emi", .clk = &emi_clk}, | 726 | CLKDEV_INIT(NULL, "emi", &emi_clk), |
| 726 | { .dev_id = "pwm", .clk = &pwm_clk}, | 727 | CLKDEV_INIT("pwm", NULL, &pwm_clk), |
| 727 | { .dev_id = "sdhci", .clk = &sdhci_clk}, | 728 | CLKDEV_INIT("sdhci", NULL, &sdhci_clk), |
| 728 | { .dev_id = "c_can_platform.0", .clk = &can0_clk}, | 729 | CLKDEV_INIT("c_can_platform.0", NULL, &can0_clk), |
| 729 | { .dev_id = "c_can_platform.1", .clk = &can1_clk}, | 730 | CLKDEV_INIT("c_can_platform.1", NULL, &can1_clk), |
| 730 | { .dev_id = "ssp-pl022.1", .clk = &ssp1_clk}, | 731 | CLKDEV_INIT("ssp-pl022.1", NULL, &ssp1_clk), |
| 731 | { .dev_id = "ssp-pl022.2", .clk = &ssp2_clk}, | 732 | CLKDEV_INIT("ssp-pl022.2", NULL, &ssp2_clk), |
| 732 | { .dev_id = "uart1", .clk = &uart1_clk}, | 733 | CLKDEV_INIT("uart1", NULL, &uart1_clk), |
| 733 | { .dev_id = "uart2", .clk = &uart2_clk}, | 734 | CLKDEV_INIT("uart2", NULL, &uart2_clk), |
| 734 | }; | 735 | }; |
| 735 | #endif | 736 | #endif |
| 736 | 737 | ||
