Commit e83626f2 authored by Thomas Abraham's avatar Thomas Abraham Committed by Kukjin Kim

ARM: S3C24XX: Add clkdev support

Signed-off-by: default avatarThomas Abraham <thomas.ab@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent f86c6660
...@@ -682,6 +682,7 @@ config ARCH_S3C2410 ...@@ -682,6 +682,7 @@ config ARCH_S3C2410
select GENERIC_GPIO select GENERIC_GPIO
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
select HAVE_CLK select HAVE_CLK
select CLKDEV_LOOKUP
select ARCH_USES_GETTIMEOFFSET select ARCH_USES_GETTIMEOFFSET
select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_I2C if I2C
help help
......
...@@ -95,12 +95,10 @@ static int s3c2412_upll_enable(struct clk *clk, int enable) ...@@ -95,12 +95,10 @@ static int s3c2412_upll_enable(struct clk *clk, int enable)
static struct clk clk_erefclk = { static struct clk clk_erefclk = {
.name = "erefclk", .name = "erefclk",
.id = -1,
}; };
static struct clk clk_urefclk = { static struct clk clk_urefclk = {
.name = "urefclk", .name = "urefclk",
.id = -1,
}; };
static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent) static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent)
...@@ -122,7 +120,6 @@ static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent) ...@@ -122,7 +120,6 @@ static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent)
static struct clk clk_usysclk = { static struct clk clk_usysclk = {
.name = "usysclk", .name = "usysclk",
.id = -1,
.parent = &clk_xtal, .parent = &clk_xtal,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.set_parent = s3c2412_setparent_usysclk, .set_parent = s3c2412_setparent_usysclk,
...@@ -132,13 +129,11 @@ static struct clk clk_usysclk = { ...@@ -132,13 +129,11 @@ static struct clk clk_usysclk = {
static struct clk clk_mrefclk = { static struct clk clk_mrefclk = {
.name = "mrefclk", .name = "mrefclk",
.parent = &clk_xtal, .parent = &clk_xtal,
.id = -1,
}; };
static struct clk clk_mdivclk = { static struct clk clk_mdivclk = {
.name = "mdivclk", .name = "mdivclk",
.parent = &clk_xtal, .parent = &clk_xtal,
.id = -1,
}; };
static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent) static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent)
...@@ -200,7 +195,6 @@ static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate) ...@@ -200,7 +195,6 @@ static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate)
static struct clk clk_usbsrc = { static struct clk clk_usbsrc = {
.name = "usbsrc", .name = "usbsrc",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2412_getrate_usbsrc, .get_rate = s3c2412_getrate_usbsrc,
.set_rate = s3c2412_setrate_usbsrc, .set_rate = s3c2412_setrate_usbsrc,
...@@ -228,7 +222,6 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent) ...@@ -228,7 +222,6 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent)
static struct clk clk_msysclk = { static struct clk clk_msysclk = {
.name = "msysclk", .name = "msysclk",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.set_parent = s3c2412_setparent_msysclk, .set_parent = s3c2412_setparent_msysclk,
}, },
...@@ -268,7 +261,6 @@ static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent) ...@@ -268,7 +261,6 @@ static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent)
static struct clk clk_armclk = { static struct clk clk_armclk = {
.name = "armclk", .name = "armclk",
.id = -1,
.parent = &clk_msysclk, .parent = &clk_msysclk,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.set_parent = s3c2412_setparent_armclk, .set_parent = s3c2412_setparent_armclk,
...@@ -344,7 +336,6 @@ static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate) ...@@ -344,7 +336,6 @@ static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate)
static struct clk clk_uart = { static struct clk clk_uart = {
.name = "uartclk", .name = "uartclk",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2412_getrate_uart, .get_rate = s3c2412_getrate_uart,
.set_rate = s3c2412_setrate_uart, .set_rate = s3c2412_setrate_uart,
...@@ -397,7 +388,6 @@ static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate) ...@@ -397,7 +388,6 @@ static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate)
static struct clk clk_i2s = { static struct clk clk_i2s = {
.name = "i2sclk", .name = "i2sclk",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2412_getrate_i2s, .get_rate = s3c2412_getrate_i2s,
.set_rate = s3c2412_setrate_i2s, .set_rate = s3c2412_setrate_i2s,
...@@ -449,7 +439,6 @@ static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate) ...@@ -449,7 +439,6 @@ static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate)
static struct clk clk_cam = { static struct clk clk_cam = {
.name = "camif-upll", /* same as 2440 name */ .name = "camif-upll", /* same as 2440 name */
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2412_getrate_cam, .get_rate = s3c2412_getrate_cam,
.set_rate = s3c2412_setrate_cam, .set_rate = s3c2412_setrate_cam,
...@@ -463,37 +452,31 @@ static struct clk clk_cam = { ...@@ -463,37 +452,31 @@ static struct clk clk_cam = {
static struct clk init_clocks_disable[] = { static struct clk init_clocks_disable[] = {
{ {
.name = "nand", .name = "nand",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_NAND, .ctrlbit = S3C2412_CLKCON_NAND,
}, { }, {
.name = "sdi", .name = "sdi",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_SDI, .ctrlbit = S3C2412_CLKCON_SDI,
}, { }, {
.name = "adc", .name = "adc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_ADC, .ctrlbit = S3C2412_CLKCON_ADC,
}, { }, {
.name = "i2c", .name = "i2c",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_IIC, .ctrlbit = S3C2412_CLKCON_IIC,
}, { }, {
.name = "iis", .name = "iis",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_IIS, .ctrlbit = S3C2412_CLKCON_IIS,
}, { }, {
.name = "spi", .name = "spi",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_SPI, .ctrlbit = S3C2412_CLKCON_SPI,
...@@ -503,96 +486,83 @@ static struct clk init_clocks_disable[] = { ...@@ -503,96 +486,83 @@ static struct clk init_clocks_disable[] = {
static struct clk init_clocks[] = { static struct clk init_clocks[] = {
{ {
.name = "dma", .name = "dma",
.id = 0,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_DMA0, .ctrlbit = S3C2412_CLKCON_DMA0,
}, { }, {
.name = "dma", .name = "dma",
.id = 1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_DMA1, .ctrlbit = S3C2412_CLKCON_DMA1,
}, { }, {
.name = "dma", .name = "dma",
.id = 2,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_DMA2, .ctrlbit = S3C2412_CLKCON_DMA2,
}, { }, {
.name = "dma", .name = "dma",
.id = 3,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_DMA3, .ctrlbit = S3C2412_CLKCON_DMA3,
}, { }, {
.name = "lcd", .name = "lcd",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_LCDC, .ctrlbit = S3C2412_CLKCON_LCDC,
}, { }, {
.name = "gpio", .name = "gpio",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_GPIO, .ctrlbit = S3C2412_CLKCON_GPIO,
}, { }, {
.name = "usb-host", .name = "usb-host",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_USBH, .ctrlbit = S3C2412_CLKCON_USBH,
}, { }, {
.name = "usb-device", .name = "usb-device",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_USBD, .ctrlbit = S3C2412_CLKCON_USBD,
}, { }, {
.name = "timers", .name = "timers",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_PWMT, .ctrlbit = S3C2412_CLKCON_PWMT,
}, { }, {
.name = "uart", .name = "uart",
.id = 0, .devname = "s3c2412-uart.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_UART0, .ctrlbit = S3C2412_CLKCON_UART0,
}, { }, {
.name = "uart", .name = "uart",
.id = 1, .devname = "s3c2412-uart.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_UART1, .ctrlbit = S3C2412_CLKCON_UART1,
}, { }, {
.name = "uart", .name = "uart",
.id = 2, .devname = "s3c2412-uart.2",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_UART2, .ctrlbit = S3C2412_CLKCON_UART2,
}, { }, {
.name = "rtc", .name = "rtc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_RTC, .ctrlbit = S3C2412_CLKCON_RTC,
}, { }, {
.name = "watchdog", .name = "watchdog",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.ctrlbit = 0, .ctrlbit = 0,
}, { }, {
.name = "usb-bus-gadget", .name = "usb-bus-gadget",
.id = -1,
.parent = &clk_usb_bus, .parent = &clk_usb_bus,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_USB_DEV48, .ctrlbit = S3C2412_CLKCON_USB_DEV48,
}, { }, {
.name = "usb-bus-host", .name = "usb-bus-host",
.id = -1,
.parent = &clk_usb_bus, .parent = &clk_usb_bus,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_USB_HOST48, .ctrlbit = S3C2412_CLKCON_USB_HOST48,
......
...@@ -42,7 +42,7 @@ static struct clksrc_clk hsmmc_div[] = { ...@@ -42,7 +42,7 @@ static struct clksrc_clk hsmmc_div[] = {
[0] = { [0] = {
.clk = { .clk = {
.name = "hsmmc-div", .name = "hsmmc-div",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 }, .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 },
...@@ -50,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = { ...@@ -50,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = {
[1] = { [1] = {
.clk = { .clk = {
.name = "hsmmc-div", .name = "hsmmc-div",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
...@@ -60,8 +60,8 @@ static struct clksrc_clk hsmmc_div[] = { ...@@ -60,8 +60,8 @@ static struct clksrc_clk hsmmc_div[] = {
static struct clksrc_clk hsmmc_mux[] = { static struct clksrc_clk hsmmc_mux[] = {
[0] = { [0] = {
.clk = { .clk = {
.id = 0,
.name = "hsmmc-if", .name = "hsmmc-if",
.devname = "s3c-sdhci.0",
.ctrlbit = (1 << 6), .ctrlbit = (1 << 6),
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
}, },
...@@ -76,8 +76,8 @@ static struct clksrc_clk hsmmc_mux[] = { ...@@ -76,8 +76,8 @@ static struct clksrc_clk hsmmc_mux[] = {
}, },
[1] = { [1] = {
.clk = { .clk = {
.id = 1,
.name = "hsmmc-if", .name = "hsmmc-if",
.devname = "s3c-sdhci.1",
.ctrlbit = (1 << 12), .ctrlbit = (1 << 12),
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
}, },
...@@ -94,7 +94,7 @@ static struct clksrc_clk hsmmc_mux[] = { ...@@ -94,7 +94,7 @@ static struct clksrc_clk hsmmc_mux[] = {
static struct clk hsmmc0_clk = { static struct clk hsmmc0_clk = {
.name = "hsmmc", .name = "hsmmc",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2416_HCLKCON_HSMMC0, .ctrlbit = S3C2416_HCLKCON_HSMMC0,
......
...@@ -90,14 +90,12 @@ static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate) ...@@ -90,14 +90,12 @@ static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate)
static struct clk s3c2440_clk_cam = { static struct clk s3c2440_clk_cam = {
.name = "camif", .name = "camif",
.id = -1,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2440_CLKCON_CAMERA, .ctrlbit = S3C2440_CLKCON_CAMERA,
}; };
static struct clk s3c2440_clk_cam_upll = { static struct clk s3c2440_clk_cam_upll = {
.name = "camif-upll", .name = "camif-upll",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.set_rate = s3c2440_camif_upll_setrate, .set_rate = s3c2440_camif_upll_setrate,
.round_rate = s3c2440_camif_upll_round, .round_rate = s3c2440_camif_upll_round,
...@@ -106,7 +104,6 @@ static struct clk s3c2440_clk_cam_upll = { ...@@ -106,7 +104,6 @@ static struct clk s3c2440_clk_cam_upll = {
static struct clk s3c2440_clk_ac97 = { static struct clk s3c2440_clk_ac97 = {
.name = "ac97", .name = "ac97",
.id = -1,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2440_CLKCON_CAMERA, .ctrlbit = S3C2440_CLKCON_CAMERA,
}; };
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
static struct clk clk_i2s_ext = { static struct clk clk_i2s_ext = {
.name = "i2s-ext", .name = "i2s-ext",
.id = -1,
}; };
/* armdiv /* armdiv
...@@ -139,7 +138,6 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate) ...@@ -139,7 +138,6 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate)
static struct clk clk_armdiv = { static struct clk clk_armdiv = {
.name = "armdiv", .name = "armdiv",
.id = -1,
.parent = &clk_msysclk.clk, .parent = &clk_msysclk.clk,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.round_rate = s3c2443_armclk_roundrate, .round_rate = s3c2443_armclk_roundrate,
...@@ -160,7 +158,6 @@ static struct clk *clk_arm_sources[] = { ...@@ -160,7 +158,6 @@ static struct clk *clk_arm_sources[] = {
static struct clksrc_clk clk_arm = { static struct clksrc_clk clk_arm = {
.clk = { .clk = {
.name = "armclk", .name = "armclk",
.id = -1,
}, },
.sources = &(struct clksrc_sources) { .sources = &(struct clksrc_sources) {
.sources = clk_arm_sources, .sources = clk_arm_sources,
...@@ -177,7 +174,6 @@ static struct clksrc_clk clk_arm = { ...@@ -177,7 +174,6 @@ static struct clksrc_clk clk_arm = {
static struct clksrc_clk clk_hsspi = { static struct clksrc_clk clk_hsspi = {
.clk = { .clk = {
.name = "hsspi", .name = "hsspi",
.id = -1,
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
.ctrlbit = S3C2443_SCLKCON_HSSPICLK, .ctrlbit = S3C2443_SCLKCON_HSSPICLK,
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
...@@ -196,7 +192,7 @@ static struct clksrc_clk clk_hsspi = { ...@@ -196,7 +192,7 @@ static struct clksrc_clk clk_hsspi = {
static struct clksrc_clk clk_hsmmc_div = { static struct clksrc_clk clk_hsmmc_div = {
.clk = { .clk = {
.name = "hsmmc-div", .name = "hsmmc-div",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
...@@ -231,7 +227,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable) ...@@ -231,7 +227,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable)
static struct clk clk_hsmmc = { static struct clk clk_hsmmc = {
.name = "hsmmc-if", .name = "hsmmc-if",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_hsmmc_div.clk, .parent = &clk_hsmmc_div.clk,
.enable = s3c2443_enable_hsmmc, .enable = s3c2443_enable_hsmmc,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
...@@ -248,7 +244,6 @@ static struct clk clk_hsmmc = { ...@@ -248,7 +244,6 @@ static struct clk clk_hsmmc = {
static struct clksrc_clk clk_i2s_eplldiv = { static struct clksrc_clk clk_i2s_eplldiv = {
.clk = { .clk = {
.name = "i2s-eplldiv", .name = "i2s-eplldiv",
.id = -1,
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 12, }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 12, },
...@@ -271,7 +266,6 @@ struct clk *clk_i2s_srclist[] = { ...@@ -271,7 +266,6 @@ struct clk *clk_i2s_srclist[] = {
static struct clksrc_clk clk_i2s = { static struct clksrc_clk clk_i2s = {
.clk = { .clk = {
.name = "i2s-if", .name = "i2s-if",
.id = -1,
.ctrlbit = S3C2443_SCLKCON_I2SCLK, .ctrlbit = S3C2443_SCLKCON_I2SCLK,
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
...@@ -288,25 +282,23 @@ static struct clksrc_clk clk_i2s = { ...@@ -288,25 +282,23 @@ static struct clksrc_clk clk_i2s = {
static struct clk init_clocks_off[] = { static struct clk init_clocks_off[] = {
{ {
.name = "sdi", .name = "sdi",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_SDI, .ctrlbit = S3C2443_PCLKCON_SDI,
}, { }, {
.name = "iis", .name = "iis",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_IIS, .ctrlbit = S3C2443_PCLKCON_IIS,
}, { }, {
.name = "spi", .name = "spi",
.id = 0, .devname = "s3c2410-spi.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_SPI0, .ctrlbit = S3C2443_PCLKCON_SPI0,
}, { }, {
.name = "spi", .name = "spi",
.id = 1, .devname = "s3c2410-spi.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_SPI1, .ctrlbit = S3C2443_PCLKCON_SPI1,
......
...@@ -169,7 +169,6 @@ static struct clk_ops dclk_ops = { ...@@ -169,7 +169,6 @@ static struct clk_ops dclk_ops = {
struct clk s3c24xx_dclk0 = { struct clk s3c24xx_dclk0 = {
.name = "dclk0", .name = "dclk0",
.id = -1,
.ctrlbit = S3C2410_DCLKCON_DCLK0EN, .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
.enable = s3c24xx_dclk_enable, .enable = s3c24xx_dclk_enable,
.ops = &dclk_ops, .ops = &dclk_ops,
...@@ -177,7 +176,6 @@ struct clk s3c24xx_dclk0 = { ...@@ -177,7 +176,6 @@ struct clk s3c24xx_dclk0 = {
struct clk s3c24xx_dclk1 = { struct clk s3c24xx_dclk1 = {
.name = "dclk1", .name = "dclk1",
.id = -1,
.ctrlbit = S3C2410_DCLKCON_DCLK1EN, .ctrlbit = S3C2410_DCLKCON_DCLK1EN,
.enable = s3c24xx_dclk_enable, .enable = s3c24xx_dclk_enable,
.ops = &dclk_ops, .ops = &dclk_ops,
...@@ -189,12 +187,10 @@ static struct clk_ops clkout_ops = { ...@@ -189,12 +187,10 @@ static struct clk_ops clkout_ops = {
struct clk s3c24xx_clkout0 = { struct clk s3c24xx_clkout0 = {
.name = "clkout0", .name = "clkout0",
.id = -1,
.ops = &clkout_ops, .ops = &clkout_ops,
}; };
struct clk s3c24xx_clkout1 = { struct clk s3c24xx_clkout1 = {
.name = "clkout1", .name = "clkout1",
.id = -1,
.ops = &clkout_ops, .ops = &clkout_ops,
}; };
...@@ -90,37 +90,31 @@ static int s3c2410_upll_enable(struct clk *clk, int enable) ...@@ -90,37 +90,31 @@ static int s3c2410_upll_enable(struct clk *clk, int enable)
static struct clk init_clocks_off[] = { static struct clk init_clocks_off[] = {
{ {
.name = "nand", .name = "nand",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_NAND, .ctrlbit = S3C2410_CLKCON_NAND,
}, { }, {
.name = "sdi", .name = "sdi",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_SDI, .ctrlbit = S3C2410_CLKCON_SDI,
}, { }, {
.name = "adc", .name = "adc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_ADC, .ctrlbit = S3C2410_CLKCON_ADC,
}, { }, {
.name = "i2c", .name = "i2c",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_IIC, .ctrlbit = S3C2410_CLKCON_IIC,
}, { }, {
.name = "iis", .name = "iis",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_IIS, .ctrlbit = S3C2410_CLKCON_IIS,
}, { }, {
.name = "spi", .name = "spi",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_SPI, .ctrlbit = S3C2410_CLKCON_SPI,
...@@ -130,70 +124,61 @@ static struct clk init_clocks_off[] = { ...@@ -130,70 +124,61 @@ static struct clk init_clocks_off[] = {
static struct clk init_clocks[] = { static struct clk init_clocks[] = {
{ {
.name = "lcd", .name = "lcd",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_LCDC, .ctrlbit = S3C2410_CLKCON_LCDC,
}, { }, {
.name = "gpio", .name = "gpio",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_GPIO, .ctrlbit = S3C2410_CLKCON_GPIO,
}, { }, {
.name = "usb-host", .name = "usb-host",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_USBH, .ctrlbit = S3C2410_CLKCON_USBH,
}, { }, {
.name = "usb-device", .name = "usb-device",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_USBD, .ctrlbit = S3C2410_CLKCON_USBD,
}, { }, {
.name = "timers", .name = "timers",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_PWMT, .ctrlbit = S3C2410_CLKCON_PWMT,
}, { }, {
.name = "uart", .name = "uart",
.id = 0, .devname = "s3c2410-uart.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART0, .ctrlbit = S3C2410_CLKCON_UART0,
}, { }, {
.name = "uart", .name = "uart",
.id = 1, .devname = "s3c2410-uart.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART1, .ctrlbit = S3C2410_CLKCON_UART1,
}, { }, {
.name = "uart", .name = "uart",
.id = 2, .devname = "s3c2410-uart.2",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART2, .ctrlbit = S3C2410_CLKCON_UART2,
}, { }, {
.name = "rtc", .name = "rtc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_RTC, .ctrlbit = S3C2410_CLKCON_RTC,
}, { }, {
.name = "watchdog", .name = "watchdog",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.ctrlbit = 0, .ctrlbit = 0,
}, { }, {
.name = "usb-bus-host", .name = "usb-bus-host",
.id = -1,
.parent = &clk_usb_bus, .parent = &clk_usb_bus,
}, { }, {
.name = "usb-bus-gadget", .name = "usb-bus-gadget",
.id = -1,
.parent = &clk_usb_bus, .parent = &clk_usb_bus,
}, },
}; };
......
...@@ -56,7 +56,6 @@ int s3c2443_clkcon_enable_s(struct clk *clk, int enable) ...@@ -56,7 +56,6 @@ int s3c2443_clkcon_enable_s(struct clk *clk, int enable)
struct clk clk_mpllref = { struct clk clk_mpllref = {
.name = "mpllref", .name = "mpllref",
.parent = &clk_xtal, .parent = &clk_xtal,
.id = -1,
}; };
static struct clk *clk_epllref_sources[] = { static struct clk *clk_epllref_sources[] = {
...@@ -69,7 +68,6 @@ static struct clk *clk_epllref_sources[] = { ...@@ -69,7 +68,6 @@ static struct clk *clk_epllref_sources[] = {
struct clksrc_clk clk_epllref = { struct clksrc_clk clk_epllref = {
.clk = { .clk = {
.name = "epllref", .name = "epllref",
.id = -1,
}, },
.sources = &(struct clksrc_sources) { .sources = &(struct clksrc_sources) {
.sources = clk_epllref_sources, .sources = clk_epllref_sources,
...@@ -92,7 +90,6 @@ struct clksrc_clk clk_esysclk = { ...@@ -92,7 +90,6 @@ struct clksrc_clk clk_esysclk = {
.clk = { .clk = {
.name = "esysclk", .name = "esysclk",
.parent = &clk_epll, .parent = &clk_epll,
.id = -1,
}, },
.sources = &(struct clksrc_sources) { .sources = &(struct clksrc_sources) {
.sources = clk_sysclk_sources, .sources = clk_sysclk_sources,
...@@ -115,7 +112,6 @@ static unsigned long s3c2443_getrate_mdivclk(struct clk *clk) ...@@ -115,7 +112,6 @@ static unsigned long s3c2443_getrate_mdivclk(struct clk *clk)
static struct clk clk_mdivclk = { static struct clk clk_mdivclk = {
.name = "mdivclk", .name = "mdivclk",
.parent = &clk_mpllref, .parent = &clk_mpllref,
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2443_getrate_mdivclk, .get_rate = s3c2443_getrate_mdivclk,
}, },
...@@ -132,7 +128,6 @@ struct clksrc_clk clk_msysclk = { ...@@ -132,7 +128,6 @@ struct clksrc_clk clk_msysclk = {
.clk = { .clk = {
.name = "msysclk", .name = "msysclk",
.parent = &clk_xtal, .parent = &clk_xtal,
.id = -1,
}, },
.sources = &(struct clksrc_sources) { .sources = &(struct clksrc_sources) {
.sources = clk_msysclk_sources, .sources = clk_msysclk_sources,
...@@ -159,7 +154,6 @@ static unsigned long s3c2443_prediv_getrate(struct clk *clk) ...@@ -159,7 +154,6 @@ static unsigned long s3c2443_prediv_getrate(struct clk *clk)
static struct clk clk_prediv = { static struct clk clk_prediv = {
.name = "prediv", .name = "prediv",
.id = -1,
.parent = &clk_msysclk.clk, .parent = &clk_msysclk.clk,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2443_prediv_getrate, .get_rate = s3c2443_prediv_getrate,
...@@ -174,7 +168,6 @@ static struct clk clk_prediv = { ...@@ -174,7 +168,6 @@ static struct clk clk_prediv = {
static struct clksrc_clk clk_usb_bus_host = { static struct clksrc_clk clk_usb_bus_host = {
.clk = { .clk = {
.name = "usb-bus-host-parent", .name = "usb-bus-host-parent",
.id = -1,
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
.ctrlbit = S3C2443_SCLKCON_USBHOST, .ctrlbit = S3C2443_SCLKCON_USBHOST,
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
...@@ -189,7 +182,6 @@ static struct clksrc_clk clksrc_clks[] = { ...@@ -189,7 +182,6 @@ static struct clksrc_clk clksrc_clks[] = {
/* ART baud-rate clock sourced from esysclk via a divisor */ /* ART baud-rate clock sourced from esysclk via a divisor */
.clk = { .clk = {
.name = "uartclk", .name = "uartclk",
.id = -1,
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 },
...@@ -197,7 +189,6 @@ static struct clksrc_clk clksrc_clks[] = { ...@@ -197,7 +189,6 @@ static struct clksrc_clk clksrc_clks[] = {
/* camera interface bus-clock, divided down from esysclk */ /* camera interface bus-clock, divided down from esysclk */
.clk = { .clk = {
.name = "camif-upll", /* same as 2440 name */ .name = "camif-upll", /* same as 2440 name */
.id = -1,
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
.ctrlbit = S3C2443_SCLKCON_CAMCLK, .ctrlbit = S3C2443_SCLKCON_CAMCLK,
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
...@@ -206,7 +197,6 @@ static struct clksrc_clk clksrc_clks[] = { ...@@ -206,7 +197,6 @@ static struct clksrc_clk clksrc_clks[] = {
}, { }, {
.clk = { .clk = {
.name = "display-if", .name = "display-if",
.id = -1,
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
.ctrlbit = S3C2443_SCLKCON_DISPCLK, .ctrlbit = S3C2443_SCLKCON_DISPCLK,
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
...@@ -219,13 +209,11 @@ static struct clksrc_clk clksrc_clks[] = { ...@@ -219,13 +209,11 @@ static struct clksrc_clk clksrc_clks[] = {
static struct clk init_clocks_off[] = { static struct clk init_clocks_off[] = {
{ {
.name = "adc", .name = "adc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_ADC, .ctrlbit = S3C2443_PCLKCON_ADC,
}, { }, {
.name = "i2c", .name = "i2c",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_IIC, .ctrlbit = S3C2443_PCLKCON_IIC,
...@@ -235,136 +223,117 @@ static struct clk init_clocks_off[] = { ...@@ -235,136 +223,117 @@ static struct clk init_clocks_off[] = {
static struct clk init_clocks[] = { static struct clk init_clocks[] = {
{ {
.name = "dma", .name = "dma",
.id = 0,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_DMA0, .ctrlbit = S3C2443_HCLKCON_DMA0,
}, { }, {
.name = "dma", .name = "dma",
.id = 1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_DMA1, .ctrlbit = S3C2443_HCLKCON_DMA1,
}, { }, {
.name = "dma", .name = "dma",
.id = 2,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_DMA2, .ctrlbit = S3C2443_HCLKCON_DMA2,
}, { }, {
.name = "dma", .name = "dma",
.id = 3,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_DMA3, .ctrlbit = S3C2443_HCLKCON_DMA3,
}, { }, {
.name = "dma", .name = "dma",
.id = 4,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_DMA4, .ctrlbit = S3C2443_HCLKCON_DMA4,
}, { }, {
.name = "dma", .name = "dma",
.id = 5,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_DMA5, .ctrlbit = S3C2443_HCLKCON_DMA5,
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_HSMMC, .ctrlbit = S3C2443_HCLKCON_HSMMC,
}, { }, {
.name = "gpio", .name = "gpio",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_GPIO, .ctrlbit = S3C2443_PCLKCON_GPIO,
}, { }, {
.name = "usb-host", .name = "usb-host",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_USBH, .ctrlbit = S3C2443_HCLKCON_USBH,
}, { }, {
.name = "usb-device", .name = "usb-device",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_USBD, .ctrlbit = S3C2443_HCLKCON_USBD,
}, { }, {
.name = "lcd", .name = "lcd",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_LCDC, .ctrlbit = S3C2443_HCLKCON_LCDC,
}, { }, {
.name = "timers", .name = "timers",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_PWMT, .ctrlbit = S3C2443_PCLKCON_PWMT,
}, { }, {
.name = "cfc", .name = "cfc",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_CFC, .ctrlbit = S3C2443_HCLKCON_CFC,
}, { }, {
.name = "ssmc", .name = "ssmc",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2443_HCLKCON_SSMC, .ctrlbit = S3C2443_HCLKCON_SSMC,
}, { }, {
.name = "uart", .name = "uart",
.id = 0, .devname = "s3c2440-uart.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_UART0, .ctrlbit = S3C2443_PCLKCON_UART0,
}, { }, {
.name = "uart", .name = "uart",
.id = 1, .devname = "s3c2440-uart.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_UART1, .ctrlbit = S3C2443_PCLKCON_UART1,
}, { }, {
.name = "uart", .name = "uart",
.id = 2, .devname = "s3c2440-uart.2",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_UART2, .ctrlbit = S3C2443_PCLKCON_UART2,
}, { }, {
.name = "uart", .name = "uart",
.id = 3, .devname = "s3c2440-uart.3",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_UART3, .ctrlbit = S3C2443_PCLKCON_UART3,
}, { }, {
.name = "rtc", .name = "rtc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_RTC, .ctrlbit = S3C2443_PCLKCON_RTC,
}, { }, {
.name = "watchdog", .name = "watchdog",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.ctrlbit = S3C2443_PCLKCON_WDT, .ctrlbit = S3C2443_PCLKCON_WDT,
}, { }, {
.name = "ac97", .name = "ac97",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.ctrlbit = S3C2443_PCLKCON_AC97, .ctrlbit = S3C2443_PCLKCON_AC97,
}, { }, {
.name = "nand", .name = "nand",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
}, { }, {
.name = "usb-bus-host", .name = "usb-bus-host",
.id = -1,
.parent = &clk_usb_bus_host.clk, .parent = &clk_usb_bus_host.clk,
} }
}; };
......
...@@ -195,7 +195,6 @@ struct clk_ops clk_ops_def_setrate = { ...@@ -195,7 +195,6 @@ struct clk_ops clk_ops_def_setrate = {
struct clk clk_xtal = { struct clk clk_xtal = {
.name = "xtal", .name = "xtal",
.id = -1,
.rate = 0, .rate = 0,
.parent = NULL, .parent = NULL,
.ctrlbit = 0, .ctrlbit = 0,
...@@ -203,30 +202,25 @@ struct clk clk_xtal = { ...@@ -203,30 +202,25 @@ struct clk clk_xtal = {
struct clk clk_ext = { struct clk clk_ext = {
.name = "ext", .name = "ext",
.id = -1,
}; };
struct clk clk_epll = { struct clk clk_epll = {
.name = "epll", .name = "epll",
.id = -1,
}; };
struct clk clk_mpll = { struct clk clk_mpll = {
.name = "mpll", .name = "mpll",
.id = -1,
.ops = &clk_ops_def_setrate, .ops = &clk_ops_def_setrate,
}; };
struct clk clk_upll = { struct clk clk_upll = {
.name = "upll", .name = "upll",
.id = -1,
.parent = NULL, .parent = NULL,
.ctrlbit = 0, .ctrlbit = 0,
}; };
struct clk clk_f = { struct clk clk_f = {
.name = "fclk", .name = "fclk",
.id = -1,
.rate = 0, .rate = 0,
.parent = &clk_mpll, .parent = &clk_mpll,
.ctrlbit = 0, .ctrlbit = 0,
...@@ -234,7 +228,6 @@ struct clk clk_f = { ...@@ -234,7 +228,6 @@ struct clk clk_f = {
struct clk clk_h = { struct clk clk_h = {
.name = "hclk", .name = "hclk",
.id = -1,
.rate = 0, .rate = 0,
.parent = NULL, .parent = NULL,
.ctrlbit = 0, .ctrlbit = 0,
...@@ -243,7 +236,6 @@ struct clk clk_h = { ...@@ -243,7 +236,6 @@ struct clk clk_h = {
struct clk clk_p = { struct clk clk_p = {
.name = "pclk", .name = "pclk",
.id = -1,
.rate = 0, .rate = 0,
.parent = NULL, .parent = NULL,
.ctrlbit = 0, .ctrlbit = 0,
...@@ -252,7 +244,6 @@ struct clk clk_p = { ...@@ -252,7 +244,6 @@ struct clk clk_p = {
struct clk clk_usb_bus = { struct clk clk_usb_bus = {
.name = "usb-bus", .name = "usb-bus",
.id = -1,
.rate = 0, .rate = 0,
.parent = &clk_upll, .parent = &clk_upll,
}; };
...@@ -260,7 +251,6 @@ struct clk clk_usb_bus = { ...@@ -260,7 +251,6 @@ struct clk clk_usb_bus = {
struct clk s3c24xx_uclk = { struct clk s3c24xx_uclk = {
.name = "uclk", .name = "uclk",
.id = -1,
}; };
/* initialise the clock system */ /* initialise the clock system */
......
...@@ -268,6 +268,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { ...@@ -268,6 +268,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
[0] = { [0] = {
.clk = { .clk = {
.name = "pwm-tdiv", .name = "pwm-tdiv",
.devname = "s3c24xx-pwm.0",
.ops = &clk_tdiv_ops, .ops = &clk_tdiv_ops,
.parent = &clk_timer_scaler[0], .parent = &clk_timer_scaler[0],
}, },
...@@ -275,6 +276,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { ...@@ -275,6 +276,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
[1] = { [1] = {
.clk = { .clk = {
.name = "pwm-tdiv", .name = "pwm-tdiv",
.devname = "s3c24xx-pwm.1",
.ops = &clk_tdiv_ops, .ops = &clk_tdiv_ops,
.parent = &clk_timer_scaler[0], .parent = &clk_timer_scaler[0],
} }
...@@ -282,6 +284,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { ...@@ -282,6 +284,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
[2] = { [2] = {
.clk = { .clk = {
.name = "pwm-tdiv", .name = "pwm-tdiv",
.devname = "s3c24xx-pwm.2",
.ops = &clk_tdiv_ops, .ops = &clk_tdiv_ops,
.parent = &clk_timer_scaler[1], .parent = &clk_timer_scaler[1],
}, },
...@@ -289,6 +292,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { ...@@ -289,6 +292,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
[3] = { [3] = {
.clk = { .clk = {
.name = "pwm-tdiv", .name = "pwm-tdiv",
.devname = "s3c24xx-pwm.3",
.ops = &clk_tdiv_ops, .ops = &clk_tdiv_ops,
.parent = &clk_timer_scaler[1], .parent = &clk_timer_scaler[1],
}, },
...@@ -296,6 +300,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { ...@@ -296,6 +300,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
[4] = { [4] = {
.clk = { .clk = {
.name = "pwm-tdiv", .name = "pwm-tdiv",
.devname = "s3c24xx-pwm.4",
.ops = &clk_tdiv_ops, .ops = &clk_tdiv_ops,
.parent = &clk_timer_scaler[1], .parent = &clk_timer_scaler[1],
}, },
...@@ -361,26 +366,31 @@ static struct clk_ops clk_tin_ops = { ...@@ -361,26 +366,31 @@ static struct clk_ops clk_tin_ops = {
static struct clk clk_tin[] = { static struct clk clk_tin[] = {
[0] = { [0] = {
.name = "pwm-tin", .name = "pwm-tin",
.devname = "s3c24xx-pwm.0",
.id = 0, .id = 0,
.ops = &clk_tin_ops, .ops = &clk_tin_ops,
}, },
[1] = { [1] = {
.name = "pwm-tin", .name = "pwm-tin",
.devname = "s3c24xx-pwm.1",
.id = 1, .id = 1,
.ops = &clk_tin_ops, .ops = &clk_tin_ops,
}, },
[2] = { [2] = {
.name = "pwm-tin", .name = "pwm-tin",
.devname = "s3c24xx-pwm.2",
.id = 2, .id = 2,
.ops = &clk_tin_ops, .ops = &clk_tin_ops,
}, },
[3] = { [3] = {
.name = "pwm-tin", .name = "pwm-tin",
.devname = "s3c24xx-pwm.3",
.id = 3, .id = 3,
.ops = &clk_tin_ops, .ops = &clk_tin_ops,
}, },
[4] = { [4] = {
.name = "pwm-tin", .name = "pwm-tin",
.devname = "s3c24xx-pwm.4",
.id = 4, .id = 4,
.ops = &clk_tin_ops, .ops = &clk_tin_ops,
}, },
......
...@@ -259,6 +259,8 @@ static void __init s3c2410_timer_resources(void) ...@@ -259,6 +259,8 @@ static void __init s3c2410_timer_resources(void)
clk_enable(timerclk); clk_enable(timerclk);
if (!use_tclk1_12()) { if (!use_tclk1_12()) {
tmpdev.id = 4;
tmpdev.dev.init_name = "s3c24xx-pwm.4";
tin = clk_get(&tmpdev.dev, "pwm-tin"); tin = clk_get(&tmpdev.dev, "pwm-tin");
if (IS_ERR(tin)) if (IS_ERR(tin))
panic("failed to get pwm-tin clock for system timer"); panic("failed to get pwm-tin clock for system timer");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment