···432432 }433433434434 if (clk->flags & CLOCK_NO_IDLE_PARENT)435435- if (!cpu_is_omap24xx())436436- omap1_clk_deny_idle(clk->parent);435435+ omap1_clk_deny_idle(clk->parent);437436 }438437439438 ret = clk->enable(clk);···453454 if (likely(clk->parent)) {454455 omap1_clk_disable(clk->parent);455456 if (clk->flags & CLOCK_NO_IDLE_PARENT)456456- if (!cpu_is_omap24xx())457457- omap1_clk_allow_idle(clk->parent);457457+ omap1_clk_allow_idle(clk->parent);458458 }459459 }460460}···469471 if (unlikely(clk->enable_reg == 0)) {470472 printk(KERN_ERR "clock.c: Enable for %s without enable code\n",471473 clk->name);472472- return 0;474474+ return -EINVAL;473475 }474476475477 if (clk->flags & ENABLE_REG_32BIT) {···649651 int crystal_type = 0; /* Default 12 MHz */650652 u32 reg;651653654654+#ifdef CONFIG_DEBUG_LL655655+ /* Resets some clocks that may be left on from bootloader,656656+ * but leaves serial clocks on.657657+ */658658+ omap_writel(0x3 << 29, MOD_CONF_CTRL_0);659659+#endif660660+652661 /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */653662 reg = omap_readw(SOFT_REQ_REG) & (1 << 4);654663 omap_writew(reg, SOFT_REQ_REG);655655- omap_writew(0, SOFT_REQ_REG2);664664+ if (!cpu_is_omap15xx())665665+ omap_writew(0, SOFT_REQ_REG2);656666657667 clk_init(&omap1_clk_functions);658668···691685692686 info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);693687 if (info != NULL) {694694- if (!cpu_is_omap1510())688688+ if (!cpu_is_omap15xx())695689 crystal_type = info->system_clock_type;696690 }697691
+1-1
arch/arm/mach-omap1/irq.c
···238238239239 if (cpu_is_omap730())240240 omap_unmask_irq(INT_730_IH2_IRQ);241241- else if (cpu_is_omap1510())241241+ else if (cpu_is_omap15xx())242242 omap_unmask_irq(INT_1510_IH2_IRQ);243243 else if (cpu_is_omap16xx())244244 omap_unmask_irq(INT_1610_IH2_IRQ);
+9-3
arch/arm/mach-omap1/pm.c
···256256 tps65010_set_led(LED1, OFF);257257 }258258259259- omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);259259+ if (!cpu_is_omap15xx())260260+ omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);260261261262 /*262263 * Step 1: turn off interrupts (FIXME: NOTE: already disabled)···435434 MPUI1610_RESTORE(OMAP_IH2_3_MIR);436435 }437436438438- omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG);437437+ if (!cpu_is_omap15xx())438438+ omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG);439439440440 /*441441 * Reenable interrupts···706704707705static int __init omap_pm_init(void)708706{707707+ int error;708708+709709 printk("Power Management for TI OMAP.\n");710710711711 /*···764760 omap_pm_init_proc();765761#endif766762767767- subsys_create_file(&power_subsys, &sleep_while_idle_attr);763763+ error = subsys_create_file(&power_subsys, &sleep_while_idle_attr);764764+ if (error)765765+ printk(KERN_ERR "subsys_create_file failed: %d\n", error);768766769767 if (cpu_is_omap16xx()) {770768 /* configure LOW_PWR pin */
+9-9
arch/arm/mach-omap1/serial.c
···11/*22 * linux/arch/arm/mach-omap1/serial.c33 *44- * OMAP1 CPU identification code44+ * OMAP1 serial support.55 *66 * This program is free software; you can redistribute it and/or modify77 * it under the terms of the GNU General Public License version 2 as···5959 omap_serial_outp(p, UART_OMAP_SCR, 0x08); /* TX watermark */6060 omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */61616262- if (!cpu_is_omap1510()) {6262+ if (!cpu_is_omap15xx()) {6363 omap_serial_outp(p, UART_OMAP_SYSC, 0x01);6464 while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01));6565 }···121121 serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2;122122 }123123124124- if (cpu_is_omap1510()) {124124+ if (cpu_is_omap15xx()) {125125 serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16;126126 serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16;127127 serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;···147147 printk("Could not get uart1_ck\n");148148 else {149149 clk_enable(uart1_ck);150150- if (cpu_is_omap1510())150150+ if (cpu_is_omap15xx())151151 clk_set_rate(uart1_ck, 12000000);152152 }153153- if (cpu_is_omap1510()) {153153+ if (cpu_is_omap15xx()) {154154 omap_cfg_reg(UART1_TX);155155 omap_cfg_reg(UART1_RTS);156156 if (machine_is_omap_innovator()) {···167167 printk("Could not get uart2_ck\n");168168 else {169169 clk_enable(uart2_ck);170170- if (cpu_is_omap1510())170170+ if (cpu_is_omap15xx())171171 clk_set_rate(uart2_ck, 12000000);172172 else173173 clk_set_rate(uart2_ck, 48000000);174174 }175175- if (cpu_is_omap1510()) {175175+ if (cpu_is_omap15xx()) {176176 omap_cfg_reg(UART2_TX);177177 omap_cfg_reg(UART2_RTS);178178 if (machine_is_omap_innovator()) {···189189 printk("Could not get uart3_ck\n");190190 else {191191 clk_enable(uart3_ck);192192- if (cpu_is_omap1510())192192+ if (cpu_is_omap15xx())193193 clk_set_rate(uart3_ck, 12000000);194194 }195195- if (cpu_is_omap1510()) {195195+ if (cpu_is_omap15xx()) {196196 omap_cfg_reg(UART3_TX);197197 omap_cfg_reg(UART3_RX);198198 }
+7-6
arch/arm/mach-omap2/board-h4.c
···3939#include "prcm-regs.h"40404141#include <asm/io.h>4242-#include <asm/delay.h>43424443static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 };4544static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 };···178179 return err;179180}180181181181-static void set_trans_mode(void *data)182182+static void set_trans_mode(struct work_struct *work)182183{183183- int *mode = data;184184+ struct omap_irda_config *irda_config =185185+ container_of(work, struct omap_irda_config, gpio_expa.work);186186+ int mode = irda_config->mode;184187 unsigned char expa;185188 int err = 0;186189···192191193192 expa &= ~0x01;194193195195- if (!(*mode & IR_SIRMODE)) { /* MIR/FIR */194194+ if (!(mode & IR_SIRMODE)) { /* MIR/FIR */196195 expa |= 0x01;197196 }198197···205204{206205 struct omap_irda_config *irda_config = dev->platform_data;207206207207+ irda_config->mode = mode;208208 cancel_delayed_work(&irda_config->gpio_expa);209209- PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);210210-#error this is not permitted - mode is an argument variable209209+ PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);211210 schedule_delayed_work(&irda_config->gpio_expa, 0);212211213212 return 0;
···557557 omap_enable_channel_irq(free_ch);558558 /* Clear the CSR register and IRQ status register */559559 OMAP_DMA_CSR_REG(free_ch) = OMAP2_DMA_CSR_CLEAR_MASK;560560- omap_writel(~0x0, OMAP_DMA4_IRQSTATUS_L0);560560+ omap_writel(1 << free_ch, OMAP_DMA4_IRQSTATUS_L0);561561 }562562563563 *dma_ch_out = free_ch;···597597598598 /* Clear the CSR register and IRQ status register */599599 OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK;600600-601601- val = omap_readl(OMAP_DMA4_IRQSTATUS_L0);602602- val |= 1 << lch;603603- omap_writel(val, OMAP_DMA4_IRQSTATUS_L0);600600+ omap_writel(1 << lch, OMAP_DMA4_IRQSTATUS_L0);604601605602 /* Disable all DMA interrupts for the channel. */606603 OMAP_DMA_CICR_REG(lch) = 0;···924927static int omap2_dma_handle_ch(int ch)925928{926929 u32 status = OMAP_DMA_CSR_REG(ch);927927- u32 val;928930929931 if (!status)930932 return 0;···944948 dma_chan[ch].dev_id);945949946950 OMAP_DMA_CSR_REG(ch) = OMAP2_DMA_CSR_CLEAR_MASK;947947-948948- val = omap_readl(OMAP_DMA4_IRQSTATUS_L0);949949- /* ch in this function is from 0-31 while in register it is 1-32 */950950- val = 1 << (ch);951951- omap_writel(val, OMAP_DMA4_IRQSTATUS_L0);951951+ omap_writel(1 << ch, OMAP_DMA4_IRQSTATUS_L0);952952953953 if (likely(dma_chan[ch].callback != NULL))954954 dma_chan[ch].callback(ch, status, dma_chan[ch].data);
···6565 int period; /* current transfer period */6666 int periods; /* current count of periods registerd in the DMA engine */6767 spinlock_t dma_lock; /* for locking in DMA operations */6868- snd_pcm_substream_t *stream; /* the pcm stream */6868+ struct snd_pcm_substream *stream; /* the pcm stream */6969 unsigned linked:1; /* dma channels linked */7070 int offset; /* store start position of the last period in the alsa buffer */7171 int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */···7676 * Alsa card structure for aic237777 */7878struct snd_card_omap_codec {7979- snd_card_t *card;8080- snd_pcm_t *pcm;7979+ struct snd_card *card;8080+ struct snd_pcm *pcm;8181 long samplerate;8282 struct audio_stream s[2]; /* playback & capture */8383};···8989struct omap_alsa_codec_config {9090 char *name;9191 struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa;9292- snd_pcm_hw_constraint_list_t *hw_constraints_rates;9393- snd_pcm_hardware_t *snd_omap_alsa_playback;9494- snd_pcm_hardware_t *snd_omap_alsa_capture;9292+ struct snd_pcm_hw_constraint_list *hw_constraints_rates;9393+ struct snd_pcm_hardware *snd_omap_alsa_playback;9494+ struct snd_pcm_hardware *snd_omap_alsa_capture;9595 void (*codec_configure_dev)(void);9696 void (*codec_set_samplerate)(long);9797 void (*codec_clock_setup)(void);