Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anders Darander <anders.darander@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/5] am33x-cm3: add FW for suspend/resume
Date: Thu,  9 May 2013 22:31:29 +0200	[thread overview]
Message-ID: <1368131491-14115-4-git-send-email-anders.darander@gmail.com> (raw)
In-Reply-To: <1368131491-14115-1-git-send-email-anders.darander@gmail.com>

From: Anders Darander <anders@chargestorm.se>

Without this firmware, the beaglebone won't be able to reboot correctly.

Signed-off-by: Anders Darander <anders@chargestorm.se>
---
 package/Config.in                         |    1 +
 package/am33x-cm3/Config.in               |    4 ++++
 package/am33x-cm3/am335x-pm-firmware-load |    6 ++++++
 package/am33x-cm3/am33x-cm3.mk            |   26 ++++++++++++++++++++++++++
 4 files changed, 37 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..6180157
--- /dev/null
+++ b/package/am33x-cm3/am33x-cm3.mk
@@ -0,0 +1,26 @@
+#############################################################
+#
+# am33x-cm3
+#
+#############################################################
+
+# SHA1 corresponds to tag "AM335xPSP_04.06.00.10-rc1"
+AM33X_CM3_VERSION = 27ca4643e422245a95723de1df0247a00eada45b
+AM33X_CM3_SITE = git://arago-project.org/git/projects/am33x-cm3.git
+AM33X_CM3_METHOD = git
+AM33X_CM3_LICENSE = TI-BSD
+AM33X_CM3_LICENSE_FILES = License.txt
+
+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) -d -m 0755 $(TARGET_DIR)/lib/firmware/
+	$(INSTALL) -m 0644 $(@D)/bin/am335x-pm-firmware.bin $(TARGET_DIR)/lib/firmware
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/init.d
+	$(INSTALL) -m 0755 package/am33x-cm3/am335x-pm-firmware-load $(TARGET_DIR)/etc/init.d/S93-am335x-pm-firwmare-load
+endef
+
+$(eval $(generic-package))
-- 
1.7.10.4

  parent reply	other threads:[~2013-05-09 20:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09 20:31 [Buildroot] [PATCH 0/5] Upgrade BeagleBone kernel to 3.8 Anders Darander
2013-05-09 20:31 ` [Buildroot] [PATCH 1/5] beaglebone: update to linux 3.8 Anders Darander
2013-05-10 22:44   ` Arnout Vandecappelle
2013-05-09 20:31 ` [Buildroot] [PATCH 2/5] beaglebone: reduce defconfig Anders Darander
2013-05-10 22:45   ` Arnout Vandecappelle
2013-05-09 20:31 ` Anders Darander [this message]
2013-05-10 22:56   ` [Buildroot] [PATCH 3/5] am33x-cm3: add FW for suspend/resume Arnout Vandecappelle
2013-05-09 20:31 ` [Buildroot] [PATCH 4/5] beaglebone: add am33x-cm3 Anders Darander
2013-05-09 20:31 ` [Buildroot] [PATCH 5/5] beaglebone: enable NFS root Anders Darander
  -- strict thread matches above, loose matches on Subject: below --
2013-05-11  4:38 [Buildroot] [PATCH 3/5] am33x-cm3: add FW for suspend/resume Anders Darander
2013-05-11  6:36 ` Arnout Vandecappelle
2013-05-11 12:25   ` Anders Darander
2013-05-12 16:59     ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1368131491-14115-4-git-send-email-anders.darander@gmail.com \
    --to=anders.darander@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox