Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alistair23/pmaports
  • exkc/pmaports
  • fossdd/pmaports
  • JustSoup321/pmaports
  • Eisenbahnfan/pmaports
  • raihan2000/pmaports
  • sleirsgoevy/pmaports
  • Adrian/pmaports
  • adamthiede/pmaports
  • jianhua/pmaports
  • knuxify/pmaports
  • Arnavion/pmaports
  • barni2000/pmaports
  • longnoserob/pmaports
  • smankusors/pmaports
  • Aren/pmaports
  • langfingaz/pmaports
  • sicelo/pmaports
  • kouta-kun/pmaports
  • craftyguy/pmaports
  • rdacayan/pmaports
  • rmader/pmaports
  • Haui111/pmaports
  • jakko/pmaports
  • dujem/pmaports
  • methanal/pmaports
  • WeirdTreeThing/pmaports
  • MightyM17/pmaports
  • sertonix/pmaports
  • amessier/pmaports
  • akemnade/pmaports
  • setotau/pmaports
  • kevinwidjaja21/pmaports
  • NekoCWD/pmaports
  • ollieparanoid/pmaports
  • manoedinata/pmaports
  • Drakulix/pmaports
  • grimler/pmaports
  • benpicco/pmaports
  • Frieder.Hannenheim/pmaports
  • andrisas/pmaports
  • EspiDev/pmaports
  • maze42/pmaports
  • anjandev/pmaports
  • danct12/pmaports
  • ijiki16/pmaports
  • jja2000/pmaports
  • fancsali/pmaports
  • bolilingmeng89006/pmaports
  • Minecrell/pmaports
  • chipiguay/pmaports
  • cherrypicker/pmaports
  • fortuna-mainline/pmaports
  • pevik/pmaports
  • Patriot-06/pmaports
  • JoseskVolpe/pmaports
  • verdre/pmaports
  • proycon/pmaports
  • AutumnSpark1226/pmaports
  • PsychoGame/pmaports
  • fraolt/pmaports
  • VaporGame/pmaports
  • pugzarecute/pmaports
  • CalcProgrammer1/pmaports
  • hexaheximal/pmaports
  • dabao1955/pmaports
  • HenriDellal/pmaports
  • semfault/pmaports
  • strobo5/pmaports
  • andrewgigena/pmaports
  • Athozus/pmaports
  • 1peter10/pmaports
  • vixalien/pmaports
  • Tooniis/pmaports
  • adomerle/pmaports
  • bjorn3/pmaports
  • StacyHarper/pmaports
  • Jack_Kekzoz/pmaports
  • Ceddicedced/pmaports
  • Justin_Zobel/pmaports
  • airtower-luna/pmaports
  • f-izzo/pmaports
  • cosmo/pmaports
  • 9lore/pmaports
  • postmarketOS/pmaports
  • Johnnynator/pmaports
  • iAboothahir/pmaports
  • N1kroks/pmaports
  • neuschaefer/pmaports
  • DylanVanAssche/pmaports
  • yehiashamaa987/pmaports
  • Operachi/pmaports
  • faveoled/pmaports
  • ilpianista/pmaports
  • johkra/pmaports
  • HDDTHR/pmaports
  • zsoltiv/pmaports
  • Justin/pmaports
  • Kaloyan501/pmaports_huawei_p8_lite_2015_fix
  • joelselvaraj/pmaports
  • rontti/pmaports
  • dsankouski/pmaports
  • StandaSK/pmaports
  • paricbat/pmaports
  • asdfugil/pmaports
  • komaru-yml/pmaports
  • MasterPlexus/pmaports
  • Felix/pmaports
  • ayakael/pmaports
  • feisuzhu/pmaports
  • AJ-RR/pmaports
  • SzczurekYT/pmaports
  • mediaberry/pmaports
  • justsomeguy/pmaports
  • Augis154/pmaports
  • hrdl/pmaports
  • sib0ndt/pmaports
  • 19atlas/pmaports
  • vipaoL/pmaports
  • wannjanjic/pmaports
  • dh/pmaports
  • LogicalErzor/pmaports
  • halamix2/pmaports
  • Shamilkv34/pmaports
  • Cogitri/pmaports
  • fallenritemonk/pmaports
  • user0-07161/pmaports
  • rock3tsprocket/pmaports
  • ellyq/pmaports
  • rodent/pmaports
  • mkorpershoek/pmaports
  • candrew/pmaports
  • fallaciousreasoning/pmaports
  • chalkin/pmaports
  • ungeskriptet/pmaports
  • r00t/pmaports
  • panpanpanpan/pmaports
  • celiffe/pmaports
  • davidfurey/pmaports
  • kidd/pmaports
  • tpikonen/pmaports
  • camelCaseNick/pmaports
  • ermine/pmaports
  • lgh/pmaports
  • sajattack/pmaports
  • StephanieBread/pmaports
  • M0Rf30/pmaports
  • notfound405/pmaports
  • samueldr/pmaports
  • r10nw7fd3/pmaports
  • treid998/pmaports-merge
  • denysvitali/pmaports
  • rodriguezst/pmaports
  • puppiestdoggo1/pmaports
  • donihalim/pmaports
  • EDKPiepaint/pmaports-apple-tonga-test
156 results
Show changes
Commits on Source (10)
Showing
with 199 additions and 6193 deletions
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-lg-hammerhead
pkgver=2
pkgrel=22
pkgrel=23
pkgdesc="Google Nexus 5"
url="https://postmarketos.org"
arch="armv7"
......@@ -55,7 +55,7 @@ weston() {
nonfree_firmware() {
pkgdesc="WiFi, GPU, Modem and ADSP firmware"
depends="linux-firmware-qcom linux-firmware-brcm firmware-adreno firmware-lg-hammerhead-adsp firmware-lg-hammerhead-modem msm-modem-rpmsg"
depends="linux-firmware-qcom linux-firmware-brcm firmware-adreno firmware-lg-hammerhead-adsp firmware-lg-hammerhead-modem firmware-lg-hammerhead-bluetooth msm-modem-rpmsg"
mkdir "$subpkgdir"
}
......
# Maintainer: Sireesh Kodali <scarface@disroot.org>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-motorola-potter
pkgdesc="Motorola Moto G5 Plus"
pkgver=0.1
pkgrel=11
pkgver=0.2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-motorola-potter mkbootimg mesa-dri-swrast msm-fb-refresher"
depends="postmarketos-base linux-postmarketos-qcom-msm8953 mkbootimg mesa-dri-gallium"
makedepends="devicepkg-dev"
source="deviceinfo initfs-hook.sh"
source="deviceinfo"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
"
build() {
devicepkg_build $startdir $pkgname
......@@ -19,5 +24,10 @@ package() {
devicepkg_package $startdir $pkgname
}
sha512sums="45e755703484875df218ff61aa93081edc33675d4a332acc09656c04f2b0e2b9f7ab4b603cc858061fe75d93f11a4dc00e9b0a25a781a5d1b6a0327261f308fc deviceinfo
720c52a43302001ba69d69207cc3a21714e20178c1fe93350390ab3da51e12ba0b676c9dba8edeae8551a9f06c2801f44da6d40ad007498a9e4eaca23fb6dee6 initfs-hook.sh"
nonfree_firmware() {
pkgdesc="GPU/Wi-Fi/Bluetooth/Audio/Video/Modem firmware"
depends="firmware-motorola-potter"
mkdir "$subpkgdir"
}
sha512sums="7834ed8225bba951afbc60347676217ed081b6f393c3915ab46a37f3b5a4dadc226dbfa01b21e4a320a274d655c569974b1baf194c1ee6a4218a1fc3e19b91cc deviceinfo"
......@@ -6,7 +6,8 @@ deviceinfo_name="Motorola Moto G5 Plus"
deviceinfo_manufacturer="Motorola"
deviceinfo_codename="motorola-potter"
deviceinfo_year="2017"
deviceinfo_dtb=""
deviceinfo_dtb="qcom/sdm625-motorola-potter"
deviceinfo_append_dtb="true"
deviceinfo_modules_initfs=""
deviceinfo_arch="aarch64"
......@@ -16,17 +17,16 @@ deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="1920"
deviceinfo_dev_touchscreen="/dev/input/event2"
deviceinfo_getty="ttyMSM0;115200"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=30 msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 vmalloc=350M androidboot.selinux=permissive buildvariant=eng"
deviceinfo_kernel_cmdline=""
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_sparse="true"
#!/bin/sh
# make touchscreen work
echo 1 > /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/drv_irq
pkgname=firmware-lg-hammerhead
pkgver=1
pkgrel=1
pkgrel=2
_modem_commit="d0565ebb2033bbd267b8be698373f075c9a82cd5"
pkgdesc="Firmware for LG hammerhead (Nexus 5)"
subpackages="$pkgname-modem $pkgname-adsp"
url="https://github.com/TheMuppets/proprietary_vendor_lge"
subpackages="$pkgname-modem $pkgname-adsp $pkgname-bluetooth"
url="https://developers.google.com/android/drivers#hammerheadm4b30z"
arch="armv7"
license="proprietary"
options="!check !strip !archcheck"
# Sources
source="https://bshah.in/hammerhead-firmware.tar.gz"
source="https://gitlab.com/JuniorJPDJ/hammerhead-modem/-/archive/$_modem_commit/hammerhead-modem-$_modem_commit.tar.gz
https://dl.google.com/dl/android/aosp/qcom-hammerhead-m4b30z-d6c0fe26.tgz
https://dl.google.com/dl/android/aosp/broadcom-hammerhead-m4b30z-21cf8433.tgz"
unpack() {
default_unpack
mkdir -p "$srcdir/qcom" "$srcdir/broadcom"
tail -n +315 "$srcdir/extract-qcom-hammerhead.sh" | tar -C "$srcdir/qcom" -zx
tail -n +276 "$srcdir/extract-broadcom-hammerhead.sh" | tar -C "$srcdir/broadcom" -zx
}
package() {
# parent package is empty
......@@ -19,8 +30,8 @@ package() {
modem() {
pkgdesc="LG Nexus 5 modem firmware"
cd "$srcdir"
for _i in modem.* mba.*; do
cd "$srcdir/hammerhead-modem-$_modem_commit/image"
for _i in *; do
install -Dm644 $_i "$subpkgdir"/lib/firmware/$_i
done
}
......@@ -28,10 +39,18 @@ modem() {
adsp() {
pkgdesc="LG Nexus 5 adsp firmware"
cd "$srcdir"
cd "$srcdir/qcom/vendor/qcom/hammerhead/proprietary"
for _i in adsp.*; do
install -Dm644 $_i "$subpkgdir"/lib/firmware/$_i
done
}
sha512sums="ae8cd5ad7bd6486117131b407454be79df9e8b092d7eabfcb0eec029867d6aa037f52ec0a15dd2bf268a9d9eb74e01dca7e8a4b779eb1564a95ab19457402f64 hammerhead-firmware.tar.gz"
bluetooth() {
pkgdesc="LG Nexus 5 Bluetooth firmware"
install -Dm644 "$srcdir/broadcom/vendor/broadcom/hammerhead/proprietary/bcm4335c0.hcd" "$subpkgdir"/lib/firmware/brcm/BCM4335C0.hcd
}
sha512sums="a63a0fad2c7e5920c8a30213e149c51a745cdb2b34c1b13772737d1da51cd712aa81d3e03de6f3397d0705e59d0130727979f2c1c6f529788e0fbc9bbcde6a8a hammerhead-modem-d0565ebb2033bbd267b8be698373f075c9a82cd5.tar.gz
a421b547c78b71f73faa017325e291259aa37250c68613230f30a6bad8b773eb89bf2f1cf194e1d0182874ce346996107544dde00f742cf56d23076e02435df2 qcom-hammerhead-m4b30z-d6c0fe26.tgz
003502fff6f8e69dea91f0c24e75021f9b5099c1bb65e6167f388e26d3a820e7649eb618ae7925ebc9a2b97121759308c6e9ccf4d8b49b369918bdd7b59b1ed0 broadcom-hammerhead-m4b30z-21cf8433.tgz"
# Maintainer: Sireesh Kodali <scarface@disroot.org>
pkgname=firmware-motorola-potter
pkgver=1
pkgrel=0
pkgdesc="Firmware for Motorola Moto G5 Plus"
url="https://github.com/scarface-one/firmware-motorola-potter"
arch="aarch64"
depends="linux-firmware-qcom soc-qcom-msm8916-ucm"
license="proprietary"
options="!check !strip !archcheck"
_commit="cce83e64585c036facd4cef39f47bc23d18ba2e9"
builddir="$srcdir/$pkgname-$_commit"
source="$pkgname-$_commit.tar.gz::https://github.com/scarface-one/firmware-motorola-potter/archive/$_commit.tar.gz
moto-modem-rfs-setup.openrc
firmware.files
firmware-motorola-potter.post-install"
package() {
install -Dm755 $srcdir/moto-modem-rfs-setup.openrc "$pkgdir"/etc/init.d/moto-modem-rfs-setup
while IFS="" read -r _i || [ -n "$_i" ]; do
[ ! -d $(dirname $_i) ] && mkdir -p $(dirname $_i)
echo $_i
install -Dm644 $_i "$pkgdir/$_i"
done < "$srcdir/firmware.files"
}
sha512sums="5a35ff1b567b672585f761eddbc772163f52b312c1e94410eff4b1d333852857a2f87769a45f47f7bcff373bdd5b062c3d16110e0211d85f83a7b4c6c78f6d3c firmware-motorola-potter-cce83e64585c036facd4cef39f47bc23d18ba2e9.tar.gz
d4fd0f3406c9f004e9cae7bc500c5713aab75f102f8e3ea1af820865f01eb03def01cd9ed3e8a184c7dfc22ab419628fad17957a3782885d96eb36e94461e842 moto-modem-rfs-setup.openrc
dc7b179abb099ab61bc72e8941be38d3e94bd1a43b37617b34e1a63835bb8399ee79a87d556996dfbed032e40554ca48a2ff9e9817d80ed1415db3f369266b38 firmware.files
784ac120a2231cfbee153fb8b2634af4ab5091eaa8fe207e66b47641d7531591ee3849e610bb66c7177822c86556f78d51c17ba8e4f3da2f946c4b8c5eaaf310 firmware-motorola-potter.post-install"
#!/bin/sh
rc-update add moto-modem-rfs-setup boot
./lib/firmware/postmarketos/a506_zap.b00
./lib/firmware/postmarketos/a506_zap.b01
./lib/firmware/postmarketos/a506_zap.b02
./lib/firmware/postmarketos/a506_zap.elf
./lib/firmware/postmarketos/a506_zap.mdt
./lib/firmware/postmarketos/a530_pfp.fw
./lib/firmware/postmarketos/a530_pm4.fw
./lib/firmware/postmarketos/adsp.b00
./lib/firmware/postmarketos/adsp.b01
./lib/firmware/postmarketos/adsp.b02
./lib/firmware/postmarketos/adsp.b03
./lib/firmware/postmarketos/adsp.b04
./lib/firmware/postmarketos/adsp.b05
./lib/firmware/postmarketos/adsp.b06
./lib/firmware/postmarketos/adsp.b07
./lib/firmware/postmarketos/adsp.b08
./lib/firmware/postmarketos/adsp.b09
./lib/firmware/postmarketos/adsp.b10
./lib/firmware/postmarketos/adsp.b11
./lib/firmware/postmarketos/adsp.b12
./lib/firmware/postmarketos/adsp.b13
./lib/firmware/postmarketos/adsp.mdt
./lib/firmware/postmarketos/modem.b00
./lib/firmware/postmarketos/modem.b01
./lib/firmware/postmarketos/modem.b02
./lib/firmware/postmarketos/modem.b04
./lib/firmware/postmarketos/modem.b05
./lib/firmware/postmarketos/modem.b06
./lib/firmware/postmarketos/modem.b07
./lib/firmware/postmarketos/modem.b08
./lib/firmware/postmarketos/modem.b09
./lib/firmware/postmarketos/modem.b10
./lib/firmware/postmarketos/modem.b11
./lib/firmware/postmarketos/modem.b12
./lib/firmware/postmarketos/modem.b13
./lib/firmware/postmarketos/modem.b16
./lib/firmware/postmarketos/modem.b17
./lib/firmware/postmarketos/modem.b18
./lib/firmware/postmarketos/modem.b19
./lib/firmware/postmarketos/modem.b20
./lib/firmware/postmarketos/modem.mdt
./lib/firmware/postmarketos/mba.mbn
./lib/firmware/postmarketos/wcnss.b00
./lib/firmware/postmarketos/wcnss.b01
./lib/firmware/postmarketos/wcnss.b02
./lib/firmware/postmarketos/wcnss.b04
./lib/firmware/postmarketos/wcnss.b06
./lib/firmware/postmarketos/wcnss.b09
./lib/firmware/postmarketos/wcnss.b10
./lib/firmware/postmarketos/wcnss.b11
./lib/firmware/postmarketos/wcnss.b12
./lib/firmware/postmarketos/wcnss.mdt
./lib/firmware/postmarketos/wlan/prima/WCNSS_qcom_wlan_nv.bin
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b00
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b01
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b02
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b03
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b04
./lib/firmware/postmarketos/qcom/venus-4.2/venus.mdt
#!/sbin/openrc-run
description="Setup modem firmware for tqftpserv"
depend() {
before tqftpserv
}
start()
{
MODEM_FIRMWARE_DIR="/lib/firmware/postmarketos/persist"
# The firmware present here is unique to each device
# Using the firmware of one device on another can will simply fail
# This is needed because motorola devices derive IMEI and other unique
# IDs from these files
# See also: https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
if [ ! -d $MODEM_FIRMWARE_DIR ]; then
# Make a copy of the firmware if its not already made
# Use the copy instead of the original, because if due to some error
# somehow the firmware gets corrupted, the original firmware will
# still be available on the 'persist' partition
PERSIST_PATH="/tmp/persist"
PERSIST_DEV="/dev/disk/by-partlabel/persist"
mkdir -p $PERSIST_PATH
mount $PERSIST_DEV -o ro,noatime $PERSIST_PATH
mkdir $MODEM_FIRMWARE_DIR
cp -R "$PERSIST_PATH"/rfs/msm/mpss/ "$MODEM_FIRMWARE_DIR"/readwrite
umount $PERSIST_DEV
rmdir $PERSIST_PATH
fi
ln -s "$MODEM_FIRMWARE_DIR"/readwrite/ /tmp/tqftpserv
}
......@@ -3,8 +3,8 @@
# Kernel config based on: arch/arm64/configs/channel_defconfig
pkgname=linux-motorola-channel
pkgver=4.9.203
pkgrel=3
pkgver=4.9.206
pkgrel=0
pkgdesc="Motorola G7 Play kernel fork"
arch="aarch64"
_carch="arm64"
......@@ -16,14 +16,14 @@ makedepends="bash bc dtc bison devicepkg-dev flex openssl-dev perl dtbtool xz"
# Source
_repository="android_kernel_motorola_sdm632"
_commit="db8fd3bcfeee53f5ad5ae71df30c2b88076ff002"
_commit="92694d1c83cd63c6628b1ae42b6c5a4c1c95d67b"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
disable_tty_port_set_policy.patch
disable_skip_initramfs.patch
mdss-panel-to-fb-var.patch
linux4.2-gcc10-extern_YYLOC_global_declaration.patch
fix_intree_dtc.patch
$_config
"
builddir="$srcdir/$_repository-$_commit"
......@@ -44,9 +44,9 @@ package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
}
sha512sums="41bbbe33864866407877c5769882782e099a3f48898eb26ea08f172ff0bcc1239e2fb2d250c491a44c3bc5a3718d373ced4b26682aaa574077d1cb7abbb282c5 linux-motorola-channel-db8fd3bcfeee53f5ad5ae71df30c2b88076ff002.tar.gz
sha512sums="1453e028fec1f3ce45328b3e4857237f7986bfdf12343a662ccf006b266712fdb2becea2d37978389e7ac3799e0aff6326ffb2fe910d542021bd1051b5599533 linux-motorola-channel-92694d1c83cd63c6628b1ae42b6c5a4c1c95d67b.tar.gz
0fd5fd59e16c24a85302de83f61468591df472afbddaeab2b3dbf59cf9d48af2ac8ecc1a48a72b7a1db44077fbd4856dc60f2b2885eb1adf1f8e96b3a311eaad disable_tty_port_set_policy.patch
65048fb6474fd543b14bc99d9d95cfe5297da239af211d327a8509f7777d489bd01dd911364e0c62ec0e68f4c22ebb3b145eabfe01cad2abf57cf46896a1e58f disable_skip_initramfs.patch
d5b868c64b8ebddcf74cb3aa478f30f0897af1e14e4fc42d977921104a6c568cc0bf36fc8a3b0f538cd3ca2ebf59244fdf23186a903259e5acc14d1c4ef4ccc3 mdss-panel-to-fb-var.patch
eaf2e61fcb508cdd239b8fed209d2a09ecac77287f6b46d003918fdf1c6fa2ee63f7390f3ff7c49029b8ed6cbcdd81c7e9a4b1ece9f5060b6fc84e322bd47f41 linux4.2-gcc10-extern_YYLOC_global_declaration.patch
c6d7273b247ea58281962bfd8545d8f273d5d6c0dfb1f16ce16e8b14988abdbed249863d3b9998aded5ab445022dc551480d5190b4595d84d028f60dcc03d76d fix_intree_dtc.patch
9cfefeefeaddfa7827357a5a2ede3ac6c5bb559d040b7e2dc657b4cb3bd0e84823f35500c569547a7bdf6eb98c4c2f37f3d941fb0b95b835040f83c46bdc896d config-motorola-channel.aarch64"
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -332,7 +332,7 @@
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
-$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
+$(obj)/%.dtb: $(src)/%.dts FORCE
$(call if_changed_dep,dtc)
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
../../.shared-patches/linux/linux4.2-gcc10-extern_YYLOC_global_declaration.patch
\ No newline at end of file
diff --git a/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c b/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
index 14c6eadf524..e26b697f793 100644
--- a/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
+++ b/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
@@ -587,9 +587,8 @@ _NV_TEMPLATE_TABLE NvTablesBuiltIn[/*TABLES_MAX*/][TABLE_ENTRIES_MAX] = {
((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) -
(char *)&nvDefaults.tables.hwCalValues.calData),"psSlpTimeOvrHdxLNA5G"},
{"ed",_ID_U8,SINGULAR,0,0,0,
- (((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) +
- sizeof(uint16)) - (char *)&nvDefaults.tables.hwCalValues.calData),
- "nv_TxBBFSel9MHz"},
+ ((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) -
+ (char *)&nvDefaults.tables.hwCalValues.calData),"nv_TxBBFSel9MHz"},
{"ee",_ID_U8,SINGULAR,0,0,0,
((char *)&(nvDefaults.tables.hwCalValues.calData.hwParam2) -
(char *)&nvDefaults.tables.hwCalValues.calData),"hwParam2"},
diff --git a/drivers/video/msm/msm_dba/msm_dba.c b/drivers/video/msm/msm_dba/msm_dba.c
index cc6512a..eb073a7 100644
--- a/drivers/video/msm/msm_dba/msm_dba.c
+++ b/drivers/video/msm/msm_dba/msm_dba.c
@@ -22,7 +22,7 @@
#include <linux/err.h>
#include <video/msm_dba.h>
-#include <msm_dba_internal.h>
+#include "msm_dba_internal.h"
static DEFINE_MUTEX(register_mutex);
diff --git a/drivers/net/ethernet/msm/rndis_ipa_trace.h b/drivers/net/ethernet/msm/rndis_ipa_trace.h
index c0fc573..c18046b 100644
--- a/drivers/net/ethernet/msm/rndis_ipa_trace.h
+++ b/drivers/net/ethernet/msm/rndis_ipa_trace.h
@@ -77,5 +77,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/net/ethernet/msm/
#include <trace/define_trace.h>
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
index d70abdf..7f7e452 100644
--- a/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
+++ b/drivers/platform/msm/ipa/ipa_v2/ipa_trace.h
@@ -131,5 +131,5 @@ TRACE_EVENT(
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/platform/msm/ipa/ipa_v2/
#include <trace/define_trace.h>
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h b/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h
new file mode 100644
index 0000000..d8c3b77
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h
@@ -0,0 +1,65 @@
+/*
+ * stmvl53l0-cci.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_CCI_H
+#define STMVL53L0_CCI_H
+#include <linux/types.h>
+
+#include <soc/qcom/camera2.h>
+#include "msm_camera_i2c.h"
+#include "msm_camera_dt_util.h"
+#include "msm_camera_io_util.h"
+#include "msm_cci.h"
+
+#define MSM_TOF_MAX_VREGS (10)
+
+struct msm_tof_vreg {
+ struct camera_vreg_t *cam_vreg;
+ void *data[MSM_TOF_MAX_VREGS];
+ int num_vreg;
+};
+
+struct cci_data {
+ struct msm_camera_i2c_client g_client;
+ struct msm_camera_i2c_client *client;
+ struct platform_device *pdev;
+ enum msm_camera_device_type_t device_type;
+ enum cci_i2c_master_t cci_master;
+ struct msm_tof_vreg vreg_cfg;
+ struct msm_sd_subdev msm_sd;
+ struct v4l2_subdev sdev;
+ struct v4l2_subdev_ops *subdev_ops;
+ char subdev_initialized;
+ uint32_t subdev_id;
+ uint8_t power_up;
+ uint32_t lowv;
+ uint32_t highv;
+ uint32_t xtalk;
+ struct msm_camera_gpio_conf gconf;
+ struct msm_pinctrl_info pinctrl_info;
+};
+int stmvl53l0_init_cci(void);
+void stmvl53l0_exit_cci(void *);
+int stmvl53l0_power_down_cci(void *);
+int stmvl53l0_power_up_cci(void *, unsigned int *);
+
+#endif /* STMVL53L0_CCI_H */
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h b/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h
new file mode 100644
index 0000000..a75a9e5
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h
@@ -0,0 +1,47 @@
+/*
+ * stmvl53l0-i2c.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_I2C_H
+#define STMVL53L0_I2C_H
+#include <linux/types.h>
+#include <soc/qcom/camera2.h>
+#include "msm_camera_i2c.h"
+#include "msm_camera_dt_util.h"
+#include "msm_camera_io_util.h"
+#include "msm_cci.h"
+
+struct i2c_data {
+ struct i2c_client *client;
+ struct regulator *vana;
+ uint8_t power_up;
+ uint32_t lowv;
+ uint32_t highv;
+ uint32_t xtalk;
+ struct msm_camera_gpio_conf gconf;
+ struct msm_pinctrl_info pinctrl_info;
+};
+int stmvl53l0_init_i2c(void);
+void stmvl53l0_exit_i2c(void *);
+int stmvl53l0_power_up_i2c(void *, unsigned int *);
+int stmvl53l0_power_down_i2c(void *);
+
+#endif /* STMVL53L0_I2C_H */
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0.h b/drivers/input/misc/vl53L0/inc/stmvl53l0.h
new file mode 100644
index 0000000..4ae84c9
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0.h
@@ -0,0 +1,201 @@
+/*
+ * stmvl53l0.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_H
+#define STMVL53L0_H
+
+#include <linux/types.h>
+#include <linux/mutex.h>
+#include <linux/workqueue.h>
+#include <linux/miscdevice.h>
+
+#define STMVL53L0_DRV_NAME "stmvl53l0"
+#define STMVL53L0_SLAVE_ADDR (0x52>>1)
+
+#define DRIVER_VERSION "1.1.18"
+#define DRIVER_VERSION_NUM 18
+#define I2C_M_WR 0x00
+/* #define INT_POLLING_DELAY 20 */
+
+/* if don't want to have output from vl6180_dbgmsg, comment out #DEBUG macro */
+/*#define DEBUG*/
+/* #define vl6180_dbgmsg(str, args...) pr_debug("%s: " str, __func__, ##args) */
+#define vl53l0_dbgmsg_en(str, args...) \
+ pr_debug("%s: " str, __func__, ##args)
+
+#define vl53l0_dbgmsg(str, args...) \
+ pr_debug("%s: " str, __func__, ##args)
+/* #define vl6180_errmsg(str, args...) pr_err("%s: " str, __func__, ##args) */
+#define vl53l0_errmsg(str, args...) \
+ printk(KERN_ERR "%s: " str, __func__, ##args)
+
+#define VL53L0_VDD_MIN 2850000
+#define VL53L0_VDD_MAX 2850000
+/*driver working mode*/
+#define OFF_MODE 0
+#define CAM_MODE 1
+#define SAR_MODE 2
+#define SUPER_MODE 3
+#define XTALKCAL_MODE 4
+#define OFFSETCAL_MODE 5
+
+/*user actions*/
+#define CAM_ON 0
+#define CAM_OFF 1
+#define SAR_ON 2
+#define SAR_OFF 3
+#define XTALKCAL_ON 4
+#define OFFSETCAL_ON 5
+#define CAL_OFF 6
+#define RESET 7
+/*parameter types*/
+#define OFFSET_PAR 0
+#define XTALKRATE_PAR 1
+#define XTALKENABLE_PAR 2
+#define SIGMAVAL_PRA 3
+#define SIGMACTL_PRA 4
+#define WRAPAROUNDCTL_PRA 5
+#define INTERMEASUREMENTPERIOD_PAR 6
+#define MEASUREMENTTIMINGBUDGET_PAR 7
+#define SGLVAL_PRA 8
+#define SGLCTL_PRA 9
+#define CUTV_PRA 10
+#define DRVV_PRA 11
+#define PLLPRE_PRA 12
+#define PLLFINAL_PRA 13
+#define CCI_BUS 0
+#define I2C_BUS 1
+
+
+/*
+ * IOCTL register data structs
+ */
+struct stmvl53l0_register {
+ uint32_t is_read; /*1: read 0: #define write*/
+ uint32_t reg_index;
+ uint32_t reg_bytes;
+ uint32_t reg_data;
+ int32_t status;
+};
+
+/*
+ * IOCTL parameter structs
+ */
+struct stmvl53l0_parameter {
+ uint32_t is_read; /*1: Get 0: Set*/
+ uint32_t name;
+ int32_t value;
+ int32_t status;
+};
+
+/*
+ * driver data structs
+ */
+struct stmvl53l0_data {
+ /* embed ST VL53L0 Dev data as "dev_data" */
+ VL53L0_DevData_t Data;
+ /* i2c device address user specific field */
+ uint8_t I2cDevAddr;
+ uint8_t comms_type;
+ uint16_t comms_speed_khz;
+
+ struct cci_data cci_client_object;
+ struct i2c_data i2c_client_object;
+ void *client_object;
+ struct mutex update_lock;
+ struct delayed_work dwork; /* for PS work handler */
+ struct delayed_work initwork;
+ struct delayed_work resetwork;
+ struct delayed_work checkwork;
+ struct input_dev *input_dev_ps;
+ struct kobject *range_kobj;
+
+ const char *dev_name;
+
+ /* misc device */
+ struct miscdevice miscdev;
+
+ int irq;
+ unsigned int reset;
+
+ /* control flag from HAL */
+ unsigned int enable_ps_sensor;
+
+ /* PS parameters */
+ unsigned int ps_is_singleshot;
+ unsigned int ps_is_started;
+ unsigned int ps_data; /* to store PS data */
+
+ /* Range Data */
+ VL53L0_RangingMeasurementData_t rangeData;
+ int offset;
+ int xtalk;
+
+ /* delay time in miniseconds*/
+ unsigned int delay_ms;
+
+ struct mutex work_mutex;
+ /* Debug */
+ unsigned int enableDebug;
+ uint8_t interrupt_received;
+ int d_mode;
+ uint8_t w_mode;
+ /*for SAR mode indicate low range interrupt*/
+ uint8_t lowint;
+ uint8_t bus_type;
+ uint32_t lowv;
+ uint32_t highv;
+ wait_queue_head_t range_data_wait;
+ uint8_t d_ready;
+ uint8_t cut_v;
+ unsigned int xtalkCalDistance;
+ unsigned int offsetCalDistance;
+ unsigned int xtalkcalval;
+ VL53L0_GpioFunctionality gpio_function;
+ uint8_t c_suspend;
+ uint8_t c_stopped;
+ uint32_t refSpadCount;
+ uint8_t isApertureSpads;
+ uint8_t VhvSettings;
+ uint8_t PhaseCal;
+ uint8_t pll_p;
+ uint8_t pll_f;
+};
+
+/*
+ * funtion pointer structs
+ */
+struct stmvl53l0_module_fn_t {
+ int (*init)(void);
+ void (*deinit)(void *);
+ int (*power_up)(void *, unsigned int *);
+ int (*power_down)(void *);
+};
+
+struct stmvl53l0_data *stmvl53l0_getobject(void);
+int stmvl53l0_setup(struct stmvl53l0_data *data, uint8_t type);
+int stmvl53l0_checkmoduleid(struct stmvl53l0_data *data,
+ void *client, uint8_t type);
+int stmvl53l0_livechecking(struct stmvl53l0_data *data);
+void i2c_setclient(void *client, uint8_t type);
+
+#endif /* STMVL53L0_H */
diff --git a/drivers/usb/gadget/function/u_f.h b/drivers/usb/gadget/function/u_f.h
new file mode 100644
index 0000000..1d5f0eb
--- /dev/null
+++ b/drivers/usb/gadget/function/u_f.h
@@ -0,0 +1,52 @@
+/*
+ * u_f.h
+ *
+ * Utility definitions for USB functions
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __U_F_H__
+#define __U_F_H__
+
+/* Variable Length Array Macros **********************************************/
+#define vla_group(groupname) size_t groupname##__next = 0
+#define vla_group_size(groupname) groupname##__next
+
+#define vla_item(groupname, type, name, n) \
+ size_t groupname##_##name##__offset = ({ \
+ size_t align_mask = __alignof__(type) - 1; \
+ size_t offset = (groupname##__next + align_mask) & ~align_mask;\
+ size_t size = (n) * sizeof(type); \
+ groupname##__next = offset + size; \
+ offset; \
+ })
+
+#define vla_item_with_sz(groupname, type, name, n) \
+ size_t groupname##_##name##__sz = (n) * sizeof(type); \
+ size_t groupname##_##name##__offset = ({ \
+ size_t align_mask = __alignof__(type) - 1; \
+ size_t offset = (groupname##__next + align_mask) & ~align_mask;\
+ size_t size = groupname##_##name##__sz; \
+ groupname##__next = offset + size; \
+ offset; \
+ })
+
+#define vla_ptr(ptr, groupname, name) \
+ ((void *) ((char *)ptr + groupname##_##name##__offset))
+
+struct usb_ep;
+struct usb_request;
+
+struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len);
+
+#endif /* __U_F_H__ */
+
+
diff --git a/drivers/usb/gadget/function/ci13xxx_udc.h b/drivers/usb/gadget/function/ci13xxx_udc.h
new file mode 100644
index 0000000..7983bfd
--- /dev/null
+++ b/drivers/usb/gadget/function/ci13xxx_udc.h
@@ -0,0 +1,280 @@
+/*
+ * ci13xxx_udc.h - structures, registers, and macros MIPS USB IP core
+ *
+ * Copyright (C) 2008 Chipidea - MIPS Technologies, Inc. All rights reserved.
+ *
+ * Author: David Lopo
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Description: MIPS USB IP core family device controller
+ * Structures, registers and logging macros
+ */
+
+#ifndef _CI13XXX_h_
+#define _CI13XXX_h_
+
+/******************************************************************************
+ * DEFINE
+ *****************************************************************************/
+#define CI13XXX_PAGE_SIZE 4096ul /* page size for TD's */
+#define ENDPT_MAX (32)
+#define CTRL_PAYLOAD_MAX (64)
+#define RX (0) /* similar to USB_DIR_OUT but can be used as an index */
+#define TX (1) /* similar to USB_DIR_IN but can be used as an index */
+
+/* UDC private data:
+ * 16MSb - Vendor ID | 16 LSb Vendor private data
+ */
+#define CI13XX_REQ_VENDOR_ID(id) (id & 0xFFFF0000UL)
+
+#define MSM_ETD_TYPE BIT(1)
+#define MSM_EP_PIPE_ID_RESET_VAL 0x1F001F
+
+/******************************************************************************
+ * STRUCTURES
+ *****************************************************************************/
+/* DMA layout of transfer descriptors */
+struct ci13xxx_td {
+ /* 0 */
+ u32 next;
+#define TD_TERMINATE BIT(0)
+#define TD_ADDR_MASK (0xFFFFFFEUL << 5)
+ /* 1 */
+ u32 token;
+#define TD_STATUS (0x00FFUL << 0)
+#define TD_STATUS_TR_ERR BIT(3)
+#define TD_STATUS_DT_ERR BIT(5)
+#define TD_STATUS_HALTED BIT(6)
+#define TD_STATUS_ACTIVE BIT(7)
+#define TD_MULTO (0x0003UL << 10)
+#define TD_IOC BIT(15)
+#define TD_TOTAL_BYTES (0x7FFFUL << 16)
+ /* 2 */
+ u32 page[5];
+#define TD_CURR_OFFSET (0x0FFFUL << 0)
+#define TD_FRAME_NUM (0x07FFUL << 0)
+#define TD_RESERVED_MASK (0x0FFFUL << 0)
+} __attribute__ ((packed, aligned(4)));
+
+/* DMA layout of queue heads */
+struct ci13xxx_qh {
+ /* 0 */
+ u32 cap;
+#define QH_IOS BIT(15)
+#define QH_MAX_PKT (0x07FFUL << 16)
+#define QH_ZLT BIT(29)
+#define QH_MULT (0x0003UL << 30)
+#define QH_MULT_SHIFT 11
+ /* 1 */
+ u32 curr;
+ /* 2 - 8 */
+ struct ci13xxx_td td;
+ /* 9 */
+ u32 RESERVED;
+ struct usb_ctrlrequest setup;
+} __attribute__ ((packed, aligned(4)));
+
+/* cache of larger request's original attributes */
+struct ci13xxx_multi_req {
+ unsigned len;
+ unsigned actual;
+ void *buf;
+};
+
+/* Extension of usb_request */
+struct ci13xxx_req {
+ struct usb_request req;
+ unsigned map;
+ struct list_head queue;
+ struct ci13xxx_td *ptr;
+ dma_addr_t dma;
+ struct ci13xxx_td *zptr;
+ dma_addr_t zdma;
+ struct ci13xxx_multi_req multi;
+};
+
+/* Extension of usb_ep */
+struct ci13xxx_ep {
+ struct usb_ep ep;
+ const struct usb_endpoint_descriptor *desc;
+ u8 dir;
+ u8 num;
+ u8 type;
+ char name[16];
+ struct {
+ struct list_head queue;
+ struct ci13xxx_qh *ptr;
+ dma_addr_t dma;
+ } qh;
+ struct list_head rw_queue;
+ int wedge;
+
+ /* global resources */
+ spinlock_t *lock;
+ struct device *device;
+ struct dma_pool *td_pool;
+ struct ci13xxx_td *last_zptr;
+ dma_addr_t last_zdma;
+ unsigned long dTD_update_fail_count;
+ unsigned long dTD_active_re_q_count;
+ unsigned long prime_fail_count;
+ int prime_timer_count;
+ struct timer_list prime_timer;
+
+ bool multi_req;
+};
+
+struct ci13xxx;
+struct ci13xxx_udc_driver {
+ const char *name;
+ unsigned long flags;
+ unsigned int nz_itc;
+#define CI13XXX_REGS_SHARED BIT(0)
+#define CI13XXX_REQUIRE_TRANSCEIVER BIT(1)
+#define CI13XXX_PULLUP_ON_VBUS BIT(2)
+#define CI13XXX_DISABLE_STREAMING BIT(3)
+#define CI13XXX_ZERO_ITC BIT(4)
+#define CI13XXX_ENABLE_AHB2AHB_BYPASS BIT(6)
+
+#define CI13XXX_CONTROLLER_RESET_EVENT 0
+#define CI13XXX_CONTROLLER_CONNECT_EVENT 1
+#define CI13XXX_CONTROLLER_SUSPEND_EVENT 2
+#define CI13XXX_CONTROLLER_REMOTE_WAKEUP_EVENT 3
+#define CI13XXX_CONTROLLER_RESUME_EVENT 4
+#define CI13XXX_CONTROLLER_DISCONNECT_EVENT 5
+#define CI13XXX_CONTROLLER_UDC_STARTED_EVENT 6
+#define CI13XXX_CONTROLLER_ERROR_EVENT 7
+
+ void (*notify_event)(struct ci13xxx *udc, unsigned event);
+ bool (*in_lpm)(struct ci13xxx *udc);
+};
+
+/* CI13XXX UDC descriptor & global resources */
+struct ci13xxx {
+ spinlock_t *lock; /* ctrl register bank access */
+ void __iomem *regs; /* registers address space */
+
+ struct dma_pool *qh_pool; /* DMA pool for queue heads */
+ struct dma_pool *td_pool; /* DMA pool for transfer descs */
+ struct usb_request *status; /* ep0 status request */
+ void *status_buf;/* GET_STATUS buffer */
+
+ struct usb_gadget gadget; /* USB slave device */
+ struct ci13xxx_ep ci13xxx_ep[ENDPT_MAX]; /* extended endpts */
+ u32 ep0_dir; /* ep0 direction */
+#define ep0out ci13xxx_ep[0]
+#define ep0in ci13xxx_ep[hw_ep_max / 2]
+ u8 suspended; /* suspended by the host */
+ u8 configured; /* is device configured */
+ u8 test_mode; /* the selected test mode */
+ bool rw_pending; /* Remote wakeup pending flag */
+ struct delayed_work rw_work; /* remote wakeup delayed work */
+ struct usb_gadget_driver *driver; /* 3rd party gadget driver */
+ struct ci13xxx_udc_driver *udc_driver; /* device controller driver */
+ int vbus_active; /* is VBUS active */
+ int softconnect; /* is pull-up enable allowed */
+ unsigned long dTD_update_fail_count;
+ struct usb_phy *transceiver; /* Transceiver struct */
+ bool skip_flush; /* skip flushing remaining EP
+ upon flush timeout for the
+ first EP. */
+};
+
+/******************************************************************************
+ * REGISTERS
+ *****************************************************************************/
+/* register size */
+#define REG_BITS (32)
+
+/* HCCPARAMS */
+#define HCCPARAMS_LEN BIT(17)
+
+/* DCCPARAMS */
+#define DCCPARAMS_DEN (0x1F << 0)
+#define DCCPARAMS_DC BIT(7)
+
+/* TESTMODE */
+#define TESTMODE_FORCE BIT(0)
+
+/* AHB_MODE */
+#define AHB2AHB_BYPASS BIT(31)
+
+/* USBCMD */
+#define USBCMD_RS BIT(0)
+#define USBCMD_RST BIT(1)
+#define USBCMD_SUTW BIT(13)
+#define USBCMD_ATDTW BIT(14)
+
+/* USBSTS & USBINTR */
+#define USBi_UI BIT(0)
+#define USBi_UEI BIT(1)
+#define USBi_PCI BIT(2)
+#define USBi_URI BIT(6)
+#define USBi_SLI BIT(8)
+
+/* DEVICEADDR */
+#define DEVICEADDR_USBADRA BIT(24)
+#define DEVICEADDR_USBADR (0x7FUL << 25)
+
+/* PORTSC */
+#define PORTSC_FPR BIT(6)
+#define PORTSC_SUSP BIT(7)
+#define PORTSC_PR BIT(8)
+#define PORTSC_HSP BIT(9)
+#define PORTSC_PTC (0x0FUL << 16)
+
+/* DEVLC */
+#define DEVLC_PSPD (0x03UL << 25)
+#define DEVLC_PSPD_HS (0x02UL << 25)
+
+/* USBMODE */
+#define USBMODE_CM (0x03UL << 0)
+#define USBMODE_CM_IDLE (0x00UL << 0)
+#define USBMODE_CM_DEVICE (0x02UL << 0)
+#define USBMODE_CM_HOST (0x03UL << 0)
+#define USBMODE_SLOM BIT(3)
+#define USBMODE_SDIS BIT(4)
+#define USBCMD_ITC(n) (n << 16) /* n = 0, 1, 2, 4, 8, 16, 32, 64 */
+#define USBCMD_ITC_MASK (0xFF << 16)
+
+/* ENDPTCTRL */
+#define ENDPTCTRL_RXS BIT(0)
+#define ENDPTCTRL_RXT (0x03UL << 2)
+#define ENDPTCTRL_RXR BIT(6) /* reserved for port 0 */
+#define ENDPTCTRL_RXE BIT(7)
+#define ENDPTCTRL_TXS BIT(16)
+#define ENDPTCTRL_TXT (0x03UL << 18)
+#define ENDPTCTRL_TXR BIT(22) /* reserved for port 0 */
+#define ENDPTCTRL_TXE BIT(23)
+
+/******************************************************************************
+ * LOGGING
+ *****************************************************************************/
+#define ci13xxx_printk(level, format, args...) \
+do { \
+ if (_udc == NULL) \
+ printk(level "[%s] " format "\n", __func__, ## args); \
+ else \
+ dev_printk(level, _udc->gadget.dev.parent, \
+ "[%s] " format "\n", __func__, ## args); \
+} while (0)
+
+#ifndef err
+#define err(format, args...) ci13xxx_printk(KERN_ERR, format, ## args)
+#endif
+
+#define warn(format, args...) ci13xxx_printk(KERN_WARNING, format, ## args)
+#define info(format, args...) ci13xxx_printk(KERN_INFO, format, ## args)
+
+#ifdef TRACE
+#define trace(format, args...) ci13xxx_printk(KERN_DEBUG, format, ## args)
+#define dbg_trace(format, args...) dev_dbg(dev, format, ##args)
+#else
+#define trace(format, args...) do {} while (0)
+#define dbg_trace(format, args...) do {} while (0)
+#endif
+
+#endif /* _CI13XXX_h_ */
diff --git a/drivers/usb/gadget/function/configfs.h b/drivers/usb/gadget/function/configfs.h
new file mode 100644
index 0000000..36c468c
--- /dev/null
+++ b/drivers/usb/gadget/function/configfs.h
@@ -0,0 +1,19 @@
+#ifndef USB__GADGET__CONFIGFS__H
+#define USB__GADGET__CONFIGFS__H
+
+#include <linux/configfs.h>
+
+void unregister_gadget_item(struct config_item *item);
+
+int usb_os_desc_prepare_interf_dir(struct config_group *parent,
+ int n_interf,
+ struct usb_os_desc **desc,
+ char **names,
+ struct module *owner);
+
+static inline struct usb_os_desc *to_usb_os_desc(struct config_item *item)
+{
+ return container_of(to_config_group(item), struct usb_os_desc, group);
+}
+
+#endif /* USB__GADGET__CONFIGFS__H */
diff --git a/drivers/usb/gadget/function/debug.h b/drivers/usb/gadget/function/debug.h
new file mode 100644
index 0000000..8729aca
--- /dev/null
+++ b/drivers/usb/gadget/function/debug.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __DEBUG_H_
+#define __DEBUG_H_
+
+#define DBG_MAX_MSG 1024UL
+#define DBG_MSG_LEN 80UL
+#define TIME_BUF_LEN 17
+#define DBG_EVENT_LEN (DBG_MSG_LEN - TIME_BUF_LEN)
+
+extern unsigned int enable_event_log;
+extern void put_timestamp(char *tbuf);
+extern void add_event_to_buf(char *tbuf);
+extern int debug_debugfs_init(void);
+extern void debug_debugfs_exit(void);
+
+#define LOGLEVEL_NONE 8
+#define LOGLEVEL_DEBUG 7
+#define LOGLEVEL_INFO 6
+#define LOGLEVEL_ERR 3
+
+#define log_event(log_level, x...) \
+do { \
+ char buf[DBG_MSG_LEN]; \
+ if (log_level == LOGLEVEL_DEBUG) \
+ pr_debug(x); \
+ else if (log_level == LOGLEVEL_ERR) \
+ pr_err(x); \
+ else if (log_level == LOGLEVEL_INFO) \
+ pr_info(x); \
+ if (enable_event_log) { \
+ put_timestamp(buf); \
+ snprintf(&buf[TIME_BUF_LEN - 1], DBG_EVENT_LEN, x); \
+ add_event_to_buf(buf); \
+ } \
+} while (0)
+
+#define log_event_none(x, ...) log_event(LOGLEVEL_NONE, x, ##__VA_ARGS__)
+#define log_event_dbg(x, ...) log_event(LOGLEVEL_DEBUG, x, ##__VA_ARGS__)
+#define log_event_err(x, ...) log_event(LOGLEVEL_ERR, x, ##__VA_ARGS__)
+#define log_event_info(x, ...) log_event(LOGLEVEL_INFO, x, ##__VA_ARGS__)
+
+#endif /* __DEBUG_H_ */
diff --git a/drivers/usb/gadget/function/f_ccid.h b/drivers/usb/gadget/function/f_ccid.h
new file mode 100644
index 0000000..d899044
--- /dev/null
+++ b/drivers/usb/gadget/function/f_ccid.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2011, The Linux Foundation. All rights reserved.
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details
+ */
+
+#ifndef __F_CCID_H
+#define __F_CCID_H
+
+#define PROTOCOL_TO 0x01
+#define PROTOCOL_T1 0x02
+#define ABDATA_SIZE 512
+
+/* define for dwFeatures for Smart Card Device Class Descriptors */
+/* No special characteristics */
+#define CCID_FEATURES_NADA 0x00000000
+/* Automatic parameter configuration based on ATR data */
+#define CCID_FEATURES_AUTO_PCONF 0x00000002
+/* Automatic activation of ICC on inserting */
+#define CCID_FEATURES_AUTO_ACTIV 0x00000004
+/* Automatic ICC voltage selection */
+#define CCID_FEATURES_AUTO_VOLT 0x00000008
+/* Automatic ICC clock frequency change */
+#define CCID_FEATURES_AUTO_CLOCK 0x00000010
+/* Automatic baud rate change */
+#define CCID_FEATURES_AUTO_BAUD 0x00000020
+/*Automatic parameters negotiation made by the CCID */
+#define CCID_FEATURES_AUTO_PNEGO 0x00000040
+/* Automatic PPS made by the CCID according to the active parameters */
+#define CCID_FEATURES_AUTO_PPS 0x00000080
+/* CCID can set ICC in clock stop mode */
+#define CCID_FEATURES_ICCSTOP 0x00000100
+/* NAD value other than 00 accepted (T=1 protocol in use) */
+#define CCID_FEATURES_NAD 0x00000200
+/* Automatic IFSD exchange as first exchange (T=1 protocol in use) */
+#define CCID_FEATURES_AUTO_IFSD 0x00000400
+/* TPDU level exchanges with CCID */
+#define CCID_FEATURES_EXC_TPDU 0x00010000
+/* Short APDU level exchange with CCID */
+#define CCID_FEATURES_EXC_SAPDU 0x00020000
+/* Short and Extended APDU level exchange with CCID */
+#define CCID_FEATURES_EXC_APDU 0x00040000
+/* USB Wake up signaling supported on card insertion and removal */
+#define CCID_FEATURES_WAKEUP 0x00100000
+
+#define CCID_NOTIFY_CARD _IOW('C', 1, struct usb_ccid_notification)
+#define CCID_NOTIFY_HWERROR _IOW('C', 2, struct usb_ccid_notification)
+#define CCID_READ_DTR _IOR('C', 3, int)
+
+struct usb_ccid_notification {
+ unsigned char buf[4];
+} __packed;
+
+struct ccid_bulk_in_header {
+ unsigned char bMessageType;
+ unsigned long wLength;
+ unsigned char bSlot;
+ unsigned char bSeq;
+ unsigned char bStatus;
+ unsigned char bError;
+ unsigned char bSpecific;
+ unsigned char abData[ABDATA_SIZE];
+ unsigned char bSizeToSend;
+} __packed;
+
+struct ccid_bulk_out_header {
+ unsigned char bMessageType;
+ unsigned long wLength;
+ unsigned char bSlot;
+ unsigned char bSeq;
+ unsigned char bSpecific_0;
+ unsigned char bSpecific_1;
+ unsigned char bSpecific_2;
+ unsigned char APDU[ABDATA_SIZE];
+} __packed;
+#endif
diff --git a/drivers/usb/gadget/function/u_os_desc.h b/drivers/usb/gadget/function/u_os_desc.h
new file mode 100644
index 0000000..947b7dd
--- /dev/null
+++ b/drivers/usb/gadget/function/u_os_desc.h
@@ -0,0 +1,123 @@
+/*
+ * u_os_desc.h
+ *
+ * Utility definitions for "OS Descriptors" support
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __U_OS_DESC_H__
+#define __U_OS_DESC_H__
+
+#include <asm/unaligned.h>
+#include <linux/nls.h>
+
+#define USB_EXT_PROP_DW_SIZE 0
+#define USB_EXT_PROP_DW_PROPERTY_DATA_TYPE 4
+#define USB_EXT_PROP_W_PROPERTY_NAME_LENGTH 8
+#define USB_EXT_PROP_B_PROPERTY_NAME 10
+#define USB_EXT_PROP_DW_PROPERTY_DATA_LENGTH 10
+#define USB_EXT_PROP_B_PROPERTY_DATA 14
+
+#define USB_EXT_PROP_RESERVED 0
+#define USB_EXT_PROP_UNICODE 1
+#define USB_EXT_PROP_UNICODE_ENV 2
+#define USB_EXT_PROP_BINARY 3
+#define USB_EXT_PROP_LE32 4
+#define USB_EXT_PROP_BE32 5
+#define USB_EXT_PROP_UNICODE_LINK 6
+#define USB_EXT_PROP_UNICODE_MULTI 7
+
+static inline u8 *__usb_ext_prop_ptr(u8 *buf, size_t offset)
+{
+ return buf + offset;
+}
+
+static inline u8 *usb_ext_prop_size_ptr(u8 *buf)
+{
+ return __usb_ext_prop_ptr(buf, USB_EXT_PROP_DW_SIZE);
+}
+
+static inline u8 *usb_ext_prop_type_ptr(u8 *buf)
+{
+ return __usb_ext_prop_ptr(buf, USB_EXT_PROP_DW_PROPERTY_DATA_TYPE);
+}
+
+static inline u8 *usb_ext_prop_name_len_ptr(u8 *buf)
+{
+ return __usb_ext_prop_ptr(buf, USB_EXT_PROP_W_PROPERTY_NAME_LENGTH);
+}
+
+static inline u8 *usb_ext_prop_name_ptr(u8 *buf)
+{
+ return __usb_ext_prop_ptr(buf, USB_EXT_PROP_B_PROPERTY_NAME);
+}
+
+static inline u8 *usb_ext_prop_data_len_ptr(u8 *buf, size_t off)
+{
+ return __usb_ext_prop_ptr(buf,
+ USB_EXT_PROP_DW_PROPERTY_DATA_LENGTH + off);
+}
+
+static inline u8 *usb_ext_prop_data_ptr(u8 *buf, size_t off)
+{
+ return __usb_ext_prop_ptr(buf, USB_EXT_PROP_B_PROPERTY_DATA + off);
+}
+
+static inline void usb_ext_prop_put_size(u8 *buf, int dw_size)
+{
+ put_unaligned_le32(dw_size, usb_ext_prop_size_ptr(buf));
+}
+
+static inline void usb_ext_prop_put_type(u8 *buf, int type)
+{
+ put_unaligned_le32(type, usb_ext_prop_type_ptr(buf));
+}
+
+static inline int usb_ext_prop_put_name(u8 *buf, const char *name, int pnl)
+{
+ int result;
+
+ put_unaligned_le16(pnl, usb_ext_prop_name_len_ptr(buf));
+ result = utf8s_to_utf16s(name, strlen(name), UTF16_LITTLE_ENDIAN,
+ (wchar_t *) usb_ext_prop_name_ptr(buf), pnl - 2);
+ if (result < 0)
+ return result;
+
+ put_unaligned_le16(0, &buf[USB_EXT_PROP_B_PROPERTY_NAME + pnl - 2]);
+
+ return pnl;
+}
+
+static inline void usb_ext_prop_put_binary(u8 *buf, int pnl, const u8 *data,
+ int data_len)
+{
+ put_unaligned_le32(data_len, usb_ext_prop_data_len_ptr(buf, pnl));
+ memcpy(usb_ext_prop_data_ptr(buf, pnl), data, data_len);
+}
+
+static inline int usb_ext_prop_put_unicode(u8 *buf, int pnl, const char *string,
+ int data_len)
+{
+ int result;
+ put_unaligned_le32(data_len, usb_ext_prop_data_len_ptr(buf, pnl));
+ result = utf8s_to_utf16s(string, data_len >> 1, UTF16_LITTLE_ENDIAN,
+ (wchar_t *) usb_ext_prop_data_ptr(buf, pnl),
+ data_len - 2);
+ if (result < 0)
+ return result;
+
+ put_unaligned_le16(0,
+ &buf[USB_EXT_PROP_B_PROPERTY_DATA + pnl + data_len - 2]);
+
+ return data_len;
+}
+
+#endif /* __U_OS_DESC_H__ */
# Kernel config based on: arch/arm64/configs/potter_defconfig
pkgname=linux-motorola-potter
pkgver=3.18.91
pkgrel=2
pkgdesc="Motorola Moto G5 Plus kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="motorola-potter"
url="https://kernel.org"
license="GPL2"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz gcc6"
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
# request if you find out that it is booting working with newer GCCs as
# well. See <https://postmarketos.org/vendorkernel> for instructions.
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_motorola_msm8953"
_commit="5ec24e0225d19f2746088c88fbbc48978da5f3d5"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/boulzordev/android_kernel_motorola_msm8953/archive/$_commit.tar.gz
$_config
01_prima_gcc6.patch
02_fix_msm_dba.patch
03_fix_rndis_ipa_trace_header_not_found.patch
04_fix_stmvl53l0_headers.patch
05_fix_u_f_header.patch
06_fix_usb_gadget_function.patch
gcc10-extern_YYLOC_global_declaration.patch
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Generate master DTB
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm64/boot/dt.img" "arch/arm64/boot/"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
# Master DTB
install -Dm644 "$builddir/arch/arm64/boot/dt.img" \
"$pkgdir/boot/dt.img"
}
sha512sums="e735870e981e727afd0fb97c3ae5e544a724cbf6024c6ad710fca7e50bb19a613b42a40d1f9ec18f449d8b9c85cba9d5713b472b4204c74b5ba893f2b7e61749 linux-motorola-potter-5ec24e0225d19f2746088c88fbbc48978da5f3d5.tar.gz
98429151eebf0d071d0db487d8d8a9acdcebafb3b3634cb207a74400a1136ea0f824f8c327cb8cf853688fe31a14c1af6f50050f3ec5d907f81d5576d88aed8c config-motorola-potter.aarch64
184875cf13a180d1c4bbe27d8ad24a8d6bd2e36ec35f9c4326809f1c8938ecebf3844c36ef71f4a0af9077e2506a82b2b4383ffd020dd1918aba1689d77b0c01 01_prima_gcc6.patch
7e765cb696fa8c3dfbc305b05cbf1fad85fb9572613d5391e945341dae5974a745f4906c795dc841e5562b19ab77d5257f9741e514af2c2573aa4bb8b262ce51 02_fix_msm_dba.patch
9c549714f03c7a7666e8aa7508a48cfdccab7cf3e97fb59c4df8fa97f75492365926f82c4a677c50780d68d4905504dcccbdd6de6344bd8d4b88b2331933ed46 03_fix_rndis_ipa_trace_header_not_found.patch
1a128e1483459144726458175314c58528e6b1f1a85e5f4230fa0461b0c3dd650037567f672c220a95618f9df023a82a35f010e8e8b784e349806516c1daaf7e 04_fix_stmvl53l0_headers.patch
b408f157cc025d410b38f5aee9be977e670e1ac3f195f6c3a6681446fa0c3887067d62a4f729cfcd058fab42fca355b0265764dc2d21515f6e023ed025f55d41 05_fix_u_f_header.patch
1f23466d1a864f2d2c67ae4250b0c166ecb7755779bbdad6732808a001cc2826cc1d013c2281d2ca1d5abd7d60d13783f0b9f11bb8359971f2b30b911e627220 06_fix_usb_gadget_function.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch"