diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-21 15:23:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-21 15:23:07 -0400 |
commit | 2c86c83bf4e7fa1ef0d625e297607dc5d0d94dd4 (patch) | |
tree | fe1fca67f5cac43036bc7ee75283807446c634c9 | |
parent | cffc7b38a23960d5f83b0aec5e67f189a6ae8062 (diff) | |
parent | d18566376055046fca0b51ad536f1778ef34966a (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
-rw-r--r-- | arch/arm/mach-integrator/impd1.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 6 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/regs-clock.h | 21 |
4 files changed, 48 insertions, 14 deletions
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index c3c2f17d030e..a1b153d1626c 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -67,7 +67,7 @@ static void impd1_setvco(struct clk *clk, struct icst525_vco vco) | |||
67 | } | 67 | } |
68 | writel(0, impd1->base + IMPD1_LOCK); | 68 | writel(0, impd1->base + IMPD1_LOCK); |
69 | 69 | ||
70 | #if DEBUG | 70 | #ifdef DEBUG |
71 | vco.v = val & 0x1ff; | 71 | vco.v = val & 0x1ff; |
72 | vco.r = (val >> 9) & 0x7f; | 72 | vco.r = (val >> 9) & 0x7f; |
73 | vco.s = (val >> 16) & 7; | 73 | vco.s = (val >> 16) & 7; |
@@ -427,17 +427,18 @@ static int impd1_probe(struct lm_device *dev) | |||
427 | return ret; | 427 | return ret; |
428 | } | 428 | } |
429 | 429 | ||
430 | static int impd1_remove_one(struct device *dev, void *data) | ||
431 | { | ||
432 | device_unregister(dev); | ||
433 | return 0; | ||
434 | } | ||
435 | |||
430 | static void impd1_remove(struct lm_device *dev) | 436 | static void impd1_remove(struct lm_device *dev) |
431 | { | 437 | { |
432 | struct impd1_module *impd1 = lm_get_drvdata(dev); | 438 | struct impd1_module *impd1 = lm_get_drvdata(dev); |
433 | struct list_head *l, *n; | ||
434 | int i; | 439 | int i; |
435 | 440 | ||
436 | list_for_each_safe(l, n, &dev->dev.children) { | 441 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); |
437 | struct device *d = list_to_dev(l); | ||
438 | |||
439 | device_unregister(d); | ||
440 | } | ||
441 | 442 | ||
442 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) | 443 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) |
443 | clk_unregister(&impd1->vcos[i]); | 444 | clk_unregister(&impd1->vcos[i]); |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index d327c127eddb..1d7677669a76 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -250,6 +250,25 @@ void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) | |||
250 | i2c_device.dev.platform_data = info; | 250 | i2c_device.dev.platform_data = info; |
251 | } | 251 | } |
252 | 252 | ||
253 | static struct resource i2s_resources[] = { | ||
254 | { | ||
255 | .start = 0x40400000, | ||
256 | .end = 0x40400083, | ||
257 | .flags = IORESOURCE_MEM, | ||
258 | }, { | ||
259 | .start = IRQ_I2S, | ||
260 | .end = IRQ_I2S, | ||
261 | .flags = IORESOURCE_IRQ, | ||
262 | }, | ||
263 | }; | ||
264 | |||
265 | static struct platform_device i2s_device = { | ||
266 | .name = "pxa2xx-i2s", | ||
267 | .id = -1, | ||
268 | .resource = i2c_resources, | ||
269 | .num_resources = ARRAY_SIZE(i2s_resources), | ||
270 | }; | ||
271 | |||
253 | static struct platform_device *devices[] __initdata = { | 272 | static struct platform_device *devices[] __initdata = { |
254 | &pxamci_device, | 273 | &pxamci_device, |
255 | &udc_device, | 274 | &udc_device, |
@@ -258,6 +277,7 @@ static struct platform_device *devices[] __initdata = { | |||
258 | &btuart_device, | 277 | &btuart_device, |
259 | &stuart_device, | 278 | &stuart_device, |
260 | &i2c_device, | 279 | &i2c_device, |
280 | &i2s_device, | ||
261 | }; | 281 | }; |
262 | 282 | ||
263 | static int __init pxa_init(void) | 283 | static int __init pxa_init(void) |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 8ca955984645..7b51bfd0ba6d 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -307,9 +307,9 @@ static void bast_nand_select(struct s3c2410_nand_set *set, int slot) | |||
307 | } | 307 | } |
308 | 308 | ||
309 | static struct s3c2410_platform_nand bast_nand_info = { | 309 | static struct s3c2410_platform_nand bast_nand_info = { |
310 | .tacls = 40, | 310 | .tacls = 30, |
311 | .twrph0 = 80, | 311 | .twrph0 = 60, |
312 | .twrph1 = 80, | 312 | .twrph1 = 60, |
313 | .nr_sets = ARRAY_SIZE(bast_nand_sets), | 313 | .nr_sets = ARRAY_SIZE(bast_nand_sets), |
314 | .sets = bast_nand_sets, | 314 | .sets = bast_nand_sets, |
315 | .select_chip = bast_nand_select, | 315 | .select_chip = bast_nand_select, |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index 16f4c3cc1388..34360706e016 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -18,7 +18,9 @@ | |||
18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) | 18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) |
19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA | 19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA |
20 | * 27-Aug-2005 Ben Dooks Add clock-slow info | 20 | * 27-Aug-2005 Ben Dooks Add clock-slow info |
21 | */ | 21 | * 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat) |
22 | * 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat) | ||
23 | */ | ||
22 | 24 | ||
23 | #ifndef __ASM_ARM_REGS_CLOCK | 25 | #ifndef __ASM_ARM_REGS_CLOCK |
24 | #define __ASM_ARM_REGS_CLOCK "$Id: clock.h,v 1.4 2003/04/30 14:50:51 ben Exp $" | 26 | #define __ASM_ARM_REGS_CLOCK "$Id: clock.h,v 1.4 2003/04/30 14:50:51 ben Exp $" |
@@ -66,11 +68,16 @@ | |||
66 | #define S3C2410_DCLKCON_DCLK0_UCLK (1<<1) | 68 | #define S3C2410_DCLKCON_DCLK0_UCLK (1<<1) |
67 | #define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4) | 69 | #define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4) |
68 | #define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8) | 70 | #define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8) |
71 | #define S3C2410_DCLKCON_DCLK0_DIV_MASK ((0xf)<<4) | ||
72 | #define S3C2410_DCLKCON_DCLK0_CMP_MASK ((0xf)<<8) | ||
69 | 73 | ||
70 | #define S3C2410_DCLKCON_DCLK1EN (1<<16) | 74 | #define S3C2410_DCLKCON_DCLK1EN (1<<16) |
71 | #define S3C2410_DCLKCON_DCLK1_PCLK (0<<17) | 75 | #define S3C2410_DCLKCON_DCLK1_PCLK (0<<17) |
72 | #define S3C2410_DCLKCON_DCLK1_UCLK (1<<17) | 76 | #define S3C2410_DCLKCON_DCLK1_UCLK (1<<17) |
73 | #define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20) | 77 | #define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20) |
78 | #define S3C2410_DCLKCON_DCLK1_CMP(x) (((x) - 1) <<24) | ||
79 | #define S3C2410_DCLKCON_DCLK1_DIV_MASK ((0xf) <<20) | ||
80 | #define S3C2410_DCLKCON_DCLK1_CMP_MASK ((0xf) <<24) | ||
74 | 81 | ||
75 | #define S3C2410_CLKDIVN_PDIVN (1<<0) | 82 | #define S3C2410_CLKDIVN_PDIVN (1<<0) |
76 | #define S3C2410_CLKDIVN_HDIVN (1<<1) | 83 | #define S3C2410_CLKDIVN_HDIVN (1<<1) |
@@ -83,10 +90,13 @@ | |||
83 | 90 | ||
84 | #ifndef __ASSEMBLY__ | 91 | #ifndef __ASSEMBLY__ |
85 | 92 | ||
93 | #include <asm/div64.h> | ||
94 | |||
86 | static inline unsigned int | 95 | static inline unsigned int |
87 | s3c2410_get_pll(int pllval, int baseclk) | 96 | s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) |
88 | { | 97 | { |
89 | int mdiv, pdiv, sdiv; | 98 | unsigned int mdiv, pdiv, sdiv; |
99 | uint64_t fvco; | ||
90 | 100 | ||
91 | mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT; | 101 | mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT; |
92 | pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT; | 102 | pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT; |
@@ -96,7 +106,10 @@ s3c2410_get_pll(int pllval, int baseclk) | |||
96 | pdiv &= S3C2410_PLLCON_PDIVMASK; | 106 | pdiv &= S3C2410_PLLCON_PDIVMASK; |
97 | sdiv &= S3C2410_PLLCON_SDIVMASK; | 107 | sdiv &= S3C2410_PLLCON_SDIVMASK; |
98 | 108 | ||
99 | return (baseclk * (mdiv + 8)) / ((pdiv + 2) << sdiv); | 109 | fvco = (uint64_t)baseclk * (mdiv + 8); |
110 | do_div(fvco, (pdiv + 2) << sdiv); | ||
111 | |||
112 | return (unsigned int)fvco; | ||
100 | } | 113 | } |
101 | 114 | ||
102 | #endif /* __ASSEMBLY__ */ | 115 | #endif /* __ASSEMBLY__ */ |