mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
Common clk support for S3C64XX
- add PLL for S3C64XX - add s3c64xx clock driver - update drivers to use CCF of s3c64xx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJSQK8VAAoJEA0Cl+kVi2xql9IP/2ZdMukndE/gxZpsHCwKSFgm pme2TxM4weN3q8c/749+r8AzwLl+RKbJdiw5DN4XDZ4cTdSSLkDkASUy0A0/r6Rg 147zoQSeI02HU9LgKzZP731x3wOOCAM+RdI3eT0idDSY14Z0cScNtp7tCU52BhEF OdZtQTDHdcnZuESUVGksRq2GM4V2KxlzBB/FNEtq28edEQa8gXmEdpfM7AkTtl1M e5JFmwY3xaL2qL/0A27trOyxsuyacx1K0GHWMaHeE6wpsVh3EzK2Bx/iHTcH1wre MIplDMUj18QEziuUgZ82M7sJ/VPYDugplZTI1tMKgln8ri5AA5Wtvn8e6intMntc f2VsZdOXlY0Uxz0SqGsLlxdMzi+rRy2HAlEuUKThQ8QMPxHB4uYKXjP1gZEskPwd BSIJ7vXXoPxIHlC7f2PIMPRyqcgLrPG8Y+/1Obcl5pQTyP8am1throJWPlyPKEuv yOqfuxfgZLXL1XJdcLDswgz+qRIPacbm7/1hM62wwGErjUo8m3wvmy88ZfR4Myo+ jj1avbsPthfInBl2/OMp9vGlZm6544SV7RtKU1/wuDNGPQba8+tr9FOiv7tJ2kRG xnLRcop9lu4qNqykeJkxGsOfHmTvYjG4N7TSrHunKJpN6fuVOQR93V1RSRAEX5e9 TvEuCjm3OJj4J1sARwke =bUyC -----END PGP SIGNATURE----- Merge tag 'samsung-clk-s3c64xx' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc From Kukjin Kim: Common clk support for S3C64XX - add PLL for S3C64XX - add s3c64xx clock driver - update drivers to use CCF of s3c64xx * tag 'samsung-clk-s3c64xx' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: S3C64XX: Remove old clock management code ARM: S3C64XX: Migrate clock handling to Common Clock Framework usb: ohci-s3c2410.c: Use clk_prepare_enable/clk_disable_unprepare ARM: S3C64XX: Use clk_prepare_enable/clk_disable_unprepare in dma.c ARM: SAMSUNG: Add soc_is_s3c6400/s3c6410 macros Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
fca9b5ea3e
@ -727,6 +727,7 @@ config ARCH_S3C64XX
|
||||
select ARM_VIC
|
||||
select CLKDEV_LOOKUP
|
||||
select CLKSRC_SAMSUNG_PWM
|
||||
select COMMON_CLK
|
||||
select CPU_V6
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GPIO_SAMSUNG
|
||||
@ -740,7 +741,6 @@ config ARCH_S3C64XX
|
||||
select S3C_DEV_NAND
|
||||
select S3C_GPIO_TRACK
|
||||
select SAMSUNG_ATAGS
|
||||
select SAMSUNG_CLKSRC
|
||||
select SAMSUNG_GPIOLIB_4BIT
|
||||
select SAMSUNG_WDT_RESET
|
||||
select USB_ARCH_HAS_OHCI
|
||||
|
@ -12,7 +12,7 @@ obj- :=
|
||||
|
||||
# Core
|
||||
|
||||
obj-y += common.o clock.o
|
||||
obj-y += common.o
|
||||
|
||||
# Core support
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/serial_core.h>
|
||||
@ -38,7 +39,6 @@
|
||||
#include <mach/regs-gpio.h>
|
||||
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/devs.h>
|
||||
#include <plat/pm.h>
|
||||
#include <plat/gpio-cfg.h>
|
||||
@ -50,6 +50,19 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* External clock frequency */
|
||||
static unsigned long xtal_f = 12000000, xusbxti_f = 48000000;
|
||||
|
||||
void __init s3c64xx_set_xtal_freq(unsigned long freq)
|
||||
{
|
||||
xtal_f = freq;
|
||||
}
|
||||
|
||||
void __init s3c64xx_set_xusbxti_freq(unsigned long freq)
|
||||
{
|
||||
xusbxti_f = freq;
|
||||
}
|
||||
|
||||
/* uart registration process */
|
||||
|
||||
static void __init s3c64xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
|
||||
@ -67,7 +80,6 @@ static struct cpu_table cpu_ids[] __initdata = {
|
||||
.idcode = S3C6400_CPU_ID,
|
||||
.idmask = S3C64XX_CPU_MASK,
|
||||
.map_io = s3c6400_map_io,
|
||||
.init_clocks = s3c6400_init_clocks,
|
||||
.init_uarts = s3c64xx_init_uarts,
|
||||
.init = s3c6400_init,
|
||||
.name = name_s3c6400,
|
||||
@ -75,7 +87,6 @@ static struct cpu_table cpu_ids[] __initdata = {
|
||||
.idcode = S3C6410_CPU_ID,
|
||||
.idmask = S3C64XX_CPU_MASK,
|
||||
.map_io = s3c6410_map_io,
|
||||
.init_clocks = s3c6410_init_clocks,
|
||||
.init_uarts = s3c64xx_init_uarts,
|
||||
.init = s3c6410_init,
|
||||
.name = name_s3c6410,
|
||||
@ -213,8 +224,10 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
|
||||
{
|
||||
/*
|
||||
* FIXME: there is no better place to put this at the moment
|
||||
* (samsung_wdt_reset_init needs clocks)
|
||||
* (s3c64xx_clk_init needs ioremap and must happen before init_time
|
||||
* samsung_wdt_reset_init needs clocks)
|
||||
*/
|
||||
s3c64xx_clk_init(NULL, xtal_f, xusbxti_f, soc_is_s3c6400(), S3C_VA_SYS);
|
||||
samsung_wdt_reset_init(S3C_VA_WATCHDOG);
|
||||
|
||||
printk(KERN_DEBUG "%s: initialising interrupts\n", __func__);
|
||||
|
@ -22,21 +22,21 @@
|
||||
void s3c64xx_init_irq(u32 vic0, u32 vic1);
|
||||
void s3c64xx_init_io(struct map_desc *mach_desc, int size);
|
||||
|
||||
void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit);
|
||||
void s3c64xx_setup_clocks(void);
|
||||
|
||||
void s3c64xx_restart(enum reboot_mode mode, const char *cmd);
|
||||
void s3c64xx_init_late(void);
|
||||
|
||||
void s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
|
||||
unsigned long xusbxti_f, bool is_s3c6400, void __iomem *reg_base);
|
||||
void s3c64xx_set_xtal_freq(unsigned long freq);
|
||||
void s3c64xx_set_xusbxti_freq(unsigned long freq);
|
||||
|
||||
#ifdef CONFIG_CPU_S3C6400
|
||||
|
||||
extern int s3c6400_init(void);
|
||||
extern void s3c6400_init_irq(void);
|
||||
extern void s3c6400_map_io(void);
|
||||
extern void s3c6400_init_clocks(int xtal);
|
||||
|
||||
#else
|
||||
#define s3c6400_init_clocks NULL
|
||||
#define s3c6400_map_io NULL
|
||||
#define s3c6400_init NULL
|
||||
#endif
|
||||
@ -46,10 +46,8 @@ extern void s3c6400_init_clocks(int xtal);
|
||||
extern int s3c6410_init(void);
|
||||
extern void s3c6410_init_irq(void);
|
||||
extern void s3c6410_map_io(void);
|
||||
extern void s3c6410_init_clocks(int xtal);
|
||||
|
||||
#else
|
||||
#define s3c6410_init_clocks NULL
|
||||
#define s3c6410_map_io NULL
|
||||
#define s3c6410_init NULL
|
||||
#endif
|
||||
|
@ -677,7 +677,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase,
|
||||
goto err_map;
|
||||
}
|
||||
|
||||
clk_enable(dmac->clk);
|
||||
clk_prepare_enable(dmac->clk);
|
||||
|
||||
dmac->regs = regs;
|
||||
dmac->chanbase = chbase;
|
||||
@ -711,7 +711,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase,
|
||||
return 0;
|
||||
|
||||
err_clk:
|
||||
clk_disable(dmac->clk);
|
||||
clk_disable_unprepare(dmac->clk);
|
||||
clk_put(dmac->clk);
|
||||
err_map:
|
||||
iounmap(regs);
|
||||
|
@ -15,145 +15,21 @@
|
||||
#ifndef __PLAT_REGS_CLOCK_H
|
||||
#define __PLAT_REGS_CLOCK_H __FILE__
|
||||
|
||||
/*
|
||||
* FIXME: Remove remaining definitions
|
||||
*/
|
||||
|
||||
#define S3C_CLKREG(x) (S3C_VA_SYS + (x))
|
||||
|
||||
#define S3C_APLL_LOCK S3C_CLKREG(0x00)
|
||||
#define S3C_MPLL_LOCK S3C_CLKREG(0x04)
|
||||
#define S3C_EPLL_LOCK S3C_CLKREG(0x08)
|
||||
#define S3C_APLL_CON S3C_CLKREG(0x0C)
|
||||
#define S3C_MPLL_CON S3C_CLKREG(0x10)
|
||||
#define S3C_EPLL_CON0 S3C_CLKREG(0x14)
|
||||
#define S3C_EPLL_CON1 S3C_CLKREG(0x18)
|
||||
#define S3C_CLK_SRC S3C_CLKREG(0x1C)
|
||||
#define S3C_CLK_DIV0 S3C_CLKREG(0x20)
|
||||
#define S3C_CLK_DIV1 S3C_CLKREG(0x24)
|
||||
#define S3C_CLK_DIV2 S3C_CLKREG(0x28)
|
||||
#define S3C_CLK_OUT S3C_CLKREG(0x2C)
|
||||
#define S3C_HCLK_GATE S3C_CLKREG(0x30)
|
||||
#define S3C_PCLK_GATE S3C_CLKREG(0x34)
|
||||
#define S3C_SCLK_GATE S3C_CLKREG(0x38)
|
||||
#define S3C_MEM0_GATE S3C_CLKREG(0x3C)
|
||||
#define S3C6410_CLK_SRC2 S3C_CLKREG(0x10C)
|
||||
#define S3C_MEM_SYS_CFG S3C_CLKREG(0x120)
|
||||
|
||||
/* CLKDIV0 */
|
||||
#define S3C6400_CLKDIV0_PCLK_MASK (0xf << 12)
|
||||
#define S3C6400_CLKDIV0_PCLK_SHIFT (12)
|
||||
#define S3C6400_CLKDIV0_HCLK2_MASK (0x7 << 9)
|
||||
#define S3C6400_CLKDIV0_HCLK2_SHIFT (9)
|
||||
#define S3C6400_CLKDIV0_HCLK_MASK (0x1 << 8)
|
||||
#define S3C6400_CLKDIV0_HCLK_SHIFT (8)
|
||||
#define S3C6400_CLKDIV0_MPLL_MASK (0x1 << 4)
|
||||
#define S3C6400_CLKDIV0_MPLL_SHIFT (4)
|
||||
|
||||
#define S3C6400_CLKDIV0_ARM_MASK (0x7 << 0)
|
||||
#define S3C6410_CLKDIV0_ARM_MASK (0xf << 0)
|
||||
#define S3C6400_CLKDIV0_ARM_SHIFT (0)
|
||||
|
||||
/* HCLK GATE Registers */
|
||||
#define S3C_CLKCON_HCLK_3DSE (1<<31)
|
||||
#define S3C_CLKCON_HCLK_UHOST (1<<29)
|
||||
#define S3C_CLKCON_HCLK_SECUR (1<<28)
|
||||
#define S3C_CLKCON_HCLK_SDMA1 (1<<27)
|
||||
#define S3C_CLKCON_HCLK_SDMA0 (1<<26)
|
||||
#define S3C_CLKCON_HCLK_IROM (1<<25)
|
||||
#define S3C_CLKCON_HCLK_DDR1 (1<<24)
|
||||
#define S3C_CLKCON_HCLK_DDR0 (1<<23)
|
||||
#define S3C_CLKCON_HCLK_MEM1 (1<<22)
|
||||
#define S3C_CLKCON_HCLK_MEM0 (1<<21)
|
||||
#define S3C_CLKCON_HCLK_USB (1<<20)
|
||||
#define S3C_CLKCON_HCLK_HSMMC2 (1<<19)
|
||||
#define S3C_CLKCON_HCLK_HSMMC1 (1<<18)
|
||||
#define S3C_CLKCON_HCLK_HSMMC0 (1<<17)
|
||||
#define S3C_CLKCON_HCLK_MDP (1<<16)
|
||||
#define S3C_CLKCON_HCLK_DHOST (1<<15)
|
||||
#define S3C_CLKCON_HCLK_IHOST (1<<14)
|
||||
#define S3C_CLKCON_HCLK_DMA1 (1<<13)
|
||||
#define S3C_CLKCON_HCLK_DMA0 (1<<12)
|
||||
#define S3C_CLKCON_HCLK_JPEG (1<<11)
|
||||
#define S3C_CLKCON_HCLK_CAMIF (1<<10)
|
||||
#define S3C_CLKCON_HCLK_SCALER (1<<9)
|
||||
#define S3C_CLKCON_HCLK_2D (1<<8)
|
||||
#define S3C_CLKCON_HCLK_TV (1<<7)
|
||||
#define S3C_CLKCON_HCLK_POST0 (1<<5)
|
||||
#define S3C_CLKCON_HCLK_ROT (1<<4)
|
||||
#define S3C_CLKCON_HCLK_LCD (1<<3)
|
||||
#define S3C_CLKCON_HCLK_TZIC (1<<2)
|
||||
#define S3C_CLKCON_HCLK_INTC (1<<1)
|
||||
#define S3C_CLKCON_HCLK_MFC (1<<0)
|
||||
|
||||
/* PCLK GATE Registers */
|
||||
#define S3C6410_CLKCON_PCLK_I2C1 (1<<27)
|
||||
#define S3C6410_CLKCON_PCLK_IIS2 (1<<26)
|
||||
#define S3C_CLKCON_PCLK_SKEY (1<<24)
|
||||
#define S3C_CLKCON_PCLK_CHIPID (1<<23)
|
||||
#define S3C_CLKCON_PCLK_SPI1 (1<<22)
|
||||
#define S3C_CLKCON_PCLK_SPI0 (1<<21)
|
||||
#define S3C_CLKCON_PCLK_HSIRX (1<<20)
|
||||
#define S3C_CLKCON_PCLK_HSITX (1<<19)
|
||||
#define S3C_CLKCON_PCLK_GPIO (1<<18)
|
||||
#define S3C_CLKCON_PCLK_IIC (1<<17)
|
||||
#define S3C_CLKCON_PCLK_IIS1 (1<<16)
|
||||
#define S3C_CLKCON_PCLK_IIS0 (1<<15)
|
||||
#define S3C_CLKCON_PCLK_AC97 (1<<14)
|
||||
#define S3C_CLKCON_PCLK_TZPC (1<<13)
|
||||
#define S3C_CLKCON_PCLK_TSADC (1<<12)
|
||||
#define S3C_CLKCON_PCLK_KEYPAD (1<<11)
|
||||
#define S3C_CLKCON_PCLK_IRDA (1<<10)
|
||||
#define S3C_CLKCON_PCLK_PCM1 (1<<9)
|
||||
#define S3C_CLKCON_PCLK_PCM0 (1<<8)
|
||||
#define S3C_CLKCON_PCLK_PWM (1<<7)
|
||||
#define S3C_CLKCON_PCLK_RTC (1<<6)
|
||||
#define S3C_CLKCON_PCLK_WDT (1<<5)
|
||||
#define S3C_CLKCON_PCLK_UART3 (1<<4)
|
||||
#define S3C_CLKCON_PCLK_UART2 (1<<3)
|
||||
#define S3C_CLKCON_PCLK_UART1 (1<<2)
|
||||
#define S3C_CLKCON_PCLK_UART0 (1<<1)
|
||||
#define S3C_CLKCON_PCLK_MFC (1<<0)
|
||||
|
||||
/* SCLK GATE Registers */
|
||||
#define S3C_CLKCON_SCLK_UHOST (1<<30)
|
||||
#define S3C_CLKCON_SCLK_MMC2_48 (1<<29)
|
||||
#define S3C_CLKCON_SCLK_MMC1_48 (1<<28)
|
||||
#define S3C_CLKCON_SCLK_MMC0_48 (1<<27)
|
||||
#define S3C_CLKCON_SCLK_MMC2 (1<<26)
|
||||
#define S3C_CLKCON_SCLK_MMC1 (1<<25)
|
||||
#define S3C_CLKCON_SCLK_MMC0 (1<<24)
|
||||
#define S3C_CLKCON_SCLK_SPI1_48 (1<<23)
|
||||
#define S3C_CLKCON_SCLK_SPI0_48 (1<<22)
|
||||
#define S3C_CLKCON_SCLK_SPI1 (1<<21)
|
||||
#define S3C_CLKCON_SCLK_SPI0 (1<<20)
|
||||
#define S3C_CLKCON_SCLK_DAC27 (1<<19)
|
||||
#define S3C_CLKCON_SCLK_TV27 (1<<18)
|
||||
#define S3C_CLKCON_SCLK_SCALER27 (1<<17)
|
||||
#define S3C_CLKCON_SCLK_SCALER (1<<16)
|
||||
#define S3C_CLKCON_SCLK_LCD27 (1<<15)
|
||||
#define S3C_CLKCON_SCLK_LCD (1<<14)
|
||||
#define S3C6400_CLKCON_SCLK_POST1_27 (1<<13)
|
||||
#define S3C6410_CLKCON_FIMC (1<<13)
|
||||
#define S3C_CLKCON_SCLK_POST0_27 (1<<12)
|
||||
#define S3C6400_CLKCON_SCLK_POST1 (1<<11)
|
||||
#define S3C6410_CLKCON_SCLK_AUDIO2 (1<<11)
|
||||
#define S3C_CLKCON_SCLK_POST0 (1<<10)
|
||||
#define S3C_CLKCON_SCLK_AUDIO1 (1<<9)
|
||||
#define S3C_CLKCON_SCLK_AUDIO0 (1<<8)
|
||||
#define S3C_CLKCON_SCLK_SECUR (1<<7)
|
||||
#define S3C_CLKCON_SCLK_IRDA (1<<6)
|
||||
#define S3C_CLKCON_SCLK_UART (1<<5)
|
||||
#define S3C_CLKCON_SCLK_ONENAND (1<<4)
|
||||
#define S3C_CLKCON_SCLK_MFC (1<<3)
|
||||
#define S3C_CLKCON_SCLK_CAM (1<<2)
|
||||
#define S3C_CLKCON_SCLK_JPEG (1<<1)
|
||||
|
||||
/* CLKSRC */
|
||||
|
||||
#define S3C6400_CLKSRC_APLL_MOUT (1 << 0)
|
||||
#define S3C6400_CLKSRC_MPLL_MOUT (1 << 1)
|
||||
#define S3C6400_CLKSRC_EPLL_MOUT (1 << 2)
|
||||
#define S3C6400_CLKSRC_APLL_MOUT_SHIFT (0)
|
||||
#define S3C6400_CLKSRC_MPLL_MOUT_SHIFT (1)
|
||||
#define S3C6400_CLKSRC_EPLL_MOUT_SHIFT (2)
|
||||
#define S3C6400_CLKSRC_MFC (1 << 4)
|
||||
|
||||
/* MEM_SYS_CFG */
|
||||
#define MEM_SYS_CFG_INDEP_CF 0x4000
|
||||
|
@ -207,7 +207,7 @@ static struct platform_device *anw6410_devices[] __initdata = {
|
||||
static void __init anw6410_map_io(void)
|
||||
{
|
||||
s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc));
|
||||
s3c24xx_init_clocks(12000000);
|
||||
s3c64xx_set_xtal_freq(12000000);
|
||||
s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs));
|
||||
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
|
||||
|
||||
|
@ -743,7 +743,7 @@ static struct s3c2410_platform_i2c i2c1_pdata = {
|
||||
static void __init crag6410_map_io(void)
|
||||
{
|
||||
s3c64xx_init_io(NULL, 0);
|
||||
s3c24xx_init_clocks(12000000);
|
||||
s3c64xx_set_xtal_freq(12000000);
|
||||
s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs));
|
||||
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
|
||||
|
||||
|
@ -247,7 +247,7 @@ static struct platform_device *hmt_devices[] __initdata = {
|
||||
static void __init hmt_map_io(void)
|
||||
{
|
||||
s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc));
|
||||
s3c24xx_init_clocks(12000000);
|
||||
s3c64xx_set_xtal_freq(12000000);
|
||||
s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs));
|
||||
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ static void __init mini6410_map_io(void)
|
||||
u32 tmp;
|
||||
|
||||
s3c64xx_init_io(NULL, 0);
|
||||
s3c24xx_init_clocks(12000000);
|
||||
s3c64xx_set_xtal_freq(12000000);
|
||||
s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs));
|
||||
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
|
||||
|
||||
|
@ -86,7 +86,7 @@ static struct map_desc ncp_iodesc[] __initdata = {};
|
||||
static void __init ncp_map_io(void)
|
||||
{
|
||||
s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc));
|
||||
s3c24xx_init_clocks(12000000);
|
||||
s3c64xx_set_xtal_freq(12000000);
|
||||
s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs));
|
||||
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
|
||||
}
|
||||
|
@ -337,13 +337,6 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int __init smartq_usb_otg_init(void)
|
||||
{
|
||||
clk_xusbxti.rate = 12000000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init smartq_wifi_init(void)
|
||||
{
|
||||
int ret;
|
||||
@ -377,7 +370,8 @@ static struct map_desc smartq_iodesc[] __initdata = {};
|
||||
void __init smartq_map_io(void)
|
||||
{
|
||||
s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc));
|
||||
s3c24xx_init_clocks(12000000);
|
||||
s3c64xx_set_xtal_freq(12000000);
|
||||
s3c64xx_set_xusbxti_freq(12000000);
|
||||
s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs));
|
||||
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
|
||||
|
||||
@ -399,7 +393,6 @@ void __init smartq_machine_init(void)
|
||||
WARN_ON(smartq_lcd_setup_gpio());
|
||||
WARN_ON(smartq_power_off_init());
|
||||
WARN_ON(smartq_usb_host_init());
|
||||
WARN_ON(smartq_usb_otg_init());
|
||||
WARN_ON(smartq_wifi_init());
|
||||
|
||||
platform_add_devices(smartq_devices, ARRAY_SIZE(smartq_devices));
|
||||
|
@ -65,7 +65,7 @@ static struct map_desc smdk6400_iodesc[] = {};
|
||||
static void __init smdk6400_map_io(void)
|
||||
{
|
||||
s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc));
|
||||
s3c24xx_init_clocks(12000000);
|
||||
s3c64xx_set_xtal_freq(12000000);
|
||||
s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs));
|
||||
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ static void __init smdk6410_map_io(void)
|
||||
u32 tmp;
|
||||
|
||||
s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc));
|
||||
s3c24xx_init_clocks(12000000);
|
||||
s3c64xx_set_xtal_freq(12000000);
|
||||
s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs));
|
||||
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
|
||||
|
||||
|
@ -194,29 +194,8 @@ void s3c_pm_debug_smdkled(u32 set, u32 clear)
|
||||
#endif
|
||||
|
||||
static struct sleep_save core_save[] = {
|
||||
SAVE_ITEM(S3C_APLL_LOCK),
|
||||
SAVE_ITEM(S3C_MPLL_LOCK),
|
||||
SAVE_ITEM(S3C_EPLL_LOCK),
|
||||
SAVE_ITEM(S3C_CLK_SRC),
|
||||
SAVE_ITEM(S3C_CLK_DIV0),
|
||||
SAVE_ITEM(S3C_CLK_DIV1),
|
||||
SAVE_ITEM(S3C_CLK_DIV2),
|
||||
SAVE_ITEM(S3C_CLK_OUT),
|
||||
SAVE_ITEM(S3C_HCLK_GATE),
|
||||
SAVE_ITEM(S3C_PCLK_GATE),
|
||||
SAVE_ITEM(S3C_SCLK_GATE),
|
||||
SAVE_ITEM(S3C_MEM0_GATE),
|
||||
|
||||
SAVE_ITEM(S3C_EPLL_CON1),
|
||||
SAVE_ITEM(S3C_EPLL_CON0),
|
||||
|
||||
SAVE_ITEM(S3C64XX_MEM0DRVCON),
|
||||
SAVE_ITEM(S3C64XX_MEM1DRVCON),
|
||||
|
||||
#ifndef CONFIG_CPU_FREQ
|
||||
SAVE_ITEM(S3C_APLL_CON),
|
||||
SAVE_ITEM(S3C_MPLL_CON),
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sleep_save misc_save[] = {
|
||||
|
@ -58,12 +58,6 @@ void __init s3c6400_map_io(void)
|
||||
s3c64xx_onenand1_setname("s3c6400-onenand");
|
||||
}
|
||||
|
||||
void __init s3c6400_init_clocks(int xtal)
|
||||
{
|
||||
s3c64xx_register_clocks(xtal, S3C6400_CLKDIV0_ARM_MASK);
|
||||
s3c64xx_setup_clocks();
|
||||
}
|
||||
|
||||
void __init s3c6400_init_irq(void)
|
||||
{
|
||||
/* VIC0 does not have IRQS 5..7,
|
||||
|
@ -62,13 +62,6 @@ void __init s3c6410_map_io(void)
|
||||
s3c_cfcon_setname("s3c64xx-pata");
|
||||
}
|
||||
|
||||
void __init s3c6410_init_clocks(int xtal)
|
||||
{
|
||||
printk(KERN_DEBUG "%s: initialising clocks\n", __func__);
|
||||
s3c64xx_register_clocks(xtal, S3C6410_CLKDIV0_ARM_MASK);
|
||||
s3c64xx_setup_clocks();
|
||||
}
|
||||
|
||||
void __init s3c6410_init_irq(void)
|
||||
{
|
||||
/* VIC0 is missing IRQ7, VIC1 is fully populated. */
|
||||
|
@ -87,8 +87,12 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_S3C6400) || defined(CONFIG_CPU_S3C6410)
|
||||
# define soc_is_s3c6400() is_samsung_s3c6400()
|
||||
# define soc_is_s3c6410() is_samsung_s3c6410()
|
||||
# define soc_is_s3c64xx() (is_samsung_s3c6400() || is_samsung_s3c6410())
|
||||
#else
|
||||
# define soc_is_s3c6400() 0
|
||||
# define soc_is_s3c6410() 0
|
||||
# define soc_is_s3c64xx() 0
|
||||
#endif
|
||||
|
||||
|
@ -8,6 +8,4 @@ obj-$(CONFIG_SOC_EXYNOS5250) += clk-exynos5250.o
|
||||
obj-$(CONFIG_SOC_EXYNOS5420) += clk-exynos5420.o
|
||||
obj-$(CONFIG_SOC_EXYNOS5440) += clk-exynos5440.o
|
||||
obj-$(CONFIG_ARCH_EXYNOS) += clk-exynos-audss.o
|
||||
ifdef CONFIG_COMMON_CLK
|
||||
obj-$(CONFIG_ARCH_S3C64XX) += clk-s3c64xx.o
|
||||
endif
|
||||
|
@ -47,10 +47,10 @@ static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd)
|
||||
|
||||
dev_dbg(&dev->dev, "s3c2410_start_hc:\n");
|
||||
|
||||
clk_enable(usb_clk);
|
||||
clk_prepare_enable(usb_clk);
|
||||
mdelay(2); /* let the bus clock stabilise */
|
||||
|
||||
clk_enable(clk);
|
||||
clk_prepare_enable(clk);
|
||||
|
||||
if (info != NULL) {
|
||||
info->hcd = hcd;
|
||||
@ -75,8 +75,8 @@ static void s3c2410_stop_hc(struct platform_device *dev)
|
||||
(info->enable_oc)(info, 0);
|
||||
}
|
||||
|
||||
clk_disable(clk);
|
||||
clk_disable(usb_clk);
|
||||
clk_disable_unprepare(clk);
|
||||
clk_disable_unprepare(usb_clk);
|
||||
}
|
||||
|
||||
/* ohci_s3c2410_hub_status_data
|
||||
|
Loading…
Reference in New Issue
Block a user