From b7b8d22bc3d804d61aa56cd74cd7c3a06eca5b50 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 17 Sep 2013 00:31:42 +0200 Subject: [PATCH] dde_linux/rpi: Enable USB power on startup Needed when booting Genode directly from SD card w/o u-boot. --- dde_linux/lib/mk/platform_rpi/usb.mk | 3 +++ dde_linux/src/lib/usb/arm/platform_rpi/platform.cc | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dde_linux/lib/mk/platform_rpi/usb.mk b/dde_linux/lib/mk/platform_rpi/usb.mk index 782d12cec..3de25d9ed 100644 --- a/dde_linux/lib/mk/platform_rpi/usb.mk +++ b/dde_linux/lib/mk/platform_rpi/usb.mk @@ -43,3 +43,6 @@ SRC_CC += platform.cc vpath platform.cc $(LIB_DIR)/arm/platform_rpi vpath %.c $(CONTRIB_DIR)/drivers/net/usb + +# enable C++11 support +CC_CXX_OPT += -std=gnu++11 diff --git a/dde_linux/src/lib/usb/arm/platform_rpi/platform.cc b/dde_linux/src/lib/usb/arm/platform_rpi/platform.cc index 1a4da80ca..e4b7e4665 100644 --- a/dde_linux/src/lib/usb/arm/platform_rpi/platform.cc +++ b/dde_linux/src/lib/usb/arm/platform_rpi/platform.cc @@ -11,9 +11,10 @@ * under the terms of the GNU General Public License version 2. */ -/* Genode */ +/* Genode includes */ #include #include +#include /* emulation */ #include @@ -186,6 +187,10 @@ extern "C" int module_smsc95xx_driver_init(); void platform_hcd_init(Services *services) { + /* enable USB power */ + Platform::Connection platform; + platform.power_state(Platform::Session::POWER_USB_HCD, true); + /* register network */ if (services->nic) { module_usbnet_init();