mirror of
https://xff.cz/git/u-boot/
synced 2025-10-27 16:43:32 +01:00
x86: efi-x86_payload: Enable usb keyboard during boot
For boards that don't route serial port pins out, it's quite common to attach a USB keyboard as the input device, along with a monitor. However USB is not automatically started in the generic efi payload codes. This uses a payload specific last_stage_init() to start the USB bus, so that a USB keyboard can be used on the U-Boot shell. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -193,7 +193,7 @@ void show_boot_progress(int val)
|
|||||||
outb(val, POST_PORT);
|
outb(val, POST_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_SYS_COREBOOT
|
#if !defined(CONFIG_SYS_COREBOOT) && !defined(CONFIG_EFI_STUB)
|
||||||
/*
|
/*
|
||||||
* Implement a weak default function for boards that optionally
|
* Implement a weak default function for boards that optionally
|
||||||
* need to clean up the system before jumping to the kernel.
|
* need to clean up the system before jumping to the kernel.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <efi.h>
|
#include <efi.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <usb.h>
|
||||||
#include <asm/post.h>
|
#include <asm/post.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
@@ -160,3 +161,11 @@ int reserve_arch(void)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int last_stage_init(void)
|
||||||
|
{
|
||||||
|
/* start usb so that usb keyboard can be used as input device */
|
||||||
|
usb_init();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#define CONFIG_SYS_MONITOR_LEN (1 << 20)
|
#define CONFIG_SYS_MONITOR_LEN (1 << 20)
|
||||||
|
|
||||||
#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd\0" \
|
#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \
|
||||||
"stdout=serial,vidconsole\0" \
|
"stdout=serial,vidconsole\0" \
|
||||||
"stderr=serial,vidconsole\0"
|
"stderr=serial,vidconsole\0"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user