Loading arch/arm/mach-s3c2410/Kconfig +20 −0 Original line number Original line Diff line number Diff line Loading @@ -81,6 +81,12 @@ config SMDK2440_CPU2442 depends on ARCH_S3C2440 depends on ARCH_S3C2440 select CPU_S3C2442 select CPU_S3C2442 config MACH_SMDK2413 bool "SMDK2413" select CPU_S3C2412 select MACH_SMDK help Say Y here if you are using an SMDK2413 config MACH_VR1000 config MACH_VR1000 bool "Thorcom VR1000" bool "Thorcom VR1000" Loading Loading @@ -127,6 +133,20 @@ config CPU_S3C2410 Support for S3C2410 and S3C2410A family from the S3C24XX line Support for S3C2410 and S3C2410A family from the S3C24XX line of Samsung Mobile CPUs. of Samsung Mobile CPUs. # internal node to signify if we are only dealing with an S3C2412 config CPU_S3C2412_ONLY bool depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \ !CPU_S3C2440 && !CPU_S3C2442 && CPU_S3C2412 default y if CPU_S3C2412 config CPU_S3C2412 bool depends on ARCH_S3C2410 help Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line config CPU_S3C244X config CPU_S3C244X bool bool depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442) depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442) Loading arch/arm/mach-s3c2410/Makefile +6 −0 Original line number Original line Diff line number Diff line Loading @@ -24,6 +24,11 @@ obj-$(CONFIG_S3C2410_DMA) += dma.o obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o # S3C2412 support obj-$(CONFIG_CPU_S3C2412) += s3c2412.o obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o # # S3C244X support # S3C244X support obj-$(CONFIG_CPU_S3C244X) += s3c244x.o obj-$(CONFIG_CPU_S3C244X) += s3c244x.o Loading Loading @@ -57,6 +62,7 @@ obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o obj-$(CONFIG_MACH_N30) += mach-n30.o obj-$(CONFIG_MACH_N30) += mach-n30.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o Loading arch/arm/mach-s3c2410/clock.c +15 −6 Original line number Original line Diff line number Diff line Loading @@ -213,7 +213,7 @@ EXPORT_SYMBOL(clk_set_parent); /* base clocks */ /* base clocks */ static struct clk clk_xtal = { struct clk clk_xtal = { .name = "xtal", .name = "xtal", .id = -1, .id = -1, .rate = 0, .rate = 0, Loading @@ -221,6 +221,11 @@ static struct clk clk_xtal = { .ctrlbit = 0, .ctrlbit = 0, }; }; struct clk clk_mpll = { .name = "mpll", .id = -1, }; struct clk clk_upll = { struct clk clk_upll = { .name = "upll", .name = "upll", .id = -1, .id = -1, Loading @@ -232,7 +237,7 @@ struct clk clk_f = { .name = "fclk", .name = "fclk", .id = -1, .id = -1, .rate = 0, .rate = 0, .parent = NULL, .parent = &clk_mpll, .ctrlbit = 0, .ctrlbit = 0, }; }; Loading Loading @@ -263,14 +268,14 @@ struct clk clk_usb_bus = { static int s3c24xx_dclk_enable(struct clk *clk, int enable) static int s3c24xx_dclk_enable(struct clk *clk, int enable) { { unsigned long dclkcon = __raw_readl(S3C2410_DCLKCON); unsigned long dclkcon = __raw_readl(S3C24XX_DCLKCON); if (enable) if (enable) dclkcon |= clk->ctrlbit; dclkcon |= clk->ctrlbit; else else dclkcon &= ~clk->ctrlbit; dclkcon &= ~clk->ctrlbit; __raw_writel(dclkcon, S3C2410_DCLKCON); __raw_writel(dclkcon, S3C24XX_DCLKCON); return 0; return 0; } } Loading @@ -289,7 +294,7 @@ static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) clk->parent = parent; clk->parent = parent; dclkcon = __raw_readl(S3C2410_DCLKCON); dclkcon = __raw_readl(S3C24XX_DCLKCON); if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) { if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) { if (uclk) if (uclk) Loading @@ -303,7 +308,7 @@ static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK; dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK; } } __raw_writel(dclkcon, S3C2410_DCLKCON); __raw_writel(dclkcon, S3C24XX_DCLKCON); return 0; return 0; } } Loading Loading @@ -413,6 +418,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, clk_xtal.rate = xtal; clk_xtal.rate = xtal; clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); clk_mpll.rate = fclk; clk_h.rate = hclk; clk_h.rate = hclk; clk_p.rate = pclk; clk_p.rate = pclk; clk_f.rate = fclk; clk_f.rate = fclk; Loading @@ -424,6 +430,9 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, if (s3c24xx_register_clock(&clk_xtal) < 0) if (s3c24xx_register_clock(&clk_xtal) < 0) printk(KERN_ERR "failed to register master xtal\n"); printk(KERN_ERR "failed to register master xtal\n"); if (s3c24xx_register_clock(&clk_mpll) < 0) printk(KERN_ERR "failed to register mpll clock\n"); if (s3c24xx_register_clock(&clk_upll) < 0) if (s3c24xx_register_clock(&clk_upll) < 0) printk(KERN_ERR "failed to register upll clock\n"); printk(KERN_ERR "failed to register upll clock\n"); Loading arch/arm/mach-s3c2410/clock.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,9 @@ extern struct clk clk_usb_bus; extern struct clk clk_f; extern struct clk clk_f; extern struct clk clk_h; extern struct clk clk_h; extern struct clk clk_p; extern struct clk clk_p; extern struct clk clk_mpll; extern struct clk clk_upll; extern struct clk clk_upll; extern struct clk clk_xtal; /* exports for arch/arm/mach-s3c2410 /* exports for arch/arm/mach-s3c2410 * * Loading arch/arm/mach-s3c2410/cpu.c +34 −3 Original line number Original line Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include "clock.h" #include "clock.h" #include "s3c2400.h" #include "s3c2400.h" #include "s3c2410.h" #include "s3c2410.h" #include "s3c2412.h" #include "s3c244x.h" #include "s3c244x.h" #include "s3c2440.h" #include "s3c2440.h" #include "s3c2442.h" #include "s3c2442.h" Loading @@ -62,6 +63,7 @@ struct cpu_table { static const char name_s3c2400[] = "S3C2400"; static const char name_s3c2400[] = "S3C2400"; static const char name_s3c2410[] = "S3C2410"; static const char name_s3c2410[] = "S3C2410"; static const char name_s3c2412[] = "S3C2412"; static const char name_s3c2440[] = "S3C2440"; static const char name_s3c2440[] = "S3C2440"; static const char name_s3c2442[] = "S3C2442"; static const char name_s3c2442[] = "S3C2442"; static const char name_s3c2410a[] = "S3C2410A"; static const char name_s3c2410a[] = "S3C2410A"; Loading Loading @@ -113,6 +115,15 @@ static struct cpu_table cpu_ids[] __initdata = { .init = s3c2442_init, .init = s3c2442_init, .name = name_s3c2442 .name = name_s3c2442 }, }, { .idcode = 0x32412001, .idmask = 0xffffffff, .map_io = s3c2412_map_io, .init_clocks = s3c2412_init_clocks, .init_uarts = s3c2412_init_uarts, .init = s3c2412_init, .name = name_s3c2412, }, { { .idcode = 0x0, /* S3C2400 doesn't have an idcode */ .idcode = 0x0, /* S3C2400 doesn't have an idcode */ .idmask = 0xffffffff, .idmask = 0xffffffff, Loading Loading @@ -171,6 +182,24 @@ void s3c24xx_set_board(struct s3c24xx_board *b) static struct cpu_table *cpu; static struct cpu_table *cpu; static unsigned long s3c24xx_read_idcode_v5(void) { #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) return __raw_readl(S3C2412_GSTATUS1); #else return 1UL; /* don't look like an 2400 */ #endif } static unsigned long s3c24xx_read_idcode_v4(void) { #ifndef CONFIG_CPU_S3C2400 return __raw_readl(S3C2410_GSTATUS1); #else return 0UL; #endif } void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) { { unsigned long idcode = 0x0; unsigned long idcode = 0x0; Loading @@ -178,9 +207,11 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) /* initialise the io descriptors we need for initialisation */ /* initialise the io descriptors we need for initialisation */ iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); #ifndef CONFIG_CPU_S3C2400 if (cpu_architecture() >= CPU_ARCH_ARMv5) { idcode = __raw_readl(S3C2410_GSTATUS1); idcode = s3c24xx_read_idcode_v5(); #endif } else { idcode = s3c24xx_read_idcode_v4(); } cpu = s3c_lookup_cpu(idcode); cpu = s3c_lookup_cpu(idcode); Loading Loading
arch/arm/mach-s3c2410/Kconfig +20 −0 Original line number Original line Diff line number Diff line Loading @@ -81,6 +81,12 @@ config SMDK2440_CPU2442 depends on ARCH_S3C2440 depends on ARCH_S3C2440 select CPU_S3C2442 select CPU_S3C2442 config MACH_SMDK2413 bool "SMDK2413" select CPU_S3C2412 select MACH_SMDK help Say Y here if you are using an SMDK2413 config MACH_VR1000 config MACH_VR1000 bool "Thorcom VR1000" bool "Thorcom VR1000" Loading Loading @@ -127,6 +133,20 @@ config CPU_S3C2410 Support for S3C2410 and S3C2410A family from the S3C24XX line Support for S3C2410 and S3C2410A family from the S3C24XX line of Samsung Mobile CPUs. of Samsung Mobile CPUs. # internal node to signify if we are only dealing with an S3C2412 config CPU_S3C2412_ONLY bool depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \ !CPU_S3C2440 && !CPU_S3C2442 && CPU_S3C2412 default y if CPU_S3C2412 config CPU_S3C2412 bool depends on ARCH_S3C2410 help Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line config CPU_S3C244X config CPU_S3C244X bool bool depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442) depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442) Loading
arch/arm/mach-s3c2410/Makefile +6 −0 Original line number Original line Diff line number Diff line Loading @@ -24,6 +24,11 @@ obj-$(CONFIG_S3C2410_DMA) += dma.o obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o # S3C2412 support obj-$(CONFIG_CPU_S3C2412) += s3c2412.o obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o # # S3C244X support # S3C244X support obj-$(CONFIG_CPU_S3C244X) += s3c244x.o obj-$(CONFIG_CPU_S3C244X) += s3c244x.o Loading Loading @@ -57,6 +62,7 @@ obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o obj-$(CONFIG_MACH_N30) += mach-n30.o obj-$(CONFIG_MACH_N30) += mach-n30.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o Loading
arch/arm/mach-s3c2410/clock.c +15 −6 Original line number Original line Diff line number Diff line Loading @@ -213,7 +213,7 @@ EXPORT_SYMBOL(clk_set_parent); /* base clocks */ /* base clocks */ static struct clk clk_xtal = { struct clk clk_xtal = { .name = "xtal", .name = "xtal", .id = -1, .id = -1, .rate = 0, .rate = 0, Loading @@ -221,6 +221,11 @@ static struct clk clk_xtal = { .ctrlbit = 0, .ctrlbit = 0, }; }; struct clk clk_mpll = { .name = "mpll", .id = -1, }; struct clk clk_upll = { struct clk clk_upll = { .name = "upll", .name = "upll", .id = -1, .id = -1, Loading @@ -232,7 +237,7 @@ struct clk clk_f = { .name = "fclk", .name = "fclk", .id = -1, .id = -1, .rate = 0, .rate = 0, .parent = NULL, .parent = &clk_mpll, .ctrlbit = 0, .ctrlbit = 0, }; }; Loading Loading @@ -263,14 +268,14 @@ struct clk clk_usb_bus = { static int s3c24xx_dclk_enable(struct clk *clk, int enable) static int s3c24xx_dclk_enable(struct clk *clk, int enable) { { unsigned long dclkcon = __raw_readl(S3C2410_DCLKCON); unsigned long dclkcon = __raw_readl(S3C24XX_DCLKCON); if (enable) if (enable) dclkcon |= clk->ctrlbit; dclkcon |= clk->ctrlbit; else else dclkcon &= ~clk->ctrlbit; dclkcon &= ~clk->ctrlbit; __raw_writel(dclkcon, S3C2410_DCLKCON); __raw_writel(dclkcon, S3C24XX_DCLKCON); return 0; return 0; } } Loading @@ -289,7 +294,7 @@ static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) clk->parent = parent; clk->parent = parent; dclkcon = __raw_readl(S3C2410_DCLKCON); dclkcon = __raw_readl(S3C24XX_DCLKCON); if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) { if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) { if (uclk) if (uclk) Loading @@ -303,7 +308,7 @@ static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK; dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK; } } __raw_writel(dclkcon, S3C2410_DCLKCON); __raw_writel(dclkcon, S3C24XX_DCLKCON); return 0; return 0; } } Loading Loading @@ -413,6 +418,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, clk_xtal.rate = xtal; clk_xtal.rate = xtal; clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); clk_mpll.rate = fclk; clk_h.rate = hclk; clk_h.rate = hclk; clk_p.rate = pclk; clk_p.rate = pclk; clk_f.rate = fclk; clk_f.rate = fclk; Loading @@ -424,6 +430,9 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, if (s3c24xx_register_clock(&clk_xtal) < 0) if (s3c24xx_register_clock(&clk_xtal) < 0) printk(KERN_ERR "failed to register master xtal\n"); printk(KERN_ERR "failed to register master xtal\n"); if (s3c24xx_register_clock(&clk_mpll) < 0) printk(KERN_ERR "failed to register mpll clock\n"); if (s3c24xx_register_clock(&clk_upll) < 0) if (s3c24xx_register_clock(&clk_upll) < 0) printk(KERN_ERR "failed to register upll clock\n"); printk(KERN_ERR "failed to register upll clock\n"); Loading
arch/arm/mach-s3c2410/clock.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,9 @@ extern struct clk clk_usb_bus; extern struct clk clk_f; extern struct clk clk_f; extern struct clk clk_h; extern struct clk clk_h; extern struct clk clk_p; extern struct clk clk_p; extern struct clk clk_mpll; extern struct clk clk_upll; extern struct clk clk_upll; extern struct clk clk_xtal; /* exports for arch/arm/mach-s3c2410 /* exports for arch/arm/mach-s3c2410 * * Loading
arch/arm/mach-s3c2410/cpu.c +34 −3 Original line number Original line Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include "clock.h" #include "clock.h" #include "s3c2400.h" #include "s3c2400.h" #include "s3c2410.h" #include "s3c2410.h" #include "s3c2412.h" #include "s3c244x.h" #include "s3c244x.h" #include "s3c2440.h" #include "s3c2440.h" #include "s3c2442.h" #include "s3c2442.h" Loading @@ -62,6 +63,7 @@ struct cpu_table { static const char name_s3c2400[] = "S3C2400"; static const char name_s3c2400[] = "S3C2400"; static const char name_s3c2410[] = "S3C2410"; static const char name_s3c2410[] = "S3C2410"; static const char name_s3c2412[] = "S3C2412"; static const char name_s3c2440[] = "S3C2440"; static const char name_s3c2440[] = "S3C2440"; static const char name_s3c2442[] = "S3C2442"; static const char name_s3c2442[] = "S3C2442"; static const char name_s3c2410a[] = "S3C2410A"; static const char name_s3c2410a[] = "S3C2410A"; Loading Loading @@ -113,6 +115,15 @@ static struct cpu_table cpu_ids[] __initdata = { .init = s3c2442_init, .init = s3c2442_init, .name = name_s3c2442 .name = name_s3c2442 }, }, { .idcode = 0x32412001, .idmask = 0xffffffff, .map_io = s3c2412_map_io, .init_clocks = s3c2412_init_clocks, .init_uarts = s3c2412_init_uarts, .init = s3c2412_init, .name = name_s3c2412, }, { { .idcode = 0x0, /* S3C2400 doesn't have an idcode */ .idcode = 0x0, /* S3C2400 doesn't have an idcode */ .idmask = 0xffffffff, .idmask = 0xffffffff, Loading Loading @@ -171,6 +182,24 @@ void s3c24xx_set_board(struct s3c24xx_board *b) static struct cpu_table *cpu; static struct cpu_table *cpu; static unsigned long s3c24xx_read_idcode_v5(void) { #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) return __raw_readl(S3C2412_GSTATUS1); #else return 1UL; /* don't look like an 2400 */ #endif } static unsigned long s3c24xx_read_idcode_v4(void) { #ifndef CONFIG_CPU_S3C2400 return __raw_readl(S3C2410_GSTATUS1); #else return 0UL; #endif } void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) { { unsigned long idcode = 0x0; unsigned long idcode = 0x0; Loading @@ -178,9 +207,11 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) /* initialise the io descriptors we need for initialisation */ /* initialise the io descriptors we need for initialisation */ iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); #ifndef CONFIG_CPU_S3C2400 if (cpu_architecture() >= CPU_ARCH_ARMv5) { idcode = __raw_readl(S3C2410_GSTATUS1); idcode = s3c24xx_read_idcode_v5(); #endif } else { idcode = s3c24xx_read_idcode_v4(); } cpu = s3c_lookup_cpu(idcode); cpu = s3c_lookup_cpu(idcode); Loading