···21#include <linux/init.h>22#include <linux/platform_device.h>23#include <linux/suspend.h>02425#include <asm/hardware.h>26#include <asm/arch/irqs.h>···166167 SLEEP_SAVE_PSTR,168169- SLEEP_SAVE_ICMR,170 SLEEP_SAVE_CKEN,171172 SLEEP_SAVE_SIZE···184 SAVE(GAFR1_L); SAVE(GAFR1_U);185 SAVE(GAFR2_L); SAVE(GAFR2_U);186187- SAVE(ICMR); ICMR = 0;188 SAVE(CKEN);189 SAVE(PSTR);190···209 PSSR = PSSR_RDH | PSSR_PH;210211 RESTORE(CKEN);212-213- ICLR = 0;214- ICCR = 1;215- RESTORE(ICMR);216 RESTORE(PSTR);217}218···299 &pxa25x_device_assp,300};301000000302static int __init pxa25x_init(void)303{304- int ret = 0;305306 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */307 if (cpu_is_pxa25x())···321322 pxa25x_init_pm();323000000324 ret = platform_add_devices(pxa25x_devices,325 ARRAY_SIZE(pxa25x_devices));00326 }0327 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */328 if (cpu_is_pxa25x())329 ret = platform_device_register(&pxa_device_hwuart);
···21#include <linux/init.h>22#include <linux/platform_device.h>23#include <linux/suspend.h>24+#include <linux/sysdev.h>2526#include <asm/hardware.h>27#include <asm/arch/irqs.h>···165166 SLEEP_SAVE_PSTR,1670168 SLEEP_SAVE_CKEN,169170 SLEEP_SAVE_SIZE···184 SAVE(GAFR1_L); SAVE(GAFR1_U);185 SAVE(GAFR2_L); SAVE(GAFR2_U);1860187 SAVE(CKEN);188 SAVE(PSTR);189···210 PSSR = PSSR_RDH | PSSR_PH;211212 RESTORE(CKEN);0000213 RESTORE(PSTR);214}215···304 &pxa25x_device_assp,305};306307+static struct sys_device pxa25x_sysdev[] = {308+ {309+ .cls = &pxa_irq_sysclass,310+ },311+};312+313static int __init pxa25x_init(void)314{315+ int i, ret = 0;316317 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */318 if (cpu_is_pxa25x())···320321 pxa25x_init_pm();322323+ for (i = 0; i < ARRAY_SIZE(pxa25x_sysdev); i++) {324+ ret = sysdev_register(&pxa25x_sysdev[i]);325+ if (ret)326+ pr_err("failed to register sysdev[%d]\n", i);327+ }328+329 ret = platform_add_devices(pxa25x_devices,330 ARRAY_SIZE(pxa25x_devices));331+ if (ret)332+ return ret;333 }334+335 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */336 if (cpu_is_pxa25x())337 ret = platform_device_register(&pxa_device_hwuart);