Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] Fix PCI_DMA_BUS_IS_PHYS for ARM
[ARM] 5247/1: tosa: SW_EAR_IN support
[ARM] 5246/1: tosa: add proper clock alias for tc6393xb clock
[ARM] 5245/1: Fix warning about unused return value in drivers/pcmcia
[ARM] OMAP: Fix MMC device data
imx serial: fix rts handling for non imx1 based hardware
imx serial: set RXD mux bit on i.MX27 and i.MX31
i.MX serial: fix init failure
pcm037: add rts/cts support for serial port

+135 -44
+1 -1
arch/arm/include/asm/pci.h
··· 30 30 * The networking and block device layers use this boolean for bounce 31 31 * buffer decisions. 32 32 */ 33 - #define PCI_DMA_BUS_IS_PHYS (0) 33 + #define PCI_DMA_BUS_IS_PHYS (1) 34 34 35 35 /* 36 36 * Whether pci_unmap_{single,page} is a nop depends upon the
+1 -1
arch/arm/mach-mx3/pcm037.c
··· 54 54 }; 55 55 56 56 static struct imxuart_platform_data uart_pdata = { 57 - .flags = 0, 57 + .flags = IMXUART_HAVE_RTSCTS, 58 58 }; 59 59 60 60 static struct platform_device *devices[] __initdata = {
+11
arch/arm/mach-pxa/tosa.c
··· 50 50 #include <asm/mach/sharpsl_param.h> 51 51 52 52 #include "generic.h" 53 + #include "clock.h" 53 54 #include "devices.h" 54 55 55 56 static unsigned long tosa_pin_config[] = { ··· 522 521 .wakeup = 1, 523 522 .active_low = 1, 524 523 }, 524 + { 525 + .type = EV_SW, 526 + .code = SW_HEADPHONE_INSERT, 527 + .gpio = TOSA_GPIO_EAR_IN, 528 + .desc = "HeadPhone insert", 529 + .active_low = 1, 530 + .debounce_interval = 300, 531 + }, 525 532 }; 526 533 527 534 static struct gpio_keys_platform_data tosa_gpio_keys_platform_data = { ··· 800 791 pxa_set_ficp_info(&tosa_ficp_platform_data); 801 792 pxa_set_i2c_info(NULL); 802 793 platform_scoop_config = &tosa_pcmcia_config; 794 + 795 + clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL); 803 796 804 797 platform_add_devices(devices, ARRAY_SIZE(devices)); 805 798 }
+95 -36
arch/arm/plat-omap/devices.c
··· 21 21 22 22 #include <mach/tc.h> 23 23 #include <mach/board.h> 24 + #include <mach/mmc.h> 24 25 #include <mach/mux.h> 25 26 #include <mach/gpio.h> 26 27 #include <mach/menelaus.h> ··· 195 194 196 195 /*-------------------------------------------------------------------------*/ 197 196 198 - #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) 197 + #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ 198 + defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) 199 199 200 - #ifdef CONFIG_ARCH_OMAP24XX 200 + #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) 201 201 #define OMAP_MMC1_BASE 0x4809c000 202 - #define OMAP_MMC1_INT INT_24XX_MMC_IRQ 203 - #else 204 - #define OMAP_MMC1_BASE 0xfffb7800 205 - #define OMAP_MMC1_INT INT_MMC 206 - #endif 207 - #define OMAP_MMC2_BASE 0xfffb7c00 /* omap16xx only */ 202 + #define OMAP_MMC1_END (OMAP_MMC1_BASE + 0x1fc) 203 + #define OMAP_MMC1_INT INT_24XX_MMC_IRQ 208 204 209 - static struct omap_mmc_conf mmc1_conf; 205 + #define OMAP_MMC2_BASE 0x480b4000 206 + #define OMAP_MMC2_END (OMAP_MMC2_BASE + 0x1fc) 207 + #define OMAP_MMC2_INT INT_24XX_MMC2_IRQ 208 + 209 + #else 210 + 211 + #define OMAP_MMC1_BASE 0xfffb7800 212 + #define OMAP_MMC1_END (OMAP_MMC1_BASE + 0x7f) 213 + #define OMAP_MMC1_INT INT_MMC 214 + 215 + #define OMAP_MMC2_BASE 0xfffb7c00 /* omap16xx only */ 216 + #define OMAP_MMC2_END (OMAP_MMC2_BASE + 0x7f) 217 + #define OMAP_MMC2_INT INT_1610_MMC2 218 + 219 + #endif 220 + 221 + static struct omap_mmc_platform_data mmc1_data; 210 222 211 223 static u64 mmc1_dmamask = 0xffffffff; 212 224 213 225 static struct resource mmc1_resources[] = { 214 226 { 215 227 .start = OMAP_MMC1_BASE, 216 - .end = OMAP_MMC1_BASE + 0x7f, 228 + .end = OMAP_MMC1_END, 217 229 .flags = IORESOURCE_MEM, 218 230 }, 219 231 { ··· 240 226 .id = 1, 241 227 .dev = { 242 228 .dma_mask = &mmc1_dmamask, 243 - .platform_data = &mmc1_conf, 229 + .platform_data = &mmc1_data, 244 230 }, 245 231 .num_resources = ARRAY_SIZE(mmc1_resources), 246 232 .resource = mmc1_resources, 247 233 }; 248 234 249 - #ifdef CONFIG_ARCH_OMAP16XX 235 + #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \ 236 + defined(CONFIG_ARCH_OMAP34XX) 250 237 251 - static struct omap_mmc_conf mmc2_conf; 238 + static struct omap_mmc_platform_data mmc2_data; 252 239 253 240 static u64 mmc2_dmamask = 0xffffffff; 254 241 255 242 static struct resource mmc2_resources[] = { 256 243 { 257 244 .start = OMAP_MMC2_BASE, 258 - .end = OMAP_MMC2_BASE + 0x7f, 245 + .end = OMAP_MMC2_END, 259 246 .flags = IORESOURCE_MEM, 260 247 }, 261 248 { 262 - .start = INT_1610_MMC2, 249 + .start = OMAP_MMC2_INT, 263 250 .flags = IORESOURCE_IRQ, 264 251 }, 265 252 }; ··· 270 255 .id = 2, 271 256 .dev = { 272 257 .dma_mask = &mmc2_dmamask, 273 - .platform_data = &mmc2_conf, 258 + .platform_data = &mmc2_data, 274 259 }, 275 260 .num_resources = ARRAY_SIZE(mmc2_resources), 276 261 .resource = mmc2_resources, 277 262 }; 278 263 #endif 279 264 280 - static void __init omap_init_mmc(void) 265 + static inline void omap_init_mmc_conf(const struct omap_mmc_config *mmc_conf) 281 266 { 282 - const struct omap_mmc_config *mmc_conf; 283 - const struct omap_mmc_conf *mmc; 284 - 285 - /* NOTE: assumes MMC was never (wrongly) enabled */ 286 - mmc_conf = omap_get_config(OMAP_TAG_MMC, struct omap_mmc_config); 287 - if (!mmc_conf) 267 + if (cpu_is_omap2430() || cpu_is_omap34xx()) 288 268 return; 289 269 290 - /* block 1 is always available and has just one pinout option */ 291 - mmc = &mmc_conf->mmc[0]; 292 - if (mmc->enabled) { 270 + if (mmc_conf->mmc[0].enabled) { 293 271 if (cpu_is_omap24xx()) { 294 272 omap_cfg_reg(H18_24XX_MMC_CMD); 295 273 omap_cfg_reg(H15_24XX_MMC_CLKI); ··· 300 292 omap_cfg_reg(P20_1710_MMC_DATDIR0); 301 293 } 302 294 } 303 - if (mmc->wire4) { 295 + if (mmc_conf->mmc[0].wire4) { 304 296 if (cpu_is_omap24xx()) { 305 297 omap_cfg_reg(H14_24XX_MMC_DAT1); 306 298 omap_cfg_reg(E19_24XX_MMC_DAT2); ··· 311 303 } else { 312 304 omap_cfg_reg(MMC_DAT1); 313 305 /* NOTE: DAT2 can be on W10 (here) or M15 */ 314 - if (!mmc->nomux) 306 + if (!mmc_conf->mmc[0].nomux) 315 307 omap_cfg_reg(MMC_DAT2); 316 308 omap_cfg_reg(MMC_DAT3); 317 309 } 318 310 } 319 - mmc1_conf = *mmc; 320 - (void) platform_device_register(&mmc_omap_device1); 311 + #if defined(CONFIG_ARCH_OMAP2420) 312 + if (mmc_conf->mmc[0].internal_clock) { 313 + /* 314 + * Use internal loop-back in MMC/SDIO 315 + * Module Input Clock selection 316 + */ 317 + if (cpu_is_omap24xx()) { 318 + u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); 319 + v |= (1 << 24); /* not used in 243x */ 320 + omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); 321 + } 322 + } 323 + #endif 321 324 } 322 325 323 326 #ifdef CONFIG_ARCH_OMAP16XX 324 327 /* block 2 is on newer chips, and has many pinout options */ 325 - mmc = &mmc_conf->mmc[1]; 326 - if (mmc->enabled) { 327 - if (!mmc->nomux) { 328 + if (mmc_conf->mmc[1].enabled) { 329 + if (!mmc_conf->mmc[1].nomux) { 328 330 omap_cfg_reg(Y8_1610_MMC2_CMD); 329 331 omap_cfg_reg(Y10_1610_MMC2_CLK); 330 332 omap_cfg_reg(R18_1610_MMC2_CLKIN); 331 333 omap_cfg_reg(W8_1610_MMC2_DAT0); 332 - if (mmc->wire4) { 334 + if (mmc_conf->mmc[1].wire4) { 333 335 omap_cfg_reg(V8_1610_MMC2_DAT1); 334 336 omap_cfg_reg(W15_1610_MMC2_DAT2); 335 337 omap_cfg_reg(R10_1610_MMC2_DAT3); ··· 355 337 if (cpu_is_omap1710()) 356 338 omap_writel(omap_readl(MOD_CONF_CTRL_1) | (1 << 24), 357 339 MOD_CONF_CTRL_1); 358 - mmc2_conf = *mmc; 340 + } 341 + #endif 342 + } 343 + 344 + static void __init omap_init_mmc(void) 345 + { 346 + const struct omap_mmc_config *mmc_conf; 347 + 348 + /* NOTE: assumes MMC was never (wrongly) enabled */ 349 + mmc_conf = omap_get_config(OMAP_TAG_MMC, struct omap_mmc_config); 350 + if (!mmc_conf) 351 + return; 352 + 353 + omap_init_mmc_conf(mmc_conf); 354 + 355 + if (mmc_conf->mmc[0].enabled) { 356 + mmc1_data.conf = mmc_conf->mmc[0]; 357 + (void) platform_device_register(&mmc_omap_device1); 358 + } 359 + 360 + #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \ 361 + defined(CONFIG_ARCH_OMAP34XX) 362 + if (mmc_conf->mmc[1].enabled) { 363 + mmc2_data.conf = mmc_conf->mmc[1]; 359 364 (void) platform_device_register(&mmc_omap_device2); 360 365 } 361 366 #endif 362 - return; 363 367 } 368 + 369 + void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info) 370 + { 371 + switch (host) { 372 + case 1: 373 + mmc1_data = *info; 374 + break; 375 + #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \ 376 + defined(CONFIG_ARCH_OMAP34XX) 377 + case 2: 378 + mmc2_data = *info; 379 + break; 380 + #endif 381 + default: 382 + BUG(); 383 + } 384 + } 385 + 364 386 #else 365 387 static inline void omap_init_mmc(void) {} 388 + void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info) {} 366 389 #endif 367 390 368 391 /*-------------------------------------------------------------------------*/
+5 -1
drivers/pcmcia/soc_common.c
··· 748 748 749 749 add_timer(&skt->poll_timer); 750 750 751 - device_create_file(&skt->socket.dev, &dev_attr_status); 751 + ret = device_create_file(&skt->socket.dev, &dev_attr_status); 752 + if (ret) 753 + goto out_err_8; 752 754 } 753 755 754 756 dev_set_drvdata(dev, sinfo); ··· 760 758 do { 761 759 skt = &sinfo->skt[i]; 762 760 761 + device_remove_file(&skt->socket.dev, &dev_attr_status); 762 + out_err_8: 763 763 del_timer_sync(&skt->poll_timer); 764 764 pcmcia_unregister_socket(&skt->socket); 765 765
+22 -5
drivers/serial/imx.c
··· 127 127 #define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */ 128 128 #define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */ 129 129 #define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */ 130 - #define UCR3_REF25 (1<<3) /* Ref freq 25 MHz */ 131 - #define UCR3_REF30 (1<<2) /* Ref Freq 30 MHz */ 130 + #ifdef CONFIG_ARCH_IMX 131 + #define UCR3_REF25 (1<<3) /* Ref freq 25 MHz, only on mx1 */ 132 + #define UCR3_REF30 (1<<2) /* Ref Freq 30 MHz, only on mx1 */ 133 + #endif 134 + #if defined CONFIG_ARCH_MX2 || defined CONFIG_ARCH_MX3 135 + #define UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select, on mx2/mx3 */ 136 + #endif 132 137 #define UCR3_INVT (1<<1) /* Inverted Infrared transmission */ 133 138 #define UCR3_BPEN (1<<0) /* Preset registers enable */ 134 139 #define UCR4_CTSTL_32 (32<<10) /* CTS trigger level (32 chars) */ ··· 450 445 readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN) 451 446 imx_txint(irq, dev_id); 452 447 453 - if (sts & USR1_RTSS) 448 + if (sts & USR1_RTSD) 454 449 imx_rtsint(irq, dev_id); 455 450 456 451 return IRQ_HANDLED; ··· 602 597 temp = readl(sport->port.membase + UCR2); 603 598 temp |= (UCR2_RXEN | UCR2_TXEN); 604 599 writel(temp, sport->port.membase + UCR2); 600 + 601 + #if defined CONFIG_ARCH_MX2 || defined CONFIG_ARCH_MX3 602 + temp = readl(sport->port.membase + UCR3); 603 + temp |= UCR3_RXDMUXSEL; 604 + writel(temp, sport->port.membase + UCR3); 605 + #endif 605 606 606 607 /* 607 608 * Enable modem status interrupts ··· 1144 1133 if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS)) 1145 1134 sport->have_rtscts = 1; 1146 1135 1147 - if (pdata->init) 1148 - pdata->init(pdev); 1136 + if (pdata->init) { 1137 + ret = pdata->init(pdev); 1138 + if (ret) 1139 + goto clkput; 1140 + } 1149 1141 1150 1142 uart_add_one_port(&imx_reg, &sport->port); 1151 1143 platform_set_drvdata(pdev, &sport->port); 1152 1144 1153 1145 return 0; 1146 + clkput: 1147 + clk_put(sport->clk); 1148 + clk_disable(sport->clk); 1154 1149 unmap: 1155 1150 iounmap(sport->port.membase); 1156 1151 free: