* Re: [PATCH] rtl8xxxu: Fix failure to reconnect to AP
From: Jes Sorensen @ 2016-11-14 16:32 UTC (permalink / raw)
To: Barry Day; +Cc: Kalle Valo, linux-wireless
In-Reply-To: <20161114160504.GA12996@testbox>
Barry Day <briselec@gmail.com> writes:
> On Mon, Nov 14, 2016 at 08:24:45AM -0500, Jes Sorensen wrote:
>> Barry Day <briselec@gmail.com> writes:
>> > The rtl8192e and rtl8723 fail to reconnect to an AP after being
>> > disconnected. Ths patch fixes that without affecting the rtl8192cu.
>> > I don't have a rtl8723 to test but it has been tested on a rtl8192eu.
>> > After going through the orginal realtek code for the rtl8723, I am
>> > confident the patch is applicable to both.
>> >
>> > Signed-off-by: Barry Day <briselec@gmail.com>
>> > ---
>> > rtl8xxxu_core.c | 18 ++++++++++++++----
>> > 1 file changed, 14 insertions(+), 4 deletions(-)
>>
>> Hi Barry,
>>
>> Thank you for the patch. There are a couple of items which I am not
>> 100% sure about the order of.
>>
>> > diff --git a/rtl8xxxu_core.c b/rtl8xxxu_core.c
>> > index 04141e5..6ac10d2 100644
>> > --- a/rtl8xxxu_core.c
>> > +++ b/rtl8xxxu_core.c
>> > @@ -4372,17 +4372,25 @@ void rtl8xxxu_gen1_report_connect(struct rtl8xxxu_priv *priv,
>> > void rtl8xxxu_gen2_report_connect(struct rtl8xxxu_priv *priv,
>> > u8 macid, bool connect)
>> > {
>> > + u8 val8;
>> > struct h2c_cmd h2c;
>> >
>> > memset(&h2c, 0, sizeof(struct h2c_cmd));
>> >
>> > h2c.media_status_rpt.cmd = H2C_8723B_MEDIA_STATUS_RPT;
>> > - if (connect)
>> > + if (connect) {
>> > h2c.media_status_rpt.parm |= BIT(0);
>> > - else
>> > - h2c.media_status_rpt.parm &= ~BIT(0);
>> > + rtl8xxxu_gen2_h2c_cmd(priv, &h2c,
>> > + sizeof(h2c.media_status_rpt));
>> > + } else {
>> > + val8 = rtl8xxxu_read8(priv, REG_BEACON_CTRL);
>> > + val8 &= ~BEACON_FUNCTION_ENABLE;
>> > +
>> > + rtl8xxxu_write8(priv, REG_BEACON_CTRL, val8);
>> > + rtl8xxxu_write16(priv, REG_RXFLTMAP2, 0x00);
>> > + rtl8xxxu_write8(priv, REG_DUAL_TSF_RST, (BIT(0) | BIT(1)));
>> > + }
>> >
>> > - rtl8xxxu_gen2_h2c_cmd(priv, &h2c, sizeof(h2c.media_status_rpt));
>> > }
>>
>> This only affects 8192eu and not 8192cu - we left RXFLTMAP2 out of here
>> on purpose for monitor mode, but you now disable it for 8192eu/8723bu.
>
> Even in monitor mode the interface has to brought up to use it which invokes
> rtl8xxxu_start which sets it back to accepting frames.
>
>
>> > void rtl8xxxu_gen1_init_aggregation(struct rtl8xxxu_priv *priv)
>> > @@ -4515,6 +4523,8 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>> > sgi = 1;
>> > rcu_read_unlock();
>> >
>> > + rtl8xxxu_write16(priv, REG_RXFLTMAP2, 0xffff);
>> > +
>> > priv->fops->update_rate_mask(priv, ramask, sgi);
>> >
>> > rtl8xxxu_write8(priv, REG_BCN_MAX_ERR, 0xff);
>>
>> Here you enable RXFLTMAP2 for all devices - this doesn't balance with
>> the above.
>
> The original realtek code I have for the 8192cu does the disconnect the
> same way as in this patch. I tested the 8192cu using the patched
> gen2_report connect and it works. That would make things consistent across
> all chipsets.
My concern is that you only set FLATMAP and BEACON_CTRL for gen2
devices, which has zero impact on gen1 devices, such as the 8192cu. If
need to do this for gen2 (8723bu/8192eu) I assume we need to do it for
gen1 as well.
I'd like to see us do a little more investigating on this first.
Jes
^ permalink raw reply
* [meta-qt5][PATCH] Upgrade to Qt 5.8
From: Samuli Piippo @ 2016-11-14 9:57 UTC (permalink / raw)
To: openembedded-devel
The linux-oe-g++ mkspec is changed to use $$(...) operator to obtain
the contents of an environment value when qmake is run instead of when
Makefile is processed. All OE_QMAKE_xxx variables need to be exported
for qmake to find them. configure's setBootstrapVariable function needs
to change $$(..) to normal $(...) operator to work with qmake's Makefile.
qt.conf generation for qtbase recipes is not needed, as configure will
generate its own version based on configure arguments. Skip running
qmake, since configure is now automatically invoked when it's run in
qtbase's root folder.
Update PACKAGECONFIGs for qtbase to match current configure options.
Merge the two qtwayland recipes to one that supports all three targets
(target, native, nativesdk) without need for additional patch.
Change-Id: Ib37c4d7323e8b45aa2b171e8427b6ec15aaee213
Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
classes/qmake5.bbclass | 4 -
classes/qmake5_base.bbclass | 91 +++---
.../packagegroup-qt5-toolchain-target.bb | 1 -
recipes-qt/qt5/nativesdk-qtbase_git.bb | 92 +-----
.../qt5/qt3d/0001-Allow-a-tools-only-build.patch | 8 +-
recipes-qt/qt5/qt3d_git.bb | 10 +-
recipes-qt/qt5/qt5-git.inc | 4 +-
recipes-qt/qt5/qt5.inc | 2 +
recipes-qt/qt5/qtbase-native_git.bb | 30 +-
.../qt5/qtbase/0001-Add-linux-oe-g-platform.patch | 314 ++++-----------------
...o-allow-to-set-qt.conf-from-the-outside-u.patch | 36 ---
.../0003-Add-external-hostbindir-option.patch | 154 +---------
...le-Fix-pkgconfig-and-libtool-replacements.patch | 10 +-
...Invert-conditional-for-defining-QT_SOCKLE.patch | 32 ---
...configure-paths-for-target-qmake-properly.patch | 18 +-
...-unknown-features-instead-of-erroring-out.patch | 28 ++
...EGL-libraries-from-pkgconfig-and-defaults.patch | 95 -------
...external-hostbindir-option-for-native-sdk.patch | 131 ---------
.../qtbase/0013-Fix-build-with-QT_NO_OPENGL.patch | 33 ---
recipes-qt/qt5/qtbase_git.bb | 85 ++----
recipes-qt/qt5/qtcanvas3d_git.bb | 8 +-
recipes-qt/qt5/qtcharts_git.bb | 2 +-
recipes-qt/qt5/qtconnectivity_git.bb | 2 +-
recipes-qt/qt5/qtdatavis3d_git.bb | 2 +-
recipes-qt/qt5/qtdeclarative-render2d_git.bb | 12 -
...crashes-in-QtQml-code-related-to-dead-sto.patch | 44 ---
recipes-qt/qt5/qtdeclarative_git.bb | 8 +-
recipes-qt/qt5/qtenginio_git.bb | 9 +-
recipes-qt/qt5/qtgraphicaleffects_git.bb | 10 +-
recipes-qt/qt5/qtimageformats_git.bb | 10 +-
recipes-qt/qt5/qtlocation_git.bb | 10 +-
recipes-qt/qt5/qtmultimedia_git.bb | 2 +-
recipes-qt/qt5/qtquick1_git.bb | 4 +-
recipes-qt/qt5/qtquickcontrols2_git.bb | 6 +-
recipes-qt/qt5/qtquickcontrols_git.bb | 8 +-
recipes-qt/qt5/qtscript_git.bb | 2 +-
recipes-qt/qt5/qtsensors_git.bb | 10 +-
recipes-qt/qt5/qtserialbus_git.bb | 2 +-
recipes-qt/qt5/qtserialport_git.bb | 10 +-
recipes-qt/qt5/qtsvg_git.bb | 8 +-
...w-to-build-only-lrelease-lupdate-lconvert.patch | 6 +-
recipes-qt/qt5/qttools_git.bb | 7 +-
recipes-qt/qt5/qttranslations_git.bb | 2 +-
recipes-qt/qt5/qtvirtualkeyboard_git.bb | 2 +-
recipes-qt/qt5/qtwayland-native_git.bb | 31 --
...-qtwaylandscanner-tool-to-the-native-side.patch | 29 --
...yland-include-server-buffer-only-when-bui.patch | 27 --
recipes-qt/qt5/qtwayland_git.bb | 20 +-
recipes-qt/qt5/qtwebchannel_git.bb | 2 +-
recipes-qt/qt5/qtwebengine_git.bb | 12 +-
recipes-qt/qt5/qtwebkit-examples_git.bb | 2 +-
| 35 +++
recipes-qt/qt5/qtwebkit_git.bb | 3 +-
recipes-qt/qt5/qtwebsockets_git.bb | 8 +-
| 10 +-
recipes-qt/qt5/qtxmlpatterns_git.bb | 2 +-
56 files changed, 327 insertions(+), 1218 deletions(-)
delete mode 100644 recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
delete mode 100644 recipes-qt/qt5/qtbase/0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch
create mode 100644 recipes-qt/qt5/qtbase/0009-Disable-all-unknown-features-instead-of-erroring-out.patch
delete mode 100644 recipes-qt/qt5/qtbase/0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch
delete mode 100644 recipes-qt/qt5/qtbase/0012-Add-external-hostbindir-option-for-native-sdk.patch
delete mode 100644 recipes-qt/qt5/qtbase/0013-Fix-build-with-QT_NO_OPENGL.patch
delete mode 100644 recipes-qt/qt5/qtdeclarative-render2d_git.bb
delete mode 100644 recipes-qt/qt5/qtdeclarative/0003-Workaround-crashes-in-QtQml-code-related-to-dead-sto.patch
delete mode 100644 recipes-qt/qt5/qtwayland-native_git.bb
delete mode 100644 recipes-qt/qt5/qtwayland/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch
delete mode 100644 recipes-qt/qt5/qtwayland/0001-examples-wayland-include-server-buffer-only-when-bui.patch
create mode 100644 recipes-qt/qt5/qtwebkit/0004-Remove-unused-check-for-the-private_headers.patch
diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass
index 2b43f2e..1a960e8 100644
--- a/classes/qmake5.bbclass
+++ b/classes/qmake5.bbclass
@@ -17,7 +17,3 @@ do_install() {
do_install_class-native() {
qmake5_base_native_do_install
}
-
-do_install_class-nativesdk() {
- qmake5_base_nativesdk_do_install
-}
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index a4b7d1b..fa1bc56 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -30,27 +30,29 @@ EXTRA_OEMAKE = " \
OE_QMAKE_INCDIR_QT='${STAGING_DIR_TARGET}/${OE_QMAKE_PATH_HEADERS}' \
"
-OE_QMAKESPEC = "${QMAKE_MKSPEC_PATH_NATIVE}/mkspecs/${OE_QMAKE_PLATFORM_NATIVE}"
-OE_XQMAKESPEC = "${QMAKE_MKSPEC_PATH}/mkspecs/${OE_QMAKE_PLATFORM}"
OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
-OE_QMAKE_COMPILER = "${CC}"
-OE_QMAKE_CC = "${CC}"
-OE_QMAKE_CFLAGS = "${CFLAGS}"
-OE_QMAKE_CXX = "${CXX}"
-OE_QMAKE_CXXFLAGS = "${CXXFLAGS}"
-OE_QMAKE_LINK = "${CXX}"
-OE_QMAKE_LDFLAGS = "${LDFLAGS}"
-OE_QMAKE_AR = "${AR}"
-OE_QMAKE_STRIP = "echo"
-OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner"
-
-# this one needs to be exported, because qmake reads it from shell env
-export QT_CONF_PATH = "${WORKDIR}/qt.conf"
+export OE_QMAKE_COMPILER = "${CC}"
+export OE_QMAKE_CC = "${CC}"
+export OE_QMAKE_CFLAGS = "${CFLAGS}"
+export OE_QMAKE_CXX = "${CXX}"
+export OE_QMAKE_CXXFLAGS = "${CXXFLAGS}"
+export OE_QMAKE_LINK = "${CXX}"
+export OE_QMAKE_LDFLAGS = "${LDFLAGS}"
+export OE_QMAKE_AR = "${AR}"
+export OE_QMAKE_STRIP = "echo"
+export OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner"
+OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf"
+export OE_QMAKE_QTCONF = "-qtconf ${OE_QMAKE_QTCONF_PATH}"
inherit qmake5_paths remove-libtool
do_generate_qt_config_file() {
- cat > ${QT_CONF_PATH} <<EOF
+ generate_qt_config_file_paths
+ generate_qt_config_file_effective_paths
+}
+
+generate_qt_config_file_paths() {
+ cat > ${OE_QMAKE_QTCONF_PATH} <<EOF
[Paths]
Prefix = ${OE_QMAKE_PATH_PREFIX}
Headers = ${OE_QMAKE_PATH_HEADERS}
@@ -70,12 +72,21 @@ Tests = ${OE_QMAKE_PATH_TESTS}
HostBinaries = ${OE_QMAKE_PATH_HOST_BINS}
HostData = ${OE_QMAKE_PATH_HOST_DATA}
HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS}
-HostSpec = ${OE_QMAKESPEC}
-TartgetSpec = ${OE_XQMAKESPEC}
+HostSpec = ${OE_QMAKE_PLATFORM_NATIVE}
+TargetSpec = ${OE_QMAKE_PLATFORM}
ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
Sysroot = ${STAGING_DIR_TARGET}
EOF
}
+
+generate_qt_config_file_effective_paths() {
+ cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
+[EffectivePaths]
+HostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
+HostData = ${OE_QMAKE_PATH_HOST_DATA}
+HostPrefix = ${STAGING_DIR_NATIVE}${prefix_native}
+EOF
+}
#
# Allows to override following values (as in version 5.0.1)
# Prefix The default prefix for all paths.
@@ -154,8 +165,8 @@ qmake5_base_do_configure () {
# for config.tests to read this
export QMAKE_MAKE_ARGS="${EXTRA_OEMAKE}"
- CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
- ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
+ CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
+ ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
}
qmake5_base_native_do_install() {
@@ -166,37 +177,37 @@ qmake5_base_native_do_install() {
fi
}
-qmake5_base_nativesdk_do_install() {
- # Fix install paths for all
- find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g"
-
- oe_runmake install INSTALL_ROOT=${D}
- if ls ${D}${libdir}/pkgconfig/Qt5*.pc >/dev/null 2>/dev/null; then
- sed -i "s@-L${STAGING_LIBDIR}@-L\${libdir}@g" ${D}${libdir}/pkgconfig/Qt5*.pc
+qmake5_base_fix_install() {
+ STAGING_PATH=$1
+ if [ -d ${D}${STAGING_PATH} ] ; then
+ echo "Some files are installed in wrong directory ${D}${STAGING_PATH}"
+ cp -ra ${D}${STAGING_PATH}/* ${D}
+ rm -rf ${D}${STAGING_PATH}
+ # remove empty dirs
+ TMP=`dirname ${D}${STAGING_PATH}`
+ while test ${TMP} != ${D}; do
+ rmdir ${TMP}
+ TMP=`dirname ${TMP}`;
+ done
fi
}
qmake5_base_do_install() {
# Fix install paths for all
find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
+ find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g"
+ find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE},(INSTALL_ROOT),g"
oe_runmake install INSTALL_ROOT=${D}
# everything except HostData and HostBinaries is prefixed with sysroot value,
# but we cannot remove sysroot override, because that's useful for pkg-config etc
- # In some cases like QtQmlDevTools in qtdeclarative, the sed above does not work,
- # fix them manually
- if [ -d ${D}${STAGING_DIR_TARGET} ] ; then
- echo "Some files are installed in wrong directory ${D}${STAGING_DIR_TARGET}"
- cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
- rm -rf ${D}${STAGING_DIR_TARGET}
- # remove empty dirs
- TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
- while test ${TMP} != ${D}; do
- rmdir ${TMP}
- TMP=`dirname ${TMP}`;
- done
- fi
+ # concurrent builds may cause qmake to regenerate Makefiles and override the above
+ # sed changes. If that happens, move files manually to correct location.
+ qmake5_base_fix_install ${STAGING_DIR_TARGET}
+ qmake5_base_fix_install ${STAGING_DIR_HOST}
+ qmake5_base_fix_install ${STAGING_DIR_NATIVE}
+
if ls ${D}${libdir}/pkgconfig/Qt5*.pc >/dev/null 2>/dev/null; then
sed -i "s@-L${STAGING_LIBDIR}@-L\${libdir}@g" ${D}${libdir}/pkgconfig/Qt5*.pc
fi
diff --git a/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb b/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb
index 25bc530..1521dbf 100755
--- a/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb
+++ b/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb
@@ -53,7 +53,6 @@ RDEPENDS_${PN} += " \
qttranslations-qtconnectivity \
qtdeclarative-dev \
qtdeclarative-mkspecs \
- qtdeclarative-plugins \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qtdeclarative-qmlplugins', '', d)} \
qtdeclarative-tools \
qtdeclarative-staticdev \
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index 7452648..526a9c1 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -27,21 +27,18 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
# common for qtbase-native, qtbase-nativesdk and qtbase
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
- file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
file://0006-QOpenGLPaintDevice-sub-area-support.patch \
- file://0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \
file://0008-configure-paths-for-target-qmake-properly.patch \
- file://0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch \
+ file://0009-Disable-all-unknown-features-instead-of-erroring-out.patch \
file://0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \
"
# common for qtbase-native and nativesdk-qtbase
SRC_URI += " \
file://0011-Always-build-uic.patch \
- file://0012-Add-external-hostbindir-option-for-native-sdk.patch \
"
# CMake's toolchain configuration of nativesdk-qtbase
@@ -58,10 +55,11 @@ FILES_${PN}-tools-dev = " \
${FILES_SOLIBSDEV} ${libdir}/*.la \
${libdir}/*.prl \
${OE_QMAKE_PATH_ARCHDATA}/mkspecs \
+ ${OE_QMAKE_PATH_LIBS}/*.prl \
"
FILES_${PN}-tools-staticdev = " \
- ${libdir}/libQt5Bootstrap.a \
+ ${OE_QMAKE_PATH_LIBS}/*.a \
"
FILES_${PN}-tools-dbg = " \
@@ -95,71 +93,10 @@ QT_CONFIG_FLAGS += " \
OE_QMAKE_PATH_HOST_DATA = "${libdir}${QT_DIR_NAME}"
OE_QMAKE_PATH_HOST_LIBS = "${libdir}"
-do_generate_qt_config_file() {
- cat > ${QT_CONF_PATH} <<EOF
-[Paths]
-Prefix = ${OE_QMAKE_PATH_PREFIX}
-Headers = ${OE_QMAKE_PATH_HEADERS}
-Libraries = ${OE_QMAKE_PATH_LIBS}
-ArchData = ${OE_QMAKE_PATH_ARCHDATA}
-Data = ${OE_QMAKE_PATH_DATA}
-Binaries = ${OE_QMAKE_PATH_BINS}
-LibraryExecutables = ${OE_QMAKE_PATH_LIBEXECS}
-Plugins = ${OE_QMAKE_PATH_PLUGINS}
-Imports = ${OE_QMAKE_PATH_IMPORTS}
-Qml2Imports = ${OE_QMAKE_PATH_QML}
-Translations = ${OE_QMAKE_PATH_TRANSLATIONS}
-Documentation = ${OE_QMAKE_PATH_DOCS}
-Settings = ${OE_QMAKE_PATH_SETTINGS}
-Examples = ${OE_QMAKE_PATH_EXAMPLES}
-Tests = ${OE_QMAKE_PATH_TESTS}
-HostBinaries = ${OE_QMAKE_PATH_HOST_BINS}
-HostData = ${OE_QMAKE_PATH_HOST_DATA}
-HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS}
-HostSpec = ${OE_QMAKESPEC}
-TartgetSpec = ${OE_XQMAKESPEC}
-ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
-Sysroot =
-EOF
-}
-
-do_generate_qt_config_file_append() {
- cat >> ${QT_CONF_PATH} <<EOF
-
-[EffectivePaths]
-Prefix=..
-EOF
-}
-
-# qtbase is exception, we need to use mkspecs from ${S}
-QMAKE_MKSPEC_PATH = "${B}"
-
-# qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell
-export OE_QMAKE_COMPILER
-export OE_QMAKE_CC
-export OE_QMAKE_CFLAGS
-export OE_QMAKE_CXX
-export OE_QMAKE_CXXFLAGS
-export OE_QMAKE_LINK
-export OE_QMAKE_LDFLAGS
-export OE_QMAKE_AR
-export OE_QMAKE_STRIP
-
-# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
-OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
-OE_QMAKE_QMAKE = "bin/qmake"
-
do_configure() {
- # we need symlink in path relative to source, because
- # EffectivePaths:Prefix is relative to qmake location
- if [ ! -e ${B}/bin/qmake ]; then
- mkdir -p ${B}/bin
- ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
- fi
-
${S}/configure -v \
-opensource -confirm-license \
- -sysroot ${STAGING_DIR_NATIVE} \
+ -sysroot ${STAGING_DIR_TARGET} \
-no-gcc-sysroot \
-system-zlib \
-dbus-runtime \
@@ -193,33 +130,22 @@ do_configure() {
-testsdir ${OE_QMAKE_PATH_TESTS} \
-hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
-hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
+ -host-option CROSS_COMPILE=${HOST_PREFIX} \
-external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
-no-glib \
-no-iconv \
-silent \
-nomake examples \
-nomake tests \
- -nomake libs \
-no-compile-examples \
-no-rpath \
- -platform ${OE_QMAKESPEC} \
- -xplatform linux-oe-g++ \
+ -platform ${OE_QMAKE_PLATFORM_NATIVE} \
+ -xplatform ${OE_QMAKE_PLATFORM} \
${QT_CONFIG_FLAGS}
-
- bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
}
do_install() {
- # Fix install paths for all
- find . -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
-
- oe_runmake install INSTALL_ROOT=${D}
-
- install -m 755 ${B}/bin/qmake-target ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
-
- # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
- # e.g. qt3d, qtwayland
- ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
+ qmake5_base_do_install
# remove things unused in nativesdk, we need the headers and libs
rm -rf ${D}${datadir} \
@@ -262,4 +188,4 @@ fakeroot do_generate_qt_environment_file() {
addtask generate_qt_environment_file after do_install before do_package
-SRCREV = "69b43e74d78e050cf5e40197acafa4bc9f90c0bd"
+SRCREV = "969bb10eed646313209fcdd9b84605aa98fc88de"
diff --git a/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch b/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch
index bb337fd..2e8d887 100644
--- a/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch
+++ b/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch
@@ -1,4 +1,4 @@
-From befe1fd63c485b8d10d1b9f1eca3368f3ee0042b Mon Sep 17 00:00:00 2001
+From 19e8db58f5c344cc15aba5c0525ceddaa307d39d Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@theqtcompany.com>
Date: Wed, 10 Feb 2016 09:02:09 +0200
Subject: [PATCH] Allow a tools-only build
@@ -8,12 +8,12 @@ Subject: [PATCH] Allow a tools-only build
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/qt3d.pro b/qt3d.pro
-index a26e76d..016fb30 100644
+index 83e0ffc..9bb7690 100644
--- a/qt3d.pro
+++ b/qt3d.pro
@@ -1,4 +1,4 @@
--requires(contains(QT_CONFIG, opengl))
-+!tools-only:requires(contains(QT_CONFIG, opengl))
+-requires(qtConfig(opengl))
++!tools-only:requires(qtConfig(opengl))
load(configure)
qtCompileTest(assimp)
diff --git a/recipes-qt/qt5/qt3d_git.bb b/recipes-qt/qt5/qt3d_git.bb
index 9708ec9..2922173 100644
--- a/recipes-qt/qt5/qt3d_git.bb
+++ b/recipes-qt/qt5/qt3d_git.bb
@@ -3,9 +3,9 @@ require qt5-git.inc
LICENSE = "LGPL-3.0 | GPL-2.0"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv3;md5=3dcffeed712d3c916f9a2d9135703aff \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
- file://LICENSE.GPL;md5=05832301944453ec79e40ba3c3cfceec \
+ file://LICENSE.LGPLv3;md5=8211fde12cc8a4e2477602f5953f5b71 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
+ file://LICENSE.GPL;md5=c96076271561b0e3785dad260634eaa8 \
"
DEPENDS += "qtbase"
@@ -18,7 +18,7 @@ SRC_URI += " \
PACKAGECONFIG ??= ""
PACKAGECONFIG_class-native ??= "tools-only"
PACKAGECONFIG_class-nativesdk ??= "tools-only"
-PACKAGECONFIG[tools-only] = "CONFIG+=tools-only"
+PACKAGECONFIG[tools-only] = "CONFIG+=tools-only QMAKE_USE_PRIVATE+=zlib"
EXTRA_QMAKEVARS_PRE += "${PACKAGECONFIG_CONFARGS}"
@@ -27,6 +27,6 @@ FILES_${PN}-qmlplugins += " \
${OE_QMAKE_PATH_QML}/*/*/*.obj \
"
-SRCREV = "c3fdb888fbd94de0f6b7b1a6859cba8132ecc93d"
+SRCREV = "6e8e228852f0930638b0e0272509809a0fb9ab42"
BBCLASSEXTEND += "native nativesdk"
diff --git a/recipes-qt/qt5/qt5-git.inc b/recipes-qt/qt5/qt5-git.inc
index e1e25ba..a1dd16a 100644
--- a/recipes-qt/qt5/qt5-git.inc
+++ b/recipes-qt/qt5/qt5-git.inc
@@ -2,7 +2,7 @@
# Copyright (C) 2013-2016 Martin Jansa <martin.jansa@gmail.com>
QT_MODULE ?= "${BPN}"
-QT_MODULE_BRANCH ?= "5.7"
+QT_MODULE_BRANCH ?= "5.8"
QT_MODULE_BRANCH_PARAM ?= "branch=${QT_MODULE_BRANCH}"
# each module needs to define valid SRCREV
@@ -12,4 +12,4 @@ SRC_URI = " \
S = "${WORKDIR}/git"
-PV = "5.7.0+git${SRCPV}"
+PV = "5.8.0+git${SRCPV}"
diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc
index b066dde..a01c490 100644
--- a/recipes-qt/qt5/qt5.inc
+++ b/recipes-qt/qt5/qt5.inc
@@ -103,11 +103,13 @@ FILES_${PN}-qmlplugins = " \
${OE_QMAKE_PATH_QML}/*/*.qmltypes \
${OE_QMAKE_PATH_QML}/*/*.qml \
${OE_QMAKE_PATH_QML}/*/*.js \
+ ${OE_QMAKE_PATH_QML}/*/*.png \
${OE_QMAKE_PATH_QML}/*/*/*${SOLIBSDEV} \
${OE_QMAKE_PATH_QML}/*/*/qmldir \
${OE_QMAKE_PATH_QML}/*/*/*.qmltypes \
${OE_QMAKE_PATH_QML}/*/*/*.qml \
${OE_QMAKE_PATH_QML}/*/*/*.js \
+ ${OE_QMAKE_PATH_QML}/*/*/*.png \
${OE_QMAKE_PATH_QML}/*/*/*/*${SOLIBSDEV} \
${OE_QMAKE_PATH_QML}/*/*/*/qmldir \
${OE_QMAKE_PATH_QML}/*/*/*/images \
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index 4da5640..b8dc6f3 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -22,33 +22,23 @@ require qt5-git.inc
# common for qtbase-native, qtbase-nativesdk and qtbase
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
- file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
file://0006-QOpenGLPaintDevice-sub-area-support.patch \
- file://0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \
file://0008-configure-paths-for-target-qmake-properly.patch \
- file://0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch \
+ file://0009-Disable-all-unknown-features-instead-of-erroring-out.patch \
file://0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \
"
# common for qtbase-native and nativesdk-qtbase
SRC_URI += " \
file://0011-Always-build-uic.patch \
- file://0012-Add-external-hostbindir-option-for-native-sdk.patch \
"
CLEANBROKEN = "1"
-QT_CONF_PATH = "${B}/qt.conf"
-
-do_generate_qt_config_file() {
- :
-}
-
PACKAGECONFIG_CONFARGS = " \
- -prefix ${prefix} \
-sysroot ${STAGING_DIR_NATIVE} \
-no-gcc-sysroot \
-system-zlib \
@@ -68,11 +58,15 @@ PACKAGECONFIG_CONFARGS = " \
-verbose \
-release \
-prefix ${OE_QMAKE_PATH_PREFIX} \
+ -hostprefix ${OE_QMAKE_PATH_PREFIX} \
-bindir ${OE_QMAKE_PATH_BINS} \
+ -hostbindir ${OE_QMAKE_PATH_BINS} \
-libdir ${OE_QMAKE_PATH_LIBS} \
+ -hostlibdir ${OE_QMAKE_PATH_LIBS} \
-headerdir ${OE_QMAKE_PATH_HEADERS} \
-archdatadir ${OE_QMAKE_PATH_ARCHDATA} \
-datadir ${OE_QMAKE_PATH_DATA} \
+ -hostdatadir ${QMAKE_MKSPEC_PATH_NATIVE} \
-docdir ${OE_QMAKE_PATH_DOCS} \
-sysconfdir ${OE_QMAKE_PATH_SETTINGS} \
-no-glib \
@@ -84,20 +78,8 @@ PACKAGECONFIG_CONFARGS = " \
-platform linux-oe-g++ \
"
-# qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell
-export OE_QMAKE_COMPILER
-export OE_QMAKE_CC
-export OE_QMAKE_CFLAGS
-export OE_QMAKE_CXX
-export OE_QMAKE_CXXFLAGS
-export OE_QMAKE_LINK
-export OE_QMAKE_LDFLAGS
-export OE_QMAKE_AR
-export OE_QMAKE_STRIP
-
do_configure_prepend() {
MAKEFLAGS="${PARALLEL_MAKE}" ${S}/configure -opensource -confirm-license ${PACKAGECONFIG_CONFARGS} || die "Configuring qt failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
- bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
}
do_install() {
@@ -123,4 +105,4 @@ do_install() {
ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
}
-SRCREV = "69b43e74d78e050cf5e40197acafa4bc9f90c0bd"
+SRCREV = "969bb10eed646313209fcdd9b84605aa98fc88de"
diff --git a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
index b28ca8b..df2016e 100644
--- a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
+++ b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
@@ -1,4 +1,4 @@
-From d6c75f788e15fb552eacb08359698a1342a97f20 Mon Sep 17 00:00:00 2001
+From 2784921c40d0b523c75e613e48b7fd1e90ba3ef1 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Mon, 15 Apr 2013 04:29:32 +0200
Subject: [PATCH] Add linux-oe-g++ platform
@@ -7,176 +7,53 @@ Subject: [PATCH] Add linux-oe-g++ platform
shell environment, because it's easier for qt recipes to export
*FLAGS or CC specific for given recipe
-* configure: add getQEvalMakeConf and getXQEvalMakeConf
- Allow expansion of $(...) references from qmake.conf to generate
- qmake environment from shell environment as exported by qmake5_base
-
-* configure: don't export SYSTEM_VARIABLES to .qmake.vars
- linux-oe-g++ should handle this correctly and exporting LD as QMAKE_LINK is
- causing issues as we need g++ to be used as linker
+* configure: extend setBootstrapVariable to convert $$(...) operator
+ to $(...) operator to work in qmake's Makefiles
* configure.prf: Allow to add extra arguments to make
sometimes we would like to add -e or define some variable and respect it from both
Makefiles used in configure tests and also Makefiles to build the application
-* OE_QMAKE_CXX in order to allow compiler version check to succeed
- which allows WebKit to be enabled.
-
-* Other variables in order to let config.tests to use our -platform
- settings
-
-* Add setBootstrapEvalVariable to bootstrap qmake with our environment
- too, this allows us to use -platform linux-oe-g++ also for native
- recipe
-
-* disable gdb_dwarf_index
- * qmake is trying to call native gdb and we don't depend on gdb-native
- (or even provide gdb-native)
- * fixes errors like this:
- /bin/sh: gdb: command not found
- /bin/sh: line 0: test: -gt: unary operator expected
- which are not fatal, but still misleading in do_configure output
-
-* add -target suffix to qmake built in qtbase configure, this way we can
- use qmake from qtbase-native, but then include qmake built for target
- in qtbase-tools package (smilarly for nativesdk-qtbase).
-
Upstream-Status: Inappropriate [embedded specific]
too OE specific, probably cannot be upstreamed
Change-Id: I0591ed5da0d61d7cf1509d420e6b293582f1863c
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
- configure | 55 ++++++++++++-------
- mkspecs/features/configure.prf | 4 +-
- mkspecs/linux-oe-g++/qmake.conf | 42 +++++++++++++++
- mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++
- 4 files changed, 181 insertions(+), 20 deletions(-)
+ configure | 2 +-
+ mkspecs/features/configure.prf | 4 ++--
+ mkspecs/features/qt_functions.prf | 2 +-
+ mkspecs/linux-oe-g++/qmake.conf | 43 ++++++++++++++++++++++++++++++++++++
+ mkspecs/linux-oe-g++/qplatformdefs.h | 1 +
+ 5 files changed, 48 insertions(+), 4 deletions(-)
create mode 100644 mkspecs/linux-oe-g++/qmake.conf
create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h
diff --git a/configure b/configure
-index 0ba0c31..052872e 100755
+index 789ba4c..59cce01 100755
--- a/configure
+++ b/configure
-@@ -333,6 +333,16 @@ getQMakeConf()
- getSingleQMakeVariable "$1" "$specvals"
- }
-
-+# OE qmake.conf is reading some variables from shell env
-+# read them from qmake.conf, replace qmake () syntax with shell and eval
-+getQEvalMakeConf()
-+{
-+ VAL=`getQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'`
-+ EVAL=`eval "echo ${VAL}"`
-+# echo "Running getQEvalMakeConf: var='$1', val='`getQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2
-+ eval "echo ${VAL}"
-+}
-+
- getXQMakeConf()
+@@ -1624,7 +1624,7 @@ fi
+ # is where the resulting variable is written to
+ setBootstrapVariable()
{
- if [ -z "$xspecvals" ]; then
-@@ -357,6 +367,16 @@ testXConfig()
- esac
- }
-
-+# OE qmake.conf is reading some variables from shell env
-+# read them from qmake.conf, replace qmake () syntax with shell and eval
-+getXQEvalMakeConf()
-+{
-+ VAL=`getXQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'`
-+ EVAL=`eval "echo ${VAL}"`
-+# echo "Running getXQEvalMakeConf: var='$1', val='`getXQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2
-+ eval "echo ${VAL}"
-+}
-+
- compilerSupportsFlag()
- {
- cat >conftest.cpp <<EOF
-@@ -578,24 +598,14 @@ fi
- # initalize variables
- #-------------------------------------------------------------------------------
-
--SYSTEM_VARIABLES="AR RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
--for varname in $SYSTEM_VARIABLES; do
-+# Export all OE variables for qmake.conf from shell env to QMakeVars
-+OE_VARIABLES="AR CC CFLAGS COMPILER CXX CXXFLAGS LDFLAGS LINK QT_CONFIG STRIP"
-+for varname in $OE_VARIABLES; do
- qmakevarname="${varname}"
-- qmakecmdargs=""
-- # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
-- if [ "${varname}" = "LDFLAGS" ]; then
-- qmakevarname="LFLAGS"
-- elif [ "${varname}" = "LD" ]; then
-- qmakevarname="LINK"
-- elif [ "${varname}" = "AR" ]; then
-- # QMAKE_AR needs to be set to "/path/to/ar cqs" but the
-- # environment variable will be set to the command only so we
-- # need to append " cqs" for autoconf compatibility
-- qmakecmdargs=" cqs"
-- fi
- cmd=`echo \
--'if [ -n "\$'${varname}'" ]; then
-- QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}${qmakecmdargs}'"
-+'if [ -n "\$OE_QMAKE_'${varname}'" ]; then
-+ QMakeVar set OE_QMAKE_'${qmakevarname}' "\$OE_QMAKE_'${varname}'"
-+# echo "Exporting OE_QMAKE_'${qmakevarname}' value=\"\$OE_QMAKE_'${varname}'\"" >&2
- fi'`
- eval "$cmd"
- done
-@@ -3443,7 +3453,7 @@ if [ "$XPLATFORM_MAC" = "yes" ]; then
- [ "$CFG_GTK" = "auto" ] && CFG_GTK=no
- fi
-
--QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
-+QMAKE_CONF_COMPILER=`getXQEvalMakeConf QMAKE_CXX`
-
- TEST_COMPILER=$QMAKE_CONF_COMPILER
-
-@@ -3494,7 +3504,7 @@ if [ "$XPLATFORM_ANDROID" = "yes" ] ; then
- fi
- fi
-
--TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
-+TEST_COMPILER_CXXFLAGS=`getXQEvalMakeConf QMAKE_CXXFLAGS`
-
- GCC_MACHINE_DUMP=
- case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
-@@ -3893,6 +3903,14 @@ setBootstrapVariable()
- getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
+- getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
++ getQMakeConf "$1" | sed 's:\$\$(:\$(:' | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
}
-+# OE qmake.conf is reading some variables from shell env
-+# read them from qmake.conf, replace qmake () syntax with shell and eval
-+setBootstrapEvalVariable()
-+{
-+ getQEvalMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
-+}
-+
-+
# build qmake
- if true; then ###[ '!' -f "$outpath/bin/qmake" ];
- echo "Creating qmake..."
-@@ -3986,6 +4004,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
- EXEEXT=
- ;;
- esac
-+ [ "$QT_CROSS_COMPILE" = "yes" ] && EXEEXT=-target
- if [ "$BUILD_ON_MAC" = "yes" ]; then
- echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile"
- echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
-index a890c7f..151630c 100644
+index f275e3a..5aa15f5 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
-@@ -71,14 +71,14 @@ defineTest(qtCompileTest) {
+@@ -37,14 +37,14 @@ defineTest(qtCompileTest) {
}
# Clean up after previous run
- exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")
+ exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE $$(QMAKE_MAKE_ARGS) distclean")
- mkpath($$test_out_dir)|error("Aborting.")
+ mkpath($$test_out_dir)|error()
!isEmpty (QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF
@@ -186,157 +63,72 @@ index a890c7f..151630c 100644
log("yes$$escape_expand(\\n)")
msg = "test $$1 succeeded"
write_file($$QMAKE_CONFIG_LOG, msg, append)
+diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
+index 708815d..097ac49 100644
+--- a/mkspecs/features/qt_functions.prf
++++ b/mkspecs/features/qt_functions.prf
+@@ -67,7 +67,7 @@ defineTest(qtHaveModule) {
+ defineTest(qtPrepareTool) {
+ cmd = $$eval(QT_TOOL.$${2}.binary)
+ isEmpty(cmd) {
+- cmd = $$[QT_HOST_BINS]/$$2
++ cmd = $$[QT_HOST_BINS/get]/$$2
+ exists($${cmd}.pl) {
+ $${1}_EXE = $${cmd}.pl
+ cmd = perl -w $$system_path($${cmd}.pl)
diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf
new file mode 100644
-index 0000000..311ba04
+index 0000000..c1837e6
--- /dev/null
+++ b/mkspecs/linux-oe-g++/qmake.conf
-@@ -0,0 +1,42 @@
+@@ -0,0 +1,43 @@
+#
+# qmake configuration for linux-g++ with modifications for building with OpenEmbedded
+#
+
-+MAKEFILE_GENERATOR = UNIX
++MAKEFILE_GENERATOR = UNIX
+CONFIG += incremental
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/linux.conf)
+
+# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip
-+QMAKE_AR = $(OE_QMAKE_AR) cqs
-+QMAKE_STRIP = $(OE_QMAKE_STRIP)
-+QMAKE_WAYLAND_SCANNER = $(OE_QMAKE_WAYLAND_SCANNER)
++QMAKE_AR = $$(OE_QMAKE_AR) cqs
++QMAKE_STRIP = $$(OE_QMAKE_STRIP)
++QMAKE_WAYLAND_SCANNER = $$(OE_QMAKE_WAYLAND_SCANNER)
+
+include(../common/gcc-base-unix.conf)
+
+# *FLAGS from gcc-base.conf
-+QMAKE_CFLAGS += $(OE_QMAKE_CFLAGS)
-+QMAKE_CXXFLAGS += $(OE_QMAKE_CXXFLAGS)
-+QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
++QMAKE_CFLAGS += $$(OE_QMAKE_CFLAGS)
++QMAKE_CXXFLAGS += $$(OE_QMAKE_CXXFLAGS)
++QMAKE_LFLAGS += $$(OE_QMAKE_LDFLAGS)
+
+include(../common/g++-unix.conf)
+
+# tc settings from g++-base.conf
-+QMAKE_COMPILER = $(OE_QMAKE_COMPILER) gcc
-+QMAKE_CC = $(OE_QMAKE_CC)
-+QMAKE_CXX = $(OE_QMAKE_CXX)
++QMAKE_COMPILER = $$(OE_QMAKE_COMPILER) gcc
++QMAKE_CC = $$(OE_QMAKE_CC)
++QMAKE_CXX = $$(OE_QMAKE_CXX)
+
-+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS)
++QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(OE_QMAKE_CFLAGS)
+
-+QMAKE_LINK = $(OE_QMAKE_LINK)
-+QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
-+QMAKE_LINK_C = $(OE_QMAKE_LINK)
-+QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK)
++QMAKE_LINK = $$(OE_QMAKE_LINK)
++QMAKE_LINK_SHLIB = $$(OE_QMAKE_LINK)
++QMAKE_LINK_C = $$(OE_QMAKE_LINK)
++QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK)
+
+# for the SDK
-+isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG)
++isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG)
+
+include(../oe-device-extra.pri)
+
++load(device_config)
+load(qt_config)
diff --git a/mkspecs/linux-oe-g++/qplatformdefs.h b/mkspecs/linux-oe-g++/qplatformdefs.h
new file mode 100644
-index 0000000..dd12003
+index 0000000..5d22fb4
--- /dev/null
+++ b/mkspecs/linux-oe-g++/qplatformdefs.h
-@@ -0,0 +1,100 @@
-+/****************************************************************************
-+**
-+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-+** Contact: http://www.qt-project.org/legal
-+**
-+** This file is part of the qmake spec of the Qt Toolkit.
-+**
-+** $QT_BEGIN_LICENSE:LGPL$
-+** Commercial License Usage
-+** Licensees holding valid commercial Qt licenses may use this file in
-+** accordance with the commercial license agreement provided with the
-+** Software or, alternatively, in accordance with the terms contained in
-+** a written agreement between you and Digia. For licensing terms and
-+** conditions see http://qt.digia.com/licensing. For further information
-+** use the contact form at http://qt.digia.com/contact-us.
-+**
-+** GNU Lesser General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU Lesser
-+** General Public License version 2.1 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.LGPL included in the
-+** packaging of this file. Please review the following information to
-+** ensure the GNU Lesser General Public License version 2.1 requirements
-+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-+**
-+** In addition, as a special exception, Digia gives you certain additional
-+** rights. These rights are described in the Digia Qt LGPL Exception
-+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-+**
-+** GNU General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU
-+** General Public License version 3.0 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.GPL included in the
-+** packaging of this file. Please review the following information to
-+** ensure the GNU General Public License version 3.0 requirements will be
-+** met: http://www.gnu.org/copyleft/gpl.html.
-+**
-+**
-+** $QT_END_LICENSE$
-+**
-+****************************************************************************/
-+
-+#ifndef QPLATFORMDEFS_H
-+#define QPLATFORMDEFS_H
-+
-+// Get Qt defines/settings
-+
-+#include "qglobal.h"
-+
-+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-+
-+// 1) need to reset default environment if _BSD_SOURCE is defined
-+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-+// 3) it seems older glibc need this to include the X/Open stuff
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE
-+#endif
-+
-+#include <unistd.h>
-+
-+
-+// We are hot - unistd.h should have turned on the specific APIs we requested
-+
-+#include <features.h>
-+#include <pthread.h>
-+#include <dirent.h>
-+#include <fcntl.h>
-+#include <grp.h>
-+#include <pwd.h>
-+#include <signal.h>
-+
-+#include <sys/types.h>
-+#include <sys/ioctl.h>
-+#include <sys/ipc.h>
-+#include <sys/time.h>
-+#include <sys/shm.h>
-+#include <sys/socket.h>
-+#include <sys/stat.h>
-+#include <sys/wait.h>
-+#include <netinet/in.h>
-+#ifndef QT_NO_IPV6IFNAME
-+#include <net/if.h>
-+#endif
-+
-+#define QT_USE_XOPEN_LFS_EXTENSIONS
-+#include "../common/posix/qplatformdefs.h"
-+
-+#undef QT_SOCKLEN_T
-+
-+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-+#define QT_SOCKLEN_T socklen_t
-+#else
-+#define QT_SOCKLEN_T int
-+#endif
-+
-+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-+#define QT_SNPRINTF ::snprintf
-+#define QT_VSNPRINTF ::vsnprintf
-+#endif
-+
-+#endif // QPLATFORMDEFS_H
+@@ -0,0 +1 @@
++#include "../linux-g++/qplatformdefs.h"
diff --git a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
deleted file mode 100644
index 699e385..0000000
--- a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From e5f8607cfa1d2bcc798686cdf7c87ea0c6577d30 Mon Sep 17 00:00:00 2001
-From: Holger Freyther <zecke@selfish.org>
-Date: Wed, 26 Sep 2012 17:22:30 +0200
-Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the
- environment
-
-Allow to set a qt.conf from the outside using the environment. This allows
-to inject new prefixes and other paths into qmake. This is needed when using
-the same qmake binary to build qt/x11 and qt/embedded
-
-Upstream-Status: Inappropriate [embedded specific]
- again very OE specific to read everything from environment (reusing the same
- qmake from sstate and replacing all configured paths in it with qt.conf from
- environment).
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/corelib/global/qlibraryinfo.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
-index 4582001..ff65ef9 100644
---- a/src/corelib/global/qlibraryinfo.cpp
-+++ b/src/corelib/global/qlibraryinfo.cpp
-@@ -163,7 +163,10 @@ void QLibrarySettings::load()
-
- QSettings *QLibraryInfoPrivate::findConfiguration()
- {
-- QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
-+ QByteArray config = getenv("QT_CONF_PATH");
-+ QString qtconfig = QFile::decodeName(config);
-+ if(!QFile::exists(qtconfig))
-+ qtconfig = QStringLiteral(":/qt/etc/qt.conf");
- if (QFile::exists(qtconfig))
- return new QSettings(qtconfig, QSettings::IniFormat);
- #ifdef QT_BUILD_QMAKE
diff --git a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
index 381cde2..8224171 100644
--- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
+++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
@@ -1,165 +1,23 @@
-From c1dc6165d6a085f162ed32ef5697f645019f9ee0 Mon Sep 17 00:00:00 2001
+From 502b95b840a5f79e5a68e9bd5b10dbdc92485f1f Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 6 Apr 2013 13:15:07 +0200
Subject: [PATCH] Add -external-hostbindir option
-* when cross-compiling it's sometimes useful to use existing tools from machine
- (or in OpenEmbedded built with separate native recipe) when building for target
-
-* this way we can skip bootstraping tools we already have
-
-* qt_functions: temporary remove isEmpty check
-* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
-* isEmpty works correctly only with qmake variables (e.g. $$FOO -
- isEmpty(FOO)), but doesn't work with system properties like $$[FOO].
-
* cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries
-Upstream-Status: Pending
- is a lot better for upstreaming (and it was already sort of approved by
- Oswald) but in 5.2.0 I've noticed that he added something similar for
- android builds
+Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Simon Busch <morphis@gravedo.de>
Signed-off-by: Jonathan Liu <net147@gmail.com>
-Conflicts:
- configure
-
Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2
---
- configure | 14 ++++++++++++++
- mkspecs/features/qt_functions.prf | 6 +++++-
- mkspecs/features/qt_tool.prf | 4 +++-
- qtbase.pro | 16 ++++++++++++++++
- src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
- src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
- src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
- 7 files changed, 44 insertions(+), 8 deletions(-)
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
+ src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
+ src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
-diff --git a/configure b/configure
-index 052872e..1fcbb3a 100755
---- a/configure
-+++ b/configure
-@@ -834,6 +834,7 @@ QT_HOST_BINS=
- QT_HOST_LIBS=
- QT_HOST_DATA=
- QT_EXT_PREFIX=
-+QT_EXTERNAL_HOST_BINS=
-
- #flags for SQL drivers
- QT_CFLAGS_PSQL=
-@@ -953,6 +954,7 @@ while [ "$#" -gt 0 ]; do
- -testsdir| \
- -hostdatadir| \
- -hostbindir| \
-+ -external-hostbindir| \
- -hostlibdir| \
- -extprefix| \
- -sysroot| \
-@@ -1185,6 +1187,9 @@ while [ "$#" -gt 0 ]; do
- extprefix)
- QT_EXT_PREFIX="$VAL"
- ;;
-+ external-hostbindir)
-+ QT_EXTERNAL_HOST_BINS="$VAL"
-+ ;;
- pkg-config)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_PKGCONFIG="$VAL"
-@@ -2447,6 +2452,10 @@ Installation options:
- -hostdatadir <dir> . Data used by qmake will be installed to <dir>
- (default HOSTPREFIX)
-
-+ -external-hostbindir <dir> Use external host executables instead of building them
-+ (not used by defaut)
-+
-+
- Configure options:
-
- The defaults (*) are usually acceptable. A plus (+) denotes a default value
-@@ -3209,6 +3218,11 @@ fi
- # command line and environment validation
- #-------------------------------------------------------------------------------
-
-+# default is empty, don't call makeabs if it is empty
-+if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then
-+ QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"`
-+fi
-+
- # update QT_CONFIG to show our current predefined configuration
- CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h
- case "$CFG_QCONFIG" in
-diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
-index 54641ce..7d7baa4 100644
---- a/mkspecs/features/qt_functions.prf
-+++ b/mkspecs/features/qt_functions.prf
-@@ -71,7 +71,11 @@ defineTest(qtHaveModule) {
- defineTest(qtPrepareTool) {
- cmd = $$eval(QT_TOOL.$${2}.binary)
- isEmpty(cmd) {
-- cmd = $$[QT_HOST_BINS]/$$2
-+ QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
-+ isEmpty(QT_EXTERNAL_HOST_BINS): \
-+ cmd = $$[QT_HOST_BINS]/$$2
-+ else: \
-+ cmd = $$[QT_EXTERNAL_HOST_BINS]/$$2
- exists($${cmd}.pl) {
- $${1}_EXE = $${cmd}.pl
- cmd = perl -w $$system_path($${cmd}.pl)
-diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
-index bdeb59c..b8c539f 100644
---- a/mkspecs/features/qt_tool.prf
-+++ b/mkspecs/features/qt_tool.prf
-@@ -14,10 +14,12 @@ load(qt_app)
- CONFIG += console
- DEFINES *= QT_USE_QSTRINGBUILDER
-
-+QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
-+
- # If we are doing a prefix build, create a "module" pri which enables
- # qtPrepareTool() to work with the non-installed build.
- # Non-bootstrapped tools always need this because of the environment setup.
--!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)) {
-+!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)):isEmpty(QT_EXTERNAL_HOST_BINS) {
- isEmpty(MODULE):MODULE = $$TARGET
-
- load(qt_build_paths)
-diff --git a/qtbase.pro b/qtbase.pro
-index 11cff9e..ec03669 100644
---- a/qtbase.pro
-+++ b/qtbase.pro
-@@ -38,6 +38,19 @@ CONFIG -= qt
-
- ### installations ####
-
-+QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
-+
-+#qmake
-+qmake.path = $$[QT_HOST_BINS]
-+qmake.files = $$OUT_PWD/bin/qmake
-+!isEmpty(QT_EXTERNAL_HOST_BINS) {
-+ qmake.files = $$[QT_EXTERNAL_HOST_BINS]/qmake
-+}
-+equals(QMAKE_HOST.os, Windows) {
-+ qmake.files = $${qmake.files}.exe
-+}
-+INSTALLS += qmake
-+
- #licheck
- licheck.path = $$[QT_HOST_BINS]
- licheck.files = $$PWD/bin/$$QT_LICHECK
-@@ -51,6 +64,9 @@ INSTALLS += fixqt4headers
- #syncqt
- syncqt.path = $$[QT_HOST_BINS]
- syncqt.files = $$PWD/bin/syncqt.pl
-+!isEmpty(QT_EXTERNAL_HOST_BINS) {
-+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/syncqt.pl
-+}
- INSTALLS += syncqt
-
- # If we are doing a prefix build, create a "module" pri which enables
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index a5ed8b2..0e11a1e 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
diff --git a/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch b/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch
index e24d475..c105488 100644
--- a/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch
+++ b/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch
@@ -1,4 +1,4 @@
-From d83234c35de8f52ce3bf6eb262ad8e6af467ac34 Mon Sep 17 00:00:00 2001
+From bf1498618415e7b1e57b54881b1e56d74f2cdf6b Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 27 Apr 2013 23:15:37 +0200
Subject: [PATCH] qt_module: Fix pkgconfig and libtool replacements
@@ -68,7 +68,7 @@ Signed-off-by: Jonathan Liu <net147@gmail.com>
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
-index 71e96b4..0d7535c 100644
+index 0c5f080..a6e4f09 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -317,6 +317,19 @@ contains(TEMPLATE, .*app) {
@@ -89,13 +89,13 @@ index 71e96b4..0d7535c 100644
+}
+
QT_PLUGIN_VERIFY = DEPLOYMENT_PLUGIN
- contains(QT_CONFIG, static) {
+ qtConfig(static) {
QT_PLUGIN_VERIFY += QTPLUGIN
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
-index b367bc1..209cc43 100644
+index e754a17..4c1530e 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
-@@ -38,7 +38,7 @@ contains(TEMPLATE, .*lib) {
+@@ -37,7 +37,7 @@ contains(TEMPLATE, .*lib) {
lib_replace.replace =
} else {
lib_replace.match = $$rplbase/lib
diff --git a/recipes-qt/qt5/qtbase/0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch b/recipes-qt/qt5/qtbase/0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch
deleted file mode 100644
index 4ea4061..0000000
--- a/recipes-qt/qt5/qtbase/0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 7ab6ff7ba20a3173c10a76814d3c9ed312c80627 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 8 Jun 2015 13:59:25 -0700
-Subject: [PATCH] linux-oe-g++: Invert conditional for defining QT_SOCKLEN_T
-
-This helps to make sure that QT_SOCKLEN_T is defined to be 'int'
-only when its glibc < 2 and not also for the libraries which may define
-it as per standards but are not glibc, e.g. musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- mkspecs/linux-oe-g++/qplatformdefs.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/mkspecs/linux-oe-g++/qplatformdefs.h b/mkspecs/linux-oe-g++/qplatformdefs.h
-index dd12003..8623651 100644
---- a/mkspecs/linux-oe-g++/qplatformdefs.h
-+++ b/mkspecs/linux-oe-g++/qplatformdefs.h
-@@ -86,10 +86,10 @@
-
- #undef QT_SOCKLEN_T
-
--#if defined(__GLIBC__) && (__GLIBC__ >= 2)
--#define QT_SOCKLEN_T socklen_t
--#else
-+#if defined(__GLIBC__) && (__GLIBC__ < 2)
- #define QT_SOCKLEN_T int
-+#else
-+#define QT_SOCKLEN_T socklen_t
- #endif
-
- #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
diff --git a/recipes-qt/qt5/qtbase/0008-configure-paths-for-target-qmake-properly.patch b/recipes-qt/qt5/qtbase/0008-configure-paths-for-target-qmake-properly.patch
index bac1841..6d64e6b 100644
--- a/recipes-qt/qt5/qtbase/0008-configure-paths-for-target-qmake-properly.patch
+++ b/recipes-qt/qt5/qtbase/0008-configure-paths-for-target-qmake-properly.patch
@@ -1,4 +1,4 @@
-From 0f4ab3e27938002134e8f3f9eb12cf9c50b2ab95 Mon Sep 17 00:00:00 2001
+From cc926956758bf8170c4e49c66e1066524b43f65f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 13 Nov 2015 12:36:11 +0100
Subject: [PATCH] configure paths for target qmake properly
@@ -19,11 +19,11 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
-index f49a674..d30d0ca 100755
+index 8b33c5b..1df248f 100755
--- a/configure
+++ b/configure
-@@ -3792,8 +3792,13 @@ if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG compile_examples"
+@@ -1545,8 +1545,13 @@ if [ -z "$QT_REL_HOST_DATA" ]; then
+ fi
fi
-shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
@@ -38,7 +38,7 @@ index f49a674..d30d0ca 100755
QT_CONFIGURE_STR_OFF=0
-@@ -3826,7 +3831,11 @@ QT_CONFIGURE_STRS_ALL=$QT_CONFIGURE_STRS
+@@ -1579,7 +1584,11 @@ QT_CONFIGURE_STRS_ALL=$QT_CONFIGURE_STRS
QT_CONFIGURE_STR_OFFSETS=
QT_CONFIGURE_STRS=
@@ -51,7 +51,7 @@ index f49a674..d30d0ca 100755
addConfStr "$QT_REL_HOST_BINS"
addConfStr "$QT_REL_HOST_LIBS"
addConfStr "$QT_REL_HOST_DATA"
-@@ -3838,6 +3847,12 @@ addConfStr "$shortspec"
+@@ -1591,6 +1600,12 @@ addConfStr "$shortspec"
#-------------------------------------------------------------------------------
[ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
@@ -62,9 +62,9 @@ index f49a674..d30d0ca 100755
+fi
+
cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
- /* License Info */
- static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
-@@ -3850,7 +3865,7 @@ static const char qt_configure_installation [12+11] = "qt_instdate=2
+ /* Installation date */
+ static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20";
+@@ -1599,7 +1614,7 @@ static const char qt_configure_installation [12+11] = "qt_instdate=2
static const char qt_configure_prefix_path_str [512 + 12] = "qt_prfxpath=$QT_INSTALL_PREFIX";
#ifdef QT_BUILD_QMAKE
static const char qt_configure_ext_prefix_path_str [512 + 12] = "qt_epfxpath=$QT_EXT_PREFIX";
diff --git a/recipes-qt/qt5/qtbase/0009-Disable-all-unknown-features-instead-of-erroring-out.patch b/recipes-qt/qt5/qtbase/0009-Disable-all-unknown-features-instead-of-erroring-out.patch
new file mode 100644
index 0000000..cb9de79
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0009-Disable-all-unknown-features-instead-of-erroring-out.patch
@@ -0,0 +1,28 @@
+From 9eb81e3bdeda4f90e5f2942400aef38b51a356bd Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo@qt.io>
+Date: Mon, 24 Oct 2016 09:45:18 +0300
+Subject: [PATCH] Disable all unknown features instead of erroring out
+
+Task-number: QTBUG-56656
+Change-Id: Ib884fe33cac74439f9592b145937f6b75ced8447
+---
+ mkspecs/features/qt_configure.prf | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
+index e8fa0c6..0ca5670 100644
+--- a/mkspecs/features/qt_configure.prf
++++ b/mkspecs/features/qt_configure.prf
+@@ -1009,7 +1009,8 @@ defineReplace(qtConfEvaluateSingleExpression) {
+ error("Expression '$$1' is accessing field '$$var' of non-local feature $${feature}.")
+ return($$result)
+ }
+- error("Unknown feature object $${feature} in expression '$${1}'.")
++ warning("Unknown feature object $${feature} in expression '$${1}'.")
++ result = false
+ }
+ !qtConfCheckFeature($$feature): \
+ error("Expression '$$1' is accessing non-emitted feature $${feature}.")
+--
+1.9.1
+
diff --git a/recipes-qt/qt5/qtbase/0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch b/recipes-qt/qt5/qtbase/0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch
deleted file mode 100644
index 23d0ab3..0000000
--- a/recipes-qt/qt5/qtbase/0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 91b87aed0a2a96b0d6b54757ea13c75ee648a9b0 Mon Sep 17 00:00:00 2001
-From: Julien Gueytat <contact@jgueytat.fr>
-Date: Wed, 27 Apr 2016 19:24:39 +0200
-Subject: [PATCH] Reorder EGL libraries from pkgconfig and defaults:
-
-https://bugreports.qt.io/browse/QTBUG-50838
-https://bugreports.qt.io/browse/QTBUG-52739
-
-The modification is the less intrusive possible. It only swaps LIBS and QMAKE_LIBS_EGL.
-The reason behind that was that for the RaspberryPi:
- * -lEGL -GLESv2 can link
- * -lGLESv2 -lEGL can't
-
-Adding -lEGL -lGLESv2 and then -lEGL gives -lGLESv2 -lEGL ... the libraries swaped.
-
-Signed-off-by: Julien Gueytat <contact@jgueytat.fr>
----
- config.tests/qpa/egl/egl.pro | 5 ++++-
- config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 12 +++++++-----
- configure | 16 ++++++++++++++--
- 3 files changed, 25 insertions(+), 8 deletions(-)
-
-diff --git a/config.tests/qpa/egl/egl.pro b/config.tests/qpa/egl/egl.pro
-index b5396da..828b674 100644
---- a/config.tests/qpa/egl/egl.pro
-+++ b/config.tests/qpa/egl/egl.pro
-@@ -5,6 +5,9 @@ for(p, QMAKE_LIBDIR_EGL) {
- }
-
- !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
--!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
-+
-+BACKUP_LIBS = $$LIBS
-+!isEmpty(QMAKE_LIBS_EGL): LIBS = $$QMAKE_LIBS_EGL
-+LIBS += $$BACKUP_LIBS
-
- CONFIG -= qt
-diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
-index d8b1c3e..06f7241 100644
---- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
-+++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
-@@ -1,11 +1,13 @@
- SOURCES = eglfs-brcm.cpp
-
--CONFIG -= qt
--
--INCLUDEPATH += $$QMAKE_INCDIR_EGL
--
- for(p, QMAKE_LIBDIR_EGL) {
- LIBS += -L$$p
- }
-
--LIBS += -lEGL -lGLESv2 -lbcm_host
-+INCLUDEPATH += $$QMAKE_INCDIR_EGL
-+
-+BACKUP_LIBS = $$LIBS
-+LIBS = -lEGL -lGLESv2 -lbcm_host
-+LIBS += $$BACKUP_LIBS
-+
-+CONFIG -= qt
-diff --git a/configure b/configure
-index d30d0ca..14f348c 100755
---- a/configure
-+++ b/configure
-@@ -5891,7 +5891,9 @@ if [ "$CFG_EGL" != "no" ]; then
- QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
- QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
- QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
-- fi # detect EGL support
-+ fi
-+
-+ # detect EGL support
- if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
- CFG_EGL=yes
- if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
-@@ -5914,8 +5916,18 @@ fi
- if [ "$CFG_EGLFS" != "no" ]; then
- if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then
- CFG_EGLFS="$CFG_EGL"
-+
-+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
-+ QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
-+ QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
-+ QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
-+ QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
-+ QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
-+ QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
-+ fi
-+
- # Detect eglfs backends.
-- if compileTest qpa/eglfs-brcm "eglfs-brcm"; then
-+ if compileTest qpa/eglfs-brcm "eglfs-brcm" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
- CFG_EGLFS_BRCM=yes
- else
- CFG_EGLFS_BRCM=no
diff --git a/recipes-qt/qt5/qtbase/0012-Add-external-hostbindir-option-for-native-sdk.patch b/recipes-qt/qt5/qtbase/0012-Add-external-hostbindir-option-for-native-sdk.patch
deleted file mode 100644
index 1ab8abe..0000000
--- a/recipes-qt/qt5/qtbase/0012-Add-external-hostbindir-option-for-native-sdk.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From cb66a3193b1b1b8b402548b615c3675c4adcf13a Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 6 Apr 2013 13:15:07 +0200
-Subject: [PATCH] Add -external-hostbindir option for native(sdk)
-
-* when cross-compiling it's sometimes useful to use existing tools from machine
- (or in OpenEmbedded built with separate native recipe) when building for target
-
-* this way we can skip bootstraping tools we already have
-
-* qt_functions: temporary remove isEmpty check
-* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
-* isEmpty works correctly only with qmake variables (e.g. $$FOO -
- isEmpty(FOO)), but doesn't work with system properties like $$[FOO].
-
-* cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries
-
-Upstream-Status: Pending
- is a lot better for upstreaming (and it was already sort of approved by
- Oswald) but in 5.2.0 I've noticed that he added something similar for
- android builds
-
-Change-Id: I4f6e634bf0b2cb96065ee5c38b9cd8a224c3bd37
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-Signed-off-by: Simon Busch <morphis@gravedo.de>
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Conflicts:
- tools/configure/configureapp.cpp
----
- configure | 1 +
- qmake/property.cpp | 1 +
- src/corelib/global/qlibraryinfo.cpp | 3 ++-
- src/corelib/global/qlibraryinfo.h | 1 +
- tools/configure/configureapp.cpp | 11 +++++++++++
- 5 files changed, 16 insertions(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index 14f348c..61f22e8 100755
---- a/configure
-+++ b/configure
-@@ -3839,6 +3839,7 @@ fi
- addConfStr "$QT_REL_HOST_BINS"
- addConfStr "$QT_REL_HOST_LIBS"
- addConfStr "$QT_REL_HOST_DATA"
-+addConfStr "$QT_EXTERNAL_HOST_BINS"
- addConfStr "$shortxspec"
- addConfStr "$shortspec"
-
-diff --git a/qmake/property.cpp b/qmake/property.cpp
-index 9ee08f4..e6ecf92 100644
---- a/qmake/property.cpp
-+++ b/qmake/property.cpp
-@@ -63,6 +63,7 @@ static const struct {
- { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
- { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
- { "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true },
-+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true },
- { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true },
- { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
- };
-diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
-index ff65ef9..3726831 100644
---- a/src/corelib/global/qlibraryinfo.cpp
-+++ b/src/corelib/global/qlibraryinfo.cpp
-@@ -381,7 +381,7 @@ QLibraryInfo::isDebugBuild()
- */
-
- static const struct {
-- char key[19], value[13];
-+ char key[21], value[13];
- } qtConfEntries[] = {
- { "Prefix", "." },
- { "Documentation", "doc" }, // should be ${Data}/doc
-@@ -406,6 +406,7 @@ static const struct {
- { "HostBinaries", "bin" },
- { "HostLibraries", "lib" },
- { "HostData", "." },
-+ { "ExternalHostBinaries", "" },
- { "TargetSpec", "" },
- { "HostSpec", "" },
- { "HostPrefix", "" },
-diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
-index 362d47d..a2326e2 100644
---- a/src/corelib/global/qlibraryinfo.h
-+++ b/src/corelib/global/qlibraryinfo.h
-@@ -87,6 +87,7 @@ public:
- HostBinariesPath,
- HostLibrariesPath,
- HostDataPath,
-+ ExternalHostBinariesPath,
- TargetSpecPath,
- HostSpecPath,
- HostPrefixPath,
-diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
-index 0fa205b..2921e2b 100644
---- a/tools/configure/configureapp.cpp
-+++ b/tools/configure/configureapp.cpp
-@@ -1219,6 +1219,13 @@ void Configure::parseCmdLine()
- dictionary[ "QT_EXT_PREFIX" ] = configCmdLine.at(i);
- }
-
-+ else if (configCmdLine.at(i) == "-external-hostbindir") {
-+ ++i;
-+ if (i == argCount)
-+ break;
-+ dictionary[ "QT_EXTERNAL_HOST_BINS" ] = configCmdLine.at(i);
-+ }
-+
- else if (configCmdLine.at(i) == "-make-tool") {
- ++i;
- if (i == argCount)
-@@ -4171,6 +4178,9 @@ void Configure::generateQConfigCpp()
-
- if (dictionary["QT_REL_HOST_DATA"].isEmpty())
- dictionary["QT_REL_HOST_DATA"] = haveHpx ? "." : dictionary["QT_REL_INSTALL_ARCHDATA"];
-+
-+ if (dictionary["QT_EXTERNAL_HOST_BINS"].isEmpty())
-+ dictionary["QT_EXTERNAL_HOST_BINS"] = haveHpx ? "bin" : dictionary["QT_REL_INSTALL_BINS"];
-
- confStringOff = 0;
- addConfStr(0, dictionary["QT_REL_INSTALL_DOCS"]);
-@@ -4190,6 +4200,7 @@ void Configure::generateQConfigCpp()
- addConfStr(1, dictionary["QT_REL_HOST_BINS"]);
- addConfStr(1, dictionary["QT_REL_HOST_LIBS"]);
- addConfStr(1, dictionary["QT_REL_HOST_DATA"]);
-+ addConfStr(1, dictionary["QT_EXTERNAL_HOST_BINS"]);
- addConfStr(1, targSpec);
- addConfStr(1, hostSpec);
-
diff --git a/recipes-qt/qt5/qtbase/0013-Fix-build-with-QT_NO_OPENGL.patch b/recipes-qt/qt5/qtbase/0013-Fix-build-with-QT_NO_OPENGL.patch
deleted file mode 100644
index 7b681dc..0000000
--- a/recipes-qt/qt5/qtbase/0013-Fix-build-with-QT_NO_OPENGL.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 2e176e3d10535e4fdaa6ecc919538f66f4a2930d Mon Sep 17 00:00:00 2001
-From: Andy Nichols <andy.nichols@qt.io>
-Date: Mon, 11 Jul 2016 09:18:33 +0200
-Subject: QWidgetBackingStore: Fix build with QT_NO_OPENGL
-
-A define moved out of the #ifndef QT_NO_OPENGL scope.
-
-Change-Id: I41c943b97f165b5171581e01f3a4b2d3fb25747e
-Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-
-Upstream-Status: Backport
-Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
----
- src/widgets/kernel/qwidgetbackingstore.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
-index 32aabce..242e625 100644
---- a/src/widgets/kernel/qwidgetbackingstore.cpp
-+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
-@@ -67,7 +67,9 @@ QT_BEGIN_NAMESPACE
-
- extern QRegion qt_dirtyRegion(QWidget *);
-
-+#ifndef QT_NO_OPENGL
- Q_GLOBAL_STATIC(QPlatformTextureList, qt_dummy_platformTextureList)
-+#endif
-
- /**
- * Flushes the contents of the \a backingStore into the screen area of \a widget.
---
-cgit v1.0-4-g1e03
-
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index eda57ac..eccb435 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -17,16 +17,13 @@ LIC_FILES_CHKSUM = " \
# common for qtbase-native, qtbase-nativesdk and qtbase
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
- file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
file://0006-QOpenGLPaintDevice-sub-area-support.patch \
- file://0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \
file://0008-configure-paths-for-target-qmake-properly.patch \
- file://0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch \
+ file://0009-Disable-all-unknown-features-instead-of-erroring-out.patch \
file://0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \
- file://0013-Fix-build-with-QT_NO_OPENGL.patch \
"
DEPENDS += "qtbase-native"
@@ -43,7 +40,7 @@ RDEPENDS_${PN}-tools += "perl"
PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)}"
PACKAGECONFIG_FB ?= "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
-PACKAGECONFIG_X11 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcb xsync xshape xrender xrandr xfixes xinput2 xcursor glib xkb', '', d)}"
+PACKAGECONFIG_X11 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcb xrender xinput2 glib xkb', '', d)}"
PACKAGECONFIG_FONTS ?= ""
PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib"
PACKAGECONFIG_MULTIMEDIA ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}"
@@ -52,7 +49,7 @@ PACKAGECONFIG_DISTRO ?= ""
PACKAGECONFIG_RELEASE ?= "release"
# This is in qt5.inc, because qtwebkit-examples are using it to enable ca-certificates dependency
# PACKAGECONFIG_OPENSSL ?= "openssl"
-PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs"
+PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype"
PACKAGECONFIG ?= " \
${PACKAGECONFIG_RELEASE} \
@@ -70,27 +67,31 @@ PACKAGECONFIG ?= " \
PACKAGECONFIG[release] = "-release,-debug"
PACKAGECONFIG[debug] = ""
PACKAGECONFIG[developer] = "-developer-build"
+PACKAGECONFIG[qml-debug] = "-qml-debug,-no-qml-debug"
PACKAGECONFIG[sm] = "-sm,-no-sm"
PACKAGECONFIG[tests] = "-make tests,-nomake tests"
PACKAGECONFIG[examples] = "-make examples -compile-examples,-nomake examples"
PACKAGECONFIG[tools] = "-make tools,-nomake tools"
# only for completeness, configure will add libs even if you try to explicitly remove it
-PACKAGECONFIG[libs] = "-make libs,-nomake libs"
+PACKAGECONFIG[libs] = "-make libs"
# accessibility is required to compile qtquickcontrols
PACKAGECONFIG[accessibility] = "-accessibility,-no-accessibility"
PACKAGECONFIG[glib] = "-glib,-no-glib,glib-2.0"
# use either system freetype or bundled freetype, if you disable freetype completely
# fontdatabases/basic/qbasicfontdatabase.cpp will fail to build and system freetype
# works only together with fontconfig
-PACKAGECONFIG[freetype] = "-system-freetype,-freetype,freetype"
+PACKAGECONFIG[freetype] = "-system-freetype,-qt-freetype,freetype"
PACKAGECONFIG[harfbuzz] = "-system-harfbuzz,-no-harfbuzz,harfbuzz"
PACKAGECONFIG[jpeg] = "-system-libjpeg,-no-libjpeg,jpeg"
PACKAGECONFIG[libpng] = "-system-libpng,-no-libpng,libpng"
+PACKAGECONFIG[gif] = "-gif,-no-gif"
+PACKAGECONFIG[ico] = "-ico,-no-ico"
PACKAGECONFIG[zlib] = "-system-zlib,-qt-zlib,zlib"
PACKAGECONFIG[pcre] = "-system-pcre,-qt-pcre,pcre"
PACKAGECONFIG[eglfs] = "-eglfs,-no-eglfs,drm"
PACKAGECONFIG[gl] = "-opengl desktop,,virtual/libgl"
PACKAGECONFIG[gles2] = "-opengl es2,,virtual/libgles2 virtual/egl"
+PACKAGECONFIG[no-opengl] = "-no-opengl"
PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib"
PACKAGECONFIG[cups] = "-cups,-no-cups,cups"
PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus"
@@ -104,14 +105,8 @@ PACKAGECONFIG[sql-tds] = "-sql-tds,-no-sql-tds"
PACKAGECONFIG[sql-db2] = "-sql-db2,-no-sql-db2"
PACKAGECONFIG[sql-sqlite2] = "-sql-sqlite2,-no-sql-sqlite2,sqlite"
PACKAGECONFIG[sql-sqlite] = "-sql-sqlite -system-sqlite,-no-sql-sqlite,sqlite3"
-PACKAGECONFIG[xcursor] = "-xcursor,-no-xcursor,libxcursor"
PACKAGECONFIG[xinput2] = "-xinput2,-no-xinput2,libxi"
-PACKAGECONFIG[xfixes] = "-xfixes,-no-xfixes,libxfixes"
-PACKAGECONFIG[xrandr] = "-xrandr,-no-xrandr,libxrandr"
PACKAGECONFIG[xrender] = "-xrender,-no-xrender,libxrender"
-PACKAGECONFIG[xshape] = "-xshape,-no-xshape"
-PACKAGECONFIG[xsync] = "-xsync,-no-xsync"
-PACKAGECONFIG[openvg] = "-openvg,-no-openvg"
PACKAGECONFIG[iconv] = "-iconv,-no-iconv,virtual/libiconv"
PACKAGECONFIG[xkb] = "-xkb,-no-xkb -no-xkbcommon,libxkbcommon"
PACKAGECONFIG[xkbcommon-evdev] = "-xkbcommon-evdev,-no-xkbcommon-evdev,libxkbcommon,xkeyboard-config"
@@ -122,8 +117,8 @@ PACKAGECONFIG[fontconfig] = "-fontconfig,-no-fontconfig,fontconfig"
PACKAGECONFIG[gtk] = "-gtk,-no-gtk,gtk+"
PACKAGECONFIG[directfb] = "-directfb,-no-directfb,directfb"
PACKAGECONFIG[linuxfb] = "-linuxfb,-no-linuxfb"
-PACKAGECONFIG[mitshm] = "-mitshm,-no-mitshm,mitshm"
-PACKAGECONFIG[kms] = "-kms,-no-kms,virtual/mesa virtual/egl"
+PACKAGECONFIG[kms] = "-kms,-no-kms,drm virtual/egl"
+PACKAGECONFIG[gbm] = "-gbm,-no-gbm,gbm"
# needed for qtwebkit
PACKAGECONFIG[icu] = "-icu,-no-icu,icu"
PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev"
@@ -144,44 +139,10 @@ QT_CONFIG_FLAGS += " \
${PACKAGECONFIG_CONFARGS} \
"
-do_generate_qt_config_file_append() {
- cat >> ${QT_CONF_PATH} <<EOF
-
-[EffectivePaths]
-Prefix=..
-EOF
-}
-
-# qtbase is exception, we need to use mkspecs from ${S}
-QMAKE_MKSPEC_PATH = "${B}"
-
-# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
-OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
-OE_QMAKE_QMAKE = "bin/qmake"
-
-# qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell
-export OE_QMAKE_COMPILER
-export OE_QMAKE_CC
-export OE_QMAKE_CFLAGS
-export OE_QMAKE_CXX
-export OE_QMAKE_CXXFLAGS
-export OE_QMAKE_LINK
-export OE_QMAKE_LDFLAGS
-export OE_QMAKE_AR
-export OE_QMAKE_STRIP
-
do_configure() {
- # we need symlink in path relative to source, because
- # EffectivePaths:Prefix is relative to qmake location
- if [ ! -e ${B}/bin/qmake ]; then
- mkdir -p ${B}/bin
- ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
- fi
-
${S}/configure -v \
-opensource -confirm-license \
-sysroot ${STAGING_DIR_TARGET} \
- -no-gcc-sysroot \
-prefix ${OE_QMAKE_PATH_PREFIX} \
-bindir ${OE_QMAKE_PATH_BINS} \
-libdir ${OE_QMAKE_PATH_LIBS} \
@@ -197,37 +158,29 @@ do_configure() {
-translationdir ${OE_QMAKE_PATH_TRANSLATIONS} \
-testsdir ${OE_QMAKE_PATH_TESTS} \
-examplesdir ${OE_QMAKE_PATH_EXAMPLES} \
+ -hostprefix ${OE_QMAKE_PATH_HOST_PREFIX} \
+ -hostlibdir ${OE_QMAKE_PATH_HOST_LIBS} \
-hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
-external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
-hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
- -platform ${OE_QMAKESPEC} \
+ -platform ${OE_QMAKE_PLATFORM_NATIVE} \
-xplatform linux-oe-g++ \
${QT_CONFIG_FLAGS}
-
- qmake5_base_do_configure
}
do_install_append() {
# Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory"
touch ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/oe-device-extra.pri
- install -m 0755 ${B}/bin/qmake-target ${D}/${bindir}${QT_DIR_NAME}/qmake
-
- # Remove example.pro file as it is useless
- rm -f ${D}${OE_QMAKE_PATH_EXAMPLES}/examples.pro
-
- # Remove macx-ios-clang directory because /usr/lib/qt5/mkspecs/macx-ios-clang/rename_main.sh:#!/bin/bash
- # triggers QA Issue: qtbase-mkspecs requires /bin/bash, but no providers in its RDEPENDS [file-rdeps]
- rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang
- # and this one has /bin/bash shebang, but checkbashisms doesn't show any reason for it
- sed -i 's@^#!/bin/bash$@#!/bin/sh@g' ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/features/data/mac/objc_namespace.sh
-
# Replace host paths with qmake built-in properties
- sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX]|g' \
+ sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX/get]|g' \
-e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' \
${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/*.pri
}
+# mkspecs have mac specific scripts that depend on perl and bash
+INSANE_SKIP_${PN}-mkspecs += "file-rdeps"
+
RRECOMMENDS_${PN}-plugins += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11-locale', '', d)}"
-SRCREV = "69b43e74d78e050cf5e40197acafa4bc9f90c0bd"
+SRCREV = "969bb10eed646313209fcdd9b84605aa98fc88de"
diff --git a/recipes-qt/qt5/qtcanvas3d_git.bb b/recipes-qt/qt5/qtcanvas3d_git.bb
index 8cf316b..d45c9d4 100644
--- a/recipes-qt/qt5/qtcanvas3d_git.bb
+++ b/recipes-qt/qt5/qtcanvas3d_git.bb
@@ -3,11 +3,11 @@ require qt5-git.inc
LICENSE = "LGPL-3.0 | GPL-3.0"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
- file://LICENSE.GPLv2;md5=05832301944453ec79e40ba3c3cfceec \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
+ file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
"
DEPENDS = "qtdeclarative"
-SRCREV = "1568c60d2a0d1758acfeec9f002af7ff5b4d28ee"
+SRCREV = "6c5121eab75e61f807c2df0f14988317f220b945"
diff --git a/recipes-qt/qt5/qtcharts_git.bb b/recipes-qt/qt5/qtcharts_git.bb
index 21f6f13..a1477b1 100644
--- a/recipes-qt/qt5/qtcharts_git.bb
+++ b/recipes-qt/qt5/qtcharts_git.bb
@@ -8,4 +8,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative qtmultimedia"
-SRCREV = "03a6177a3223f928a5f329c8b1fc4d5fe376deed"
+SRCREV = "15447eed96be05b2607fa23c6455c37ab1990282"
diff --git a/recipes-qt/qt5/qtconnectivity_git.bb b/recipes-qt/qt5/qtconnectivity_git.bb
index 67f882a..5fad984 100644
--- a/recipes-qt/qt5/qtconnectivity_git.bb
+++ b/recipes-qt/qt5/qtconnectivity_git.bb
@@ -28,4 +28,4 @@ do_configure_prepend() {
sed -i 's/^qtCompileTest(bluez)/OE_BLUEZ_ENABLED:qtCompileTest(bluez)/g' ${S}/qtconnectivity.pro
}
-SRCREV = "8755a1f2460fa523782e27b6ca7a430a0176ac61"
+SRCREV = "515ff5b0f9a2245a13cec6f2d37edd1715cdae8c"
diff --git a/recipes-qt/qt5/qtdatavis3d_git.bb b/recipes-qt/qt5/qtdatavis3d_git.bb
index 50a0bcc..8eb56ae 100644
--- a/recipes-qt/qt5/qtdatavis3d_git.bb
+++ b/recipes-qt/qt5/qtdatavis3d_git.bb
@@ -8,4 +8,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative qtmultimedia qtxmlpatterns"
-SRCREV = "d6a8da66dc3c141621c9be4b7509a6e43c60e15c"
+SRCREV = "96086b01a3e732cfb58cfd6e15a8dfc53550eb13"
diff --git a/recipes-qt/qt5/qtdeclarative-render2d_git.bb b/recipes-qt/qt5/qtdeclarative-render2d_git.bb
deleted file mode 100644
index cb2ee8b..0000000
--- a/recipes-qt/qt5/qtdeclarative-render2d_git.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require qt5.inc
-require qt5-git.inc
-
-LICENSE = "GPL-3.0 | The-Qt-Company-TPLA-2.4"
-LIC_FILES_CHKSUM = " \
- file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
- file://LICENSE.PREVIEW.COMMERCIAL;md5=c458c2ae1b463cca5219eaee54f6287e \
-"
-
-DEPENDS += "qtbase qtdeclarative"
-
-SRCREV = "13a6c51f26128015c0a3c335bdae676b46df6ed6"
diff --git a/recipes-qt/qt5/qtdeclarative/0003-Workaround-crashes-in-QtQml-code-related-to-dead-sto.patch b/recipes-qt/qt5/qtdeclarative/0003-Workaround-crashes-in-QtQml-code-related-to-dead-sto.patch
deleted file mode 100644
index d3ee42e..0000000
--- a/recipes-qt/qt5/qtdeclarative/0003-Workaround-crashes-in-QtQml-code-related-to-dead-sto.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From fcc2c95421710f98c7b2dec73e2c8b0d9164bc9b Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Wed, 24 Aug 2016 11:18:37 +1000
-Subject: [PATCH] Workaround crashes in QtQml code related to dead-store
- elimination
-
-When compiled in release mode with GCC 6, QtQml may crash.
-This is because the C++ compiler is more aggressive about dead-store
-elimination in situations where a memory store to a location precedes
-the construction of an object at that memory location.
-
-The QV4::MemoryManager::allocate{Managed,Object} functions allocate
-memory and write to it before the caller does a placement new to
-construct an object in the same memory. The compiler considers these
-writes before the constructor as "dead stores" and eliminates them.
-
-The -fno-lifetime-dse compiler flag is added to disable this more
-aggressive dead-store eliminiation optimization.
-
-This is a temporary workaround until a proper solution is found.
-
-Upstream-Status: Accepted
-
-Task-number: QTBUG-55482
-Change-Id: I7dbae6e9e613e53ce5fb25957c449bc6657803b5
-Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-Signed-off-by: Jonathan Liu <net147@gmail.com>
----
- src/qml/qml.pro | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/qml/qml.pro b/src/qml/qml.pro
-index f4862a1..651afa6 100644
---- a/src/qml/qml.pro
-+++ b/src/qml/qml.pro
-@@ -18,7 +18,7 @@ exists("qqml_enable_gcov") {
-
- greaterThan(QT_GCC_MAJOR_VERSION, 5) {
- # Our code is bad. Temporary workaround.
-- QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks
-+ QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
- }
-
- QMAKE_DOCS = $$PWD/doc/qtqml.qdocconf
diff --git a/recipes-qt/qt5/qtdeclarative_git.bb b/recipes-qt/qt5/qtdeclarative_git.bb
index 5cc4caa..c1d6b77 100644
--- a/recipes-qt/qt5/qtdeclarative_git.bb
+++ b/recipes-qt/qt5/qtdeclarative_git.bb
@@ -19,7 +19,6 @@ DEPENDS += "qtbase"
SRC_URI += " \
file://0001-qmltestexample-fix-link.patch \
file://0002-qquickviewcomparison-fix-QCoreApplication-has-not-be.patch \
- file://0003-Workaround-crashes-in-QtQml-code-related-to-dead-sto.patch \
"
EXTRA_OEMAKE += "QMAKE_SYNCQT=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/syncqt"
@@ -36,8 +35,13 @@ do_configure_prepend() {
echo "QT_TOOL.syncqt.binary = \"${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/syncqt\"" > ${B}/.qmake.cache
}
+do_install_append_class-nativesdk() {
+ # qml files not needed in nativesdk
+ rm -rf ${D}${OE_QMAKE_PATH_QML}
+}
+
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'qtxmlpatterns', 'CONFIG+=OE_QTXMLPATTERNS_ENABLED', '', d)}"
-SRCREV = "d48b397cc79265e80c8437888f9ded0b0364e418"
+SRCREV = "9d085bf0024c442b14b7d22bc629574058176deb"
BBCLASSEXTEND =+ "native nativesdk"
diff --git a/recipes-qt/qt5/qtenginio_git.bb b/recipes-qt/qt5/qtenginio_git.bb
index e77d358..c2455bf 100644
--- a/recipes-qt/qt5/qtenginio_git.bb
+++ b/recipes-qt/qt5/qtenginio_git.bb
@@ -3,16 +3,17 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & ( GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0+ | LGPL-3.0 | The-Qt-Company-Commercial )"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
- file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
- file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
+ file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
+ file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
+ file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
file://LICENSE.FDL;md5=f70ee9a6c44ae8917586fea34dff0ab5 \
"
DEPENDS += "qtbase qtdeclarative qtxmlpatterns"
-SRCREV = "cedca298f081e1c1cdac615eed6171fe687f35e2"
+QT_MODULE_BRANCH = "dev"
+SRCREV = "b0ad5907f480307853f7ac951bacfaa61dcbd94e"
do_install_append() {
if ls ${D}${libdir}/pkgconfig/Enginio.pc >/dev/null 2>/dev/null; then
diff --git a/recipes-qt/qt5/qtgraphicaleffects_git.bb b/recipes-qt/qt5/qtgraphicaleffects_git.bb
index 6c62a68..d0a31ca 100644
--- a/recipes-qt/qt5/qtgraphicaleffects_git.bb
+++ b/recipes-qt/qt5/qtgraphicaleffects_git.bb
@@ -4,13 +4,13 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & ( GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0+ | LGPL-3.0 | The-Qt-Company-Commercial )"
LIC_FILES_CHKSUM = " \
file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
- file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
+ file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \
- file://LICENSE.GPLv2;md5=05832301944453ec79e40ba3c3cfceec \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
@@ -19,4 +19,4 @@ DEPENDS += "qtdeclarative"
RDEPENDS_${PN}-dev = ""
-SRCREV = "d3023be0d839440ac046adf2af75d9e4306dd5ef"
+SRCREV = "8b5cb6185a014eb65150bef11aebdecb6a723aef"
diff --git a/recipes-qt/qt5/qtimageformats_git.bb b/recipes-qt/qt5/qtimageformats_git.bb
index 7f8179e..88ca684 100644
--- a/recipes-qt/qt5/qtimageformats_git.bb
+++ b/recipes-qt/qt5/qtimageformats_git.bb
@@ -4,13 +4,13 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & ( GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0+ | LGPL-3.0 | The-Qt-Company-Commercial )"
LIC_FILES_CHKSUM = " \
file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
- file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
+ file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \
- file://LICENSE.GPLv2;md5=05832301944453ec79e40ba3c3cfceec \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
@@ -32,4 +32,4 @@ EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'jasper', 'CONFIG+
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'libtiff', 'CONFIG+=OE_LIBTIFF_ENABLED', '', d)}"
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'libwebp', 'CONFIG+=OE_LIBWEBP_ENABLED', '', d)}"
-SRCREV = "d4401c9f519dfe82c38fe9ded674e454655f1866"
+SRCREV = "99d9e0c527ad91f186628ece1c8b3a5ec07f7add"
diff --git a/recipes-qt/qt5/qtlocation_git.bb b/recipes-qt/qt5/qtlocation_git.bb
index 7a9ecb4..49579dd 100644
--- a/recipes-qt/qt5/qtlocation_git.bb
+++ b/recipes-qt/qt5/qtlocation_git.bb
@@ -3,12 +3,12 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & (LGPL-2.1 & The-Qt-Company-Qt-LGPL-Exception-1.1 | LGPL-3.0) | GPL-2.0"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
- file://LICENSE.GPLv2;md5=05832301944453ec79e40ba3c3cfceec \
+ file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
"
DEPENDS += "qtbase qtxmlpatterns qtdeclarative qtquickcontrols"
@@ -29,4 +29,4 @@ do_configure_prepend() {
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'geoclue', 'CONFIG+=OE_GEOCLUE_ENABLED', '', d)}"
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'gypsy', 'CONFIG+=OE_GYPSY_ENABLED', '', d)}"
-SRCREV = "4e1008b4ac1eea776585ca41a6a3db127cf500ff"
+SRCREV = "8aabdb0975c3532324d299dfa62aa333a56d2d3b"
diff --git a/recipes-qt/qt5/qtmultimedia_git.bb b/recipes-qt/qt5/qtmultimedia_git.bb
index 3bbfb6e..e93904a 100644
--- a/recipes-qt/qt5/qtmultimedia_git.bb
+++ b/recipes-qt/qt5/qtmultimedia_git.bb
@@ -38,4 +38,4 @@ SRC_URI += "\
file://0001-Initial-porting-effort-to-GStreamer-1.0.patch \
"
-SRCREV = "1be4f74843b41f8bc1d1d64e83485f4eb864e8b4"
+SRCREV = "0cb4dc5c1fded81b4f47945b51b8de0b0151bf67"
diff --git a/recipes-qt/qt5/qtquick1_git.bb b/recipes-qt/qt5/qtquick1_git.bb
index 4107c3a..e9b6185 100644
--- a/recipes-qt/qt5/qtquick1_git.bb
+++ b/recipes-qt/qt5/qtquick1_git.bb
@@ -6,7 +6,6 @@ LIC_FILES_CHKSUM = " \
file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
- file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
@@ -23,4 +22,5 @@ do_configure_prepend() {
sed -i 's#^qtHaveModule(webkitwidgets):#qtHaveModule(webkitwidgets):!contains(CONFIG, noqtwebkit):#g' ${S}/src/imports/imports.pro
}
-SRCREV = "857fc5ec4644a6111ba8725e4e1a84dd5ea6bfca"
+QT_MODULE_BRANCH = "dev"
+SRCREV = "64faeb0d8003e699a4d09e7dcee1ef6eb10302ad"
diff --git a/recipes-qt/qt5/qtquickcontrols2_git.bb b/recipes-qt/qt5/qtquickcontrols2_git.bb
index 7271a19..b93cd6c 100644
--- a/recipes-qt/qt5/qtquickcontrols2_git.bb
+++ b/recipes-qt/qt5/qtquickcontrols2_git.bb
@@ -4,10 +4,10 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & LGPL-3.0 | GPL-3.0"
LIC_FILES_CHKSUM = " \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
- file://LICENSE.LGPLv3;md5=8ba7f2099d17d636d5fcc8303bb17587 \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.LGPLv3;md5=a37e6cd7102174853307e03e6edc5f30 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
"
DEPENDS += "qtdeclarative"
-SRCREV = "cc0ee8e4f3345023f1b85fc815739c0a75ea5686"
+SRCREV = "e09a8591990e5281929ca2a7bb180bb3a35556ba"
diff --git a/recipes-qt/qt5/qtquickcontrols_git.bb b/recipes-qt/qt5/qtquickcontrols_git.bb
index 176035c..54aaad4 100644
--- a/recipes-qt/qt5/qtquickcontrols_git.bb
+++ b/recipes-qt/qt5/qtquickcontrols_git.bb
@@ -4,12 +4,12 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & ( GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0+ | LGPL-3.0 | The-Qt-Company-Commercial )"
LIC_FILES_CHKSUM = " \
file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \
- file://LICENSE.GPLv2;md5=05832301944453ec79e40ba3c3cfceec \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
@@ -21,4 +21,4 @@ SRC_URI += " \
file://0001-texteditor-fix-invalid-use-of-incomplete-type-class-.patch \
"
-SRCREV = "37f8b753be1b16975220c8b611b17a428eafb9e9"
+SRCREV = "3bc99dd69fb9099a13dd94ebd081dba5c68d6def"
diff --git a/recipes-qt/qt5/qtscript_git.bb b/recipes-qt/qt5/qtscript_git.bb
index bee833d..2058e22 100644
--- a/recipes-qt/qt5/qtscript_git.bb
+++ b/recipes-qt/qt5/qtscript_git.bb
@@ -25,4 +25,4 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
DEPENDS += "qtbase"
-SRCREV = "b8845794b95376e8be39dbdafca2c85b5ec4c195"
+SRCREV = "89e980b8e0007a3615d01286d1f590fb95757233"
diff --git a/recipes-qt/qt5/qtsensors_git.bb b/recipes-qt/qt5/qtsensors_git.bb
index af45d89..d1ea63f 100644
--- a/recipes-qt/qt5/qtsensors_git.bb
+++ b/recipes-qt/qt5/qtsensors_git.bb
@@ -3,14 +3,14 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & ( GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0+ | LGPL-3.0 | The-Qt-Company-Commercial )"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
- file://LICENSE.GPLv2;md5=05832301944453ec79e40ba3c3cfceec \
+ file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
"
DEPENDS += "qtbase qtdeclarative"
-SRCREV = "e03c37077ea4841b9e0b591d29a34737d7d8dd32"
+SRCREV = "8065e461421ea17a942ea09d67aaa053a136a54e"
diff --git a/recipes-qt/qt5/qtserialbus_git.bb b/recipes-qt/qt5/qtserialbus_git.bb
index 397ac4e..5b90395 100644
--- a/recipes-qt/qt5/qtserialbus_git.bb
+++ b/recipes-qt/qt5/qtserialbus_git.bb
@@ -11,4 +11,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtserialport"
-SRCREV = "88554d068d287870740b842864a50604f53e8509"
+SRCREV = "8e4bd5bcfd6093c980866a6b258311e7d8ae5bbf"
diff --git a/recipes-qt/qt5/qtserialport_git.bb b/recipes-qt/qt5/qtserialport_git.bb
index d5f37d5..e2917b4 100644
--- a/recipes-qt/qt5/qtserialport_git.bb
+++ b/recipes-qt/qt5/qtserialport_git.bb
@@ -5,14 +5,14 @@ require qt5-git.inc
# other qt* components use :/
LICENSE = "GFDL-1.3 & BSD & (LGPL-2.1 & The-Qt-Company-Qt-LGPL-Exception-1.1 | LGPL-3.0)"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=bb426f3367c4805d1e12fad05bd0b750 \
file://LICENSE.FDL;md5=3801d7932fdc07fd9efe89f9854a6caa \
- file://LICENSE.GPLv2;md5=05832301944453ec79e40ba3c3cfceec \
+ file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
"
DEPENDS += "qtbase"
-SRCREV = "7346857f4f675f57572d54f15cfad9111af2abde"
+SRCREV = "e2a658a2472d9fa710c251a065f488bae981c0ae"
diff --git a/recipes-qt/qt5/qtsvg_git.bb b/recipes-qt/qt5/qtsvg_git.bb
index 21e06ff..9e0c4fb 100644
--- a/recipes-qt/qt5/qtsvg_git.bb
+++ b/recipes-qt/qt5/qtsvg_git.bb
@@ -3,13 +3,13 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & ( GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0+ | LGPL-3.0 | The-Qt-Company-Commercial )"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
DEPENDS += "qtbase"
-SRCREV = "64ca369c7e3d61f0416bc1fd6a102f0c62924433"
+SRCREV = "5a00abdefd1c050aae8760dfc01ae5e3631077aa"
diff --git a/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch b/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
index 94cd048..46ab795 100644
--- a/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
+++ b/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
@@ -116,9 +116,11 @@ index 387d54f..56b7d0c 100644
-qtHaveModule(dbus): SUBDIRS += qdbus
+!linguistonly:qtHaveModule(dbus): SUBDIRS += qdbus
- win32|winrt:SUBDIRS += windeployqt
- winrt:SUBDIRS += winrtrunner
+-win32|winrt:SUBDIRS += windeployqt
+-winrt:SUBDIRS += winrtrunner
-qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag
++!linguistonly:win32|winrt:SUBDIRS += windeployqt
++!linguistonly:winrt:SUBDIRS += winrtrunner
+!linguistonly:qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag
qtNomakeTools( \
diff --git a/recipes-qt/qt5/qttools_git.bb b/recipes-qt/qt5/qttools_git.bb
index 56c1205..3d77ec7 100644
--- a/recipes-qt/qt5/qttools_git.bb
+++ b/recipes-qt/qt5/qttools_git.bb
@@ -17,7 +17,6 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase qtdeclarative qtxmlpatterns"
SRC_URI += " \
- file://0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch \
file://0002-assistant-help-fix-linking-of-dependent-libraries.patch \
file://0003-add-noqtwebkit-configuration.patch \
file://0004-linguist-tools-cmake-allow-overriding-the-location-f.patch \
@@ -27,14 +26,10 @@ FILES_${PN}-tools += "${datadir}${QT_DIR_NAME}/phrasebooks"
FILES_${PN}-examples = "${datadir}${QT_DIR_NAME}/examples"
PACKAGECONFIG ??= ""
-PACKAGECONFIG_class-native ??= "linguistonly"
-PACKAGECONFIG_class-nativesdk ??= "linguistonly"
-PACKAGECONFIG[linguistonly] = ""
PACKAGECONFIG[qtwebkit] = ",,qtwebkit"
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'qtwebkit', '', 'CONFIG+=noqtwebkit', d)}"
-EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'linguistonly', 'CONFIG+=linguistonly', '', d)}"
-SRCREV = "0597b535f82d3458a1db1828c5e5f725bbcf59fd"
+SRCREV = "b8113e90e2a1d9ea38a478990a93615f432ac35b"
BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-qt/qt5/qttranslations_git.bb b/recipes-qt/qt5/qttranslations_git.bb
index 2a37d14..c259244 100644
--- a/recipes-qt/qt5/qttranslations_git.bb
+++ b/recipes-qt/qt5/qttranslations_git.bb
@@ -114,4 +114,4 @@ FILES_${PN}-qt = " \
${OE_QMAKE_PATH_TRANSLATIONS}/qt_*.qm \
"
-SRCREV = "2209b3fd6a56bfc44da5369c4fbd345bbca31777"
+SRCREV = "64f3b105fb67d813512b287be6fdaec409d6d943"
diff --git a/recipes-qt/qt5/qtvirtualkeyboard_git.bb b/recipes-qt/qt5/qtvirtualkeyboard_git.bb
index 7e2f445..c93a9bd 100644
--- a/recipes-qt/qt5/qtvirtualkeyboard_git.bb
+++ b/recipes-qt/qt5/qtvirtualkeyboard_git.bb
@@ -48,4 +48,4 @@ FILES_${PN} += "${OE_QMAKE_PATH_DATA}/qtvirtualkeyboard/lipi_toolkit"
DEPENDS += "qtbase qtdeclarative qtmultimedia qtquickcontrols qtsvg qtxmlpatterns"
-SRCREV = "626e78c9660cff063e1f9370538b5a424631571c"
+SRCREV = "947a55149aec2724158934efde1be496b3c5e04e"
diff --git a/recipes-qt/qt5/qtwayland-native_git.bb b/recipes-qt/qt5/qtwayland-native_git.bb
deleted file mode 100644
index a214346..0000000
--- a/recipes-qt/qt5/qtwayland-native_git.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-require qt5-native.inc
-require qt5-git.inc
-
-LICENSE = "GFDL-1.3 & BSD & ( GPL-3.0 & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0+ | LGPL-3.0 | The-Qt-Company-Commercial )"
-LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
- file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
- file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
- file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
- file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \
- file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
- file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
- file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
-"
-
-DEPENDS = "qtbase-native wayland-native"
-
-SRC_URI += " \
- file://0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch \
-"
-
-do_configure() {
- ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}/src/qtwaylandscanner
-}
-
-do_install() {
- oe_runmake install INSTALL_ROOT=${D}
-}
-
-SRCREV = "a172672484b9496819e588b51ac2ff9fb4a21941"
diff --git a/recipes-qt/qt5/qtwayland/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch b/recipes-qt/qt5/qtwayland/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch
deleted file mode 100644
index 847ba06..0000000
--- a/recipes-qt/qt5/qtwayland/0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 47457635603ddb484a479834a052699cce5b34a3 Mon Sep 17 00:00:00 2001
-From: Simon Busch <morphis@gravedo.de>
-Date: Fri, 19 Jul 2013 13:35:14 +0000
-Subject: [PATCH] Install the qtwaylandscanner tool to the native side
-
-Upstream-Status: Inappropiate [configuration]
-
-Signed-off-by: Simon Busch <morphis@gravedo.de>
----
- src/qtwaylandscanner/qtwaylandscanner.pro | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/qtwaylandscanner/qtwaylandscanner.pro b/src/qtwaylandscanner/qtwaylandscanner.pro
-index ac2d07b..7a46a24 100644
---- a/src/qtwaylandscanner/qtwaylandscanner.pro
-+++ b/src/qtwaylandscanner/qtwaylandscanner.pro
-@@ -1,6 +1,10 @@
- option(host_build)
-
--SOURCES += qtwaylandscanner.cpp
-+TARGET = qtwaylandscanner$$qtPlatformTargetSuffix()
-+CONFIG += console warn_off
-+QT = core
-
--load(qt_tool)
-+SOURCES += qtwaylandscanner.cpp
-
-+target.path = $$[QT_HOST_BINS]
-+INSTALLS += target
diff --git a/recipes-qt/qt5/qtwayland/0001-examples-wayland-include-server-buffer-only-when-bui.patch b/recipes-qt/qt5/qtwayland/0001-examples-wayland-include-server-buffer-only-when-bui.patch
deleted file mode 100644
index a21c109..0000000
--- a/recipes-qt/qt5/qtwayland/0001-examples-wayland-include-server-buffer-only-when-bui.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 733a85c14cb4ade510a0c78b32cd12cb2d70dbbd Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 22 Feb 2014 17:47:44 +0100
-Subject: [PATCH] examples/wayland: include server-buffer only when building
- with opengles2
-
-* it's using glBindBuffer in
- server-buffer/client/serverbufferrenderer.cpp
-
-Change-Id: I8412dfd4ebb95c147328ac6e4dfff14a0cff4e78
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- examples/wayland/wayland.pro | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/examples/wayland/wayland.pro b/examples/wayland/wayland.pro
-index 503190c..9943c52 100644
---- a/examples/wayland/wayland.pro
-+++ b/examples/wayland/wayland.pro
-@@ -10,4 +10,6 @@ qtHaveModule(quick) {
- SUBDIRS += custom-extension
- }
-
--SUBDIRS += server-buffer
-+contains(QT_CONFIG, opengles2) {
-+ SUBDIRS += server-buffer
-+}
diff --git a/recipes-qt/qt5/qtwayland_git.bb b/recipes-qt/qt5/qtwayland_git.bb
index b208961..923befa 100644
--- a/recipes-qt/qt5/qtwayland_git.bb
+++ b/recipes-qt/qt5/qtwayland_git.bb
@@ -24,6 +24,12 @@ PACKAGECONFIG ?= " \
xkb \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcompositor xkb glx', '', d)} \
"
+PACKAGECONFIG_class-native ?= ""
+PACKAGECONFIG_class-nativesdk ?= ""
+QMAKE_PROFILES_class-native = "${S}/src/qtwaylandscanner"
+QMAKE_PROFILES_class-nativesdk = "${S}/src/qtwaylandscanner"
+B_class-native = "${SEPB}/src/qtwaylandscanner"
+B_class-nativesdk = "${SEPB}/src/qtwaylandscanner"
PACKAGECONFIG[compositor-api] = "CONFIG+=wayland-compositor"
PACKAGECONFIG[xcompositor] = "CONFIG+=config_xcomposite CONFIG+=done_config_xcomposite,CONFIG+=done_config_xcomposite,libxcomposite"
@@ -36,16 +42,6 @@ PACKAGECONFIG[libhybris-egl] = "CONFIG+=config_libhybris_egl_server CONFIG+=done
EXTRA_QMAKEVARS_PRE += "${PACKAGECONFIG_CONFARGS}"
-FILES_${PN}-plugins += " \
- ${OE_QMAKE_PATH_PLUGINS}/*/*/*${SOLIBSDEV} \
-"
-
-FILES_${PN}-plugins-dbg += " \
- ${OE_QMAKE_PATH_PLUGINS}/*/*/.debug/* \
-"
-
-SRC_URI += " \
- file://0001-examples-wayland-include-server-buffer-only-when-bui.patch \
-"
+SRCREV = "3443483c9efdcfbfe049f96c83f83a5bf1d81e61"
-SRCREV = "a172672484b9496819e588b51ac2ff9fb4a21941"
+BBCLASSEXTEND =+ "native nativesdk"
diff --git a/recipes-qt/qt5/qtwebchannel_git.bb b/recipes-qt/qt5/qtwebchannel_git.bb
index 45ac814..a108a22 100644
--- a/recipes-qt/qt5/qtwebchannel_git.bb
+++ b/recipes-qt/qt5/qtwebchannel_git.bb
@@ -17,4 +17,4 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtdeclarative qtwebsockets"
-SRCREV = "3836fd7d12777fc53836a72d6542d2fbf2f20ac9"
+SRCREV = "bf66a8531e0ada3ade7e873bc3fae824237acd3e"
diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb
index aedd141..24f94d5 100644
--- a/recipes-qt/qt5/qtwebengine_git.bb
+++ b/recipes-qt/qt5/qtwebengine_git.bb
@@ -81,11 +81,11 @@ do_configure() {
export QMAKE_CACHE_EVAL="${PACKAGECONFIG_CONFARGS}"
# Disable autodetection from sysroot:
- sed -i 's/packagesExist([^)]*vpx[^)]*):/false:/g; s/config_srtp:/false:/g; s/config_snappy:/false:/g; s/packagesExist(nss):/false:/g; s/packagesExist(minizip, zlib):/false:/g; s/packagesExist(libwebp,libwebpdemux):/false:/g; s/packagesExist(libxml-2.0,libxslt):/false:/g; s/^ *packagesExist($$package):/false:/g' ${S}/tools/qmake/mkspecs/features/configure.prf
+ sed -i 's/packagesExist([^)]*vpx[^)]*):/false:/g; s/config_libvpx:/false:/g; s/config_srtp:/false:/g; s/config_snappy:/false:/g; s/packagesExist(nss):/false:/g; s/packagesExist(minizip, zlib):/false:/g; s/packagesExist(libwebp,libwebpdemux):/false:/g; s/packagesExist(libxml-2.0,libxslt):/false:/g; s/^ *packagesExist($$package):/false:/g' ${S}/tools/qmake/mkspecs/features/configure.prf
# qmake can't find the OE_QMAKE_* variables on it's own so directly passing them as
# arguments here
- ${OE_QMAKE_QMAKE} -r ${EXTRA_QMAKEVARS_PRE} QTWEBENGINE_ROOT="${S}" \
+ ${OE_QMAKE_QMAKE} ${OE_QMAKE_QTCONF} -r ${EXTRA_QMAKEVARS_PRE} QTWEBENGINE_ROOT="${S}" \
QMAKE_CXX="${OE_QMAKE_CXX}" QMAKE_CC="${OE_QMAKE_CC}" \
QMAKE_LINK="${OE_QMAKE_LINK}" \
QMAKE_CFLAGS="${OE_QMAKE_CFLAGS}" \
@@ -109,7 +109,7 @@ RDEPENDS_${PN}-examples += " \
qtdeclarative-qmlplugins \
"
-QT_MODULE_BRANCH_CHROMIUM = "49-based"
+QT_MODULE_BRANCH_CHROMIUM = "53-based"
SRC_URI += " \
${QT_GIT}/qtwebengine-chromium.git;name=chromium;branch=${QT_MODULE_BRANCH_CHROMIUM};destsuffix=git/src/3rdparty \
@@ -122,10 +122,8 @@ SRC_URI += " \
file://0002-chromium-Change-false-to-FALSE-and-1-to-TRUE-FIX-qtw.patch \
"
-SRCREV_qtwebengine = "dbf7dd27428ff755444eac5e975cb69802ac9771"
-# This is in git submodule, but we're using the latest in 49-based
-# SRCREV_chromium = "c109a95a067af783e48f93d1cdeca870cda98878"
-SRCREV_chromium = "29c16917b33c26ad32893fa05af971c6c6f50297"
+SRCREV_qtwebengine = "ac3d8780a0293793dbc3cd47b96aab4613dec5d9"
+SRCREV_chromium = "f3ce802c71aeaeb7dd218180a3bc5c6ac63b445d"
SRCREV = "${SRCREV_qtwebengine}"
SRCREV_FORMAT = "qtwebengine_chromium"
diff --git a/recipes-qt/qt5/qtwebkit-examples_git.bb b/recipes-qt/qt5/qtwebkit-examples_git.bb
index e5075de..95446fb 100644
--- a/recipes-qt/qt5/qtwebkit-examples_git.bb
+++ b/recipes-qt/qt5/qtwebkit-examples_git.bb
@@ -17,4 +17,4 @@ DEPENDS += "qtwebkit qtxmlpatterns"
RDEPENDS_${PN}-examples += "qtwebkit-qmlplugins"
RDEPENDS_${PN}-examples += "${@bb.utils.contains('PACKAGECONFIG_OPENSSL', 'openssl', 'ca-certificates', '', d)}"
-SRCREV = "1ac4ee240214a0e36b504fa1bcbc0c716d50620f"
+SRCREV = "1a839b50564782feac2e5dd439686c2a0ed7d985"
diff --git a/recipes-qt/qt5/qtwebkit/0004-Remove-unused-check-for-the-private_headers.patch b/recipes-qt/qt5/qtwebkit/0004-Remove-unused-check-for-the-private_headers.patch
new file mode 100644
index 0000000..b6eabfd
--- /dev/null
+++ b/recipes-qt/qt5/qtwebkit/0004-Remove-unused-check-for-the-private_headers.patch
@@ -0,0 +1,35 @@
+From 6f4746e59c3768a56336f202054ec5498a7d376f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jkt@kde.org>
+Date: Wed, 14 Sep 2016 23:51:14 +0200
+Subject: [PATCH] Remove unused check for private_tests
+
+It turns out that qt_developer_build is never used anyway.
+
+I did some git archeology and it looks like it was nuked when doing the
+5.2 merge from upstream. The original purpose was apparently to control
+-Werror, which is nowadays controlled by CONFIG -= production_build.
+
+This actually fixes the build, as the QT_FOR_CONFIG += core-private which
+would have been required for qtConfig(private_tests) is missing.
+
+Task-number: QTBUG-55950
+Change-Id: Iaaaad184b29b523ce4a4ed8afec2ac527d8f93e3
+---
+ Tools/qmake/mkspecs/features/default_pre.prf | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/Tools/qmake/mkspecs/features/default_pre.prf b/Tools/qmake/mkspecs/features/default_pre.prf
+index 6bb52d0..8aa806d 100644
+--- a/Tools/qmake/mkspecs/features/default_pre.prf
++++ b/Tools/qmake/mkspecs/features/default_pre.prf
+@@ -62,10 +62,6 @@ win32-msvc*: MAKEFILE_NOOP_COMMAND = @echo >NUL
+ scratchbox: PYTHON = python2.6
+ else: PYTHON = python
+
+-# We use private_tests to detect developer build, since the destdir will
+-# always be our webkit build dir. This might change as configure changes.
+-qtConfig(private_tests): CONFIG += qt_developer_build
+-
+ # By default we enable "production build", and build-webkit, which is
+ # used by bots and developers, will disable it, to enable warnings etc.
+ CONFIG += production_build
diff --git a/recipes-qt/qt5/qtwebkit_git.bb b/recipes-qt/qt5/qtwebkit_git.bb
index 78ca1f5..6944603 100644
--- a/recipes-qt/qt5/qtwebkit_git.bb
+++ b/recipes-qt/qt5/qtwebkit_git.bb
@@ -22,6 +22,7 @@ SRC_URI += "\
file://0001-qtwebkit-fix-QA-issue-bad-RPATH.patch \
file://0002-Remove-TEXTREL-tag-in-x86.patch \
file://0003-Exclude-backtrace-API-for-non-glibc-libraries.patch \
+ file://0004-Remove-unused-check-for-the-private_headers.patch \
"
PACKAGECONFIG ??= "gstreamer qtlocation qtmultimedia qtsensors qtwebchannel \
@@ -83,4 +84,4 @@ PACKAGES_remove = "${PN}-examples-dev ${PN}-examples-staticdev ${PN}-examples-db
RUBY_SYS = "${@ '${BUILD_SYS}'.replace('i486', 'i386').replace('i586', 'i386').replace('i686', 'i386') }"
export RUBYLIB="${STAGING_DATADIR_NATIVE}/rubygems:${STAGING_LIBDIR_NATIVE}/ruby:${STAGING_LIBDIR_NATIVE}/ruby/${RUBY_SYS}"
-SRCREV = "76e2732f013732461c09a1d6c6b4c77fcab1c0d0"
+SRCREV = "431520f1508e92272171c214b087183e71d08ec5"
diff --git a/recipes-qt/qt5/qtwebsockets_git.bb b/recipes-qt/qt5/qtwebsockets_git.bb
index 8c238db..4897d25 100644
--- a/recipes-qt/qt5/qtwebsockets_git.bb
+++ b/recipes-qt/qt5/qtwebsockets_git.bb
@@ -3,12 +3,12 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & (LGPL-2.1 & The-Qt-Company-Qt-LGPL-Exception-1.1 | LGPL-3.0)"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=bb426f3367c4805d1e12fad05bd0b750 \
"
DEPENDS += "qtbase qtdeclarative"
-SRCREV = "8d17ddfc2f62df56ac067bd0f9736c6e8d37aa97"
+SRCREV = "ccb138548314a767a897496c74c04a261a391027"
--git a/recipes-qt/qt5/qtx11extras_git.bb b/recipes-qt/qt5/qtx11extras_git.bb
index 9a4d6d7..16db113 100644
--- a/recipes-qt/qt5/qtx11extras_git.bb
+++ b/recipes-qt/qt5/qtx11extras_git.bb
@@ -3,14 +3,14 @@ require qt5-git.inc
LICENSE = "GFDL-1.3 & BSD & (LGPL-2.1 & The-Qt-Company-Qt-LGPL-Exception-1.1 | LGPL-3.0) | GPL-2.0"
LIC_FILES_CHKSUM = " \
- file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
- file://LICENSE.LGPLv3;md5=b8c75190712063cde04e1f41b6fdad98 \
- file://LICENSE.GPLv3;md5=40f9bf30e783ddc201497165dfb32afb \
+ file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
+ file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
+ file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
file://LGPL_EXCEPTION.txt;md5=9625233da42f9e0ce9d63651a9d97654 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
- file://LICENSE.GPLv2;md5=05832301944453ec79e40ba3c3cfceec \
+ file://LICENSE.GPLv2;md5=c96076271561b0e3785dad260634eaa8 \
"
DEPENDS += "qtbase"
-SRCREV = "bae8bfc7a811af2bf51b227cbf8467e50a2a149a"
+SRCREV = "0f91218091da69a81eb3e3336d1bdbe572a21908"
diff --git a/recipes-qt/qt5/qtxmlpatterns_git.bb b/recipes-qt/qt5/qtxmlpatterns_git.bb
index e4c3d7f..73f5dbf 100644
--- a/recipes-qt/qt5/qtxmlpatterns_git.bb
+++ b/recipes-qt/qt5/qtxmlpatterns_git.bb
@@ -16,6 +16,6 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase"
-SRCREV = "574d92a43e1fc5480a7f5f79cc6baf566a53349f"
+SRCREV = "977d0fb3f0bf776e2aad3c8ff795115ce62909ff"
BBCLASSEXTEND =+ "native nativesdk"
--
1.9.1
^ permalink raw reply related
* [PATCH 1/2] ARM: dts: vf610-zii-dev-rev-b: Remove leftover PWM pingroup
From: Andrey Smirnov @ 2016-11-14 16:35 UTC (permalink / raw)
To: linux-arm-kernel
Remove pwm0grp since it is:
a) Not referenced anywhere in the DTS file (unlike Tower board it
is based on, this board does not use/expose FTM0)
b) Configures PTB2 and PTB3 in a way that contradicts
pinctrl-mdio-mux
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
index fa19cfd..2210811 100644
--- a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
@@ -677,15 +677,6 @@
>;
};
- pinctrl_pwm0: pwm0grp {
- fsl,pins = <
- VF610_PAD_PTB0__FTM0_CH0 0x1582
- VF610_PAD_PTB1__FTM0_CH1 0x1582
- VF610_PAD_PTB2__FTM0_CH2 0x1582
- VF610_PAD_PTB3__FTM0_CH3 0x1582
- >;
- };
-
pinctrl_qspi0: qspi0grp {
fsl,pins = <
VF610_PAD_PTD7__QSPI0_B_QSCK 0x31c3
--
2.5.5
^ permalink raw reply related
* [PATCH 1/2] ARM: dts: vf610-zii-dev-rev-b: Remove leftover PWM pingroup
From: Andrey Smirnov @ 2016-11-14 16:35 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Shawn Guo, Rob Herring, Mark Rutland, Russell King, Sascha Hauer,
Stefan Agner, devicetree, linux-kernel, andrew, cphealy,
Andrey Smirnov
Remove pwm0grp since it is:
a) Not referenced anywhere in the DTS file (unlike Tower board it
is based on, this board does not use/expose FTM0)
b) Configures PTB2 and PTB3 in a way that contradicts
pinctrl-mdio-mux
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
index fa19cfd..2210811 100644
--- a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
@@ -677,15 +677,6 @@
>;
};
- pinctrl_pwm0: pwm0grp {
- fsl,pins = <
- VF610_PAD_PTB0__FTM0_CH0 0x1582
- VF610_PAD_PTB1__FTM0_CH1 0x1582
- VF610_PAD_PTB2__FTM0_CH2 0x1582
- VF610_PAD_PTB3__FTM0_CH3 0x1582
- >;
- };
-
pinctrl_qspi0: qspi0grp {
fsl,pins = <
VF610_PAD_PTD7__QSPI0_B_QSCK 0x31c3
--
2.5.5
^ permalink raw reply related
* [PATCH 2/2] ARM: dts: vf610-zii-dev: Add .dts file for rev. C
From: Andrey Smirnov @ 2016-11-14 16:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1479141306-15141-1-git-send-email-andrew.smirnov@gmail.com>
Add .dts file for rev. C of the board by factoring out commonalities
into a shared include file (vf610-zii-dev-rev-b-c.dtsi) and deriving
revision specific file from it (vf610-zii-dev-rev-b.dts and
vf610-zii-dev-reb-c.dts).
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
arch/arm/boot/dts/Makefile | 3 +-
arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi | 383 ++++++++++++++++++++++++
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 300 +------------------
arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 418 +++++++++++++++++++++++++++
4 files changed, 804 insertions(+), 300 deletions(-)
create mode 100644 arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi
create mode 100644 arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index befcd26..9f0d2a1 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -442,7 +442,8 @@ dtb-$(CONFIG_SOC_VF610) += \
vf610-cosmic.dtb \
vf610m4-cosmic.dtb \
vf610-twr.dtb \
- vf610-zii-dev-rev-b.dtb
+ vf610-zii-dev-rev-b.dtb \
+ vf610-zii-dev-rev-c.dtb
dtb-$(CONFIG_ARCH_MXS) += \
imx23-evk.dtb \
imx23-olinuxino.dtb \
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi b/arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi
new file mode 100644
index 0000000..9f5e2e7
--- /dev/null
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi
@@ -0,0 +1,383 @@
+/*
+ * Copyright (C) 2015, 2016 Zodiac Inflight Innovations
+ *
+ * Based on an original 'vf610-twr.dts' which is Copyright 2015,
+ * Freescale Semiconductor, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file 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.
+ *
+ * This file 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.
+ *
+ * Or, alternatively
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+n * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "vf610.dtsi"
+
+/ {
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory {
+ reg = <0x80000000 0x20000000>;
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pinctrl_leds_debug>;
+ pinctrl-names = "default";
+
+ debug {
+ label = "zii:green:debug1";
+ gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ reg_vcc_3v3_mcu: regulator-vcc-3v3-mcu {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_3v3_mcu";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ usb0_vbus: regulator-usb0-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-0 = <&pinctrl_usb_vbus>;
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 6 0>;
+ };
+};
+
+&adc0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_adc0_ad5>;
+ vref-supply = <®_vcc_3v3_mcu>;
+ status = "okay";
+};
+
+&edma0 {
+ status = "okay";
+};
+
+&esdhc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_esdhc1>;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&fec0 {
+ phy-mode = "rmii";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec0>;
+ status = "okay";
+};
+
+&fec1 {
+ phy-mode = "rmii";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec1>;
+ status = "okay";
+
+ fixed-link {
+ speed = <100>;
+ full-duplex;
+ };
+
+ mdio1: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+ };
+};
+
+&i2c0 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default", "gpio";
+ pinctrl-0 = <&pinctrl_i2c0>;
+ pinctrl-1 = <&pinctrl_i2c0_gpio>;
+ scl-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ sda-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+
+ lm75 at 48 {
+ compatible = "national,lm75";
+ reg = <0x48>;
+ };
+
+ at24c04 at 50 {
+ compatible = "atmel,24c04";
+ reg = <0x50>;
+ };
+
+ at24c04 at 52 {
+ compatible = "atmel,24c04";
+ reg = <0x52>;
+ };
+
+ ds1682 at 6b {
+ compatible = "dallas,ds1682";
+ reg = <0x6b>;
+ };
+};
+
+&i2c1 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c1>;
+ status = "okay";
+};
+
+&i2c2 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart0>;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ status = "okay";
+};
+
+&usbdev0 {
+ disable-over-current;
+ vbus-supply = <&usb0_vbus>;
+ dr_mode = "host";
+ status = "okay";
+};
+
+&usbh1 {
+ disable-over-current;
+ status = "okay";
+};
+
+&usbmisc0 {
+ status = "okay";
+};
+
+&usbmisc1 {
+ status = "okay";
+};
+
+&usbphy0 {
+ status = "okay";
+};
+
+&usbphy1 {
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_adc0_ad5: adc0ad5grp {
+ fsl,pins = <
+ VF610_PAD_PTC30__ADC0_SE5 0x00a1
+ >;
+ };
+
+ pinctrl_dspi0: dspi0grp {
+ fsl,pins = <
+ VF610_PAD_PTB18__DSPI0_CS1 0x1182
+ VF610_PAD_PTB19__DSPI0_CS0 0x1182
+ VF610_PAD_PTB20__DSPI0_SIN 0x1181
+ VF610_PAD_PTB21__DSPI0_SOUT 0x1182
+ VF610_PAD_PTB22__DSPI0_SCK 0x1182
+ >;
+ };
+
+ pinctrl_dspi2: dspi2grp {
+ fsl,pins = <
+ VF610_PAD_PTD31__DSPI2_CS1 0x1182
+ VF610_PAD_PTD30__DSPI2_CS0 0x1182
+ VF610_PAD_PTD29__DSPI2_SIN 0x1181
+ VF610_PAD_PTD28__DSPI2_SOUT 0x1182
+ VF610_PAD_PTD27__DSPI2_SCK 0x1182
+ >;
+ };
+
+ pinctrl_esdhc1: esdhc1grp {
+ fsl,pins = <
+ VF610_PAD_PTA24__ESDHC1_CLK 0x31ef
+ VF610_PAD_PTA25__ESDHC1_CMD 0x31ef
+ VF610_PAD_PTA26__ESDHC1_DAT0 0x31ef
+ VF610_PAD_PTA27__ESDHC1_DAT1 0x31ef
+ VF610_PAD_PTA28__ESDHC1_DATA2 0x31ef
+ VF610_PAD_PTA29__ESDHC1_DAT3 0x31ef
+ VF610_PAD_PTA7__GPIO_134 0x219d
+ >;
+ };
+
+ pinctrl_fec0: fec0grp {
+ fsl,pins = <
+ VF610_PAD_PTC0__ENET_RMII0_MDC 0x30d2
+ VF610_PAD_PTC1__ENET_RMII0_MDIO 0x30d3
+ VF610_PAD_PTC2__ENET_RMII0_CRS 0x30d1
+ VF610_PAD_PTC3__ENET_RMII0_RXD1 0x30d1
+ VF610_PAD_PTC4__ENET_RMII0_RXD0 0x30d1
+ VF610_PAD_PTC5__ENET_RMII0_RXER 0x30d1
+ VF610_PAD_PTC6__ENET_RMII0_TXD1 0x30d2
+ VF610_PAD_PTC7__ENET_RMII0_TXD0 0x30d2
+ VF610_PAD_PTC8__ENET_RMII0_TXEN 0x30d2
+ >;
+ };
+
+ pinctrl_fec1: fec1grp {
+ fsl,pins = <
+ VF610_PAD_PTA6__RMII_CLKIN 0x30d1
+ VF610_PAD_PTC9__ENET_RMII1_MDC 0x30d2
+ VF610_PAD_PTC10__ENET_RMII1_MDIO 0x30d3
+ VF610_PAD_PTC11__ENET_RMII1_CRS 0x30d1
+ VF610_PAD_PTC12__ENET_RMII1_RXD1 0x30d1
+ VF610_PAD_PTC13__ENET_RMII1_RXD0 0x30d1
+ VF610_PAD_PTC14__ENET_RMII1_RXER 0x30d1
+ VF610_PAD_PTC15__ENET_RMII1_TXD1 0x30d2
+ VF610_PAD_PTC16__ENET_RMII1_TXD0 0x30d2
+ VF610_PAD_PTC17__ENET_RMII1_TXEN 0x30d2
+ >;
+ };
+
+ pinctrl_gpio_spi0: pinctrl-gpio-spi0 {
+ fsl,pins = <
+ VF610_PAD_PTB22__GPIO_44 0x33e2
+ VF610_PAD_PTB21__GPIO_43 0x33e2
+ VF610_PAD_PTB20__GPIO_42 0x33e1
+ VF610_PAD_PTB19__GPIO_41 0x33e2
+ VF610_PAD_PTB18__GPIO_40 0x33e2
+ >;
+ };
+
+ pinctrl_i2c_mux_reset: pinctrl-i2c-mux-reset {
+ fsl,pins = <
+ VF610_PAD_PTE14__GPIO_119 0x31c2
+ >;
+ };
+
+ pinctrl_i2c0: i2c0grp {
+ fsl,pins = <
+ VF610_PAD_PTB14__I2C0_SCL 0x37ff
+ VF610_PAD_PTB15__I2C0_SDA 0x37ff
+ >;
+ };
+
+ pinctrl_i2c0_gpio: i2c0grp-gpio {
+ fsl,pins = <
+ VF610_PAD_PTB14__GPIO_36 0x31c2
+ VF610_PAD_PTB15__GPIO_37 0x31c2
+ >;
+ };
+
+
+ pinctrl_i2c1: i2c1grp {
+ fsl,pins = <
+ VF610_PAD_PTB16__I2C1_SCL 0x37ff
+ VF610_PAD_PTB17__I2C1_SDA 0x37ff
+ >;
+ };
+
+ pinctrl_i2c2: i2c2grp {
+ fsl,pins = <
+ VF610_PAD_PTA22__I2C2_SCL 0x37ff
+ VF610_PAD_PTA23__I2C2_SDA 0x37ff
+ >;
+ };
+
+ pinctrl_leds_debug: pinctrl-leds-debug {
+ fsl,pins = <
+ VF610_PAD_PTD20__GPIO_74 0x31c2
+ >;
+ };
+
+ pinctrl_qspi0: qspi0grp {
+ fsl,pins = <
+ VF610_PAD_PTD7__QSPI0_B_QSCK 0x31c3
+ VF610_PAD_PTD8__QSPI0_B_CS0 0x31ff
+ VF610_PAD_PTD9__QSPI0_B_DATA3 0x31c3
+ VF610_PAD_PTD10__QSPI0_B_DATA2 0x31c3
+ VF610_PAD_PTD11__QSPI0_B_DATA1 0x31c3
+ VF610_PAD_PTD12__QSPI0_B_DATA0 0x31c3
+ >;
+ };
+
+ pinctrl_uart0: uart0grp {
+ fsl,pins = <
+ VF610_PAD_PTB10__UART0_TX 0x21a2
+ VF610_PAD_PTB11__UART0_RX 0x21a1
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ VF610_PAD_PTB23__UART1_TX 0x21a2
+ VF610_PAD_PTB24__UART1_RX 0x21a1
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ VF610_PAD_PTD0__UART2_TX 0x21a2
+ VF610_PAD_PTD1__UART2_RX 0x21a1
+ >;
+ };
+
+ pinctrl_usb_vbus: pinctrl-usb-vbus {
+ fsl,pins = <
+ VF610_PAD_PTA16__GPIO_6 0x31c2
+ >;
+ };
+
+ pinctrl_usb0_host: usb0-host-grp {
+ fsl,pins = <
+ VF610_PAD_PTD6__GPIO_85 0x0062
+ >;
+ };
+};
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
index 2210811..dee79de 100644
--- a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
@@ -43,32 +43,12 @@
*/
/dts-v1/;
-#include "vf610.dtsi"
+#include "vf610-zii-dev-rev-b-c.dtsi"
/ {
model = "ZII VF610 Development Board, Rev B";
compatible = "zii,vf610dev-b", "zii,vf610dev", "fsl,vf610";
- chosen {
- stdout-path = "serial0:115200n8";
- };
-
- memory {
- reg = <0x80000000 0x20000000>;
- };
-
- gpio-leds {
- compatible = "gpio-leds";
- pinctrl-0 = <&pinctrl_leds_debug>;
- pinctrl-names = "default";
-
- debug {
- label = "zii:green:debug1";
- gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "heartbeat";
- };
- };
-
mdio-mux {
compatible = "mdio-mux-gpio";
pinctrl-0 = <&pinctrl_mdio_mux>;
@@ -281,25 +261,6 @@
};
};
- reg_vcc_3v3_mcu: regulator-vcc-3v3-mcu {
- compatible = "regulator-fixed";
- regulator-name = "vcc_3v3_mcu";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
-
- usb0_vbus: regulator-usb0-vbus {
- compatible = "regulator-fixed";
- pinctrl-0 = <&pinctrl_usb_vbus>;
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio0 6 0>;
- };
-
spi0 {
compatible = "spi-gpio";
pinctrl-0 = <&pinctrl_gpio_spi0>;
@@ -336,49 +297,6 @@
};
};
-&adc0 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_adc0_ad5>;
- vref-supply = <®_vcc_3v3_mcu>;
- status = "okay";
-};
-
-&edma0 {
- status = "okay";
-};
-
-&esdhc1 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_esdhc1>;
- bus-width = <4>;
- status = "okay";
-};
-
-&fec0 {
- phy-mode = "rmii";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_fec0>;
- status = "okay";
-};
-
-&fec1 {
- phy-mode = "rmii";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_fec1>;
- status = "okay";
-
- fixed-link {
- speed = <100>;
- full-duplex;
- };
-
- mdio1: mdio {
- #address-cells = <1>;
- #size-cells = <0>;
- status = "okay";
- };
-};
-
&i2c0 {
clock-frequency = <100000>;
pinctrl-names = "default";
@@ -403,33 +321,6 @@
interrupt-parent = <&gpio2>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
};
-
- lm75 at 48 {
- compatible = "national,lm75";
- reg = <0x48>;
- };
-
- at24c04 at 50 {
- compatible = "atmel,24c04";
- reg = <0x50>;
- };
-
- at24c04 at 52 {
- compatible = "atmel,24c04";
- reg = <0x52>;
- };
-
- ds1682 at 6b {
- compatible = "dallas,ds1682";
- reg = <0x6b>;
- };
-};
-
-&i2c1 {
- clock-frequency = <100000>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_i2c1>;
- status = "okay";
};
&i2c2 {
@@ -499,120 +390,8 @@
};
};
-&uart0 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart0>;
- status = "okay";
-};
-
-&uart1 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart1>;
- status = "okay";
-};
-
-&uart2 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart2>;
- status = "okay";
-};
-
-&usbdev0 {
- disable-over-current;
- vbus-supply = <&usb0_vbus>;
- dr_mode = "host";
- status = "okay";
-};
-
-&usbh1 {
- disable-over-current;
- status = "okay";
-};
-
-&usbmisc0 {
- status = "okay";
-};
-
-&usbmisc1 {
- status = "okay";
-};
-
-&usbphy0 {
- status = "okay";
-};
-
-&usbphy1 {
- status = "okay";
-};
&iomuxc {
- pinctrl_adc0_ad5: adc0ad5grp {
- fsl,pins = <
- VF610_PAD_PTC30__ADC0_SE5 0x00a1
- >;
- };
-
- pinctrl_dspi0: dspi0grp {
- fsl,pins = <
- VF610_PAD_PTB18__DSPI0_CS1 0x1182
- VF610_PAD_PTB19__DSPI0_CS0 0x1182
- VF610_PAD_PTB20__DSPI0_SIN 0x1181
- VF610_PAD_PTB21__DSPI0_SOUT 0x1182
- VF610_PAD_PTB22__DSPI0_SCK 0x1182
- >;
- };
-
- pinctrl_dspi2: dspi2grp {
- fsl,pins = <
- VF610_PAD_PTD31__DSPI2_CS1 0x1182
- VF610_PAD_PTD30__DSPI2_CS0 0x1182
- VF610_PAD_PTD29__DSPI2_SIN 0x1181
- VF610_PAD_PTD28__DSPI2_SOUT 0x1182
- VF610_PAD_PTD27__DSPI2_SCK 0x1182
- >;
- };
-
- pinctrl_esdhc1: esdhc1grp {
- fsl,pins = <
- VF610_PAD_PTA24__ESDHC1_CLK 0x31ef
- VF610_PAD_PTA25__ESDHC1_CMD 0x31ef
- VF610_PAD_PTA26__ESDHC1_DAT0 0x31ef
- VF610_PAD_PTA27__ESDHC1_DAT1 0x31ef
- VF610_PAD_PTA28__ESDHC1_DATA2 0x31ef
- VF610_PAD_PTA29__ESDHC1_DAT3 0x31ef
- VF610_PAD_PTA7__GPIO_134 0x219d
- >;
- };
-
- pinctrl_fec0: fec0grp {
- fsl,pins = <
- VF610_PAD_PTC0__ENET_RMII0_MDC 0x30d2
- VF610_PAD_PTC1__ENET_RMII0_MDIO 0x30d3
- VF610_PAD_PTC2__ENET_RMII0_CRS 0x30d1
- VF610_PAD_PTC3__ENET_RMII0_RXD1 0x30d1
- VF610_PAD_PTC4__ENET_RMII0_RXD0 0x30d1
- VF610_PAD_PTC5__ENET_RMII0_RXER 0x30d1
- VF610_PAD_PTC6__ENET_RMII0_TXD1 0x30d2
- VF610_PAD_PTC7__ENET_RMII0_TXD0 0x30d2
- VF610_PAD_PTC8__ENET_RMII0_TXEN 0x30d2
- >;
- };
-
- pinctrl_fec1: fec1grp {
- fsl,pins = <
- VF610_PAD_PTA6__RMII_CLKIN 0x30d1
- VF610_PAD_PTC9__ENET_RMII1_MDC 0x30d2
- VF610_PAD_PTC10__ENET_RMII1_MDIO 0x30d3
- VF610_PAD_PTC11__ENET_RMII1_CRS 0x30d1
- VF610_PAD_PTC12__ENET_RMII1_RXD1 0x30d1
- VF610_PAD_PTC13__ENET_RMII1_RXD0 0x30d1
- VF610_PAD_PTC14__ENET_RMII1_RXER 0x30d1
- VF610_PAD_PTC15__ENET_RMII1_TXD1 0x30d2
- VF610_PAD_PTC16__ENET_RMII1_TXD0 0x30d2
- VF610_PAD_PTC17__ENET_RMII1_TXEN 0x30d2
- >;
- };
-
pinctrl_gpio_e6185_eeprom_sel: pinctrl-gpio-e6185-eeprom-spi0 {
fsl,pins = <
VF610_PAD_PTE27__GPIO_132 0x33e2
@@ -629,39 +408,6 @@
>;
};
- pinctrl_i2c_mux_reset: pinctrl-i2c-mux-reset {
- fsl,pins = <
- VF610_PAD_PTE14__GPIO_119 0x31c2
- >;
- };
-
- pinctrl_i2c0: i2c0grp {
- fsl,pins = <
- VF610_PAD_PTB14__I2C0_SCL 0x37ff
- VF610_PAD_PTB15__I2C0_SDA 0x37ff
- >;
- };
-
- pinctrl_i2c1: i2c1grp {
- fsl,pins = <
- VF610_PAD_PTB16__I2C1_SCL 0x37ff
- VF610_PAD_PTB17__I2C1_SDA 0x37ff
- >;
- };
-
- pinctrl_i2c2: i2c2grp {
- fsl,pins = <
- VF610_PAD_PTA22__I2C2_SCL 0x37ff
- VF610_PAD_PTA23__I2C2_SDA 0x37ff
- >;
- };
-
- pinctrl_leds_debug: pinctrl-leds-debug {
- fsl,pins = <
- VF610_PAD_PTD20__GPIO_74 0x31c2
- >;
- };
-
pinctrl_mdio_mux: pinctrl-mdio-mux {
fsl,pins = <
VF610_PAD_PTA18__GPIO_8 0x31c2
@@ -676,48 +422,4 @@
VF610_PAD_PTB28__GPIO_98 0x219d
>;
};
-
- pinctrl_qspi0: qspi0grp {
- fsl,pins = <
- VF610_PAD_PTD7__QSPI0_B_QSCK 0x31c3
- VF610_PAD_PTD8__QSPI0_B_CS0 0x31ff
- VF610_PAD_PTD9__QSPI0_B_DATA3 0x31c3
- VF610_PAD_PTD10__QSPI0_B_DATA2 0x31c3
- VF610_PAD_PTD11__QSPI0_B_DATA1 0x31c3
- VF610_PAD_PTD12__QSPI0_B_DATA0 0x31c3
- >;
- };
-
- pinctrl_uart0: uart0grp {
- fsl,pins = <
- VF610_PAD_PTB10__UART0_TX 0x21a2
- VF610_PAD_PTB11__UART0_RX 0x21a1
- >;
- };
-
- pinctrl_uart1: uart1grp {
- fsl,pins = <
- VF610_PAD_PTB23__UART1_TX 0x21a2
- VF610_PAD_PTB24__UART1_RX 0x21a1
- >;
- };
-
- pinctrl_uart2: uart2grp {
- fsl,pins = <
- VF610_PAD_PTD0__UART2_TX 0x21a2
- VF610_PAD_PTD1__UART2_RX 0x21a1
- >;
- };
-
- pinctrl_usb_vbus: pinctrl-usb-vbus {
- fsl,pins = <
- VF610_PAD_PTA16__GPIO_6 0x31c2
- >;
- };
-
- pinctrl_usb0_host: usb0-host-grp {
- fsl,pins = <
- VF610_PAD_PTD6__GPIO_85 0x0062
- >;
- };
};
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
new file mode 100644
index 0000000..b508bbf
--- /dev/null
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
@@ -0,0 +1,418 @@
+/*
+ * Copyright (C) 2015, 2016 Zodiac Inflight Innovations
+ *
+ * Based on an original 'vf610-twr.dts' which is Copyright 2015,
+ * Freescale Semiconductor, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file 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.
+ *
+ * This file 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.
+ *
+ * Or, alternatively
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "vf610-zii-dev-rev-b-c.dtsi"
+
+/ {
+ model = "ZII VF610 Development Board, Rev C";
+ compatible = "zii,vf610dev-c", "zii,vf610dev", "fsl,vf610";
+
+ mdio-mux {
+ compatible = "mdio-mux-gpio";
+ pinctrl-0 = <&pinctrl_mdio_mux>;
+ pinctrl-names = "default";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH
+ &gpio0 9 GPIO_ACTIVE_HIGH
+ &gpio0 25 GPIO_ACTIVE_HIGH>;
+ mdio-parent-bus = <&mdio1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio_mux_1: mdio at 1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch0: switch0 at 0 {
+ compatible = "marvell,mv88e6390";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ dsa,member = <0 0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port at 0 {
+ reg = <0>;
+ label = "cpu";
+ ethernet = <&fec1>;
+ fixed-link {
+ speed = <100>;
+ full-duplex;
+ };
+ };
+
+ port at 1 {
+ reg = <1>;
+ label = "lan1";
+ };
+
+ port at 2 {
+ reg = <2>;
+ label = "lan2";
+ };
+
+ port at 3 {
+ reg = <3>;
+ label = "lan3";
+ };
+
+ port at 4 {
+ reg = <4>;
+ label = "lan4";
+ };
+
+ port at 9 {
+ reg = <9>;
+ label = "lan4";
+ phy-handle = <&switch0phy0>;
+ };
+
+
+ switch0port10: port at 10 {
+ reg = <10>;
+ label = "dsa";
+ phy-mode = "xgmii";
+ link = <&switch1port10>;
+ fixed-link {
+ speed = <10000>;
+ full-duplex;
+ };
+ };
+ };
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ switch0phy0: switch0phy0 at 0 {
+ reg = <0>;
+ };
+ };
+
+ };
+ };
+
+ mdio_mux_2: mdio at 2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch1: switch1 at 0 {
+ compatible = "marvell,mv88e6390";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ dsa,member = <0 1>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port at 1 {
+ reg = <1>;
+ label = "lan5";
+ };
+
+ port at 2 {
+ reg = <2>;
+ label = "lan6";
+ };
+
+ port at 3 {
+ reg = <3>;
+ label = "lan7";
+ };
+
+ port at 4 {
+ reg = <4>;
+ label = "lan8";
+ };
+
+
+ switch1port10: port at 10 {
+ reg = <10>;
+ label = "dsa";
+ phy-mode = "xgmii";
+ link = <&switch0port10>;
+ fixed-link {
+ speed = <10000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
+
+ mdio_mux_4: mdio at 4 {
+ reg = <4>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+};
+
+&dspi0 {
+ bus-num = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_dspi0>;
+ status = "okay";
+ spi-num-chipselects = <2>;
+
+ m25p128 at 0 {
+ compatible = "m25p128", "jedec,spi-nor";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+};
+
+&i2c0 {
+ /*
+ * U712
+ *
+ * Exposed signals:
+ * P1 - WE2_CMD
+ * P2 - WE2_CLK
+ */
+ gpio5: pca9557 at 18 {
+ compatible = "nxp,pca9557";
+ reg = <0x18>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ /*
+ * U121
+ *
+ * Exposed signals:
+ * I/O0 - ENET_SWR_EN
+ * I/O1 - ESW1_RESETn
+ * I/O2 - ARINC_RESET
+ * I/O3 - DD1_IO_RESET
+ * I/O4 - ESW2_RESETn
+ * I/O5 - ESW3_RESETn
+ * I/O6 - ESW4_RESETn
+ * I/O8 - TP909
+ * I/O9 - FEM_SEL
+ * I/O10 - WIFI_RESETn
+ * I/O11 - PHY_RSTn
+ * I/O12 - OPT1_SD
+ * I/O13 - OPT2_SD
+ * I/O14 - OPT1_TX_DIS
+ * I/O15 - OPT2_TX_DIS
+ */
+ gpio6: sx1503 at 20 {
+ compatible = "semtech,sx1503q";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sx1503_20>;
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ interrupt-controller;
+
+ enet_swr_en {
+ gpio-hog;
+ gpios = <0 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "enet-swr-en";
+ };
+ };
+
+ /*
+ * U715
+ *
+ * Exposed signals:
+ * IO0 - WE1_CLK
+ * IO1 - WE1_CMD
+ */
+ gpio7: pca9554 at 22 {
+ compatible = "nxp,pca9554";
+ reg = <0x22>;
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ };
+};
+
+&i2c1 {
+ at24mac602 at 00 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ read-only;
+ };
+};
+
+&i2c2 {
+ tca9548 at 70 {
+ compatible = "nxp,pca9548";
+ pinctrl-0 = <&pinctrl_i2c_mux_reset>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x70>;
+ reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
+
+ i2c at 0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ };
+
+ i2c at 1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ sfp2: at24c04 at 50 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ };
+ };
+
+ i2c at 2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>;
+
+ sfp3: at24c04 at 50 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ };
+ };
+
+ i2c at 3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>;
+ };
+ };
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "okay";
+};
+
+&gpio0 {
+ eth0_intrp {
+ gpio-hog;
+ gpios = <23 GPIO_ACTIVE_HIGH>;
+ input;
+ line-name = "sx1503-irq";
+ };
+};
+
+&gpio3 {
+ eth0_intrp {
+ gpio-hog;
+ gpios = <2 GPIO_ACTIVE_HIGH>;
+ input;
+ line-name = "eth0-intrp";
+ };
+};
+
+&fec0 {
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ ethernet-phy at 0 {
+ compatible = "ethernet-phy-id0022.1550", "ethernet-phy-ieee802.3-c22";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec0_phy_int>;
+
+ interrupt-parent = <&gpio3>;
+ interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+ reg = <0>;
+ };
+ };
+};
+
+&iomuxc {
+ pinctr_atzb_rf_233: pinctrl-atzb-rf-233 {
+ fsl,pins = <
+ VF610_PAD_PTB2__GPIO_24 0x31c2
+ VF610_PAD_PTE27__GPIO_132 0x33e2
+ >;
+ };
+
+
+ pinctrl_sx1503_20: pinctrl-sx1503-20 {
+ fsl,pins = <
+ VF610_PAD_PTB1__GPIO_23 0x219d
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ VF610_PAD_PTA20__UART3_TX 0x21a2
+ VF610_PAD_PTA21__UART3_RX 0x21a1
+ >;
+ };
+
+ pinctrl_mdio_mux: pinctrl-mdio-mux {
+ fsl,pins = <
+ VF610_PAD_PTA18__GPIO_8 0x31c2
+ VF610_PAD_PTA19__GPIO_9 0x31c2
+ VF610_PAD_PTB3__GPIO_25 0x31c2
+ >;
+ };
+
+ pinctrl_fec0_phy_int: pinctrl-fec0-phy-int {
+ fsl,pins = <
+ VF610_PAD_PTB28__GPIO_98 0x2181
+ >;
+ };
+};
--
2.5.5
^ permalink raw reply related
* [PATCH 2/2] ARM: dts: vf610-zii-dev: Add .dts file for rev. C
From: Andrey Smirnov @ 2016-11-14 16:35 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Shawn Guo, Rob Herring, Mark Rutland, Russell King, Sascha Hauer,
Stefan Agner, devicetree, linux-kernel, andrew, cphealy,
Andrey Smirnov
In-Reply-To: <1479141306-15141-1-git-send-email-andrew.smirnov@gmail.com>
Add .dts file for rev. C of the board by factoring out commonalities
into a shared include file (vf610-zii-dev-rev-b-c.dtsi) and deriving
revision specific file from it (vf610-zii-dev-rev-b.dts and
vf610-zii-dev-reb-c.dts).
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
arch/arm/boot/dts/Makefile | 3 +-
arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi | 383 ++++++++++++++++++++++++
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 300 +------------------
arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 418 +++++++++++++++++++++++++++
4 files changed, 804 insertions(+), 300 deletions(-)
create mode 100644 arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi
create mode 100644 arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index befcd26..9f0d2a1 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -442,7 +442,8 @@ dtb-$(CONFIG_SOC_VF610) += \
vf610-cosmic.dtb \
vf610m4-cosmic.dtb \
vf610-twr.dtb \
- vf610-zii-dev-rev-b.dtb
+ vf610-zii-dev-rev-b.dtb \
+ vf610-zii-dev-rev-c.dtb
dtb-$(CONFIG_ARCH_MXS) += \
imx23-evk.dtb \
imx23-olinuxino.dtb \
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi b/arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi
new file mode 100644
index 0000000..9f5e2e7
--- /dev/null
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-b-c.dtsi
@@ -0,0 +1,383 @@
+/*
+ * Copyright (C) 2015, 2016 Zodiac Inflight Innovations
+ *
+ * Based on an original 'vf610-twr.dts' which is Copyright 2015,
+ * Freescale Semiconductor, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file 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.
+ *
+ * This file 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.
+ *
+ * Or, alternatively
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+n * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "vf610.dtsi"
+
+/ {
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory {
+ reg = <0x80000000 0x20000000>;
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pinctrl_leds_debug>;
+ pinctrl-names = "default";
+
+ debug {
+ label = "zii:green:debug1";
+ gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ reg_vcc_3v3_mcu: regulator-vcc-3v3-mcu {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_3v3_mcu";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ usb0_vbus: regulator-usb0-vbus {
+ compatible = "regulator-fixed";
+ pinctrl-0 = <&pinctrl_usb_vbus>;
+ regulator-name = "usb_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 6 0>;
+ };
+};
+
+&adc0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_adc0_ad5>;
+ vref-supply = <®_vcc_3v3_mcu>;
+ status = "okay";
+};
+
+&edma0 {
+ status = "okay";
+};
+
+&esdhc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_esdhc1>;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&fec0 {
+ phy-mode = "rmii";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec0>;
+ status = "okay";
+};
+
+&fec1 {
+ phy-mode = "rmii";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec1>;
+ status = "okay";
+
+ fixed-link {
+ speed = <100>;
+ full-duplex;
+ };
+
+ mdio1: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+ };
+};
+
+&i2c0 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default", "gpio";
+ pinctrl-0 = <&pinctrl_i2c0>;
+ pinctrl-1 = <&pinctrl_i2c0_gpio>;
+ scl-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ sda-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+
+ lm75@48 {
+ compatible = "national,lm75";
+ reg = <0x48>;
+ };
+
+ at24c04@50 {
+ compatible = "atmel,24c04";
+ reg = <0x50>;
+ };
+
+ at24c04@52 {
+ compatible = "atmel,24c04";
+ reg = <0x52>;
+ };
+
+ ds1682@6b {
+ compatible = "dallas,ds1682";
+ reg = <0x6b>;
+ };
+};
+
+&i2c1 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c1>;
+ status = "okay";
+};
+
+&i2c2 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart0>;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ status = "okay";
+};
+
+&usbdev0 {
+ disable-over-current;
+ vbus-supply = <&usb0_vbus>;
+ dr_mode = "host";
+ status = "okay";
+};
+
+&usbh1 {
+ disable-over-current;
+ status = "okay";
+};
+
+&usbmisc0 {
+ status = "okay";
+};
+
+&usbmisc1 {
+ status = "okay";
+};
+
+&usbphy0 {
+ status = "okay";
+};
+
+&usbphy1 {
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl_adc0_ad5: adc0ad5grp {
+ fsl,pins = <
+ VF610_PAD_PTC30__ADC0_SE5 0x00a1
+ >;
+ };
+
+ pinctrl_dspi0: dspi0grp {
+ fsl,pins = <
+ VF610_PAD_PTB18__DSPI0_CS1 0x1182
+ VF610_PAD_PTB19__DSPI0_CS0 0x1182
+ VF610_PAD_PTB20__DSPI0_SIN 0x1181
+ VF610_PAD_PTB21__DSPI0_SOUT 0x1182
+ VF610_PAD_PTB22__DSPI0_SCK 0x1182
+ >;
+ };
+
+ pinctrl_dspi2: dspi2grp {
+ fsl,pins = <
+ VF610_PAD_PTD31__DSPI2_CS1 0x1182
+ VF610_PAD_PTD30__DSPI2_CS0 0x1182
+ VF610_PAD_PTD29__DSPI2_SIN 0x1181
+ VF610_PAD_PTD28__DSPI2_SOUT 0x1182
+ VF610_PAD_PTD27__DSPI2_SCK 0x1182
+ >;
+ };
+
+ pinctrl_esdhc1: esdhc1grp {
+ fsl,pins = <
+ VF610_PAD_PTA24__ESDHC1_CLK 0x31ef
+ VF610_PAD_PTA25__ESDHC1_CMD 0x31ef
+ VF610_PAD_PTA26__ESDHC1_DAT0 0x31ef
+ VF610_PAD_PTA27__ESDHC1_DAT1 0x31ef
+ VF610_PAD_PTA28__ESDHC1_DATA2 0x31ef
+ VF610_PAD_PTA29__ESDHC1_DAT3 0x31ef
+ VF610_PAD_PTA7__GPIO_134 0x219d
+ >;
+ };
+
+ pinctrl_fec0: fec0grp {
+ fsl,pins = <
+ VF610_PAD_PTC0__ENET_RMII0_MDC 0x30d2
+ VF610_PAD_PTC1__ENET_RMII0_MDIO 0x30d3
+ VF610_PAD_PTC2__ENET_RMII0_CRS 0x30d1
+ VF610_PAD_PTC3__ENET_RMII0_RXD1 0x30d1
+ VF610_PAD_PTC4__ENET_RMII0_RXD0 0x30d1
+ VF610_PAD_PTC5__ENET_RMII0_RXER 0x30d1
+ VF610_PAD_PTC6__ENET_RMII0_TXD1 0x30d2
+ VF610_PAD_PTC7__ENET_RMII0_TXD0 0x30d2
+ VF610_PAD_PTC8__ENET_RMII0_TXEN 0x30d2
+ >;
+ };
+
+ pinctrl_fec1: fec1grp {
+ fsl,pins = <
+ VF610_PAD_PTA6__RMII_CLKIN 0x30d1
+ VF610_PAD_PTC9__ENET_RMII1_MDC 0x30d2
+ VF610_PAD_PTC10__ENET_RMII1_MDIO 0x30d3
+ VF610_PAD_PTC11__ENET_RMII1_CRS 0x30d1
+ VF610_PAD_PTC12__ENET_RMII1_RXD1 0x30d1
+ VF610_PAD_PTC13__ENET_RMII1_RXD0 0x30d1
+ VF610_PAD_PTC14__ENET_RMII1_RXER 0x30d1
+ VF610_PAD_PTC15__ENET_RMII1_TXD1 0x30d2
+ VF610_PAD_PTC16__ENET_RMII1_TXD0 0x30d2
+ VF610_PAD_PTC17__ENET_RMII1_TXEN 0x30d2
+ >;
+ };
+
+ pinctrl_gpio_spi0: pinctrl-gpio-spi0 {
+ fsl,pins = <
+ VF610_PAD_PTB22__GPIO_44 0x33e2
+ VF610_PAD_PTB21__GPIO_43 0x33e2
+ VF610_PAD_PTB20__GPIO_42 0x33e1
+ VF610_PAD_PTB19__GPIO_41 0x33e2
+ VF610_PAD_PTB18__GPIO_40 0x33e2
+ >;
+ };
+
+ pinctrl_i2c_mux_reset: pinctrl-i2c-mux-reset {
+ fsl,pins = <
+ VF610_PAD_PTE14__GPIO_119 0x31c2
+ >;
+ };
+
+ pinctrl_i2c0: i2c0grp {
+ fsl,pins = <
+ VF610_PAD_PTB14__I2C0_SCL 0x37ff
+ VF610_PAD_PTB15__I2C0_SDA 0x37ff
+ >;
+ };
+
+ pinctrl_i2c0_gpio: i2c0grp-gpio {
+ fsl,pins = <
+ VF610_PAD_PTB14__GPIO_36 0x31c2
+ VF610_PAD_PTB15__GPIO_37 0x31c2
+ >;
+ };
+
+
+ pinctrl_i2c1: i2c1grp {
+ fsl,pins = <
+ VF610_PAD_PTB16__I2C1_SCL 0x37ff
+ VF610_PAD_PTB17__I2C1_SDA 0x37ff
+ >;
+ };
+
+ pinctrl_i2c2: i2c2grp {
+ fsl,pins = <
+ VF610_PAD_PTA22__I2C2_SCL 0x37ff
+ VF610_PAD_PTA23__I2C2_SDA 0x37ff
+ >;
+ };
+
+ pinctrl_leds_debug: pinctrl-leds-debug {
+ fsl,pins = <
+ VF610_PAD_PTD20__GPIO_74 0x31c2
+ >;
+ };
+
+ pinctrl_qspi0: qspi0grp {
+ fsl,pins = <
+ VF610_PAD_PTD7__QSPI0_B_QSCK 0x31c3
+ VF610_PAD_PTD8__QSPI0_B_CS0 0x31ff
+ VF610_PAD_PTD9__QSPI0_B_DATA3 0x31c3
+ VF610_PAD_PTD10__QSPI0_B_DATA2 0x31c3
+ VF610_PAD_PTD11__QSPI0_B_DATA1 0x31c3
+ VF610_PAD_PTD12__QSPI0_B_DATA0 0x31c3
+ >;
+ };
+
+ pinctrl_uart0: uart0grp {
+ fsl,pins = <
+ VF610_PAD_PTB10__UART0_TX 0x21a2
+ VF610_PAD_PTB11__UART0_RX 0x21a1
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ VF610_PAD_PTB23__UART1_TX 0x21a2
+ VF610_PAD_PTB24__UART1_RX 0x21a1
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ VF610_PAD_PTD0__UART2_TX 0x21a2
+ VF610_PAD_PTD1__UART2_RX 0x21a1
+ >;
+ };
+
+ pinctrl_usb_vbus: pinctrl-usb-vbus {
+ fsl,pins = <
+ VF610_PAD_PTA16__GPIO_6 0x31c2
+ >;
+ };
+
+ pinctrl_usb0_host: usb0-host-grp {
+ fsl,pins = <
+ VF610_PAD_PTD6__GPIO_85 0x0062
+ >;
+ };
+};
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
index 2210811..dee79de 100644
--- a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
@@ -43,32 +43,12 @@
*/
/dts-v1/;
-#include "vf610.dtsi"
+#include "vf610-zii-dev-rev-b-c.dtsi"
/ {
model = "ZII VF610 Development Board, Rev B";
compatible = "zii,vf610dev-b", "zii,vf610dev", "fsl,vf610";
- chosen {
- stdout-path = "serial0:115200n8";
- };
-
- memory {
- reg = <0x80000000 0x20000000>;
- };
-
- gpio-leds {
- compatible = "gpio-leds";
- pinctrl-0 = <&pinctrl_leds_debug>;
- pinctrl-names = "default";
-
- debug {
- label = "zii:green:debug1";
- gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "heartbeat";
- };
- };
-
mdio-mux {
compatible = "mdio-mux-gpio";
pinctrl-0 = <&pinctrl_mdio_mux>;
@@ -281,25 +261,6 @@
};
};
- reg_vcc_3v3_mcu: regulator-vcc-3v3-mcu {
- compatible = "regulator-fixed";
- regulator-name = "vcc_3v3_mcu";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
-
- usb0_vbus: regulator-usb0-vbus {
- compatible = "regulator-fixed";
- pinctrl-0 = <&pinctrl_usb_vbus>;
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- regulator-always-on;
- regulator-boot-on;
- gpio = <&gpio0 6 0>;
- };
-
spi0 {
compatible = "spi-gpio";
pinctrl-0 = <&pinctrl_gpio_spi0>;
@@ -336,49 +297,6 @@
};
};
-&adc0 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_adc0_ad5>;
- vref-supply = <®_vcc_3v3_mcu>;
- status = "okay";
-};
-
-&edma0 {
- status = "okay";
-};
-
-&esdhc1 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_esdhc1>;
- bus-width = <4>;
- status = "okay";
-};
-
-&fec0 {
- phy-mode = "rmii";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_fec0>;
- status = "okay";
-};
-
-&fec1 {
- phy-mode = "rmii";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_fec1>;
- status = "okay";
-
- fixed-link {
- speed = <100>;
- full-duplex;
- };
-
- mdio1: mdio {
- #address-cells = <1>;
- #size-cells = <0>;
- status = "okay";
- };
-};
-
&i2c0 {
clock-frequency = <100000>;
pinctrl-names = "default";
@@ -403,33 +321,6 @@
interrupt-parent = <&gpio2>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
};
-
- lm75@48 {
- compatible = "national,lm75";
- reg = <0x48>;
- };
-
- at24c04@50 {
- compatible = "atmel,24c04";
- reg = <0x50>;
- };
-
- at24c04@52 {
- compatible = "atmel,24c04";
- reg = <0x52>;
- };
-
- ds1682@6b {
- compatible = "dallas,ds1682";
- reg = <0x6b>;
- };
-};
-
-&i2c1 {
- clock-frequency = <100000>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_i2c1>;
- status = "okay";
};
&i2c2 {
@@ -499,120 +390,8 @@
};
};
-&uart0 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart0>;
- status = "okay";
-};
-
-&uart1 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart1>;
- status = "okay";
-};
-
-&uart2 {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart2>;
- status = "okay";
-};
-
-&usbdev0 {
- disable-over-current;
- vbus-supply = <&usb0_vbus>;
- dr_mode = "host";
- status = "okay";
-};
-
-&usbh1 {
- disable-over-current;
- status = "okay";
-};
-
-&usbmisc0 {
- status = "okay";
-};
-
-&usbmisc1 {
- status = "okay";
-};
-
-&usbphy0 {
- status = "okay";
-};
-
-&usbphy1 {
- status = "okay";
-};
&iomuxc {
- pinctrl_adc0_ad5: adc0ad5grp {
- fsl,pins = <
- VF610_PAD_PTC30__ADC0_SE5 0x00a1
- >;
- };
-
- pinctrl_dspi0: dspi0grp {
- fsl,pins = <
- VF610_PAD_PTB18__DSPI0_CS1 0x1182
- VF610_PAD_PTB19__DSPI0_CS0 0x1182
- VF610_PAD_PTB20__DSPI0_SIN 0x1181
- VF610_PAD_PTB21__DSPI0_SOUT 0x1182
- VF610_PAD_PTB22__DSPI0_SCK 0x1182
- >;
- };
-
- pinctrl_dspi2: dspi2grp {
- fsl,pins = <
- VF610_PAD_PTD31__DSPI2_CS1 0x1182
- VF610_PAD_PTD30__DSPI2_CS0 0x1182
- VF610_PAD_PTD29__DSPI2_SIN 0x1181
- VF610_PAD_PTD28__DSPI2_SOUT 0x1182
- VF610_PAD_PTD27__DSPI2_SCK 0x1182
- >;
- };
-
- pinctrl_esdhc1: esdhc1grp {
- fsl,pins = <
- VF610_PAD_PTA24__ESDHC1_CLK 0x31ef
- VF610_PAD_PTA25__ESDHC1_CMD 0x31ef
- VF610_PAD_PTA26__ESDHC1_DAT0 0x31ef
- VF610_PAD_PTA27__ESDHC1_DAT1 0x31ef
- VF610_PAD_PTA28__ESDHC1_DATA2 0x31ef
- VF610_PAD_PTA29__ESDHC1_DAT3 0x31ef
- VF610_PAD_PTA7__GPIO_134 0x219d
- >;
- };
-
- pinctrl_fec0: fec0grp {
- fsl,pins = <
- VF610_PAD_PTC0__ENET_RMII0_MDC 0x30d2
- VF610_PAD_PTC1__ENET_RMII0_MDIO 0x30d3
- VF610_PAD_PTC2__ENET_RMII0_CRS 0x30d1
- VF610_PAD_PTC3__ENET_RMII0_RXD1 0x30d1
- VF610_PAD_PTC4__ENET_RMII0_RXD0 0x30d1
- VF610_PAD_PTC5__ENET_RMII0_RXER 0x30d1
- VF610_PAD_PTC6__ENET_RMII0_TXD1 0x30d2
- VF610_PAD_PTC7__ENET_RMII0_TXD0 0x30d2
- VF610_PAD_PTC8__ENET_RMII0_TXEN 0x30d2
- >;
- };
-
- pinctrl_fec1: fec1grp {
- fsl,pins = <
- VF610_PAD_PTA6__RMII_CLKIN 0x30d1
- VF610_PAD_PTC9__ENET_RMII1_MDC 0x30d2
- VF610_PAD_PTC10__ENET_RMII1_MDIO 0x30d3
- VF610_PAD_PTC11__ENET_RMII1_CRS 0x30d1
- VF610_PAD_PTC12__ENET_RMII1_RXD1 0x30d1
- VF610_PAD_PTC13__ENET_RMII1_RXD0 0x30d1
- VF610_PAD_PTC14__ENET_RMII1_RXER 0x30d1
- VF610_PAD_PTC15__ENET_RMII1_TXD1 0x30d2
- VF610_PAD_PTC16__ENET_RMII1_TXD0 0x30d2
- VF610_PAD_PTC17__ENET_RMII1_TXEN 0x30d2
- >;
- };
-
pinctrl_gpio_e6185_eeprom_sel: pinctrl-gpio-e6185-eeprom-spi0 {
fsl,pins = <
VF610_PAD_PTE27__GPIO_132 0x33e2
@@ -629,39 +408,6 @@
>;
};
- pinctrl_i2c_mux_reset: pinctrl-i2c-mux-reset {
- fsl,pins = <
- VF610_PAD_PTE14__GPIO_119 0x31c2
- >;
- };
-
- pinctrl_i2c0: i2c0grp {
- fsl,pins = <
- VF610_PAD_PTB14__I2C0_SCL 0x37ff
- VF610_PAD_PTB15__I2C0_SDA 0x37ff
- >;
- };
-
- pinctrl_i2c1: i2c1grp {
- fsl,pins = <
- VF610_PAD_PTB16__I2C1_SCL 0x37ff
- VF610_PAD_PTB17__I2C1_SDA 0x37ff
- >;
- };
-
- pinctrl_i2c2: i2c2grp {
- fsl,pins = <
- VF610_PAD_PTA22__I2C2_SCL 0x37ff
- VF610_PAD_PTA23__I2C2_SDA 0x37ff
- >;
- };
-
- pinctrl_leds_debug: pinctrl-leds-debug {
- fsl,pins = <
- VF610_PAD_PTD20__GPIO_74 0x31c2
- >;
- };
-
pinctrl_mdio_mux: pinctrl-mdio-mux {
fsl,pins = <
VF610_PAD_PTA18__GPIO_8 0x31c2
@@ -676,48 +422,4 @@
VF610_PAD_PTB28__GPIO_98 0x219d
>;
};
-
- pinctrl_qspi0: qspi0grp {
- fsl,pins = <
- VF610_PAD_PTD7__QSPI0_B_QSCK 0x31c3
- VF610_PAD_PTD8__QSPI0_B_CS0 0x31ff
- VF610_PAD_PTD9__QSPI0_B_DATA3 0x31c3
- VF610_PAD_PTD10__QSPI0_B_DATA2 0x31c3
- VF610_PAD_PTD11__QSPI0_B_DATA1 0x31c3
- VF610_PAD_PTD12__QSPI0_B_DATA0 0x31c3
- >;
- };
-
- pinctrl_uart0: uart0grp {
- fsl,pins = <
- VF610_PAD_PTB10__UART0_TX 0x21a2
- VF610_PAD_PTB11__UART0_RX 0x21a1
- >;
- };
-
- pinctrl_uart1: uart1grp {
- fsl,pins = <
- VF610_PAD_PTB23__UART1_TX 0x21a2
- VF610_PAD_PTB24__UART1_RX 0x21a1
- >;
- };
-
- pinctrl_uart2: uart2grp {
- fsl,pins = <
- VF610_PAD_PTD0__UART2_TX 0x21a2
- VF610_PAD_PTD1__UART2_RX 0x21a1
- >;
- };
-
- pinctrl_usb_vbus: pinctrl-usb-vbus {
- fsl,pins = <
- VF610_PAD_PTA16__GPIO_6 0x31c2
- >;
- };
-
- pinctrl_usb0_host: usb0-host-grp {
- fsl,pins = <
- VF610_PAD_PTD6__GPIO_85 0x0062
- >;
- };
};
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
new file mode 100644
index 0000000..b508bbf
--- /dev/null
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
@@ -0,0 +1,418 @@
+/*
+ * Copyright (C) 2015, 2016 Zodiac Inflight Innovations
+ *
+ * Based on an original 'vf610-twr.dts' which is Copyright 2015,
+ * Freescale Semiconductor, Inc.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file 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.
+ *
+ * This file 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.
+ *
+ * Or, alternatively
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "vf610-zii-dev-rev-b-c.dtsi"
+
+/ {
+ model = "ZII VF610 Development Board, Rev C";
+ compatible = "zii,vf610dev-c", "zii,vf610dev", "fsl,vf610";
+
+ mdio-mux {
+ compatible = "mdio-mux-gpio";
+ pinctrl-0 = <&pinctrl_mdio_mux>;
+ pinctrl-names = "default";
+ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH
+ &gpio0 9 GPIO_ACTIVE_HIGH
+ &gpio0 25 GPIO_ACTIVE_HIGH>;
+ mdio-parent-bus = <&mdio1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio_mux_1: mdio@1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch0: switch0@0 {
+ compatible = "marvell,mv88e6390";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ dsa,member = <0 0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ label = "cpu";
+ ethernet = <&fec1>;
+ fixed-link {
+ speed = <100>;
+ full-duplex;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ label = "lan1";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "lan2";
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "lan3";
+ };
+
+ port@4 {
+ reg = <4>;
+ label = "lan4";
+ };
+
+ port@9 {
+ reg = <9>;
+ label = "lan4";
+ phy-handle = <&switch0phy0>;
+ };
+
+
+ switch0port10: port@10 {
+ reg = <10>;
+ label = "dsa";
+ phy-mode = "xgmii";
+ link = <&switch1port10>;
+ fixed-link {
+ speed = <10000>;
+ full-duplex;
+ };
+ };
+ };
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ switch0phy0: switch0phy0@0 {
+ reg = <0>;
+ };
+ };
+
+ };
+ };
+
+ mdio_mux_2: mdio@2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch1: switch1@0 {
+ compatible = "marvell,mv88e6390";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ dsa,member = <0 1>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@1 {
+ reg = <1>;
+ label = "lan5";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "lan6";
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "lan7";
+ };
+
+ port@4 {
+ reg = <4>;
+ label = "lan8";
+ };
+
+
+ switch1port10: port@10 {
+ reg = <10>;
+ label = "dsa";
+ phy-mode = "xgmii";
+ link = <&switch0port10>;
+ fixed-link {
+ speed = <10000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
+
+ mdio_mux_4: mdio@4 {
+ reg = <4>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+};
+
+&dspi0 {
+ bus-num = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_dspi0>;
+ status = "okay";
+ spi-num-chipselects = <2>;
+
+ m25p128@0 {
+ compatible = "m25p128", "jedec,spi-nor";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+};
+
+&i2c0 {
+ /*
+ * U712
+ *
+ * Exposed signals:
+ * P1 - WE2_CMD
+ * P2 - WE2_CLK
+ */
+ gpio5: pca9557@18 {
+ compatible = "nxp,pca9557";
+ reg = <0x18>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ /*
+ * U121
+ *
+ * Exposed signals:
+ * I/O0 - ENET_SWR_EN
+ * I/O1 - ESW1_RESETn
+ * I/O2 - ARINC_RESET
+ * I/O3 - DD1_IO_RESET
+ * I/O4 - ESW2_RESETn
+ * I/O5 - ESW3_RESETn
+ * I/O6 - ESW4_RESETn
+ * I/O8 - TP909
+ * I/O9 - FEM_SEL
+ * I/O10 - WIFI_RESETn
+ * I/O11 - PHY_RSTn
+ * I/O12 - OPT1_SD
+ * I/O13 - OPT2_SD
+ * I/O14 - OPT1_TX_DIS
+ * I/O15 - OPT2_TX_DIS
+ */
+ gpio6: sx1503@20 {
+ compatible = "semtech,sx1503q";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sx1503_20>;
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
+ gpio-controller;
+ interrupt-controller;
+
+ enet_swr_en {
+ gpio-hog;
+ gpios = <0 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "enet-swr-en";
+ };
+ };
+
+ /*
+ * U715
+ *
+ * Exposed signals:
+ * IO0 - WE1_CLK
+ * IO1 - WE1_CMD
+ */
+ gpio7: pca9554@22 {
+ compatible = "nxp,pca9554";
+ reg = <0x22>;
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ };
+};
+
+&i2c1 {
+ at24mac602@00 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ read-only;
+ };
+};
+
+&i2c2 {
+ tca9548@70 {
+ compatible = "nxp,pca9548";
+ pinctrl-0 = <&pinctrl_i2c_mux_reset>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x70>;
+ reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
+
+ i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ };
+
+ i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ sfp2: at24c04@50 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ };
+ };
+
+ i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <2>;
+
+ sfp3: at24c04@50 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ };
+ };
+
+ i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <3>;
+ };
+ };
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ status = "okay";
+};
+
+&gpio0 {
+ eth0_intrp {
+ gpio-hog;
+ gpios = <23 GPIO_ACTIVE_HIGH>;
+ input;
+ line-name = "sx1503-irq";
+ };
+};
+
+&gpio3 {
+ eth0_intrp {
+ gpio-hog;
+ gpios = <2 GPIO_ACTIVE_HIGH>;
+ input;
+ line-name = "eth0-intrp";
+ };
+};
+
+&fec0 {
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ ethernet-phy@0 {
+ compatible = "ethernet-phy-id0022.1550", "ethernet-phy-ieee802.3-c22";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec0_phy_int>;
+
+ interrupt-parent = <&gpio3>;
+ interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+ reg = <0>;
+ };
+ };
+};
+
+&iomuxc {
+ pinctr_atzb_rf_233: pinctrl-atzb-rf-233 {
+ fsl,pins = <
+ VF610_PAD_PTB2__GPIO_24 0x31c2
+ VF610_PAD_PTE27__GPIO_132 0x33e2
+ >;
+ };
+
+
+ pinctrl_sx1503_20: pinctrl-sx1503-20 {
+ fsl,pins = <
+ VF610_PAD_PTB1__GPIO_23 0x219d
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ VF610_PAD_PTA20__UART3_TX 0x21a2
+ VF610_PAD_PTA21__UART3_RX 0x21a1
+ >;
+ };
+
+ pinctrl_mdio_mux: pinctrl-mdio-mux {
+ fsl,pins = <
+ VF610_PAD_PTA18__GPIO_8 0x31c2
+ VF610_PAD_PTA19__GPIO_9 0x31c2
+ VF610_PAD_PTB3__GPIO_25 0x31c2
+ >;
+ };
+
+ pinctrl_fec0_phy_int: pinctrl-fec0-phy-int {
+ fsl,pins = <
+ VF610_PAD_PTB28__GPIO_98 0x2181
+ >;
+ };
+};
--
2.5.5
^ permalink raw reply related
* [PATCH 0/3] drm/i915: atomic_cdclk_freq fixes
From: ville.syrjala @ 2016-11-14 16:35 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
My little fix for populating intel_state->cdclk with
dev_priv->atomic_cdclk_freq became a little meatier after I realized
that we really need to protect it with what is essentially a crtc
rwlock. That is, writers need to hold all the crtc locks, whereas
readers need to hold at least one.
Ville Syrjälä (3):
drm/i915: Fix cdclk vs. dev_cdclk mess when not recomputing things
drm/i915: Protect dev_priv->atomic_cdclk_freq with all the crtc locks
drm/i915: Simplify error handling in intel_modeset_all_pipes()
drivers/gpu/drm/i915/i915_drv.h | 9 +++++-
drivers/gpu/drm/i915/intel_display.c | 60 ++++++++++++++++++++++++++++--------
2 files changed, 55 insertions(+), 14 deletions(-)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH v4 4/6] perf report: Show branch info in callchain entry for stdio mode
From: Arnaldo Carvalho de Melo @ 2016-11-14 16:34 UTC (permalink / raw)
To: Jin Yao; +Cc: jolsa, Linux-kernel, ak, kan.liang
In-Reply-To: <1477876794-30749-5-git-send-email-yao.jin@linux.intel.com>
Em Mon, Oct 31, 2016 at 09:19:52AM +0800, Jin Yao escreveu:
> If the branch is 100% predicated then the "predicated" is hide.
"predicated"? Changing this to "predicted".
Also changing "is hide" to "is hidden".
- Arnaldo
> Similarly, if there is no branch tsx abort, the "abort" is hide.
> There is only cycles shown (cycle is supported on skylake platform,
> older platform would be 0).
>
> If no iterations, the "iterations" is hide.
>
> For example:
>
> |--29.93%--main div.c:39 (predicted:50.6%, cycles:1, iterations:18)
> | main div.c:44 (predicted:50.6%, cycles:1)
> | |
> | --22.69%--main div.c:42 (cycles:2, iterations:17)
> | compute_flag div.c:28 (cycles:2)
> | |
> | --10.52%--compute_flag div.c:27 (cycles:1)
> | rand rand.c:28 (cycles:1)
> | rand rand.c:28 (cycles:1)
> | __random random.c:298 (cycles:1)
> | __random random.c:297 (cycles:1)
> | __random random.c:295 (cycles:1)
> | __random random.c:295 (cycles:1)
> | __random random.c:295 (cycles:1)
> | __random random.c:295 (cycles:6)
>
> Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
> ---
> tools/perf/ui/stdio/hist.c | 35 +++++++++++++++++++++++++++++++----
> 1 file changed, 31 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
> index 89d8441..668f4ae 100644
> --- a/tools/perf/ui/stdio/hist.c
> +++ b/tools/perf/ui/stdio/hist.c
> @@ -41,7 +41,9 @@ static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_node *node,
> {
> int i;
> size_t ret = 0;
> - char bf[1024];
> + char bf[1024], *alloc_str = NULL;
> + char buf[64];
> + const char *str;
>
> ret += callchain__fprintf_left_margin(fp, left_margin);
> for (i = 0; i < depth; i++) {
> @@ -56,8 +58,26 @@ static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_node *node,
> } else
> ret += fprintf(fp, "%s", " ");
> }
> - fputs(callchain_list__sym_name(chain, bf, sizeof(bf), false), fp);
> +
> + str = callchain_list__sym_name(chain, bf, sizeof(bf), false);
> +
> + if (symbol_conf.show_branchflag_count) {
> + if (!period)
> + callchain_list_counts__printf_value(node, chain, NULL,
> + buf, sizeof(buf));
> + else
> + callchain_list_counts__printf_value(NULL, chain, NULL,
> + buf, sizeof(buf));
> +
> + if (asprintf(&alloc_str, "%s%s", str, buf) < 0)
> + str = "Not enough memory!";
> + else
> + str = alloc_str;
> + }
> +
> + fputs(str, fp);
q> fputc('\n', fp);
> + free(alloc_str);
> return ret;
> }
>
> @@ -219,8 +239,15 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
> } else
> ret += callchain__fprintf_left_margin(fp, left_margin);
>
> - ret += fprintf(fp, "%s\n", callchain_list__sym_name(chain, bf, sizeof(bf),
> - false));
> + ret += fprintf(fp, "%s",
> + callchain_list__sym_name(chain, bf,
> + sizeof(bf),
> + false));
> +
> + if (symbol_conf.show_branchflag_count)
> + ret += callchain_list_counts__printf_value(
> + NULL, chain, fp, NULL, 0);
> + ret += fprintf(fp, "\n");
>
> if (++entries_printed == callchain_param.print_limit)
> break;
> --
> 2.7.4
^ permalink raw reply
* [Qemu-devel] [Bug 1563152] Re: general protection fault running VirtualBox in KVM guest
From: Launchpad Bug Tracker @ 2016-11-14 16:20 UTC (permalink / raw)
To: qemu-devel
In-Reply-To: <20160329015831.30307.69405.malonedeb@gac.canonical.com>
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: qemu (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1563152
Title:
general protection fault running VirtualBox in KVM guest
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Bug description:
I'm trying to run nested VMs using qemu-kvm on the physical host and VirtualBox on the guest host:
* physical host: Ubuntu 14.04 running Linux 4.2.0, qemu-kvm 2.0.0
* guest host: Ubuntu 16.04 beta 2 running Linux 4.4.0, VirtualBox 5.0.16
When I try to start up a VirtualBox VM in the guest host, I get a
general protection fault (see below for dmesg output). According to
https://www.virtualbox.org/ticket/14965 this is caused by a bug in
QEMU/KVM:
The problem in more detail: As written above, VirtualBox tries to
read the MSR 0x9B (IA32_SMM_MONITOR_CTL). This is an
architectural MSR which is present if CPUID.01 / ECX bit 5 or bit
6 are set (VMX or SMX). As KVM has nested virtualization enabled
and therefore pretends to support VT-x, this MSR must be
accessible and reading from this MSR must not raise a
#GP. KVM/QEmu does not behave like real hardware in this case.
dmesg output:
SUPR0GipMap: fGetGipCpu=0x3
general protection fault: 0000 [#1] SMP
Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack xt_tcpudp bridge stp llc iptable_filter ip_tables x_tables ppdev kvm_intel kvm irqbypass snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer i2c_piix4 snd input_leds soundcore joydev 8250_fintek mac_hid serio_raw pvpanic parport_pc parport ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul qxl ttm drm_kms_helper syscopyarea sysfillrect aesni_intel sysimgblt fb_sys_fops aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd psmouse floppy drm pata_acpi
CPU: 0 PID: 31507 Comm: EMT Tainted: G OE 4.4.0-15-generic #31-Ubuntu
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
task: ffff880034c0a580 ti: ffff880002e00000 task.ti: ffff880002e00000
RIP: 0010:[<ffffffffc067e506>] [<ffffffffc067e506>] 0xffffffffc067e506
RSP: 0018:ffff880002e03d70 EFLAGS: 00010206
RAX: 00000000000006f0 RBX: 00000000ffffffdb RCX: 000000000000009b
RDX: 0000000000000000 RSI: ffff880002e03d00 RDI: ffff880002e03cc8
RBP: ffff880002e03d90 R08: 0000000000000004 R09: 00000000000006f0
R10: 0000000049656e69 R11: 000000000f8bfbff R12: 0000000000000020
R13: 0000000000000000 R14: ffffc9000057407c R15: ffffffffc0645260
FS: 00007f89b8f6b700(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f89b8d10000 CR3: 0000000035ae1000 CR4: 00000000000006f0
Stack:
0000000000000000 ffffffff00000000 0000000000000000 0000000000000000
ffff880002e03db0 ffffffffc0693e93 ffffc90000574010 ffff880035aae550
ffff880002e03e30 ffffffffc060a3e7 ffff880002e03e10 0000000000000282
Call Trace:
[<ffffffffc060a3e7>] ? supdrvIOCtl+0x2de7/0x3250 [vboxdrv]
[<ffffffffc06035b0>] ? VBoxDrvLinuxIOCtl_5_0_16+0x150/0x250 [vboxdrv]
[<ffffffff8121e7df>] ? do_vfs_ioctl+0x29f/0x490
[<ffffffff8106a554>] ? __do_page_fault+0x1b4/0x400
[<ffffffff8121ea49>] ? SyS_ioctl+0x79/0x90
[<ffffffff81821ff2>] ? entry_SYSCALL_64_fastpath+0x16/0x71
Code: 88 e4 fc ff ff b9 3a 00 00 00 0f 32 48 c1 e2 20 89 c0 48 09 d0 48 89 05 f9 db 0e 00 0f 20 e0 b9 9b 00 00 00 48 89 05 d2 db 0e 00 <0f> 32 48 c1 e2 20 89 c0 b9 80 00 00 c0 48 09 d0 48 89 05 cb db
RIP [<ffffffffc067e506>] 0xffffffffc067e506
RSP <ffff880002e03d70>
---[ end trace b3284b6520f49e0d ]---
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1563152/+subscriptions
^ permalink raw reply
* [RFC 00/12] ath10k sdio support
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
This patch series adds sdio support to ath10k.
Some of the patches affect the existing pcie/ahb code as well.
Those are patches 3 and 4 in the series.
Overview:
A new HIF layer: sdio/mailbox.
The current HIF ops are unaltered even though some ops
are not applicable for sdio.
The HTC layer has only suffered minor modifications:
- A few new functions for handling the mailbox specific
RX trailers (lookahead reports)
- Some minor refactorization of the existing code
(patches 3 and 4)
This is not included in this patch series:
- HTT High latency RX and TX support
- Full integration in core.c
The following basic tests have been made so far:
BMI fw load and firmware startup (all the steps in ath10k_core_start).
This means:
- HTT service connect
- WMI control service connect
- WMI unified init
The above mentioned bullets where verified with a QCA6584 chipset.
I have not been able to test the patch series together with
ath10k pcie hardware, but I will do so as soon as I can get
my hands on some hardware.
The patches have been built and tested against the ath tree:
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
branch/tag: master/ath-201611090123
Erik Stromdahl (12):
ath10k: htc: made static function public
ath10k: htc: rx trailer lookahead support
ath10k: htc: Changed order of wait target and ep connect
ath10k: htc: refactorization
ath10k: htc: Added ATH10K_HTC_FLAG_BUNDLE_LSB
ath10k: bmi: Added SOC reg read/write functions
ath10k: Added SDIO dbg masks
ath10k: Added ATH10K_BUS_SDIO enum
ath10k: Mailbox address definitions
ath10k: Added QCA65XX hw definition
ath10k: Added more host_interest members
ath10k: Added sdio support
drivers/net/wireless/ath/ath10k/Kconfig | 6 +
drivers/net/wireless/ath/ath10k/Makefile | 3 +
drivers/net/wireless/ath/ath10k/bmi.c | 79 +-
drivers/net/wireless/ath/ath10k/bmi.h | 4 +
drivers/net/wireless/ath/ath10k/core.h | 3 +
drivers/net/wireless/ath/ath10k/debug.h | 2 +
drivers/net/wireless/ath/ath10k/htc.c | 208 ++-
drivers/net/wireless/ath/ath10k/htc.h | 36 +-
drivers/net/wireless/ath/ath10k/hw.h | 54 +
drivers/net/wireless/ath/ath10k/sdio.c | 1855 +++++++++++++++++++++++++++
drivers/net/wireless/ath/ath10k/sdio.h | 276 ++++
drivers/net/wireless/ath/ath10k/targaddrs.h | 24 +
12 files changed, 2484 insertions(+), 66 deletions(-)
create mode 100644 drivers/net/wireless/ath/ath10k/sdio.c
create mode 100644 drivers/net/wireless/ath/ath10k/sdio.h
--
1.7.9.5
^ permalink raw reply
* [RFC 01/12] ath10k: htc: made static function public
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Changed ath10k_htc_notify_tx_completion and
ath10k_htc_process_trailer from static to non static.
These functions are needed by SDIO/mbox.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/htc.c | 14 ++++++++------
drivers/net/wireless/ath/ath10k/htc.h | 6 ++++++
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 175aae3..26b1e15 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -57,8 +57,8 @@ static inline void ath10k_htc_restore_tx_skb(struct ath10k_htc *htc,
skb_pull(skb, sizeof(struct ath10k_htc_hdr));
}
-static void ath10k_htc_notify_tx_completion(struct ath10k_htc_ep *ep,
- struct sk_buff *skb)
+void ath10k_htc_notify_tx_completion(struct ath10k_htc_ep *ep,
+ struct sk_buff *skb)
{
struct ath10k *ar = ep->htc->ar;
@@ -75,6 +75,7 @@ static void ath10k_htc_notify_tx_completion(struct ath10k_htc_ep *ep,
ep->ep_ops.ep_tx_complete(ep->htc->ar, skb);
}
+EXPORT_SYMBOL(ath10k_htc_notify_tx_completion);
static void ath10k_htc_prepare_tx_skb(struct ath10k_htc_ep *ep,
struct sk_buff *skb)
@@ -227,10 +228,10 @@ void ath10k_htc_tx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
spin_unlock_bh(&htc->tx_lock);
}
-static int ath10k_htc_process_trailer(struct ath10k_htc *htc,
- u8 *buffer,
- int length,
- enum ath10k_htc_ep_id src_eid)
+int ath10k_htc_process_trailer(struct ath10k_htc *htc,
+ u8 *buffer,
+ int length,
+ enum ath10k_htc_ep_id src_eid)
{
struct ath10k *ar = htc->ar;
int status = 0;
@@ -291,6 +292,7 @@ static int ath10k_htc_process_trailer(struct ath10k_htc *htc,
return status;
}
+EXPORT_SYMBOL(ath10k_htc_process_trailer);
void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
{
diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
index 0c55cd9..858e19f 100644
--- a/drivers/net/wireless/ath/ath10k/htc.h
+++ b/drivers/net/wireless/ath/ath10k/htc.h
@@ -354,5 +354,11 @@ int ath10k_htc_send(struct ath10k_htc *htc, enum ath10k_htc_ep_id eid,
struct sk_buff *ath10k_htc_alloc_skb(struct ath10k *ar, int size);
void ath10k_htc_tx_completion_handler(struct ath10k *ar, struct sk_buff *skb);
void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb);
+void ath10k_htc_notify_tx_completion(struct ath10k_htc_ep *ep,
+ struct sk_buff *skb);
+int ath10k_htc_process_trailer(struct ath10k_htc *htc,
+ u8 *buffer,
+ int length,
+ enum ath10k_htc_ep_id src_eid);
#endif
--
1.7.9.5
^ permalink raw reply related
* [RFC 02/12] ath10k: htc: rx trailer lookahead support
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
The RX trailer parsing is now capable of parsing lookahead reports.
This is needed by SDIO/mbox.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/htc.c | 91 ++++++++++++++++++++++++++++++++-
drivers/net/wireless/ath/ath10k/htc.h | 30 +++++++++--
2 files changed, 116 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 26b1e15..e3f7bf4 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -228,10 +228,74 @@ void ath10k_htc_tx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
spin_unlock_bh(&htc->tx_lock);
}
+static int
+ath10k_htc_process_lookahead(struct ath10k_htc *htc,
+ const struct ath10k_htc_lookahead_report *report,
+ int len,
+ enum ath10k_htc_ep_id eid,
+ u32 *next_lk_ahds,
+ int *next_lk_ahds_len)
+{
+ struct ath10k *ar = htc->ar;
+
+ if (report->pre_valid != ((~report->post_valid) & 0xFF))
+ /* Invalid lookahead flags are actually transmitted by
+ * the target in the HTC control message.
+ * Since this will happen at every boot we silently ignore
+ * the lookahead in this case
+ */
+ return 0;
+
+ if (next_lk_ahds && next_lk_ahds_len) {
+ ath10k_dbg(ar, ATH10K_DBG_HTC,
+ "htc rx lk_ahd found pre_valid 0x%x post_valid 0x%x\n",
+ report->pre_valid, report->post_valid);
+
+ /* look ahead bytes are valid, copy them over */
+ memcpy((u8 *)&next_lk_ahds[0], report->lk_ahd, 4);
+
+ *next_lk_ahds_len = 1;
+ }
+
+ return 0;
+}
+
+static int
+ath10k_htc_process_lookahead_bundle(struct ath10k_htc *htc,
+ const struct ath10k_htc_lookahead_report_bundle *report,
+ int len,
+ enum ath10k_htc_ep_id eid,
+ u32 *next_lk_ahds,
+ int *next_lk_ahds_len)
+{
+ int bundle_cnt = len / sizeof(*report);
+
+ if (!bundle_cnt || (bundle_cnt > HTC_HOST_MAX_MSG_PER_BUNDLE)) {
+ WARN_ON(1);
+ return -EINVAL;
+ }
+
+ if (next_lk_ahds && next_lk_ahds_len) {
+ int i;
+
+ for (i = 0; i < bundle_cnt; i++) {
+ memcpy((u8 *)&next_lk_ahds[i], report->lk_ahd,
+ sizeof(u32));
+ report++;
+ }
+
+ *next_lk_ahds_len = bundle_cnt;
+ }
+
+ return 0;
+}
+
int ath10k_htc_process_trailer(struct ath10k_htc *htc,
u8 *buffer,
int length,
- enum ath10k_htc_ep_id src_eid)
+ enum ath10k_htc_ep_id src_eid,
+ u32 *next_lk_ahds,
+ int *next_lk_ahds_len)
{
struct ath10k *ar = htc->ar;
int status = 0;
@@ -272,6 +336,28 @@ int ath10k_htc_process_trailer(struct ath10k_htc *htc,
record->hdr.len,
src_eid);
break;
+ case ATH10K_HTC_RECORD_LOOKAHEAD:
+ len = sizeof(struct ath10k_htc_lookahead_report);
+ if (record->hdr.len < len) {
+ ath10k_warn(ar, "Lookahead report too long\n");
+ status = -EINVAL;
+ break;
+ }
+ status = ath10k_htc_process_lookahead(htc,
+ record->lkahd_report,
+ record->hdr.len,
+ src_eid,
+ next_lk_ahds,
+ next_lk_ahds_len);
+ break;
+ case ATH10K_HTC_RECORD_LOOKAHEAD_BUNDLE:
+ status = ath10k_htc_process_lookahead_bundle(htc,
+ record->lkahd_bundle,
+ record->hdr.len,
+ src_eid,
+ next_lk_ahds,
+ next_lk_ahds_len);
+ break;
default:
ath10k_warn(ar, "Unhandled record: id:%d length:%d\n",
record->hdr.id, record->hdr.len);
@@ -359,7 +445,8 @@ void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
trailer += payload_len;
trailer -= trailer_len;
status = ath10k_htc_process_trailer(htc, trailer,
- trailer_len, hdr->eid);
+ trailer_len, hdr->eid,
+ NULL, NULL);
if (status)
goto out;
diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
index 858e19f..589800a 100644
--- a/drivers/net/wireless/ath/ath10k/htc.h
+++ b/drivers/net/wireless/ath/ath10k/htc.h
@@ -50,6 +50,8 @@
* 4-byte aligned.
*/
+#define HTC_HOST_MAX_MSG_PER_BUNDLE 8
+
enum ath10k_htc_tx_flags {
ATH10K_HTC_FLAG_NEED_CREDIT_UPDATE = 0x01,
ATH10K_HTC_FLAG_SEND_BUNDLE = 0x02
@@ -174,8 +176,10 @@ struct ath10k_htc_msg {
} __packed __aligned(4);
enum ath10k_ath10k_htc_record_id {
- ATH10K_HTC_RECORD_NULL = 0,
- ATH10K_HTC_RECORD_CREDITS = 1
+ ATH10K_HTC_RECORD_NULL = 0,
+ ATH10K_HTC_RECORD_CREDITS = 1,
+ ATH10K_HTC_RECORD_LOOKAHEAD = 2,
+ ATH10K_HTC_RECORD_LOOKAHEAD_BUNDLE = 3,
};
struct ath10k_ath10k_htc_record_hdr {
@@ -192,10 +196,28 @@ struct ath10k_htc_credit_report {
u8 pad1;
} __packed;
+struct ath10k_htc_lookahead_report {
+ u8 pre_valid;
+ u8 pad0;
+ u8 pad1;
+ u8 pad2;
+ u8 lk_ahd[4];
+ u8 post_valid;
+ u8 pad3;
+ u8 pad4;
+ u8 pad5;
+} __packed;
+
+struct ath10k_htc_lookahead_report_bundle {
+ u8 lk_ahd[4];
+} __packed;
+
struct ath10k_htc_record {
struct ath10k_ath10k_htc_record_hdr hdr;
union {
struct ath10k_htc_credit_report credit_report[0];
+ struct ath10k_htc_lookahead_report lkahd_report[0];
+ struct ath10k_htc_lookahead_report_bundle lkahd_bundle[0];
u8 pauload[0];
};
} __packed __aligned(4);
@@ -359,6 +381,8 @@ void ath10k_htc_notify_tx_completion(struct ath10k_htc_ep *ep,
int ath10k_htc_process_trailer(struct ath10k_htc *htc,
u8 *buffer,
int length,
- enum ath10k_htc_ep_id src_eid);
+ enum ath10k_htc_ep_id src_eid,
+ u32 *next_lk_ahds,
+ int *next_lk_ahds_len);
#endif
--
1.7.9.5
^ permalink raw reply related
* [RFC 03/12] ath10k: htc: Changed order of wait target and ep connect
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
This patch changes the order in which the driver waits for the
target to become ready and the service connect of the HTC
control service.
The HTC control service is connected before the driver starts
waiting for the HTC ready control message.
The reason for this is that the HTC ready control message is
transmitted on EP 0 and that sdio/mbox based systems will ignore
messages received on unconnected endpoints.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/htc.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index e3f7bf4..7257366 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -606,6 +606,22 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc)
u16 credit_count;
u16 credit_size;
+ /* setup our pseudo HTC control endpoint connection */
+ memset(&conn_req, 0, sizeof(conn_req));
+ memset(&conn_resp, 0, sizeof(conn_resp));
+ conn_req.ep_ops.ep_tx_complete = ath10k_htc_control_tx_complete;
+ conn_req.ep_ops.ep_rx_complete = ath10k_htc_control_rx_complete;
+ conn_req.max_send_queue_depth = ATH10K_NUM_CONTROL_TX_BUFFERS;
+ conn_req.service_id = ATH10K_HTC_SVC_ID_RSVD_CTRL;
+
+ /* connect fake service */
+ status = ath10k_htc_connect_service(htc, &conn_req, &conn_resp);
+ if (status) {
+ ath10k_err(ar, "could not connect to htc service (%d)\n",
+ status);
+ return status;
+ }
+
time_left = wait_for_completion_timeout(&htc->ctl_resp,
ATH10K_HTC_WAIT_TIMEOUT_HZ);
if (!time_left) {
@@ -665,22 +681,6 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc)
ath10k_htc_setup_target_buffer_assignments(htc);
- /* setup our pseudo HTC control endpoint connection */
- memset(&conn_req, 0, sizeof(conn_req));
- memset(&conn_resp, 0, sizeof(conn_resp));
- conn_req.ep_ops.ep_tx_complete = ath10k_htc_control_tx_complete;
- conn_req.ep_ops.ep_rx_complete = ath10k_htc_control_rx_complete;
- conn_req.max_send_queue_depth = ATH10K_NUM_CONTROL_TX_BUFFERS;
- conn_req.service_id = ATH10K_HTC_SVC_ID_RSVD_CTRL;
-
- /* connect fake service */
- status = ath10k_htc_connect_service(htc, &conn_req, &conn_resp);
- if (status) {
- ath10k_err(ar, "could not connect to htc service (%d)\n",
- status);
- return status;
- }
-
return 0;
}
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 1/3] drm/i915: Fix cdclk vs. dev_cdclk mess when not recomputing things
From: ville.syrjala @ 2016-11-14 16:35 UTC (permalink / raw)
To: intel-gfx; +Cc: bruno.pagani, Daniel J Blueman, Paul Bolle, stable, Joseph Yasi
In-Reply-To: <1479141311-11904-1-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
When we end up not recomputing the cdclk, we need to populate
intel_state->cdclk with the "atomic_cdclk_freq" instead of the
current cdclk_freq. When no pipes are active, the actual cdclk_freq
may be lower than what the configuration of the planes and
pipes would require from the point of view of the software state.
This fixes bogus WARNS from skl_max_scale() which is trying to check
the plane software state against the cdclk frequency. So any time
it got called during DPMS off for instance, we might have tripped
the warn if the current mode would have required a higher than
minimum cdclk.
v2: Drop the dev_cdclk stuff (Maarten)
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: bruno.pagani@ens-lyon.org
Cc: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Joseph Yasi <joe.yasi@gmail.com>
Tested-by: Paul Bolle <pebolle@tiscali.nl> (v1)
Tested-by: Joseph Yasi <joe.yasi@gmail.com> (v1)
Cc: stable@vger.kernel.org
Fixes: 1a617b77658e ("drm/i915: Keep track of the cdclk as if all crtc's were active.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98214
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e48d9571c99d..70f3f0b70263 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14027,8 +14027,9 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
DRM_DEBUG_KMS("New cdclk calculated to be atomic %u, actual %u\n",
intel_state->cdclk, intel_state->dev_cdclk);
- } else
+ } else {
to_intel_atomic_state(state)->cdclk = dev_priv->atomic_cdclk_freq;
+ }
intel_modeset_clear_plls(state);
@@ -14129,8 +14130,9 @@ static int intel_atomic_check(struct drm_device *dev,
if (ret)
return ret;
- } else
- intel_state->cdclk = dev_priv->cdclk_freq;
+ } else {
+ intel_state->cdclk = dev_priv->atomic_cdclk_freq;
+ }
ret = drm_atomic_helper_check_planes(dev, state);
if (ret)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related
* [PATCH 2/3] drm/i915: Protect dev_priv->atomic_cdclk_freq with all the crtc locks
From: ville.syrjala @ 2016-11-14 16:35 UTC (permalink / raw)
To: intel-gfx
In-Reply-To: <1479141311-11904-1-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
A modeset on one pipe can update dev_priv->atomic_cdclk_freq without
actually touching the hardware, in which case we won't force a modeset
on all the pipes, and thus won't lock any of the other pipes either.
That means a parallel plane update on another pipe could be looking at
a stale dev_priv->atomic_cdcdlk_freq and thus fail to notice when the
plane configuration is invalid, or potentially reject a valid update.
To overcome this we must protect writes to atomic_cdclk_freq with
all the crtc locks, and thus for reads any single crtc lock will
be sufficient protection.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 9 +++++++-
drivers/gpu/drm/i915/intel_display.c | 41 +++++++++++++++++++++++++++++++-----
2 files changed, 44 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index c0f1dfc7119e..66d2950dc657 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1874,7 +1874,14 @@ struct drm_i915_private {
unsigned int fsb_freq, mem_freq, is_ddr3;
unsigned int skl_preferred_vco_freq;
- unsigned int cdclk_freq, max_cdclk_freq, atomic_cdclk_freq;
+ unsigned int cdclk_freq, max_cdclk_freq;
+
+ /*
+ * For reading holding any crtc lock is sufficient,
+ * for writing must hold all of them.
+ */
+ unsigned int atomic_cdclk_freq;
+
unsigned int max_dotclk_freq;
unsigned int rawclk_freq;
unsigned int hpll_freq;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 70f3f0b70263..d7a4bc63b05b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13946,13 +13946,32 @@ static int haswell_mode_set_planes_workaround(struct drm_atomic_state *state)
return 0;
}
+static int intel_lock_all_pipes(struct drm_atomic_state *state)
+{
+ struct drm_crtc *crtc;
+
+ /* Add all pipes to the state */
+ for_each_crtc(state->dev, crtc) {
+ struct drm_crtc_state *crtc_state;
+
+ crtc_state = drm_atomic_get_crtc_state(state, crtc);
+ if (IS_ERR(crtc_state))
+ return PTR_ERR(crtc_state);
+ }
+
+ return 0;
+}
+
static int intel_modeset_all_pipes(struct drm_atomic_state *state)
{
struct drm_crtc *crtc;
struct drm_crtc_state *crtc_state;
int ret = 0;
- /* add all active pipes to the state */
+ /*
+ * Add all pipes to the state, and force
+ * a modeset on all the active ones.
+ */
for_each_crtc(state->dev, crtc) {
crtc_state = drm_atomic_get_crtc_state(state, crtc);
if (IS_ERR(crtc_state))
@@ -14018,12 +14037,24 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
if (ret < 0)
return ret;
+ /*
+ * Writes to dev_priv->atomic_cdclk_freq must protected by
+ * holding all the crtc locks, even if we don't end up
+ * touching the hardware
+ */
+ if (intel_state->cdclk != dev_priv->atomic_cdclk_freq) {
+ ret = intel_lock_all_pipes(state);
+ if (ret < 0)
+ return ret;
+ }
+
+ /* All pipes must be switched off while we change the cdclk. */
if (intel_state->dev_cdclk != dev_priv->cdclk_freq ||
- intel_state->cdclk_pll_vco != dev_priv->cdclk_pll.vco)
+ intel_state->cdclk_pll_vco != dev_priv->cdclk_pll.vco) {
ret = intel_modeset_all_pipes(state);
-
- if (ret < 0)
- return ret;
+ if (ret < 0)
+ return ret;
+ }
DRM_DEBUG_KMS("New cdclk calculated to be atomic %u, actual %u\n",
intel_state->cdclk, intel_state->dev_cdclk);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related
* [PATCH v2 1/3] drm/i915: Fix cdclk vs. dev_cdclk mess when not recomputing things
From: ville.syrjala @ 2016-11-14 16:35 UTC (permalink / raw)
To: intel-gfx
Cc: Maarten Lankhorst, Mika Kahola, bruno.pagani, Daniel J Blueman,
Paul Bolle, Joseph Yasi, stable
In-Reply-To: <1479141311-11904-1-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
When we end up not recomputing the cdclk, we need to populate
intel_state->cdclk with the "atomic_cdclk_freq" instead of the
current cdclk_freq. When no pipes are active, the actual cdclk_freq
may be lower than what the configuration of the planes and
pipes would require from the point of view of the software state.
This fixes bogus WARNS from skl_max_scale() which is trying to check
the plane software state against the cdclk frequency. So any time
it got called during DPMS off for instance, we might have tripped
the warn if the current mode would have required a higher than
minimum cdclk.
v2: Drop the dev_cdclk stuff (Maarten)
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: bruno.pagani@ens-lyon.org
Cc: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Joseph Yasi <joe.yasi@gmail.com>
Tested-by: Paul Bolle <pebolle@tiscali.nl> (v1)
Tested-by: Joseph Yasi <joe.yasi@gmail.com> (v1)
Cc: stable@vger.kernel.org
Fixes: 1a617b77658e ("drm/i915: Keep track of the cdclk as if all crtc's were active.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98214
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e48d9571c99d..70f3f0b70263 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14027,8 +14027,9 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
DRM_DEBUG_KMS("New cdclk calculated to be atomic %u, actual %u\n",
intel_state->cdclk, intel_state->dev_cdclk);
- } else
+ } else {
to_intel_atomic_state(state)->cdclk = dev_priv->atomic_cdclk_freq;
+ }
intel_modeset_clear_plls(state);
@@ -14129,8 +14130,9 @@ static int intel_atomic_check(struct drm_device *dev,
if (ret)
return ret;
- } else
- intel_state->cdclk = dev_priv->cdclk_freq;
+ } else {
+ intel_state->cdclk = dev_priv->atomic_cdclk_freq;
+ }
ret = drm_atomic_helper_check_planes(dev, state);
if (ret)
--
2.7.4
^ permalink raw reply related
* [RFC 05/12] ath10k: htc: Added ATH10K_HTC_FLAG_BUNDLE_LSB
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/htc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
index 589800a..df16a04 100644
--- a/drivers/net/wireless/ath/ath10k/htc.h
+++ b/drivers/net/wireless/ath/ath10k/htc.h
@@ -62,6 +62,8 @@ enum ath10k_htc_rx_flags {
ATH10K_HTC_FLAG_BUNDLE_MASK = 0xF0
};
+#define ATH10K_HTC_FLAG_BUNDLE_LSB 4
+
struct ath10k_htc_hdr {
u8 eid; /* @enum ath10k_htc_ep_id */
u8 flags; /* @enum ath10k_htc_tx_flags, ath10k_htc_rx_flags */
--
1.7.9.5
^ permalink raw reply related
* [RFC 06/12] ath10k: bmi: Added SOC reg read/write functions
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Added functions implementing the following BMI commands:
BMI_READ_SOC_REGISTER
BMI_WRITE_SOC_REGISTER
Reading and writing BMI registers is sometimes needed for
SDIO chipsets.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/bmi.c | 79 ++++++++++++++++++++++++++++++++-
drivers/net/wireless/ath/ath10k/bmi.h | 4 ++
2 files changed, 81 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/bmi.c b/drivers/net/wireless/ath/ath10k/bmi.c
index 2872d34..1c378a2 100644
--- a/drivers/net/wireless/ath/ath10k/bmi.c
+++ b/drivers/net/wireless/ath/ath10k/bmi.c
@@ -97,7 +97,8 @@ int ath10k_bmi_read_memory(struct ath10k *ar,
u32 rxlen;
int ret;
- ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi read address 0x%x length %d\n",
+ ath10k_dbg(ar, ATH10K_DBG_BMI,
+ "bmi read memory address 0x%x length %d\n",
address, length);
if (ar->bmi.done_sent) {
@@ -137,7 +138,8 @@ int ath10k_bmi_write_memory(struct ath10k *ar,
u32 txlen;
int ret;
- ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi write address 0x%x length %d\n",
+ ath10k_dbg(ar, ATH10K_DBG_BMI,
+ "bmi write memory address 0x%x length %d\n",
address, length);
if (ar->bmi.done_sent) {
@@ -175,6 +177,79 @@ int ath10k_bmi_write_memory(struct ath10k *ar,
return 0;
}
+int ath10k_bmi_read_soc_reg(struct ath10k *ar,
+ u32 address, u32 *regval)
+{
+ struct bmi_cmd cmd;
+ union bmi_resp resp;
+ u32 cmdlen = sizeof(cmd.id) + sizeof(cmd.read_soc_reg);
+ u32 rxlen;
+ int ret;
+
+ ath10k_dbg(ar, ATH10K_DBG_BMI,
+ "bmi read SOC register address 0x%x\n",
+ address);
+
+ if (ar->bmi.done_sent) {
+ ath10k_warn(ar, "command disallowed\n");
+ return -EBUSY;
+ }
+
+ rxlen = sizeof(resp.read_soc_reg.value);
+
+ cmd.id = __cpu_to_le32(BMI_READ_SOC_REGISTER);
+ cmd.read_soc_reg.addr = __cpu_to_le32(address);
+
+ ret = ath10k_hif_exchange_bmi_msg(ar, &cmd, cmdlen,
+ &resp, &rxlen);
+ if (ret) {
+ ath10k_warn(ar, "unable to read from the device (%d)\n",
+ ret);
+ return ret;
+ }
+
+ if (rxlen != sizeof(resp.read_soc_reg.value)) {
+ ath10k_warn(ar, "Unexpected read len: %u (expected %u)\n",
+ rxlen, sizeof(resp.read_soc_reg.value));
+ return ret;
+ }
+
+ *regval = __le32_to_cpu(resp.read_soc_reg.value);
+
+ return 0;
+}
+
+int ath10k_bmi_write_soc_reg(struct ath10k *ar,
+ u32 address, u32 regval)
+{
+ struct bmi_cmd cmd;
+ u32 cmdlen = sizeof(cmd.id) + sizeof(cmd.write_soc_reg);
+ int ret;
+
+ ath10k_dbg(ar, ATH10K_DBG_BMI,
+ "bmi write SOC register address 0x%x\n",
+ address);
+
+ if (ar->bmi.done_sent) {
+ ath10k_warn(ar, "command disallowed\n");
+ return -EBUSY;
+ }
+
+ cmd.id = __cpu_to_le32(BMI_WRITE_SOC_REGISTER);
+ cmd.write_soc_reg.addr = __cpu_to_le32(address);
+ cmd.write_soc_reg.value = __cpu_to_le32(regval);
+
+ ret = ath10k_hif_exchange_bmi_msg(ar, &cmd, cmdlen,
+ NULL, NULL);
+ if (ret) {
+ ath10k_warn(ar, "unable to write to the device (%d)\n",
+ ret);
+ return ret;
+ }
+
+ return 0;
+}
+
int ath10k_bmi_execute(struct ath10k *ar, u32 address, u32 param, u32 *result)
{
struct bmi_cmd cmd;
diff --git a/drivers/net/wireless/ath/ath10k/bmi.h b/drivers/net/wireless/ath/ath10k/bmi.h
index 7d3231a..a867867 100644
--- a/drivers/net/wireless/ath/ath10k/bmi.h
+++ b/drivers/net/wireless/ath/ath10k/bmi.h
@@ -201,6 +201,10 @@ int ath10k_bmi_read_memory(struct ath10k *ar, u32 address,
void *buffer, u32 length);
int ath10k_bmi_write_memory(struct ath10k *ar, u32 address,
const void *buffer, u32 length);
+int ath10k_bmi_read_soc_reg(struct ath10k *ar,
+ u32 address, u32 *regval);
+int ath10k_bmi_write_soc_reg(struct ath10k *ar,
+ u32 address, u32 regval);
#define ath10k_bmi_read32(ar, item, val) \
({ \
--
1.7.9.5
^ permalink raw reply related
* [RFC 07/12] ath10k: Added SDIO dbg masks
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Debug masks for SDIO HIF layer.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/debug.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
index 335512b..d35263c 100644
--- a/drivers/net/wireless/ath/ath10k/debug.h
+++ b/drivers/net/wireless/ath/ath10k/debug.h
@@ -38,6 +38,8 @@ enum ath10k_debug_mask {
ATH10K_DBG_WMI_PRINT = 0x00002000,
ATH10K_DBG_PCI_PS = 0x00004000,
ATH10K_DBG_AHB = 0x00008000,
+ ATH10K_DBG_SDIO = 0x00010000,
+ ATH10K_DBG_SDIO_DUMP = 0x00020000,
ATH10K_DBG_ANY = 0xffffffff,
};
--
1.7.9.5
^ permalink raw reply related
* [RFC 09/12] ath10k: Mailbox address definitions
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Address definitions for SDIO/mbox based chipsets.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/hw.h | 53 ++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 883547f..46142e9 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -814,6 +814,59 @@ struct ath10k_hw_ops {
#define QCA9887_EEPROM_ADDR_LO_MASK 0x00ff0000
#define QCA9887_EEPROM_ADDR_LO_LSB 16
+#define MBOX_RESET_CONTROL_ADDRESS 0x00000000
+#define MBOX_HOST_INT_STATUS_ADDRESS 0x00000800
+#define MBOX_HOST_INT_STATUS_ERROR_LSB 7
+#define MBOX_HOST_INT_STATUS_ERROR_MASK 0x00000080
+#define MBOX_HOST_INT_STATUS_CPU_LSB 6
+#define MBOX_HOST_INT_STATUS_CPU_MASK 0x00000040
+#define MBOX_HOST_INT_STATUS_COUNTER_LSB 4
+#define MBOX_HOST_INT_STATUS_COUNTER_MASK 0x00000010
+#define MBOX_CPU_INT_STATUS_ADDRESS 0x00000801
+#define MBOX_ERROR_INT_STATUS_ADDRESS 0x00000802
+#define MBOX_ERROR_INT_STATUS_WAKEUP_LSB 2
+#define MBOX_ERROR_INT_STATUS_WAKEUP_MASK 0x00000004
+#define MBOX_ERROR_INT_STATUS_RX_UNDERFLOW_LSB 1
+#define MBOX_ERROR_INT_STATUS_RX_UNDERFLOW_MASK 0x00000002
+#define MBOX_ERROR_INT_STATUS_TX_OVERFLOW_LSB 0
+#define MBOX_ERROR_INT_STATUS_TX_OVERFLOW_MASK 0x00000001
+#define MBOX_COUNTER_INT_STATUS_ADDRESS 0x00000803
+#define MBOX_COUNTER_INT_STATUS_COUNTER_LSB 0
+#define MBOX_COUNTER_INT_STATUS_COUNTER_MASK 0x000000ff
+#define MBOX_RX_LOOKAHEAD_VALID_ADDRESS 0x00000805
+#define MBOX_INT_STATUS_ENABLE_ADDRESS 0x00000828
+#define MBOX_INT_STATUS_ENABLE_ERROR_LSB 7
+#define MBOX_INT_STATUS_ENABLE_ERROR_MASK 0x00000080
+#define MBOX_INT_STATUS_ENABLE_CPU_LSB 6
+#define MBOX_INT_STATUS_ENABLE_CPU_MASK 0x00000040
+#define MBOX_INT_STATUS_ENABLE_INT_LSB 5
+#define MBOX_INT_STATUS_ENABLE_INT_MASK 0x00000020
+#define MBOX_INT_STATUS_ENABLE_COUNTER_LSB 4
+#define MBOX_INT_STATUS_ENABLE_COUNTER_MASK 0x00000010
+#define MBOX_INT_STATUS_ENABLE_MBOX_DATA_LSB 0
+#define MBOX_INT_STATUS_ENABLE_MBOX_DATA_MASK 0x0000000f
+#define MBOX_CPU_INT_STATUS_ENABLE_ADDRESS 0x00000819
+#define MBOX_CPU_INT_STATUS_ENABLE_BIT_LSB 0
+#define MBOX_CPU_INT_STATUS_ENABLE_BIT_MASK 0x000000ff
+#define MBOX_ERROR_STATUS_ENABLE_ADDRESS 0x0000081a
+#define MBOX_ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB 1
+#define MBOX_ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK 0x00000002
+#define MBOX_ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB 0
+#define MBOX_ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK 0x00000001
+#define MBOX_COUNTER_INT_STATUS_ENABLE_ADDRESS 0x0000081b
+#define MBOX_COUNTER_INT_STATUS_ENABLE_BIT_LSB 0
+#define MBOX_COUNTER_INT_STATUS_ENABLE_BIT_MASK 0x000000ff
+#define MBOX_COUNT_ADDRESS 0x00000820
+#define MBOX_COUNT_DEC_ADDRESS 0x00000840
+#define MBOX_WINDOW_DATA_ADDRESS 0x00000874
+#define MBOX_WINDOW_WRITE_ADDR_ADDRESS 0x00000878
+#define MBOX_WINDOW_READ_ADDR_ADDRESS 0x0000087c
+#define MBOX_CPU_DBG_SEL_ADDRESS 0x00000883
+#define MBOX_CPU_DBG_ADDRESS 0x00000884
+#define MBOX_RTC_BASE_ADDRESS 0x00000000
+#define MBOX_GPIO_BASE_ADDRESS 0x00005000
+#define MBOX_MBOX_BASE_ADDRESS 0x00008000
+
#define RTC_STATE_V_GET(x) (((x) & RTC_STATE_V_MASK) >> RTC_STATE_V_LSB)
/* Register definitions for first generation ath10k cards. These cards include
--
1.7.9.5
^ permalink raw reply related
* [RFC 10/12] ath10k: Added QCA65XX hw definition
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/hw.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 46142e9..ef45ecf 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -224,6 +224,7 @@ enum ath10k_hw_rev {
ATH10K_HW_QCA9377,
ATH10K_HW_QCA4019,
ATH10K_HW_QCA9887,
+ ATH10K_HW_QCA65XX,
};
struct ath10k_hw_regs {
--
1.7.9.5
^ permalink raw reply related
* [PATCH 3/3] drm/i915: Simplify error handling in intel_modeset_all_pipes()
From: ville.syrjala @ 2016-11-14 16:35 UTC (permalink / raw)
To: intel-gfx
In-Reply-To: <1479141311-11904-1-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
No need for the extra break statements and whatnot, just return the
error directly. And tighten the scope of the local variables while at
it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d7a4bc63b05b..b158af6d89b3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13965,14 +13965,15 @@ static int intel_lock_all_pipes(struct drm_atomic_state *state)
static int intel_modeset_all_pipes(struct drm_atomic_state *state)
{
struct drm_crtc *crtc;
- struct drm_crtc_state *crtc_state;
- int ret = 0;
/*
* Add all pipes to the state, and force
* a modeset on all the active ones.
*/
for_each_crtc(state->dev, crtc) {
+ struct drm_crtc_state *crtc_state;
+ int ret;
+
crtc_state = drm_atomic_get_crtc_state(state, crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -13984,14 +13985,14 @@ static int intel_modeset_all_pipes(struct drm_atomic_state *state)
ret = drm_atomic_add_affected_connectors(state, crtc);
if (ret)
- break;
+ return ret;
ret = drm_atomic_add_affected_planes(state, crtc);
if (ret)
- break;
+ return ret;
}
- return ret;
+ return 0;
}
static int intel_modeset_checks(struct drm_atomic_state *state)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related
* [RFC 08/12] ath10k: Added ATH10K_BUS_SDIO enum
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/core.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index b7067cc..8c7b080 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -74,6 +74,7 @@
enum ath10k_bus {
ATH10K_BUS_PCI,
ATH10K_BUS_AHB,
+ ATH10K_BUS_SDIO,
};
static inline const char *ath10k_bus_str(enum ath10k_bus bus)
@@ -83,6 +84,8 @@ static inline const char *ath10k_bus_str(enum ath10k_bus bus)
return "pci";
case ATH10K_BUS_AHB:
return "ahb";
+ case ATH10K_BUS_SDIO:
+ return "sdio";
}
return "unknown";
--
1.7.9.5
^ permalink raw reply related
* [RFC 12/12] ath10k: Added sdio support
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Initial HIF sdio/mailbox implementation.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/Kconfig | 6 +
drivers/net/wireless/ath/ath10k/Makefile | 3 +
drivers/net/wireless/ath/ath10k/sdio.c | 1855 ++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath10k/sdio.h | 276 +++++
4 files changed, 2140 insertions(+)
create mode 100644 drivers/net/wireless/ath/ath10k/sdio.c
create mode 100644 drivers/net/wireless/ath/ath10k/sdio.h
diff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig
index db1ca62..9a03178 100644
--- a/drivers/net/wireless/ath/ath10k/Kconfig
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
@@ -21,6 +21,12 @@ config ATH10K_AHB
---help---
This module adds support for AHB bus
+config ATH10K_SDIO
+ tristate "Atheros ath10k SDIO support (EXPERIMENTAL)"
+ depends on ATH10K && MMC
+ ---help---
+ This module adds support for SDIO/MMC bus
+
config ATH10K_DEBUG
bool "Atheros ath10k debugging"
depends on ATH10K
diff --git a/drivers/net/wireless/ath/ath10k/Makefile b/drivers/net/wireless/ath/ath10k/Makefile
index 930fadd..b0b19a7 100644
--- a/drivers/net/wireless/ath/ath10k/Makefile
+++ b/drivers/net/wireless/ath/ath10k/Makefile
@@ -27,5 +27,8 @@ ath10k_pci-y += pci.o \
ath10k_pci-$(CONFIG_ATH10K_AHB) += ahb.o
+obj-$(CONFIG_ATH10K_SDIO) += ath10k_sdio.o
+ath10k_sdio-y += sdio.o
+
# for tracing framework to find trace.h
CFLAGS_trace.o := -I$(src)
diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
new file mode 100644
index 0000000..72b0732
--- /dev/null
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -0,0 +1,1855 @@
+/*
+ * Copyright (c) 2004-2011 Atheros Communications Inc.
+ * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
+ * Copyright (c) 2016 Kapsch Trafficcom AB
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <linux/module.h>
+#include <linux/mmc/card.h>
+#include <linux/mmc/mmc.h>
+#include <linux/mmc/host.h>
+#include <linux/mmc/sdio_func.h>
+#include <linux/mmc/sdio_ids.h>
+#include <linux/mmc/sdio.h>
+#include <linux/mmc/sd.h>
+#include "core.h"
+#include "bmi.h"
+#include "debug.h"
+#include "hif.h"
+#include "htc.h"
+#include "targaddrs.h"
+#include "trace.h"
+#include "sdio.h"
+
+#define CALC_TXRX_PADDED_LEN(ar_sdio, len) \
+ (__ALIGN_MASK((len), (ar_sdio)->mbox_info.block_mask))
+
+static int ath10k_sdio_read_write_sync(struct ath10k *ar, u32 addr, u8 *buf,
+ u32 len, u32 request);
+static int ath10k_sdio_hif_diag_read(struct ath10k *ar, u32 address, void *buf,
+ size_t buf_len);
+static int ath10k_sdio_hif_diag_read32(struct ath10k *ar, u32 address,
+ u32 *value);
+
+/* HIF mbox interrupt handling */
+
+static int ath10k_sdio_mbox_rx_process_packet(struct ath10k_sdio *ar_sdio,
+ struct ath10k_sdio_rx_data *pkt,
+ u32 *next_lkahds, int *n_lkahds)
+{
+ int status = 0;
+ struct ath10k_htc *htc = &ar_sdio->ar->htc;
+ struct sk_buff *skb = pkt->skb;
+ struct ath10k_htc_hdr *htc_hdr = (struct ath10k_htc_hdr *)skb->data;
+ bool trailer_present = htc_hdr->flags & ATH10K_HTC_FLAG_TRAILER_PRESENT;
+ u16 payload_len;
+
+ payload_len = le16_to_cpu(htc_hdr->len);
+
+ if (trailer_present) {
+ u8 *trailer;
+ enum ath10k_htc_ep_id eid;
+
+ trailer = skb->data + sizeof(struct ath10k_htc_hdr) +
+ payload_len - htc_hdr->trailer_len;
+
+ eid = (enum ath10k_htc_ep_id)htc_hdr->eid;
+
+ status = ath10k_htc_process_trailer(htc,
+ trailer,
+ htc_hdr->trailer_len,
+ eid,
+ next_lkahds,
+ n_lkahds);
+ if (status)
+ goto err;
+
+ skb_pull(skb, sizeof(*htc_hdr));
+ skb_trim(skb, skb->len - htc_hdr->trailer_len);
+ }
+
+err:
+ return status;
+}
+
+static inline void ath10k_sdio_mbox_free_rx_pkt(struct ath10k_sdio_rx_data *pkt)
+{
+ dev_kfree_skb(pkt->skb);
+ pkt->skb = NULL;
+ pkt->alloc_len = 0;
+ pkt->act_len = 0;
+}
+
+static inline int ath10k_sdio_mbox_alloc_rx_pkt(struct ath10k_sdio_rx_data *pkt,
+ size_t act_len, size_t full_len,
+ bool part_of_bundle,
+ bool last_in_bundle)
+{
+ pkt->skb = dev_alloc_skb(full_len);
+ if (!pkt->skb)
+ return -ENOMEM;
+
+ pkt->act_len = act_len;
+ pkt->alloc_len = full_len;
+ pkt->part_of_bundle = part_of_bundle;
+ pkt->last_in_bundle = last_in_bundle;
+
+ return 0;
+}
+
+static int ath10k_sdio_mbox_rx_process_packets(struct ath10k_sdio *ar_sdio,
+ u32 lk_ahds[],
+ int *n_lk_ahd)
+{
+ struct ath10k *ar = ar_sdio->ar;
+ struct ath10k_htc *htc = &ar->htc;
+ struct ath10k_sdio_rx_data *pkt;
+ int status = 0, i;
+
+ for (i = 0; i < ar_sdio->n_rx_pkts; i++) {
+ struct ath10k_htc_ep *ep;
+ enum ath10k_htc_ep_id id;
+ u32 *lk_ahds_local = lk_ahds;
+ int *n_lk_ahd_local = n_lk_ahd;
+
+ id = ((struct ath10k_htc_hdr *)&lk_ahds[i])->eid;
+
+ if (id >= ATH10K_HTC_EP_COUNT) {
+ ath10k_err(ar, "Invalid endpoint in look-ahead: %d\n",
+ id);
+ status = -ENOMEM;
+ goto out;
+ }
+
+ ep = &htc->endpoint[id];
+
+ if (ep->service_id == 0) {
+ ath10k_err(ar, "ep %d is not connected !\n", id);
+ status = -ENOMEM;
+ goto out;
+ }
+
+ pkt = &ar_sdio->rx_pkts[i];
+
+ if (pkt->part_of_bundle && !pkt->last_in_bundle) {
+ /* Only read lookahead's from RX trailers
+ * for the last packet in a bundle.
+ */
+ lk_ahds_local = NULL;
+ n_lk_ahd_local = NULL;
+ }
+
+ status = ath10k_sdio_mbox_rx_process_packet(ar_sdio,
+ pkt,
+ lk_ahds_local,
+ n_lk_ahd_local);
+ if (status)
+ goto out;
+
+ ep->ep_ops.ep_rx_complete(ar_sdio->ar, pkt->skb);
+ /* The RX complete handler now owns the skb...*/
+ pkt->skb = NULL;
+ pkt->alloc_len = 0;
+ }
+
+out:
+ /* Free all packets that was not passed on to the RX completion
+ * handler...
+ */
+ for (; i < ar_sdio->n_rx_pkts; i++)
+ ath10k_sdio_mbox_free_rx_pkt(&ar_sdio->rx_pkts[i]);
+
+ return status;
+}
+
+static int alloc_pkt_bundle(struct ath10k *ar,
+ struct ath10k_sdio_rx_data *rx_pkts,
+ struct ath10k_htc_hdr *htc_hdr,
+ size_t full_len, size_t act_len, size_t *bndl_cnt)
+{
+ int i, status = 0;
+
+ *bndl_cnt = (htc_hdr->flags & ATH10K_HTC_FLAG_BUNDLE_MASK) >>
+ ATH10K_HTC_FLAG_BUNDLE_LSB;
+
+ if (*bndl_cnt > HTC_HOST_MAX_MSG_PER_BUNDLE) {
+ ath10k_err(ar,
+ "HTC bundle len %u exceeds maximum %u !\n",
+ le16_to_cpu(htc_hdr->len),
+ HTC_HOST_MAX_MSG_PER_BUNDLE);
+ status = -ENOMEM;
+ goto out;
+ }
+
+ /* Allocate bndl_cnt extra skb's for the bundle.
+ * The package containing the
+ * ATH10K_HTC_FLAG_BUNDLE_MASK flag is not included
+ * in bndl_cnt. The skb for that packet will be
+ * allocated separately.
+ */
+ for (i = 0; i < *bndl_cnt; i++) {
+ status = ath10k_sdio_mbox_alloc_rx_pkt(&rx_pkts[i],
+ act_len,
+ full_len,
+ true,
+ false);
+ if (status)
+ goto out;
+ }
+
+out:
+ return status;
+}
+
+static int ath10k_sdio_mbox_rx_alloc(struct ath10k_sdio *ar_sdio,
+ u32 lk_ahds[], int n_lk_ahds)
+{
+ int status = 0, i;
+ struct ath10k *ar = ar_sdio->ar;
+
+ if (n_lk_ahds > ATH10K_SDIO_MAX_RX_MSGS) {
+ ath10k_err(ar,
+ "The total number of pkgs to be fetched (%u) exceeds maximum %u !\n",
+ n_lk_ahds,
+ ATH10K_SDIO_MAX_RX_MSGS);
+ status = -ENOMEM;
+ goto err;
+ }
+
+ for (i = 0; i < n_lk_ahds; i++) {
+ struct ath10k_htc_hdr *htc_hdr =
+ (struct ath10k_htc_hdr *)&lk_ahds[i];
+ size_t full_len, act_len;
+ bool last_in_bundle = false;
+
+ if (le16_to_cpu(htc_hdr->len) >
+ ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH) {
+ ath10k_err(ar,
+ "payload len %d exceeds max htc : %d !\n",
+ le16_to_cpu(htc_hdr->len),
+ ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH);
+ status = -ENOMEM;
+ goto err;
+ }
+
+ act_len = le16_to_cpu(htc_hdr->len) + sizeof(*htc_hdr);
+ full_len = CALC_TXRX_PADDED_LEN(ar_sdio, act_len);
+
+ if (full_len > ATH10K_SDIO_MAX_BUFFER_SIZE) {
+ ath10k_warn(ar,
+ "Rx buffer requested with invalid length htc_hdr:eid %d, flags 0x%x, len %d\n",
+ htc_hdr->eid, htc_hdr->flags,
+ le16_to_cpu(htc_hdr->len));
+ status = -EINVAL;
+ goto err;
+ }
+
+ if (htc_hdr->flags & ATH10K_HTC_FLAG_BUNDLE_MASK) {
+ /* HTC header indicates that every packet to follow
+ * has the same padded length so that it can be
+ * optimally fetched as a full bundle.
+ */
+ size_t bndl_cnt;
+
+ status = alloc_pkt_bundle(ar, &ar_sdio->rx_pkts[i],
+ htc_hdr,
+ full_len, act_len, &bndl_cnt);
+
+ n_lk_ahds += bndl_cnt;
+ i += bndl_cnt;
+ /*Next buffer will be the last in the bundle */
+ last_in_bundle = true;
+ }
+
+ /* Allocate skb for packet. If the packet had the
+ * ATH10K_HTC_FLAG_BUNDLE_MASK flag set, all bundled
+ * packet skb's have been allocated in the previous step.
+ */
+ status = ath10k_sdio_mbox_alloc_rx_pkt(&ar_sdio->rx_pkts[i],
+ act_len,
+ full_len,
+ last_in_bundle,
+ last_in_bundle);
+ }
+
+ ar_sdio->n_rx_pkts = i;
+
+ return 0;
+err:
+
+ for (i = 0; i < ATH10K_SDIO_MAX_RX_MSGS; i++) {
+ if (!ar_sdio->rx_pkts[i].alloc_len)
+ break;
+ ath10k_sdio_mbox_free_rx_pkt(&ar_sdio->rx_pkts[i]);
+ }
+
+ return status;
+}
+
+static int ath10k_sdio_mbox_rx_packet(struct ath10k_sdio *ar_sdio,
+ struct ath10k_sdio_rx_data *pkt)
+{
+ struct ath10k *ar = ar_sdio->ar;
+ struct sk_buff *skb = pkt->skb;
+ int status;
+
+ status = ath10k_sdio_read_write_sync(ar,
+ ar_sdio->mbox_info.htc_addr,
+ skb->data, pkt->alloc_len,
+ HIF_RD_SYNC_BLOCK_FIX);
+
+ pkt->status = status;
+ if (!status)
+ skb_put(skb, pkt->act_len);
+
+ return status;
+}
+
+static int ath10k_sdio_mbox_rx_fetch(struct ath10k_sdio *ar_sdio)
+{
+ int i, status = 0;
+
+ for (i = 0; i < ar_sdio->n_rx_pkts; i++) {
+ status = ath10k_sdio_mbox_rx_packet(ar_sdio,
+ &ar_sdio->rx_pkts[i]);
+ if (status)
+ goto err;
+ }
+
+ return 0;
+err:
+ /* Free all packets that was not successfully fetched. */
+ for (; i < ar_sdio->n_rx_pkts; i++)
+ ath10k_sdio_mbox_free_rx_pkt(&ar_sdio->rx_pkts[i]);
+
+ return status;
+}
+
+/* Disable packet reception (used in case the host runs out of buffers)
+ * using the interrupt enable registers through the host I/F
+ */
+static int ath10k_sdio_hif_rx_control(struct ath10k_sdio *ar_sdio,
+ bool enable_rx)
+{
+ int status = 0;
+ struct ath10k_sdio_irq_enable_reg regs;
+ struct ath10k_sdio_irq_data *irq_data = &ar_sdio->irq_data;
+
+ ath10k_dbg(ar_sdio->ar, ATH10K_DBG_SDIO, "hif rx %s\n",
+ enable_rx ? "enable" : "disable");
+
+ spin_lock_bh(&irq_data->lock);
+
+ if (enable_rx)
+ irq_data->irq_en_reg.int_status_en |=
+ SM(0x01, MBOX_INT_STATUS_ENABLE_MBOX_DATA);
+ else
+ irq_data->irq_en_reg.int_status_en &=
+ ~SM(0x01, MBOX_INT_STATUS_ENABLE_MBOX_DATA);
+
+ regs = irq_data->irq_en_reg;
+
+ spin_unlock_bh(&irq_data->lock);
+
+ status = ath10k_sdio_read_write_sync(ar_sdio->ar,
+ MBOX_INT_STATUS_ENABLE_ADDRESS,
+ ®s.int_status_en, sizeof(regs),
+ HIF_WR_SYNC_BYTE_INC);
+
+ return status;
+}
+
+int ath10k_sdio_mbox_rxmsg_pending_handler(struct ath10k_sdio *ar_sdio,
+ u32 msg_lk_ahd, bool *done)
+{
+ struct ath10k *ar = ar_sdio->ar;
+ int status = 0;
+ u32 lk_ahds[ATH10K_SDIO_MAX_RX_MSGS];
+ int n_lk_ahds = 1;
+
+ *done = true;
+
+ /* Copy the lookahead obtained from the HTC register table into our
+ * temp array as a start value.
+ */
+ lk_ahds[0] = msg_lk_ahd;
+
+ for (;;) {
+ /* Try to allocate as many HTC RX packets indicated by
+ * n_lk_ahds.
+ */
+ status = ath10k_sdio_mbox_rx_alloc(ar_sdio, lk_ahds,
+ n_lk_ahds);
+ if (status)
+ break;
+
+ if (ar_sdio->n_rx_pkts >= 2)
+ /* A recv bundle was detected, force IRQ status
+ * re-check again.
+ */
+ *done = false;
+
+ status = ath10k_sdio_mbox_rx_fetch(ar_sdio);
+
+ /* Process fetched packets. This will potentially update
+ * n_lk_ahds depending on if the packets contain lookahead
+ * reports.
+ */
+ n_lk_ahds = 0;
+ status = ath10k_sdio_mbox_rx_process_packets(ar_sdio,
+ lk_ahds,
+ &n_lk_ahds);
+
+ if (!n_lk_ahds || status)
+ break;
+
+ /* For SYNCH processing, if we get here, we are running
+ * through the loop again due to updated lookaheads. Set
+ * flag that we should re-check IRQ status registers again
+ * before leaving IRQ processing, this can net better
+ * performance in high throughput situations.
+ */
+ *done = false;
+ }
+
+ if (status && (status != -ECANCELED))
+ ath10k_err(ar, "failed to get pending recv messages: %d\n",
+ status);
+
+ if (atomic_read(&ar_sdio->stopping)) {
+ ath10k_warn(ar, "host is going to stop. Turning of RX\n");
+ ath10k_sdio_hif_rx_control(ar_sdio, false);
+ }
+
+ return status;
+}
+
+static int ath10k_sdio_mbox_proc_dbg_intr(struct ath10k_sdio *ar_sdio)
+{
+ int ret;
+ u32 dummy;
+ struct ath10k *ar = ar_sdio->ar;
+
+ ath10k_warn(ar, "firmware crashed\n");
+
+ /* read counter to clear the interrupt, the debug error interrupt is
+ * counter 0.
+ */
+ ret = ath10k_sdio_read_write_sync(ar, MBOX_COUNT_DEC_ADDRESS,
+ (u8 *)&dummy, 4,
+ HIF_RD_SYNC_BYTE_INC);
+ if (ret)
+ ath10k_warn(ar, "Failed to clear debug interrupt: %d\n", ret);
+
+ return ret;
+}
+
+static int ath10k_sdio_mbox_proc_counter_intr(struct ath10k_sdio *ar_sdio)
+{
+ u8 counter_int_status;
+ struct ath10k_sdio_irq_data *irq_data = &ar_sdio->irq_data;
+
+ counter_int_status = irq_data->irq_proc_reg.counter_int_status &
+ irq_data->irq_en_reg.cntr_int_status_en;
+
+ /* NOTE: other modules like GMBOX may use the counter interrupt for
+ * credit flow control on other counters, we only need to check for
+ * the debug assertion counter interrupt.
+ */
+ if (counter_int_status & ATH10K_SDIO_TARGET_DEBUG_INTR_MASK)
+ return ath10k_sdio_mbox_proc_dbg_intr(ar_sdio);
+
+ return 0;
+}
+
+static int ath10k_sdio_mbox_proc_err_intr(struct ath10k_sdio *ar_sdio)
+{
+ int status;
+ u8 error_int_status;
+ u8 reg_buf[4];
+ struct ath10k_sdio_irq_data *irq_data = &ar_sdio->irq_data;
+ struct ath10k *ar = ar_sdio->ar;
+
+ ath10k_dbg(ar, ATH10K_DBG_SDIO, "error interrupt\n");
+
+ error_int_status = irq_data->irq_proc_reg.error_int_status & 0x0F;
+ if (!error_int_status) {
+ WARN_ON(1);
+ return -EIO;
+ }
+
+ ath10k_dbg(ar, ATH10K_DBG_SDIO,
+ "valid interrupt source(s) in ERROR_INT_STATUS: 0x%x\n",
+ error_int_status);
+
+ if (MS(error_int_status, MBOX_ERROR_INT_STATUS_WAKEUP))
+ ath10k_dbg(ar, ATH10K_DBG_SDIO, "error : wakeup\n");
+
+ if (MS(error_int_status, MBOX_ERROR_INT_STATUS_RX_UNDERFLOW))
+ ath10k_err(ar, "rx underflow\n");
+
+ if (MS(error_int_status, MBOX_ERROR_INT_STATUS_TX_OVERFLOW))
+ ath10k_err(ar, "tx overflow\n");
+
+ /* Clear the interrupt */
+ irq_data->irq_proc_reg.error_int_status &= ~error_int_status;
+
+ /* set W1C value to clear the interrupt, this hits the register first */
+ reg_buf[0] = error_int_status;
+ reg_buf[1] = 0;
+ reg_buf[2] = 0;
+ reg_buf[3] = 0;
+
+ status = ath10k_sdio_read_write_sync(ar,
+ MBOX_ERROR_INT_STATUS_ADDRESS,
+ reg_buf, 4, HIF_WR_SYNC_BYTE_FIX);
+
+ WARN_ON(status);
+
+ return status;
+}
+
+static int ath10k_sdio_mbox_proc_cpu_intr(struct ath10k_sdio *ar_sdio)
+{
+ int status;
+ struct ath10k_sdio_irq_data *irq_data = &ar_sdio->irq_data;
+ struct ath10k *ar = ar_sdio->ar;
+ u8 cpu_int_status, reg_buf[4];
+
+ cpu_int_status = irq_data->irq_proc_reg.cpu_int_status &
+ irq_data->irq_en_reg.cpu_int_status_en;
+ if (!cpu_int_status) {
+ WARN_ON(1);
+ return -EIO;
+ }
+
+ /* Clear the interrupt */
+ irq_data->irq_proc_reg.cpu_int_status &= ~cpu_int_status;
+
+ /* Set up the register transfer buffer to hit the register 4 times ,
+ * this is done to make the access 4-byte aligned to mitigate issues
+ * with host bus interconnects that restrict bus transfer lengths to
+ * be a multiple of 4-bytes.
+ */
+
+ /* set W1C value to clear the interrupt, this hits the register first */
+ reg_buf[0] = cpu_int_status;
+ /* the remaining are set to zero which have no-effect */
+ reg_buf[1] = 0;
+ reg_buf[2] = 0;
+ reg_buf[3] = 0;
+
+ status = ath10k_sdio_read_write_sync(ar,
+ MBOX_CPU_INT_STATUS_ADDRESS,
+ reg_buf, 4, HIF_WR_SYNC_BYTE_FIX);
+
+ WARN_ON(status);
+
+ return status;
+}
+
+/* process pending interrupts synchronously */
+static int ath10k_sdio_mbox_proc_pending_irqs(struct ath10k_sdio *ar_sdio,
+ bool *done)
+{
+ struct ath10k_sdio_irq_data *irq_data = &ar_sdio->irq_data;
+ struct ath10k *ar = ar_sdio->ar;
+ struct ath10k_sdio_irq_proc_registers *rg;
+ int status = 0;
+ u8 host_int_status = 0;
+ u32 lk_ahd = 0;
+ u8 htc_mbox = 1 << ATH10K_HTC_MAILBOX;
+
+ /* NOTE: HIF implementation guarantees that the context of this
+ * call allows us to perform SYNCHRONOUS I/O, that is we can block,
+ * sleep or call any API that can block or switch thread/task
+ * contexts. This is a fully schedulable context.
+ */
+
+ /* Process pending intr only when int_status_en is clear, it may
+ * result in unnecessary bus transaction otherwise. Target may be
+ * unresponsive at the time.
+ */
+ if (irq_data->irq_en_reg.int_status_en) {
+ /* Read the first sizeof(struct ath10k_irq_proc_registers)
+ * bytes of the HTC register table. This
+ * will yield us the value of different int status
+ * registers and the lookahead registers.
+ */
+ status = ath10k_sdio_read_write_sync(
+ ar,
+ MBOX_HOST_INT_STATUS_ADDRESS,
+ (u8 *)&irq_data->irq_proc_reg,
+ sizeof(irq_data->irq_proc_reg),
+ HIF_RD_SYNC_BYTE_INC);
+ if (status)
+ goto out;
+
+ /* Update only those registers that are enabled */
+ host_int_status = irq_data->irq_proc_reg.host_int_status &
+ irq_data->irq_en_reg.int_status_en;
+
+ /* Look at mbox status */
+ if (host_int_status & htc_mbox) {
+ /* Mask out pending mbox value, we use look ahead as
+ * the real flag for mbox processing.
+ */
+ host_int_status &= ~htc_mbox;
+ if (irq_data->irq_proc_reg.rx_lkahd_valid & htc_mbox) {
+ rg = &irq_data->irq_proc_reg;
+ lk_ahd = le32_to_cpu(rg->rx_lkahd[ATH10K_HTC_MAILBOX]);
+ if (!lk_ahd)
+ ath10k_err(ar, "lookahead is zero!\n");
+ }
+ }
+ }
+
+ if (!host_int_status && !lk_ahd) {
+ *done = true;
+ goto out;
+ }
+
+ if (lk_ahd) {
+ ath10k_dbg(ar, ATH10K_DBG_SDIO,
+ "pending mailbox msg, lk_ahd: 0x%08X\n", lk_ahd);
+
+ status = ath10k_sdio_mbox_rxmsg_pending_handler(ar_sdio,
+ lk_ahd, done);
+ if (status)
+ goto out;
+ }
+
+ /* now, handle the rest of the interrupts */
+ ath10k_dbg(ar, ATH10K_DBG_SDIO,
+ "valid interrupt source(s) for other interrupts: 0x%x\n",
+ host_int_status);
+
+ if (MS(host_int_status, MBOX_HOST_INT_STATUS_CPU)) {
+ /* CPU Interrupt */
+ status = ath10k_sdio_mbox_proc_cpu_intr(ar_sdio);
+ if (status)
+ goto out;
+ }
+
+ if (MS(host_int_status, MBOX_HOST_INT_STATUS_ERROR)) {
+ /* Error Interrupt */
+ status = ath10k_sdio_mbox_proc_err_intr(ar_sdio);
+ if (status)
+ goto out;
+ }
+
+ if (MS(host_int_status, MBOX_HOST_INT_STATUS_COUNTER))
+ /* Counter Interrupt */
+ status = ath10k_sdio_mbox_proc_counter_intr(ar_sdio);
+
+out:
+ /* An optimization to bypass reading the IRQ status registers
+ * unecessarily which can re-wake the target, if upper layers
+ * determine that we are in a low-throughput mode, we can rely on
+ * taking another interrupt rather than re-checking the status
+ * registers which can re-wake the target.
+ *
+ * NOTE : for host interfaces that makes use of detecting pending
+ * mbox messages at hif can not use this optimization due to
+ * possible side effects, SPI requires the host to drain all
+ * messages from the mailbox before exiting the ISR routine.
+ */
+
+ ath10k_dbg(ar, ATH10K_DBG_SDIO,
+ "%s: (done:%d, status=%d)\n", __func__, *done, status);
+
+ return status;
+}
+
+/* Macro to check if DMA buffer is WORD-aligned and DMA-able.
+ * Most host controllers assume the buffer is DMA'able and will
+ * bug-check otherwise (i.e. buffers on the stack). virt_addr_valid
+ * check fails on stack memory.
+ */
+static inline bool buf_needs_bounce(u8 *buf)
+{
+ return ((unsigned long)buf & 0x3) || !virt_addr_valid(buf);
+}
+
+static inline enum ath10k_htc_ep_id pipe_id_to_eid(u8 pipe_id)
+{
+ return (enum ath10k_htc_ep_id)pipe_id;
+}
+
+static void ath10k_sdio_set_mbox_info(struct ath10k_sdio *ar_sdio)
+{
+ struct ath10k_mbox_info *mbox_info = &ar_sdio->mbox_info;
+ u16 device = ar_sdio->func->device;
+
+ mbox_info->htc_addr = ATH10K_HIF_MBOX_BASE_ADDR;
+ mbox_info->block_size = ATH10K_HIF_MBOX_BLOCK_SIZE;
+ mbox_info->block_mask = ATH10K_HIF_MBOX_BLOCK_SIZE - 1;
+ mbox_info->gmbox_addr = ATH10K_HIF_GMBOX_BASE_ADDR;
+ mbox_info->gmbox_sz = ATH10K_HIF_GMBOX_WIDTH;
+
+ mbox_info->ext_info[0].htc_ext_addr = ATH10K_HIF_MBOX0_EXT_BASE_ADDR;
+
+ if ((device & ATH10K_MANUFACTURER_ID_REV_MASK) < 4)
+ mbox_info->ext_info[0].htc_ext_sz = ATH10K_HIF_MBOX0_EXT_WIDTH;
+ else
+ /* from rome 2.0(0x504), the width has been extended
+ * to 56K
+ */
+ mbox_info->ext_info[0].htc_ext_sz =
+ ATH10K_HIF_MBOX0_EXT_WIDTH_ROME_2_0;
+
+ mbox_info->ext_info[1].htc_ext_addr =
+ mbox_info->ext_info[0].htc_ext_addr +
+ mbox_info->ext_info[0].htc_ext_sz +
+ ATH10K_HIF_MBOX_DUMMY_SPACE_SIZE;
+ mbox_info->ext_info[1].htc_ext_sz = ATH10K_HIF_MBOX1_EXT_WIDTH;
+}
+
+static inline void ath10k_sdio_set_cmd52_arg(u32 *arg, u8 write, u8 raw,
+ unsigned int address,
+ unsigned char val)
+{
+ const u8 func = 0;
+
+ *arg = ((write & 1) << 31) |
+ ((func & 0x7) << 28) |
+ ((raw & 1) << 27) |
+ (1 << 26) |
+ ((address & 0x1FFFF) << 9) |
+ (1 << 8) |
+ (val & 0xFF);
+}
+
+static int ath10k_sdio_func0_cmd52_wr_byte(struct mmc_card *card,
+ unsigned int address,
+ unsigned char byte)
+{
+ struct mmc_command io_cmd;
+
+ memset(&io_cmd, 0, sizeof(io_cmd));
+ ath10k_sdio_set_cmd52_arg(&io_cmd.arg, 1, 0, address, byte);
+ io_cmd.opcode = SD_IO_RW_DIRECT;
+ io_cmd.flags = MMC_RSP_R5 | MMC_CMD_AC;
+
+ return mmc_wait_for_cmd(card->host, &io_cmd, 0);
+}
+
+static int ath10k_sdio_func0_cmd52_rd_byte(struct mmc_card *card,
+ unsigned int address,
+ unsigned char *byte)
+{
+ int ret;
+ struct mmc_command io_cmd;
+
+ memset(&io_cmd, 0, sizeof(io_cmd));
+ ath10k_sdio_set_cmd52_arg(&io_cmd.arg, 0, 0, address, 0);
+ io_cmd.opcode = SD_IO_RW_DIRECT;
+ io_cmd.flags = MMC_RSP_R5 | MMC_CMD_AC;
+
+ ret = mmc_wait_for_cmd(card->host, &io_cmd, 0);
+ if (!ret)
+ *byte = io_cmd.resp[0];
+
+ return ret;
+}
+
+static int ath10k_sdio_io(struct ath10k_sdio *ar_sdio, u32 request, u32 addr,
+ u8 *buf, u32 len)
+{
+ int ret = 0;
+ struct sdio_func *func = ar_sdio->func;
+ struct ath10k *ar = ar_sdio->ar;
+
+ sdio_claim_host(func);
+
+ if (request & HIF_WRITE) {
+ if (request & HIF_FIXED_ADDRESS)
+ ret = sdio_writesb(func, addr, buf, len);
+ else
+ ret = sdio_memcpy_toio(func, addr, buf, len);
+ } else {
+ if (request & HIF_FIXED_ADDRESS)
+ ret = sdio_readsb(func, buf, addr, len);
+ else
+ ret = sdio_memcpy_fromio(func, buf, addr, len);
+ }
+
+ sdio_release_host(func);
+
+ ath10k_dbg(ar, ATH10K_DBG_SDIO, "%s addr 0x%x%s buf 0x%p len %d\n",
+ request & HIF_WRITE ? "wr" : "rd", addr,
+ request & HIF_FIXED_ADDRESS ? " (fixed)" : "", buf, len);
+ ath10k_dbg_dump(ar, ATH10K_DBG_SDIO_DUMP, NULL,
+ request & HIF_WRITE ? "sdio wr " : "sdio rd ",
+ buf, len);
+
+ return ret;
+}
+
+static struct ath10k_sdio_bus_request
+*ath10k_sdio_alloc_busreq(struct ath10k_sdio *ar_sdio)
+{
+ struct ath10k_sdio_bus_request *bus_req;
+
+ spin_lock_bh(&ar_sdio->lock);
+
+ if (list_empty(&ar_sdio->bus_req_freeq)) {
+ spin_unlock_bh(&ar_sdio->lock);
+ return NULL;
+ }
+
+ bus_req = list_first_entry(&ar_sdio->bus_req_freeq,
+ struct ath10k_sdio_bus_request, list);
+ list_del(&bus_req->list);
+
+ spin_unlock_bh(&ar_sdio->lock);
+
+ return bus_req;
+}
+
+static void ath10k_sdio_free_bus_req(struct ath10k_sdio *ar_sdio,
+ struct ath10k_sdio_bus_request *bus_req)
+{
+ spin_lock_bh(&ar_sdio->lock);
+ list_add_tail(&bus_req->list, &ar_sdio->bus_req_freeq);
+ spin_unlock_bh(&ar_sdio->lock);
+}
+
+static int ath10k_sdio_read_write_sync(struct ath10k *ar, u32 addr, u8 *buf,
+ u32 len, u32 request)
+{
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+ u8 *tbuf = NULL;
+ int ret;
+ bool bounced = false;
+
+ if (request & HIF_BLOCK_BASIS)
+ len = round_down(len, ar_sdio->mbox_info.block_size);
+
+ if (buf_needs_bounce(buf)) {
+ if (!ar_sdio->dma_buffer)
+ return -ENOMEM;
+ /* FIXME: I am not sure if it is always correct to assume
+ * that the SDIO irq is a "fake" irq and sleep is possible.
+ * (this function will get called from
+ * ath10k_sdio_irq_handler
+ */
+ mutex_lock(&ar_sdio->dma_buffer_mutex);
+ tbuf = ar_sdio->dma_buffer;
+
+ if (request & HIF_WRITE)
+ memcpy(tbuf, buf, len);
+
+ bounced = true;
+ } else {
+ tbuf = buf;
+ }
+
+ ret = ath10k_sdio_io(ar_sdio, request, addr, tbuf, len);
+ if ((request & HIF_READ) && bounced)
+ memcpy(buf, tbuf, len);
+
+ if (bounced)
+ mutex_unlock(&ar_sdio->dma_buffer_mutex);
+
+ return ret;
+}
+
+static void __ath10k_sdio_write_async(struct ath10k_sdio *ar_sdio,
+ struct ath10k_sdio_bus_request *req)
+{
+ int status;
+ struct ath10k_htc_ep *ep;
+ struct sk_buff *skb;
+
+ skb = req->skb;
+ status = ath10k_sdio_read_write_sync(ar_sdio->ar, req->address,
+ skb->data, req->len,
+ req->request);
+ ep = &ar_sdio->ar->htc.endpoint[req->eid];
+ ath10k_htc_notify_tx_completion(ep, skb);
+ ath10k_sdio_free_bus_req(ar_sdio, req);
+}
+
+static void ath10k_sdio_write_async_work(struct work_struct *work)
+{
+ struct ath10k_sdio *ar_sdio;
+ struct ath10k_sdio_bus_request *req, *tmp_req;
+
+ ar_sdio = container_of(work, struct ath10k_sdio, wr_async_work);
+
+ spin_lock_bh(&ar_sdio->wr_async_lock);
+ list_for_each_entry_safe(req, tmp_req, &ar_sdio->wr_asyncq, list) {
+ list_del(&req->list);
+ spin_unlock_bh(&ar_sdio->wr_async_lock);
+ __ath10k_sdio_write_async(ar_sdio, req);
+ spin_lock_bh(&ar_sdio->wr_async_lock);
+ }
+ spin_unlock_bh(&ar_sdio->wr_async_lock);
+}
+
+static void ath10k_sdio_irq_handler(struct sdio_func *func)
+{
+ int status = 0;
+ unsigned long timeout;
+ struct ath10k_sdio *ar_sdio;
+ bool done = false;
+
+ ar_sdio = sdio_get_drvdata(func);
+ atomic_set(&ar_sdio->irq_handling, 1);
+
+ /* Release the host during interrupts so we can pick it back up when
+ * we process commands.
+ */
+ sdio_release_host(ar_sdio->func);
+
+ timeout = jiffies + ATH10K_SDIO_HIF_COMMUNICATION_TIMEOUT_HZ;
+ while (time_before(jiffies, timeout) && !done) {
+ status = ath10k_sdio_mbox_proc_pending_irqs(ar_sdio, &done);
+ if (status)
+ break;
+ }
+
+ sdio_claim_host(ar_sdio->func);
+
+ atomic_set(&ar_sdio->irq_handling, 0);
+ wake_up(&ar_sdio->irq_wq);
+
+ WARN_ON(status && status != -ECANCELED);
+}
+
+static int ath10k_sdio_hif_disable_intrs(struct ath10k_sdio *ar_sdio)
+{
+ int ret;
+ struct ath10k_sdio_irq_enable_reg regs;
+ struct ath10k_sdio_irq_data *irq_data = &ar_sdio->irq_data;
+
+ memset(®s, 0, sizeof(regs));
+
+ ret = ath10k_sdio_read_write_sync(ar_sdio->ar,
+ MBOX_INT_STATUS_ENABLE_ADDRESS,
+ ®s.int_status_en, sizeof(regs),
+ HIF_WR_SYNC_BYTE_INC);
+ if (ret) {
+ ath10k_err(ar_sdio->ar, "Unable to disable sdio interrupts\n");
+ return ret;
+ }
+
+ spin_lock_bh(&irq_data->lock);
+ irq_data->irq_en_reg = regs;
+ spin_unlock_bh(&irq_data->lock);
+
+ return 0;
+}
+
+static int ath10k_sdio_hif_power_up(struct ath10k *ar)
+{
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+ struct sdio_func *func = ar_sdio->func;
+ int ret = 0;
+
+ if (!ar_sdio->is_disabled)
+ return 0;
+
+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "sdio power on\n");
+
+ sdio_claim_host(func);
+
+ ret = sdio_enable_func(func);
+ if (ret) {
+ ath10k_err(ar, "Unable to enable sdio func: %d)\n", ret);
+ sdio_release_host(func);
+ return ret;
+ }
+
+ sdio_release_host(func);
+
+ /* Wait for hardware to initialise. It should take a lot less than
+ * 20 ms but let's be conservative here.
+ */
+ msleep(20);
+
+ ar_sdio->is_disabled = false;
+
+ ret = ath10k_sdio_hif_disable_intrs(ar_sdio);
+
+ return ret;
+}
+
+static void ath10k_sdio_hif_power_down(struct ath10k *ar)
+{
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+ int ret;
+
+ if (ar_sdio->is_disabled)
+ return;
+
+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "sdio power off\n");
+
+ /* Disable the card */
+ sdio_claim_host(ar_sdio->func);
+ ret = sdio_disable_func(ar_sdio->func);
+ sdio_release_host(ar_sdio->func);
+
+ if (ret)
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
+ "Unable to disable sdio: %d\n", ret);
+
+ ar_sdio->is_disabled = true;
+}
+
+int ath10k_sdio_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
+ struct ath10k_hif_sg_item *items, int n_items)
+{
+ int i;
+ u32 address;
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+ struct ath10k_sdio_bus_request *bus_req;
+
+ bus_req = ath10k_sdio_alloc_busreq(ar_sdio);
+
+ if (WARN_ON_ONCE(!bus_req))
+ return -ENOMEM;
+
+ for (i = 0; i < n_items; i++) {
+ bus_req->skb = items[i].transfer_context;
+ bus_req->request = HIF_WRITE;
+ bus_req->eid = pipe_id_to_eid(pipe_id);
+ /* Write TX data to the end of the mbox address space */
+ address = ar_sdio->mbox_addr[bus_req->eid] +
+ ar_sdio->mbox_size[bus_req->eid] - bus_req->skb->len;
+ bus_req->address = address;
+ bus_req->len = CALC_TXRX_PADDED_LEN(ar_sdio, bus_req->skb->len);
+
+ spin_lock_bh(&ar_sdio->wr_async_lock);
+ list_add_tail(&bus_req->list, &ar_sdio->wr_asyncq);
+ spin_unlock_bh(&ar_sdio->wr_async_lock);
+ }
+
+ queue_work(ar_sdio->workqueue, &ar_sdio->wr_async_work);
+
+ return 0;
+}
+
+static int ath10k_sdio_hif_enable_intrs(struct ath10k_sdio *ar_sdio)
+{
+ struct ath10k_sdio_irq_enable_reg regs;
+ int status;
+ struct ath10k_sdio_irq_data *irq_data = &ar_sdio->irq_data;
+
+ memset(®s, 0, sizeof(regs));
+
+ /* Enable all but CPU interrupts */
+ regs.int_status_en = SM(0x01, MBOX_INT_STATUS_ENABLE_ERROR) |
+ SM(0x01, MBOX_INT_STATUS_ENABLE_CPU) |
+ SM(0x01, MBOX_INT_STATUS_ENABLE_COUNTER);
+
+ /* NOTE: There are some cases where HIF can do detection of
+ * pending mbox messages which is disabled now.
+ */
+ regs.int_status_en |= SM(0x01, MBOX_INT_STATUS_ENABLE_MBOX_DATA);
+
+ /* Set up the CPU Interrupt status Register */
+ regs.cpu_int_status_en = 0;
+
+ /* Set up the Error Interrupt status Register */
+ regs.err_int_status_en =
+ SM(0x01, MBOX_ERROR_STATUS_ENABLE_RX_UNDERFLOW) |
+ SM(0x01, MBOX_ERROR_STATUS_ENABLE_TX_OVERFLOW);
+
+ /* Enable Counter interrupt status register to get fatal errors for
+ * debugging.
+ */
+ regs.cntr_int_status_en = SM(ATH10K_SDIO_TARGET_DEBUG_INTR_MASK,
+ MBOX_COUNTER_INT_STATUS_ENABLE_BIT);
+
+ status = ath10k_sdio_read_write_sync(ar_sdio->ar,
+ MBOX_INT_STATUS_ENABLE_ADDRESS,
+ ®s.int_status_en, sizeof(regs),
+ HIF_WR_SYNC_BYTE_INC);
+ if (status) {
+ ath10k_err(ar_sdio->ar,
+ "failed to update interrupt ctl reg err: %d\n",
+ status);
+ return status;
+ }
+
+ spin_lock_bh(&irq_data->lock);
+ irq_data->irq_en_reg = regs;
+ spin_unlock_bh(&irq_data->lock);
+
+ return 0;
+}
+
+static int ath10k_sdio_hif_start(struct ath10k *ar)
+{
+ int ret;
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+ u32 addr, val;
+
+ addr = host_interest_item_address(HI_ITEM(hi_acs_flags));
+
+ ret = ath10k_sdio_hif_diag_read32(ar, addr, &val);
+ if (ret) {
+ ath10k_err(ar, "Unable to read diag mem: %d\n", ret);
+ goto out;
+ }
+
+ if (val & HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_FW_ACK) {
+ ath10k_dbg(ar, ATH10K_DBG_SDIO,
+ "Mailbox SWAP Service is enabled\n");
+ ar_sdio->swap_mbox = true;
+ }
+
+ /* eid 0 always uses the lower part of the extended mailbox address
+ * space (ext_info[0].htc_ext_addr).
+ */
+ ar_sdio->mbox_addr[0] = ar_sdio->mbox_info.ext_info[0].htc_ext_addr;
+ ar_sdio->mbox_size[0] = ar_sdio->mbox_info.ext_info[0].htc_ext_sz;
+
+ sdio_claim_host(ar_sdio->func);
+
+ /* Register the isr */
+ ret = sdio_claim_irq(ar_sdio->func, ath10k_sdio_irq_handler);
+ if (ret) {
+ ath10k_err(ar, "Failed to claim sdio irq: %d\n", ret);
+ sdio_release_host(ar_sdio->func);
+ goto out;
+ }
+
+ sdio_release_host(ar_sdio->func);
+
+ ret = ath10k_sdio_hif_enable_intrs(ar_sdio);
+ if (ret)
+ ath10k_err(ar, "Failed to enable sdio interrupts: %d\n", ret);
+
+out:
+ return ret;
+}
+
+static bool ath10k_sdio_is_on_irq(struct ath10k *ar)
+{
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+
+ return !atomic_read(&ar_sdio->irq_handling);
+}
+
+static void ath10k_sdio_irq_disable(struct ath10k *ar)
+{
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+ int ret;
+
+ sdio_claim_host(ar_sdio->func);
+
+ atomic_set(&ar_sdio->stopping, 1);
+
+ if (atomic_read(&ar_sdio->irq_handling)) {
+ sdio_release_host(ar_sdio->func);
+
+ ret = wait_event_interruptible(ar_sdio->irq_wq,
+ ath10k_sdio_is_on_irq(ar));
+ if (ret)
+ return;
+
+ sdio_claim_host(ar_sdio->func);
+ }
+
+ ret = sdio_release_irq(ar_sdio->func);
+ if (ret)
+ ath10k_err(ar, "Failed to release sdio irq: %d\n", ret);
+
+ sdio_release_host(ar_sdio->func);
+}
+
+static int ath10k_sdio_config(struct ath10k_sdio *ar_sdio)
+{
+ struct ath10k *ar = ar_sdio->ar;
+ struct sdio_func *func = ar_sdio->func;
+ unsigned char byte, asyncintdelay = 2;
+ int ret;
+
+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "SDIO configuration\n");
+
+ sdio_claim_host(func);
+
+ byte = 0;
+ ret = ath10k_sdio_func0_cmd52_rd_byte(func->card,
+ SDIO_CCCR_DRIVE_STRENGTH,
+ &byte);
+
+ byte = (byte & (~(SDIO_DRIVE_DTSx_MASK << SDIO_DRIVE_DTSx_SHIFT))) |
+ SDIO_DTSx_SET_TYPE_D;
+
+ ret = ath10k_sdio_func0_cmd52_wr_byte(func->card,
+ SDIO_CCCR_DRIVE_STRENGTH,
+ byte);
+
+ byte = 0;
+ ret = ath10k_sdio_func0_cmd52_rd_byte(
+ func->card,
+ CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR,
+ &byte);
+
+ byte |= (CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A |
+ CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C |
+ CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D);
+
+ ret = ath10k_sdio_func0_cmd52_wr_byte(
+ func->card,
+ CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR,
+ byte);
+ if (ret) {
+ ath10k_err(ar, "Failed to enable driver strengt\n");
+ goto out;
+ }
+
+ byte = 0;
+ ret = ath10k_sdio_func0_cmd52_rd_byte(func->card,
+ CCCR_SDIO_IRQ_MODE_REG_SDIO3,
+ &byte);
+
+ byte |= SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3;
+
+ ret = ath10k_sdio_func0_cmd52_wr_byte(func->card,
+ CCCR_SDIO_IRQ_MODE_REG_SDIO3,
+ byte);
+ if (ret) {
+ ath10k_err(ar, "Failed to enable 4-bit async irq mode %d\n",
+ ret);
+ goto out;
+ }
+
+ byte = 0;
+ ret = ath10k_sdio_func0_cmd52_rd_byte(func->card,
+ CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS,
+ &byte);
+
+ byte = (byte & ~CCCR_SDIO_ASYNC_INT_DELAY_MASK) |
+ ((asyncintdelay << CCCR_SDIO_ASYNC_INT_DELAY_LSB) &
+ CCCR_SDIO_ASYNC_INT_DELAY_MASK);
+
+ ret = ath10k_sdio_func0_cmd52_wr_byte(func->card,
+ CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS,
+ byte);
+
+ /* give us some time to enable, in ms */
+ func->enable_timeout = 100;
+
+ ret = sdio_set_block_size(func, ar_sdio->mbox_info.block_size);
+ if (ret) {
+ ath10k_err(ar, "Set sdio block size %d failed: %d)\n",
+ ar_sdio->mbox_info.block_size, ret);
+ goto out;
+ }
+
+out:
+ sdio_release_host(func);
+
+ return ret;
+}
+
+/* set the window address register (using 4-byte register access ). */
+static int ath10k_set_addrwin_reg(struct ath10k *ar, u32 reg_addr, u32 addr)
+{
+ int status;
+
+ status = ath10k_sdio_read_write_sync(ar, reg_addr, (u8 *)(&addr),
+ 4, HIF_WR_SYNC_BYTE_INC);
+
+ if (status) {
+ ath10k_err(ar, "%s: failed to write 0x%x to window reg: 0x%X\n",
+ __func__, addr, reg_addr);
+ return status;
+ }
+
+ return 0;
+}
+
+static int ath10k_sdio_hif_diag_read32(struct ath10k *ar, u32 address,
+ u32 *value)
+{
+ __le32 val = 0;
+ int ret;
+
+ ret = ath10k_sdio_hif_diag_read(ar, address, &val, sizeof(val));
+ *value = __le32_to_cpu(val);
+
+ return ret;
+}
+
+static int ath10k_sdio_hif_diag_read(struct ath10k *ar, u32 address, void *buf,
+ size_t buf_len)
+{
+ int status;
+
+ /* set window register to start read cycle */
+ status = ath10k_set_addrwin_reg(ar, MBOX_WINDOW_READ_ADDR_ADDRESS,
+ address);
+
+ if (status)
+ return status;
+
+ /* read the data */
+ status = ath10k_sdio_read_write_sync(ar, MBOX_WINDOW_DATA_ADDRESS,
+ (u8 *)buf, buf_len,
+ HIF_RD_SYNC_BYTE_INC);
+ if (status) {
+ ath10k_err(ar, "%s: failed to read from window data addr\n",
+ __func__);
+ return status;
+ }
+
+ return status;
+}
+
+static int ath10k_sdio_diag_write_mem(struct ath10k *ar, u32 address,
+ const void *data, int nbytes)
+{
+ int status;
+
+ /* set write data */
+ status = ath10k_sdio_read_write_sync(ar, MBOX_WINDOW_DATA_ADDRESS,
+ (u8 *)data, nbytes,
+ HIF_WR_SYNC_BYTE_INC);
+ if (status) {
+ ath10k_err(ar, "%s: failed to write 0x%p to window data addr\n",
+ __func__, data);
+ return status;
+ }
+
+ /* set window register, which starts the write cycle */
+ return ath10k_set_addrwin_reg(ar, MBOX_WINDOW_WRITE_ADDR_ADDRESS,
+ address);
+}
+
+static int ath10k_sdio_bmi_credits(struct ath10k *ar)
+{
+ u32 addr, cmd_credits;
+ unsigned long timeout;
+ int ret;
+
+ cmd_credits = 0;
+
+ /* Read the counter register to get the command credits */
+ addr = MBOX_COUNT_DEC_ADDRESS + ATH10K_HIF_MBOX_NUM_MAX * 4;
+
+ timeout = jiffies + BMI_COMMUNICATION_TIMEOUT_HZ;
+ while (time_before(jiffies, timeout) && !cmd_credits) {
+ /* Hit the credit counter with a 4-byte access, the first byte
+ * read will hit the counter and cause a decrement, while the
+ * remaining 3 bytes has no effect. The rationale behind this
+ * is to make all HIF accesses 4-byte aligned.
+ */
+ ret = ath10k_sdio_read_write_sync(ar, addr,
+ (u8 *)&cmd_credits,
+ sizeof(cmd_credits),
+ HIF_RD_SYNC_BYTE_INC);
+ if (ret) {
+ ath10k_err(ar,
+ "Unable to decrement the command credit count register: %d\n",
+ ret);
+ return ret;
+ }
+
+ /* The counter is only 8 bits.
+ * Ignore anything in the upper 3 bytes
+ */
+ cmd_credits &= 0xFF;
+ }
+
+ if (!cmd_credits) {
+ ath10k_err(ar, "bmi communication timeout\n");
+ return -ETIMEDOUT;
+ }
+
+ return 0;
+}
+
+static int ath10k_sdio_bmi_get_rx_lkahd(struct ath10k *ar)
+{
+ unsigned long timeout;
+ u32 rx_word = 0;
+ int ret = 0;
+
+ timeout = jiffies + BMI_COMMUNICATION_TIMEOUT_HZ;
+ while ((time_before(jiffies, timeout)) && !rx_word) {
+ ret = ath10k_sdio_read_write_sync(ar,
+ MBOX_HOST_INT_STATUS_ADDRESS,
+ (u8 *)&rx_word,
+ sizeof(rx_word),
+ HIF_RD_SYNC_BYTE_INC);
+ if (ret) {
+ ath10k_err(ar, "unable to read RX_LOOKAHEAD_VALID\n");
+ return ret;
+ }
+
+ /* all we really want is one bit */
+ rx_word &= 1;
+ }
+
+ if (!rx_word) {
+ ath10k_err(ar, "bmi_recv_buf FIFO empty\n");
+ return -EINVAL;
+ }
+
+ return ret;
+}
+
+int ath10k_sdio_hif_exchange_bmi_msg(struct ath10k *ar,
+ void *req, u32 req_len,
+ void *resp, u32 *resp_len)
+{
+ int ret = 0;
+ u32 addr;
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+
+ ret = ath10k_sdio_bmi_credits(ar);
+ if (ret)
+ return ret;
+
+ /* BMI data is written to the end of the mailbox address space */
+ addr = ar_sdio->mbox_info.htc_addr + ATH10K_HIF_MBOX_WIDTH - req_len;
+
+ ret = ath10k_sdio_read_write_sync(ar, addr, req, req_len,
+ HIF_WR_SYNC_BYTE_INC);
+ if (ret) {
+ ath10k_err(ar, "unable to send the bmi data to the device\n");
+ return ret;
+ }
+
+ if (!resp || !resp_len)
+ /* No response expected */
+ goto out;
+
+ /* During normal bootup, small reads may be required.
+ * Rather than issue an HIF Read and then wait as the Target
+ * adds successive bytes to the FIFO, we wait here until
+ * we know that response data is available.
+ *
+ * This allows us to cleanly timeout on an unexpected
+ * Target failure rather than risk problems at the HIF level.
+ * In particular, this avoids SDIO timeouts and possibly garbage
+ * data on some host controllers. And on an interconnect
+ * such as Compact Flash (as well as some SDIO masters) which
+ * does not provide any indication on data timeout, it avoids
+ * a potential hang or garbage response.
+ *
+ * Synchronization is more difficult for reads larger than the
+ * size of the MBOX FIFO (128B), because the Target is unable
+ * to push the 129th byte of data until AFTER the Host posts an
+ * HIF Read and removes some FIFO data. So for large reads the
+ * Host proceeds to post an HIF Read BEFORE all the data is
+ * actually available to read. Fortunately, large BMI reads do
+ * not occur in practice -- they're supported for debug/development.
+ *
+ * So Host/Target BMI synchronization is divided into these cases:
+ * CASE 1: length < 4
+ * Should not happen
+ *
+ * CASE 2: 4 <= length <= 128
+ * Wait for first 4 bytes to be in FIFO
+ * If CONSERVATIVE_BMI_READ is enabled, also wait for
+ * a BMI command credit, which indicates that the ENTIRE
+ * response is available in the the FIFO
+ *
+ * CASE 3: length > 128
+ * Wait for the first 4 bytes to be in FIFO
+ *
+ * For most uses, a small timeout should be sufficient and we will
+ * usually see a response quickly; but there may be some unusual
+ * (debug) cases of BMI_EXECUTE where we want an larger timeout.
+ * For now, we use an unbounded busy loop while waiting for
+ * BMI_EXECUTE.
+ *
+ * If BMI_EXECUTE ever needs to support longer-latency execution,
+ * especially in production, this code needs to be enhanced to sleep
+ * and yield. Also note that BMI_COMMUNICATION_TIMEOUT is currently
+ * a function of Host processor speed.
+ */
+ ret = ath10k_sdio_bmi_get_rx_lkahd(ar);
+ if (ret)
+ goto out;
+
+ /* We always read from the start of the mbox address */
+ addr = ar_sdio->mbox_info.htc_addr;
+ ret = ath10k_sdio_read_write_sync(ar, addr, resp, *resp_len,
+ HIF_RD_SYNC_BYTE_INC);
+ if (ret)
+ ath10k_err(ar, "Unable to read the bmi data from the device: %d\n",
+ ret);
+
+out:
+ return ret;
+}
+
+static void ath10k_sdio_hif_stop(struct ath10k *ar)
+{
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+ struct ath10k_sdio_bus_request *req, *tmp_req;
+
+ ath10k_sdio_irq_disable(ar);
+
+ cancel_work_sync(&ar_sdio->wr_async_work);
+
+ spin_lock_bh(&ar_sdio->wr_async_lock);
+
+ list_for_each_entry_safe(req, tmp_req, &ar_sdio->wr_asyncq, list) {
+ struct ath10k_htc_ep *ep;
+
+ list_del(&req->list);
+
+ ep = &ar->htc.endpoint[req->eid];
+ ath10k_htc_notify_tx_completion(ep, req->skb);
+ ath10k_sdio_free_bus_req(ar_sdio, req);
+ }
+
+ spin_unlock_bh(&ar_sdio->wr_async_lock);
+}
+
+#ifdef CONFIG_PM
+
+static int ath10k_sdio_hif_suspend(struct ath10k *ar)
+{
+ return -EOPNOTSUPP;
+}
+
+static int ath10k_sdio_hif_resume(struct ath10k *ar)
+{
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+
+ switch (ar->state) {
+ case ATH10K_STATE_OFF:
+ ath10k_dbg(ar, ATH10K_DBG_SDIO,
+ "sdio resume configuring sdio\n");
+
+ /* need to set sdio settings after power is cut from sdio */
+ ath10k_sdio_config(ar_sdio);
+ break;
+
+ case ATH10K_STATE_ON:
+ default:
+ break;
+ }
+
+ return 0;
+}
+#endif
+
+int ath10k_sdio_hif_map_service_to_pipe(struct ath10k *ar, u16 service_id,
+ u8 *ul_pipe, u8 *dl_pipe)
+{
+ int ret = 0, i;
+ bool ep_found = false;
+ enum ath10k_htc_ep_id eid;
+ struct ath10k_htc *htc = &ar->htc;
+ struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
+ u32 htt_addr, wmi_addr, htt_mbox_size, wmi_mbox_size;
+
+ /* For sdio, we are interested in the mapping between eid
+ * and pipeid rather than service_id to pipe_id.
+ * First we find out which eid has been allocated to the
+ * service...
+ */
+ for (i = 0; i < ATH10K_HTC_EP_COUNT; i++) {
+ if (htc->endpoint[i].service_id == service_id) {
+ eid = htc->endpoint[i].eid;
+ ep_found = true;
+ break;
+ }
+ }
+
+ if (!ep_found) {
+ ret = -EINVAL;
+ goto out;
+ }
+
+ /* Then we create the simplest mapping possible between pipeid
+ * and eid
+ */
+ *ul_pipe = *dl_pipe = (u8)eid;
+
+ /* Normally, HTT will use the upper part of the extended
+ * mailbox address space (ext_info[1].htc_ext_addr) and WMI ctrl
+ * the lower part (ext_info[0].htc_ext_addr).
+ * If fw wants swapping of mailbox addresses, the opposite is true.
+ */
+ if (ar_sdio->swap_mbox) {
+ htt_addr = ar_sdio->mbox_info.ext_info[0].htc_ext_addr;
+ wmi_addr = ar_sdio->mbox_info.ext_info[1].htc_ext_addr;
+ htt_mbox_size = ar_sdio->mbox_info.ext_info[0].htc_ext_sz;
+ wmi_mbox_size = ar_sdio->mbox_info.ext_info[1].htc_ext_sz;
+ } else {
+ htt_addr = ar_sdio->mbox_info.ext_info[1].htc_ext_addr;
+ wmi_addr = ar_sdio->mbox_info.ext_info[0].htc_ext_addr;
+ htt_mbox_size = ar_sdio->mbox_info.ext_info[1].htc_ext_sz;
+ wmi_mbox_size = ar_sdio->mbox_info.ext_info[0].htc_ext_sz;
+ }
+
+ switch (service_id) {
+ case ATH10K_HTC_SVC_ID_RSVD_CTRL:
+ /* HTC ctrl ep mbox address has already been setup in
+ * ath10k_sdio_hif_start
+ */
+ break;
+ case ATH10K_HTC_SVC_ID_WMI_CONTROL:
+ ar_sdio->mbox_addr[eid] = wmi_addr;
+ ar_sdio->mbox_size[eid] = wmi_mbox_size;
+ ath10k_dbg(ar, ATH10K_DBG_SDIO,
+ "WMI ctrl mbox addr = %x, mbox_size = %x\n",
+ ar_sdio->mbox_addr[eid], ar_sdio->mbox_size[eid]);
+ break;
+ case ATH10K_HTC_SVC_ID_HTT_DATA_MSG:
+ ar_sdio->mbox_addr[eid] = htt_addr;
+ ar_sdio->mbox_size[eid] = htt_mbox_size;
+ ath10k_dbg(ar, ATH10K_DBG_SDIO,
+ "HTT data mbox addr = %x, mbox_size = %x\n",
+ ar_sdio->mbox_addr[eid], ar_sdio->mbox_size[eid]);
+ break;
+ default:
+ ath10k_err(ar, "Unsupported service ID: %x\n",
+ service_id);
+ ret = -EINVAL;
+ }
+
+out:
+ return ret;
+}
+
+void ath10k_sdio_hif_get_default_pipe(struct ath10k *ar,
+ u8 *ul_pipe, u8 *dl_pipe)
+{
+ ath10k_dbg(ar, ATH10K_DBG_SDIO, "sdio hif get default pipe\n");
+
+ /* HTC ctrl ep (SVC id 1) always has eid (and pipe_id in our
+ * case) == 0
+ */
+ *ul_pipe = 0;
+ *dl_pipe = 0;
+}
+
+static int ath10k_sdio_hif_fetch_cal_eeprom(struct ath10k *ar, void **data,
+ size_t *data_len)
+{
+ return -EOPNOTSUPP;
+}
+
+static void ath10k_sdio_write32(struct ath10k *ar, u32 offset, u32 value)
+{
+}
+
+static u32 ath10k_sdio_read32(struct ath10k *ar, u32 offset)
+{
+ return 0;
+}
+
+static void ath10k_sdio_hif_send_complete_check(struct ath10k *ar,
+ u8 pipe, int force)
+{
+}
+
+static u16 ath10k_sdio_hif_get_free_queue_number(struct ath10k *ar, u8 pipe)
+{
+ return 0;
+}
+
+static const struct ath10k_hif_ops ath10k_sdio_hif_ops = {
+ .tx_sg = ath10k_sdio_hif_tx_sg,
+ .diag_read = ath10k_sdio_hif_diag_read,
+ .diag_write = ath10k_sdio_diag_write_mem,
+ .exchange_bmi_msg = ath10k_sdio_hif_exchange_bmi_msg,
+ .start = ath10k_sdio_hif_start,
+ .stop = ath10k_sdio_hif_stop,
+ .map_service_to_pipe = ath10k_sdio_hif_map_service_to_pipe,
+ .get_default_pipe = ath10k_sdio_hif_get_default_pipe,
+ .send_complete_check = ath10k_sdio_hif_send_complete_check,
+ .get_free_queue_number = ath10k_sdio_hif_get_free_queue_number,
+ .power_up = ath10k_sdio_hif_power_up,
+ .power_down = ath10k_sdio_hif_power_down,
+ .read32 = ath10k_sdio_read32,
+ .write32 = ath10k_sdio_write32,
+#ifdef CONFIG_PM
+ .suspend = ath10k_sdio_hif_suspend,
+ .resume = ath10k_sdio_hif_resume,
+#endif
+ .fetch_cal_eeprom = ath10k_sdio_hif_fetch_cal_eeprom,
+};
+
+#ifdef CONFIG_PM_SLEEP
+
+/* Empty handlers so that mmc subsystem doesn't remove us entirely during
+ * suspend. We instead follow cfg80211 suspend/resume handlers.
+ */
+static int ath10k_sdio_pm_suspend(struct device *device)
+{
+ return 0;
+}
+
+static int ath10k_sdio_pm_resume(struct device *device)
+{
+ return 0;
+}
+
+static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend,
+ ath10k_sdio_pm_resume);
+
+#define ATH10K_SDIO_PM_OPS (&ath10k_sdio_pm_ops)
+
+#else
+
+#define ATH10K_SDIO_PM_OPS NULL
+
+#endif /* CONFIG_PM_SLEEP */
+
+static int ath10k_sdio_probe(struct sdio_func *func,
+ const struct sdio_device_id *id)
+{
+ int ret;
+ struct ath10k_sdio *ar_sdio;
+ struct ath10k *ar;
+ int i;
+ enum ath10k_hw_rev hw_rev;
+
+ hw_rev = ATH10K_HW_QCA65XX;
+
+ ar = ath10k_core_create(sizeof(*ar_sdio), &func->dev, ATH10K_BUS_SDIO,
+ hw_rev, &ath10k_sdio_hif_ops);
+ if (!ar) {
+ dev_err(&func->dev, "failed to allocate core\n");
+ return -ENOMEM;
+ }
+
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
+ "sdio new func %d vendor 0x%x device 0x%x block 0x%x/0x%x\n",
+ func->num, func->vendor, func->device,
+ func->max_blksize, func->cur_blksize);
+
+ ar_sdio = ath10k_sdio_priv(ar);
+
+ ar_sdio->dma_buffer = kzalloc(ATH10K_HIF_DMA_BUFFER_SIZE, GFP_KERNEL);
+ if (!ar_sdio->dma_buffer) {
+ ret = -ENOMEM;
+ goto err_core_destroy;
+ }
+
+ ar_sdio->func = func;
+ sdio_set_drvdata(func, ar_sdio);
+
+ ar_sdio->is_disabled = true;
+ ar_sdio->ar = ar;
+
+ spin_lock_init(&ar_sdio->lock);
+ spin_lock_init(&ar_sdio->wr_async_lock);
+ spin_lock_init(&ar_sdio->irq_data.lock);
+ mutex_init(&ar_sdio->dma_buffer_mutex);
+
+ INIT_LIST_HEAD(&ar_sdio->bus_req_freeq);
+ INIT_LIST_HEAD(&ar_sdio->wr_asyncq);
+
+ INIT_WORK(&ar_sdio->wr_async_work, ath10k_sdio_write_async_work);
+ ar_sdio->workqueue = create_singlethread_workqueue("ath10k_sdio_wq");
+ if (!ar_sdio->workqueue)
+ goto err;
+
+ init_waitqueue_head(&ar_sdio->irq_wq);
+
+ for (i = 0; i < ATH10K_SDIO_BUS_REQUEST_MAX_NUM; i++)
+ ath10k_sdio_free_bus_req(ar_sdio, &ar_sdio->bus_req[i]);
+
+ ar->dev_id = id->device;
+ ar->id.vendor = id->vendor;
+ ar->id.device = id->device;
+
+ ath10k_sdio_set_mbox_info(ar_sdio);
+
+ ret = ath10k_sdio_config(ar_sdio);
+ if (ret) {
+ ath10k_err(ar, "Failed to config sdio: %d\n", ret);
+ goto err;
+ }
+
+ ret = ath10k_core_register(ar, 0/*chip_id is not applicaple for SDIO*/);
+ if (ret) {
+ ath10k_err(ar, "failed to register driver core: %d\n", ret);
+ goto err;
+ }
+
+ return ret;
+
+err:
+ kfree(ar_sdio->dma_buffer);
+err_core_destroy:
+ ath10k_core_destroy(ar);
+
+ return ret;
+}
+
+static void ath10k_sdio_remove(struct sdio_func *func)
+{
+ struct ath10k_sdio *ar_sdio;
+ struct ath10k *ar;
+
+ ar_sdio = sdio_get_drvdata(func);
+ ar = ar_sdio->ar;
+
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
+ "sdio removed func %d vendor 0x%x device 0x%x\n",
+ func->num, func->vendor, func->device);
+
+ (void)ath10k_sdio_hif_disable_intrs(ar_sdio);
+ cancel_work_sync(&ar_sdio->wr_async_work);
+ ath10k_core_unregister(ar);
+ ath10k_core_destroy(ar);
+
+ kfree(ar_sdio->dma_buffer);
+}
+
+static const struct sdio_device_id ath10k_sdio_devices[] = {
+ {SDIO_DEVICE(ATH10K_MANUFACTURER_CODE,
+ (ATH10K_MANUFACTURER_ID_AR6005_BASE | 0xA))},
+ {},
+};
+
+MODULE_DEVICE_TABLE(sdio, ath10k_sdio_devices);
+
+static struct sdio_driver ath10k_sdio_driver = {
+ .name = "ath10k_sdio",
+ .id_table = ath10k_sdio_devices,
+ .probe = ath10k_sdio_probe,
+ .remove = ath10k_sdio_remove,
+ .drv.pm = ATH10K_SDIO_PM_OPS,
+};
+
+static int __init ath10k_sdio_init(void)
+{
+ int ret;
+
+ ret = sdio_register_driver(&ath10k_sdio_driver);
+ if (ret)
+ pr_err("sdio driver registration failed: %d\n", ret);
+
+ return ret;
+}
+
+static void __exit ath10k_sdio_exit(void)
+{
+ sdio_unregister_driver(&ath10k_sdio_driver);
+}
+
+module_init(ath10k_sdio_init);
+module_exit(ath10k_sdio_exit);
+
+MODULE_AUTHOR("Qualcomm Atheros");
+MODULE_DESCRIPTION("Driver support for Qualcomm Atheros 802.11ac WLAN SDIO devices");
+MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/net/wireless/ath/ath10k/sdio.h b/drivers/net/wireless/ath/ath10k/sdio.h
new file mode 100644
index 0000000..5c2b71c
--- /dev/null
+++ b/drivers/net/wireless/ath/ath10k/sdio.h
@@ -0,0 +1,276 @@
+/*
+ * Copyright (c) 2004-2011 Atheros Communications Inc.
+ * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
+ * Copyright (c) 2016 Kapsch Trafficcom AB
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _SDIO_H_
+#define _SDIO_H_
+
+#define ATH10K_HIF_MBOX_BLOCK_SIZE 256
+#define ATH10K_MANUFACTURER_ID_AR6005_BASE 0x500
+
+#define ATH10K_MANUFACTURER_ID_REV_MASK 0x00FF
+#define ATH10K_MANUFACTURER_CODE 0x271 /* Atheros */
+
+#define ATH10K_HIF_DMA_BUFFER_SIZE (32 * 1024)
+#define ATH10K_SDIO_MAX_BUFFER_SIZE 4096 /*Unsure of this constant*/
+
+/* Mailbox address in SDIO address space */
+#define ATH10K_HIF_MBOX_BASE_ADDR 0x1000
+#define ATH10K_HIF_MBOX_WIDTH 0x800
+
+#define ATH10K_HIF_MBOX_TOT_WIDTH \
+ (ATH10K_HIF_MBOX_NUM_MAX * ATH10K_HIF_MBOX_WIDTH)
+
+#define ATH10K_HIF_MBOX0_EXT_BASE_ADDR 0x5000
+#define ATH10K_HIF_MBOX0_EXT_WIDTH (36 * 1024)
+#define ATH10K_HIF_MBOX0_EXT_WIDTH_ROME_2_0 (56 * 1024)
+#define ATH10K_HIF_MBOX1_EXT_WIDTH (36 * 1024)
+#define ATH10K_HIF_MBOX_DUMMY_SPACE_SIZE (2 * 1024)
+
+#define ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH \
+ (ATH10K_SDIO_MAX_BUFFER_SIZE - sizeof(struct ath10k_htc_hdr))
+
+#define ATH10K_HIF_MBOX_NUM_MAX 4
+#define ATH10K_SDIO_BUS_REQUEST_MAX_NUM 64
+
+#define ATH10K_SDIO_HIF_COMMUNICATION_TIMEOUT_HZ (100 * HZ)
+
+/* HTC runs over mailbox 0 */
+#define ATH10K_HTC_MAILBOX 0
+
+/* GMBOX addresses */
+#define ATH10K_HIF_GMBOX_BASE_ADDR 0x7000
+#define ATH10K_HIF_GMBOX_WIDTH 0x4000
+
+/* interrupt mode register */
+#define CCCR_SDIO_IRQ_MODE_REG 0xF0
+#define CCCR_SDIO_IRQ_MODE_REG_SDIO3 0x16
+
+#define CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR 0xF2
+
+#define CCCR_SDIO_DRIVER_STRENGTH_ENABLE_A 0x02
+#define CCCR_SDIO_DRIVER_STRENGTH_ENABLE_C 0x04
+#define CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D 0x08
+
+#define CCCR_SDIO_ASYNC_INT_DELAY_ADDRESS 0xF0
+#define CCCR_SDIO_ASYNC_INT_DELAY_LSB 0x06
+#define CCCR_SDIO_ASYNC_INT_DELAY_MASK 0xC0
+
+/* mode to enable special 4-bit interrupt assertion without clock */
+#define SDIO_IRQ_MODE_ASYNC_4BIT_IRQ BIT(0)
+#define SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3 BIT(1)
+
+#define ATH10K_SDIO_TARGET_DEBUG_INTR_MASK 0x01
+
+/* The theoretical maximum number of RX messages that can be fetched
+ * from the mbox interrupt handler in one loop is derived in the following
+ * way:
+ *
+ * Let's assume that each packet in a bundle of the maximum bundle size
+ * (HTC_HOST_MAX_MSG_PER_BUNDLE) has the HTC header bundle count set
+ * to the maximum value (HTC_HOST_MAX_MSG_PER_BUNDLE).
+ *
+ * in this case the driver must allocate
+ * (HTC_HOST_MAX_MSG_PER_BUNDLE * HTC_HOST_MAX_MSG_PER_BUNDLE) skb's.
+ */
+#define ATH10K_SDIO_MAX_RX_MSGS \
+ (HTC_HOST_MAX_MSG_PER_BUNDLE * HTC_HOST_MAX_MSG_PER_BUNDLE)
+
+struct ath10k_sdio_bus_request {
+ struct list_head list;
+
+ /* sdio address */
+ u32 address;
+ u32 request;
+ size_t len;
+ struct sk_buff *skb;
+ enum ath10k_htc_ep_id eid;
+ int status;
+};
+
+struct ath10k_sdio_rx_data {
+ struct sk_buff *skb;
+ size_t alloc_len;
+ size_t act_len;
+ enum ath10k_htc_ep_id eid;
+ bool part_of_bundle;
+ bool last_in_bundle;
+ int status;
+};
+
+/* direction of transfer (read/write) */
+#define HIF_READ 0x00000001
+#define HIF_WRITE 0x00000002
+#define HIF_DIR_MASK (HIF_READ | HIF_WRITE)
+
+/* emode - This indicates the whether the command is to be executed in a
+ * blocking or non-blocking fashion (HIF_SYNCHRONOUS/
+ * HIF_ASYNCHRONOUS). The read/write data paths in HTC have been
+ * implemented using the asynchronous mode allowing the the bus
+ * driver to indicate the completion of operation through the
+ * registered callback routine. The requirement primarily comes
+ * from the contexts these operations get called from (a driver's
+ * transmit context or the ISR context in case of receive).
+ * Support for both of these modes is essential.
+ */
+#define HIF_SYNCHRONOUS 0x00000010
+#define HIF_ASYNCHRONOUS 0x00000020
+#define HIF_EMODE_MASK (HIF_SYNCHRONOUS | HIF_ASYNCHRONOUS)
+
+/* dmode - An interface may support different kinds of commands based on
+ * the tradeoff between the amount of data it can carry and the
+ * setup time. Byte and Block modes are supported (HIF_BYTE_BASIS/
+ * HIF_BLOCK_BASIS). In case of latter, the data is rounded off
+ * to the nearest block size by padding. The size of the block is
+ * configurable at compile time using the HIF_BLOCK_SIZE and is
+ * negotiated with the target during initialization after the
+ * ATH10K interrupts are enabled.
+ */
+#define HIF_BYTE_BASIS 0x00000040
+#define HIF_BLOCK_BASIS 0x00000080
+#define HIF_DMODE_MASK (HIF_BYTE_BASIS | HIF_BLOCK_BASIS)
+
+/* amode - This indicates if the address has to be incremented on ATH10K
+ * after every read/write operation (HIF?FIXED_ADDRESS/
+ * HIF_INCREMENTAL_ADDRESS).
+ */
+#define HIF_FIXED_ADDRESS 0x00000100
+#define HIF_INCREMENTAL_ADDRESS 0x00000200
+#define HIF_AMODE_MASK (HIF_FIXED_ADDRESS | HIF_INCREMENTAL_ADDRESS)
+
+#define HIF_WR_ASYNC_BYTE_INC \
+ (HIF_WRITE | HIF_ASYNCHRONOUS | \
+ HIF_BYTE_BASIS | HIF_INCREMENTAL_ADDRESS)
+
+#define HIF_WR_ASYNC_BLOCK_INC \
+ (HIF_WRITE | HIF_ASYNCHRONOUS | \
+ HIF_BLOCK_BASIS | HIF_INCREMENTAL_ADDRESS)
+
+#define HIF_WR_SYNC_BYTE_FIX \
+ (HIF_WRITE | HIF_SYNCHRONOUS | \
+ HIF_BYTE_BASIS | HIF_FIXED_ADDRESS)
+
+#define HIF_WR_SYNC_BYTE_INC \
+ (HIF_WRITE | HIF_SYNCHRONOUS | \
+ HIF_BYTE_BASIS | HIF_INCREMENTAL_ADDRESS)
+
+#define HIF_WR_SYNC_BLOCK_INC \
+ (HIF_WRITE | HIF_SYNCHRONOUS | \
+ HIF_BLOCK_BASIS | HIF_INCREMENTAL_ADDRESS)
+
+#define HIF_RD_SYNC_BYTE_INC \
+ (HIF_READ | HIF_SYNCHRONOUS | \
+ HIF_BYTE_BASIS | HIF_INCREMENTAL_ADDRESS)
+
+#define HIF_RD_SYNC_BYTE_FIX \
+ (HIF_READ | HIF_SYNCHRONOUS | \
+ HIF_BYTE_BASIS | HIF_FIXED_ADDRESS)
+
+#define HIF_RD_ASYNC_BLOCK_FIX \
+ (HIF_READ | HIF_ASYNCHRONOUS | \
+ HIF_BLOCK_BASIS | HIF_FIXED_ADDRESS)
+
+#define HIF_RD_SYNC_BLOCK_FIX \
+ (HIF_READ | HIF_SYNCHRONOUS | \
+ HIF_BLOCK_BASIS | HIF_FIXED_ADDRESS)
+
+struct ath10k_sdio_irq_proc_registers {
+ u8 host_int_status;
+ u8 cpu_int_status;
+ u8 error_int_status;
+ u8 counter_int_status;
+ u8 mbox_frame;
+ u8 rx_lkahd_valid;
+ u8 host_int_status2;
+ u8 gmbox_rx_avail;
+ __le32 rx_lkahd[2];
+ __le32 rx_gmbox_lkahd_alias[2];
+};
+
+struct ath10k_sdio_irq_enable_reg {
+ u8 int_status_en;
+ u8 cpu_int_status_en;
+ u8 err_int_status_en;
+ u8 cntr_int_status_en;
+};
+
+struct ath10k_sdio_irq_data {
+ /* protects irq_proc_reg and irq_en_reg below */
+ spinlock_t lock;
+ struct ath10k_sdio_irq_proc_registers irq_proc_reg;
+ struct ath10k_sdio_irq_enable_reg irq_en_reg;
+};
+
+struct ath10k_mbox_ext_info {
+ u32 htc_ext_addr;
+ u32 htc_ext_sz;
+};
+
+struct ath10k_mbox_info {
+ u32 htc_addr;
+ struct ath10k_mbox_ext_info ext_info[2];
+ u32 block_size;
+ u32 block_mask;
+ u32 gmbox_addr;
+ u32 gmbox_sz;
+};
+
+struct ath10k_sdio {
+ struct sdio_func *func;
+
+ struct ath10k_mbox_info mbox_info;
+ bool swap_mbox;
+ u32 mbox_addr[ATH10K_HTC_EP_COUNT];
+ u32 mbox_size[ATH10K_HTC_EP_COUNT];
+
+ /* available bus requests */
+ struct ath10k_sdio_bus_request bus_req[ATH10K_SDIO_BUS_REQUEST_MAX_NUM];
+ /* free list of bus requests */
+ struct list_head bus_req_freeq;
+ /* protects access to bus_req_freeq */
+ spinlock_t lock;
+
+ struct ath10k_sdio_rx_data rx_pkts[ATH10K_SDIO_MAX_RX_MSGS];
+ size_t n_rx_pkts;
+
+ struct ath10k *ar;
+ struct ath10k_sdio_irq_data irq_data;
+
+ u8 *dma_buffer;
+
+ /* protects access to dma_buffer */
+ struct mutex dma_buffer_mutex;
+
+ atomic_t irq_handling;
+ atomic_t stopping;
+ wait_queue_head_t irq_wq;
+
+ bool is_disabled;
+
+ struct workqueue_struct *workqueue;
+ struct work_struct wr_async_work;
+ struct list_head wr_asyncq;
+ /* protects access to wr_asyncq */
+ spinlock_t wr_async_lock;
+};
+
+static inline struct ath10k_sdio *ath10k_sdio_priv(struct ath10k *ar)
+{
+ return (struct ath10k_sdio *)ar->drv_priv;
+}
+
+#endif
--
1.7.9.5
^ permalink raw reply related
* [RFC 04/12] ath10k: htc: refactorization
From: Erik Stromdahl @ 2016-11-14 16:33 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>
Code refactorization:
Moved the code for ep 0 in ath10k_htc_rx_completion_handler
to ath10k_htc_control_rx_complete.
This eases the implementation of SDIO/mbox significantly since
the ep_rx_complete cb is invoked directly from the SDIO/mbox
hif layer.
Since the ath10k_htc_control_rx_complete already is present
(only containing a warning message) there is no reason for not
using it (instead of having a special case for ep 0 in
ath10k_htc_rx_completion_handler).
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/htc.c | 73 +++++++++++++++------------------
1 file changed, 34 insertions(+), 39 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 7257366..a5a2f78 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -457,42 +457,6 @@ void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
/* zero length packet with trailer data, just drop these */
goto out;
- if (eid == ATH10K_HTC_EP_0) {
- struct ath10k_htc_msg *msg = (struct ath10k_htc_msg *)skb->data;
-
- switch (__le16_to_cpu(msg->hdr.message_id)) {
- case ATH10K_HTC_MSG_READY_ID:
- case ATH10K_HTC_MSG_CONNECT_SERVICE_RESP_ID:
- /* handle HTC control message */
- if (completion_done(&htc->ctl_resp)) {
- /*
- * this is a fatal error, target should not be
- * sending unsolicited messages on the ep 0
- */
- ath10k_warn(ar, "HTC rx ctrl still processing\n");
- complete(&htc->ctl_resp);
- goto out;
- }
-
- htc->control_resp_len =
- min_t(int, skb->len,
- ATH10K_HTC_MAX_CTRL_MSG_LEN);
-
- memcpy(htc->control_resp_buffer, skb->data,
- htc->control_resp_len);
-
- complete(&htc->ctl_resp);
- break;
- case ATH10K_HTC_MSG_SEND_SUSPEND_COMPLETE:
- htc->htc_ops.target_send_suspend_complete(ar);
- break;
- default:
- ath10k_warn(ar, "ignoring unsolicited htc ep0 event\n");
- break;
- }
- goto out;
- }
-
ath10k_dbg(ar, ATH10K_DBG_HTC, "htc rx completion ep %d skb %pK\n",
eid, skb);
ep->ep_ops.ep_rx_complete(ar, skb);
@@ -507,9 +471,40 @@ void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
static void ath10k_htc_control_rx_complete(struct ath10k *ar,
struct sk_buff *skb)
{
- /* This is unexpected. FW is not supposed to send regular rx on this
- * endpoint. */
- ath10k_warn(ar, "unexpected htc rx\n");
+ struct ath10k_htc *htc = &ar->htc;
+ struct ath10k_htc_msg *msg = (struct ath10k_htc_msg *)skb->data;
+
+ switch (__le16_to_cpu(msg->hdr.message_id)) {
+ case ATH10K_HTC_MSG_READY_ID:
+ case ATH10K_HTC_MSG_CONNECT_SERVICE_RESP_ID:
+ /* handle HTC control message */
+ if (completion_done(&htc->ctl_resp)) {
+ /* this is a fatal error, target should not be
+ * sending unsolicited messages on the ep 0
+ */
+ ath10k_warn(ar, "HTC rx ctrl still processing\n");
+ complete(&htc->ctl_resp);
+ goto out;
+ }
+
+ htc->control_resp_len =
+ min_t(int, skb->len,
+ ATH10K_HTC_MAX_CTRL_MSG_LEN);
+
+ memcpy(htc->control_resp_buffer, skb->data,
+ htc->control_resp_len);
+
+ complete(&htc->ctl_resp);
+ break;
+ case ATH10K_HTC_MSG_SEND_SUSPEND_COMPLETE:
+ htc->htc_ops.target_send_suspend_complete(ar);
+ break;
+ default:
+ ath10k_warn(ar, "ignoring unsolicited htc ep0 event\n");
+ break;
+ }
+
+out:
kfree_skb(skb);
}
--
1.7.9.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.