summaryrefslogtreecommitdiffstats
path: root/package/am33x-cm3
diff options
context:
space:
mode:
authorAnders Darander <anders@chargestorm.se>2013-05-14 10:09:51 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-05-14 22:49:11 +0200
commit97fbd80efe6dd29b5d8d5393ea0a4cbc314dcfc6 (patch)
tree0dcc7d067fce746c650a54b8ce8cdb01305a6950 /package/am33x-cm3
parent0012b7dcdb7f5cb5e6f22f08fcc6124979c1c9ea (diff)
downloadbuildroot-novena-97fbd80efe6dd29b5d8d5393ea0a4cbc314dcfc6.tar.gz
buildroot-novena-97fbd80efe6dd29b5d8d5393ea0a4cbc314dcfc6.zip
am33x-cm3: add FW for suspend/resume
Without this firmware, the beaglebone won't be able to suspend/resume correctly. [Peter: tweak Config.in, rename init script, wrap long lines] Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/am33x-cm3')
-rw-r--r--package/am33x-cm3/Config.in7
-rwxr-xr-xpackage/am33x-cm3/S93-am335x-pm-firmware-load6
-rw-r--r--package/am33x-cm3/am33x-cm3.mk30
3 files changed, 43 insertions, 0 deletions
diff --git a/package/am33x-cm3/Config.in b/package/am33x-cm3/Config.in
new file mode 100644
index 000000000..060d0efc8
--- /dev/null
+++ b/package/am33x-cm3/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_AM33X_CM3
+ bool "am33x-cm3"
+ depends on BR2_arm # only relevant for TI am335x
+ help
+ Cortex-M3 binary blob for suspend-resume on am335x
+
+ http://arago-project.org/git/projects/am33x-cm3.git
diff --git a/package/am33x-cm3/S93-am335x-pm-firmware-load b/package/am33x-cm3/S93-am335x-pm-firmware-load
new file mode 100755
index 000000000..56c17b334
--- /dev/null
+++ b/package/am33x-cm3/S93-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 000000000..3805c8022
--- /dev/null
+++ b/package/am33x-cm3/am33x-cm3.mk
@@ -0,0 +1,30 @@
+#############################################################
+#
+# 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/S93-am335x-pm-firmware-load \
+ $(TARGET_DIR)/etc/init.d/S93-am335x-pm-firmware-load
+endef
+
+$(eval $(generic-package))