Merge branch 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

authored by Russell King and committed by Russell King 6139dbbb 9623b373

+72 -55
+3 -1
arch/arm/mach-omap1/board-nokia770.c
··· 16 16 17 17 #include <linux/spi/spi.h> 18 18 #include <linux/spi/ads7846.h> 19 + #include <linux/workqueue.h> 20 + #include <linux/delay.h> 19 21 20 22 #include <asm/hardware.h> 21 23 #include <asm/mach-types.h> ··· 105 103 106 104 static struct spi_board_info nokia770_spi_board_info[] __initdata = { 107 105 [0] = { 108 - .modalias = "lcd_lph8923", 106 + .modalias = "lcd_mipid", 109 107 .bus_num = 2, 110 108 .chip_select = 3, 111 109 .max_speed_hz = 12000000,
+13 -7
arch/arm/mach-omap1/clock.c
··· 432 432 } 433 433 434 434 if (clk->flags & CLOCK_NO_IDLE_PARENT) 435 - if (!cpu_is_omap24xx()) 436 - omap1_clk_deny_idle(clk->parent); 435 + omap1_clk_deny_idle(clk->parent); 437 436 } 438 437 439 438 ret = clk->enable(clk); ··· 453 454 if (likely(clk->parent)) { 454 455 omap1_clk_disable(clk->parent); 455 456 if (clk->flags & CLOCK_NO_IDLE_PARENT) 456 - if (!cpu_is_omap24xx()) 457 - omap1_clk_allow_idle(clk->parent); 457 + omap1_clk_allow_idle(clk->parent); 458 458 } 459 459 } 460 460 } ··· 469 471 if (unlikely(clk->enable_reg == 0)) { 470 472 printk(KERN_ERR "clock.c: Enable for %s without enable code\n", 471 473 clk->name); 472 - return 0; 474 + return -EINVAL; 473 475 } 474 476 475 477 if (clk->flags & ENABLE_REG_32BIT) { ··· 649 651 int crystal_type = 0; /* Default 12 MHz */ 650 652 u32 reg; 651 653 654 + #ifdef CONFIG_DEBUG_LL 655 + /* Resets some clocks that may be left on from bootloader, 656 + * but leaves serial clocks on. 657 + */ 658 + omap_writel(0x3 << 29, MOD_CONF_CTRL_0); 659 + #endif 660 + 652 661 /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */ 653 662 reg = omap_readw(SOFT_REQ_REG) & (1 << 4); 654 663 omap_writew(reg, SOFT_REQ_REG); 655 - omap_writew(0, SOFT_REQ_REG2); 664 + if (!cpu_is_omap15xx()) 665 + omap_writew(0, SOFT_REQ_REG2); 656 666 657 667 clk_init(&omap1_clk_functions); 658 668 ··· 691 685 692 686 info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config); 693 687 if (info != NULL) { 694 - if (!cpu_is_omap1510()) 688 + if (!cpu_is_omap15xx()) 695 689 crystal_type = info->system_clock_type; 696 690 } 697 691
+1 -1
arch/arm/mach-omap1/irq.c
··· 238 238 239 239 if (cpu_is_omap730()) 240 240 omap_unmask_irq(INT_730_IH2_IRQ); 241 - else if (cpu_is_omap1510()) 241 + else if (cpu_is_omap15xx()) 242 242 omap_unmask_irq(INT_1510_IH2_IRQ); 243 243 else if (cpu_is_omap16xx()) 244 244 omap_unmask_irq(INT_1610_IH2_IRQ);
+9 -3
arch/arm/mach-omap1/pm.c
··· 256 256 tps65010_set_led(LED1, OFF); 257 257 } 258 258 259 - omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG); 259 + if (!cpu_is_omap15xx()) 260 + omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG); 260 261 261 262 /* 262 263 * Step 1: turn off interrupts (FIXME: NOTE: already disabled) ··· 435 434 MPUI1610_RESTORE(OMAP_IH2_3_MIR); 436 435 } 437 436 438 - omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG); 437 + if (!cpu_is_omap15xx()) 438 + omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG); 439 439 440 440 /* 441 441 * Reenable interrupts ··· 706 704 707 705 static int __init omap_pm_init(void) 708 706 { 707 + int error; 708 + 709 709 printk("Power Management for TI OMAP.\n"); 710 710 711 711 /* ··· 764 760 omap_pm_init_proc(); 765 761 #endif 766 762 767 - subsys_create_file(&power_subsys, &sleep_while_idle_attr); 763 + error = subsys_create_file(&power_subsys, &sleep_while_idle_attr); 764 + if (error) 765 + printk(KERN_ERR "subsys_create_file failed: %d\n", error); 768 766 769 767 if (cpu_is_omap16xx()) { 770 768 /* configure LOW_PWR pin */
+9 -9
arch/arm/mach-omap1/serial.c
··· 1 1 /* 2 2 * linux/arch/arm/mach-omap1/serial.c 3 3 * 4 - * OMAP1 CPU identification code 4 + * OMAP1 serial support. 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License version 2 as ··· 59 59 omap_serial_outp(p, UART_OMAP_SCR, 0x08); /* TX watermark */ 60 60 omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */ 61 61 62 - if (!cpu_is_omap1510()) { 62 + if (!cpu_is_omap15xx()) { 63 63 omap_serial_outp(p, UART_OMAP_SYSC, 0x01); 64 64 while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01)); 65 65 } ··· 121 121 serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2; 122 122 } 123 123 124 - if (cpu_is_omap1510()) { 124 + if (cpu_is_omap15xx()) { 125 125 serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16; 126 126 serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16; 127 127 serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16; ··· 147 147 printk("Could not get uart1_ck\n"); 148 148 else { 149 149 clk_enable(uart1_ck); 150 - if (cpu_is_omap1510()) 150 + if (cpu_is_omap15xx()) 151 151 clk_set_rate(uart1_ck, 12000000); 152 152 } 153 - if (cpu_is_omap1510()) { 153 + if (cpu_is_omap15xx()) { 154 154 omap_cfg_reg(UART1_TX); 155 155 omap_cfg_reg(UART1_RTS); 156 156 if (machine_is_omap_innovator()) { ··· 167 167 printk("Could not get uart2_ck\n"); 168 168 else { 169 169 clk_enable(uart2_ck); 170 - if (cpu_is_omap1510()) 170 + if (cpu_is_omap15xx()) 171 171 clk_set_rate(uart2_ck, 12000000); 172 172 else 173 173 clk_set_rate(uart2_ck, 48000000); 174 174 } 175 - if (cpu_is_omap1510()) { 175 + if (cpu_is_omap15xx()) { 176 176 omap_cfg_reg(UART2_TX); 177 177 omap_cfg_reg(UART2_RTS); 178 178 if (machine_is_omap_innovator()) { ··· 189 189 printk("Could not get uart3_ck\n"); 190 190 else { 191 191 clk_enable(uart3_ck); 192 - if (cpu_is_omap1510()) 192 + if (cpu_is_omap15xx()) 193 193 clk_set_rate(uart3_ck, 12000000); 194 194 } 195 - if (cpu_is_omap1510()) { 195 + if (cpu_is_omap15xx()) { 196 196 omap_cfg_reg(UART3_TX); 197 197 omap_cfg_reg(UART3_RX); 198 198 }
+7 -6
arch/arm/mach-omap2/board-h4.c
··· 39 39 #include "prcm-regs.h" 40 40 41 41 #include <asm/io.h> 42 - #include <asm/delay.h> 43 42 44 43 static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 }; 45 44 static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 }; ··· 178 179 return err; 179 180 } 180 181 181 - static void set_trans_mode(void *data) 182 + static void set_trans_mode(struct work_struct *work) 182 183 { 183 - int *mode = data; 184 + struct omap_irda_config *irda_config = 185 + container_of(work, struct omap_irda_config, gpio_expa.work); 186 + int mode = irda_config->mode; 184 187 unsigned char expa; 185 188 int err = 0; 186 189 ··· 192 191 193 192 expa &= ~0x01; 194 193 195 - if (!(*mode & IR_SIRMODE)) { /* MIR/FIR */ 194 + if (!(mode & IR_SIRMODE)) { /* MIR/FIR */ 196 195 expa |= 0x01; 197 196 } 198 197 ··· 205 204 { 206 205 struct omap_irda_config *irda_config = dev->platform_data; 207 206 207 + irda_config->mode = mode; 208 208 cancel_delayed_work(&irda_config->gpio_expa); 209 - PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode); 210 - #error this is not permitted - mode is an argument variable 209 + PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode); 211 210 schedule_delayed_work(&irda_config->gpio_expa, 0); 212 211 213 212 return 0;
+2 -1
arch/arm/mach-omap2/timer-gp.c
··· 24 24 #include <linux/err.h> 25 25 #include <linux/clk.h> 26 26 #include <linux/delay.h> 27 + #include <linux/irq.h> 27 28 28 29 #include <asm/mach/time.h> 29 30 #include <asm/arch/dmtimer.h> ··· 65 64 BUG_ON(gptimer == NULL); 66 65 67 66 omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK); 68 - tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / 100; 67 + tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ; 69 68 tick_period -= 1; 70 69 71 70 setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
+3 -11
arch/arm/plat-omap/dma.c
··· 557 557 omap_enable_channel_irq(free_ch); 558 558 /* Clear the CSR register and IRQ status register */ 559 559 OMAP_DMA_CSR_REG(free_ch) = OMAP2_DMA_CSR_CLEAR_MASK; 560 - omap_writel(~0x0, OMAP_DMA4_IRQSTATUS_L0); 560 + omap_writel(1 << free_ch, OMAP_DMA4_IRQSTATUS_L0); 561 561 } 562 562 563 563 *dma_ch_out = free_ch; ··· 597 597 598 598 /* Clear the CSR register and IRQ status register */ 599 599 OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK; 600 - 601 - val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); 602 - val |= 1 << lch; 603 - omap_writel(val, OMAP_DMA4_IRQSTATUS_L0); 600 + omap_writel(1 << lch, OMAP_DMA4_IRQSTATUS_L0); 604 601 605 602 /* Disable all DMA interrupts for the channel. */ 606 603 OMAP_DMA_CICR_REG(lch) = 0; ··· 924 927 static int omap2_dma_handle_ch(int ch) 925 928 { 926 929 u32 status = OMAP_DMA_CSR_REG(ch); 927 - u32 val; 928 930 929 931 if (!status) 930 932 return 0; ··· 944 948 dma_chan[ch].dev_id); 945 949 946 950 OMAP_DMA_CSR_REG(ch) = OMAP2_DMA_CSR_CLEAR_MASK; 947 - 948 - val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); 949 - /* ch in this function is from 0-31 while in register it is 1-32 */ 950 - val = 1 << (ch); 951 - omap_writel(val, OMAP_DMA4_IRQSTATUS_L0); 951 + omap_writel(1 << ch, OMAP_DMA4_IRQSTATUS_L0); 952 952 953 953 if (likely(dma_chan[ch].callback != NULL)) 954 954 dma_chan[ch].callback(ch, status, dma_chan[ch].data);
+4 -2
arch/arm/plat-omap/dmtimer.c
··· 90 90 { .phys_base = 0xfffb2c00, .irq = INT_1610_GPTIMER4 }, 91 91 { .phys_base = 0xfffb3400, .irq = INT_1610_GPTIMER5 }, 92 92 { .phys_base = 0xfffb3c00, .irq = INT_1610_GPTIMER6 }, 93 - { .phys_base = 0xfffb4400, .irq = INT_1610_GPTIMER7 }, 94 - { .phys_base = 0xfffb4c00, .irq = INT_1610_GPTIMER8 }, 93 + { .phys_base = 0xfffb7400, .irq = INT_1610_GPTIMER7 }, 94 + { .phys_base = 0xfffbd400, .irq = INT_1610_GPTIMER8 }, 95 95 }; 96 96 97 97 #elif defined(CONFIG_ARCH_OMAP2) ··· 314 314 __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) 315 315 { 316 316 BUG(); 317 + 318 + return 0; 317 319 } 318 320 319 321 #endif
+5 -4
arch/arm/plat-omap/gpio.c
··· 974 974 }; 975 975 976 976 static struct irq_chip mpuio_irq_chip = { 977 - .name = "MPUIO", 978 - .ack = mpuio_ack_irq, 979 - .mask = mpuio_mask_irq, 980 - .unmask = mpuio_unmask_irq 977 + .name = "MPUIO", 978 + .ack = mpuio_ack_irq, 979 + .mask = mpuio_mask_irq, 980 + .unmask = mpuio_unmask_irq, 981 + .set_type = gpio_irq_type, 981 982 }; 982 983 983 984 static int initialized;
+1 -1
arch/arm/plat-omap/mcbsp.c
··· 20 20 #include <linux/interrupt.h> 21 21 #include <linux/err.h> 22 22 #include <linux/clk.h> 23 + #include <linux/delay.h> 23 24 24 - #include <asm/delay.h> 25 25 #include <asm/io.h> 26 26 #include <asm/irq.h> 27 27
+2 -2
arch/arm/plat-omap/mux.c
··· 116 116 } 117 117 118 118 /* Check for pull up or pull down selection on 1610 */ 119 - if (!cpu_is_omap1510()) { 119 + if (!cpu_is_omap15xx()) { 120 120 if (cfg->pu_pd_reg && cfg->pull_val) { 121 121 spin_lock_irqsave(&mux_spin_lock, flags); 122 122 pu_pd_orig = omap_readl(cfg->pu_pd_reg); ··· 172 172 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n", 173 173 cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg); 174 174 175 - if (!cpu_is_omap1510()) { 175 + if (!cpu_is_omap15xx()) { 176 176 if (cfg->pu_pd_reg && cfg->pull_val) { 177 177 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n", 178 178 cfg->pu_pd_name, cfg->pu_pd_reg,
+6
include/asm-arm/arch-omap/entry-macro.S
··· 61 61 .macro disable_fiq 62 62 .endm 63 63 64 + .macro get_irqnr_preamble, base, tmp 65 + .endm 66 + 67 + .macro arch_ret_to_user, tmp1, tmp2 68 + .endm 69 + 64 70 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 65 71 ldr \base, =VA_IC_BASE 66 72 ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */
+1 -1
include/asm-arm/arch-omap/memory.h
··· 70 70 71 71 #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) 72 72 #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) 73 - #define is_lbus_device(dev) (cpu_is_omap1510() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) 73 + #define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) 74 74 75 75 #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ 76 76 (dma_addr_t)virt_to_lbus(page_address(page)) : \
+6 -6
include/asm-arm/arch-omap/omap-alsa.h
··· 65 65 int period; /* current transfer period */ 66 66 int periods; /* current count of periods registerd in the DMA engine */ 67 67 spinlock_t dma_lock; /* for locking in DMA operations */ 68 - snd_pcm_substream_t *stream; /* the pcm stream */ 68 + struct snd_pcm_substream *stream; /* the pcm stream */ 69 69 unsigned linked:1; /* dma channels linked */ 70 70 int offset; /* store start position of the last period in the alsa buffer */ 71 71 int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */ ··· 76 76 * Alsa card structure for aic23 77 77 */ 78 78 struct snd_card_omap_codec { 79 - snd_card_t *card; 80 - snd_pcm_t *pcm; 79 + struct snd_card *card; 80 + struct snd_pcm *pcm; 81 81 long samplerate; 82 82 struct audio_stream s[2]; /* playback & capture */ 83 83 }; ··· 89 89 struct omap_alsa_codec_config { 90 90 char *name; 91 91 struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa; 92 - snd_pcm_hw_constraint_list_t *hw_constraints_rates; 93 - snd_pcm_hardware_t *snd_omap_alsa_playback; 94 - snd_pcm_hardware_t *snd_omap_alsa_capture; 92 + struct snd_pcm_hw_constraint_list *hw_constraints_rates; 93 + struct snd_pcm_hardware *snd_omap_alsa_playback; 94 + struct snd_pcm_hardware *snd_omap_alsa_capture; 95 95 void (*codec_configure_dev)(void); 96 96 void (*codec_set_samplerate)(long); 97 97 void (*codec_clock_setup)(void);