All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koen Kooi <koen@dominion.thruhere.net>
To: Denys Dmytriyenko <denis@denix.org>
Cc: meta-ti@yoctoproject.org
Subject: Re: [PATCH] am33x-cm3: add firmware for am33x suspend/resume
Date: Thu, 12 Apr 2012 22:21:14 +0200	[thread overview]
Message-ID: <EB812FEE-EE00-4932-AF14-232F200EECD9@dominion.thruhere.net> (raw)
In-Reply-To: <20120412200941.GF13291@denix.org>


Op 12 apr. 2012, om 22:09 heeft Denys Dmytriyenko het volgende geschreven:

> Koen,
> 
> I'm commenting on both of your patches together...
> 
> am33x-cm3:
>> +++ b/recipes-bsp/ti/am33x-cm3_git.bb
>> 
>> +do_install() {
>> +	install -d ${D}${base_libdir}/firmware
>> +	install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/
>> +}
> 
> 
> linux-ti33x-psp:
>> This fixes most PM operations: cpufreq, cpuidle and suspend. Resume does not 
>> work on beaglebone, but 3 out of 4 ain't bad :)
>> 
>> The M3 firmware needed for suspend/resume is used as a binary, building it 
>> from source and including it from sysroots is planned for future commits.
>> 
>> +++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
>> 
>> +do_compile_prepend() {
>> +       cp ${WORKDIR}/am335x-pm-firmware.bin ${S}/firmware/
>> +}
> 
> 
> Have you looked at how it's done in Arago/AM-SDK?

No, I only looked at meta-ti :)

> The firmware is staged in 
> the sysroots and gets picked up by the kernel:
> 
> do_install() {
>    install -d ${STAGING_FIRMWARE_DIR}/am33x-cm3
>    install ${S}/bin/am335x-pm-firmware.bin {STAGING_FIRMWARE_DIR}/am33x-cm3/
> }
> 
> Where the kernel then copies it to ${S}/firmware:
> 
> # Copy the am33x-cm3 firmware if it is available
> do_compile_prepend() {
>    if [ -e "${STAGING_FIRMWARE_DIR}/am33x-cm3/am335x-pm-firmware.bin" ]
>    then
>        cp "${STAGING_FIRMWARE_DIR}/am33x-cm3/am335x-pm-firmware.bin" ${S}/firmware"
>    fi
> }
> 
> It's not the most elegant solution either, but at least it gets around the 
> need to keep the binary version of the firmware in the repository with the 
> kernel recipe...
> 
> Do you want me to make similar changes to your patches? Or do you have any 
> arguments against this approach?

Yes, you're not allowed to touch sysroots from inside do_install since that will break sstate, which is why I added regular recipes first to get it working and fix it properly later.

It's a bit academic at this point, since you need to get lucky in the silicon bingo to have suspend/resume working on am335x anyway. I can disable CONFIG_SUSPEND and remove the copying bits if you want.

regards,

Koen

  reply	other threads:[~2012-04-12 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 13:09 [PATCH] am33x-cm3: add firmware for am33x suspend/resume Koen Kooi
2012-04-12 20:09 ` Denys Dmytriyenko
2012-04-12 20:21   ` Koen Kooi [this message]
2012-04-17  7:49     ` Koen Kooi
2012-04-18 17:23     ` Denys Dmytriyenko

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=EB812FEE-EE00-4932-AF14-232F200EECD9@dominion.thruhere.net \
    --to=koen@dominion.thruhere.net \
    --cc=denis@denix.org \
    --cc=meta-ti@yoctoproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.