pxa25x.c (eff430de53be6f3328c3eebe93755f1ecf499e37) | pxa25x.c (2eaa03b5bebd1e80014f780d7bf27c3e66daefd6) |
---|---|
1/* 2 * linux/arch/arm/mach-pxa/pxa25x.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Jun 15, 2001 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code specific to PXA21x/25x/26x variants. --- 7 unchanged lines hidden (view full) --- 16 * initialization stuff for PXA machines which can be overridden later if 17 * need be. 18 */ 19#include <linux/module.h> 20#include <linux/kernel.h> 21#include <linux/init.h> 22#include <linux/platform_device.h> 23#include <linux/suspend.h> | 1/* 2 * linux/arch/arm/mach-pxa/pxa25x.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Jun 15, 2001 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code specific to PXA21x/25x/26x variants. --- 7 unchanged lines hidden (view full) --- 16 * initialization stuff for PXA machines which can be overridden later if 17 * need be. 18 */ 19#include <linux/module.h> 20#include <linux/kernel.h> 21#include <linux/init.h> 22#include <linux/platform_device.h> 23#include <linux/suspend.h> |
24#include <linux/sysdev.h> | 24#include <linux/syscore_ops.h> |
25#include <linux/irq.h> 26 27#include <asm/mach/map.h> 28#include <mach/hardware.h> 29#include <mach/irqs.h> 30#include <mach/gpio.h> 31#include <mach/pxa25x.h> 32#include <mach/reset.h> --- 312 unchanged lines hidden (view full) --- 345 &pxa25x_device_ssp, 346 &pxa25x_device_nssp, 347 &pxa25x_device_assp, 348 &pxa25x_device_pwm0, 349 &pxa25x_device_pwm1, 350 &pxa_device_asoc_platform, 351}; 352 | 25#include <linux/irq.h> 26 27#include <asm/mach/map.h> 28#include <mach/hardware.h> 29#include <mach/irqs.h> 30#include <mach/gpio.h> 31#include <mach/pxa25x.h> 32#include <mach/reset.h> --- 312 unchanged lines hidden (view full) --- 345 &pxa25x_device_ssp, 346 &pxa25x_device_nssp, 347 &pxa25x_device_assp, 348 &pxa25x_device_pwm0, 349 &pxa25x_device_pwm1, 350 &pxa_device_asoc_platform, 351}; 352 |
353static struct sys_device pxa25x_sysdev[] = { 354 { 355 .cls = &pxa_irq_sysclass, 356 }, { 357 .cls = &pxa2xx_mfp_sysclass, 358 }, { 359 .cls = &pxa_gpio_sysclass, 360 }, { 361 .cls = &pxa2xx_clock_sysclass, 362 } 363}; 364 | |
365static int __init pxa25x_init(void) 366{ | 353static int __init pxa25x_init(void) 354{ |
367 int i, ret = 0; | 355 int ret = 0; |
368 369 if (cpu_is_pxa25x()) { 370 371 reset_status = RCSR; 372 373 clkdev_add_table(pxa25x_clkregs, ARRAY_SIZE(pxa25x_clkregs)); 374 375 if ((ret = pxa_init_dma(IRQ_DMA, 16))) 376 return ret; 377 378 pxa25x_init_pm(); 379 | 356 357 if (cpu_is_pxa25x()) { 358 359 reset_status = RCSR; 360 361 clkdev_add_table(pxa25x_clkregs, ARRAY_SIZE(pxa25x_clkregs)); 362 363 if ((ret = pxa_init_dma(IRQ_DMA, 16))) 364 return ret; 365 366 pxa25x_init_pm(); 367 |
380 for (i = 0; i < ARRAY_SIZE(pxa25x_sysdev); i++) { 381 ret = sysdev_register(&pxa25x_sysdev[i]); 382 if (ret) 383 pr_err("failed to register sysdev[%d]\n", i); 384 } | 368 register_syscore_ops(&pxa_irq_syscore_ops); 369 register_syscore_ops(&pxa2xx_mfp_syscore_ops); 370 register_syscore_ops(&pxa_gpio_syscore_ops); 371 register_syscore_ops(&pxa2xx_clock_syscore_ops); |
385 386 ret = platform_add_devices(pxa25x_devices, 387 ARRAY_SIZE(pxa25x_devices)); 388 if (ret) 389 return ret; 390 } 391 392 /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ 393 if (cpu_is_pxa255()) 394 clkdev_add(&pxa25x_hwuart_clkreg); 395 396 return ret; 397} 398 399postcore_initcall(pxa25x_init); | 372 373 ret = platform_add_devices(pxa25x_devices, 374 ARRAY_SIZE(pxa25x_devices)); 375 if (ret) 376 return ret; 377 } 378 379 /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ 380 if (cpu_is_pxa255()) 381 clkdev_add(&pxa25x_hwuart_clkreg); 382 383 return ret; 384} 385 386postcore_initcall(pxa25x_init); |