diff options
Diffstat (limited to 'arch/arm/mach-s3c2416')
-rw-r--r-- | arch/arm/mach-s3c2416/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/clock.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/irq.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/mach-smdk2416.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/pm.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/s3c2416.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/setup-sdhci.c | 24 |
7 files changed, 60 insertions, 73 deletions
diff --git a/arch/arm/mach-s3c2416/Makefile b/arch/arm/mach-s3c2416/Makefile index 7b805b279caf..ca0cd227f873 100644 --- a/arch/arm/mach-s3c2416/Makefile +++ b/arch/arm/mach-s3c2416/Makefile @@ -15,7 +15,6 @@ obj-$(CONFIG_S3C2416_PM) += pm.o #obj-$(CONFIG_S3C2416_DMA) += dma.o # Device setup -obj-$(CONFIG_S3C2416_SETUP_SDHCI) += setup-sdhci.o obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o # Machine support diff --git a/arch/arm/mach-s3c2416/clock.c b/arch/arm/mach-s3c2416/clock.c index afbbe8bc21d1..59f54d1d7f8b 100644 --- a/arch/arm/mach-s3c2416/clock.c +++ b/arch/arm/mach-s3c2416/clock.c @@ -90,39 +90,38 @@ static struct clksrc_clk hsmmc_div[] = { }, }; -static struct clksrc_clk hsmmc_mux[] = { - [0] = { - .clk = { - .name = "hsmmc-if", - .devname = "s3c-sdhci.0", - .ctrlbit = (1 << 6), - .enable = s3c2443_clkcon_enable_s, - }, - .sources = &(struct clksrc_sources) { - .nr_sources = 2, - .sources = (struct clk *[]) { - [0] = &hsmmc_div[0].clk, - [1] = NULL, /* to fix */ - }, - }, - .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 16 }, +static struct clksrc_clk hsmmc_mux0 = { + .clk = { + .name = "hsmmc-if", + .devname = "s3c-sdhci.0", + .ctrlbit = (1 << 6), + .enable = s3c2443_clkcon_enable_s, }, - [1] = { - .clk = { - .name = "hsmmc-if", - .devname = "s3c-sdhci.1", - .ctrlbit = (1 << 12), - .enable = s3c2443_clkcon_enable_s, + .sources = &(struct clksrc_sources) { + .nr_sources = 2, + .sources = (struct clk * []) { + [0] = &hsmmc_div[0].clk, + [1] = NULL, /* to fix */ }, - .sources = &(struct clksrc_sources) { - .nr_sources = 2, - .sources = (struct clk *[]) { - [0] = &hsmmc_div[1].clk, - [1] = NULL, /* to fix */ - }, + }, + .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 16 }, +}; + +static struct clksrc_clk hsmmc_mux1 = { + .clk = { + .name = "hsmmc-if", + .devname = "s3c-sdhci.1", + .ctrlbit = (1 << 12), + .enable = s3c2443_clkcon_enable_s, + }, + .sources = &(struct clksrc_sources) { + .nr_sources = 2, + .sources = (struct clk * []) { + [0] = &hsmmc_div[1].clk, + [1] = NULL, /* to fix */ }, - .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 17 }, }, + .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 17 }, }; static struct clk hsmmc0_clk = { @@ -144,8 +143,14 @@ static struct clksrc_clk *clksrcs[] __initdata = { &hsspi_mux, &hsmmc_div[0], &hsmmc_div[1], - &hsmmc_mux[0], - &hsmmc_mux[1], + &hsmmc_mux0, + &hsmmc_mux1, +}; + +static struct clk_lookup s3c2416_clk_lookup[] = { + CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.0", &hsmmc0_clk), + CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &hsmmc_mux0.clk), + CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &hsmmc_mux1.clk), }; void __init s3c2416_init_clocks(int xtal) @@ -167,6 +172,7 @@ void __init s3c2416_init_clocks(int xtal) s3c_register_clksrc(clksrcs[ptr], 1); s3c24xx_register_clock(&hsmmc0_clk); + clkdev_add_table(s3c2416_clk_lookup, ARRAY_SIZE(s3c2416_clk_lookup)); s3c_pwmclk_init(); diff --git a/arch/arm/mach-s3c2416/irq.c b/arch/arm/mach-s3c2416/irq.c index 28ad20d42445..36df761061de 100644 --- a/arch/arm/mach-s3c2416/irq.c +++ b/arch/arm/mach-s3c2416/irq.c @@ -25,7 +25,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/ioport.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/io.h> #include <mach/hardware.h> @@ -213,7 +213,7 @@ static int __init s3c2416_add_sub(unsigned int base, return 0; } -static int __init s3c2416_irq_add(struct sys_device *sysdev) +static int __init s3c2416_irq_add(struct device *dev) { printk(KERN_INFO "S3C2416: IRQ Support\n"); @@ -234,13 +234,15 @@ static int __init s3c2416_irq_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2416_irq_driver = { - .add = s3c2416_irq_add, +static struct subsys_interface s3c2416_irq_interface = { + .name = "s3c2416_irq", + .subsys = &s3c2416_subsys, + .add_dev = s3c2416_irq_add, }; static int __init s3c2416_irq_init(void) { - return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_irq_driver); + return subsys_interface_register(&s3c2416_irq_interface); } arch_initcall(s3c2416_irq_init); diff --git a/arch/arm/mach-s3c2416/mach-smdk2416.c b/arch/arm/mach-s3c2416/mach-smdk2416.c index 66b71736609c..eebe1e72b93e 100644 --- a/arch/arm/mach-s3c2416/mach-smdk2416.c +++ b/arch/arm/mach-s3c2416/mach-smdk2416.c @@ -50,6 +50,7 @@ #include <plat/nand.h> #include <plat/sdhci.h> #include <plat/udc.h> +#include <linux/platform_data/s3c-hsudc.h> #include <plat/regs-fb-v4.h> #include <plat/fb.h> diff --git a/arch/arm/mach-s3c2416/pm.c b/arch/arm/mach-s3c2416/pm.c index 9ec54f1d8e75..3bdb15a0d419 100644 --- a/arch/arm/mach-s3c2416/pm.c +++ b/arch/arm/mach-s3c2416/pm.c @@ -10,7 +10,7 @@ * published by the Free Software Foundation. */ -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/io.h> @@ -48,7 +48,7 @@ static void s3c2416_pm_prepare(void) __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1); } -static int s3c2416_pm_add(struct sys_device *sysdev) +static int s3c2416_pm_add(struct device *dev) { pm_cpu_prep = s3c2416_pm_prepare; pm_cpu_sleep = s3c2416_cpu_suspend; @@ -56,13 +56,15 @@ static int s3c2416_pm_add(struct sys_device *sysdev) return 0; } -static struct sysdev_driver s3c2416_pm_driver = { - .add = s3c2416_pm_add, +static struct subsys_interface s3c2416_pm_interface = { + .name = "s3c2416_pm", + .subsys = &s3c2416_subsys, + .add_dev = s3c2416_pm_add, }; static __init int s3c2416_pm_init(void) { - return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_pm_driver); + return subsys_interface_register(&s3c2416_pm_interface); } arch_initcall(s3c2416_pm_init); diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index 46062232bbc7..5287d2808d3e 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c @@ -31,7 +31,7 @@ #include <linux/gpio.h> #include <linux/platform_device.h> #include <linux/serial_core.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/syscore_ops.h> #include <linux/clk.h> #include <linux/io.h> @@ -67,12 +67,13 @@ static struct map_desc s3c2416_iodesc[] __initdata = { IODESC_ENT(TIMER), }; -struct sysdev_class s3c2416_sysclass = { +struct bus_type s3c2416_subsys = { .name = "s3c2416-core", + .dev_name = "s3c2416-core", }; -static struct sys_device s3c2416_sysdev = { - .cls = &s3c2416_sysclass, +static struct device s3c2416_dev = { + .bus = &s3c2416_subsys, }; void s3c2416_restart(char mode, const char *cmd) @@ -106,7 +107,7 @@ int __init s3c2416_init(void) #endif register_syscore_ops(&s3c24xx_irq_syscore_ops); - return sysdev_register(&s3c2416_sysdev); + return device_register(&s3c2416_dev); } void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) @@ -134,7 +135,7 @@ void __init s3c2416_map_io(void) iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); } -/* need to register class before we actually register the device, and +/* need to register the subsystem before we actually register the device, and * we also need to ensure that it has been initialised before any of the * drivers even try to use it (even if not on an s3c2416 based system) * as a driver which may support both 2443 and 2440 may try and use it. @@ -142,7 +143,7 @@ void __init s3c2416_map_io(void) static int __init s3c2416_core_init(void) { - return sysdev_class_register(&s3c2416_sysclass); + return subsys_system_register(&s3c2416_subsys, NULL); } core_initcall(s3c2416_core_init); diff --git a/arch/arm/mach-s3c2416/setup-sdhci.c b/arch/arm/mach-s3c2416/setup-sdhci.c deleted file mode 100644 index cee53955eb02..000000000000 --- a/arch/arm/mach-s3c2416/setup-sdhci.c +++ /dev/null @@ -1,24 +0,0 @@ -/* linux/arch/arm/mach-s3c2416/setup-sdhci.c - * - * Copyright 2010 Promwad Innovation Company - * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com> - * - * S3C2416 - Helper functions for settign up SDHCI device(s) (HSMMC) - * - * Based on mach-s3c64xx/setup-sdhci.c - * - * 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/types.h> - -/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ - -char *s3c2416_hsmmc_clksrcs[4] = { - [0] = "hsmmc", - [1] = "hsmmc", - [2] = "hsmmc-if", - /* [3] = "48m", - note not successfully used yet */ -}; |