Dear sir
////////////////////////////////////////////////////////////////////////////////////////////////
I am sorry
Press the reply rejection button on my mistake
So writes again
////////////////////////////////////////////////////////////////////////////////////////////////
question about DMtimer, how to use 2 DMtimer in 1 moudle?
I tested the timer 1 and 2.
There is no problem at the time of each operation.
But I do not know how to initialize a timer two well.
1. .dts file
//===================================
am33xx_module_timer4 {
compatible = "am33xx_module_timer4";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&timer4_pins_default>;
pinctrl-1 = <&timer4_pins_sleep>;
DMtimer4 = <&timer4>;
};
am33xx_module_timer7 {
compatible = "am33xx_module_timer4";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&timer7_pins_default>;
pinctrl-1 = <&timer7_pins_sleep>;
DMtimer7 = <&timer7>;
};
//=======================================
2. module inital
//=======================================
static int print_module_init(struct platform_device *pdev)
{
.
/* Attempt to request a timer based on the device node */
timer_device_node = of_parse_phandle(pdev->dev.of_node, "DMtimer4", 0);
SGTDev.timer_ptr = omap_dm_timer_request_by_node(timer_device_node);
if(SGTDev.timer_ptr == NULL){
/* no timers available */
printk(KERN_INFO "Can't request specified DM Timer\n");
return -1;
}
.
.
.
/* Attempt to request a timer based on the device node */
timer_device_node = of_parse_phandle(pdev->dev.of_node, "DMtimer7", 1);
SGTDev.timer7_ptr = omap_dm_timer_request_by_node(timer_device_node);
if(SGTDev.timer_ptr7 == NULL){
/* no timers available */
printk(KERN_INFO "Can't request specified DM Timer\n");
return -1;
}
.
.
}
static const struct of_device_id test_module_timer_of_match[] = {
{ .compatible = "am33xx_module_timer4" },
{ .compatible = "am33xx_module_timer7" },
};
//============================================
What should I do to fix it?
best regards