问题描述
在基于STM32的处理器(OSD32MP15x)上启动期间,我在50%的时间内遇到以下错误。
我已经尝试了40多个版本的配置和设置,但都无法正常工作,而且我承受着将这种硬件交付给客户端的巨大压力。在我看来,这似乎是某种计时问题,因为它并不总是发生。
我尝试禁用与USB相关的配置,更改DTS文件并删除不需要的所有内容,最后但并非最不重要的一点是在linux配置和DTS中更改电源配置。
FOR
编辑链接linux代码库:v5.4-stm32mp
编辑添加DTS配置:
add_action( 'woocommerce_thankyou','create_account' );
function create_account( $order_id ){
$order = wc_get_order( $order_id );
foreach ( $order->get_items() as $item ) {
$product_ids = array($item->get_product_id(),$item->get_variation_id());
$product_id1 = 153; // <== Here define the 'xxx' product id
$product_id2 = 228; // <== Here define the 'yyy' product id
$quantity = $item->get_quantity();
if ( in_array( $product_id1,$product_ids ) ) {
for ( $i = 1; $i <= $quantity; $i++ ) {
// do something
}
}
elseif ( in_array( $product_id2,$product_ids ) ) {
for ( $i = 1; $i <= $quantity; $i++ ) {
// do something else
}
}
}
}
解决方法
该问题似乎是由补丁regulator: stpmic1: Usb boost over-current protection workaround引入的。
- “增强型”中断处理程序
stpmic1_boost_irq_handler
调用regulator_lock(usb_data->boost_rdev);
- “增强”中断处理程序(
stpmic1_boost_irq_handler
)是由stpmic1_boost_register
函数设置的,但是usb_data->boost_rdev
目前仍然为空。 -
usb_data->boost_rdev
通过stpmic1_boost_register
函数设置为stpmic1_regulator_probe
函数的返回值。 - 如果在
stpmic1_boost_irq_handler
函数设置usb_data->boost_rdev
之前调用了“增强型”中断处理程序stpmic1_regulator_probe
,则会发生崩溃。
一种解决方法是在设置usb_data->boost_rdev = rdev;
之后但在设置中断处理程序之前在stpmic1_boost_register
函数中设置rdev
。
这应该报告给补丁的作者。请参阅补丁中的“签名人:”行以获取电子邮件地址。