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

+50 -20
+1
arch/arm/common/Kconfig
··· 28 29 config SHARPSL_PM 30 bool 31 32 config SHARP_SCOOP 33 bool
··· 28 29 config SHARPSL_PM 30 bool 31 + select APM_EMULATION 32 33 config SHARP_SCOOP 34 bool
+9 -6
arch/arm/mach-imx/cpufreq.c
··· 50 #define CR_920T_ASYNC_MODE 0xC0000000 51 52 static u32 mpctl0_at_boot; 53 54 static void imx_set_async_mode(void) 55 { ··· 83 * imx_compute_mpctl - compute new PLL parameters 84 * @new_mpctl: pointer to location assigned by new PLL control register value 85 * @cur_mpctl: current PLL control register parameters 86 * @freq: required frequency in Hz 87 * @relation: is one of %CPUFREQ_RELATION_L (supremum) 88 * and %CPUFREQ_RELATION_H (infimum) 89 */ 90 - long imx_compute_mpctl(u32 *new_mpctl, u32 cur_mpctl, unsigned long freq, int relation) 91 { 92 - u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512); 93 u32 mfi; 94 u32 mfn; 95 u32 mfd; ··· 183 unsigned long flags; 184 long freq; 185 long sysclk; 186 - unsigned int bclk_div = 1; 187 188 /* 189 * Some governors do not respects CPU and policy lower limits ··· 203 204 sysclk = imx_get_system_clk(); 205 206 - if (freq > sysclk + 1000000) { 207 - freq = imx_compute_mpctl(&mpctl0, mpctl0_at_boot, freq, relation); 208 if (freq < 0) { 209 printk(KERN_WARNING "imx: target frequency %ld Hz cannot be set\n", freq); 210 return -EINVAL; ··· 218 219 if(bclk_div > 16) 220 bclk_div = 16; 221 } 222 freq = (sysclk + bclk_div / 2) / bclk_div; 223 } ··· 288 289 static int __init imx_cpufreq_init(void) 290 { 291 - 292 mpctl0_at_boot = 0; 293 294 if((CSCR & CSCR_MPEN) &&
··· 50 #define CR_920T_ASYNC_MODE 0xC0000000 51 52 static u32 mpctl0_at_boot; 53 + static u32 bclk_div_at_boot; 54 55 static void imx_set_async_mode(void) 56 { ··· 82 * imx_compute_mpctl - compute new PLL parameters 83 * @new_mpctl: pointer to location assigned by new PLL control register value 84 * @cur_mpctl: current PLL control register parameters 85 + * @f_ref: reference source frequency Hz 86 * @freq: required frequency in Hz 87 * @relation: is one of %CPUFREQ_RELATION_L (supremum) 88 * and %CPUFREQ_RELATION_H (infimum) 89 */ 90 + long imx_compute_mpctl(u32 *new_mpctl, u32 cur_mpctl, u32 f_ref, unsigned long freq, int relation) 91 { 92 u32 mfi; 93 u32 mfn; 94 u32 mfd; ··· 182 unsigned long flags; 183 long freq; 184 long sysclk; 185 + unsigned int bclk_div = bclk_div_at_boot; 186 187 /* 188 * Some governors do not respects CPU and policy lower limits ··· 202 203 sysclk = imx_get_system_clk(); 204 205 + if (freq > sysclk / bclk_div_at_boot + 1000000) { 206 + freq = imx_compute_mpctl(&mpctl0, mpctl0_at_boot, CLK32 * 512, freq, relation); 207 if (freq < 0) { 208 printk(KERN_WARNING "imx: target frequency %ld Hz cannot be set\n", freq); 209 return -EINVAL; ··· 217 218 if(bclk_div > 16) 219 bclk_div = 16; 220 + if(bclk_div < bclk_div_at_boot) 221 + bclk_div = bclk_div_at_boot; 222 } 223 freq = (sysclk + bclk_div / 2) / bclk_div; 224 } ··· 285 286 static int __init imx_cpufreq_init(void) 287 { 288 + bclk_div_at_boot = __mfld2val(CSCR_BCLK_DIV, CSCR) + 1; 289 mpctl0_at_boot = 0; 290 291 if((CSCR & CSCR_MPEN) &&
+5 -4
arch/arm/mach-imx/generic.c
··· 102 * f = 2 * f_ref * -------------------- 103 * pd + 1 104 */ 105 - static unsigned int imx_decode_pll(unsigned int pll) 106 { 107 unsigned long long ll; 108 unsigned long quot; ··· 111 u32 mfn = pll & 0x3ff; 112 u32 mfd = (pll >> 16) & 0x3ff; 113 u32 pd = (pll >> 26) & 0xf; 114 - u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512); 115 116 mfi = mfi <= 5 ? 5 : mfi; 117 ··· 123 124 unsigned int imx_get_system_clk(void) 125 { 126 - return imx_decode_pll(SPCTL0); 127 } 128 EXPORT_SYMBOL(imx_get_system_clk); 129 130 unsigned int imx_get_mcu_clk(void) 131 { 132 - return imx_decode_pll(MPCTL0); 133 } 134 EXPORT_SYMBOL(imx_get_mcu_clk); 135
··· 102 * f = 2 * f_ref * -------------------- 103 * pd + 1 104 */ 105 + static unsigned int imx_decode_pll(unsigned int pll, u32 f_ref) 106 { 107 unsigned long long ll; 108 unsigned long quot; ··· 111 u32 mfn = pll & 0x3ff; 112 u32 mfd = (pll >> 16) & 0x3ff; 113 u32 pd = (pll >> 26) & 0xf; 114 115 mfi = mfi <= 5 ? 5 : mfi; 116 ··· 124 125 unsigned int imx_get_system_clk(void) 126 { 127 + u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512); 128 + 129 + return imx_decode_pll(SPCTL0, f_ref); 130 } 131 EXPORT_SYMBOL(imx_get_system_clk); 132 133 unsigned int imx_get_mcu_clk(void) 134 { 135 + return imx_decode_pll(MPCTL0, CLK32 * 512); 136 } 137 EXPORT_SYMBOL(imx_get_mcu_clk); 138
+1 -1
arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
··· 32 board_a9m9750dev_init_machine(); 33 } 34 35 - MACHINE_START(CC9P9360DEV, "Connect Core 9P 9360 on an A9M9750 Devboard") 36 .map_io = mach_cc9p9360dev_map_io, 37 .init_irq = mach_cc9p9360dev_init_irq, 38 .init_machine = mach_cc9p9360dev_init_machine,
··· 32 board_a9m9750dev_init_machine(); 33 } 34 35 + MACHINE_START(CC9P9360DEV, "Digi ConnectCore 9P 9360 on an A9M9750 Devboard") 36 .map_io = mach_cc9p9360dev_map_io, 37 .init_irq = mach_cc9p9360dev_init_irq, 38 .init_machine = mach_cc9p9360dev_init_machine,
+1
arch/arm/mach-omap1/board-h2.c
··· 27 #include <linux/mtd/nand.h> 28 #include <linux/mtd/partitions.h> 29 #include <linux/input.h> 30 31 #include <asm/hardware.h> 32 #include <asm/mach-types.h>
··· 27 #include <linux/mtd/nand.h> 28 #include <linux/mtd/partitions.h> 29 #include <linux/input.h> 30 + #include <linux/workqueue.h> 31 32 #include <asm/hardware.h> 33 #include <asm/mach-types.h>
+1
arch/arm/mach-omap2/clock.c
··· 27 28 #include <asm/arch/clock.h> 29 #include <asm/arch/sram.h> 30 31 #include "prcm-regs.h" 32 #include "memory.h"
··· 27 28 #include <asm/arch/clock.h> 29 #include <asm/arch/sram.h> 30 + #include <asm/div64.h> 31 32 #include "prcm-regs.h" 33 #include "memory.h"
+2 -1
arch/arm/mach-omap2/clock.h
··· 1013 .name = "dss2_fck", 1014 .parent = &sys_ck, /* fixed at sys_ck or 48MHz */ 1015 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 1016 - RATE_CKCTL | CM_CORE_SEL1 | RATE_FIXED, 1017 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE, 1018 .enable_bit = 1, 1019 .src_offset = 13,
··· 1013 .name = "dss2_fck", 1014 .parent = &sys_ck, /* fixed at sys_ck or 48MHz */ 1015 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 1016 + RATE_CKCTL | CM_CORE_SEL1 | RATE_FIXED | 1017 + DELAYED_APP, 1018 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE, 1019 .enable_bit = 1, 1020 .src_offset = 13,
+1 -2
arch/arm/mach-pxa/tosa.c
··· 28 #include <asm/hardware.h> 29 #include <asm/irq.h> 30 #include <asm/system.h> 31 #include <asm/arch/irda.h> 32 #include <asm/arch/mmc.h> 33 #include <asm/arch/udc.h> ··· 36 #include <asm/mach/arch.h> 37 #include <asm/mach/map.h> 38 #include <asm/mach/irq.h> 39 - 40 - #include <asm/arch/pxa-regs.h> 41 #include <asm/arch/tosa.h> 42 43 #include <asm/hardware/scoop.h>
··· 28 #include <asm/hardware.h> 29 #include <asm/irq.h> 30 #include <asm/system.h> 31 + #include <asm/arch/pxa-regs.h> 32 #include <asm/arch/irda.h> 33 #include <asm/arch/mmc.h> 34 #include <asm/arch/udc.h> ··· 35 #include <asm/mach/arch.h> 36 #include <asm/mach/map.h> 37 #include <asm/mach/irq.h> 38 #include <asm/arch/tosa.h> 39 40 #include <asm/hardware/scoop.h>
+12 -1
drivers/mmc/imxmmc.c
··· 569 570 if(host->dma_dir == DMA_FROM_DEVICE) { 571 imxmci_busy_wait_for_status(host, &stat, 572 - STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, 573 50, "imxmci_cpu_driven_data read"); 574 575 while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && 576 (host->data_cnt < 512)) { 577 578 udelay(20); /* required for clocks < 8MHz*/ ··· 603 604 if(host->dma_size & 0x1ff) 605 stat &= ~STATUS_CRC_READ_ERR; 606 607 } else { 608 imxmci_busy_wait_for_status(host, &stat, ··· 716 * stat from IRQ time so do I 717 */ 718 stat |= host->status_reg; 719 720 if(test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { 721 imxmci_busy_wait_for_status(host, &stat,
··· 569 570 if(host->dma_dir == DMA_FROM_DEVICE) { 571 imxmci_busy_wait_for_status(host, &stat, 572 + STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE | 573 + STATUS_TIME_OUT_READ, 574 50, "imxmci_cpu_driven_data read"); 575 576 while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && 577 + !(stat & STATUS_TIME_OUT_READ) && 578 (host->data_cnt < 512)) { 579 580 udelay(20); /* required for clocks < 8MHz*/ ··· 601 602 if(host->dma_size & 0x1ff) 603 stat &= ~STATUS_CRC_READ_ERR; 604 + 605 + if(stat & STATUS_TIME_OUT_READ) { 606 + dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read timeout STATUS = 0x%x\n", 607 + stat); 608 + trans_done = -1; 609 + } 610 611 } else { 612 imxmci_busy_wait_for_status(host, &stat, ··· 708 * stat from IRQ time so do I 709 */ 710 stat |= host->status_reg; 711 + 712 + if(test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) 713 + stat &= ~STATUS_CRC_READ_ERR; 714 715 if(test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { 716 imxmci_busy_wait_for_status(host, &stat,
+2 -2
drivers/video/backlight/locomolcd.c
··· 199 { 200 unsigned long flags; 201 202 - locomobl_data.brightness = 0; 203 - locomobl_data.power = 0; 204 locomolcd_set_intensity(locomolcd_bl_device); 205 206 backlight_device_unregister(locomolcd_bl_device);
··· 199 { 200 unsigned long flags; 201 202 + locomolcd_bl_device->props.brightness = 0; 203 + locomolcd_bl_device->props.power = 0; 204 locomolcd_set_intensity(locomolcd_bl_device); 205 206 backlight_device_unregister(locomolcd_bl_device);
+3 -3
include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
··· 144 #define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000) 145 #define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000) 146 #define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000) 147 - #define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000) 148 - #define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000) 149 - #define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000) 150 #define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000) 151 #define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000) 152 #define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
··· 144 #define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000) 145 #define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000) 146 #define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000) 147 + #define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x6000) 148 + #define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x7000) 149 + #define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x8000) 150 #define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000) 151 #define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000) 152 #define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
+12
include/asm-arm/arch-lh7a40x/entry-macro.S
··· 86 .macro disable_fiq 87 .endm 88 89 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 90 mov \irqnr, #0 91 mov \base, #io_p2v(0x80000000) @ APB registers ··· 109 #elif defined(CONFIG_ARCH_LH7A404) 110 111 .macro disable_fiq 112 .endm 113 114 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
··· 86 .macro disable_fiq 87 .endm 88 89 + .macro get_irqnr_preamble, base, tmp 90 + .endm 91 + 92 + .macro arch_ret_to_user, tmp1, tmp2 93 + .endm 94 + 95 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 96 mov \irqnr, #0 97 mov \base, #io_p2v(0x80000000) @ APB registers ··· 103 #elif defined(CONFIG_ARCH_LH7A404) 104 105 .macro disable_fiq 106 + .endm 107 + 108 + .macro get_irqnr_preamble, base, tmp 109 + .endm 110 + 111 + .macro arch_ret_to_user, tmp1, tmp2 112 .endm 113 114 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp