2139971_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2139971_en-US

2139971_en-US

imx93 - Restart after key pressed

Hello,

Sometimes we need to halt a board to perform specific operation on other boards.

And often is the person in charge of that remotely located.

Therefore we developped a feature on the previous set of board (based on x86 architecture) to allow administrators to halt (/sbin/halt) and restart the board after a key pressed.

We implemented and called a hook within the linux kernel machine_restart() function:

   unsigned char key;
   printk( KERN_ERR "Press any key to reboot\n");
   key = inb(0x3f8);
   while (inb(0x3f8) == key);


Now I wish to do the same on imx93-based board.

I tried following, but we do not stay in the while loop and restart the board immadiately. We use LPUART1 as serial console.

    unsigned char key;
#define REGBASE 0x44380000
    void __iomem *io = ioremap(REGBASE, SZ_4K);
    printk( KERN_ERR "Press any key to reboot\n");
    key = readl(io + 0x1C) & 0x3FF;
    while ( (readl(io + 0x1C) & 0x3FF) == key );
 
Note: documentation relates also the presence of the DATA_RO register (offset 0x30) but the behavior is the same.
 
Has anyone a suggestion how to fiw this ?
Thanks.
Best regards,
Patrick Agrain
タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 11:47 PM
更新者: