Jump to ID:
BSPs and Drivers

Project Home

Documents

Discussions

Wiki

Project Info
Forum Topic - Implementing Power callout in Startup: Page 1 of 18 (18 Items)
   
 
 
Implementing Power callout in Startup  
Hello,
I am implementing a Power callout for OMAP5912 in the startup code.
I am trying to do following

1) created a file callout_power_omap.S file in ..lib/arm folder of startup
2) Before writing actual power mode assembly code in the power callout,To make sure that my power callout is called when
 user applictaion calls sysmgr_cpumode() , i just used reboot callout code in the power callout. SO when user app calls 
sysrmgr_cpumode() , my baord should reset because i have just copied the reboot callout code in the power callout

3) in the main.c i have given following

extern struct callout_rtn power_omap; //added by me
extern struct callout_rtn reboot_omap; //existing

const struct callout_slot callouts[] = {
	{ CALLOUT_SLOT( reboot, _omap ) },//existing
	{ CALLOUT_SLOT( power, _omap ) } //added by me
};

add_callout_array(callouts, sizeof(callouts));

3) When i  compiled the BSP & put on the board. it booted. When i run a simple app which calls sysrmgr_cpumode(0);, i 
expected board should resboot, but not, nothiong is happening. the sysmgr_cpumode returns 0 & the app returns 

Can i get some suggestions what i am missing

If i write a simple app using sysmgr_reboot() , the reboot callout is being called & system reboots. 


Basically i want to confirm that my power callout is getting invoked by user api sysmgr_cpumode. Please let me know how 
we can confirm this

Regards
Praveen