From patchwork Tue May 14 20:09:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Darander X-Patchwork-Id: 243821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 6B1862C00B5 for ; Wed, 15 May 2013 06:09:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BE53031C0E; Tue, 14 May 2013 20:09:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zJ9FG9Wr5QGF; Tue, 14 May 2013 20:09:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D0B3431BE8; Tue, 14 May 2013 20:09:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D7EA88F7A0 for ; Tue, 14 May 2013 20:09:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5B6D482583 for ; Tue, 14 May 2013 20:09:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z7BdgnU9XoLl for ; Tue, 14 May 2013 20:09:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from STOEXHUB01.domain01.net (STOEXHUB01.domain01.net [83.145.59.142]) by whitealder.osuosl.org (Postfix) with ESMTPS id 108A780C19 for ; Tue, 14 May 2013 20:09:22 +0000 (UTC) Received: from localhost (2.68.78.119) by STOEXHUB01.domain01.net (10.12.10.1) with Microsoft SMTP Server id 8.3.279.1; Tue, 14 May 2013 22:09:19 +0200 From: Anders Darander To: Date: Tue, 14 May 2013 22:09:51 +0200 Message-ID: <1368562193-26149-3-git-send-email-anders@chargestorm.se> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368562193-26149-1-git-send-email-anders@chargestorm.se> References: <1368562193-26149-1-git-send-email-anders@chargestorm.se> MIME-Version: 1.0 Cc: Anders Darander Subject: [Buildroot] [PATCH v4 2/4] am33x-cm3: add FW for suspend/resume X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Without this firmware, the beaglebone won't be able to reboot correctly. Signed-off-by: Anders Darander --- package/Config.in | 1 + package/am33x-cm3/Config.in | 4 ++++ package/am33x-cm3/am335x-pm-firmware-load | 6 ++++++ package/am33x-cm3/am33x-cm3.mk | 28 ++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 package/am33x-cm3/Config.in create mode 100755 package/am33x-cm3/am335x-pm-firmware-load create mode 100644 package/am33x-cm3/am33x-cm3.mk diff --git a/package/Config.in b/package/Config.in index d980871..329d734 100644 --- a/package/Config.in +++ b/package/Config.in @@ -213,6 +213,7 @@ endmenu menu "Hardware handling" menu "Misc devices firmwares" +source "package/am33x-cm3/Config.in" source "package/b43-firmware/Config.in" source "package/firmware-imx/Config.in" source "package/linux-firmware/Config.in" diff --git a/package/am33x-cm3/Config.in b/package/am33x-cm3/Config.in new file mode 100644 index 0000000..ee39f7d --- /dev/null +++ b/package/am33x-cm3/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_AM33X_CM3 + bool "am33x-cm3" + help + Cortex-M3 binary blob for suspend-resume diff --git a/package/am33x-cm3/am335x-pm-firmware-load b/package/am33x-cm3/am335x-pm-firmware-load new file mode 100755 index 0000000..56c17b3 --- /dev/null +++ b/package/am33x-cm3/am335x-pm-firmware-load @@ -0,0 +1,6 @@ +#!/bin/sh + +# Load the PM CM3 firmware +echo 1 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading +cat /lib/firmware/am335x-pm-firmware.bin > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/data +echo 0 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading diff --git a/package/am33x-cm3/am33x-cm3.mk b/package/am33x-cm3/am33x-cm3.mk new file mode 100644 index 0000000..5125c5b --- /dev/null +++ b/package/am33x-cm3/am33x-cm3.mk @@ -0,0 +1,28 @@ +############################################################# +# +# am33x-cm3 +# +############################################################# + +AM33X_CM3_VERSION = AM335xPSP_04.06.00.10-rc1 +AM33X_CM3_SITE = http://arago-project.org/git/projects/am33x-cm3.git +AM33X_CM3_SITE_METHOD = git +AM33X_CM3_LICENSE = TI Publicly Available Software License +AM33X_CM3_LICENSE_FILES = License.txt + +# The build command below will use the standard cross-compiler (normally +# build for Cortex-A8, to build the FW for the Cortex-M3. +define AM33X_CM3_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all +endef + +# Not all of the firmware files are used +define AM33X_CM3_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/bin/am335x-pm-firmware.bin $(TARGET_DIR)/lib/firmware/am335x-pm-firmware.bin +endef + +define AM33X_CM3_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/am33x-cm3/am335x-pm-firmware-load $(TARGET_DIR)/etc/init.d/S93-am335x-pm-firmware-load +endef + +$(eval $(generic-package))