Add the firmware blob required to use the sdma hardware in the imx6

processor, and its associated license text (which is similar to a
bsd-3-clause, but with a prohibition against decompiling).  Install a copy
of the license in /usr/share/doc/legal/imx, to comply with the license terms
that requires a copy of the license to be delivered along with the firmware.

Obtained from:	https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/imx/sdma/sdma-imx6q.bin https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENSE.sdma_firmware
This commit is contained in:
Ian Lepore 2020-11-26 01:40:04 +00:00
parent fd2ef8ef5a
commit a7623790fb
7 changed files with 172 additions and 19 deletions

View File

@ -8,4 +8,5 @@ SUBDIR= intel_ipw \
SUBDIR_PARALLEL=
.include <bsd.arch.inc.mk>
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $FreeBSD$
SUBDIR += imx

View File

@ -0,0 +1,7 @@
# $FreeBSD$
FILES= ${SRCTOP}/sys/contrib/dev/imx/LICENSE
FILESDIR= ${SHAREDIR}/doc/legal
FILESNAME= sdma-imx6q.LICENSE
.include <bsd.prog.mk>

View File

@ -20,7 +20,7 @@ arm/freescale/imx/imx_i2c.c optional fsliic
arm/freescale/imx/imx_spi.c optional imx_spi
arm/freescale/imx/imx6_sdma.c optional fslsdma
arm/freescale/imx/imx6_audmux.c optional sound
arm/freescale/imx/imx6_ssi.c optional sound
arm/freescale/imx/imx6_ssi.c optional sound fslsdma
arm/freescale/imx/imx6_ahci.c optional ahci
dev/hdmi/dwc_hdmi.c optional hdmi
@ -47,23 +47,18 @@ arm/freescale/imx/imx6_usbphy.c optional ehci
#
#arm/freescale/imx/imx_console.c standard
#
# Not ready yet...
#
#arm/freescale/imx/imx51_ipuv3.c optional sc
# SDMA firmware
sdma_fw.c optional sdma_fw \
compile-with "${AWK} -f $S/tools/fw_stub.awk sdma-imx6q-to1.bin:sdma_fw -msdma -c${.TARGET}" \
# SDMA firmware.
sdma-imx6q.c optional fslsdma \
compile-with "${AWK} -f $S/tools/fw_stub.awk sdma-imx6q.bin:sdma-imx6q -msdma -c${.TARGET}" \
no-implicit-rule before-depend local \
clean "sdma_fw.c"
sdma-imx6q-to1.fwo optional sdma_fw \
dependency "sdma-imx6q-to1.bin" \
compile-with "${LD} -m ${LD_EMULATION} -b binary -d -warn-common -r -d -o ${.TARGET} sdma-imx6q-to1.bin" \
clean "sdma-imx6q.c"
sdma-imx6q.fwo optional fslsdma \
dependency "sdma-imx6q.bin" \
compile-with "${LD} -m ${LD_EMULATION} -b binary -d -warn-common -r -d -o ${.TARGET} sdma-imx6q.bin" \
no-implicit-rule \
clean "sdma-imx6q-to1.fwo"
sdma-imx6q-to1.bin optional sdma_fw \
dependency "$S/contrib/dev/imx/sdma-imx6q-to1.bin.uu" \
compile-with "uudecode < $S/contrib/dev/imx/sdma-imx6q-to1.bin.uu" \
clean "sdma-imx6q.fwo"
sdma-imx6q.bin optional fslsdma \
dependency "$S/contrib/dev/imx/sdma-imx6q.bin.uu" \
compile-with "uudecode < $S/contrib/dev/imx/sdma-imx6q.bin.uu" \
no-obj no-implicit-rule \
clean "sdma-imx6q-to1.bin"
clean "sdma-imx6q.bin"

View File

@ -358,7 +358,7 @@ load_firmware(struct sdma_softc *sc)
const struct sdma_firmware_header *header;
const struct firmware *fp;
fp = firmware_get("sdma_fw");
fp = firmware_get("sdma-imx6q");
if (fp == NULL) {
device_printf(sc->dev, "Can't get firmware.\n");
return (-1);

View File

@ -0,0 +1,47 @@
Copyright 2017, NXP
All rights reserved.
Redistribution. Reproduction and redistribution in binary form, without
modification, for use solely in conjunction with a NXP
chipset, is permitted provided that the following conditions are met:
. Redistributions must reproduce the above copyright notice and the following
disclaimer in the documentation and/or other materials provided with the
distribution.
. Neither the name of NXP nor the names of its suppliers
may be used to endorse or promote products derived from this Software
without specific prior written permission.
. No reverse engineering, decompilation, or disassembly of this Software is
permitted.
Limited patent license. NXP (.Licensor.) grants you
(.Licensee.) a limited, worldwide, royalty-free, non-exclusive license under
the Patents to make, have made, use, import, offer to sell and sell the
Software. No hardware per se is licensed hereunder.
The term .Patents. as used in this agreement means only those patents or patent
applications owned solely and exclusively by Licensor as of the date of
Licensor.s submission of the Software and any patents deriving priority (i.e.,
having a first effective filing date) therefrom. The term .Software. as used in
this agreement means the firmware image submitted by Licensor, under the terms
of this license, to git://git.kernel.org/pub/scm/linux/kernel/git/firmware/
linux-firmware.git.
Notwithstanding anything to the contrary herein, Licensor does not grant and
Licensee does not receive, by virtue of this agreement or the Licensor's
submission of any Software, any license or other rights under any patent or
patent application owned by any affiliate of Licensor or any other entity
(other than Licensor), whether expressly, impliedly, by virtue of estoppel or
exhaustion, or otherwise.
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,100 @@
Copyright 2017, NXP
All rights reserved.
Redistribution. Reproduction and redistribution in binary form, without
modification, for use solely in conjunction with a NXP
chipset, is permitted provided that the following conditions are met:
. Redistributions must reproduce the above copyright notice and the following
disclaimer in the documentation and/or other materials provided with the
distribution.
. Neither the name of NXP nor the names of its suppliers
may be used to endorse or promote products derived from this Software
without specific prior written permission.
. No reverse engineering, decompilation, or disassembly of this Software is
permitted.
Limited patent license. NXP (.Licensor.) grants you
(.Licensee.) a limited, worldwide, royalty-free, non-exclusive license under
the Patents to make, have made, use, import, offer to sell and sell the
Software. No hardware per se is licensed hereunder.
The term .Patents. as used in this agreement means only those patents or patent
applications owned solely and exclusively by Licensor as of the date of
Licensor.s submission of the Software and any patents deriving priority (i.e.,
having a first effective filing date) therefrom. The term .Software. as used in
this agreement means the firmware image submitted by Licensor, under the terms
of this license, to git://git.kernel.org/pub/scm/linux/kernel/git/firmware/
linux-firmware.git.
Notwithstanding anything to the contrary herein, Licensor does not grant and
Licensee does not receive, by virtue of this agreement or the Licensor's
submission of any Software, any license or other rights under any patent or
patent application owned by any affiliate of Licensor or any other entity
(other than Licensor), whether expressly, impliedly, by virtue of estoppel or
exhaustion, or otherwise.
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
begin 644 sdma-imx6q.bin
M4T1-00,````#````'````"D```#`````U`<``(("``#_________________
M____________________________________0AH``/_____K`@``M!@``/__
M__^>&@``_____\`#``#_______________^K`@``_____WL#``#_________
M_TP$``!N!```__________________________\`&```6Q@``.X9``!-&P``
MZ!H``(0;````&```X\';5_-2`6K[4M-J^U(<&L-JZ&(1`O\Z,`C0`C]\CP`_
M`-4``7V-`*`%ZUUX!`-]>00<?2!\>005?.Y68`8%?0EE,WX*8C%^*9@*8BY^
M"64L?A(%$@6M`LAJ)W\#(`!([7Q!F`)X"6+(:D"8%0`">`IBR&I`F!4`%0`"
M>`MBR&H4?-]M$G]_!PE]^U($&L-JTVK(8@0JR&K[4M-J``#K50!-!WWZP=M7
M!I@'`,QH#&@3P@K"`9C9P>/!VU?C7^-7\U(A:H\`U0`!?8T`H`7K7?M6>`0#
M?7D$*GTQ?'D$('QP"Q$#ZU,`#V`#!7T)93=^"F(U?G^8"F(R?@EE,'X2!1(%
MK0)@!P)]!EJ'F"9:)W\!'P,@`$CH?'`+$0,34ZB8%0`$>`EB!EH)8B9:IY@5
M`!4`!'@*8@9:"F(F6J>8%0`5`!4`!'@+8@9:"V(F6@=\``#K50!-!GWZP>-7
M8I@'``QH$\(*PE^8<`L1`Q-3;`<!?-G!^UZ*!FL'`7S9P?->VUG36(\!$`$/
M.8L`/,$K?<!:R%M.P2=\B`.)!N-<_PT1!?\=O`4^!P!-&'UP"!$`?@<)?7T'
M`GTH4M^8^%+;5+P"S`()?'P'`GTH4NB8^%+35+P"S`()?0`$UIB+`,!2R%-9
MP=9]``+&F/\(OP!_!Q5]B`35``%]C0"@!>M=CP(2`A("_SK:!0)\/@<3F:0"
MW0("?3X'$YE>!Q.9ZU4`30)\F`7K7?-2^U1J!SA];`<!?6*9:P=]?&D'!'UH
M!P)]`0XJF9-8U@`!?8X`DU6@!9-=H`9M!P9];@<+?0)X`E4$73^9%0`$>`)5
M!%TB501=/YD5``1X`E4$70)5)%T=?`!."'QI!P-]`E47?DF9!%T4?XD&DU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