pxa/vpac270: add ide support
Subsystems (3)
PATCH 1/1 pxa/vpac270: add ide support
This patch adds support for the on-board IDE channel. I tested this with a CDROM connected over 2.5-3.5 IDE reduction with external power supplied to the CDROM. This was not tested with the Voipac 270-HDD-000 (official Voipac HDD module), but I expect no problems.
--- arch/arm/mach-pxa/Kconfig | 1 + arch/arm/mach-pxa/include/mach/vpac270.h | 2 + arch/arm/mach-pxa/vpac270.c | 50 ++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/Kconfig +1 -0
@@ -258,6 +258,7 @@ config MACH_COLIBRI320 config MACH_VPAC270 bool "Voipac PXA270" select PXA27x + select HAVE_PATA_PLATFORM help PXA270 based Single Board Computer.
arch/arm/mach-pxa/include/mach/vpac270.h +2 -0
@@ -35,4 +35,6 @@#define GPIO114_VPAC270_ETH_IRQ 114 +#define GPIO36_VPAC270_IDE_IRQ 36 +#endif
arch/arm/mach-pxa/vpac270.c +50 -0
74 lines not on this page · raw message
Signature · 1 line
1.7.0
PATCH 1/1 pxa/vpac270: add ide support
Quoted 76 lines · Marek Vasut
This patch adds support for the on-board IDE channel. I tested this with a CDROM connected over 2.5-3.5 IDE reduction with external power supplied to the CDROM. This was not tested with the Voipac 270-HDD-000 (official Voipac HDD module), but I expect no problems.
Signed-off-by Marek Vasut <[email protected]>--- arch/arm/mach-pxa/Kconfig | 1 + arch/arm/mach-pxa/include/mach/vpac270.h | 2 + arch/arm/mach-pxa/vpac270.c | 50 ++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 0 deletions(-)arch/arm/mach-pxa/Kconfig +1
-0@@ -258,6 +258,7 @@ config MACH_COLIBRI320 config MACH_VPAC270 bool "Voipac PXA270" select PXA27x + select HAVE_PATA_PLATFORM help PXA270 based Single Board Computer.arch/arm/mach-pxa/include/mach/vpac270.h +2
-0@@ -35,4 +35,6 @@#define GPIO114_VPAC270_ETH_IRQ 114 +#define GPIO36_VPAC270_IDE_IRQ 36 +#endif arch/arm/mach-pxa/vpac270.c +19
-0@@ -23,6 +23,7 @@#include <linux/mtd/physmap.h> #include <linux/dm9000.h> #include <linux/ucb1400.h> +#include <linux/ata_platform.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -138,6 +139,10 @@ static unsigned long vpac270_pin_config[] __initdata = {/* I2C */ GPIO117_I2C_SCL ,GPIO118_I2C_SDA , + +/* IDE */ +GPIO36_GPIO ,/* IDE IRQ */ + GPIO80_DREQ_1, };/****************************************************************************** @@ -487,6 +492,50 @@ static inline void vpac270_lcd_init(void) {}#endif /****************************************************************************** +* PATA IDE +******************************************************************************/ +#if defined(CONFIG_PATA_PLATFORM ) || defined(CONFIG_PATA_PLATFORM_MODULE ) +static struct pata_platform_info vpac270_pata_pdata = { + .ioport_shift =1 , + .irq_flags =IRQF_TRIGGER_RISING , +}; + +static struct resource vpac270_ide_resources[] = { + [0 ] = {/* I/O Base address */ + .start =PXA_CS3_PHYS +0x120 , + .end =PXA_CS3_PHYS +0x13f , + .flags =IORESOURCE_MEM + },
arch/arm/mach-pxa/vpac270.c static inline void vpac270_lcd_init(void) {} · line 518
Quoted 10 lines
arch/arm/mach-pxa/vpac270.c +10
-0+ [1 ] = {/* CTL Base address */ + .start =PXA_CS3_PHYS +0x15c , + .end =PXA_CS3_PHYS +0x15f , + .flags =IORESOURCE_MEM + }, + [2 ] = {/* IDE IRQ pin */ + .start =gpio_to_irq (GPIO36_VPAC270_IDE_IRQ ), + .end =gpio_to_irq (GPIO36_VPAC270_IDE_IRQ ), + .flags =IORESOURCE_IRQ + }
I think you can rely on the compiler's ability to count the array members for you :)
Daniel
Quoted 39 lines
arch/arm/mach-pxa/vpac270.c +21
-0+}; + +static struct platform_device vpac270_ide_device = { + .name ="pata_platform" , + .num_resources =ARRAY_SIZE (vpac270_ide_resources), + .resource = vpac270_ide_resources, + .dev = { + .platform_data = &vpac270_pata_pdata, + } +}; + +static void __init vpac270_ide_init (void ) +{ +platform_device_register (&vpac270_ide_device); +} +#else +static inline void vpac270_ide_init (void ) {} +#endif + +/****************************************************************************** * Machine init ******************************************************************************/ static void __init vpac270_init (void )@@ -507,6 +556,7 @@ static void __init vpac270_init(void)vpac270_eth_init ();vpac270_ts_init ();vpac270_rtc_init (); +vpac270_ide_init (); }MACHINE_START (VPAC270 ,"Voipac PXA270" )Signature · 7 lines
1.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 pxa/vpac270: add ide support
Dne Po 26. dubna 2010 23:05:24 Daniel Mack napsal(a):
Quoted 105 lines · Marek Vasut
Quoted 104 lines
This patch adds support for the on-board IDE channel. I tested this with a CDROM connected over 2.5-3.5 IDE reduction with external power supplied to the CDROM. This was not tested with the Voipac 270-HDD-000 (official Voipac HDD module), but I expect no problems.
Signed-off-by Marek Vasut <[email protected]>---
arch/arm/mach-pxa/Kconfig | 1 + arch/arm/mach-pxa/include/mach/vpac270.h | 2 + arch/arm/mach-pxa/vpac270.c | 50++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/Kconfig +1
-0@@ -258,6 +258,7 @@ config MACH_COLIBRI320 config MACH_VPAC270 bool "Voipac PXA270" select PXA27x + select HAVE_PATA_PLATFORMarch/arm/mach-pxa/Kconfig +0
-0help PXA270 based Single Board Computer.(quoted diff) +0
-0
b/arch/arm/mach-pxa/include/mach/vpac270.hindex b90b380..0d82c47 100644arch/arm/mach-pxa/include/mach/vpac270.h +2
-0@@ -35,4 +35,6 @@#define GPIO114_VPAC270_ETH_IRQ 114 +#define GPIO36_VPAC270_IDE_IRQ 36 +#endif
arch/arm/mach-pxa/vpac270.c +1
-0@@ -23,6 +23,7 @@#include <linux/mtd/physmap.h> #include <linux/dm9000.h> #include <linux/ucb1400.h> +#include <linux/ata_platform.h> #include <
asm/mach-types.h>
#include <asm/mach/arch.h>arch/arm/mach-pxa/vpac270.c +4
-0@@ -138,6 +139,10 @@ static unsigned long vpac270_pin_config[] __initdata = {/* I2C */ GPIO117_I2C_SCL ,GPIO118_I2C_SDA , + +/* IDE */ +GPIO36_GPIO ,/* IDE IRQ */ + GPIO80_DREQ_1,};
/***********************************************************************
*******arch/arm/mach-pxa/vpac270.c +2
-0@@ -487,6 +492,50 @@ static inline void vpac270_lcd_init(void) {}#endif /*********************************************************************** ******* +* PATA IDE +************************************************************************
******/ +#ifdefined(CONFIG_PATA_PLATFORM)||defined(CONFIG_PATA_PLATFORM_MODULE)+static structpata_platform_infovpac270_pata_pdata= {arch/arm/mach-pxa/vpac270.c +15
-0+ .ioport_shift = 1, + .irq_flags = IRQF_TRIGGER_RISING, +}; + +static struct resource vpac270_ide_resources[] = { + [0 ] = {/* I/O Base address */ + .start =PXA_CS3_PHYS +0x120 , + .end =PXA_CS3_PHYS +0x13f , + .flags =IORESOURCE_MEM + }, + [1 ] = {/* CTL Base address */ + .start =PXA_CS3_PHYS +0x15c , + .end =PXA_CS3_PHYS +0x15f , + .flags =IORESOURCE_MEM + },
Quoted 8 lines
arch/arm/mach-pxa/vpac270.c static inline void vpac270_lcd_init(void) {} · line 518
Quoted 5 lines
arch/arm/mach-pxa/vpac270.c +5
-0+ [2 ] = {/* IDE IRQ pin */ + .start =gpio_to_irq (GPIO36_VPAC270_IDE_IRQ ), + .end =gpio_to_irq (GPIO36_VPAC270_IDE_IRQ ), + .flags =IORESOURCE_IRQ + }I think you can rely on the compiler's ability to count the array members for you :)
Sure, but it never hurts to be explicit to some extent.
Quoted 42 lines
Daniel
Quoted 39 lines
arch/arm/mach-pxa/vpac270.c +20
-0+}; + +static struct platform_device vpac270_ide_device = { + .name ="pata_platform" , + .num_resources =ARRAY_SIZE (vpac270_ide_resources), + .resource = vpac270_ide_resources, + .dev = { + .platform_data = &vpac270_pata_pdata, + } +}; + +static void __init vpac270_ide_init (void ) +{ +platform_device_register (&vpac270_ide_device); +} +#else +static inline void vpac270_ide_init (void ) {} +#endif + +/*********************************************************************** *******
* Machine init
***********************************************************************
*******/static void
__initvpac270_init(void)arch/arm/mach-pxa/vpac270.c +1
-0@@ -507,6 +556,7 @@ static void __init vpac270_init(void)vpac270_eth_init ();vpac270_ts_init ();vpac270_rtc_init (); +vpac270_ide_init ();}
MACHINE_START(VPAC270, "Voipac PXA270")
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
vpack270 and sleep mode
Dne ?t 25. kv?tna 2010 14:38:09 Marek Vasut napsal(a):
Quoted 11 lines
Dne ?t 25. kv?tna 2010 14:13:01 237 Rumjantsev Egor (PROG) napsal(a):
Quoted 1 line
Hello, Marek
Hi,
Quoted 3 lines
Could you help to solve the following problem:
I try to move my board based on Voipac PXA270 module to sleep state. I'm running kernel 2.6.28.10 on it.CCed Voipac and linux-arm-kernel. Btw. that's not Voipac official kernel, is it?
My bad, CCed wrong linux-arm-kernel, fixed now :)
Quoted 62 lines
Quoted 5 lines
When i try echo mem >
/sys/power/statei see messages that system goes to sleep state but after pushing wake-up button (GPIO0) i don't see that a bootloader is running (i set up some GPIOs as flags in bootloader and see on them whith oscilloscope).The bootloader checks RCSR once you wake it up and it sets-up SDRAM. If there's a sleep-wakeup bit, it branches to location in PSPR and there's linux kernel already.
Quoted 32 lines
This is a part of kernel output when the system goes to sleep mode:
dm9000 dm9000.0: LATE suspend
platform pxa27x-pwm.1: LATE suspend
platform pxa27x-pwm.0: LATE suspend
platform pxa27x-ssp.2: LATE suspend
platform pxa27x-ssp.1: LATE suspend
platform pxa27x-ssp.0: LATE suspend
pxa2xx-i2c pxa2xx-i2c.1: LATE suspend
platform sa1100-rtc: LATE suspend
platform pxa2xx-i2s: LATE suspend
pxa2xx-uart pxa2xx-uart.2: LATE suspend
pxa2xx-uart pxa2xx-uart.1: LATE suspend
pxa2xx-uart pxa2xx-uart.0: LATE suspend
platform pxa27x-udc: LATE suspendpxa_pm_enter(): RCSR value:0x00000000pxa_pm_enter(): state: 3pxa_pm_enter(): Power regs:pxa_pm_enter(): GPDR0:0x0070E200pxa_pm_enter(): PWER:0x00000001pxa_pm_enter(): PFER:0x00000000pxa_pm_enter(): PRER:0x00000001pxa_pm_enter(): PGSR0:0x00010000pxa_pm_enter(): PGSR1:0x000F2000pxa_pm_enter(): PGSR2:0x0404C000pxa_pm_enter(): PGSR3:0x00000020pxa27x_cpu_pm_enter(): go to suspend : 3pxa27x_cpu_pm_enter(): PCFR :0x61pxa27x_cpu_pm_enter(): PSSR :0x0pxa27x_cpu_pm_enter(): PSLR :0xCC100004pxa27x_cpu_pm_enter(): OSCC :0x3Quoted 5 lines
but if i type command echo standby >
/sys/power/state
the system reacts on wake-up button but hangs after some messages about null dereferencing pointers.is there any possibility to trace such problem?
Try
CONFIG_PM_ADVANCED_DEBUG. Enable that and check if the tests work, one by one. What are the messages you get once the kernel crashes?There was also a way to keep the console enabled until the kernel didn't totally suspend, but I can't find that option now, maybe someone will be more successful. And maybe I'm mistaking this with an option to don't blank consoles until then, it's been some time since I needed that.
Quoted 2 lines
P.S.: sorry if i disturb you, but you the only man in ARM linux mailing list who posted messages about Voipac modules.You're welcome.
Quoted 1 line
Best regards !!!
vpack270 and sleep mode
25.05.2010 18:39, Marek Vasut ?????:
Quoted 12 lines
Dne ?t 25. kv?tna 2010 14:38:09 Marek Vasut napsal(a):
Quoted 11 lines
Dne ?t 25. kv?tna 2010 14:13:01 237 Rumjantsev Egor (PROG) napsal(a):
Quoted 1 line
Hello, Marek
Hi,
Quoted 3 lines
Could you help to solve the following problem:
I try to move my board based on Voipac PXA270 module to sleep state. I'm running kernel 2.6.28.10 on it.CCed Voipac and linux-arm-kernel. Btw. that's not Voipac official kernel, is it?
Yes it isn't. I patched vanilla kernel to get basic Voipac module support and add some my code for our board.
Quoted 12 lines
My bad, CCed wrong linux-arm-kernel, fixed now :)
Quoted 10 lines
Quoted 5 lines
When i try echo mem>
/sys/power/statei see messages that system goes to sleep state but after pushing wake-up button (GPIO0) i don't see that a bootloader is running (i set up some GPIOs as flags in bootloader and see on them whith oscilloscope).The bootloader checks RCSR once you wake it up and it sets-up SDRAM. If there's a sleep-wakeup bit, it branches to location in PSPR and there's linux kernel already.
i know that as i have to use U-boot 1.3.0 for my board. It's also not Voipac's u-boot version.
I set or clear some of GPIO depending of reason we enter on bootloader. And after pushing wake-up button my flags state doen't change.
Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
This is a part of kernel output when the system goes to sleep mode:
dm9000 dm9000.0: LATE suspend
platform pxa27x-pwm.1: LATE suspend
platform pxa27x-pwm.0: LATE suspend
platform pxa27x-ssp.2: LATE suspend
platform pxa27x-ssp.1: LATE suspend
platform pxa27x-ssp.0: LATE suspend
pxa2xx-i2c pxa2xx-i2c.1: LATE suspend
platform sa1100-rtc: LATE suspend
platform pxa2xx-i2s: LATE suspend
pxa2xx-uart pxa2xx-uart.2: LATE suspend
pxa2xx-uart pxa2xx-uart.1: LATE suspend
pxa2xx-uart pxa2xx-uart.0: LATE suspend
platform pxa27x-udc: LATE suspendpxa_pm_enter(): RCSR value:0x00000000pxa_pm_enter(): state: 3pxa_pm_enter(): Power regs:pxa_pm_enter(): GPDR0:0x0070E200pxa_pm_enter(): PWER:0x00000001pxa_pm_enter(): PFER:0x00000000pxa_pm_enter(): PRER:0x00000001pxa_pm_enter(): PGSR0:0x00010000pxa_pm_enter(): PGSR1:0x000F2000pxa_pm_enter(): PGSR2:0x0404C000pxa_pm_enter(): PGSR3:0x00000020pxa27x_cpu_pm_enter(): go to suspend : 3pxa27x_cpu_pm_enter(): PCFR :0x61pxa27x_cpu_pm_enter(): PSSR :0x0pxa27x_cpu_pm_enter(): PSLR :0xCC100004pxa27x_cpu_pm_enter(): OSCC :0x3
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
but if i type command echo standby>
/sys/power/state
the system reacts on wake-up button but hangs after some messages about null dereferencing pointers.is there any possibility to trace such problem?
Try
CONFIG_PM_ADVANCED_DEBUG.
i've looked through kernel sources and didn't such identifer
Enable that and check if the tests work, one
Quoted 2 lines
Quoted 2 lines
by one. What are the messages you get once the kernel crashes?
i've tryied to run tests.
echo devices > /sys/power/pm_test works fine
echo core > /sys/power/pm_test hangs with:
suspend debug: Waiting for 5 seconds.
platform pxa27x-udc: EARLY resume
pxa2xx-uart pxa2xx-uart.0: EARLY resume
pxa2xx-uart pxa2xx-uart.1: EARLY resume
pxa2xx-uart pxa2xx-uart.2: EARLY resume
platform pxa2xx-i2s: EARLY resume
platform sa1100-rtc: EARLY resume
platform pxa2xx-i2c.1: EARLY resume
platform pxa27x-ssp.0: EARLY resume
platform pxa27x-ssp.1: EARLY resume
platform pxa27x-ssp.2: EARLY resume
platform pxa27x-pwm.0: EARLY resume
platform pxa27x-pwm.1: EARLY resume
dm9000 dm9000.0: EARLY resume
vpac270-ssp vpac270-ssp.0: EARLY resume
platform vpac270-pm.0: EARLY resume
platform pxa_g64_driver.0: EARLY resume
platform pxa2xx_dir_keypad.0: EARLY resume
platform pxa_capture.0: EARLY resume
platform pxa2xx-ac97: EARLY resume
platform mfrc531-ssp.0: EARLY resume
pxa2xx-flash pxa2xx-flash.0: EARLY resume
Unable to handle kernel paging request at virtual address a03ab26f pgd = c7b10000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 pxa_reg Unable to handle kernel paging request at virtual address a03ab26f pgd = c7b10000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 pxa_reg CPU: 0 Not tainted (2.6.28.10-vpac3-splash #90) PC is at bad_channel+0x80166/0x91f28 LR is at platform_pm_resume_noirq+0x48/0x54 pc : [<a03ab23e>] lr : [<a01cb758>] psr: a00000b3
sp : c6b3be64 ip : c6b3be74 fp : c6b3be70
r10: 00000004 r9 : c79711b4 r8 : c7a1e000
r7 : 00000005 r6 : a03da1b0 r5 : a03f22e4 r4 : a03dd328 r3 : a03ab23b r2 : 00000000 r1 : a03f22e4 r0 : a03dd320
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment user
Control: 0000397f Table: a7b10000 DAC: 00000015
Process sh (pid: 309, stack limit = 0xc6b3a268)
Stack: (0xc6b3be64 to 0xc6b3c000)
be60: c6b3be88 c6b3be74 a01cd9b0 a01cb71c a03dd328 00000010c6b3bea8
be80: c6b3be8c a01ce248 a01cd968 00000010 00000000 00000003 a030d660 c6b3bebc
bea0: c6b3beac a01ce8c8 a01ce1e4 00000000 c6b3bed8 c6b3bec0 a006fd10 a01ce8b8
bec0: 0000db96 a038c7db 00000003 c6b3bef4 c6b3bedc a006ff20 a006fc10 a038c7db
bee0: 00000003 00000003 c6b3bf1c c6b3bef8 a0070040 a006fdfc c780dc14 00000004
bf00: c79711a0 c781ada0 a03eeea4 c6b3bf80 c6b3bf2c c6b3bf20 a018afe8 a006ffb0
bf20: c6b3bf58 c6b3bf30 a00e1da8 a018afd0 c7ab1b20 4001d000 c6b3bf80 00000004
bf40: a00300a4 c6b3a000 00000000 c6b3bf7c c6b3bf5c a0099b58 a00e1ca8 c6b3bf80
bf60: 00000000 00000000 c7ab1b20 00000004 c6b3bfa4 c6b3bf80 a0099cb8 a0099ab0
bf80: 00000000 00000000 00000000 00000004 4001d000 401565f8 00000000 c6b3bfa8
bfa0: a002ff00 a0099c78 00000004 4001d000 00000001 4001d000 00000004 00000000
bfc0: 00000004 4001d000 401565f8 00000004 00000001 9ef94b58 00000000 9ef94a44
bfe0: 00000000 9ef9498c 4008df64 400e28b4 60000010 00000001 80936021 80936421
Backtrace: [<a01cb710>] (platform_pm_resume_noirq+0x0/0x54) from [<a01cd9b0>] (pm_noirq_op+0x54/0x88) [<a01cd95c>] (pm_noirq_op+0x0/0x88) from [<a01ce248>] (dpm_power_up+0x70/0xec) r5:00000010 r4:a03dd328 [<a01ce1d8>] (dpm_power_up+0x0/0xec) from [<a01ce8c8>] (device_power_up+0x1c/0x20) r7:a030d660 r6:00000003 r5:00000000 r4:00000010 [<a01ce8ac>] (device_power_up+0x0/0x20) from [<a006fd10>] (suspend_devices_and_enter+0x10c/0x1b4) r4:00000000 [<a006fc04>] (suspend_devices_and_enter+0x0/0x1b4) from [<a006ff20>] (enter_state+0x130/0x1b4) r6:00000003 r5:a038c7db r4:0000db96 [<a006fdf0>] (enter_state+0x0/0x1b4) from [<a0070040>] (state_store+0x9c/0xc4) r6:00000003 r5:00000003 r4:a038c7db [<a006ffa4>] (state_store+0x0/0xc4) from [<a018afe8>] (kobj_attr_store+0x24/0x28) [<a018afc4>] (kobj_attr_store+0x0/0x28) from [<a00e1da8>] (sysfs_write_file+0x10c/0x144) [<a00e1c9c>] (sysfs_write_file+0x0/0x144) from [<a0099b58>] (vfs_write+0xb4/0x140) [<a0099aa4>] (vfs_write+0x0/0x140) from [<a0099cb8>] (sys_write+0x4c/0x80) r7:00000004 r6:c7ab1b20 r5:00000000 r4:00000000 [<a0099c6c>] (sys_write+0x0/0x80) from [<a002ff00>] (ret_fast_syscall+0x0/0x2c) r6:401565f8 r5:4001d000 r4:00000004 Code: 74732820 20657461 0a296425 69666300 (646d635f) ---[ end trace 213b55b29148afbf ]---
eth0: link down
Quoted 12 lines
Quoted 11 lines
There was also a way to keep the console enabled until the kernel didn't totally suspend, but I can't find that option now, maybe someone will be more successful. And maybe I'm mistaking this with an option to don't blank consoles until then, it's been some time since I needed that.
Quoted 2 lines
P.S.: sorry if i disturb you, but you the only man in ARM linux mailing list who posted messages about Voipac modules.You're welcome.
Quoted 1 line
Best regards !!!
Signature · 1 line
Rumjantsev Egor
vpack270 and sleep mode
Dne ?t 25. kv?tna 2010 15:26:54 237 Rumjantsev Egor (PROG) napsal(a):
Quoted 11 lines
25.05.2010 18:39, Marek Vasut ?????:
Quoted 10 lines
Dne ?t 25. kv?tna 2010 14:38:09 Marek Vasut napsal(a):
Quoted 9 lines
Dne ?t 25. kv?tna 2010 14:13:01 237 Rumjantsev Egor (PROG) napsal(a):
Quoted 1 line
Hello, Marek
Hi,
Quoted 3 lines
Could you help to solve the following problem:
I try to move my board based on Voipac PXA270 module to sleep state. I'm running kernel 2.6.28.10 on it.
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
CCed Voipac and linux-arm-kernel. Btw. that's not Voipac official kernel, is it?
Yes it isn't. I patched vanilla kernel to get basic Voipac module support and add some my code for our board.
Please, use what's in mainline then. (git.kernel.org, search for ycmiao, use - devel branch).
Quoted 8 lines
Quoted 8 lines
My bad, CCed wrong linux-arm-kernel, fixed now :)
Quoted 5 lines
Quoted 4 lines
When i try echo mem>
/sys/power/statei see messages that system goes to sleep state but after pushing wake-up button (GPIO0) i don't see that a bootloader is running (i set up some GPIOs as flags in bootloader and see on them whith oscilloscope).
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
The bootloader checks RCSR once you wake it up and it sets-up SDRAM. If there's a sleep-wakeup bit, it branches to location in PSPR and there's linux kernel already.
i know that as i have to use U-boot 1.3.0 for my board. It's also not Voipac's u-boot version.
Can't you use u-boot-pxa from git.denx.de ?
Quoted 39 lines
I set or clear some of GPIO depending of reason we enter on bootloader. And after pushing wake-up button my flags state doen't change.
Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
This is a part of kernel output when the system goes to sleep mode:
dm9000 dm9000.0: LATE suspend
platform pxa27x-pwm.1: LATE suspend
platform pxa27x-pwm.0: LATE suspend
platform pxa27x-ssp.2: LATE suspend
platform pxa27x-ssp.1: LATE suspend
platform pxa27x-ssp.0: LATE suspend
pxa2xx-i2c pxa2xx-i2c.1: LATE suspend
platform sa1100-rtc: LATE suspend
platform pxa2xx-i2s: LATE suspend
pxa2xx-uart pxa2xx-uart.2: LATE suspend
pxa2xx-uart pxa2xx-uart.1: LATE suspend
pxa2xx-uart pxa2xx-uart.0: LATE suspend
platform pxa27x-udc: LATE suspendpxa_pm_enter(): RCSR value:0x00000000pxa_pm_enter(): state: 3pxa_pm_enter(): Power regs:pxa_pm_enter(): GPDR0:0x0070E200pxa_pm_enter(): PWER:0x00000001pxa_pm_enter(): PFER:0x00000000pxa_pm_enter(): PRER:0x00000001pxa_pm_enter(): PGSR0:0x00010000pxa_pm_enter(): PGSR1:0x000F2000pxa_pm_enter(): PGSR2:0x0404C000pxa_pm_enter(): PGSR3:0x00000020pxa27x_cpu_pm_enter(): go to suspend : 3pxa27x_cpu_pm_enter(): PCFR :0x61pxa27x_cpu_pm_enter(): PSSR :0x0pxa27x_cpu_pm_enter(): PSLR :0xCC100004pxa27x_cpu_pm_enter(): OSCC :0x3but if i type command echo standby>
/sys/power/state
the system reacts on wake-up button but hangs after some messages about null dereferencing pointers.
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
is there any possibility to trace such problem?
Try
CONFIG_PM_ADVANCED_DEBUG.i've looked through kernel sources and didn't such identifer
Maybe you need newer kernel, see above.
Quoted 110 lines
Enable that and check if the tests work, one
Quoted 1 line
Quoted 1 line
by one. What are the messages you get once the kernel crashes?
i've tryied to run tests.
echo devices >/sys/power/pm_testworks fine
echo core >/sys/power/pm_testhangs with:suspend debug: Waiting for 5 seconds.
platform pxa27x-udc: EARLY resume
pxa2xx-uart pxa2xx-uart.0: EARLY resume
pxa2xx-uart pxa2xx-uart.1: EARLY resume
pxa2xx-uart pxa2xx-uart.2: EARLY resume
platform pxa2xx-i2s: EARLY resume
platform sa1100-rtc: EARLY resume
platform pxa2xx-i2c.1: EARLY resume
platform pxa27x-ssp.0: EARLY resume
platform pxa27x-ssp.1: EARLY resume
platform pxa27x-ssp.2: EARLY resume
platform pxa27x-pwm.0: EARLY resume
platform pxa27x-pwm.1: EARLY resume
dm9000 dm9000.0: EARLY resume
vpac270-ssp vpac270-ssp.0: EARLY resume
platform vpac270-pm.0: EARLY resume
platform pxa_g64_driver.0: EARLY resume
platform pxa2xx_dir_keypad.0: EARLY resume
platform pxa_capture.0: EARLY resume
platform pxa2xx-ac97: EARLY resume
platform mfrc531-ssp.0: EARLY resume
pxa2xx-flash pxa2xx-flash.0: EARLY resumeUnable to handle kernel paging request at virtual address a03ab26f pgd = c7b10000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 pxa_reg Unable to handle kernel paging request at virtual address a03ab26f pgd = c7b10000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 pxa_reg CPU: 0 Not tainted (2.6.28.10-vpac3-splash #90) PC is at bad_channel+0x80166/0x91f28 LR is at platform_pm_resume_noirq+0x48/0x54 pc : [<a03ab23e>] lr : [<a01cb758>] psr: a00000b3sp :
c6b3be64ip :c6b3be74fp :c6b3be70
r10: 00000004 r9 :c79711b4r8 :c7a1e000
r7 : 00000005 r6 :a03da1b0r5 :a03f22e4r4 :a03dd328r3 :a03ab23br2 : 00000000 r1 :a03f22e4r0 :a03dd320
Flags: NzCv IRQs off FIQs on ModeSVC_32ISA Thumb Segment user
Control:0000397fTable:a7b10000DAC: 00000015
Process sh (pid: 309, stack limit =0xc6b3a268)Stack: (0xc6b3be64 to 0xc6b3c000)be60:
c6b3be88c6b3be74a01cd9b0a01cb71ca03dd32800000010c6b3bea8
be80:c6b3be8ca01ce248a01cd96800000010 00000000 00000003a030d660c6b3bebc
bea0:c6b3beaca01ce8c8a01ce1e400000000c6b3bed8c6b3bec0a006fd10a01ce8b8
bec0:0000db96a038c7db00000003c6b3bef4c6b3bedca006ff20a006fc10a038c7db
bee0: 00000003 00000003c6b3bf1cc6b3bef8a0070040a006fdfcc780dc1400000004
bf00:c79711a0c781ada0a03eeea4c6b3bf80c6b3bf2cc6b3bf20a018afe8a006ffb0
bf20:c6b3bf58c6b3bf30a00e1da8a018afd0c7ab1b204001d000c6b3bf8000000004
bf40:a00300a4c6b3a00000000000c6b3bf7cc6b3bf5ca0099b58a00e1ca8c6b3bf80
bf60: 00000000 00000000c7ab1b2000000004c6b3bfa4c6b3bf80a0099cb8a0099ab0
bf80: 00000000 00000000 00000000 000000044001d000401565f800000000c6b3bfa8
bfa0:a002ff00a0099c78000000044001d000000000014001d00000000004 00000000
bfc0: 000000044001d000401565f800000004 000000019ef94b58000000009ef94a44
bfe0: 000000009ef9498c4008df64400e28b460000010 00000001 80936021 80936421Backtrace: [<a01cb710>] (platform_pm_resume_noirq+0x0/0x54) from [<a01cd9b0>] (pm_noirq_op+0x54/0x88) [<a01cd95c>] (pm_noirq_op+0x0/0x88) from [<a01ce248>] (dpm_power_up+0x70/0xec) r5:00000010 r4:a03dd328 [<a01ce1d8>] (dpm_power_up+0x0/0xec) from [<a01ce8c8>] (device_power_up+0x1c/0x20) r7:a030d660 r6:00000003 r5:00000000 r4:00000010 [<a01ce8ac>] (device_power_up+0x0/0x20) from [<a006fd10>] (suspend_devices_and_enter+0x10c/0x1b4) r4:00000000 [<a006fc04>] (suspend_devices_and_enter+0x0/0x1b4) from [<a006ff20>] (enter_state+0x130/0x1b4) r6:00000003 r5:a038c7db r4:0000db96 [<a006fdf0>] (enter_state+0x0/0x1b4) from [<a0070040>] (state_store+0x9c/0xc4) r6:00000003 r5:00000003 r4:a038c7db [<a006ffa4>] (state_store+0x0/0xc4) from [<a018afe8>] (kobj_attr_store+0x24/0x28) [<a018afc4>] (kobj_attr_store+0x0/0x28) from [<a00e1da8>] (sysfs_write_file+0x10c/0x144) [<a00e1c9c>] (sysfs_write_file+0x0/0x144) from [<a0099b58>] (vfs_write+0xb4/0x140) [<a0099aa4>] (vfs_write+0x0/0x140) from [<a0099cb8>] (sys_write+0x4c/0x80) r7:00000004 r6:c7ab1b20 r5:00000000 r4:00000000 [<a0099c6c>] (sys_write+0x0/0x80) from [<a002ff00>] (ret_fast_syscall+0x0/0x2c) r6:401565f8 r5:4001d000 r4:00000004 Code: 74732820 20657461 0a296425 69666300 (646d635f) ---[ end trace 213b55b29148afbf ]---
Quoted 1 line
eth0: link down
What's pxa_reg module? Does it have proper suspend/resume functions?
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
There was also a way to keep the console enabled until the kernel didn't totally suspend, but I can't find that option now, maybe someone will be more successful. And maybe I'm mistaking this with an option to don't blank consoles until then, it's been some time since I needed that.
Quoted 2 lines
P.S.: sorry if i disturb you, but you the only man in ARM linux mailing list who posted messages about Voipac modules.You're welcome.
Quoted 1 line
Best regards !!!
vpack270 and sleep mode
25.05.2010 21:02, Marek Vasut ?????:
Quoted 12 lines
Dne ?t 25. kv?tna 2010 15:26:54 237 Rumjantsev Egor (PROG) napsal(a):
Quoted 11 lines
25.05.2010 18:39, Marek Vasut ?????:
Quoted 10 lines
Dne ?t 25. kv?tna 2010 14:38:09 Marek Vasut napsal(a):
Quoted 9 lines
Dne ?t 25. kv?tna 2010 14:13:01 237 Rumjantsev Egor (PROG) napsal(a):
Quoted 1 line
Hello, Marek
Hi,
Quoted 3 lines
Could you help to solve the following problem:
I try to move my board based on Voipac PXA270 module to sleep state. I'm running kernel 2.6.28.10 on it.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
CCed Voipac and linux-arm-kernel. Btw. that's not Voipac official kernel, is it?
Yes it isn't. I patched vanilla kernel to get basic Voipac module support and add some my code for our board.
Please, use what's in mainline then. (git.kernel.org, search for ycmiao, use - devel branch).
i did so. I downloaded 2.6.28.10 sources, patched it to get basic support for Voipac module and add some my platform devices.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
My bad, CCed wrong linux-arm-kernel, fixed now :)
Quoted 5 lines
Quoted 4 lines
When i try echo mem>
/sys/power/statei see messages that system goes
to sleep state but after pushing wake-up button (GPIO0) i don't see that a bootloader is running (i set up some GPIOs as flags in bootloader and see on them whith oscilloscope).
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
The bootloader checks RCSR once you wake it up and it sets-up SDRAM. If there's a sleep-wakeup bit, it branches to location in PSPR and there's linux kernel already.
i know that as i have to use U-boot 1.3.0 for my board. It's also not Voipac's u-boot version.
Can't you use u-boot-pxa from git.denx.de ?
u-boot-2009.11.1 haven't Voipac or Toradex Colibri support.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
but if i type command echo standby>
/sys/power/state
the system reacts on wake-up button but hangs after some messages about null dereferencing pointers.
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
is there any possibility to trace such problem?
Try
CONFIG_PM_ADVANCED_DEBUG.i've looked through kernel sources and didn't such identifer
Maybe you need newer kernel, see above.
May be....but then i need to rewrite some of hardware drivers as drivers api for some kind of devices has changed since 2.6.28.
When i run 2.6.24 kernel on Toradex Colibri module i haven't such troubles so i hope that 2.6.28 can work with sleep mode.
Quoted 2 lines
What's
pxa_regmodule? Does it have proper suspend/resume functions?
No, it doesn't. I unloaded it but all the same - kernel hangs
Quoted 13 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
There was also a way to keep the console enabled until the kernel didn't totally suspend, but I can't find that option now, maybe someone will be more successful. And maybe I'm mistaking this with an option to don't blank consoles until then, it's been some time since I needed that.
Quoted 2 lines
P.S.: sorry if i disturb you, but you the only man in ARM linux mailing list who posted messages about Voipac modules.You're welcome.
Quoted 1 line
Best regards !!!
Signature · 1 line
Rumjantsev Egor
vpack270 and sleep mode
In reply to 237 Rumjantsev Egor (PROG)Quoted 8 lines · On Tue, May 25, 2010 at 07:26:54PM +0600, 237 Rumjantsev Egor (PROG) wrote:
Unable to handle kernel paging request at virtual address a03ab26f pgd = c7b10000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 pxa_reg CPU: 0 Not tainted (2.6.28.10-vpac3-splash #90) PC is at bad_channel+0x80166/0x91f28 LR is at platform_pm_resume_noirq+0x48/0x54
My guess is that some platform driver hasn't been properly updated, and was registered using driver_register() rather than platform_driver_register().
Check your platform drivers to make sure that they're properly up to date.
vpack270 and sleep mode
Dne ?t 25. kv?tna 2010 22:24:47 Russell King - ARM Linux napsal(a):
Quoted 10 lines · On Tue, May 25, 2010 at 07:26:54PM +0600, 237 Rumjantsev Egor (PROG) wrote:
Quoted 8 lines
Unable to handle kernel paging request at virtual address a03ab26f pgd = c7b10000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 pxa_reg CPU: 0 Not tainted (2.6.28.10-vpac3-splash #90) PC is at bad_channel+0x80166/0x91f28 LR is at platform_pm_resume_noirq+0x48/0x54
Quoted 6 lines
My guess is that some platform driver hasn't been properly updated, and was registered using
driver_register()rather thanplatform_driver_register().Check your platform drivers to make sure that they're properly up to date.
I suspect that pxa_reg module. Like I said earlier.
vpack270 and sleep mode
26.05.2010 02:47, Marek Vasut ?????:
Quoted 11 lines
Dne ?t 25. kv?tna 2010 22:24:47 Russell King - ARM Linux napsal(a):
Quoted 10 lines · On Tue, May 25, 2010 at 07:26:54PM +0600, 237 Rumjantsev Egor (PROG) wrote:
Quoted 8 lines
Unable to handle kernel paging request at virtual address a03ab26f pgd = c7b10000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 pxa_reg CPU: 0 Not tainted (2.6.28.10-vpac3-splash #90) PC is at bad_channel+0x80166/0x91f28 LR is at platform_pm_resume_noirq+0x48/0x54
Quoted 9 lines
Quoted 6 lines
My guess is that some platform driver hasn't been properly updated, and was registered using
driver_register()rather thanplatform_driver_register().Check your platform drivers to make sure that they're properly up to date.
I suspect that
pxa_regmodule. Like I said earlier.
i've tried to run the kernel without loading pxa_reg but core test still fails.
Here is a part of boot & core pm test logs. As you can see there is the only ipv6 module loaded.
Do i have to remove one by one platform devices from my machine description to find which device fails to suspend/resume ?
I forgot to say that i use root file system via NFS. Can it be a problem in suspend/resume process ?
Starting syslog daemon
Starting klog daemon
Starting system message bus:... OK
Bringing up loopback interface
ip: RTNETLINK answers: File exists
Enabling IPv4 packet forwarding
net.ipv4.ip_forward = 1
Bringing up interface bnep0
ifup: ignoring unknown interface bnep0
Bringing up interface eth0
ip: RTNETLINK answers: File exists
$Starting APM daemon: OK
Starting proftpdwarning: `proftpd' uses 32-bit capabilities (legacy support in use)
...OK
mount: can't find /mnt/flash in /etc/fstab or /etc/mtab /usr/sbin/alsactl: load_state:1608: No soundcards found... Starting sshd
NET: Registered protocol family 10
startup success
hwclock: can't open '/dev/misc/rtc': No such file or directory time zone info file /usr/share/zoneinfo/Asia/Yekaterinburg used
25567 00021.314 647.0 48.9 1274844525650972.8 110000.6 0
hwclock: can't open '/dev/misc/rtc': No such file or directory
PM: Adding info for No Bus:vcs1
PM: Adding info for No Bus:vcsa1
PM: Adding info for No Bus:vcs2
PM: Adding info for No Bus:vcsa2
PM: Removing info for No Bus:vcs2
PM: Removing info for No Bus:vcsa2
PM: Adding info for No Bus:vcs2
PM: Adding info for No Bus:vcsa2
PM: Adding info for No Bus:vcs3
PM: Adding info for No Bus:vcsa3pxafb_getmode(): search proper modepxafb_getmode(): found mode[0] w: 320 h: 240 pxafb_check_var(): depth: 32pxafb_check_var(): found our modepxafb_bpp_to_lccr3(): our mode selected
eth0: no IPv6 routers presentpxa_pm_valid(): enter to pm valid: 3
Power regs:
GPDR0: 0xCBF9E200
PWER: 0x00000001
PFER: 0x00000000
PRER: 0x00000001
PGSR0: 0x00010000
PGSR1: 0x000F2000
PGSR2: 0x0404C000
PGSR3: 0x00000020pxa_pm_valid(): go to pxa_valid
PM: Syncing filesystems ... done.
PM: Preparing system for mem sleeppxafb_getmode(): search proper modepxafb_getmode(): found mode[0] w: 320 h: 240 pxafb_check_var(): depth: 32pxafb_check_var(): found our modepxafb_bpp_to_lccr3(): our mode selected
Freezing user space processes ... (elapsed 0.01 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
PM: Entering mem sleep
platform pxa27x-udc: preparing suspend
pxa2xx-uart pxa2xx-uart.0: preparing suspend
pxa2xx-uart pxa2xx-uart.1: preparing suspend
pxa2xx-uart pxa2xx-uart.2: preparing suspend
platform pxa2xx-i2s: preparing suspend
platform sa1100-rtc: preparing suspend
platform pxa2xx-i2c.1: preparing suspend
platform pxa27x-ssp.0: preparing suspend
platform pxa27x-ssp.1: preparing suspend
platform pxa27x-ssp.2: preparing suspend
platform pxa27x-pwm.0: preparing suspend
platform pxa27x-pwm.1: preparing suspend
dm9000 dm9000.0: preparing suspend
vpac270-ssp vpac270-ssp.0: preparing suspend
platform vpac270-pm.0: preparing suspend
platform pxa_g64_driver.0: preparing suspend
platform pxa2xx_dir_keypad.0: preparing suspend
platform pxa_capture.0: preparing suspend
platform pxa2xx-ac97: preparing suspend
platform mfrc531-ssp.0: preparing suspend
pxa2xx-flash pxa2xx-flash.0: preparing suspend
platform pxa2xx-mci.0: preparing suspend
platform pxa2xx-i2c.0: preparing suspend
pxa2xx-fb pxa2xx-fb: preparing suspend
pxa27x-ohci pxa27x-ohci: preparing suspend
platform regulatory.0: preparing suspend
usb usb1: preparing type suspend, may wakeup
usb usb1: type suspend, may wakeup
platform regulatory.0: suspend
pxa27x-ohci pxa27x-ohci: suspend
pxa2xx-fb pxa2xx-fb: suspend
platform pxa2xx-i2c.0: suspend
platform pxa2xx-mci.0: suspend
pxa2xx-flash pxa2xx-flash.0: suspend
platform mfrc531-ssp.0: suspend
platform pxa2xx-ac97: suspend
platform pxa_capture.0: suspend
platform pxa2xx_dir_keypad.0: suspend
platform pxa_g64_driver.0: suspend
platform vpac270-pm.0: suspend
vpac270-ssp vpac270-ssp.0: suspend
dm9000 dm9000.0: suspend
platform pxa27x-pwm.1: suspend
platform pxa27x-pwm.0: suspend
platform pxa27x-ssp.2: suspend
platform pxa27x-ssp.1: suspend
platform pxa27x-ssp.0: suspend
platform pxa2xx-i2c.1: suspend
platform sa1100-rtc: suspend
platform pxa2xx-i2s: suspend
pxa2xx-uart pxa2xx-uart.2: suspend
pxa2xx-uart pxa2xx-uart.1: suspend
pxa2xx-uart pxa2xx-uart.0: suspend
platform pxa27x-udc: suspendpxa_pm_prepare(): enter to pm prepare pxa27x_cpu_pm_prepare(): prepare to suspend
platform regulatory.0: LATE suspend
pxa27x-ohci pxa27x-ohci: LATE suspend
pxa2xx-fb pxa2xx-fb: LATE suspend
platform pxa2xx-i2c.0: LATE suspend
platform pxa2xx-mci.0: LATE suspend
pxa2xx-flash pxa2xx-flash.0: LATE suspend
platform mfrc531-ssp.0: LATE suspend
platform pxa2xx-ac97: LATE suspend
platform pxa_capture.0: LATE suspend
platform pxa2xx_dir_keypad.0: LATE suspend
platform pxa_g64_driver.0: LATE suspend
platform vpac270-pm.0: LATE suspend
vpac270-ssp vpac270-ssp.0: LATE suspend
dm9000 dm9000.0: LATE suspend
platform pxa27x-pwm.1: LATE suspend
platform pxa27x-pwm.0: LATE suspend
platform pxa27x-ssp.2: LATE suspend
platform pxa27x-ssp.1: LATE suspend
platform pxa27x-ssp.0: LATE suspend
platform pxa2xx-i2c.1: LATE suspend
platform sa1100-rtc: LATE suspend
platform pxa2xx-i2s: LATE suspend
pxa2xx-uart pxa2xx-uart.2: LATE suspend
pxa2xx-uart pxa2xx-uart.1: LATE suspend
pxa2xx-uart pxa2xx-uart.0: LATE suspend
platform pxa27x-udc: LATE suspend
suspend debug: Waiting for 5 seconds.
platform pxa27x-udc: EARLY resume pxa2xx-uart pxa2xx-uart.0: EARLY resume pxa2xx-uart pxa2xx-uart.1: EARLY resume pxa2xx-uart pxa2xx-uart.2: EARLY resume platform pxa2xx-i2s: EARLY resume platform sa1100-rtc: EARLY resume platform pxa2xx-i2c.1: EARLY resume platform pxa27x-ssp.0: EARLY resume platform pxa27x-ssp.1: EARLY resume platform pxa27x-ssp.2: EARLY resume platform pxa27x-pwm.0: EARLY resume platform pxa27x-pwm.1: EARLY resume dm9000 dm9000.0: EARLY resume vpac270-ssp vpac270-ssp.0: EARLY resume platform vpac270-pm.0: EARLY resume platform pxa_g64_driver.0: EARLY resume platform pxa2xx_dir_keypad.0: EARLY resume platform pxa_capture.0: EARLY resume platform pxa2xx-ac97: EARLY resume platform mfrc531-ssp.0: EARLY resume pxa2xx-flash pxa2xx-flash.0: EARLY resume
Unable to handle kernel paging request at virtual address a03ab26f pgd = c6aac000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 CPU: 0 Not tainted (2.6.28.10-vpac3-splash #90) PC is at bad_channel+0x80166/0x91f28 LR is at platform_pm_resume_noirq+0x48/0x54 pc : [<a03ab23e>] lr : [<a01cb758>] psr: a00000b3
sp : c6a97e64 ip : c6a97e74 fp : c6a97e70
r10: 00000004 r9 : c7af7474 r8 : c7a1c000
r7 : 00000005 r6 : a03da1b0 r5 : a03f22e4 r4 : a03dd328 r3 : a03ab23b r2 : 00000000 r1 : a03f22e4 r0 : a03dd320
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment user
Control: 0000397f Table: a6aac000 DAC: 00000015
Process sh (pid: 300, stack limit = 0xc6a96268)
Stack: (0xc6a97e64 to 0xc6a98000)
7e60: c6a97e88 c6a97e74 a01cd9b0 a01cb71c a03dd328 00000010 c6a97ea8 7e80: c6a97e8c a01ce248 a01cd968 00000010 00000000 00000003 a030d660 c6a97ebc
7ea0: c6a97eac a01ce8c8 a01ce1e4 00000000 c6a97ed8 c6a97ec0 a006fd10 a01ce8b8
7ec0: 0000dbff a038c7db 00000003 c6a97ef4 c6a97edc a006ff20 a006fc10 a038c7db
7ee0: 00000003 00000003 c6a97f1c c6a97ef8 a0070040 a006fdfc c780dc14 00000004
7f00: c7af7460 c781ada0 a03eeea4 c6a97f80 c6a97f2c c6a97f20 a018afe8 a006ffb0
7f20: c6a97f58 c6a97f30 a00e1da8 a018afd0 c7a7ff20 4001d000 c6a97f80 00000004
7f40: a00300a4 c6a96000 00000000 c6a97f7c c6a97f5c a0099b58 a00e1ca8 c6a97f80
7f60: 00000000 00000000 c7a7ff20 00000004 c6a97fa4 c6a97f80 a0099cb8 a0099ab0
7f80: 00000000 00000000 00000000 00000004 4001d000 401565f8 00000000 c6a97fa8
7fa0: a002ff00 a0099c78 00000004 4001d000 00000001 4001d000 00000004 00000000
7fc0: 00000004 4001d000 401565f8 00000004 00000001 9e96fb58 00000000 9e96fa44
7fe0: 00000000 9e96f98c 4008df64 400e28b4 60000010 00000001 001b0375 00001702
Backtrace: [<a01cb710>] (platform_pm_resume_noirq+0x0/0x54) from [<a01cd9b0>] (pm_noirq_op+0x54/0x88) [<a01cd95c>] (pm_noirq_op+0x0/0x88) from [<a01ce248>] (dpm_power_up+0x70/0xec) r5:00000010 r4:a03dd328 [<a01ce1d8>] (dpm_power_up+0x0/0xec) from [<a01ce8c8>] (device_power_up+0x1c/0x20) r7:a030d660 r6:00000003 r5:00000000 r4:00000010 [<a01ce8ac>] (device_power_up+0x0/0x20) from [<a006fd10>] (suspend_devices_and_enter+0x10c/0x1b4) r4:00000000 [<a006fc04>] (suspend_devices_and_enter+0x0/0x1b4) from [<a006ff20>] (enter_state+0x130/0x1b4) r6:00000003 r5:a038c7db r4:0000dbff [<a006fdf0>] (enter_state+0x0/0x1b4) from [<a0070040>] (state_store+0x9c/0xc4) r6:00000003 r5:00000003 r4:a038c7db [<a006ffa4>] (state_store+0x0/0xc4) from [<a018afe8>] (kobj_attr_store+0x24/0x28) [<a018afc4>] (kobj_attr_store+0x0/0x28) from [<a00e1da8>] (sysfs_write_file+0x10c/0x144) [<a00e1c9c>] (sysfs_write_file+0x0/0x144) from [<a0099b58>] (vfs_write+0xb4/0x140) [<a0099aa4>] (vfs_write+0x0/0x140) from [<a0099cb8>] (sys_write+0x4c/0x80) r7:00000004 r6:c7a7ff20 r5:00000000 r4:00000000 [<a0099c6c>] (sys_write+0x0/0x80) from [<a002ff00>] (ret_fast_syscall+0x0/0x2c) r6:401565f8 r5:4001d000 r4:00000004 Code: 74732820 20657461 0a296425 69666300 (646d635f) ---[ end trace 0a425c17b54b883b ]---
Signature · 1 line
Rumjantsev Egor
vpack270 and sleep mode
Quoted 7 lines · On Wed, May 26, 2010 at 09:47:23AM +0600, 237 Rumjantsev Egor (PROG) wrote:
platform vpac270-pm.0: EARLY resume platform pxa_g64_driver.0: EARLY resume platform pxa2xx_dir_keypad.0: EARLY resume platform pxa_capture.0: EARLY resume platform pxa2xx-ac97: EARLY resume platform mfrc531-ssp.0: EARLY resume pxa2xx-flash pxa2xx-flash.0: EARLY resume
Quoted 8 lines
Unable to handle kernel paging request at virtual address a03ab26f pgd = c6aac000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 CPU: 0 Not tainted (2.6.28.10-vpac3-splash #90) PC is at bad_channel+0x80166/0x91f28 LR is at platform_pm_resume_noirq+0x48/0x54
This seems to point at pxa2xx-flash.c being the culpret - which brings up the question why no one else is seeing a problem here.
Does your vpac270 patches touch this file? If yes, please show those changes.
vpack270 and sleep mode
26.05.2010 15:07, Russell King - ARM Linux ?????:
Quoted 17 lines · On Wed, May 26, 2010 at 09:47:23AM +0600, 237 Rumjantsev Egor (PROG) wrote:
Quoted 7 lines
platform vpac270-pm.0: EARLY resume platform pxa_g64_driver.0: EARLY resume platform pxa2xx_dir_keypad.0: EARLY resume platform pxa_capture.0: EARLY resume platform pxa2xx-ac97: EARLY resume platform mfrc531-ssp.0: EARLY resume pxa2xx-flash pxa2xx-flash.0: EARLY resume
Quoted 8 lines
Unable to handle kernel paging request at virtual address a03ab26f pgd = c6aac000 [a03ab26f] *pgd=8020040e(bad) Internal error: Oops: 803 [#1] PREEMPT Modules linked in: ipv6 CPU: 0 Not tainted (2.6.28.10-vpac3-splash #90) PC is at bad_channel+0x80166/0x91f28 LR is at platform_pm_resume_noirq+0x48/0x54
Quoted 6 lines
This seems to point at
pxa2xx-flash.cbeing the culpret - which brings up the question why no one else is seeing a problem here.Does your vpac270 patches touch this file? If yes, please show those changes.
no they doesn't, but here is a part of pxa2xx-flash.c and driver structure registered by driver_register call. Is it problem ?
static struct device_driver pxa2xx_flash_driver = {
.name = "pxa2xx-flash",
.bus = &platform_bus_type,
.probe = pxa2xx_flash_probe,
.remove = __exit_p(pxa2xx_flash_remove),
.suspend = pxa2xx_flash_suspend,
.resume = pxa2xx_flash_resume,
.shutdown = pxa2xx_flash_shutdown,};
static int __init init_pxa2xx_flash(void)
{
return driver_register(&pxa2xx_flash_driver);
}static void __exit cleanup_pxa2xx_flash(void)
{
driver_unregister(&pxa2xx_flash_driver);
}On 2.6.24 kernel driver structure register the same way but sleep mode works fine there.
Signature · 1 line
Rumjantsev Egor
vpack270 and sleep mode
Quoted 11 lines · On Wed, May 26, 2010 at 03:19:16PM +0600, 237 Rumjantsev Egor (PROG) wrote:
no they doesn't, but here is a part of
pxa2xx-flash.cand driver structure registered bydriver_registercall. Is it problem ?static struct
device_driverpxa2xx_flash_driver= {.name = "pxa2xx-flash", .bus = &platform_bus_type, .probe = pxa2xx_flash_probe, .remove = __exit_p(pxa2xx_flash_remove), .suspend = pxa2xx_flash_suspend, .resume = pxa2xx_flash_resume,
The suspend and resume callbacks are removed in later kernels - could you try commenting these two out and seeing what the effect is please?
vpack270 and sleep mode
26.05.2010 15:27, Russell King - ARM Linux ?????:
Quoted 13 lines · On Wed, May 26, 2010 at 03:19:16PM +0600, 237 Rumjantsev Egor (PROG) wrote:
Quoted 11 lines
no they doesn't, but here is a part of
pxa2xx-flash.cand driver structure registered bydriver_registercall. Is it problem ?static struct
device_driverpxa2xx_flash_driver= {.name = "pxa2xx-flash", .bus =&platform_bus_type, .probe = pxa2xx_flash_probe, .remove = __exit_p(pxa2xx_flash_remove), .suspend = pxa2xx_flash_suspend, .resume = pxa2xx_flash_resume,
Quoted 3 lines
The suspend and resume callbacks are removed in later kernels - could you try commenting these two out and seeing what the effect is please?
i commented suspend/resume functions and inserted return 0 but it didn't help
Signature · 1 line
Rumjantsev Egor
vpack270 and sleep mode
In reply to 237 Rumjantsev Egor (PROG)Hi,
Quoted 1 line
static struct
device_driverpxa2xx_flash_driver= {
^^^^^^^^^^^^1
Quoted 2 lines
.name = "pxa2xx-flash",
.bus =&platform_bus_type,
^^^^^^^^^^^^^^^^^^
This is WRONG!
platform drivers require a struct platform_driver and MUST be registered using platform_driver_register()!
The platform suspend/resume expects the struct device_driver to be embedded within a struct platform_driver.
See https://patchwork.kernel.org/patch/5894/
We should probably add some code to driver_register() to let it refuse to register drivers with a 'platform_bus_type'.
Lothar Wa?mann
Signature · 9 lines
___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch?ftsf?hrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info at karo-electronics.de ___________________________________________________________
vpack270 and sleep mode
26.05.2010 15:50, Lothar Wa?mann ?????:
Quoted 13 lines
Hi,
Quoted 1 line
static struct
device_driverpxa2xx_flash_driver= {^^^^^^^^^^^^1Quoted 2 lines
.name = "pxa2xx-flash",
.bus =&platform_bus_type,^^^^^^^^^^^^^^^^^^This is WRONG!
platform drivers require a structplatform_driverand MUST be registered usingplatform_driver_register()!
The platform suspend/resume expects the structdevice_driverto be embedded within a structplatform_driver.
Quoted 7 lines
See https://patchwork.kernel.org/patch/5894/
We should probably add some code to
driver_register()to let it refuse to register drivers with a 'platform_bus_type'.Lothar Wa?mann
Thank you! This patch helped to pass core test but my board still doesn't resume from sleep mode
May be some of Power Manager registers set up not correctly ?
dm9000 dm9000.0: LATE suspend platform pxa27x-pwm.1: LATE suspend platform pxa27x-pwm.0: LATE suspend platform pxa27x-ssp.2: LATE suspend platform pxa27x-ssp.1: LATE suspend platform pxa27x-ssp.0: LATE suspend platform pxa2xx-i2c.1: LATE suspend platform sa1100-rtc: LATE suspend platform pxa2xx-i2s: LATE suspend pxa2xx-uart pxa2xx-uart.2: LATE suspend pxa2xx-uart pxa2xx-uart.1: LATE suspend pxa2xx-uart pxa2xx-uart.0: LATE suspend platform pxa27x-udc: LATE suspend pxa_pm_enter(): RCSR value: 0x00000000 pxa_pm_enter(): state: 3 pxa_pm_enter(): Power regs:pxa_pm_enter(): GPDR0: 0x0070E200 pxa_pm_enter(): PWER: 0x00000001 pxa_pm_enter(): PFER: 0x00000000 pxa_pm_enter(): PRER: 0x00000001 pxa_pm_enter(): PGSR0: 0x00010000 pxa_pm_enter(): PGSR1: 0x000F2000 pxa_pm_enter(): PGSR2: 0x0404C000 pxa_pm_enter(): PGSR3: 0x00000020 pxa27x_cpu_pm_enter(): go to suspend : 3 pxa27x_cpu_pm_enter(): PCFR: 0x21 pxa27x_cpu_pm_enter(): PSSR: 0x0 pxa27x_cpu_pm_enter(): PSLR: 0xCC100004 pxa27x_cpu_pm_enter(): PSPR: 0x803503E0 pxa27x_cpu_pm_enter(): CKEN: 0x500226 pxa27x_cpu_pm_enter(): OSCC: 0x3
Signature · 1 line
Rumjantsev Egor