aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-12 15:31:43 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-12 15:31:43 -0400
commit529284a0b649499351495949d05fa3359121cbae (patch)
tree9b33459a8f720313eeee469bfe18eeb5052246d2
parentbe521466feb3bb1cd89de82a2b1d080e9ebd3cb6 (diff)
parent1dee79087c8b0f3239a2979f61ed92c7a5361b08 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 4263/1: fix IXP4XX_NPE[ABC]_BASE_VIRT address [ARM] 4256/1: i.MX/MX1 SDHC fix/workaround of SD card recognition problems [ARM] 4255/1: i.MX/MX1 Correct MPU PLL reference clock value. [ARM] 4254/1: i.MX/MX1 CPU Frequency scaling honor boot loader set BCLK_DIV. [ARM] 4251/1: Fix sharpsl_pm dependency [ARM] 4250/1: Fix locomo backlight conversion error/compile failure [ARM] 4249/1: Fix tosa compile failure [ARM] 4248/1: lh7a40x: fix missing definitions for get_irqnr_preamble [ARM] 4247/1: Fix long name for cc9p9360dev ARM: OMAP: Fix OMAP2 dss2 so clk_set_parent works ARM: OMAP: Fix missing workqueue include in board-h2.c ARM: OMAP: Include missing header
-rw-r--r--arch/arm/common/Kconfig1
-rw-r--r--arch/arm/mach-imx/cpufreq.c15
-rw-r--r--arch/arm/mach-imx/generic.c9
-rw-r--r--arch/arm/mach-ns9xxx/mach-cc9p9360dev.c2
-rw-r--r--arch/arm/mach-omap1/board-h2.c1
-rw-r--r--arch/arm/mach-omap2/clock.c1
-rw-r--r--arch/arm/mach-omap2/clock.h3
-rw-r--r--arch/arm/mach-pxa/tosa.c3
-rw-r--r--drivers/mmc/imxmmc.c13
-rw-r--r--drivers/video/backlight/locomolcd.c4
-rw-r--r--include/asm-arm/arch-ixp4xx/ixp4xx-regs.h6
-rw-r--r--include/asm-arm/arch-lh7a40x/entry-macro.S12
12 files changed, 50 insertions, 20 deletions
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
index 5e34ca6d38b6..3e073467caca 100644
--- a/arch/arm/common/Kconfig
+++ b/arch/arm/common/Kconfig
@@ -28,6 +28,7 @@ config SHARP_PARAM
28 28
29config SHARPSL_PM 29config SHARPSL_PM
30 bool 30 bool
31 select APM_EMULATION
31 32
32config SHARP_SCOOP 33config SHARP_SCOOP
33 bool 34 bool
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c
index 4f66e90db74f..7e70e0b0b989 100644
--- a/arch/arm/mach-imx/cpufreq.c
+++ b/arch/arm/mach-imx/cpufreq.c
@@ -50,6 +50,7 @@
50#define CR_920T_ASYNC_MODE 0xC0000000 50#define CR_920T_ASYNC_MODE 0xC0000000
51 51
52static u32 mpctl0_at_boot; 52static u32 mpctl0_at_boot;
53static u32 bclk_div_at_boot;
53 54
54static void imx_set_async_mode(void) 55static void imx_set_async_mode(void)
55{ 56{
@@ -82,13 +83,13 @@ static void imx_set_mpctl0(u32 mpctl0)
82 * imx_compute_mpctl - compute new PLL parameters 83 * imx_compute_mpctl - compute new PLL parameters
83 * @new_mpctl: pointer to location assigned by new PLL control register value 84 * @new_mpctl: pointer to location assigned by new PLL control register value
84 * @cur_mpctl: current PLL control register parameters 85 * @cur_mpctl: current PLL control register parameters
86 * @f_ref: reference source frequency Hz
85 * @freq: required frequency in Hz 87 * @freq: required frequency in Hz
86 * @relation: is one of %CPUFREQ_RELATION_L (supremum) 88 * @relation: is one of %CPUFREQ_RELATION_L (supremum)
87 * and %CPUFREQ_RELATION_H (infimum) 89 * and %CPUFREQ_RELATION_H (infimum)
88 */ 90 */
89long imx_compute_mpctl(u32 *new_mpctl, u32 cur_mpctl, unsigned long freq, int relation) 91long imx_compute_mpctl(u32 *new_mpctl, u32 cur_mpctl, u32 f_ref, unsigned long freq, int relation)
90{ 92{
91 u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512);
92 u32 mfi; 93 u32 mfi;
93 u32 mfn; 94 u32 mfn;
94 u32 mfd; 95 u32 mfd;
@@ -182,7 +183,7 @@ static int imx_set_target(struct cpufreq_policy *policy,
182 unsigned long flags; 183 unsigned long flags;
183 long freq; 184 long freq;
184 long sysclk; 185 long sysclk;
185 unsigned int bclk_div = 1; 186 unsigned int bclk_div = bclk_div_at_boot;
186 187
187 /* 188 /*
188 * Some governors do not respects CPU and policy lower limits 189 * Some governors do not respects CPU and policy lower limits
@@ -202,8 +203,8 @@ static int imx_set_target(struct cpufreq_policy *policy,
202 203
203 sysclk = imx_get_system_clk(); 204 sysclk = imx_get_system_clk();
204 205
205 if (freq > sysclk + 1000000) { 206 if (freq > sysclk / bclk_div_at_boot + 1000000) {
206 freq = imx_compute_mpctl(&mpctl0, mpctl0_at_boot, freq, relation); 207 freq = imx_compute_mpctl(&mpctl0, mpctl0_at_boot, CLK32 * 512, freq, relation);
207 if (freq < 0) { 208 if (freq < 0) {
208 printk(KERN_WARNING "imx: target frequency %ld Hz cannot be set\n", freq); 209 printk(KERN_WARNING "imx: target frequency %ld Hz cannot be set\n", freq);
209 return -EINVAL; 210 return -EINVAL;
@@ -217,6 +218,8 @@ static int imx_set_target(struct cpufreq_policy *policy,
217 218
218 if(bclk_div > 16) 219 if(bclk_div > 16)
219 bclk_div = 16; 220 bclk_div = 16;
221 if(bclk_div < bclk_div_at_boot)
222 bclk_div = bclk_div_at_boot;
220 } 223 }
221 freq = (sysclk + bclk_div / 2) / bclk_div; 224 freq = (sysclk + bclk_div / 2) / bclk_div;
222 } 225 }
@@ -285,7 +288,7 @@ static struct cpufreq_driver imx_driver = {
285 288
286static int __init imx_cpufreq_init(void) 289static int __init imx_cpufreq_init(void)
287{ 290{
288 291 bclk_div_at_boot = __mfld2val(CSCR_BCLK_DIV, CSCR) + 1;
289 mpctl0_at_boot = 0; 292 mpctl0_at_boot = 0;
290 293
291 if((CSCR & CSCR_MPEN) && 294 if((CSCR & CSCR_MPEN) &&
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index b5aa49d00ca3..7a7fa51ec62c 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -102,7 +102,7 @@ EXPORT_SYMBOL(imx_gpio_mode);
102 * f = 2 * f_ref * -------------------- 102 * f = 2 * f_ref * --------------------
103 * pd + 1 103 * pd + 1
104 */ 104 */
105static unsigned int imx_decode_pll(unsigned int pll) 105static unsigned int imx_decode_pll(unsigned int pll, u32 f_ref)
106{ 106{
107 unsigned long long ll; 107 unsigned long long ll;
108 unsigned long quot; 108 unsigned long quot;
@@ -111,7 +111,6 @@ static unsigned int imx_decode_pll(unsigned int pll)
111 u32 mfn = pll & 0x3ff; 111 u32 mfn = pll & 0x3ff;
112 u32 mfd = (pll >> 16) & 0x3ff; 112 u32 mfd = (pll >> 16) & 0x3ff;
113 u32 pd = (pll >> 26) & 0xf; 113 u32 pd = (pll >> 26) & 0xf;
114 u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512);
115 114
116 mfi = mfi <= 5 ? 5 : mfi; 115 mfi = mfi <= 5 ? 5 : mfi;
117 116
@@ -124,13 +123,15 @@ static unsigned int imx_decode_pll(unsigned int pll)
124 123
125unsigned int imx_get_system_clk(void) 124unsigned int imx_get_system_clk(void)
126{ 125{
127 return imx_decode_pll(SPCTL0); 126 u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512);
127
128 return imx_decode_pll(SPCTL0, f_ref);
128} 129}
129EXPORT_SYMBOL(imx_get_system_clk); 130EXPORT_SYMBOL(imx_get_system_clk);
130 131
131unsigned int imx_get_mcu_clk(void) 132unsigned int imx_get_mcu_clk(void)
132{ 133{
133 return imx_decode_pll(MPCTL0); 134 return imx_decode_pll(MPCTL0, CLK32 * 512);
134} 135}
135EXPORT_SYMBOL(imx_get_mcu_clk); 136EXPORT_SYMBOL(imx_get_mcu_clk);
136 137
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
index a193dd931512..760c9d0db7c3 100644
--- a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
+++ b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
@@ -32,7 +32,7 @@ static void __init mach_cc9p9360dev_init_machine(void)
32 board_a9m9750dev_init_machine(); 32 board_a9m9750dev_init_machine();
33} 33}
34 34
35MACHINE_START(CC9P9360DEV, "Connect Core 9P 9360 on an A9M9750 Devboard") 35MACHINE_START(CC9P9360DEV, "Digi ConnectCore 9P 9360 on an A9M9750 Devboard")
36 .map_io = mach_cc9p9360dev_map_io, 36 .map_io = mach_cc9p9360dev_map_io,
37 .init_irq = mach_cc9p9360dev_init_irq, 37 .init_irq = mach_cc9p9360dev_init_irq,
38 .init_machine = mach_cc9p9360dev_init_machine, 38 .init_machine = mach_cc9p9360dev_init_machine,
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 6e113078f7ab..ad519390dd58 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -27,6 +27,7 @@
27#include <linux/mtd/nand.h> 27#include <linux/mtd/nand.h>
28#include <linux/mtd/partitions.h> 28#include <linux/mtd/partitions.h>
29#include <linux/input.h> 29#include <linux/input.h>
30#include <linux/workqueue.h>
30 31
31#include <asm/hardware.h> 32#include <asm/hardware.h>
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 0de201c3d50b..5170481afeab 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -27,6 +27,7 @@
27 27
28#include <asm/arch/clock.h> 28#include <asm/arch/clock.h>
29#include <asm/arch/sram.h> 29#include <asm/arch/sram.h>
30#include <asm/div64.h>
30 31
31#include "prcm-regs.h" 32#include "prcm-regs.h"
32#include "memory.h" 33#include "memory.h"
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 8816f5a33a28..162978fd5359 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -1013,7 +1013,8 @@ static struct clk dss2_fck = { /* Alt clk used in power management */
1013 .name = "dss2_fck", 1013 .name = "dss2_fck",
1014 .parent = &sys_ck, /* fixed at sys_ck or 48MHz */ 1014 .parent = &sys_ck, /* fixed at sys_ck or 48MHz */
1015 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 1015 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1016 RATE_CKCTL | CM_CORE_SEL1 | RATE_FIXED, 1016 RATE_CKCTL | CM_CORE_SEL1 | RATE_FIXED |
1017 DELAYED_APP,
1017 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE, 1018 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1018 .enable_bit = 1, 1019 .enable_bit = 1,
1019 .src_offset = 13, 1020 .src_offset = 13,
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 7915a5a22865..72738771fb57 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -28,6 +28,7 @@
28#include <asm/hardware.h> 28#include <asm/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/arch/pxa-regs.h>
31#include <asm/arch/irda.h> 32#include <asm/arch/irda.h>
32#include <asm/arch/mmc.h> 33#include <asm/arch/mmc.h>
33#include <asm/arch/udc.h> 34#include <asm/arch/udc.h>
@@ -35,8 +36,6 @@
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 37#include <asm/mach/map.h>
37#include <asm/mach/irq.h> 38#include <asm/mach/irq.h>
38
39#include <asm/arch/pxa-regs.h>
40#include <asm/arch/tosa.h> 39#include <asm/arch/tosa.h>
41 40
42#include <asm/hardware/scoop.h> 41#include <asm/hardware/scoop.h>
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c
index b060d4bfba29..0de5c9e94e74 100644
--- a/drivers/mmc/imxmmc.c
+++ b/drivers/mmc/imxmmc.c
@@ -569,10 +569,12 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat)
569 569
570 if(host->dma_dir == DMA_FROM_DEVICE) { 570 if(host->dma_dir == DMA_FROM_DEVICE) {
571 imxmci_busy_wait_for_status(host, &stat, 571 imxmci_busy_wait_for_status(host, &stat,
572 STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, 572 STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE |
573 STATUS_TIME_OUT_READ,
573 50, "imxmci_cpu_driven_data read"); 574 50, "imxmci_cpu_driven_data read");
574 575
575 while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && 576 while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) &&
577 !(stat & STATUS_TIME_OUT_READ) &&
576 (host->data_cnt < 512)) { 578 (host->data_cnt < 512)) {
577 579
578 udelay(20); /* required for clocks < 8MHz*/ 580 udelay(20); /* required for clocks < 8MHz*/
@@ -602,6 +604,12 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat)
602 if(host->dma_size & 0x1ff) 604 if(host->dma_size & 0x1ff)
603 stat &= ~STATUS_CRC_READ_ERR; 605 stat &= ~STATUS_CRC_READ_ERR;
604 606
607 if(stat & STATUS_TIME_OUT_READ) {
608 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read timeout STATUS = 0x%x\n",
609 stat);
610 trans_done = -1;
611 }
612
605 } else { 613 } else {
606 imxmci_busy_wait_for_status(host, &stat, 614 imxmci_busy_wait_for_status(host, &stat,
607 STATUS_APPL_BUFF_FE, 615 STATUS_APPL_BUFF_FE,
@@ -709,6 +717,9 @@ static void imxmci_tasklet_fnc(unsigned long data)
709 */ 717 */
710 stat |= host->status_reg; 718 stat |= host->status_reg;
711 719
720 if(test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events))
721 stat &= ~STATUS_CRC_READ_ERR;
722
712 if(test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { 723 if(test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) {
713 imxmci_busy_wait_for_status(host, &stat, 724 imxmci_busy_wait_for_status(host, &stat,
714 STATUS_END_CMD_RESP | STATUS_ERR_MASK, 725 STATUS_END_CMD_RESP | STATUS_ERR_MASK,
diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c
index d1312477813e..6b488b8a7eee 100644
--- a/drivers/video/backlight/locomolcd.c
+++ b/drivers/video/backlight/locomolcd.c
@@ -199,8 +199,8 @@ static int locomolcd_remove(struct locomo_dev *dev)
199{ 199{
200 unsigned long flags; 200 unsigned long flags;
201 201
202 locomobl_data.brightness = 0; 202 locomolcd_bl_device->props.brightness = 0;
203 locomobl_data.power = 0; 203 locomolcd_bl_device->props.power = 0;
204 locomolcd_set_intensity(locomolcd_bl_device); 204 locomolcd_set_intensity(locomolcd_bl_device);
205 205
206 backlight_device_unregister(locomolcd_bl_device); 206 backlight_device_unregister(locomolcd_bl_device);
diff --git a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
index 9444958bec1e..ed35e5c94f40 100644
--- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
@@ -144,9 +144,9 @@
144#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000) 144#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000)
145#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000) 145#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000)
146#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000) 146#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
147#define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000) 147#define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x6000)
148#define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000) 148#define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x7000)
149#define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000) 149#define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x8000)
150#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000) 150#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000)
151#define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000) 151#define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000)
152#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000) 152#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S
index 502700604e00..ffe397250f0c 100644
--- a/include/asm-arm/arch-lh7a40x/entry-macro.S
+++ b/include/asm-arm/arch-lh7a40x/entry-macro.S
@@ -86,6 +86,12 @@ branch_irq_lh7a400: b 1000f
86 .macro disable_fiq 86 .macro disable_fiq
87 .endm 87 .endm
88 88
89 .macro get_irqnr_preamble, base, tmp
90 .endm
91
92 .macro arch_ret_to_user, tmp1, tmp2
93 .endm
94
89 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 95 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
90 mov \irqnr, #0 96 mov \irqnr, #0
91 mov \base, #io_p2v(0x80000000) @ APB registers 97 mov \base, #io_p2v(0x80000000) @ APB registers
@@ -105,6 +111,12 @@ branch_irq_lh7a400: b 1000f
105 .macro disable_fiq 111 .macro disable_fiq
106 .endm 112 .endm
107 113
114 .macro get_irqnr_preamble, base, tmp
115 .endm
116
117 .macro arch_ret_to_user, tmp1, tmp2
118 .endm
119
108 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 120 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
109 mov \irqnr, #0 @ VIC1 irq base 121 mov \irqnr, #0 @ VIC1 irq base
110 mov \base, #io_p2v(0x80000000) @ APB registers 122 mov \base, #io_p2v(0x80000000) @ APB registers