From nobody Mon Nov 25 12:45:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1714976499; cv=none; d=zohomail.com; s=zohoarc; b=EsW1wlu5SNiKivOgXcd1nr3evUYhvUbFZSCXP7jN4VgA+cXXDittbfLMwcg2sCPkEJzYur7ZeQUtGvx3aq3pkgWa5UOJxR39pbyf065C9QsZHQeFRqGaQgd3ZusEMiheFSObmWs/9n+nmiQeyMmEi83U3V+L2c4RD9szI6UBP7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1714976499; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=l8uARPOXLgNrD5x5VbymwJHQnEgheFii2ZdPuVb1ADE=; b=PxS7LBIjHsHJi0+l6hjgRKtf8yF53AsaZNGcam/IIwQU46krAaoEsl55/IJKL5nqmh33OBcffVg29/jE9y63mf5yEOqGT+u7x5khEHnxK5hQc+gIMDzZOkVkskUM+Zs3MzTBL5sg0uECyHf2rxSgLog2xMD7WpufOgAMuLYfADw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1714976499046294.57202907101737; Sun, 5 May 2024 23:21:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3rie-0002jQ-Sf; Mon, 06 May 2024 02:21:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3rib-0002is-MN; Mon, 06 May 2024 02:20:58 -0400 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3riR-0006sC-2o; Mon, 06 May 2024 02:20:57 -0400 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-22e6b61d652so820305fac.0; Sun, 05 May 2024 23:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714976445; x=1715581245; darn=nongnu.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=l8uARPOXLgNrD5x5VbymwJHQnEgheFii2ZdPuVb1ADE=; b=C7TYFl/OUjyzRg3618PcWU17mJTcRVgNESYAk2QYRNhZ+CTEft77JPyqd6UoD3oPmu xV1niJuEUTQEV0/v5HXWz2Ec78lAgm/0Uv7YplbBDK/kMILeTDP1JVuanocc5YFKKJjM 19PDz/AKo/lRwNPnBMSy4UXZaV7We8O2jLtuuxiNVoQqxf+3EnGs3YWsYZ67zKZGc1e/ jFU7weptTbRG9O/1F/hfWBuBKaQ9IY5cWKwkgJR6+VWUG9Xc/Cwlv1lLqS0jWdaZEkoS lL6JyGqyOYALoGXJMcbtoKukOu0FEu3GBs/nM9sldksjG4o3o+0RdPeGOwECges48KPm yO+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714976445; x=1715581245; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=l8uARPOXLgNrD5x5VbymwJHQnEgheFii2ZdPuVb1ADE=; b=PuhH+enQrh72HTXTzzD8y7KKsFgu/1RuY/r8DOzylzAXCZUXjjwhOTJcAHhST+A2EF mgIXlonwHzycJaHbjq9Rx6hvEz7b4lV8JMDrZ/JvNWS4OXKtvghqOEN7UBzyoaMvS+XG De7etHwxMdMuXm6DYSNXYZ+Zj4guyT5kbU+EiOvNZL40m9ke8VmQWlryjK/ho2ErYM8A awZyoC7xRQ23PPNs31mjGxX+RJ3RAWd26qKQehDb1UOqvw9YpX861HIAERZQ7AbJRQbV /4Vdxp1XIw4pFsu7CnOIkt/ey8E5s9iOqnHRerKy/pw7XEzLHiDWuuos5+LFneb2pZQX +Zdg== X-Gm-Message-State: AOJu0YxkZLMvqB21lGWWSLTXQc84fNg8SP0Hsxp9nieS05DaRFkuPlrL K9erpya8vTRI0LRuhgig3upC6Aw/heqZECC3VeSZt6hb339PN/lsm6IHvYVL317KnH9XO5vwJlD 36qK/ytEYvZQH6GIkpmvdAnPtQyRw9zJlRbudNg== X-Google-Smtp-Source: AGHT+IGEOTJuGbhS2Bv++AQA/gD1BZPNURqFA0PIAXIvZnIpmdlmfK+SLwRTJdiPMkXT8RyF1hbP6mVxBj3AbSYj35w= X-Received: by 2002:a05:6870:b023:b0:233:b5dd:471c with SMTP id y35-20020a056870b02300b00233b5dd471cmr9815548oae.51.1714976444564; Sun, 05 May 2024 23:20:44 -0700 (PDT) MIME-Version: 1.0 From: Tanmay Date: Mon, 6 May 2024 11:50:30 +0530 Message-ID: Subject: [PATCH] Fixes: Indentation using TABs and improve formatting To: QEMU Developers Cc: qemu-arm@nongnu.org, Peter Maydell , "marcandre.lureau@redhat.com" , pbonzini@redhat.com, richard.henderson@linaro.org Content-Type: multipart/alternative; boundary="000000000000c6e3b70617c3118c" Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:4860:4864:20::33; envelope-from=tanmaynpatil105@gmail.com; helo=mail-oa1-x33.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1714976499714100001 Content-Transfer-Encoding: quoted-printable --000000000000c6e3b70617c3118c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGksCgpJIGhhdmUgYWRkZWQgYSBwYXRjaCBpbmxpbmUgdGhhdCBmaXhlcyBpbmRlbnRhdGlvbiBh bmQgZm9ybWF0dGluZyBmb3Igc29tZQpmaWxlcyBhcyBsaXN0ZWQgaW4gaHR0cHM6Ly9naXRsYWIu Y29tL3FlbXUtcHJvamVjdC9xZW11Ly0vaXNzdWVzLzM3My4KClRoYW5rcywKVGFubWF5CgpGcm9t IDQ2MDI2NTc0ODIxYzQ2ODA0MTExZWVhNjYwN2ExYjM5MzE0YjdhYmUgTW9uIFNlcCAxNyAwMDow MDowMCAyMDAxCkZyb206IFRhbm1heSBQYXRpbCA8dGFubWF5bnBhdGlsMTA1QGdtYWlsLmNvbT4K RGF0ZTogU2F0LCAyNSBOb3YgMjAyMyAwMDo1Mzo1NCArMDUzMApTdWJqZWN0OiBbUEFUQ0hdIEZp eGVzOiBJbmRlbnRhdGlvbiB1c2luZyBUQUJzIGFuZCBpbXByb3ZlIGZvcm1hdHRpbmcKIFJlc29s dmVzOiBodHRwczovL2dpdGxhYi5jb20vcWVtdS1wcm9qZWN0L3FlbXUvLS9pc3N1ZXMvMzczCgog ICBGaWxlcyBjaGFuZ2VkOgogICAgICAgIC0gaHcvYXJtL2Jvb3QuYwogICAgICAgIC0gaHcvY2hh ci9vbWFwX3VhcnQuYwogICAgICAgIC0gaHcvZG1hL3B4YTJ4eF9kbWEuYwogICAgICAgIC0gaHcv Z3Bpby9vbWFwX2dwaW8uYwogICAgICAgIC0gaHcvZ3Bpby96YXVydXMuYwogICAgICAgIC0gaHcv aW5wdXQvdHNjMjAwNS5jCiAgICAgICAgLSBody9pbnB1dC90c2MyMTB4LmMKICAgICAgICAtIGh3 L2ludGMvb21hcF9pbnRjLmMKICAgICAgICAtIGh3L21pc2MvY2J1cy5jCiAgICAgICAgLSBody9t aXNjL29tYXBfY2xrLmMKICAgICAgICAtIGh3L21pc2Mvb21hcF9sNC5jCiAgICAgICAgLSBody9t aXNjL29tYXBfc2RyYy5jCiAgICAgICAgLSBody9taXNjL29tYXBfdGFwLmMKICAgICAgICAtIGh3 L3NkL29tYXBfbW1jLmMKICAgICAgICAtIGh3L3NkL3B4YTJ4eF9tbWNpLmMKICAgICAgICAtIGh3 L3RpbWVyL29tYXBfZ3B0aW1lci5jCiAgICAgICAgLSBody90aW1lci9vbWFwX3N5bmN0aW1lci5j CiAgICAgICAgLSBody90aW1lci9weGEyeHhfdGltZXIuYwogICAgICAgIC0gaW5jbHVkZS9ody9h cm0vcHhhLmgKICAgICAgICAtIGluY2x1ZGUvaHcvYXJtL3NoYXJwc2wuaAogICAgICAgIC0gaW5j bHVkZS9ody9hcm0vc29jX2RtYS5oCiAgICAgICAgLSB0Y2cvYXJtL3RjZy10YXJnZXQuaAoKU2ln bmVkLW9mZi1ieTogVGFubWF5IFBhdGlsIDx0YW5tYXlucGF0aWwxMDVAZ21haWwuY29tPgotLS0K IGh3L2FybS9ib290LmMgICAgICAgICAgICAgfCAgIDggKy0KIGh3L2NoYXIvb21hcF91YXJ0LmMg ICAgICAgfCAgNDkgKy0KIGh3L2RtYS9weGEyeHhfZG1hLmMgICAgICAgfCAxOTggKysrKy0tLS0K IGh3L2dwaW8vb21hcF9ncGlvLmMgICAgICAgfCAyNDMgKysrKystLS0tLQogaHcvZ3Bpby96YXVy dXMuYyAgICAgICAgICB8ICA2MSArLS0KIGh3L2lucHV0L3RzYzIwMDUuYyAgICAgICAgfCAxMzAg KystLS0KIGh3L2lucHV0L3RzYzIxMHguYyAgICAgICAgfCA0NDIgKysrKysrKysrLS0tLS0tLS0K IGh3L2ludGMvb21hcF9pbnRjLmMgICAgICAgfCAyNjEgKysrKystLS0tLQogaHcvbWlzYy9jYnVz LmMgICAgICAgICAgICB8IDIwMiArKysrLS0tLQogaHcvbWlzYy9vbWFwX2Nsay5jICAgICAgICB8 IDk5OSArKysrKysrKysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0tLS0tLQogaHcvbWlzYy9vbWFw X2w0LmMgICAgICAgICB8ICAyMSArLQogaHcvbWlzYy9vbWFwX3NkcmMuYyAgICAgICB8IDEzNSAr KystLS0KIGh3L21pc2Mvb21hcF90YXAuYyAgICAgICAgfCAgMjggKy0KIGh3L3NkL29tYXBfbW1j LmMgICAgICAgICAgfCAyMDggKysrKy0tLS0KIGh3L3NkL3B4YTJ4eF9tbWNpLmMgICAgICAgfCAx NDkgKysrLS0tCiBody90aW1lci9vbWFwX2dwdGltZXIuYyAgIHwgMTI2ICsrLS0tCiBody90aW1l ci9vbWFwX3N5bmN0aW1lci5jIHwgICA3ICstCiBody90aW1lci9weGEyeHhfdGltZXIuYyAgIHwg Mjc5ICsrKysrKy0tLS0tCiBpbmNsdWRlL2h3L2FybS9weGEuaCAgICAgIHwgMTAwICsrLS0KIGlu Y2x1ZGUvaHcvYXJtL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IHZpZGVvX251bV9jb2xzICovCiAgICAgV1JJ VEVfV09SRChwLCAwKTsKICAgICAvKiB2aWRlb19udW1fcm93cyAqLwpkaWZmIC0tZ2l0IGEvaHcv Y2hhci9vbWFwX3VhcnQuYyBiL2h3L2NoYXIvb21hcF91YXJ0LmMKaW5kZXggNjg0OGJkZGI0ZS4u YzJlZjRjMTM3ZSAxMDA2NDQKLS0tIGEvaHcvY2hhci9vbWFwX3VhcnQuYworKysgYi9ody9jaGFy L29tYXBfdWFydC5jCkBAIC02MSw3ICs2MSw3IEBAIHN0cnVjdCBvbWFwX3VhcnRfcyAqb21hcF91 YXJ0X2luaXQoaHdhZGRyIGJhc2UsCiAgICAgcy0+ZmNsayA9M0QgZmNsazsKICAgICBzLT5pcnEg PTNEIGlycTsKICAgICBzLT5zZXJpYWwgPTNEIHNlcmlhbF9tbV9pbml0KGdldF9zeXN0ZW1fbWVt b3J5KCksIGJhc2UsIDIsIGlycSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbWFw X2Nsa19nZXRyYXRlKGZjbGspLzE2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9t YXBfY2xrX2dldHJhdGUoZmNsaykgLyAxNiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBjaHIgPzogcWVtdV9jaHJfbmV3KGxhYmVsLCAibnVsbCIsIE5VTEwpLAogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIERFVklDRV9OQVRJVkVfRU5ESUFOKTsKICAgICByZXR1cm4gczsK QEAgLTc2LDI3ICs3NiwyNyBAQCBzdGF0aWMgdWludDY0X3Qgb21hcF91YXJ0X3JlYWQodm9pZCAq b3BhcXVlLCBod2FkZHIKYWRkciwgdW5zaWduZWQgc2l6ZSkKICAgICB9CgogICAgIHN3aXRjaCAo YWRkcikgewotICAgIGNhc2UgMHgyMDogLyogTURSMSAqLworICAgIGNhc2UgMHgyMDogIC8qIE1E UjEgKi8KICAgICAgICAgcmV0dXJu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ODogLyogU1lTUyAoT01BUDIpICovCisg ICAgY2FzZSAweDQ0OiAgLyogU1NSICovCisgICAgY2FzZSAweDUwOiAgLyogTVZSICovCisgICAg Y2FzZSAweDU4OiAgLyogU1lTUyAoT01BUDIpICovCiAgICAgICAgIE9NQVBfUk9fUkVHKGFkZHIp OwogICAgICAgICBicmVhazsKLSAgICBjYXNlIDB4NTQ6IC8qIFNZU0MgKE9NQVAyKSAqLworICAg IGNhc2UgMHg1NDogIC8qIFNZU0MgKE9NQVAyKSAqLwogICAgICAgICBzLT5zeXNjb250cm9sID0z RCB2YWx1ZSAmIDB4MWQ7Ci0gICAgICAgIGlmICh2YWx1ZSAmIDIpCisgICAgICAgIGlmICh2YWx1 ZSAmIDIpIHsKICAgICAgICAgICAgIG9tYXBfdWFydF9yZXNldChzKTsKKyAgICAgICAgfQogICAg ICAgICBicmVhazsKLSAgICBjYXNlIDB4NWM6IC8qIFdFUiAoT01BUDIpICovCisgICAgY2FzZSAw eDVjOiAgLyogV0VSIChPTUFQMikgKi8KICAgICAgICAgcy0+d2t1cCA9M0QgdmFsdWUgJiAweDdm OwogICAgICAgICBicmVhazsKLSAgICBjYXNlIDB4NjA6IC8qIENGUFMgKE9NQVAyKSAqLworICAg IGNhc2UgMHg2MDogIC8qIENGUFMgKE9NQVAyKSAqLwogICAgICAgICBzLT5jZnBzID0zRCB2YWx1 ZSAmIDB4ZmY7CiAgICAgICAgIGJyZWFrOwogICAgIGRlZmF1bHQ6CmRpZmYgLS1naXQgYS9ody9k bWEvcHhhMnh4X2RtYS5jIGIvaHcvZG1hL3B4YTJ4eF9kbWEuYwppbmRleCA5ZjYyZjBiNjMzLi5i ZWVkMWNkOWE1IDEwMDY0NAotLS0gYS9ody9kbWEvcHhhMnh4X2RtYS5jCisrKyBiL2h3L2RtYS9w eGEyeHhfZG1hLmMKQEAgLTYxLDk4ICs2MSwxMDQgQEAgc3RydWN0IFBYQTJ4eERNQVN0YXRlIHsK ICAgICBpbnQgcnVubmluZzs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AgaWYgKChz LT5jaGFuW2NoXS5zdGF0ZSAmIERDU1JfUkFTSVJRRU4pICYmCi0gICAgICAgICAgICAgICAgKHMt PmNoYW5bY2hdLnN0YXRlICYgRENTUl9SQVNJTlRSKSkKKyAgICAgICAgICAgICAgICAocy0+Y2hh bltjaF0uc3RhdGUgJiBEQ1NSX1JBU0lOVFIpKSB7CiAgICAgICAgICAgICBzLT5yYXNpbnRyIHw9 M0QgMSA8PCBjaDsKLSAgICAgICAgZWxzZQorICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAg cy0+cmFzaW50ciAmPTNEIH4oMSA8PCBjaCk7CisgICAgICAgIH0KCi0gICAgICAgIGlmIChzLT5j aGFuW2NoXS5zdGF0ZSAmIERDU1JfU1RBUlRJTlRSKQorICAgICAgICBpZiAocy0+Y2hhbltjaF0u c3RhdGUgJiBEQ1NSX1NUQVJUSU5UUikgewogICAgICAgICAgICAgcy0+c3RhcnRpbnRyIHw9M0Qg MSA8PCBjaDsKLSAgICAgICAgZWxzZQorICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgcy0+ c3RhcnRpbnRyICY9M0QgfigxIDw8IGNoKTsKKyAgICAgICAgfQoKLSAgICAgICAgaWYgKHMtPmNo YW5bY2hdLnN0YXRlICYgRENTUl9FTkRJTlRSKQorICAgICAgICBpZiAocy0+Y2hhbltjaF0uc3Rh dGUgJiBEQ1NSX0VORElOVFIpIHsKICAgICAgICAgICAgIHMtPmVuZGludHIgfD0zRCAxIDw8IGNo OwotICAgICAgICBlbHNlCisgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICBzLT5lbmRpbnRy ICY9M0QgfigxIDw8IGNoKTsKKyAgICAgICAgfQogICAgIH0KCi0gICAgaWYgKHMtPnN0b3BpbnRy IHwgcy0+ZW9yaW50ciB8IHMtPnJhc2ludHIgfCBzLT5zdGFydGludHIgfCBzLT5lbmRpbnRyKQor ICAgIGlmIChzLT5zdG9waW50ciB8IHMtPmVvcmludHIgfCBzLT5yY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ydW5uaW5nKSB7CiAgICAgICAgIHMtPnJ1bm5pbmcgPTNEIDE7 Ci0gICAgICAgIGZvciAoYyA9M0QgMDsgYyA8IHMtPmNoYW5uZWxzOyBjICsrKSB7CisgICAgICAg IGZvciAoYyA9M0QgMDsgYyA8IHMtPmNoYW5uZWxzOyBjKyspIHsKICAgICAgICAgICAgIGNoID0z RCAmcy0+Y2hhbltjXTsKCiAgICAgICAgICAgICB3aGlsZSAoKGNoLT5zdGF0ZSAmIERDU1JfUlVO KSAmJiAhKGNoLT5zdGF0ZSAmIERDU1JfU1RPUElOVFIpKQp7CiAgICAgICAgICAgICAgICAgLyog VGVzdCBmb3IgcGVuZGluZyByZXF1ZXN0cyAqLwotICAgICAgICAgICAgICAgIGlmICgoY2gtPmNt ZCAmIChEQ01EX0ZMT1dTUkMgfCBEQ01EX0ZMT1dUUkcpKSAmJgohY2gtPnJlcXVlc3QpCisgICAg ICAgICAgICAgICAgaWYgKChjaC0+Y21kICYgKERDTURfRkxPV1NSQyB8IERDTURfRkxPV1RSRykp ICYmCiFjaC0+cmVxdWVzdCkgewogICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAg ICAgICAgICB9CgogICAgICAgICAgICAgICAgIGxlbmd0aCA9M0QgY2gtPmNtZCAmIERDTURfTEVO OwogICAgICAgICAgICAgICAgIHNpemUgPTNEIERDTURfU0laRShjaC0+Y21kKTsKQEAgLTIyOCwx MSArMjQxLDEzIEBAIHN0YXRpYyB2b2lkIHB4YTJ4eF9kbWFfcnVuKFBYQTJ4eERNQVN0YXRlICpz KQogICAgICAgICAgICAgICAgICAgICBpZiAoKGNoLT5jbWQgJiAoRENNRF9GTE9XU1JDIHwgRENN RF9GTE9XVFJHKSkgJiYKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAhY2gtPnJlcXVlc3Qp IHsKICAgICAgICAgICAgICAgICAgICAgICAgIGNoLT5zdGF0ZSB8PTNEIERDU1JfRU9SSU5UOwot ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoLT5zdGF0ZSAmIERDU1JfRU9SU1RPUEVOKQor ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoLT5zdGF0ZSAmIERDU1JfRU9SU1RPUEVOKSB7 CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2gtPnN0YXRlIHw9M0QgRENTUl9TVE9QSU5U UjsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgIGlm ICgoY2gtPnN0YXRlICYgRENTUl9FT1JKTVBFTikgJiYKLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAhKGNoLT5zdGF0ZSAmIERDU1JfTk9ERVNDRkVUQ0gpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICEoY2gtPnN0YXRlICYgRENTUl9OT0RF U0NGRVRDSCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBweGEyeHhfZG1hX2Rlc2Ny aXB0b3JfZmV0Y2gocywgYyk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAg ICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAg ICAgIH0KQEAgLTI0MSw4ICsyNTYsOSBAQCBzdGF0aWMgdm9pZCBweGEyeHhfZG1hX3J1bihQWEEy eHhETUFTdGF0ZSAqcykKCiAgICAgICAgICAgICAgICAgLyogSXMgdGhlIHRyYW5zZmVyIGNvbXBs ZXRlIG5vdz8gKi8KICAgICAgICAgICAgICAgICBpZiAoIWxlbmd0aCkgewotICAgICAgICAgICAg ICAgICAgICBpZiAoY2gtPmNtZCAmIERDTURfRU5ESVJRRU4pCisgICAgICAgICAgICAgICAgICAg IGlmIChjaC0+Y21kICYgRENNRF9FTkRJUlFFTikgewogICAgICAgICAgICAgICAgICAgICAgICAg Y2gtPnN0YXRlIHw9M0QgRENTUl9FTkRJTlRSOworICAgICAgICAgICAgICAgICAg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3RhdGUg fD0zRCBEQ1NSX0NNUFNUOworICAgICAgICB9CgogICAgICAgICBweGEyeHhfZG1hX3VwZGF0ZShz LCBjaGFubmVsKTsKICAgICAgICAgYnJlYWs7CkBAIC00MzksMTkgKzQ2MCwyMyBAQCBzdGF0aWMg dm9pZCBweGEyeHhfZG1hX3JlcXVlc3Qodm9pZCAqb3BhcXVlLCBpbnQKcmVxX251bSwgaW50IG9u KQogewogICAgIFBYQTJ4eERNQVN0YXRlICpzID0zRCBvcGFxdWU7CiAgICAgaW50IGNoOwotICAg IGlmIChyZXFfbnVtIDwgMCB8fCByZXFfbnVtID49M0QgUFhBMlhYX0RNQV9OVU1fUkVRVUVTVFMp CisgICAgaWYgKHJlcV9udW0gPCAwIHx8IHJlcV9udW0gPj0zRCBQWEEyWFhfRE1BX05VTV9SRVFV RVNUUykgewogICAgICAgICBod19lcnJvcigiJXM6IEJhZCBETUEgcmVxdWVzdCAlaVxuIiwgX19m dW5jX18sIHJlcV9udW0pOworICAgIH0KCi0gICAgaWYgKCEocy0+cmVxW3JlcV9udW1dICYgRFJD TVJfTUFQVkxEKSkKKyAgICBpZiAoIShzLT5yZXFbcmVxX251bV0gJiBEUkNNUl9NQVBWTEQpKSB7 CiAgICAgICAgIHJldHVybjsKKyAgICB9CiAgICAgY2ggPTNEIHMtPnJlcVtyZXFfbnVtXSAmIERS Q01SX0NITE5VTTsKCi0gICAgaWYgKCFzLT5jaGFuW2NoXS5yZXF1ZXN0ICYmIG9uKQorICAgIGlm ICghcy0+Y2hhbltjaF0ucmVxdWVzdCAmJiBvbikgewogICAgICAgICBzLT5jaGFuW2NoXS5zdGF0 ZSB8PTNEIERDU1JfUkFTSU5UUjsKLSAgICBlbHNlCisgICAgfSBlbHNlIHsKICAgICAgICAgcy0+ Y2hhbltjaF0uc3RhdGUgJj0zRCB+RENTUl9SQVNJTlRSOwotICAgIGlmIChzLT5jaGFuW2NoXS5y ZXF1ZXN0ICYmICFvbikKKyAgICB9CisgICAgaWYgK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UFTSyAqLwogICAgICAgICByZXR1cm4gcy0+bWFzazsKCi0gICAgY2FzZSAw eDE0OiAvKiBJTlRFUlJVUFRfU1RBVFVTICovCisgICAgY2FzZSAweDE0OiAgLyogSU5URVJSVVBU X1NUQVRVUyAqLwogICAgICAgICByZXR1cm4gcy0+aW50czsKCi0gICAgY2FzZSAweDE4OiAvKiBQ SU5fQ09OVFJPTCAobm90IGluIE9NQVAzMTApICovCisgICAgY2FzZSAweDE4OiAgLyogUElOX0NP TlRST0wgKG5vdCBpbiBPTUFQMzEwKSAqLwogICAgICAgICBPTUFQX0JBRF9SRUcoYWRkcik7CiAg ICAgICAgIHJldHVybiBzLT5waW5zOwogICAgIH0KQEAgLTEyMSw0NyArMTIyLDUwIEBAIHN0YXRp YyB2b2lkIG9tYXBfZ3Bpb193cml0ZSh2b2lkICpvcGFxdWUsIGh3YWRkciBhZGRyLAogICAgIH0K CiAgICAgc3dpdGNoIChvZmZzZXQpIHsKLSAgICBjYXNlIDB4MDA6IC8qIERBVEFfSU5QVVQgKi8K KyAgICBjYXNlIDB4MDA6ICAvKiBEQVRBX0lOUFVUICovCiAgICAgICAgIE9NQVBfUk9fUkVHKGFk ZHIpOwogICAgICAgICByZXR1cm47CgotICAgIGNhc2UgMHgwNDogLyogREFUQV9PVVRQVVQgKi8K KyAgICBjYXNlIDB4MDQ6ICAvKiBEQVRBX09VVFBVVCAqLwogICAgICAgICBkaWZmID0zRCAocy0+ b3V0cHV0cyBeIHZhbHVlKSAmIH5zLT5kaXI7CiAgICAgICAgIHMtPm91dHB1dHMgPTNEIHZhbHVl OwogICAgICAgICB3aGlsZSAoKGxuID0zRCBjdHozMihkaWZmKSkgIT0zRCAzMikgewotICAgICAg ICAgICAgaWYgKHMtPmhhbmRsZXJbbG5dKQorICAgICAgICAgICAgaWYgKHMtPmhhbmRsZXJbbG5d KSB7CiAgICAgICAgICAgICAgICAgcWVtdV9zZXRfaXJxKHMtPmhhbmRsZXJbbG5dLCAodmFsdWUg Pj4gbG4pICYgMSk7CisgICAgICAgICAgICB9CiAgICAgICAgICAgICBkaWZmICY9M0QgfigxIDw8 IGxuKTsKICAgICAgICAgfQogICAgICAgICBicmVhazsKCi0gICAgY2FzZSAweDA4OiAvKiBESVJF Q1RJT05fQ09OVFJPTCAqLworICAgIGNhc2UgMHgwODogIC8qIERJUkVDVElPTl9DT05UUk9MICov CiAgICAgICAgIGRpZmYgPTNEIHMtPm91dHB1dHMgJiAocy0+ZGlyIF4gdmFsdWUpOwogICAgICAg ICBzLT5kaXIgPTNEIHZhbHVlOwoKICAgICAgICAgdmFsdWUgPTNEIHMtPm91dHB1dHMgJiB+cy0+ ZGlyOwogICAgICAgICB3aGlsZSAoKGxuID0zRCBjdHozMihkaWZmKSkgIT0zRCAzMikgewotICAg ICAgICAgICAgaWYgKHMtPmhhbmRsZXJbbG5dKQorICAgICAgICAgICAgaWYgKHMtPmhhbmRsZXJb bG5dKSB7CiAgICAgICAgICAgICAgICAgcWVtdV9zZXRfaXJxKHMtPmhhbmRsZXJbbG5dLCAodmFs dWUgPj4gbG4pICYgMSk7CisgICAgICAgICAgICB9CiAgICAgICAgICAgICBkaWZmICY9M0Qgfigx IDw8IGxuKTsKICAgICAgICAgfQogICAgICAgICBicmVhazsKCi0gICAgY2FzZSAweDBjOiAvKiBJ TlRFUlJVUFRfQ09OVFJPTCAqLworICAgIGNhc2UgMHgwYzogIC8qIElOVEVSUlVQVF9DT05UUk9M ICovCiAgICAgICAgIHMtPmVkZ2UgPTNEIHZhbHVlOwogICAgICAgICBicmVhazsKCi0gICAgY2Fz ZSAweDEwOiAvKiBJTlRFUlJVUFRfTUFTSyAqLworICAgIGNhc2UgMHgxMDogIC8qIElOVEVSUlVQ VF9NQVNLICovCiAgICAgICAgIHMtPm1hc2sgPTNEIHZhbHVlOwogICAgICAgICBicmVhazsKCi0g ICAgY2FzZSAweDE0OiAvKiBJTlRFUlJVUFRfU1RBVFVTICovCisgICAgY2FzZSAweDE0OiAgLyog SU5URVJSVVBUX1NUQVRVUyAqLwogICAgICAgICBzLT5pbnRzICY9M0QgfnZhbHVlOwotICAgICAg ICBpZiAoIXMtPmludHMpCisgICAgICAgIGlmICghcy0+aW50cykgewogICAgICAgICAgICAgcWVt dV9pcnFfbG93ZXIocy0+aXJxKTsKKyAgICAgICAgfQogICAgICAgICBicmVhazsKCi0gICAgY2Fz ZSAweDE4OiAvKiBQSU5fQ09OVFJPTCAobm90IGluIE9NQVAzMTAgVFJNKSAqLworICAgIGNhc2Ug MHgxODogIC8qIFBJTl9DT05UUk9MIChub3QgaW4gT01BUDMxMCBUUk0pICovCiAgICAgICAgIE9N QVBfQkFEX1JFRyhhZGRyKTsKICAgICAgICAgcy0+cGlucyA9M0QgdmFsdWU7CiAgICAgICAgIGJy ZWFrOwpAQCAtMjMzLDEyICsyMzcsMTUgQEAgc3RhdGljIGlubGluZSB2b2lkCm9tYXAyX2dwaW9f bW9kdWxlX2ludF91cGRhdGUoc3RydWN0IG9tYXAyX2dwaW9fcyAqcywKCiBzdGF0aWMgdm9pZCBv bWFwMl9ncGlvX21vZHVsZV93YWtlKHN0cnVjdCBvbWFwMl9ncGlvX3MgKnMsIGludCBsaW5lKQog ewotICAgIGlmICghKHMtPmNvbmZpZ1swXSAmICgxIDw8IDIpKSkgLyogRU5BV0FLRVVQICovCisg ICAgaWYgKCEocy0+Y29uZmlnWzBdICYgKDEgPDwgMikpKSB7ICAgLyogRU5BV0FLRVVQICovCiAg ICAgICAgIHJldHVybjsKLSAgICBpZiAoIShzLT5jb25maWdbMF0gJiAoMyA8PCAzKSkpIC8qIEZv cmNlIElkbGUgKi8KKyAgICB9CisgICAgaWYgKCEocy0+Y29uZmlnWzBdICYgKDMgPDwgMykpKSB7 ICAgLyogRm9yY2UgSWRsZSAqLwogICAgICAgICByZXR1cm47Ci0gICAgaWYgKCEocy0+d3VtYXNr ICYgKDEgPDwgbGluZSkpKQorICAgIH0KKyAgICBpZiAoIShzLT53dW1hc2sgJiAoMSA8PCBsaW5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Bpb19zICpzID0zRCBvcGFxdWU7CgogICAgIHN3aXRjaCAo YWRkcikgewotICAgIGNhc2UgMHgwMDogLyogR1BJT19SRVZJU0lPTiAqLworICAgIGNhc2UgMHgw MDogIC8qIEdQSU9fUkVWSVNJT04gKi8KICAgICAgICAgcmV0dXJuIHMtPnJldmlzaW9uOwoKLSAg ICBjYXNlIDB4MTA6IC8qIEdQSU9fU1lTQ09ORklHICovCisgICAgY2FzZSAweDEwOiAgLyogR1BJ T19TWVNDT05GSUcgKi8KICAgICAgICAgcmV0dXJuIHMtPmNvbmZpZ1swXTsKCi0gICAgY2FzZSAw eDE0OiAvKiBHUElPX1NZU1NUQVRVUyAqLworICAgIGNhc2UgMHgxNDogIC8qIEdQSU9fU1lTU1RB VFVTICovCiAgICAgICAgIHJldHVybiAweDAxOwoKLSAgICBjYXNlIDB4MTg6IC8qIEdQSU9fSVJR U1RBVFVTMSAqLworICAgIGNhc2UgMHgxODogIC8qIEdQSU9fSVJRU1RBVFVTMSAqLwogICAgICAg ICByZXR1cm4gcy0+aW50c1swXTsKCi0gICAgY2FzZSAweDFjOiAvKiBHUElPX0lSUUVOQUJMRTEg Ki8KLSAgICBjYXNlIDB4NjA6IC8qIEdQSU9fQ0xFQVJJUlFFTkFCTEUxICovCi0gICAgY2FzZSAw eDY0OiAvKiBHUElPX1NFVElSUUVOQUJMRTEgKi8KKyAgICBjYXNlIDB4MWM6ICAvKiBHUElPX0lS UUVOQUJMRTEgKi8KKyAgICBjYXNlIDB4NjA6ICAvKiBHUElPX0NMRUFSSVJRRU5BQkxFMSAqLwor ICAgIGNhc2UgMHg2NDogIC8qIEdQSU9fU0VUSVJRRU5BQkxFMSAqLwogICAgICAgICByZXR1cm4g cy0+bWFza1swXTsKCi0gICAgY2FzZSAweDIwOiAvKiBHUElPX1dBS0VVUEVOQUJMRSAqLwotICAg IGNhc2UgMHg4MDogLyogR1BJT19DTEVBUldLVUVOQSAqLwotICAgIGNhc2UgMHg4NDogLyogR1BJ T19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gICBjYXNlIDB4M2M6IC8qIEdQSU9fREFUQU9V VCAqLwotICAgIGNhc2UgMHg5MDogLyogR1BJT19DTEVBUkRBVEFPVVQgKi8KLSAgICBjYXNlIDB4 OTQ6IC8qIEdQSU9fU0VUREFUQU9VVCAqLworICAgIGNhc2UgMHgzYzogIC8qIEdQSU9fREFUQU9V VCAqLworICAgIGNhc2UgMHg5MDogIC8qIEdQSU9fQ0xFQVJEQVRBT1VUICovCisgICAgY2FzZSAw eDk0OiAgLyogR1BJT19TRVREQVRBT1VUICovCiAgICAgICAgIHJldHVybiBzLT5vdXRwdXRzOwoK LSAgICBjYXNlIDB4NDA6IC8qIEdQSU9fTEVWRUxERVRFQ1QwICovCisgICAgY2FzZSAweDQwOiAg LyogR1BJT19MRVZFTERFVEVDVDAgKi8KICAgICAgICAgcmV0dXJuIHMtPmxldmVsWzBdOwoKLSAg ICBjYXNlIDB4NDQ6IC8qIEdQSU9fTEVWRUxERVRFQ1QxICovCisgICAgY2FzZSAweDQ0OiAgLyog R1BJT19MRVZFTERFVEVDVDEgKi8KICAgICAgICAgcmV0dXJuIHMtPmxldmVsWzFdOwoKLSAgICBj YXNlIDB4NDg6IC8qIEdQSU9fUklTSU5HREVURUNUICovCisgICAgY2FzZSAweDQ4OiAgLyogR1BJ T19SSVNJTkdERVRFQ1QgKi8KICAgICAgICAgcmV0dXJuIHMtPmVkZ2VbMF07CgotICAgIGNhc2Ug MHg0YzogLyogR1BJT19GQUxMSU5HREVURUNUICovCisgICAgY2FzZSAweDRjOiAgLyogR1BJT19G QUxMSU5HREVURUNUICovCiAgICAgICAgIHJldHVybiBzLT5lZGdlWzFdOwoKLSAgICBjYXNlIDB4 NTA6IC8qIEdQSU9fREVCT1VOQ0VOQUJMRSAqLworICAgIGNhc2UgMHg1MDogIC8qIEdQSU9fREVC T1VOQ0VOQUJMRSAqLwogICAgICAgICByZXR1cm4gcy0+ZGVib3VuY2U7CgotICAgIGNhc2UgMHg1 NDogLyogR1BJT19ERUJPVU5DSU5HVElNRSAqLworICAgIGNhc2UgMHg1NDogIC8qIEdQSU9fREVC T1VOQ0lOR1RJTUUgKi8KICAgICAgICAgcmV0dXJuIHMtPmRlbGF5OwogICAgIH0KCkBAIC0zODcs NTUgKzM5Niw1NiBAQCBzdGF0aWMgdm9pZCBvbWFwMl9ncGlvX21vZHVsZV93cml0ZSh2b2lkICpv cGFxdWUsCmh3YWRkciBhZGRyLAogICAgIGludCBsbjsKCiAgICAgc3dpdGNoIChhZGRyKSB7Ci0g ICAgY2FzZSAweDAwOiAvKiBHUElPX1JFVklTSU9OICovCi0gICAgY2FzZSAweDE0OiAvKiBHUElP X1NZU1NUQVRVUyAqLwotICAgIGNhc2UgMHgzODogLyogR1BJT19EQVRBSU4gKi8KKyAgICBjYXNl IDB4MDA6ICAvKiBHUElPX1JFVklTSU9OICovCisgICAgY2FzZSAweDE0OiAgLyogR1BJT19TWVNT VEFUVVMgKi8KKyAgICBjYXNlIDB4Mzg6ICAvKiBHUElPX0RBVEFJTiAqLwogICAgICAgICBPTUFQ X1JPX1JFRyhhZGRyKTsKICAgICAgICAgYnJlYWs7CgotICAgIGNhc2UgMHgxMDogLyogR1BJT19T WVNDT05GSUcgKi8KKyAgICBjYXNlIDB4MTA6ICAvKiBHUElPX1NZU0NPTkZJRyAqLwogICAgICAg ICBpZiAoKCh2YWx1ZSA+PiAzKSAmIDMpID0zRD0zRCAzKSB7CiAgICAgICAgICAgICBxZW11X2xv Z19tYXNrKExPR19HVUVTVF9FUlJPUiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIiVzOiBJ bGxlZ2FsIElETEVNT0RFIHZhbHVlOiAzXG4iLCBfX2Z1bmNfXyk7CiAgICAgICAgIH0KLSAgICAg ICAgaWYgKHZhbHVlICYgMikKKyAgICAgICAgaWYgKHZhbHVlICYgMikgewogICAgICAgICAgICAg b21hcDJfZ3Bpb19tb2R1bGVfcmVzZXQocyk7CisgICAgICAgIH0KICAgICAgICAgcy0+Y29uZmln WzBdID0zRCB2YWx1ZSAmIDB4MWQ7CiAgICAgICAgIGJyZWFrOwoKLSAgICBjYXNlIDB4MTg6IC8q IEdQSU9fSVJRU1RBVFVTMSAqLworICAgIGNhc2UgMHgxODogIC8qIEdQSU9fSVJRU1RBVFVTMSAq LwogICAgICAgICBpZiAocy0+aW50c1swXSAmIHZhbHVlKSB7CiAgICAgICAgICAgICBzLT5pbnRz WzBdICY9M0QgfnZhbHVlOwogICAgICAgICAgICAgb21hcDJfZ3Bpb19tb2R1bGVfbGV2ZWxfdXBk YXRlKHMsIDApOwogICAgICAgICB9CiAgICAgICAgIGJyZWFrOwoKLSAgICBjYXNlIDB4MWM6IC8q IEdQSU9fSVJRRU5BQkxFMSAqLworICAgIGNhc2UgMHgxYzogIC8qIEdQSU9fSVJRRU5BQkxFMSAq LwogICAgICAgICBzLT5tYXNrWzBdID0zRCB2YWx1ZTsKICAgICAgICAgb21hcDJfZ3Bpb19tb2R1 bGVfaW50X3VwZGF0ZShzLCAwKTsKICAgICAgICAgYnJlYWs7CgotICAgIGNhc2UgMHgyMDogLyog R1BJT19XQUtFVVBFTkFCTEUgKi8KKyAgICBjYXNlIDB4MjA6ICAvKiBHUElPX1dBS0VVUEVOQUJM RSAqLwogICAgICAgICBzLT53dW1hc2sgPTNEIHZhbHVlOwogICAgICAgICBicmVhazsKCi0gICAg Y2FzZSAweDI4OiAvKiBHUElPX0lSUVNUQVRVUzIgKi8KKyAgICBjYXNlIDB4Mjg6ICAvKiBHUElP X0lSUVNUQVRVUzIgKi8KICAgICAgICAgaWYgKHMtPmludHNbMV0gJiB2YWx1ZSkgewogICAgICAg ICAgICAgcy0+aW50c1sxXSAmPTNEIH52YWx1ZTsKICAgICAgICAgICAgIG9tYXAyX2dwaW9fbW9k dWxlX2xldmVsX3VwZGF0ZShzLCAxKTsKICAgICAgICAgfQogICAgICAgICBicmVhazsKCi0gICAg Y2FzZSAweDJjOiAvKiBHUElPX0lSUUVOQUJMRTIgKi8KKyAgICBjYXNlI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dXBkYXRlKHMsIDApOwogICAgICAgICBvbWFwMl9ncGlvX21vZHVsZV9sZXZl bF91cGRhdGUocywgMSk7CiAgICAgICAgIGJyZWFrOwoKLSAgICBjYXNlIDB4NDQ6IC8qIEdQSU9f TEVWRUxERVRFQ1QxICovCisgICAgY2FzZSAweDQ0OiAgLyogR1BJT19MRVZFTERFVEVDVDEgKi8K ICAgICAgICAgcy0+bGV2ZWxbMV0gPTNEIHZhbHVlOwogICAgICAgICBvbWFwMl9ncGlvX21vZHVs ZV9sZXZlbF91cGRhdGUocywgMCk7CiAgICAgICAgIG9tYXAyX2dwaW9fbW9kdWxlX2xldmVsX3Vw ZGF0ZShzLCAxKTsKICAgICAgICAgYnJlYWs7CgotICAgIGNhc2UgMHg0ODogLyogR1BJT19SSVNJ TkdERVRFQ1QgKi8KKyAgICBjYXNlIDB4NDg6ICAvKiBHUElPX1JJU0lOR0RFVEVDVCAqLwogICAg ICAgICBzLT5lZGdlWzBdID0zRCB2YWx1ZTsKICAgICAgICAgYnJlYWs7CgotICAgIGNhc2UgMHg0 YzogLyogR1BJT19GQUxMSU5HREVURUNUICovCisgICAgY2FzZSAweDRjOiAgLyogR1BJT19GQUxM SU5HREVURUNUICovCiAgICAgICAgIHMtPmVkZ2VbMV0gPTNEIHZhbHVlOwogICAgICAgICBicmVh azsKCi0gICAgY2FzZSAweDUwOiAvKiBHUElPX0RFQk9VTkNFTkFCTEUgKi8KKyAgICBjYXNlIDB4 NTA6ICAvKiBHUElPX0RFQk9VTkNFTkFCTEUgKi8KICAgICAgICAgcy0+ZGVib3VuY2UgPTNEIHZh bHVlOwogICAgICAgICBicmVhazsKCi0gICAgY2FzZSAweDU0OiAvKiBHUElPX0RFQk9VTkNJTkdU SU1FICovCisgICAgY2FzZSAweDU0OiAgLyogR1BJT19ERUJPVU5DSU5HVElNRSAqLwogICAgICAg ICBzLT5kZWxheSA9M0QgdmFsdWU7CiAgICAgICAgIGJyZWFrOwoKLSAgICBjYXNlIDB4NjA6IC8q IEdQSU9fQ0xFQVJJUlFFTkFCTEUxICovCisgICAgY2FzZSAweDYwOiAgLyogR1BJT19DTEVBUklS UUVOQUJMRTEgKi8KICAgICAgICAgcy0+bWFza1swXSAmPTNEIH52YWx1ZTsKICAgICAgICAgb21h cDJfZ3Bpb19tb2R1bGVfaW50X3VwZGF0ZShzLCAwKTsKICAgICAgICAgYnJlYWs7CgotICAgIGNh c2UgMHg2NDogLyogR1BJT19TRVRJUlFFTkFCTEUxICovCisgICAgY2FzZSAweDY0OiAgLyogR1BJ T19TRVRJUlFFTkFCTEUxICovCiAgICAgICAgIHMtPm1hc2tbMF0gfD0zRCB2YWx1ZTsKICAgICAg ICAgb21hcDJfZ3Bpb19tb2R1bGVfaW50X3VwZGF0ZShzLCAwKTsKICAgICAgICAgYnJlYWs7Cgot ICAgIGNhc2UgMHg3MDogLyogR1BJT19DTEVBUklSUUVOQUJMRTIgKi8KKyAgICBjYXNlIDB4NzA6 ICAvKiBHUElPX0NMRUFSSVJRRU5BQkxFMiAqLwogICAgICAgICBzLT5tYXNrWzFdICY9M0QgfnZh bHVlOwogICAgICAgICBvbWFwMl9ncGlvX21vZHVsZV9pbnRfdXBkYXRlKHMsIDEpOwogICAgICAg ICBicmVhazsKCi0gICAgY2FzZSAweDc0OiAvKiBHUElPX1NFVElSRVFORUFCTEUyICovCisgICAg Y2FzZSAweDc0OiAgLyogR1BJT19TRVRJUkVRTkVBQkxFMiAqLwogICAgICAgICBzLT5tYXNrWzFd IHw9M0QgdmFsdWU7CiAgICAgICAgIG9tYXAyX2dwaW9fbW9kdWxlX2ludF91cGRhdGUocywgMSk7 CiAgICAgICAgIGJyZWFrOwoKLSAgICBjYXNlIDB4ODA6IC8qIEdQSU9fQ0xFQVJXS1VFTkEgKi8K KyAgICBjYXNlIDB4ODA6ICAvKiBHUElPX0NMRUFSV0tVRU5BICovCiAgICAgICAgIHMtPnd1bWFz ayAmPTNEIH52YWx1ZTsKICAgICAgICAgYnJlYWs7CgotICAgI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gICAgY2FzZSAweDY0OiAgLyogR1BJT19TRVRJUlFFTkFCTEUxICovCisgICAgY2Fz ZSAweDcwOiAgLyogR1BJT19DTEVBUklSUUVOQUJMRTIgKi8KKyAgICBjYXNlIDB4NzQ6ICAvKiBH UElPX1NFVElSRVFORUFCTEUyICovCisgICAgY2FzZSAweDgwOiAgLyogR1BJT19DTEVBUldLVUVO QSAqLworICAgIGNhc2UgMHg4NDogIC8qIEdQSU9fU0VUV0tVRU5BICovCisgICAgY2FzZSAweDkw OiAgLyogR1BJT19DTEVBUkRBVEFPVVQgKi8KKyAgICBjYXNlIDB4OTQ6ICAvKiBHUElPX1NFVERB VEFPVVQgKi8KICAgICAgICAgdmFsdWUgPDw9M0QgKGFkZHIgJiAzKSA8PCAzOwogICAgICAgICBv bWFwMl9ncGlvX21vZHVsZV93cml0ZShvcGFxdWUsIGFkZHIsIGN1ciB8IHZhbHVlKTsKICAgICAg ICAgYnJlYWs7CkBAIC02MTYsMjIgKzYyNiwyMiBAQCBzdGF0aWMgdWludDY0X3Qgb21hcDJfZ3Bp Zl90b3BfcmVhZCh2b2lkICpvcGFxdWUsCmh3YWRkciBhZGRyLCB1bnNpZ25lZCBzaXplKQogICAg IE9tYXAyR3Bpb1N0YXRlICpzID0zRCBvcGFxdWU7CgogICAgIHN3aXRjaCAoYWRkcikgewotICAg IGNhc2UgMHgwMDogLyogSVBHRU5FUklDT0NQU1BMX1JFVklTSU9OICovCisgICAgY2FzZSAweDAw OiAgLyogSVBHRU5FUklDT0NQU1BMX1JFVklTSU9OICovCiAgICAgICAgIHJldHVybiAweDE4OwoK LSAgICBjYXNlIDB4MTA6IC8qIElQR0VORVJJQ09DUFNQTF9TWVNDT05GSUcgKi8KKyAgICBjYXNl IDB4MTA6ICAvKiBJUEdFTkVSSUNPQ1BTUExfU1lTQ09ORklHICovCiAgICAgICAgIHJldHVybiBz LT5hdXRvaWRsZTsKCi0gICAgY2FzZSAweDE0OiAvKiBJUEdFTkVSSUNPQ1BTUExfU1lTU1RBVFVT ICovCisgICAgY2FzZSAweDE0OiAgLyogSVBHRU5FUklDT0NQU1BMX1NZU1NUQVRVUyAqLwogICAg ICAgICByZXR1cm4gMHgwMTsKCi0gICAgY2FzZSAweDE4OiAvKiBJUEdFTkVSSUNPQ1BTUExfSVJR U1RBVFVTICovCisgICAgY2FzZSAweDE4OiAgLyogSVBHRU5FUklDT0NQU1BMX0lSUVNUQVRVUyAq LwogICAgICAgICByZXR1cm4gMHgwMDsKCi0gICAgY2FzZSAweDQwOiAvKiBJUEdFTkVSSUNPQ1BT UExfR1BPICovCisgICAgY2FzZSAweDQwOiAgLyogSVBHRU5FUklDT0NQU1BMX0dQTyAqLwogICAg ICAgICByZXR1cm4gcy0+Z3BvOwoKLSAgICBjYXNlIDB4NTA6IC8qIElQR0VORVJJQ09DUFNQTF9H UEkgKi8KKyAgICBjYXNlIDB4NTA6ICAvKiBJUEdFTkVSSUNPQ1BTUExfR1BJICovCiAgICAgICAg IHJldHVybiAweDAwOwogICAgIH0KCkBAIC02NDUsMjAgKzY1NSwyMSBAQCBzdGF0aWMgdm9pZCBv bWFwMl9ncGlmX3RvcF93cml0ZSh2b2lkICpvcGFxdWUsIGh3YWRkcgphZGRyLAogICAgIE9tYXAy R3Bpb1N0YXRlICpzID0zRCBvcGFxdWU7CgogICAgIHN3aXRjaCAoYWRkcikgewotICAgIGNhc2Ug MHgwMDogLyogSVBHRU5FUklDT0NQU1BMX1JFVklTSU9OICovCi0gICAgY2FzZSAweDE0OiAvKiBJ UEdFTkVSSUNPQ1BTUExfU1lTU1RBVFVTICovCi0gICAgY2FzZSAweDE4OiAvKiBJUEdFTkVSSUNP Q1BTUExfSVJRU1RBVFVTICovCi0gICAgY2FzZSAweDUwOiAvKiBJUEdFTkVSSUNPQ1BTUExfR1BJ ICovCisgICAgY2FzZSAweDAwOiAgLyogSVBHRU5FUklDT0NQU1BMX1JFVklTSU9OICovCisgICAg Y2FzZSAweDE0OiAgLyogSVBHRU5FUklDT0N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ZTsKICAgICB1aW50MzJfdCByZXQgPTNE IDA7CgotICAgIHN3aXRjaCAocy0+c3RhdGUgKyspIHsKKyAgICBzd2l0Y2ggKHMtPnN0YXRlKysp IHsKICAgICBjYXNlIDA6CiAgICAgICAgIGlmICh2YWx1ZSAmIDB4ODApIHsKICAgICAgICAgICAg IC8qIENvbW1hbmQgKi8KQEAgLTM0Myw4ICszNDksOSBAQCBzdGF0aWMgdWludDhfdCB0c2MyMDA1 X3R4cnhfd29yZCh2b2lkICpvcGFxdWUsIHVpbnQ4X3QKdmFsdWUpCiAgICAgICAgICAgICAgICAg aWYgKHMtPmVuYWJsZWQgIT0zRCAhKHZhbHVlICYgMSkpIHsKICAgICAgICAgICAgICAgICAgICAg cy0+ZW5hYmxlZCA9M0QgISh2YWx1ZSAmIDEpOwogICAgICAgICAgICAgICAgICAgICB0cmFjZV90 c2MyMDA1X3NlbnNlKHMtPmVuYWJsZWQgPyAiZW5hYmxlZCIgOgoiZGlzYWJsZWQiKTsKLSAgICAg ICAgICAgICAgICAgICAgaWYgKHMtPmJ1c3kgJiYgIXMtPmVuYWJsZWQpCisgICAgICAgICAgICAg ICAgICAgIGlmIChzLT5idXN5ICYmICFzLT5lbmFibGVkKSB7CiAgICAgICAgICAgICAgICAgICAg ICAgICB0aW1lcl9kZWwocy0+dGltZXIpOworICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAg ICAgICAgICAgICAgIHMtPmJ1c3kgPTNEIHMtPmJ1c3kgJiYgcy0+ZW5hYmxlZDsKICAgICAgICAg ICAgICAgICB9CiAgICAgICAgICAgICAgICAgdHNjMjAwNV9waW5fdXBkYXRlKHMpOwpAQCAtMzY4 LDEwICszNzUsMTEgQEAgc3RhdGljIHVpbnQ4X3QgdHNjMjAwNV90eHJ4X3dvcmQodm9pZCAqb3Bh cXVlLAp1aW50OF90IHZhbHVlKQogICAgICAgICBicmVhazsKCiAgICAgY2FzZSAxOgotICAgICAg ICBpZiAocy0+Y29tbWFuZCkKKyAgIC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RFTVAyICAgICAgMHhjCisjZGVmaW5lIFRTQ19NT0RFX1hYX0RSViAgICAgMHhkCisjZGVm aW5lIFRTQ19NT0RFX1lZX0RSViAgICAgMHhlCisjZGVmaW5lIFRTQ19NT0RFX1lYX0RSViAgICAg MHhmCgogc3RhdGljIGNvbnN0IHVpbnQxNl90IG1vZGVfcmVnc1sxNl0gPTNEIHsKLSAgICAweDAw MDAsIC8qIE5vIHNjYW4gKi8KLSAgICAweDA2MDAsIC8qIFgsIFkgc2NhbiAqLwotICAgIDB4MDc4 MCwgLyogWCwgWSwgWiBzY2FuICovCi0gICAgMHgwNDAwLCAvKiBYICovCi0gICAgMHgwMjAwLCAv KiBZICovCi0gICAgMHgwMTgwLCAvKiBaICovCi0gICAgMHgwMDQwLCAvKiBCQVQxICovCi0gICAg MHgwMDMwLCAvKiBCQVQyICovCi0gICAgMHgwMDEwLCAvKiBBVVggKi8KLSAgICAweDAwMTAsIC8q IEFVWCBzY2FuICovCi0gICAgMHgwMDA0LCAvKiBURU1QMSAqLwotICAgIDB4MDA3MCwgLyogUG9y dCBzY2FuICovCi0gICAgMHgwMDAyLCAvKiBURU1QMiAqLwotICAgIDB4MDAwMCwgLyogWCssIFgt IGRyaXZlcnMgKi8KLSAgICAweDAwMDAsIC8qIFkrLCBZLSBkcml2ZXJzICovCi0gICAgMHgwMDAw LCAvKiBZKywgWC0gZHJpdmVycyAqLworICAgIDB4MDAwMCwgLyogTm8gc2NhbiAqLworICAgIDB4 MDYwMCwgLyogWCwgWSBzY2FuICovCisgICAgMHgwNzgwLCAvKiBYLCBZLCBaIHNjYW4gKi8KKyAg ICAweDA0MDAsIC8qIFggKi8KKyAgICAweDAyMDAsIC8qIFkgKi8KKyAgICAweDAxODAsIC8qIFog Ki8KKyAgICAweDAwNDAsIC8qIEJBVDEgKi8KKyAgICAweDAwMzAsIC8qIEJBVDIgKi8KKyAgICAw eDAwMTAsIC8qIEFVWCAqLworICAgIDB4MDAxMCwgLyogQVVYIHNjYW4g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TihBVVgxX1ZBTCwg cy0+cHJlY2lzaW9uKTsKCi0gICAgY2FzZSAweDA4OiAvKiBBVVgyICovCisgICAgY2FzZSAweDA4 OiAgLyogQVVYMiAqLwogICAgICAgICBzLT5kYXYgJj0zRCAweGZmZjc7CiAgICAgICAgIHJldHVy biAweGZmZmY7CgotICAgIGNhc2UgMHgwOTogLyogVEVNUDEgKi8KKyAgICBjYXNlIDB4MDk6ICAv KiBURU1QMSAqLwogICAgICAgICBzLT5kYXYgJj0zRCAweGZmZmI7CiAgICAgICAgIHJldHVybiBU U0NfQ1VUX1JFU09MVVRJT04oVEVNUDFfVkFMLCBzLT5wcmVjaXNpb24pIC0KICAgICAgICAgICAg ICAgICAocy0+bm9pc2UgJiA1KTsKCi0gICAgY2FzZSAweDBhOiAvKiBURU1QMiAqLworICAgIGNh c2UgMHgwYTogIC8qIFRFTVAyICovCiAgICAgICAgIHMtPmRhdiAmPTNEIDB4ZmZmZDsKICAgICAg ICAgcmV0dXJuIFRTQ19DVVRfUkVTT0xVVElPTihURU1QMl9WQUwsIHMtPnByZWNpc2lvbikgXgog ICAgICAgICAgICAgICAgIChzLT5ub2lzZSAmIDMpOwoKLSAgICBjYXNlIDB4MGI6IC8qIERBQyAq LworICAgIGNhc2UgMHgwYjogIC8qIERBQyAqLwogICAgICAgICBzLT5kYXYgJj0zRCAweGZmZmU7 CiAgICAgICAgIHJldHVybiAweGZmZmY7CgpAQCAtNDEzLDExICs0MTcsMTEgQEAgc3RhdGljIHVp bnQxNl90IHRzYzIxMDJfY29udHJvbF9yZWdpc3Rlcl9yZWFkKAogICAgICAgICAgICAgICAgIFRT QzIxMHhTdGF0ZSAqcywgaW50IHJlZykKIHsKICAgICBzd2l0Y2ggKHJlZykgewotICAgIGNhc2Ug MHgwMDogLyogVFNDIEFEQyAqLworICAgIGNhc2UgMHgwMDogIC8qIFRTQyBBREMgKi8KICAgICAg ICAgcmV0dXJuIChzLT5wcmVzc3VyZSA8PCAxNSkgfCAoKCFzLT5idXN5KSA8PCAxNCkgfAotICAg ICAgICAgICAgICAgIChzLT5uZXh0ZnVuY3Rpb24gPDwgMTApIHwgKHMtPm5leHRwcmVjaXNpb24g PDwgOCkgfApzLT5maWx0ZXI7CisgICAgICAgICAgICAgICAgKHMtPm5leHRmdW5jdGlvbiA8PCAx MCkgfCAocy0+bmV4dHByZWNpc2lvbiA8PCA4KSB8CnMtPmZpbHRlcjsKCi0gICAgY2FzZSAweDAx OiAvKiBTdGF0dXMgLyBLZXlwYWQgQ29udHJvbCAqLworICAgIGNhc2UgMHgwMTogIC8qIFN0YXR1 cyAvIEtleXBhZCBDb250cm9sICovCiAgICAgICAgIGlmICgocy0+bW9kZWwgJiAweGZmMDApID0z RD0zRCAweDIxMDApCiAgICAgICAgICAgICByZXR1cm4gKHMtPnBpbl9mdW5jIDw8IDE0KSB8ICgo IXMtPmVuYWJsZWQpIDw8IDEzKSB8CiAgICAgICAgICAgICAgICAgICAgIChzLT5ob3N0X21vZGUg PDwgMTIpIHwgKCghIXMtPmRhdikgPDwgMTEpIHwgcy0+ZGF2OwpAQCAtNDI1LDI5ICs0MjksMzIg QEAgc3RhdGljIHVpbnQxNl90IHRzYzIxMDJfY29udHJvbF9yZWdpc3Rlcl9yZWFkKAogICAgICAg ICAgICAgcmV0dXJuIChzLT5rYi5pbnRyIDw8IDE1KSB8ICgocy0+a2Iuc2NhbiB8fCAhcy0+a2Iu ZG93bikgPDwKMTQpIHwKICAgICAgICAgICAgICAgICAgICAgKHMtPmtiLmRlYm91bmNlIDw8IDEx KTsKCi0gICAgY2FzZSAweDAyOiAvKiBEQUMgQ29udHJvbCAqLwotICAgICAgICBpZiAoKHMtPm1v ZGVsICYgMHhmZjAwKSA9M0Q9M0QgMHgyMzAwKQorICAgIGNhc2UgMHgwMjogIC8qIERBQyBDb250 cm9sICovCisgICAgICAgIGlmICgocy0+bW9kZWwgJiAweGZmMDApID0zRD0zRCAweDIzMDApIHsK ICAgICAgICAgICAgIHJldHVybiBzLT5kYWNfcG93ZXIgJiAweDgwMDA7Ci0gICAgICAgIGVsc2UK KyAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgIGdvdG8gYmFkX3JlZzsKKyAgICAgICAgfQoK LSAgICBjYXNlIDB4MDM6IC8qIFJlZmVyZW5jZSAqLworICAgIGNhc2UgMHgwMzogIC8qIFJlZmVy ZW5jZSAqLwogICAgICAgICByZXR1cm4gcy0+cmVmOwoKLSAgICBjYXNlIDB4MDQ6IC8qIFJlc2V0 ICovCisgICAgY2FzZSAweDA0OiAgLyogUmVzZXQgKi8KICAgICAgICAgcmV0dXJuIDB4ZmZmZjsK Ci0gICAgY2FzZSAweDA1OiAvKiBDb25maWd1cmF0aW9uICovCisgICAgY2FzZSAweDA1OiAgLyog Q29uZmlndXJhdGlvbiAqLwogICAgICAgICByZXR1cm4gcy0+dGltaW5nOwoKLSAgICBjYXNlIDB4 MDY6IC8qIFNlY29uZGFyeSBjb25maWd1cmF0aW9uICovCi0gICAgICAgIGlmICgocy0+bW9kZWwg JiAweGZmMDApID0zRD0zRCAweDIxMDApCisgICAgY2FzZSAweDA2OiAgLyogU2Vjb25kYXJ5IGNv bmZpZ3VyYXRpb24gKi8KKyAgICAgICAgaWYgKChzLT5tb2RlbCAmIDB4ZmYwMCkgPTNEPTNEIDB4 MjEwMCkgewogICAgICAgICAgICAgZ290byBiYWRfcmVnOworICAgICAgICB9CiAgICAgICAgIHJl dHVybiAoKCFzLT5kYXYpIDw8IDE1KSB8ICgocy0+a2IubW9kZSAmIDEpIDw8IDE0KSB8IHMtPnBs bFsyXTsKCi0gICAgY2FzZSAweDEwOiAvKiBLZXlwYWQgTWFzayAqLwotICAgICAgICBpZiAoKHMt Pm1vZGVsICYgMHhmZjAwKSA9M0Q9M0QgMHgyMTAwKQorICAgIGNhc2UgMHgxMDogIC8qIEtleXBh ZCBNYXNrICovCisgICAgICAgIGlmICgocy0+bW9kZWwgJiAweGZmMDApID0zRD0zRCAweDIxMDAp IHsKICAgICAgICAg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IHwgKHJfY2ggPDwgMik7CgotICAg IGNhc2UgMHgwNTogLyogU3RlcmVvIERBQyBQb3dlciBDb250cm9sICovCisgICAgY2FzZSAweDA1 OiAgLyogU3RlcmVvIERBQyBQb3dlciBDb250cm9sICovCiAgICAgICAgIHJldHVybiAweDJhYTAg fCBzLT5kYWNfcG93ZXIgfAogICAgICAgICAgICAgICAgICgoKHMtPmRhY19wb3dlciAmICgxIDw8 IDEwKSkgJiYKICAgICAgICAgICAgICAgICAgIChxZW11X2Nsb2NrX2dldF9ucyhRRU1VX0NMT0NL X1ZJUlRVQUwpID4KICAgICAgICAgICAgICAgICAgICBzLT5wb3dlcmRvd24gKyBUU0NfUE9XRVJP RkZfREVMQVkpKSA8PCA2KTsKCi0gICAgY2FzZSAweDA2OiAvKiBBdWRpbyBDb250cm9sIDMgKi8K KyAgICBjYXNlIDB4MDY6ICAvKiBBdWRpbyBDb250cm9sIDMgKi8KICAgICAgICAgdmFsID0zRCBz LT5hdWRpb19jdHJsMyB8IDB4MDAwMTsKICAgICAgICAgcy0+YXVkaW9fY3RybDMgJj0zRCAweGZm M2Y7CiAgICAgICAgIHJldHVybiB2YWw7CgotICAgIGNhc2UgMHgwNzogLyogTENIX0JBU1NfQk9P U1RfTjAgKi8KLSAgICBjYXNlIDB4MDg6IC8qIExDSF9CQVNTX0JPT1NUX04xICovCi0gICAgY2Fz ZSAweDA5OiAvKiBMQ0hfQkFTU19CT09TVF9OMiAqLwotICAgIGNhc2UgMHgwYTogLyogTENIX0JB U1NfQk9PU1RfTjMgKi8KLSAgICBjYXNlIDB4MGI6IC8qIExDSF9CQVNTX0JPT1NUX040ICovCi0g ICAgY2FzZSAweDBjOiAvKiBMQ0hfQkFTU19CT09TVF9ONSAqLwotICAgIGNhc2UgMHgwZDogLyog TENIX0JBU1NfQk9PU1RfRDEgKi8KLSAgICBjYXNlIDB4MGU6IC8qIExDSF9CQVNTX0JPT1NUX0Qy ICovCi0gICAgY2FzZSAweDBmOiAvKiBMQ0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ICovCisg ICAgY2FzZSAweDEwOiAgLyogTENIX0JBU1NfQk9PU1RfRDUgKi8KKyAgICBjYXNlIDB4MTE6ICAv KiBSQ0hfQkFTU19CT09TVF9OMCAqLworICAgIGNhc2UgMHgxMjogIC8qIFJDSF9CQVNTX0JPT1NU X04xICovCisgICAgY2FzZSAweDEzOiAgLyogUkNIX0JBU1NfQk9PU1RfTjIgKi8KKyAgICBjYXNl IDB4MTQ6ICAvKiBSQ0hfQkFTU19CT09TVF9OMyAqLworICAgIGNhc2UgMHgxNTogIC8qIFJDSF9C QVNTX0JPT1NUX040ICovCisgICAgY2FzZSAweDE2OiAgLyogUkNIX0JBU1NfQk9PU1RfTjUgKi8K KyAgICBjYXNlIDB4MTc6ICAvKiBSQ0hfQkFTU19CT09TVF9EMSAqLworICAgIGNhc2UgMHgxODog IC8qIFJDSF9CQVNTX0JPT1NUX0QyICovCisgICAgY2FzZSAweDE5OiAgLyogUkNIX0JBU1NfQk9P U1RfRDQgKi8KKyAgICBjYXNlIDB4MWE6ICAvKiBSQ0hfQkFTU19CT09TVF9ENSAqLwogICAgICAg ICByZXR1cm4gcy0+ZmlsdGVyX2RhdGFbcmVnIC0gMHgwN107CgotICAgIGNhc2UgMHgxYjogLyog UExMIFByb2dyYW1tYWJpbGl0eSAxICovCisgICAgY2FzZSAweDFiOiAgLyogUExMIFByb2dyYW1t YWJpbGl0eSAxICovCiAgICAgICAgIHJldHVybiBzLT5wbGxbMF07CgotICAgIGNhc2UgMHgxYzog LyogUExMIFByb2dyYW1tYWJpbGl0eSAyICovCisgICAgY2FzZSAweDFjOiAgLyogUExMIFByb2dy YW1tYWJpbGl0eSAyICovCiAgICAgICAgIHJldHVybiBzLT5wbGxbMV07CgotICAgIGNhc2UgMHgx ZDogLyogQXVkaW8gQ29udHJvbCA0ICovCisgICAgY2FzZSAweDFkOiAgLyogQXVkaW8gQ29udHJv bCA0ICovCiAgICAgICAgIHJldHVybiAoIXMtPnNvZnRzdGVwKSA8PCAxNDsK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ZWcsIHVpbnQxNl90IHZhbHVlKQogewogICAgIHN3aXRjaCAo cmVnKSB7Ci0gICAgY2FzZSAweDAwOiAvKiBUU0MgQURDICovCisgICAgY2FzZSAweDAwOiAgLyog VFNDIEFEQyAqLwogICAgICAgICBzLT5ob3N0X21vZGUgPTNEIHZhbHVlID4+IDE1OwogICAgICAg ICBzLT5lbmFibGVkID0zRCAhKHZhbHVlICYgMHg0MDAwKTsKLSAgICAgICAgaWYgKHMtPmJ1c3kg JiYgIXMtPmVuYWJsZWQpCisgICAgICAgIGlmIChzLT5idXN5ICYmICFzLT5lbmFibGVkKSB7CiAg ICAgICAgICAgICB0aW1lcl9kZWwocy0+dGltZXIpOworICAgICAgICB9CiAgICAgICAgIHMtPmJ1 c3kgPTNEIHMtPmJ1c3kgJiYgcy0+ZW5hYmxlZDsKICAgICAgICAgcy0+bmV4dGZ1bmN0aW9uID0z RCAodmFsdWUgPj4gMTApICYgMHhmOwogICAgICAgICBzLT5uZXh0cHJlY2lzaW9uID0zRCAodmFs dWUgPj4gOCkgJiAzOwogICAgICAgICBzLT5maWx0ZXIgPTNEIHZhbHVlICYgMHhmZjsKICAgICAg ICAgcmV0dXJuOwoKLSAgICBjYXNlIDB4MDE6IC8qIFN0YXR1cyAvIEtleXBhZCBDb250cm9sICov CisgICAgY2FzZSAweDAxOiAgLyogU3RhdHVzIC8gS2V5cGFkIENvbnRyb2wgKi8KICAgICAgICAg aWYgKChzLT5tb2RlbCAmIDB4ZmYwMCkgPTNEPTNEIDB4MjEwMCkKICAgICAgICAgICAgIHMtPnBp bl9mdW5jID0zRCB2YWx1ZSA+PiAxNDsKICAgICAgICAgZWxzZSB7CkBAIC01OTEsNyArNTk5LDcg QEAgc3RhdGljIHZvaWQgdHNjMjEwMl9jb250cm9sX3JlZ2lzdGVyX3dyaXRlKAogICAgICAgICB9 CiAgICAgICAgIHJldHVybjsKCi0gICAgY2FzZSAweDAyOiAvKiBEQUMgQ29udHJvbCAqLworICAg IGNhc2UgMHgwMjogIC8qIERBQyBDb250cm9sICovCiAgICAgICAgIGlmICgocy0+bW9kZWwgJiAw eGZmMDApID0zRD0zRCAweDIzMDApIHsKICAgICAgICAgICAgIHMtPmRhY19wb3dlciAmPTNEIDB4 N2ZmZjsKICAgICAgICAgICAgIHMtPmRhY19wb3dlciB8PTNEIDB4ODAwMCAmIHZhbHVlOwpAQCAt NTk5LDE0ICs2MDcsMTUgQEAgc3RhdGljIHZvaWQgdHNjMjEwMl9jb250cm9sX3JlZ2lzdGVyX3dy aXRlKAogICAgICAgICAgICAgZ290byBiYWRfcmVnOwogICAgICAgICBicmVhazsKCi0gICAgY2Fz ZSAweDAzOiAvKiBSZWZlcmVuY2UgKi8KKyAgICBjYXNlIDB4MDM6ICAvKiBSZWZlcmVuY2UgKi8K ICAgICAgICAgcy0+cmVmID0zRCB2YWx1ZSAmIDB4MWY7CiAgICAgICAgIHJldHVybjsKCi0gICAg Y2FzZSAweDA0OiAvKiBSZXNldCAqLworICAgIGNhc2UgMHgwNDogIC8qIFJlc2V0ICovCiAgICAg ICAgIGlmICh2YWx1ZSA9M0Q9M0QgMHhiYjAwKSB7Ci0gICAgICAgICAgICBpZiAocy0+YnVzeSkK KyAgICAgICAgICAgIGlmIChzLT5idXN5KSB7CiAgICAgICAgICAgICAgICAgdGltZXJfZGVsKHMt PnRpbWVyKTsKKyAgICAgICAgICAgIH0KICAgICAgICAgICAgIHRzYzIxMHhfcmVzZXQocyk7CiAj aWZkZWYgVFNDX1ZFUkJPU0UKICAgICAgICAgfSBlbHNlIHsKQEAgLTYxNiw3ICs2MjUsNyBAQCBz dGF0aWMgdm9pZCB0c2MyMTAyX2NvbnRyb2xfcmVnaXN0ZXJfd3JpdGUoCiAgICAgICAgIH0KICAg ICAgICAgcmV0dXJuOwoKLSAgICBjYXNlIDB4MDU6IC8qIENvbmZpZ3VyYXRpb24gKi8KKyAgICBj YXNlIDB4MDU6ICAvKiBDb25maWd1cmF0aW9uICovCiAgICAgICAgIHMtPnRp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KICAgICAgICAgcGluX3N0YXRl ID0zRCBzLT5wcmVzc3VyZSAmJiAhcy0+ZGF2OwogICAgIH0KCi0gICAgaWYgKCFzLT5lbmFibGVk KQorICAgIGlmICghcy0+ZW5hYmxlZCkgewogICAgICAgICBwaW5fc3RhdGUgPTNEIGZhbHNlOwor ICAgIH0KCiAgICAgaWYgKHBpbl9zdGF0ZSAhPTNEIHMtPmlycSkgewogICAgICAgICBzLT5pcnEg PTNEIHBpbl9zdGF0ZTsKQEAgLTgwMCwyMyArODEzLDI2IEBAIHN0YXRpYyB2b2lkIHRzYzIxMHhf cGluX3VwZGF0ZShUU0MyMTB4U3RhdGUgKnMpCiAgICAgc3dpdGNoIChzLT5uZXh0ZnVuY3Rpb24p IHsKICAgICBjYXNlIFRTQ19NT0RFX1hZX1NDQU46CiAgICAgY2FzZSBUU0NfTU9ERV9YWVpfU0NB TjoKLSAgICAgICAgaWYgKCFzLT5wcmVzc3VyZSkKKyAgICAgICAgaWYgKCFzLT5wcmVzc3VyZSkg ewogICAgICAgICAgICAgcmV0dXJuOworICAgICAgICB9CiAgICAgICAgIGJyZWFrOwoKICAgICBj YXNlIFRTQ19NT0RFX1g6CiAgICAgY2FzZSBUU0NfTU9ERV9ZOgogICAgIGNhc2UgVFNDX01PREVf WjoKLSAgICAgICAgaWYgKCFzLT5wcmVzc3VyZSkKKyAgICAgICAgaWYgKCFzLT5wcmVzc3VyZSkg ewogICAgICAgICAgICAgcmV0dXJuOworICAgICAgICB9CiAgICAgICAgIC8qIEZhbGwgdGhyb3Vn aCAqLwogICAgIGNhc2UgVFNDX01PREVfQkFUMToKICAgICBjYXNlIFRTQ19NT0RFX0JBVDI6CiAg ICAgY2FzZSBUU0NfTU9ERV9BVVg6CiAgICAgY2FzZSBUU0NfTU9ERV9URU1QMToKICAgICBjYXNl IFRTQ19NT0RFX1RFTVAyOgotICAgICAgICBpZiAocy0+ZGF2KQorICAgICAgICBpZiAocy0+ZGF2 KSB7CiAgICAgICAgICAgICBz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XZlICpjaGlwLCBpbnQga2V5LCBpbnQgZG93bikKIHsKICAgICBUU0My MTB4U3RhdGUgKnMgPTNEIChUU0MyMTB4U3RhdGUgKikgY2hpcC0+b3BhcXVlOwoKLSAgICBpZiAo ZG93bikKKyAgICBpZiAoZG93bikgewogICAgICAgICBzLT5rYi5kb3duIHw9M0QgMSA8PCBrZXk7 Ci0gICAgZWxzZQorICAgIH0gZWxzZSB7CiAgICAgICAgIHMtPmtiLmRvd24gJj0zRCB+KDEgPDwg a2V5KTsKKyAgICB9CgogICAgIGlmIChkb3duICYmIChzLT5rYi5kb3duICYgfnMtPmtiLm1hc2sp ICYmICFzLT5rYi5pbnRyKSB7CiAgICAgICAgIHMtPmtiLmludHIgPTNEIDE7CmRpZmYgLS1naXQg YS9ody9pbnRjL29tYXBfaW50Yy5jIGIvaHcvaW50Yy9vbWFwX2ludGMuYwppbmRleCA0MzVjNDc2 MDBmLi40YTViNDEzZDBhIDEwMDY0NAotLS0gYS9ody9pbnRjL29tYXBfaW50Yy5jCisrKyBiL2h3 L2ludGMvb21hcF9pbnRjLmMKQEAgLTEwNCw4ICsxMDQsOCBAQCBzdGF0aWMgaW5saW5lIHZvaWQg b21hcF9pbnRoX3VwZGF0ZShPTUFQSW50Y1N0YXRlICpzLAppbnQgaXNfZmlxKQogICAgIH0KIH0K Ci0jZGVmaW5lIElOVF9GQUxMSU5HX0VER0UgMAotI2RlZmluZSBJTlRfTE9XX0xFVkVMIDEKKyNk ZWZpbmUgSU5UX0ZBTExJTkdfRURHRSAgICAgICAgMAorI2RlZmluZSBJTlRfTE9XX0xFVkVMICAg ICAgICAgICAxCgogc3RhdGljIHZvaWQgb21hcF9zZXRfaW50cih2b2lkICpvcGFxdWUsIGludCBp cnEsIGludCByZXEpCiB7CkBAIC0xMTcsOSArMTE3LDkgQEAgc3RhdGljIHZvaWQgb21hcF9zZXRf aW50cih2b2lkICpvcGFxdWUsIGludCBpcnEsIGludApyZXEpCgogICAgIGlmIChyZXEpIHsK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TNEICZzLT5iYW5rW2xpbmVfbm8gPj4gNV07 CiAgICAgICAgIGkgPTNEIGxpbmVfbm8gJiAzMTsKLSAgICAgICAgaWYgKCgoYmFuay0+c2Vuc19l ZGdlID4+IGkpICYgMSkgPTNEPTNEIElOVF9GQUxMSU5HX0VER0UpCisgICAgICAgIGlmICgoKGJh bmstPnNlbnNfZWRnZSA+PiBpKSAmIDEpID0zRD0zRCBJTlRfRkFMTElOR19FREdFKSB7CiAgICAg ICAgICAgICBiYW5rLT5pcnFzICY9M0QgfigxIDw8IGkpOworICAgICAgICB9CiAgICAgICAgIHJl dHVybiBsaW5lX25vOwoKLSAgICBjYXNlIDB4MTg6IC8qIENPTlRST0xfUkVHICovCi0gICAgICAg IGlmIChiYW5rX25vICE9M0QgMCkKKyAgICBjYXNlIDB4MTg6ICAvKiBDT05UUk9MX1JFRyAqLwor ICAgICAgICBpZiAoYmFua19ubyAhPTNEIDApIHsKICAgICAgICAgICAgIGJyZWFrOworICAgICAg ICB9CiAgICAgICAgIHJldHVybiAwOwoKLSAgICBjYXNlIDB4MWM6IC8qIElMUjAgKi8KLSAgICBj YXNlIDB4MjA6IC8qIElMUjEgKi8KLSAgICBjYXNlIDB4MjQ6IC8qIElMUjIgKi8KLSAgICBjYXNl IDB4Mjg6IC8qIElMUjMgKi8KLSAgICBjYXNlIDB4MmM6IC8qIElMUjQgKi8KLSAgICBjYXNlIDB4 MzA6IC8qIElMUjUgKi8KLSAgICBjYXNlIDB4MzQ6IC8qIElMUjYgKi8KLSAgICBjYXNlIDB4Mzg6 IC8qIElMUjcgKi8KLSAgICBjYXNlIDB4M2M6IC8qIElMUjggKi8KLSAgICBjYXNlIDB4NDA6IC8q IElMUjkgKi8KLSAgICBjYXNlIDB4NDQ6IC8qIElMUjEwICovCi0gICAgY2FzZSAweDQ4OiAvKiBJ TFIxMSAqLwotICAgIGNhc2UgMHg0YzogLyogSUxSMTIgKi8KLSAgICBjYXNlIDB4NTA6IC8qIElM UjEzICovCi0gICAgY2FzZSAweDU0OiAvKiBJTFIxNCAqLwotICAgIGNhc2UgMHg1ODogLyogSUxS MTUgKi8KLSAgICBjYXNlIDB4NWM6IC8qIElMUjE2ICovCi0gICAgY2FzZSAweDYwOiAvKiBJTFIx NyAqLwotICAgIGNhc2UgMHg2NDogLyogSUxSMTggKi8KLSAgICBjYXNlIDB4Njg6IC8qIElMUjE5 ICovCi0gICAgY2FzZSAweDZjOiAvKiBJTFIyMCAqLwotICAgIGNhc2UgMHg3MDogLyogSUxSMjEg Ki8KLSAgICBjYXNlIDB4NzQ6IC8qIElMUjIyICovCi0gICAgY2FzZSAweDc4OiAvKiBJTFIyMyAq LwotICAgIGNhc2UgMHg3YzogLyogSUxSMjQgKi8KLSAgICBjYXNlIDB4ODA6IC8qIElMUjI1ICov Ci0gICAgY2FzZSAweDg0OiAvKiBJTFIyNiAqLwotICAgIGNhc2UgMHg4ODogLyogSUxSMjcgKi8K LSAgICBjYXNlIDB4OGM6IC8qIElMUjI4ICovCi0gICAgY2FzZSAweDkwOiAvKiBJTFIyOSAqLwot ICAgIGNhc2UgMHg5NDogLyogSUxSMzAgKi8KLSAgICBjYXNlIDB4OTg6IC8qIElMUjMxICovCisg ICAgY2FzZSAweDFjOiAgLyogSUxSMCAqLworICAgIGNhc2UgMHgyMDogIC8qIElMUjEgKi8KKyAg ICBjYXNlIDB4MjQ6ICAvKiBJTFIyICovCisgICAgY2FzZSAweDI4OiAgLyogSUxSMyAqLworICAg IGNhc2UgMHgyYzogIC8qIElMUjQgKi8KKyAgICBjYXNlIDB4MzA6ICAvKiBJTFI1ICovCisgICAg Y2FzZSAweDM0OiAgLyogSUxSNiAqLworICAgIGNhc2UgMHgzODogIC8qIElMUjcgKi8KKyAgICBj YXNlIDB4M2M6ICAvKiBJTFI4ICovCisgICAgY2FzZSAweDQwOiAgLyogSUxSOSAqLworICAgIGNh c2UgMHg0NDogIC8qIElMUjEwICovCisgICAgY2FzZSAweDQ4OiAgLyogSUxSMTEgKi8KKyAgICBj YXNlIDB4NGM6ICAvKiBJTFIxMiAqLworICAgIGNhc2UgMHg1MDogIC8qIElMUjEzICovCisgICAg Y2FzZSAweDU0OiAgLyogSUxSMTQgKi8KKyAgICBjYXNlIDB4NTg6ICAvKiBJTFIxNSAqLworICAg IGNhc2UgMHg1YzogIC8qIElMUjE2ICovCisgICAgY2FzZSAweDYwOiAgLyogSUxSMTcgKi8KKyAg ICBjYXNlIDB4NjQ6ICAvKiBJTFIxOCAqLworICAgIGNhc2UgMHg2ODogIC8qIElMUjE5ICovCisg ICAgY2FzZSAweDZjOiAgLyogSUxSMjAgKi8KKyAgICBjYXNlIDB4NzA6ICAvKiBJTFIyMSAqLwor ICAgIGNhc2UgMHg3NDogIC8qIElMUjIyICovCisgICAgY2FzZSAweDc4OiAgLyogSUxSMjMgKi8K KyAgICBjYXNlIDB4N2M6ICAvKiBJTFIyNCAqLworICAgIGNhc2UgMHg4MDogIC8qIElMUjI1ICov CisgICAgY2FzZSAweDg0OiAgLyogSUxSMjYgKi8KKyAgICBjYXNlIDB4ODg6ICAvKiBJTFIyNyAq LworICAgIGNhc2UgMHg4YzogIC8qIElMUjI4ICovCisgICAgY2FzZSAweDkwOiAgLyogSUxSMjkg Ki8KKyAgICBjYXNlIDB4OTQ6ICAvKiBJTFIzMCAqLworICAgIGNhc2UgMHg5ODogIC8qIElMUjMx ICovCiAgICAgICAgIGkgPTNEIChvZmZzZXQgLSAweDFjKSA+PiAyOwogICAgICAgICByZXR1cm4g KGJhbmstPnByaW9yaXR5W2ldIDw8IDIpIHwKICAgICAgICAgICAgICAgICAoKChiYW5rLT5zZW5z X2VkZ2UgPj4gaSkgJiAxKSA8PCAxKSB8CiAgICAgICAgICAgICAgICAgKChiYW5rLT5maXEgPj4g aSkgJiAxKTsKCi0gICAgY2FzZSAweDljOiAvKiBJU1IgKi8KKyAgICBjYXNlIDB4OWM6ICAvKiBJ U1IgKi8KICAgICAgICAgcmV0dXJuIDB4MDAwMDAwMDA7CgogICAgI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Ci0gICAgY2FzZSAweDZj OiAvKiBJTFIyMCAqLwotICAgIGNhc2UgMHg3MDogLyogSUxSMjEgKi8KLSAgICBjYXNlIDB4NzQ6 IC8qIElMUjIyICovCi0gICAgY2FzZSAweDc4OiAvKiBJTFIyMyAqLwotICAgIGNhc2UgMHg3Yzog LyogSUxSMjQgKi8KLSAgICBjYXNlIDB4ODA6IC8qIElMUjI1ICovCi0gICAgY2FzZSAweDg0OiAv KiBJTFIyNiAqLwotICAgIGNhc2UgMHg4ODogLyogSUxSMjcgKi8KLSAgICBjYXNlIDB4OGM6IC8q IElMUjI4ICovCi0gICAgY2FzZSAweDkwOiAvKiBJTFIyOSAqLwotICAgIGNhc2UgMHg5NDogLyog SUxSMzAgKi8KLSAgICBjYXNlIDB4OTg6IC8qIElMUjMxICovCisgICAgY2FzZSAweDFjOiAgLyog SUxSMCAqLworICAgIGNhc2UgMHgyMDogIC8qIElMUjEgKi8KKyAgICBjYXNlIDB4MjQ6ICAvKiBJ TFIyICovCisgICAgY2FzZSAweDI4OiAgLyogSUxSMyAqLworICAgIGNhc2UgMHgyYzogIC8qIElM UjQgKi8KKyAgICBjYXNlIDB4MzA6ICAvKiBJTFI1ICovCisgICAgY2FzZSAweDM0OiAgLyogSUxS NiAqLworICAgIGNhc2UgMHgzODogIC8qIElMUjcgKi8KKyAgICBjYXNlIDB4M2M6ICAvKiBJTFI4 ICovCisgICAgY2FzZSAweDQwOiAgLyogSUxSOSAqLworICAgIGNhc2UgMHg0NDogIC8qIElMUjEw ICovCisgICAgY2FzZSAweDQ4OiAgLyogSUxSMTEgKi8KKyAgICBjYXNlIDB4NGM6ICAvKiBJTFIx MiAqLworICAgIGNhc2UgMHg1MDogIC8qIElMUjEzICovCisgICAgY2FzZSAweDU0OiAgLyogSUxS MTQgKi8KKyAgICBjYXNlIDB4NTg6ICAvKiBJTFIxNSAqLworICAgIGNhc2UgMHg1YzogIC8qIElM UjE2ICovCisgICAgY2FzZSAweDYwOiAgLyogSUxSMTcgKi8KKyAgICBjYXNlIDB4NjQ6ICAvKiBJ TFIxOCAqLworICAgIGNhc2UgMHg2ODogIC8qIElMUjE5ICovCisgICAgY2FzZSAweDZjOiAgLyog SUxSMjAgKi8KKyAgICBjYXNlIDB4NzA6ICAvKiBJTFIyMSAqLworICAgIGNhc2UgMHg3NDogIC8q IElMUjIyICovCisgICAgY2FzZSAweDc4OiAgLyogSUxSMjMgKi8KKyAgICBjYXNlIDB4N2M6ICAv KiBJTFIyNCAqLworICAgIGNhc2UgMHg4MDogIC8qIElMUjI1ICovCisgICAgY2FzZSAweDg0OiAg LyogSUxSMjYgKi8KKyAgICBjYXNlIDB4ODg6ICAvKiBJTFIyNyAqLworICAgIGNhc2UgMHg4Yzog IC8qIElMUjI4ICovCisgICAgY2FzZSAweDkwOiAgLyogSUxSMjkgKi8KKyAgICBjYXNlIDB4OTQ6 ICAvKiBJTFIzMCAqLworICAgIGNhc2UgMHg5ODogIC8qIElMUjMxICovCiAgICAgICAgIGkgPTNE IChvZmZzZXQgLSAweDFjKSA+PiAyOwogICAgICAgICBiYW5rLT5wcmlvcml0eVtpXSA9M0QgKHZh bHVlID4+IDIpICYgMHgxZjsKICAgICAgICAgYmFuay0+c2Vuc19lZGdlICY9M0QgfigxIDw8IGkp OwpAQCAtMzEzLDggKzMxNyw4IEBAIHN0YXRpYyB2b2lkIG9tYXBfaW50aF93cml0ZSh2b2lkICpv cGFxdWUsIGh3YWRkciBhZGRyLAogICAgICAgICBiYW5rLT5maXEgfD0zRCAodmFsdWUgJiAxKSA8 PCBpOwogICAgICAgICByZXR1cm47CgotICAgIGNhc2UgMHg5YzogLyogSVNSICovCi0gICAgICAg IGZvciAoaSA9M0QgMDsgaSA8IDMyOyBpICsrKQorICAgIGNhc2UgMHg5YzogIC8qIElTUiAqLwor ICAgICAgICBmb3IgKGkgPTNEIDA7IGkgPCAzMjsgaSsrKQogICAgICAgICAgICAgaWYgKHZhbHVl ICYgKDEgPDwgaSkpIHsKICAgICAgICAgIC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y2ggKG9mZnNldCkgewotICAgIGNhc2UgMHgwMDogLyogSU5UQ19SRVZJU0lPTiAqLworICAgIGNh c2UgMHgwMDogIC8qIElOVENfUkVWSVNJT04gKi8KICAgICAgICAgcmV0dXJuIHMtPnJldmlzaW9u OwoKLSAgICBjYXNlIDB4MTA6IC8qIElOVENfU1lTQ09ORklHICovCisgICAgY2FzZSAweDEwOiAg LyogSU5UQ19TWVNDT05GSUcgKi8KICAgICAgICAgcmV0dXJuIChzLT5hdXRvaWRsZSA+PiAyKSAm IDE7CgotICAgIGNhc2UgMHgxNDogLyogSU5UQ19TWVNTVEFUVVMgKi8KLSAgICAgICAgcmV0dXJu IDE7IC8qIFJFU0VURE9ORSAqLworICAgIGNhc2UgMHgxNDogIC8qIElOVENfU1lTU1RBVFVTICov CisgICAgICAgIHJldHVybiAxOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgLyoKUkVTRVRET05FICovCgotICAgIGNhc2UgMHg0MDogLyogSU5UQ19TSVJfSVJR ICovCisgICAgY2FzZSAweDQwOiAgLyogSU5UQ19TSVJfSVJRICovCiAgICAgICAgIHJldHVybiBz LT5zaXJfaW50clswXTsKCi0gICAgY2FzZSAweDQ0OiAvKiBJTlRDX1NJUl9GSVEgKi8KKyAgICBj YXNlIDB4NDQ6ICAvKiBJTlRDX1NJUl9GSVEgKi8KICAgICAgICAgcmV0dXJuIHMtPnNpcl9pbnRy WzFdOwoKLSAgICBjYXNlIDB4NDg6IC8qIElOVENfQ09OVFJPTCAqLwotICAgICAgICByZXR1cm4g KCFzLT5tYXNrKSA8PCAyOyAvKiBHTE9CQUxNQVNLICovCisgICAgY2FzZSAweDQ4OiAgLyogSU5U Q19DT05UUk9MICovCisgICAgICAgIHJldHVybiAoIXMtPm1hc2spIDw8IDI7ICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAvKgpHTE9CQUxNQVNLICovCgotICAgIGNhc2UgMHg0YzogLyog SU5UQ19QUk9URUNUSU9OICovCisgICAgY2FzZSAweDRjOiAgLyogSU5UQ19QUk9URUNUSU9OICov CiAgICAgICAgIHJldHVybiAwOwoKLSAgICBjYXNlIDB4NTA6IC8qIElOVENfSURMRSAqLworICAg IGNhc2UgMHg1MDogIC8qIElOVENfSURMRSAqLwogICAgICAgICByZXR1cm4gcy0+YXV0b2lkbGUg JiAzOwoKICAgICAvKiBQZXItYmFuayByZWdpc3RlcnMgKi8KLSAgICBjYXNlIDB4ODA6IC8qIElO VENfSVRSICovCisgICAgY2FzZSAweDgwOiAgLyogSU5UQ19JVFIgKi8KICAgICAgICAgcmV0dXJu IGJhbmstPmlucHV0czsKCi0gICAgY2FzZSAweDg0OiAvKiBJTlRDX01JUiAqLworICAgIGNhc2Ug MHg4NDogIC8qIElOVENfTUlSICovCiAgICAgICAgIHJldHVybiBiYW5rLT5tYXNrOwoKLSAgICBj YXNlIDB4ODg6IC8qIElOVENfTUlSX0NMRUFSICovCi0gICAgY2FzZSAweDhjOiAvKiBJTlRDX01J Ul9TRVQgKi8KKyAgICBjYXNlIDB4ODg6ICAvKiBJTlRDX01JUl9DTEVBUiAqLworICAgIGNhc2Ug MHg4YzogIC8qIElOVENfTUlSX1NFVCAqLwogICAgICAgICByZXR1cm4gMDsKCi0gICAgY2FzZSAw eDkwOiAvKiBJTlRDX0lTUl9TRVQgKi8KKyAgICBjYXNlIDB4OTA6ICAvKiBJTlRDX0lTUl9TRVQg Ki8KICAgICAgICAgcmV0dXJuIGJhbmstPnN3aTsKCi0gICAgY2FzZSAweDk0OiAvKiBJTlRDX0lT Ul9DTEVBUiAqLworICAgIGNhc2UgMHg5NDogIC8qIElOVENfSVNSX0NMRUFSICovCiAgICAgICAg IHJldHVybiAwOwoKLSAgICBjYXNlIDB4OTg6IC8qIElOVENfUEVORElOR19JUlEgKi8KKyAgICBj YXNlIDB4OTg6ICAvKiBJTlRDX1BFTkRJTkdfSVJRICovCiAgICAgICAgIHJldHVybiBiYW5rLT5p cnFzICYgfmJhbmstPm1hc2sgJiB+YmFuay0+ZmlxOwoKLSAgICBjYXNlIDB4OWM6IC8qIElOVENf UEVORElOR19GSVEgKi8KKyAgICBjYXNlIDB4OWM6ICAvKiBJTlRDX1BFTkRJTkdfRklRICovCiAg ICAgICAgIHJldHVybiBiYW5rLT5pcnFzICYgfmJhbmstPm1hc2sgJiBiYW5rLT5maXE7CgogICAg IC8qIFBlci1saW5lIHJlZ2lzdGVycyAqLwotICAgIGNhc2UgMHgxMDAgLi4uIDB4MzAwOiAvKiBJ TlRDX0lMUiAqLworICAgIGNhc2UgMHgxMDAgLi4uIDB4MzAwOiAgICAgICAvKiBJTlRDX0lMUiAq LwogICAgICAgICBiYW5rX25vID0zRCAob2Zmc2V0IC0gMHgxMDApID4+IDc7Ci0gICAgICAgIGlm IChiYW5rX25vID4gcy0+bmJhbmtzKQorICAgICAgICBpZiAoYmFua19ubyA+IHMtPm5iYW5rcykg ewogICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KICAgICAgICAgYmFuayA9M0QgJnMtPmJh bmtbYmFua19ub107CiAgICAgICAgIGxpbmVfbm8gPTNEIChvZmZzZXQgJiAweDdmKSA+PiAyOwog ICAgICAgICByZXR1cm4gKGJhbmstPnByaW9yaXR5W2xpbmVfbm9dIDw8IDIpIHwKQEAgLTUyMSw3 ICs1MjcsNyBAQCBzdGF0aWMgdm9pZCBvbWFwMl9pbnRoX3dyaXRlKHZvaWQgKm9wYXF1ZSwgaHdh ZGRyIGFkZHIsCiAgICAgfQoKICAgICBzd2l0Y2ggKG9mZnNldCkgewotICAgIGNhc2UgMHgxMDog LyogSU5UQ19TWVNDT05GSUcgKi8KKyAgICBjYXNlIDB4MTA6ICAvKiBJTlRDX1NZU0NPTkZJRyAq LwogICAgICAgICBzLT5hdXRvaWRsZSAmPTNEIDQ7CiAgICAgICAgIHMtPmF1dG9pZGxlIHw9M0Qg KHZhbHVlICYgMSkgPDwgMjsKICAgICAgICAgaWYgKHZhbHVlICYgMikgeyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAvKgpTT0ZUUkVTRVQgKi8KQEAgLTUyOSwyMSArNTM1 LDIxIEBAIHN0YXRpYyB2b2lkIG9tYXAyX2ludGhfd3JpdGUodm9pZCAqb3BhcXVlLCBod2FkZHIK YWRkciwKICAgICAgICAgfQogICAgICAgICByZXR1cm47CgotICAgIGNhc2UgMHg0ODogLyogSU5U Q19DT05UUk9MICovCi0gICAgICAgIHMtPm1hc2sgPTNEICh2YWx1ZSAmIDQpID8gMCA6IH4wOyAv KiBHTE9CQUxNQVNLICovCi0gICAgICAgIGlmICh2YWx1ZSAmIDIpIHsgLyogTkVXRklRQUdSICov CisgICAgY2FzZSAweDQ4OiAgLyogSU5UQ19DT05UUk9MICovCisgICAgICAgIHMtPm1hc2sgPTNE ICh2YWx1ZSAmIDQpID8gMCA6IH4wOyAgICAgICAgICAgICAgICAgICAgICAgICAvKgpHTE9CQUxN QVNLICovCisgICAgICAgIGlmICh2YWx1ZSAmIDIpIHsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgLyoKTkVXRklRQUdSICovCiAgICAgICAgICAgICBxZW11X3NldF9pcnEo cy0+cGFyZW50X2ludHJbMV0sIDApOwogICAgICAgICAgICAgcy0+bmV3X2FnclsxXSA9M0QgfjA7 CiAgICAgICAgICAgICBvbWFwX2ludGhfdXBkYXRlKHMsIDEpOwogICAgICAgICB9Ci0gICAgICAg IGlmICh2YWx1ZSAmIDEpIHsgLyogTkVXSVJRQUdSICovCisgICAgICAgIGlmICh2YWx1ZSAmIDEp IHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoKTkVXSVJRQUdSICov CiAgICAgICAgICAgICBxZW11X3NldF9pcnEocy0+cGFyZW50X2ludHJbMF0sIDApOwogICAgICAg ICAgICAgcy0+bmV3X2FnclswXSA9M0QgfjA7CiAgICAgICAgICAgICBvbWFwX2ludGhfdXBkYXRl KHMsIDApOwogICAgICAgICB9CiAgICAgICAgIHJldHVybjsKCi0gICAgY2FzZSAweDRjOiAvKiBJ TlRDX1BST1RFQ1RJT04gKi8KKyAgICBjYXNlIDB4NGM6ICAvKiBJTlRDX1BST1RFQ1RJT04gKi8K ICAgICAgICAgLyogVE9ETzogTWFrZSBhIGJpdG1hcCAob3Igc2l6ZW9mKGNoYXIpbWFwKSBvZiBh Y2Nlc3MgcHJpdmlsZWdlcwogICAgICAgICAgKiBmb3IgZXZlcnkgcmVnaXN0ZXIsIHNlZSBDaGFw dGVyIDMgYW5kIDQgZm9yIHByaXZpbGVnZWQgbW9kZS4gICovCiAgICAgICAgIGlmICh2YWx1ZSAm IDEpCkBAIC01NTEsNDQgKzU1Nyw0NSBAQCBzdGF0aWMgdm9pZCBvbWFwMl9pbnRoX3dyaXRlKHZv aWQgKm9wYXF1ZSwgaHdhZGRyCmFkZHIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX19m dW5jX18pOwogICAgICAgICByZXR1cm47CgotICAgIGNhc2UgMHg1MDogLyogSU5UQ19JRExFICov CisgICAgY2FzZSAweDUwOiAgLyogSU5UQ19JRExFICovCiAgICAgICAgIHMtPmF1dG9pZGxlICY9 M0QgfjM7CiAgICAgICAgIHMtPmF1dG9pZGxlIHw9M0QgdmFsdWUgJiAzOwogICAgICAgICByZXR1 cm47CgogICAgIC8qIFBlci1iYW5rIHJlZ2lzdGVycyAqLwotICAgIGNhc2UgMHg4NDogLyogSU5U Q19NSVIgKi8KKyAgICBjYXNlIDB4ODQ6ICAvKiBJTlRDX01JUiAqLwogICAgICAgICBiYW5rLT5t YXNrID0zRCB2YWx1ZTsKICAgICAgICAgb21hcF9pbnRoX3VwZGF0ZShzLCAwKTsKICAgICAgICAg b21hcF9pbnRoX3VwZGF0ZShzLCAxKTsKICAgICAgICAgcmV0dXJuOwoKLSAgICBjYXNlIDB4ODg6 IC8qIElOVENfTUlSX0NMRUFSICovCisgICAgY2FzZSAweDg4OiAgLyogSU5UQ19NSVJfQ0xFQVIg Ki8KICAgICAgICAgYmFuay0+bWFzayAmPTNEIH52YWx1ZTsKICAgICAgICAgb21hcF9pbnRoX3Vw ZGF0ZShzLCAwKTsKICAgICAgICAgb21hcF9pbnRoX3VwZGF0ZShzLCAxKTsKICAgICAgICAgcmV0 dXJuOwoKLSAgICBjYXNlIDB4OGM6IC8qIElOVENfTUlSX1NFVCAqLworICAgIGNhc2UgMHg4Yzog IC8qIElOVENfTUlSX1NFVCAqLwogICAgICAgICBiYW5rLT5tYXNrIHw9M0QgdmFsdWU7CiAgICAg ICAgIHJldHVybjsKCi0gICAgY2FzZSAweDkwOiAvKiBJTlRDX0lTUl9TRVQgKi8KKyAgICBjYXNl IDB4OTA6ICAvKiBJTlRDX0lTUl9TRVQgKi8KICAgICAgICAgYmFuay0+aXJxcyB8PTNEIGJhbmst PnN3aSB8PTNEIHZhbHVlOwogICAgICAgICBvbWFwX2ludGhfdXBkYXRlKHMsIDApOwogICAgICAg ICBvbWFwX2ludGhfdXBkYXRlKHMsIDEpOwogICAgICAgICByZXR1cm47CgotICAgIGNhc2UgMHg5 NDogLyogSU5UQ19JU1JfQ0xFQVIgKi8KKyAgICBjYXNlIDB4OTQ6ICAvKiBJTlRDX0lTUl9DTEVB UiAqLwogICAgICAgICBiYW5rLT5zd2kgJj0zRCB+dmFsdWU7CiAgICAgICAgIGJhbmstPmlycXMg PTNEIGJhbmstPnN3aSAmIGJhbmstPmlucHV0czsKICAgICAgICAgcmV0dXJuOwoKICAgICAvKiBQ ZXItbGluZSByZWdpc3RlcnMgKi8KLSAgICBjYXNlIDB4MTAwIC4uLiAweDMwMDogLyogSU5UQ19J TFIgKi8KKyAgICBjYXNlIDB4MTAwIC4uLiAweDMwMDogICAgICAgLyogSU5UQ19JTFIgKi8KICAg ICAgICAgYmFua19ubyA9M0QgKG9mZnNldCAtIDB4MTAwKSA+PiA3OwotICAgICAgICBpZiAoYmFu a19ubyA+IHMtPm5iYW5rcykKKyAgICAgICAgaWYgKGJh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V0dV9pbnRfcnRjZCA9M0QgNCwgLyog RGF5cyAqLwotICAgIHJldHVfaW50X3J0Y2EgPTNEIDUsIC8qIEFsYXJtICovCi0gICAgcmV0dV9p bnRfaG9vayA9M0QgNiwgLyogSG9vayAqLwotICAgIHJldHVfaW50X2hlYWQgPTNEIDcsIC8qIEhl YWRzZXQgKi8KLSAgICByZXR1X2ludF9hZGNzID0zRCA4LCAvKiBBREMgc2FtcGxlICovCisgICAg cmV0dV9pbnRfcHdyICA9M0QgMCwgIC8qIFBvd2VyIGJ1dHRvbiAqLworICAgIHJldHVfaW50X2No YXIgPTNEIDEsICAvKiBDaGFyZ2VyICovCisgICAgcmV0dV9pbnRfcnRjcyA9M0QgMiwgIC8qIFNl Y29uZHMgKi8KKyAgICByZXR1X2ludF9ydGNtID0zRCAzLCAgLyogTWludXRlcyAqLworICAgIHJl dHVfaW50X3J0Y2QgPTNEIDQsICAvKiBEYXlzICovCisgICAgcmV0dV9pbnRfcnRjYSA9M0QgNSwg IC8qIEFsYXJtICovCisgICAgcmV0dV9pbnRfaG9vayA9M0QgNiwgIC8qIEhvb2sgKi8KKyAgICBy ZXR1X2ludF9oZWFkID0zRCA3LCAgLyogSGVhZHNldCAqLworICAgIHJldHVfaW50X2FkY3MgPTNE IDgsICAvKiBBREMgc2FtcGxlICovCiB9OwoKIC8qIFJldHUgQURDIGNoYW5uZWwgd2lyaW5nICov CiBlbnVtIHsKLSAgICByZXR1X2FkY19ic2kgPTNEIDEsIC8qIEJTSSAqLwotICAgIHJldHVfYWRj X2JhdHRfdGVtcCA9M0QgMiwgLyogQmF0dGVyeSB0ZW1wZXJhdHVyZSAqLwotICAgIHJldHVfYWRj X2NoZ192b2x0ID0zRCAzLCAvKiBDaGFyZ2VyIHZvbHRhZ2UgKi8KLSAgICByZXR1X2FkY19oZWFk X2RldCA9M0QgNCwgLyogSGVhZHNldCBkZXRlY3Rpb24gKi8KLSAgICByZXR1X2FkY19ob29rX2Rl dCA9M0QgNSwgLyogSG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LAotICAgIC5wYXJlbnQgPTNEICZmdW5jXzk2bV9jbGssCisgICAgLm5hbWUgPTNEICJtbWNf ZmNsayIsCisgICAgLmZsYWdzID0zRCBDTE9DS19JTl9PTUFQMjQyWCwKKyAgICAucGFyZW50ID0z RCAmZnVuY185Nm1fY2xrLAogfTsKCiBzdGF0aWMgc3RydWN0IGNsayBtbWNfaWNrID0zRCB7Ci0g ICAgLm5hbWUgPTNEICJtbWNfaWNsayIsCi0gICAgLmZsYWdzID0zRCBDTE9DS19JTl9PTUFQMjQy WCwKLSAgICAucGFyZW50ID0zRCAmY29yZV9sNF9pY2xrLAorICAgIC5uYW1lID0zRCAibW1jX2lj bGsiLAorICAgIC5mbGFncyA9M0QgQ0xPQ0tfSU5fT01BUDI0MlgsCisgICAgLnBhcmVudCA9M0Qg JmNvcmVfbDRfaWNsaywKIH07Cgogc3RhdGljIHN0cnVjdCBjbGsgc3BpX2ZjbGtbM10gPTNEIHsK ICAgICB7Ci0gICAgICAgIC5uYW1lID0zRCAic3BpMV9mY2xrIiwKLSAgICAgICAgLmZsYWdzID0z RCBDTE9DS19JTl9PTUFQMjQyWCB8IENMT0NLX0lOX09NQVAyNDNYLAotICAgICAgICAucGFyZW50 ID0zRCAmZnVuY180OG1fY2xrLAorICAgICAgICAubmFtZSA9M0QgInNwaTFfZmNsayIsCisgICAg ICAgIC5mbGFncyA9M0QgQ0xPQ0tfSU5fT01BUDI0MlggfCBDTE9DS19JTl9PTUFQMjQzWCwKKyAg ICAgICAgLnBhcmVudCA9M0QgJmZ1bmNfNDhtX2NsaywKICAgICB9LCB7Ci0gICAgICAgIC5uYW1l ID0zRCAic3BpMl9mY2xrIiwKLSAgICAgICAgLmZsYWdzID0zRCBDTE9DS19JTl9PTUFQMjQyWCB8 IENMT0NLX0lOX09NQVAyNDNYLAotICAgICAgICAucGFyZW50ID0zRCAmZnVuY180OG1fY2xrLAor ICAgICAgICAubmFtZSA9M0QgInNwaTJfZmNsayIsCisgICAgICAgIC5mbG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AgICBmb3IgKGkgPTNEIG9u Y2hpcF9jbGtzLCBjb3VudCA9M0QgMDsgKmk7IGkrKykKKyAgICAgICAgaWYgKCgqaSktPmZsYWdz ICYgZmxhZykgeworICAgICAgICAgICAgY291bnQrKzsKKyAgICAgICAgfQogICAgIG1wdS0+Y2xr cyA9M0QgZ19uZXcwKHN0cnVjdCBjbGssIGNvdW50ICsgMSk7Ci0gICAgZm9yIChpID0zRCBvbmNo aXBfY2xrcywgaiA9M0QgbXB1LT5jbGtzOyAqaTsgaSArKykKKyAgICBmb3IgKGkgPTNEIG9uY2hp cF9jbGtzLCBqID0zRCBtcHUtPmNsa3M7ICppOyBpKyspCiAgICAgICAgIGlmICgoKmkpLT5mbGFn cyAmIGZsYWcpIHsKICAgICAgICAgICAgIG1lbWNweShqLCAqaSwgc2l6ZW9mKHN0cnVjdCBjbGsp KTsKLSAgICAgICAgICAgIGZvciAoayA9M0QgbXB1LT5jbGtzOyBrIDwgajsgayArKykKKyAgICAg ICAgICAgIGZvciAoayA9M0QgbXB1LT5jbGtzOyBrIDwgajsgaysrKQogICAgICAgICAgICAgICAg IGlmIChqLT5wYXJlbnQgJiYgIXN0cmNtcChqLT5wYXJlbnQtPm5hbWUsIGstPm5hbWUpKSB7CiAg ICAgICAgICAgICAgICAgICAgIGotPnBhcmVudCA9M0QgazsKICAgICAgICAgICAgICAgICAgICAg ai0+c2libGluZyA9M0Qgay0+Y2hpbGQxOwpAQCAtMTI1OCw5ICsxMjcxLDkgQEAgdm9pZCBvbWFw X2Nsa19pbml0KHN0cnVjdCBvbWFwX21wdV9zdGF0ZV9zICptcHUpCiAgICAgICAgICAgICAgICAg fQogICAgICAgICAgICAgai0+ZGl2aXNvciA9M0Qgai0+ZGl2aXNvciA/OiAxOwogICAgICAgICAg ICAgai0+bXVsdGlwbGllciA9M0Qgai0+bXVsdGlwbGllciA/OiAxOwotICAgICAgICAgICAgaiAr KzsKKyAgICAgICAgICAgIGorKzsKICAgICAgICAgfQotICAgIGZv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YXNlIDB4MDA6IC8qIENPTVBPTkVOVCAqLwotICAgIGNhc2UgMHgyODogLyogQUdFTlRf U1RBVFVTICovCisgICAgY2FzZSAweDAwOiAgLyogQ09NUE9ORU5UICovCisgICAgY2FzZSAweDI4 OiAgLyogQUdFTlRfU1RBVFVTICovCiAgICAgICAgIE9NQVBfUk9fUkVHKGFkZHIpOwogICAgICAg ICBicmVhazsKCi0gICAgY2FzZSAweDIwOiAvKiBBR0VOVF9DT05UUk9MICovCisgICAgY2FzZSAw eDIwOiAgLyogQUdFTlRfQ09OVFJPTCAqLwogICAgICAgICBzLT5jb250cm9sID0zRCB2YWx1ZSAm IDB4MDEwMDA3MDA7Ci0gICAgICAgIGlmICh2YWx1ZSAmIDEpIC8qIE9DUF9SRVNFVCAqLwotICAg ICAgICAgICAgcy0+c3RhdHVzICY9M0QgfjE7IC8qIFJFUV9USU1FT1VUICovCisgICAgICAgIGlm ICh2YWx1ZSAmIDEpIHsgICAgICAgIC8qIE9DUF9SRVNFVCAqLworICAgICAgICAgICAgcy0+c3Rh dHVzICY9M0QgfjE7ICAgICAgICAvKiBSRVFfVElNRU9VVCAqLworICAgICAgICB9CiAgICAgICAg IGJyZWFrOwoKICAgICBkZWZhdWx0OgpAQCAtMTE3LDcgKzExOCw3IEBAIHN0cnVjdCBvbWFwX3Rh cmdldF9hZ2VudF9zICpvbWFwX2w0dGFfZ2V0KHN0cnVjdApvbWFwX2w0X3MgKmJ1cywKICAgICBz dHJ1Y3Qgb21hcF90YXJnZXRfYWdlbnRfcyAqdGEgPTNEIE5VTEw7CiAgICAgY29uc3Qgc3RydWN0 IG9tYXBfbDRfYWdlbnRfaW5mb19zICppbmZvID0zRCBOVUxMOwoKLSAgICBmb3IgKGkgPTNEIDA7 IGkgPCBidXMtPnRhX251bTsgaSArKykKKyAgICBmb3IgKGkgPTNEIDA7IGkgPCBidXMtPnRhX251 bTsgaSsrKQogICAgICAgICBpZiAoYWdlbnRzW2ldLnRhID0zRD0zRCBjcykgew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yogU0RSQ19ETExC X0NUUkwgKi8KKyAgICBjYXNlIDB4NmM6ICAvKiBTRFJDX0RMTEJfU1RBVFVTICovCisgICAgY2Fz ZSAweDcwOiAgLyogU0RSQ19QT1dFUiAqLworICAgIGNhc2UgMHg4MDogIC8qIFNEUkNfTUNGR18w ICovCisgICAgY2FzZSAweDg0OiAgLyogU0RSQ19NUl8wICovCisgICAgY2FzZSAweDg4OiAgLyog U0RSQ19FTVIxXzAgKi8KKyAgICBjYXNlIDB4OGM6ICAvKiBTRFJDX0VNUjJfMCAqLworICAgIGNh c2UgMHg5MDogIC8qIFNEUkNfRU1SM18wICovCisgICAgY2FzZSAweDk0OiAgLyogU0RSQ19EQ0RM MV9DVFJMICovCisgICAgY2FzZSAweDk4OiAgLyogU0RSQ19EQ0RMMl9DVFJMICovCisgICAgY2Fz ZSAweDljOiAgLyogU0RSQ19BQ1RJTV9DVFJMQV8wICovCisgICAgY2FzZSAweGEwOiAgLyogU0RS Q19BQ1RJTV9DVFJMQl8wICovCisgICAgY2FzZSAweGE0OiAgLyogU0RSQ19SRlJfQ1RSTF8wICov CisgICAgY2FzZSAweGE4OiAgLyogU0RSQ19NQU5VQUxfMCAqLworICAgIGNhc2UgMHhiMDogIC8q IFNEUkNfTUNGR18xICovCisgICAgY2FzZSAweGI0OiAgLyogU0RSQ19NUl8xICovCisgICAgY2Fz ZSAweGI4OiAgLyogU0RSQ19FTVIxXzEgKi8KKyAgICBjYXNlIDB4YmM6ICAvKiBTRFJDX0VNUjJf MSAqLworICAgIGNhc2UgMHhjMDogIC8qIFNEUkNfRU1SM18xICovCisgICAgY2FzZSAweGM0OiAg LyogU0RSQ19BQ1RJTV9DVFJMQV8xICovCisgICAgY2FzZSAweGM4OiAgLyogU0RSQ19BQ1RJTV9D VFJMQl8xICovCisgICAgY2FzZSAweGQ0OiAgLyogU0RSQ19SRlJfQ1RSTF8xICovCisgICAgY2Fz ZSAweGQ4OiAgLyogU0RSQ19NQU5VQUxfMSAqLwogICAg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G9tYXAyNDIzOgotICAgICAgICAgICAgcmV0dXJuIDB4NWI1ZDkwMmY7IC8qIEVT IDIuMiAqLworICAgICAgICAgICAgcmV0dXJuIDB4NWI1ZDkwMmY7ICAvKiBFUyAyLjIgKi8KICAg ICAgICAgY2FzZSBvbWFwMjQzMDoKLSAgICAgICAgICAgIHJldHVybiAweDViNjhhMDJmOyAvKiBF UyAyLjIgKi8KKyAgICAgICAgICAgIHJldHVybiAweDViNjhhMDJmOyAgLyogRVMgMi4yICovCiAg ICAgICAgIGNhc2Ugb21hcDM0MzA6Ci0gICAgICAgICAgICByZXR1cm4gMHgxYjdhZTAyZjsgLyog RVMgMiAqLworICAgICAgICAgICAgcmV0dXJuIDB4MWI3YWUwMmY7ICAvKiBFUyAyICovCiAgICAg ICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICBod19lcnJvcigiJXM6IEJhZCBtcHUgbW9kZWxcbiIs IF9fZnVuY19fKTsKICAgICAgICAgfQoKLSAgICBjYXNlIDB4MjA4OiAvKiBQUk9EVUNUSU9OX0lE X3JlZyBmb3IgT01BUDIgKi8KLSAgICBjYXNlIDB4MjEwOiAvKiBQUk9EVUNUSU9OX0lEX3JlZyBm b3IgT01BUDMgKi8KKyAgICBjYXNlIDB4MjA4OiAvKiBQUk9EVUNUSU9OX0lEX3JlZyBmb3IgT01B UDIgKi8KKyAgICBjYXNlIDB4MjEwOiAvKiBQUk9EVUNUSU9OX0lEX3JlZyBmb3IgT01BUDMgKi8K ICAgICAgICAgc3dpdGNoIChzLT5tcHVfbW9kZWwpIHsKICAgICAgICAgY2FzZSBvbWFwMjQyMDoK LSAgICAgICAgICAgIHJldHVybiAweDAwMDI1NGYwOyAvKiBQT1AgRVNIUzIuMS4xIGluIE45MS85 My85NSwgRVMyIGluIE44MDAKKi8KKyAgICAgICAgICAgIHJldHVybiAweDAwMDI1NGYwOyAgLyog UE9QIEVTSFMyLjEuMSBpbiBOOTEvOTMvOTUsIEVTMiBpbiBOODAwCiovCiAgICAgICAgIGNhc2Ug b21hcDI0MjI6CiAgICAgICAgICAgICByZXR1cm4gMHgwMDA0MDBmMDsKICAgICAgICAgY2FzZSBv bWFwMjQyMzoKQEAgLTY4LDIyICs2OCwyMiBAQCBzdGF0aWMgdWludDY0X3Qgb21hcF90YXBfcmVh ZCh2b2lkICpvcGFxdWUsIGh3YWRkcgphZGRyLCB1bnNpZ25lZCBzaXplKQogICAgICAgICBjYXNl IG9tYXAyNDIwOgogICAgICAgICBjYXNlIG9tYXAyNDIyOgogICAgICAgICBjYXNlIG9tYXAyNDIz OgotICAgICAgICAgICAgcmV0dXJuIDB4Y2FmZWI1ZDk7IC8qIEVTIDIuMiAqLworICAgICAgICAg ICAgcmV0dXJuIDB4Y2FmZWI1ZDk7ICAvKiBFUyAyLjIgKi8KICAgICAgICAgY2FzZSBvbWFwMjQz MDoKLSAgICAgICAgICAgIHJldHVybiAweGNhZmViNjhhOyAvKiBFUyAyLjIgKi8KKyAgICAgICAg ICAgIHJldHVybiAweGNhZmViNjhhOyAgLyogRVMgMi4yICovCiAgICAgICAgIGNhc2Ugb21hcDM0 MzA6Ci0gICAgICAgICAgICByZXR1cm4gMHhjYWZlYjdhZTsgLyogRVMgMiAqLworICAgICAgICAg ICAgcmV0dXJuIDB4Y2FmZWI3YWU7ICAvKiBFUyAyICovCiAgICAgICAgIGRlZmF1bHQ6CiAgICAg ICAgICAgICBod19lcnJvcigiJXM6IEJhZCBtcHUgbW9kZWxcbiIsIF9fZnVuY19fKTsKICAgICAg ICAgfQoKLSAgICBjYXNlIDB4MjE4OiAvKiBESUVfSURfcmVnICovCisgICAgY2FzZSAweDIxODog LyogRElFX0lEX3JlZyAqLwogICAgICAgICByZXR1cm4gKCdRJyA8PCAyNCkgfCAoJ0UnIDw8IDE2 KSB8ICgnTScgPDwgOCkgfCAoJ1UnIDw8IDApOwotICAgIGNhc2UgMHgyMWM6IC8qIERJRV9JRF9y ZWcgKi8KKyAgICBjYXNlIDB4MjFjOiAvKiBESUVf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MpKSB7CiAgICAgICAgICAgICBtYXNrIHw9M0QgQUtFX1NFUV9FUlJP UjsKKyAgICAgICAgfQogICAgICAgICByc3BzdGF0dXMgPTNEIGxkbF9iZV9wKHJlc3BvbnNlKTsK ICAgICAgICAgYnJlYWs7CgpAQCAtMTg1LDEwICsxODcsMTEgQEAgc3RhdGljIHZvaWQgb21hcF9t bWNfY29tbWFuZChzdHJ1Y3Qgb21hcF9tbWNfcyAqaG9zdCwKaW50IGNtZCwgaW50IGRpciwKICAg ICAgICAgcnNwbGVuID0zRCA0OwoKICAgICAgICAgcnNwc3RhdHVzID0zRCBsZGxfYmVfcChyZXNw b25zZSk7Ci0gICAgICAgIGlmIChyc3BzdGF0dXMgJiAweDgwMDAwMDAwKQorICAgICAgICBpZiAo cnNwc3RhdHVzICYgMHg4MDAwMDAwMCkgewogICAgICAgICAgICAgaG9zdC0+c3RhdHVzICY9M0Qg MHhlMDAwOwotICAgICAgICBlbHNlCisgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICBob3N0 LT5zdGF0dXMgfD0zRCAweDEwMDA7CisgICAgICAgIH0KICAgICAgICAgYnJlYWs7CgogICAgIGNh c2Ugc2RfcjY6CkBAIC0yMDIsMzUgKzIwNSwzOSBAQCBzdGF0aWMgdm9pZCBvbWFwX21tY19jb21t YW5kKHN0cnVjdCBvbWFwX21tY19zICpob3N0LAppbnQgY21kLCBpbnQgZGlyLAogICAgICAgICBy c3BzdGF0dXMgPTNEIChyZXNwb25zZVsyXSA8PCA4KSB8IChyZXNwb25zZVszXSA8PCAwKTsKICAg ICB9CgotICAgIGlmIChyc3BzdGF0dXMgJiBtYXNrKQorICAgIGlmIChyc3BzdGF0dXMgJiBtYXNr KSB7CiAgICAgICAgIGhvc3QtPnN0YXR1cyB8PTNEIDB4NDAwMDsKLSAgICBlbHNlCisgICAgfSBl bHNlIHsKICAgICAgICAgaG9zdC0+c3RhdHVzICY9M0QgMHhiMDAwOworICAgIH0KCiAgICAgaWYg KHJzcG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IGlmIChob3N0LT5maWZvX2xlbiA+IGhvc3Qt PmFmX2xldmVsKSB7CiAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CgogICAg ICAgICAgICAgdmFsdWUgPTNEIHNkX3JlYWRfYnl0ZShob3N0LT5jYXJkKTsKICAgICAgICAgICAg IGhvc3QtPmZpZm9bKGhvc3QtPmZpZm9fc3RhcnQgKyBob3N0LT5maWZvX2xlbikgJiAzMV0gPTNE IHZhbHVlOwpAQCAtMjM4LDI5ICsyNDUsMzAgQEAgc3RhdGljIHZvaWQgb21hcF9tbWNfdHJhbnNm ZXIoc3RydWN0IG9tYXBfbW1jX3MgKmhvc3QpCiAgICAgICAgICAgICAgICAgdmFsdWUgPTNEIHNk X3JlYWRfYnl0ZShob3N0LT5jYXJkKTsKICAgICAgICAgICAgICAgICBob3N0LT5maWZvWyhob3N0 LT5maWZvX3N0YXJ0ICsgaG9zdC0+Zmlmb19sZW4pICYgMzFdIHw9M0QKICAgICAgICAgICAgICAg ICAgICAgICAgIHZhbHVlIDw8IDg7Ci0gICAgICAgICAgICAgICAgaG9zdC0+Ymxlbl9jb3VudGVy IC0tOworICAgICAgICAgICAgICAgIGhvc3QtPmJsZW5fY291bnRlci0tOwogICAgICAgICAgICAg fQoKLSAgICAgICAgICAgIGhvc3QtPmZpZm9fbGVuICsrOworICAgICAgICAgICAgaG9zdC0+Zmlm b19sZW4rKzsKICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgIGlmICghaG9zdC0+Zmlmb19s ZW4pCisgICAgICAgICAgICBpZiAoIWhvc3QtPmZpZm9fbGVuKSB7CiAgICAgICAgICAgICAgICAg YnJlYWs7CisgICAgICAgICAgICB9CgogICAgICAgICAgICAgdmFsdWUgPTNEIGhvc3QtPmZpZm9b aG9zdC0+Zmlmb19zdGFydF0gJiAweGZmOwogICAgICAgICAgICAgc2Rfd3JpdGVfYnl0ZShob3N0 LT5jYXJkLCB2YWx1ZSk7CiAgICAgICAgICAgICBpZiAoLS0gaG9zdC0+Ymxlbl9jb3VudGVyKSB7 CiAgICAgICAgICAgICAgICAgdmFsdWUgPTNEIGhvc3QtPmZpZm9baG9zdC0+Zmlmb19zdGFydF0g Pj4gODsKICAgICAgICAgICAgICAgICBzZF93cml0ZV9ieXRlKGhvc3QtPmNhcmQsIHZhbHVlKTsK LSAgICAgICAgICAgICAgICBob3N0LT5ibGVuX2NvdW50ZXIgLS07CisgICAgICAgICAgICAgICAg aG9zdC0+Ymxlbl9jb3VudGVyLS07CiAgICAgICAgICAgICB9CgotICAgICAgICAgICAgaG9zdC0+ Zmlmb19zdGFydCArKzsKLSAgICAgICAgICAgIGhvc3QtPmZpZm9fbGVuIC0tOworICAgICAgICAg ICAgaG9zdC0+Zmlmb19zdGFydCsrOworICAgICAgICAgICAgaG9zdC0+Zmlmb19sZW4tLTsKICAg ICAgICAgICAgIGhvc3QtPmZpZm9fc3RhcnQgJj0zRCAzMTsKICAgICAgICAgfQoKICAgICAgICAg aWYgKGhvc3QtPmJsZW5fY291bnRlciA9M0Q9M0QgMCkgewotICAgICAgICAgICAgaG9zdC0+bmJs a19jb3VudGVyIC0tOworICAgICAgICAgICAgaG9zdC0+bmJsa19jb3VudGVyLS07CiAgICAgICAg ICAgICBob3N0LT5ibGVuX2NvdW50ZXIgPTNEIGhvc3QtPmJsZW47CgogICAgICAgICAgICAgaWYg KGhvc3QtPm5ibGtfY291bnRlciA9M0Q9M0QgMCkgewpAQCAtMzMxLDgyICszMzksODIgQEAgc3Rh dGljIHVpbnQ2NF90IG9tYXBfbW1jX3JlYWQodm9pZCAqb3BhcXVlLCBod2FkZHIKb2Zmc2V0LCB1 bnNpZ25lZCBzaXplKQogICAgIH0KCiAgICAgc3dpdGNoIChvZmZzZXQpIHsKLSAgICBjYXNlIDB4 MDA6IC8qIE1NQ19DTUQgKi8KKyAgICBjYXNlIDB4MDA6ICAvKiBNTUNfQ01EICovCiAgICAgICAg IHJldHVybiBzLT5sYXN0X2NtZDsKCi0gICAgY2FzZSAweDA0OiAvKiBNTUNfQVJHTCAqLworICAg IGNhc2UgMHgwNDogIC8qIE1NQ19BUkdMICovCiAgICAgICAgIHJldHVybiBzLT5hcmcgJiAweDAw MDBmZmZmOwoKLSAgICBjYXNlIDB4MDg6IC8qIE1NQ19BUkdIICovCisgICAgY2FzZSAweDA4OiAg LyogTU1DX0FSR0ggKi8KICAgICAgICAgcmV0dXJuIHMtPmFyZyA+PiAxNjsKCi0gICAgY2FzZSAw eDBjOiAvKiBNTUNfQ09OICovCi0gICAgICAgIHJldHVybiAocy0+ZHcgPDwgMTUpIHwgKHMtPm1v ZGUgPDwgMTIpIHwgKHMtPmVuYWJsZSA8PCAxMSkgfAorICAgIGNhc2UgMHgwYzogIC8qIE1NQ19D T04gKi8KKyAgICAgICAgcmV0dXJuIChzLT5kdyA8PCAxNSkgfCAocy0+bW9kZSA8PCAxMikgfCAo cy0+ZW5hYmxlIDw8IDExKSB8CiAgICAgICAgICAgICAgICAgKHMtPmJlIDw8IDEwKSB8IHMtPmNs a2RpdjsKCi0gICAgY2FzZSAweDEwOiAvKiBNTUNfU1RBVCAqLworICAgIGNhc2UgMHgxMDogIC8q IE1NQ19TVEFUICovCiAgICAgICAgIHJldHVybiBzLT5zdGF0dXM7CgotICAgIGNhc2UgMHgxNDog LyogTU1DX0lFICovCisgICAgY2FzZSAweDE0OiAgLyogTU1DX0lFICovCiAgICAgICAgIHJldHVy biBzLT5tYXNrOwoKLSAgICBjYXNlIDB4MTg6IC8qIE1NQ19DVE8gKi8KKyAgICBjYXNlIDB4MTg6 ICAvKiBNTUNfQ1RPICovCiAgICAgICAgIHJldHVybiBzLT5jdG87CgotICAgIGNhc2UgMHgxYzog LyogTU1DX0RUTyAqLworICAgIGNhc2UgMHgxYzogIC8qIE1NQ19EVE8gKi8KICAgICAgICAgcmV0 dXJuIHMtPmR0bzsKCi0gICAgY2FzZSAweDIwOiAvKiBNTUNfREFUQSAqLworICAgIGNhc2UgMHgy MDogIC8qIE1NQ19EQVRBICovCiAgICAgICAgIC8qIFRPRE86IHN1cHBvcnQgOC1iaXQgYWNjZXNz ICovCiAgICAgICAgIGkgPTNEIHMtPmZpZm9bcy0+Zmlmb19zdGFydF07CiAgICAgICAgIGlmIChz LT5maWZvX2xlbiA9M0Q9M0QgMCkgewogICAgICAgICAgICAgcHJpbnRmKCJNTUM6IEZJRk8gdW5k ZXJydW5cbiIpOwogICAgICAgICAgICAgcmV0dXJuIGk7CiAgICAgICAgIH0KLSAgICAgICAgcy0+ Zmlmb19zdGFydCArKzsKLSAgICAgICAgcy0+Zmlmb19sZW4gLS07CisgICAgICAgIHMtPmZpZm9f c3RhcnQrKzsKKyAgICAgICAgcy0+Zmlmb19sZW4tLTsKICAgICAgICAgcy0+Zmlmb19zdGFydCAm PTNEIDMxOwogICAgICAgICBvbWFwX21tY190cmFuc2ZlcihzKTsKICAgICAgICAgb21hcF9tbWNf Zmlmb2xldmVsX3VwZGF0ZShzKTsKICAgICAgICAgb21hcF9tbWNfaW50ZXJydXB0c191cGRhdGUo cyk7CiAgICAgICAgIHJldHVybiBpOwoKLSAgICBjYXNlIDB4MjQ6IC8qIE1NQ19CTEVOICovCisg ICAgY2FzZSAweDI0OiAgLyogTU1DX0JMRU4gKi8KICAgICAgICAgcmV0dXJuIHMtPmJsZW5fY291 bnRlcjsKCi0gICAgY2FzZSAweDI4OiAvKiBNTUNfTkJMSyAqLworICAgIGNhc2UgMHgyODogIC8q IE1NQ19OQkxLICovCiAgICAgICAgIHJldHVybiBzLT5uYmxrX2NvdW50ZXI7CgotICAgIGNhc2Ug MHgyYzogLyogTU1DX0JVRiAqLworICAgIGNhc2UgMHgyYzogIC8qIE1NQ19CVUYgKi8KICAgICAg ICAgcmV0dXJuIChzLT5yeF9kbWEgPDwgMTUpIHwgKHMtPmFmX2xldmVsIDw8IDgpIHwKICAgICAg ICAgICAgIChzLT50eF9kbWEgPDwgNykgfCBzLT5hZV9sZXZlbDsKCi0gICAgY2FzZSAweDMwOi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KiBNTUNfUlNQNiAqLworICAgIGNhc2Ug MHg1YzogIC8qIE1NQ19SU1A3ICovCiAgICAgICAgIHJldHVybiBzLT5yc3BbKG9mZnNldCAtIDB4 NDApID4+IDJdOwoKICAgICAvKiBPTUFQMi1zcGVjaWZpYyAqLwotICAgIGNhc2UgMHg2MDogLyog TU1DX0lPU1IgKi8KLSAgICBjYXNlIDB4NjQ6IC8qIE1NQ19TWVNDICovCisgICAgY2FzZSAweDYw OiAgLyogTU1DX0lPU1IgKi8KKyAgICBjYXNlIDB4NjQ6ICAvKiBNTUNfU1lTQyAqLwogICAgICAg ICByZXR1cm4gMDsKLSAgICBjYXNlIDB4Njg6IC8qIE1NQ19TWVNTICovCi0gICAgICAgIHJldHVy biAxOyAvKiBSU1REICovCisgICAgY2FzZSAweDY4OiAgLyogTU1DX1NZU1MgKi8KKyAgICAgICAg cmV0dXJuIDE7ICAgICAgICAgICAvKiBSU1REICovCiAgICAgfQoKICAgICBPTUFQX0JBRF9SRUco b2Zmc2V0KTsKQEAgLTQyNSwxMyArNDMzLDE1IEBAIHN0YXRpYyB2b2lkIG9tYXBfbW1jX3dyaXRl KHZvaWQgKm9wYXF1ZSwgaHdhZGRyCm9mZnNldCwKICAgICB9CgogICAgIHN3aXRjaCAob2Zmc2V0 KSB7Ci0gICAgY2FzZSAweDAwOiAvKiBNTUNfQ01EICovCi0gICAgICAgIGlmICghcy0+ZW5hYmxl KQorICAgIGNhc2UgMHgwMDogIC8qIE1NQ19DTUQgKi8KKyAgICAgICAgaWYgKCFzLT5lbmFibGUp IHsKICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CgogICAgICAgICBzLT5sYXN0X2NtZCA9 M0QgdmFsdWU7Ci0gICAgICAgIGZvciAoaSA9M0QgMDsgaSA8IDg7IGkgKyspCisgICAgICAgIGZv ciAoaSA9M0QgMDsgaSA8IDg7IGkrKykgewogICAgICAgICAgICAgcy0+cnNwW2ldID0zRCAweDAw MDA7CisgICAgICAgIH0KICAgICA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mc2V0LAogICAg ICAgICAgICAgcWVtdV9sb2dfbWFzayhMT0dfVU5JTVAsCiAgICAgICAgICAgICAgICAgICAgICAg ICAgICJvbWFwX21tY193cjogQmlnIEVuZGlhbiBub3QgaW1wbGVtZW50ZWRcbiIpOwogICAgICAg ICB9Ci0gICAgICAgIGlmIChzLT5kdyAhPTNEIDAgJiYgcy0+bGluZXMgPCA0KQorICAgICAgICBp ZiAocy0+ZHcgIT0zRCAwICYmIHMtPmxpbmVzIDwgNCkgewogICAgICAgICAgICAgcHJpbnRmKCI0 LWJpdCBTRCBidXMgZW5hYmxlZFxuIik7Ci0gICAgICAgIGlmICghcy0+ZW5hYmxlKQorICAgICAg ICB9CisgICAgICAgIGlmICghcy0+ZW5hYmxlKSB7CiAgICAgICAgICAgICBvbWFwX21tY19wc2V1 ZG9fcmVzZXQocyk7CisgICAgICAgIH0KICAgICAgICAgYnJlYWs7CgotICAgIGNhc2UgMHgxMDog LyogTU1DX1NUQVQgKi8KKyAgICBjYXNlIDB4MTA6ICAvKiBNTUNfU1RBVCAqLwogICAgICAgICBz LT5zdGF0dXMgJj0zRCB+dmFsdWU7CiAgICAgICAgIG9tYXBfbW1jX2ludGVycnVwdHNfdXBkYXRl KHMpOwogICAgICAgICBicmVhazsKCi0gICAgY2FzZSAweDE0OiAvKiBNTUNfSUUgKi8KKyAgICBj YXNlIDB4MTQ6ICAvKiBNTUNfSUUgKi8KICAgICAgICAgcy0+bWFzayA9M0QgdmFsdWUgJiAweDdm ZmY7CiAgICAgICAgIG9tYXBfbW1jX2ludGVycnVwdHNfdXBkYXRlKHMpOwogICAgICAgICBicmVh azsKCi0gICAgY2FzZSAweDE4OiAvKiBNTUNfQ1RPICovCisgICAgY2FzZSAweDE4OiAgLyogTU1D X0NUTyAqLwogICAgICAgICBzLT5jdG8gPTNEIHZhbHVlICYgMHhmZjsKLSAgICAgICAgaWYgKHMt PmN0byA+IDB4ZmQgJiYgcy0+cmV2IDw9M0QgMSkKKyAgICAgICAgaWYgKHMtPmN0byA+IDB4ZmQg JiYgcy0+cmV2IDw9M0QgMSkgewogICAgICAgICAgICAgcHJpbnRmKCJNTUM6IENUTyBvZiAweGZm IGFuZCAweGZlIGNhbm5vdCBiZSB1c2VkIVxuIik7CisgICAgICAgIH0KICAgICAgICAgYnJlYWs7 CgotICAgIGNhc2UgMHgxYzogLyogTU1DX0RUTyAqLworICAgIGNhc2UgMHgxYzogIC8qIE1NQ19E VE8gKi8KICAgICAgICAgcy0+ZHRvID0zRCB2YWx1ZSAmIDB4ZmZmZjsKICAgICAgICAgYnJlYWs7 CgotICAgIGNhc2UgMHgyMDogLyogTU1DX0RBVEEgKi8KKyAgICBjYXNlIDB4MjA6ICAvKiBNTUNf REFUQSAqLwogICAgICAgICAvKiBUT0RPOiBzdXBwb3J0IDgtYml0IGFjY2VzcyAqLwotICAgICAg ICBpZiAocy0+Zmlmb19sZW4gPTNEPTNEIDMyKQorICAgICAgICBpZiAocy0+Zmlmb19sZW4gPTNE PTNEIDMyKSB7CiAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQogICAgICAgICBzLT5maWZv WyhzLT5maWZvX3N0YXJ0ICsgcy0+Zmlmb19sZW4pICYgMzFdID0zRCB2YWx1ZTsKLSAgICAgICAg cy0+Zmlmb19sZW4gKys7CisgICAgICAgIHMtPmZpZm9fbGVuKys7CiAgICAgICAgIG9tYXBfbW1j X3RyYW5zZmVyKHMpOwogICAgICAgICBvbWFwX21tY19maWZvbGV2ZWxfdXBkYXRlKHMpOwogICAg ICAgICBvbWFwX21tY19pbnRlcnJ1cHRzX3VwZGF0ZShzKTsKICAgICAgICAgYnJlYWs7CgotICAg IGNhc2UgMHgyNDogLyogTU1DX0JMRU4gKi8KKyAgICBjYXNlIDB4MjQ6ICAvKiBNTUNfQkxFTiAq LwogICAgICAgICBzLT5ibGVuID0zRCAodmFsdWUgJiAweDA3ZmYpICsgMTsKICAgICAgICAgcy0+ Ymxlbl9jb3VudGVyID0zRCBzLT5ibGVuOwogICAgICAgICBicmVhazsKCi0gICAgY2FzZSAweDI4 OiAvKiBNTUNfTkJMSyAqLworICAgIGNhc2UgMHgyODogIC8qIE1NQ19OQkxLICovCiAgICAgICAg IHMtPm5ibGsgPTNEICh2YWx1ZSAmIDB4MDdmZikgKyAxOwogICAgICAgICBzLT5uYmxrX2NvdW50 ZXIgPTNEIHMtPm5ibGs7CiAgICAgICAgIHMtPmJsZW5fY291bnRlciA9M0Qgcy0+YmxlbjsKICAg ICAgICAgYnJlYWs7CgotICAgIGNhc2UgMHgyYzogLyogTU1DX0JVRiAqLworICAgIGNhc2UgMHgy YzogIC8qIE1NQ19CVUYgKi8KICAgICAgICAgcy0+cnhfZG1hID0zRCAodmFsdWUgPj4gMTUpICYg MTsKICAgICAgICAgcy0+YWZfbGV2ZWwgPTNEICh2YWx1ZSA+PiA4KSAmIDB4MWY7CiAgICAgICAg IHMtPnR4X2RtYSA9M0QgKHZhbHVlID4+IDcpICYgMTsKICAgICAgICAgcy0+YWVfbGV2ZWwgPTNE IHZhbHVlICYgMHgxZjsKCi0gICAgICAgIGlmIChzLT5yeF9kbWEpCisgICAgICAgIGlmIChzLT5y eF9kbWEpIHsKICAgICAgICAgICAgIHMtPnN0YXR1cyAmPTNEIDB4ZmJmZjsKLSAgICAgICAgaWYg KHMtPnR4X2RtYSkKKyAgICAgICAgfQorICAgICAgICBpZiAocy0+dHhfZG1hKSB7CiAgICAgICAg ICAgICBzLT5zdGF0dXMgJj0zRCAweGY3ZmY7CisgICAgICAgIH0KICAgICAgICAgb21hcF9tbWNf Zmlmb2xldmVsX3VwZGF0ZShzKTsKICAgICAgICAgb21hcF9tbWNfaW50ZXJydXB0c191cGRhdGUo cyk7CiAgICAgICAgIGJyZWFrOwoKICAgICAvKiBTUEksIFNESU8gYW5kIFRFU1QgbW9kZXMgdW5p bXBsZW1lbnRlZCAqLwotICAgIGNhc2UgMHgzMDogLyogTU1DX1NQSSAoT01BUDEgb25seSkgKi8K KyAgICBjYXNlIDB4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A0ICovCisgICAgY2FzZSAw eDU0OiAgLyogTU1DX1JTUDUgKi8KKyAgICBjYXNlIDB4NTg6ICAvKiBNTUNfUlNQNiAqLworICAg IGNhc2UgMHg1YzogIC8qIE1NQ19SU1A3ICovCiAgICAgICAgIE9NQVBfUk9fUkVHKG9mZnNldCk7 CiAgICAgICAgIGJyZWFrOwoKICAgICAvKiBPTUFQMi1zcGVjaWZpYyAqLwotICAgIGNhc2UgMHg2 MDogLyogTU1DX0lPU1IgKi8KLSAgICAgICAgaWYgKHZhbHVlICYgMHhmKQorICAgIGNhc2UgMHg2 MDogIC8qIE1NQ19JT1NSICovCisgICAgICAgIGlmICh2YWx1ZSAmIDB4ZikgewogICAgICAgICAg ICAgcHJpbnRmKCJNTUM6IFNESU8gYml0cyB1c2VkIVxuIik7CisgICAgICAgIH0KICAgICAgICAg YnJlYWs7Ci0gICAgY2FzZSAweDY0OiAvKiBNTUNfU1lTQyAqLwotICAgICAgICBpZiAodmFsdWUg JiAoMSA8PCAyKSkgLyogU1JUUyAqLworICAgIGNhc2UgMHg2NDogIC8qIE1NQ19TWVNDICovCisg ICAgICAgIGlmICh2YWx1ZSAmICgxIDw8IDIpKSB7ICAgICAgIC8qIFNSVFMgKi8KICAgICAgICAg ICAgIG9tYXBfbW1jX3Jlc2V0KHMpOworICAgICAgICB9CiAgICAgICAgIGJyZWFrOwotICAgIGNh c2UgMHg2ODogLyogTU1DX1NZU1MgKi8KKyAgICBjYXNlIDB4Njg6ICAvKiBNTUNfU1lTUyAqLwog ICAgICAgICBPTUFQX1JPX1JFRyhvZmZzZXQpOwogICAgICAgICBicmVhazsKCkBAIC02MDEsNyAr NjE5LDcgQEAgc3RydWN0IG9tYXBfbW1jX3MgKm9tYXBfbW1jX2luaXQoaHdhZGRyIGJhc2UsCiAg ICAgcy0+aXJxID0zRCBpcnE7CiAgICAgcy0+ZG1hID0zRCBkbWE7CiAgICAgcy0+Y2xrID0zRCBj bGs7Ci0gICAgcy0+bGluZXMgPTNE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iAoIXMtPmFjdGl2ZSkKKyAgICBpZiAoIXMtPmFjdGl2ZSkgewogICAgICAg ICByZXR1cm47CisgICAgfQoKICAgICBpZiAocy0+Y21kYXQgJiBDTURBVF9XUl9SRCkgewogICAg ICAgICB3aGlsZSAocy0+Ynl0ZXNsZWZ0ICYmIHMtPnR4X2xlbikgewogICAgICAgICAgICAgc2Ri dXNfd3JpdGVfYnl0ZSgmcy0+c2RidXMsIHMtPnR4X2ZpZm9bcy0+dHhfc3RhcnQrK10pOwogICAg ICAgICAgICAgcy0+dHhfc3RhcnQgJj0zRCAweDFmOwotICAgICAgICAgICAgcy0+dHhfbGVuIC0t OwotICAgICAgICAgICAgcy0+Ynl0ZXNsZWZ0IC0tOworICAgICAgICAgICAgcy0+dHhfbGVuLS07 CisgICAgICAgICAgICBzLT5ieXRlc2xlZnQtLTsKICAgICAgICAgfQotICAgICAgICBpZiAocy0+ Ynl0ZXNsZWZ0KQorICAgICAgICBpZiAocy0+Ynl0ZXNsZWZ0KSB7CiAgICAgICAgICAgICBzLT5p bnRyZXEgfD0zRCBJTlRfVFhGSUZPX1JFUTsKKyAgICAgICAgfQogICAgIH0gZWxzZQogICAgICAg ICB3aGlsZSAocy0+Ynl0ZXNsZWZ0ICYmIHMtPnJ4X2xlbiA8IDMyKSB7Ci0gICAgICAgICAgICBz LT5yeF9maWZvWyhzLT5yeF9zdGFydCArIChzLT5yeF9sZW4gKyspKSAmIDB4MWZdID0zRAorICAg ICAgICAgICAgcy0+cnhfZmlmb1socy0+cnhfc3RhcnQgKyAocy0+cnhfbGVuKyspKSAmIDB4MWZd ID0zRAogICAgICAgICAgICAgICAgIHNkYnVzX3JlYWRfYnl0ZSgmcy0+c2RidXMpOwotICAgICAg ICAgICAgcy0+Ynl0ZXNsZWZ0IC0tOworICAgICAgICAgICAgcy0+Ynl0ZXNsZWZ0LS07CiAgICAg ICAgICAgICBzLT5pbnRyZXEgfD0zRCBJTlRfUlhGSUZPX1JFUTsKICAgICAgICAgfQo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cG9uc2UgKi8KICAgICAgICAgZ290byBjb21wbGV0ZTsKCi0gICAgY2FzZSAxOiAvKiBS MSwgUjQsIFI1IG9yIFI2ICovCi0gICAgICAgIGlmIChyc3BsZW4gPCA0KQorICAgIGNhc2UgMTog LyogUjEsIFI0LCBSNSBvciBSNiAqLworICAgICAgICBpZiAocnNwbGVuIDwgNCkgewogICAgICAg ICAgICAgZ290byB0aW1lb3V0OworICAgICAgICB9CiAgICAgICAgIGdvdG8gY29tcGxldGU7Cgot ICAgIGNhc2UgMjogLyogUjIgKi8KLSAgICAgICAgaWYgKHJzcGxlbiA8IDE2KQorICAgIGNhc2Ug MjogLyogUjIgKi8KKyAgICAgICAgaWYgKHJzcGxlbiA8IDE2KSB7CiAgICAgICAgICAgICBnb3Rv IHRpbWVvdXQ7CisgICAgICAgIH0KICAgICAgICAgZ290byBjb21wbGV0ZTsKCi0gICAgY2FzZSAz OiAvKiBSMyAqLwotICAgICAgICBpZiAocnNwbGVuIDwgNCkKKyAgICBjYXNlIDM6IC8qIFIzICov CisgICAgICAgIGlmIChyc3BsZW4gPCA0KSB7CiAgICAgICAgICAgICBnb3RvIHRpbWVvdXQ7Cisg ICAgICAgIH0KICAgICAgICAgZ290byBjb21wbGV0ZTsKCiAgICAgY29tcGxldGU6Ci0gICAgICAg IGZvciAoaSA9M0QgMDsgcnNwbGVuID4gMDsgaSArKywgcnNwbGVuIC09M0QgMikgeworICAgICAg ICBmb3IgKGkgPTNEIDA7IHJzcGxlbiA+IDA7IGkrKywgcnNwbGVuIC09M0QgMikgewogICAgICAg ICAgICAgUFhBTU1DSV9SRVNQKGksIHJlc3BvbnNlW2kgKiAyXSwgcmVzcG9uc2VbaSAqIDIgKyAx XSk7CiAgICAgICAgIH0KICAgICAgICAgcy0+c3RhdHVzIHw9M0QgU1RBVF9FTkRfQ01EUkVTOwoK LSAgICAgICAgaWYgKCEocy0+Y21kYXQgJiBDTURBVF9EQVRBX0VOKSkKKyAgICAgICAgaWYgKCEo cy0+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TNEPTNEIHMtPmNhcHRfbnVtKyspIHsKICAgICAgICAgICAgIG9tYXBf Z3BfdGltZXJfaW50cihzLCBHUFRfVENBUl9JVCk7CisgICAgICAgIH0KICAgICB9CiB9CgpAQCAt MjY1LDI2ICsyNzEsMjYgQEAgc3RhdGljIHVpbnQzMl90IG9tYXBfZ3BfdGltZXJfcmVhZHcodm9p ZCAqb3BhcXVlLApod2FkZHIgYWRkcikKICAgICBzdHJ1Y3Qgb21hcF9ncF90aW1lcl9zICpzID0z RCBvcGFxdWU7CgogICAgIHN3aXRjaCAoYWRkcikgewotICAgIGNhc2UgMHgwMDogLyogVElEUiAq LworICAgIGNhc2UgMHgwMDogIC8qIFRJRFIgKi8KICAgICAgICAgcmV0dXJuIDB4MjE7CgotICAg IGNhc2UgMHgxMDogLyogVElPQ1BfQ0ZHICovCisgICAgY2FzZSAweDEwOiAgLyogVElPQ1BfQ0ZH ICovCiAgICAgICAgIHJldHVybiBzLT5jb25maWc7CgotICAgIGNhc2UgMHgxNDogLyogVElTVEFU ICovCisgICAgY2FzZSAweDE0OiAgLyogVElTVEFUICovCiAgICAgICAgIC8qID8/PyBXaGVuJ3Mg dGhpcyBiaXQgcmVzZXQ/ICovCi0gICAgICAgIHJldHVybiAxOyAvKiBSRVNFVERPTkUgKi8KKyAg ICAgICAgcmV0dXJuIDE7ICAgICAgICAgICAvKiBSRVNFVERPTkUgKi8KCi0gICAgY2FzZSAweDE4 OiAvKiBUSVNSICovCisgICAgY2FzZSAweDE4OiAgLyogVElTUiAqLwogICAgICAgICByZXR1cm4g cy0+c3RhdHVzOwoKLSAgICBjYXNlIDB4MWM6IC8qIFRJRVIgKi8KKyAgICBjYXNlIDB4MWM6ICAv KiBUSUVSICovCiAgICAgICAgIHJldHVybiBzLT5pdF9lbmE7CgotICAgIGNhc2UgMHgyMDogLyog VFdFUiAqLworICAgIGNhc2UgMHgyMDogIC8qIFRXRVIgKi8KICAgICAgICAgcmV0dXJuIHMtPnd1 X2VuYTsKCi0gICAgY2FzZSAweDI0OiAvKiBUQ0xSICovCisgICAgY2FzZSAweDI0OiAgLyogVENM UiAqLwogICAgICAgICByZXR1cm4gKHMtPmlub3V0IDw8IDE0KSB8CiAgICAgICAgICAgICAgICAg KHMtPmNhcHQyIDw8IDEzKSB8CiAgICAgICAgICAgICAgICAgKHMtPnB0IDw8IDEyKSB8CkBAIC0y OTcsMjggKzMwMywyOCBAQCBzdGF0aWMgdWludDMyX3Qgb21hcF9ncF90aW1lcl9yZWFkdyh2b2lk ICpvcGFxdWUsCmh3YWRkciBhZGRyKQogICAgICAgICAgICAgICAgIChzLT5hciA8PCAxKSB8CiAg ICAgICAgICAgICAgICAgKHMtPnN0IDw8IDApOwoKLSAgICBjYXNlIDB4Mjg6IC8qIFRDUlIgKi8K KyAgICBjYXNlIDB4Mjg6ICAvKiBUQ1JSICovCiAgICAgICAgIHJldHVybiBvbWFwX2dwX3RpbWVy X3JlYWQocyk7CgotICAgIGNhc2UgMHgyYzogLyogVExEUiAqLworICAgIGNhc2UgMHgyYzogIC8q IFRMRFIgKi8KICAgICAgICAgcmV0dXJuIHMtPmxvYWRfdmFsOwoKLSAgICBjYXNlIDB4MzA6IC8q IFRUR1IgKi8KKyAgICBjYXNlIDB4MzA6ICAvKiBUVEdSICovCiAgICAgICAgIHJldHVybiAweGZm ZmZmZmZmOwoKLSAgICBjYXNlIDB4MzQ6IC8qIFRXUFMgKi8KLSAgICAgICAgcmV0dXJuIDB4MDAw MDAwMDA7IC8qIE5vIHBvc3RlZCB3cml0ZXMgcGVuZGluZy4gICovCisgICAgY2FzZSAweDM0OiAg LyogVFdQUyAqLworICAgICAgICByZXR1cm4gMHgwMDAwMDAwMDsgIC8qIE5vIHBvc3RlZCB3cml0 ZXMgcGVuZGluZy4gICovCgotICAgIGNhc2UgMHgzODogLyogVE1BUiAqLworICAgIGNhc2UgMHgz ODogIC8qIFRNQVIgKi8KICAgICAgICAgcmV0dXJuIHMtPm1hdGNoX3ZhbDsKCi0gICAgY2FzZSAw eDNjOiAvKiBUQ0FSMSAqLworICAgIGNhc2UgMHgzYzogIC8qIFRDQVIxICovCiAgICAgICAgIHJl dHVybiBzLT5jYXB0dXJlX3ZhbFswXTsKCi0gICAgY2FzZSAweDQwOiAvKiBUU0lDUiAqLworICAg IGNhc2UgMHg0MDogIC8qIFRTSUNSICovCiAgICAgICAgIHJldHVybiBzLT5wb3N0ZWQgPDwgMjsK Ci0gICAgY2FzZSAweDQ0OiAvKiBUQ0FSMiAqLworICAgIGNhc2UgMHg0NDogIC8qIFRDQVIyICov CiAgICAgICAgIHJldHVybiBzLT5jYXB0dXJlX3ZhbFsxXTsKICAgICB9CgpAQCAtMzQ1LDQ3ICsz NTEsNTQgQEAgc3RhdGljIHZvaWQgb21hcF9ncF90aW1lcl93cml0ZSh2b2lkICpvcGFxdWUsIGh3 YWRkcgphZGRyLCB1aW50MzJfdCB2YWx1ZSkKICAgICBzdHJ1Y3Qgb21hcF9ncF90aW1lcl9zICpz ID0zRCBvcGFxdWU7CgogICAgIHN3aXRjaCAoYWRkcikgewotICAgIGNhc2UgMHgwMDogLyogVElE UiAqLwotICAgIGNhc2UgMHgxNDogLyogVElTVEFUICovCi0gICAgY2FzZSAweDM0OiAvKiBUV1BT ICovCi0gICAgY2FzZSAweDNjOiAvKiBUQ0FSMSAqLwotICAgIGNhc2UgMHg0NDogLyogVENBUjIg Ki8KKyAgICBjYXNlIDB4MDA6ICAvKiBUSURSICovCisgICAgY2FzZSAweDE0OiAgLyogVElTVEFU ICovCisgICAgY2FzZSAweDM0OiAgLyogVFdQUyAqLworICAgIGNhc2UgMHgzYzogIC8qIFRDQVIx ICovCisgICAgY2FzZSAweDQ0OiAgLyogVENBUjIgKi8KICAgICAgICAgT01BUF9ST19SRUcoYWRk cik7CiAgICAgICAgIGJyZWFrOwoKLSAgICBjYXNlIDB4MTA6IC8qIFRJT0NQX0NGRyAqLworICAg IGNhc2UgMHgxMDogIC8qIFRJT0NQX0NGRyAqLwogICAgICAgICBzLT5jb25maWcgPTNEIHZhbHVl ICYgMHgzM2Q7Ci0gICAgICAgIGlmICgoKHZhbHVlID4+IDMpICYgMykgPTNEPTNEIDMpIC8qIElE TEVNT0RFICovCisgICAgICAgIGlmICgoKHZhbHVlID4+IDMpICYgMykgPTNEPTNEIDMpIHsgICAg ICAvKiBJRExFTU9ERSAqLwogICAgICAgICAgICAgZnByaW50ZihzdGRlcnIsICIlczogaWxsZWdh bCBJRExFTU9ERSB2YWx1ZSBpbiBUSU9DUF9DRkdcbiIsCiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgX19mdW5jX18pOwotICAgICAgICBpZiAodmFsdWUgJiAyKSAvKiBTT0ZUUkVTRVQgKi8K KyAgICAgICAgfQorICAgICAgICBpZiAodmFsdWUgJiAyKSAgICAgICAgICAgIC8qIFNPRlRSRVNF VCAqLwogICAgICAgICAgICAgb21hcF9ncF90aW1lcl9yZXNldChzKTsKICAgICAgICAgYnJlYWs7 CgotICAgIGNhc2UgMHgxODogLyogVElTUiAqLwotICAgICAgICBpZiAodmFsdWUgJiBHUFRfVENB Ul9JVCkKKyAgICBjYXNlIDB4MTg6ICAvKiBUSVNSICovCisgICAgICAgIGlmICh2YWx1ZSAmIEdQ VF9UQ0FSX0lUKSB7CiAgICAgICAgICAgICBzLT5jYXB0X251bSA9M0QgMDsKLSAgICAgICAgaWYg KHMtPnN0YXR1cyAmJiAhKHMtPnN0YXR1cyAmPTNEIH52YWx1ZSkpCi0gICAgICAgICAgICBxZW11 X2lycV9sb3dlcihzLT5pcnEpOworICAgICAgICB9CisgICAgICAgIGlmIChzLT5zdGF0dXMpIHsK KyAgICAgICAgICAgIHMtPnN0YXR1cyAmPTNEIH52YWx1ZTsKKyAgICAgICAgICAgIGlmICghcy0+ c3RhdHVzKSB7CisgICAgICAgICAgICAgICAgcWVtdV9pcnFfbG93ZXIocy0+aXJxKTsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgfQogICAgICAgICBicmVhazsKCi0gICAgY2FzZSAweDFjOiAvKiBU SUVSICovCisgICAgY2FzZSAweDFjOiAgLyogVElFUiAqLwogICAgICAgICBzLT5pdF9lbmEgPTNE IHZhbHVlICYgNzsKICAgICAgICAgYnJlYWs7CgotICAgIGNhc2UgMHgyMDogLyogVFdFUiAqLwor ICAgIGNhc2UgMHgyMDogIC8qIFRXRVIgKi8KICAgICAgICAgcy0+d3VfZW5hID0zRCB2YWx1ZSAm IDc7CiAgICAgICAgIGJyZWFrOwoKLSAgICBjYXNlIDB4MjQ6IC8qIFRDTFIgKi8KKyAgICBjYXNl IDB4MjQ6ICAvKiBUQ0xSICovCiAgICAgICAgIG9tYXBfZ3BfdGltZXJfc3luYyhzKTsKICAgICAg ICAgcy0+aW5vdXQgPTNEICh2YWx1ZSA+PiAxNCkgJiAxOwogICAgICAgICBzLT5jYXB0MiA9M0Qg KHZhbHVlID4+IDEzKSAmIDE7CiAgICAgICAgIHMtPnB0ID0zRCAodmFsdWUgPj4gMTIpICYgMTsK ICAgICAgICAgcy0+dHJpZ2dlciA9M0QgKHZhbHVlID4+IDEwKSAmIDM7CiAgICAgICAgIGlmIChz LT5jYXB0dXJlID0zRD0zRCBncHRfY2FwdHVyZV9ub25lICYmCi0gICAgICAgICAgICAgICAgICAg ICAgICAoKHZhbHVlID4+IDgpICYgMykgIT0zRCBncHRfY2FwdHVyZV9ub25lKQorICAgICAgICAg ICAgICAgICAgICAgICAgKCh2YWx1ZSA+PiA4KSAmIDMpICE9M0QgZ3B0X2NhcHR1cmVfbm9uZSkg ewogICAgICAgICAgICAgcy0+Y2FwdF9udW0gPTNEIDA7CisgICAgICAgIH0KICAgICAgICAgcy0+ Y2FwdHVyZSA9M0QgKHZhbHVlID4+IDgpICYgMzsKICAgICAgICAgcy0+c2Nwd20gPTNEICh2YWx1 ZSA+PiA3KSAmIDE7CiAgICAgICAgIHMtPmNlID0zRCAodmFsdWUgPj4gNikgJiAxOwpAQCAtMzk5 LDM5ICs0MTIsNDEgQEAgc3RhdGljIHZvaWQgb21hcF9ncF90aW1lcl93cml0ZSh2b2lkICpvcGFx dWUsIGh3YWRkcgphZGRyLCB1aW50MzJfdCB2YWx1ZSkKICAgICAgICAgaWYgKCFzLT5pbm91dCAm JiBzLT5jYXB0dXJlICE9M0QgZ3B0X2NhcHR1cmVfbm9uZSkKICAgICAgICAgICAgIGZwcmludGYo c3RkZXJyLCAiJXM6IEdQIHRpbWVyIHBpbiBtdXN0IGJlIGFuIGlucHV0ICIKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAiZm9yIHRoaXMgY2FwdHVyZSBtb2RlXG4iLCBfX2Z1bmNfXyk7Ci0g ICAgICAgIGlmIChzLT50cmlnZ2VyID0zRD0zRCBncHRfdHJpZ2dlcl9ub25lKQorICAgICAgICBp ZiAocy0+dHJpZ2dlciA9M0Q9M0QgZ3B0X3RyaWdnZXJfbm9uZSkgewogICAgICAgICAgICAgb21h cF9ncF90aW1lcl9vdXQocywgcy0+c2Nwd20pOworICAgICAgICB9CiAgICAgICAgIC8qIFRPRE86 IG1ha2Ugc3VyZSB0aGlzIGRvZXNuJ3Qgb3ZlcmZsb3cgMzItYml0cyAqLwogICAgICAgICBzLT50 aWNrc19wZXJfc2VjID0zRCBOQU5PU0VDT05EU19QRVJfU0VDT05EIDw8IChzLT5wcmUgPyBzLT5w dHYgKyAxCjogMCk7CiAgICAgICAgIG9tYXBfZ3BfdGltZXJfdXBkYXRlKHMpOwogICAgICAgICBi cmVhazsKCi0gICAgY2FzZSAweDI4OiAvKiBUQ1JSICovCisgICAgY2FzZSAweDI4OiAgLyogVENS UiAqLwogICAgICAgICBzLT50aW1lID0zRCBxZW11X2Nsb2NrX2dldF9ucyhRRU1VX0NMT0NLX1ZJ UlRVQUwpOwogICAgICAgICBzLT52YWwgPTNEIHZhbHVlOwogICAgICAgICBvbWFwX2dwX3RpbWVy X3VwZGF0ZShzKTsKICAgICAgICAgYnJlYWs7CgotICAgIGNhc2UgMHgyYzogLyogVExEUiAqLwor ICAgIGNhc2UgMHgyYzogIC8qIFRMRFIgKi8KICAgICAgICAgcy0+bG9hZF92YWwgPTNEIHZhbHVl OwogICAgICAgICBicmVhazsKCi0gICAgY2FzZSAweDMwOiAvKiBUVEdSICovCisgICAgY2FzZSAw eDMwOiAgLyogVFRHUiAqLwogICAgICAgICBzLT50aW1lID0zRCBxZW11X2Nsb2NrX2dldF9ucyhR RU1VX0NMT0NLX1ZJUlRVQUwpOwogICAgICAgICBzLT52YWwgPTNEIHMtPmxvYWRfdmFsOwogICAg ICAgICBvbWFwX2dwX3RpbWVyX3VwZGF0ZShzKTsKICAgICAgICAgYnJlYWs7CgotICAgIGNhc2Ug MHgzODogLyogVE1BUiAqLworICAgIGNhc2UgMHgzODogIC8qIFRNQVIgKi8KICAgICAgICAgb21h cF9ncF90aW1lcl9zeW5jKHMpOwogICAgICAgICBzLT5tYXRjaF92YWwgPTNEIHZhbHVlOwogICAg ICAgICBvbWFwX2dwX3RpbWVyX3VwZGF0ZShzKTsKICAgICAgICAgYnJlYWs7CgotICAgIGNhc2Ug MHg0MDogLyogVFNJQ1IgKi8KKyAgICBjYXNlIDB4NDA6ICAvKiBUU0lDUiAqLwogICAgICAgICBz LT5wb3N0ZWQgPTNEICh2YWx1ZSA+PiAyKSAmIDE7Ci0gICAgICAgIGlmICh2YWx1ZSAmIDIpIC8q IEhvdyBtdWNoIGV4YWN0bHkgYXJlIHdlIHN1cHBvc2VkIHRvIHJlc2V0PyAqLworICAgICAgICBp ZiAodmFsdWUgJiAyKSB7IC8qIEhvdyBtdWNoIGV4YWN0bHkgYXJlIHdlIHN1cHBvc2VkIHRvIHJl c2V0PyAqLwogICAgICAgICAgICAgb21hcF9ncF90aW1lcl9yZXNldChzKTsKKyAgICAgICAgfQog ICAgICAgICBicmVhazsKCiAgICAgZGVmYXVsdDoKQEAgLTQ0MywxMCArNDU4LDExIEBAIHN0YXRp YyB2b2lkIG9tYXBfZ3BfdGltZXJfd3JpdGVoKHZvaWQgKm9wYXF1ZSwgaHd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XF1ZSwKdWludDY0X3Qgbm93X3FlbXUsIGludCBu KQogICAgIGludCBjb3VudGVyOwoKICAgICBhc3NlcnQobiA8IEFSUkFZX1NJWkUoY291bnRlcnMp KTsKLSAgICBpZiAocy0+dG00W25dLmNvbnRyb2wgJiAoMSA8PCA3KSkKKyAgICBpZiAocy0+dG00 W25dLmNvbnRyb2wgJiAoMSA8PCA3KSkgewogICAgICAgICBjb3VudGVyID0zRCBuOwotICAgIGVs c2UKKyAgICB9IGVsc2UgewogICAgICAgICBjb3VudGVyID0zRCBjb3VudGVyc1tuXTsKKyAgICB9 CgogICAgIGlmICghcy0+dG00W2NvdW50ZXJdLmZyZXEpIHsKICAgICAgICAgdGltZXJfZGVsKHMt PnRtNFtuXS50bS5xdGltZXIpOwpAQCAtMTY3LDUyICsxNjgsNzEgQEAgc3RhdGljIHVpbnQ2NF90 IHB4YTJ4eF90aW1lcl9yZWFkKHZvaWQgKm9wYXF1ZSwKaHdhZGRyIG9mZnNldCwKICAgICBpbnQg dG0gPTNEIDA7CgogICAgIHN3aXRjaCAob2Zmc2V0KSB7Ci0gICAgY2FzZSBPU01SMzogIHRtICsr OworICAgIGNhc2UgT1NNUjM6CisgICAgICAgIHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3Vn aCAqLwotICAgIGNhc2UgT1NNUjI6ICB0bSArKzsKKyAgICBjYXNlIE9TTVIyOgorICAgICAgICB0 bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KLSAgICBjYXNlIE9TTVIxOiAgdG0gKys7 CisgICAgY2FzZSBPU01SMToKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdo ICovCiAgICAgY2FzZSBPU01SMDoKICAgICAgICAgcmV0dXJuIHMtPnRpbWVyW3RtXS52YWx1ZTsK LSAgICBjYXNlIE9TTVIxMTogdG0gKys7CisgICAgY2FzZSBPU01SMTE6CisgICAgICAgIHRtKys7 CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwotICAgIGNhc2UgT1NNUjEwOiB0bSArKzsKKyAg ICBjYXNlIE9TTVIxMDoKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICov Ci0gICAgY2FzZSBPU01SOTogIHRtICsrOworICAgIGNhc2UgT1NNUjk6CisgICAgICAgIHRtKys7 CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwotICAgIGNhc2UgT1NNUjg6ICB0bSArKzsKKyAg ICBjYXNlIE9TTVI4OgorICAgICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8K LSAgICBjYXNlIE9TTVI3OiAgdG0gKys7CisgICAgY2FzZSBPU01SNzoKKyAgICAgICAgdG0rKzsK ICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2FzZSBPU01SNjogIHRtICsrOworICAg IGNhc2UgT1NNUjY6CisgICAgICAgIHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwot ICAgIGNhc2UgT1NNUjU6ICB0bSArKzsKKyAgICBjYXNlIE9TTVI1OgorICAgICAgICB0bSsrOwog ICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KICAgICBjYXNlIE9TTVI0OgotICAgICAgICBpZiAo IXB4YTJ4eF90aW1lcl9oYXNfdG00KHMpKQorICAgICAgICBpZiAoIXB4YTJ4eF90aW1lcl9oYXNf dG00KHMpKSB7CiAgICAgICAgICAgICBnb3RvIGJhZHJlZzsKKyAgICAgICAgfQogICAgICAgICBy ZXR1cm4gcy0+dG00W3RtXS50bS52YWx1ZTsKICAgICBjYXNlIE9TQ1I6CiAgICAgICAgIHJldHVy biBzLT5jbG9jayArIG11bGRpdjY0KHFlbXVfY2xvY2tfZ2V0X25zKFFFTVVfQ0xPQ0tfVklSVFVB TCkgLQogICAgICAgICAgICAgICAgICAgICAgICAgcy0+bGFzdGxvYWQsIHMtPmZyZXEsIE5BTk9T RUNPTkRTX1BFUl9TRUNPTkQpOwotICAgIGNhc2UgT1NDUjExOiB0bSArKzsKKyAgICBjYXNlIE9T Q1IxMToKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2Fz ZSBPU0NSMTA6IHRtICsrOworICAgIGNhc2UgT1NDUjEwOgorICAgICAgICB0bSsrOwogICAgICAg ICAvKiBmYWxsIHRocm91Z2ggKi8KLSAgICBjYXNlIE9TQ1I5OiAgdG0gKys7CisgICAgY2FzZSBP U0NSOToKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2Fz ZSBPU0NSODogIHRtICsrOworICAgIGNhc2UgT1NDUjg6CisgICAgICAgIHRtKys7CiAgICAgICAg IC8qIGZhbGwgdGhyb3VnaCAqLwotICAgIGNhc2UgT1NDUjc6ICB0bSArKzsKKyAgICBjYXNlIE9T Q1I3OgorICAgICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KLSAgICBjYXNl IE9TQ1I2OiAgdG0gKys7CisgICAgY2FzZSBPU0NSNjoKKyAgICAgICAgdG0rKzsKICAgICAgICAg LyogZmFsbCB0aHJvdWdoICovCi0gICAgY2FzZSBPU0NSNTogIHRtICsrOworICAgIGNhc2UgT1ND UjU6CisgICAgICAgIHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwogICAgIGNhc2Ug T1NDUjQ6Ci0gICAgICAgIGlmICghcHhhMnh4X3RpbWVyX2hhc190bTQocykpCisgICAgICAgIGlm ICghcHhhMnh4X3RpbWVyX2hhc190bTQocykpIHsKICAgICAgICAgICAgIGdvdG8gYmFkcmVnOwor ICAgICAgICB9CgogICAgICAgICBpZiAoKHRtID0zRD0zRCA5IC0gNCB8fCB0bSA9M0Q9M0QgMTEg LSA0KSAmJiAocy0+dG00W3RtXS5jb250cm9sICY9CiAoMSA8PAo5KSkpIHsKICAgICAgICAgICAg IGlmIChzLT50bTRbdG0gLSAxXS5mcmVxKQpAQCAtMjI0LDM1ICsyNDQsNDQgQEAgc3RhdGljIHVp bnQ2NF90IHB4YTJ4eF90aW1lcl9yZWFkKHZvaWQgKm9wYXF1ZSwKaHdhZGRyIG9mZnNldCwKICAg ICAgICAgICAgICAgICBzLT5zbmFwc2hvdCA9M0Qgcy0+dG00W3RtIC0gMV0uY2xvY2s7CiAgICAg ICAgIH0KCi0gICAgICAgIGlmICghcy0+dG00W3RtXS5mcmVxKQorICAgICAgICBpZiAoIXMtPnRt NFt0bV0uZnJlcSkgewogICAgICAgICAgICAgcmV0dXJuIHMtPnRtNFt0bV0uY2xvY2s7CisgICAg ICAgIH0KICAgICAgICAgcmV0dXJuIHMtPnRtNFt0bV0uY2xvY2sgKwogICAgICAgICAgICAgbXVs ZGl2NjQocWVtdV9jbG9ja19nZXRfbnMoUUVNVV9DTE9DS19WSVJUVUFMKSAtCiAgICAgICAgICAg ICAgICAgICAgICBzLT50bTRbdG1dLmxhc3Rsb2FkLCBzLT50bTRbdG1dLmZyZXEsCiAgICAgICAg ICAgICAgICAgICAgICBOQU5PU0VDT05EU19QRVJfU0VDT05EKTsKICAgICBjYXNlIE9JRVI6CiAg ICAgICAgIHJldHVybiBzLT5pcnFfZW5hYmxlZDsKLSAgICBjYXNlIE9TU1I6IC8qIFN0YXR1cyBy ZWdpc3RlciAqLworICAgIGNhc2UgT1NTUjogIC8qIFN0YXR1cyByZWdpc3RlciAqLwogICAgICAg ICByZXR1cm4gcy0+ZXZlbnRzOwogICAgIGNhc2UgT1dFUjoKICAgICAgICAgcmV0dXJuIHMtPnJl c2V0MzsKLSAgICBjYXNlIE9NQ1IxMTogdG0gKys7CisgICAgY2FzZSBPTUNSMTE6CisgICAgICAg IHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwotICAgIGNhc2UgT01DUjEwOiB0bSAr KzsKKyAgICBjYXNlIE9NQ1IxMDoKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJv dWdoICovCi0gICAgY2FzZSBPTUNSOTogIHRtICsrOworICAgIGNhc2UgT01DUjk6CisgICAgICAg IHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwotICAgIGNhc2UgT01DUjg6ICB0bSAr KzsKKyAgICBjYXNlIE9NQ1I4OgorICAgICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91 Z2ggKi8KLSAgICBjYXNlIE9NQ1I3OiAgdG0gKys7CisgICAgY2FzZSBPTUNSNzoKKyAgICAgICAg dG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2FzZSBPTUNSNjogIHRtICsr OworICAgIGNhc2UgT01DUjY6CisgICAgICAgIHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3Vn aCAqLwotICAgIGNhc2UgT01DUjU6ICB0bSArKzsKKyAgICBjYXNlIE9NQ1I1OgorICAgICAgICB0 bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KICAgICBjYXNlIE9NQ1I0OgotICAgICAg ICBpZiAoIXB4YTJ4eF90aW1lcl9oYXNfdG00KHMpKQorICAgICAgICBpZiAoIXB4YTJ4eF90aW1l cl9oYXNfdG00KHMpKSB7CiAgICAgICAgICAgICBnb3RvIGJhZHJlZzsKKyAgICAgICAgfQogICAg ICAgICByZXR1cm4gcy0+dG00W3RtXS5jb250cm9sOwogICAgIGNhc2UgT1NOUjoKICAgICAgICAg cmV0dXJuIHMtPnNuYXBzaG90OwpAQCAtMjc3LDMzICszMDYsNDQgQEAgc3RhdGljIHZvaWQgcHhh Mnh4X3RpbWVyX3dyaXRlKHZvaWQgKm9wYXF1ZSwgaHdhZGRyCm9mZnNldCwKICAgICBQWEEyeHhU aW1lckluZm8gKnMgPTNEIChQWEEyeHhUaW1lckluZm8gKikgb3BhcXVlOwoKICAgICBzd2l0Y2gg KG9mZnNldCkgewotICAgIGNhc2UgT1NNUjM6ICB0bSArKzsKKyAgICBjYXNlIE9TTVIzOgorICAg ICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KLSAgICBjYXNlIE9TTVIyOiAg dG0gKys7CisgICAgY2FzZSBPU01SMjoKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0 aHJvdWdoICovCi0gICAgY2FzZSBPU01SMTogIHRtICsrOworICAgIGNhc2UgT1NNUjE6CisgICAg ICAgIHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwogICAgIGNhc2UgT1NNUjA6CiAg ICAgICAgIHMtPnRpbWVyW3RtXS52YWx1ZSA9M0QgdmFsdWU7CiAgICAgICAgIHB4YTJ4eF90aW1l cl91cGRhdGUocywgcWVtdV9jbG9ja19nZXRfbnMoUUVNVV9DTE9DS19WSVJUVUFMKSk7CiAgICAg ICAgIGJyZWFrOwotICAgIGNhc2UgT1NNUjExOiB0bSArKzsKKyAgICBjYXNlIE9TTVIxMToKKyAg ICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2FzZSBPU01SMTA6 IHRtICsrOworICAgIGNhc2UgT1NNUjEwOgorICAgICAgICB0bSsrOwogICAgICAgICAvKiBmYWxs IHRocm91Z2ggKi8KLSAgICBjYXNlIE9TTVI5OiAgdG0gKys7CisgICAgY2FzZSBPU01SOToKKyAg ICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2FzZSBPU01SODog IHRtICsrOworICAgIGNhc2UgT1NNUjg6CisgICAgICAgIHRtKys7CiAgICAgICAgIC8qIGZhbGwg dGhyb3VnaCAqLwotICAgIGNhc2UgT1NNUjc6ICB0bSArKzsKKyAgICBjYXNlIE9TTVI3OgorICAg ICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KLSAgICBjYXNlIE9TTVI2OiAg dG0gKys7CisgICAgY2FzZSBPU01SNjoKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0 aHJvdWdoICovCi0gICAgY2FzZSBPU01SNTogIHRtICsrOworICAgIGNhc2UgT1NNUjU6CisgICAg ICAgIHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwogICAgIGNhc2UgT1NNUjQ6Ci0g ICAgICAgIGlmICghcHhhMnh4X3RpbWVyX2hhc190bTQocykpCisgICAgICAgIGlmICghcHhhMnh4 X3RpbWVyX2hhc190bTQocykpIHsKICAgICAgICAgICAgIGdvdG8gYmFkcmVnOworICAgICAgICB9 CiAgICAgICAgIHMtPnRtNFt0bV0udG0udmFsdWUgPTNEIHZhbHVlOwogICAgICAgICBweGEyeHhf dGltZXJfdXBkYXRlNChzLCBxZW11X2Nsb2NrX2dldF9ucyhRRU1VX0NMT0NLX1ZJUlRVQUwpLCB0 bSk7CiAgICAgICAgIGJyZWFrOwpAQCAtMzEzLDIzICszNTMsMzEgQEAgc3RhdGljIHZvaWQgcHhh Mnh4X3RpbWVyX3dyaXRlKHZvaWQgKm9wYXF1ZSwgaHdhZGRyCm9mZnNldCwKICAgICAgICAgcy0+ Y2xvY2sgPTNEIHZhbHVlOwogICAgICAgICBweGEyeHhfdGltZXJfdXBkYXRlKHMsIHMtPmxhc3Rs b2FkKTsKICAgICAgICAgYnJlYWs7Ci0gICAgY2FzZSBPU0NSMTE6IHRtICsrOworICAgIGNhc2Ug T1NDUjExOgorICAgICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KLSAgICBj YXNlIE9TQ1IxMDogdG0gKys7CisgICAgY2FzZSBPU0NSMTA6CisgICAgICAgIHRtKys7CiAgICAg ICAgIC8qIGZhbGwgdGhyb3VnaCAqLwotICAgIGNhc2UgT1NDUjk6ICB0bSArKzsKKyAgICBjYXNl IE9TQ1I5OgorICAgICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KLSAgICBj YXNlIE9TQ1I4OiAgdG0gKys7CisgICAgY2FzZSBPU0NSODoKKyAgICAgICAgdG0rKzsKICAgICAg ICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2FzZSBPU0NSNzogIHRtICsrOworICAgIGNhc2Ug T1NDUjc6CisgICAgICAgIHRtKys7CiAgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwotICAgIGNh c2UgT1NDUjY6ICB0bSArKzsKKyAgICBjYXNlIE9TQ1I2OgorICAgICAgICB0bSsrOwogICAgICAg ICAvKiBmYWxsIHRocm91Z2ggKi8KLSAgICBjYXNlIE9TQ1I1OiAgdG0gKys7CisgICAgY2FzZSBP U0NSNToKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCiAgICAgY2Fz ZSBPU0NSNDoKLSAgICAgICAgaWYgKCFweGEyeHhfdGltZXJfaGFzX3RtNChzKSkKKyAgICAgICAg aWYgKCFweGEyeHhfdGltZXJfaGFzX3RtNChzKSkgewogICAgICAgICAgICAgZ290byBiYWRyZWc7 CisgICAgICAgIH0KICAgICAgICAgcy0+dG00W3RtXS5vbGRjbG9jayA9M0Qgcy0+dG00W3RtXS5j bG9jazsKICAgICAgICAgcy0+dG00W3RtXS5sYXN0bG9hZCA9M0QgcWVtdV9jbG9ja19nZXRfbnMo UUVNVV9DTE9DS19WSVJUVUFMKTsKICAgICAgICAgcy0+dG00W3RtXS5jbG9jayA9M0QgdmFsdWU7 CkBAIC0zMzgsMjcgKzM4NiwzMyBAQCBzdGF0aWMgdm9pZCBweGEyeHhfdGltZXJfd3JpdGUodm9p ZCAqb3BhcXVlLCBod2FkZHIKb2Zmc2V0LAogICAgIGNhc2UgT0lFUjoKICAgICAgICAgcy0+aXJx X2VuYWJsZWQgPTNEIHZhbHVlICYgMHhmZmY7CiAgICAgICAgIGJyZWFrOwotICAgIGNhc2UgT1NT UjogLyogU3RhdHVzIHJlZ2lzdGVyICovCisgICAgY2FzZSBPU1NSOiAgLyogU3RhdHVzIHJlZ2lz dGVyICovCiAgICAgICAgIHZhbHVlICY9M0Qgcy0+ZXZlbnRzOwogICAgICAgICBzLT5ldmVudHMg Jj0zRCB+dmFsdWU7Ci0gICAgICAgIGZvciAoaSA9M0QgMDsgaSA8IDQ7IGkgKyssIHZhbHVlID4+ PTNEIDEpCi0gICAgICAgICAgICBpZiAodmFsdWUgJiAxKQorICAgICAgICBmb3IgKGkgPTNEIDA7 IGkgPCA0OyBpKyssIHZhbHVlID4+PTNEIDEpCisgICAgICAgICAgICBpZiAodmFsdWUgJiAxKSB7 CiAgICAgICAgICAgICAgICAgcWVtdV9pcnFfbG93ZXIocy0+dGltZXJbaV0uaXJxKTsKLSAgICAg ICAgaWYgKHB4YTJ4eF90aW1lcl9oYXNfdG00KHMpICYmICEocy0+ZXZlbnRzICYgMHhmZjApICYm IHZhbHVlKQorICAgICAgICAgICAgfQorICAgICAgICBpZiAocHhhMnh4X3RpbWVyX2hhc190bTQo cykgJiYgIShzLT5ldmVudHMgJiAweGZmMCkgJiYgdmFsdWUpIHsKICAgICAgICAgICAgIHFlbXVf aXJxX2xvd2VyKHMtPmlycTQpOworICAgICAgICB9CiAgICAgICAgIGJyZWFrOwotICAgIGNhc2Ug T1dFUjogLyogWFhYOiBSZXNldCBvbiBPU01SMyBtYXRjaD8gKi8KKyAgICBjYXNlIE9XRVI6ICAv KiBYWFg6IFJlc2V0IG9uIE9TTVIzIG1hdGNoPyAqLwogICAgICAgICBzLT5yZXNldDMgPTNEIHZh bHVlOwogICAgICAgICBicmVhazsKLSAgICBjYXNlIE9NQ1I3OiAgdG0gKys7CisgICAgY2FzZSBP TUNSNzoKKyAgICAgICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2Fz ZSBPTUNSNjogIHRtICsrOworICAgIGNhc2UgT01DUjY6CisgICAgICAgIHRtKys7CiAgICAgICAg IC8qIGZhbGwgdGhyb3VnaCAqLwotICAgIGNhc2UgT01DUjU6ICB0bSArKzsKKyAgICBjYXNlIE9N Q1I1OgorICAgICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRocm91Z2ggKi8KICAgICBjYXNl IE9NQ1I0OgotICAgICAgICBpZiAoIXB4YTJ4eF90aW1lcl9oYXNfdG00KHMpKQorICAgICAgICBp ZiAoIXB4YTJ4eF90aW1lcl9oYXNfdG00KHMpKSB7CiAgICAgICAgICAgICBnb3RvIGJhZHJlZzsK KyAgICAgICAgfQogICAgICAgICBzLT50bTRbdG1dLmNvbnRyb2wgPTNEIHZhbHVlICYgMHgwZmY7 CiAgICAgICAgIC8qIFhYWCBTdG9wIGlmIHJ1bm5pbmcgKHNob3VsZG4ndCBoYXBwZW4pICovCiAg ICAgICAgIGlmICgodmFsdWUgJiAoMSA8PCA3KSkgfHwgdG0gPTNEPTNEIDApCkBAIC0zNjgsMTUg KzQyMiwyMCBAQCBzdGF0aWMgdm9pZCBweGEyeHhfdGltZXJfd3JpdGUodm9pZCAqb3BhcXVlLCBo d2FkZHIKb2Zmc2V0LAogICAgICAgICAgICAgcHhhMnh4X3RpbWVyX3VwZGF0ZTQocywgcWVtdV9j bG9ja19nZXRfbnMoUUVNVV9DTE9DS19WSVJUVUFMKSwKdG0pOwogICAgICAgICB9CiAgICAgICAg IGJyZWFrOwotICAgIGNhc2UgT01DUjExOiB0bSArKzsKKyAgICBjYXNlIE9NQ1IxMToKKyAgICAg ICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2FzZSBPTUNSMTA6IHRt ICsrOworICAgIGNhc2UgT01DUjEwOgorICAgICAgICB0bSsrOwogICAgICAgICAvKiBmYWxsIHRo cm91Z2ggKi8KLSAgICBjYXNlIE9NQ1I5OiAgdG0gKys7CisgICAgY2FzZSBPTUNSOToKKyAgICAg ICAgdG0rKzsKICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCi0gICAgY2FzZSBPTUNSODogIHRt ICs9M0QgNDsKLSAgICAgICAgaWYgKCFweGEyeHhfdGltZXJfaGFzX3RtNChzKSkKKyAgICBjYXNl IE9NQ1I4OgorICAgICAgICB0bSArPTNEIDQ7CisgICAgICAgIGlmICghcHhhMnh4X3RpbWVyX2hh c190bTQocykpIHsKICAgICAgICAgICAgIGdvdG8gYmFkcmVnOworICAgICAgICB9CiAgICAgICAg IHMtPnRtNFt0bV0uY29udHJvbCA9M0QgdmFsdWUgJiAweDNmZjsKICAgICAgICAgLyogWFhYIFN0 b3AgaWYgcnVubmluZyAoc2hvdWxkbid0IGhhcHBlbikgKi8KICAgICAgICAgaWYgKCh2YWx1ZSAm ICgxIDw8IDcpKSB8fCAhKHRtICYgMSkpCkBAIC00MjgsMTIgKzQ4NywxNSBAQCBzdGF0aWMgdm9p ZCBweGEyeHhfdGltZXJfdGljazQodm9pZCAqb3BhcXVlKQogICAgIFBYQTJ4eFRpbWVySW5mbyAq aSA9M0QgKFBYQTJ4eFRpbWVySW5mbyAqKSB0LT50bS5pbmZvOwoKICAgICBweGEyeHhfdGltZXJf dGljaygmdC0+dG0pOwotICAgIGlmICh0LT5jb250cm9sICYgKDEgPDwgMykpCisgICAgaWYgKHQt PmNvbnRyb2wgJiAoMSA8PCAzKSkgewogICAgICAgICB0LT5jbG9jayA9M0QgMDsKLSAgICBpZiAo dC0+Y29udHJvbCAmICgxIDw8IDYpKQorICAgIH0KKyAgICBpZiAodC0+Y29udHJvbCAmICgxIDw8 IDYpKSB7CiAgICAgICAgIHB4YTJ4eF90aW1lcl91cGRhdGU0KGksIHFlbXVfY2xvY2tfZ2V0X25z KFFFTVVfQ0xPQ0tfVklSVFVBTCksCnQtPnRtLm51bSAtIDQpOwotICAgIGlmIChpLT5ldmVudHMg JiAweGZmMCkKKyAgICB9CisgICAgaWYgKGktPmV2ZW50cyAmIDB4ZmYwKSB7CiAgICAgICAgIHFl bXVfaXJxX3JhaXNlKGktPmlycTQpOworICAgIH0KIH0KCiBzdGF0aWMgaW50IHB4YTI1eF90aW1l cl9wb3N0X2xvYWQodm9pZCAqb3BhcXVlLCBpbnQgdmVyc2lvbl9pZCkKQEAgLTQ0Niw4ICs1MDgs OSBAQCBzdGF0aWMgaW50IHB4YTI1eF90aW1lcl9wb3N0X2xvYWQodm9pZCAqb3BhcXVlLCBpbnQK dmVyc2lvbl9pZCkKICAgICBweGEyeHhfdGltZXJfdXBkYXRlKHMsIG5vdyk7CgogICAgIGlmIChw eGEyeHhfdGltZXJfaGFzX3RtNChzKSkKLSAgICAgICAgZm9yIChpID0zRCAwOyBpIDwgODsgaSAr KykKKyAgICAgICAgZm9yIChpID0zRCAwOyBpIDwgODsgaSsrKSB7CiAgICAgICAgICAgICBweGEy eHhfdGltZXJfdXBkYXRlNChzLCBub3csIGkpOworICAgICAgICB9CgogICAgIHJldHVybiAwOwog fQpAQCAtNDc0LDcgKzUzNyw3IEBAIHN0YXRpYyB2b2lkIHB4YTJ4eF90aW1lcl9yZWFsaXplKERl dmljZVN0YXRlICpkZXYsCkVycm9yICoqZXJycCkKICAgICBTeXNCdXNEZXZpY2UgKnNiZCA9M0Qg U1lTX0JVU19ERVZJQ0UoZGV2KTsKICAgICBpbnQgaTsKCi0gICAgZm9yIChpID0zRCAwOyBpIDwg NDsgaSArKykgeworICAgIGZvciAoaSA9M0QgMDsgaSA8IDQ7IGkrKykgewogICAgICAgICBzLT50 aW1lcltpXS52YWx1ZSA9M0QgMDsKICAgICAgICAgc3lzYnVzX2luaXRfaXJxKHNiZCwgJnMtPnRp bWVyW2ldLmlycSk7CiAgICAgICAgIHMtPnRpbWVyW2ldLmluZm8gPTNEIHM7CkBAIC00ODYsNyAr NTQ5LDcgQEAgc3RhdGljIHZvaWQgcHhhMnh4X3RpbWVyX3JlYWxpemUoRGV2aWNlU3RhdGUgKmRl diwKRXJyb3IgKiplcnJwKQogICAgIGlmIChzLT5mbGFncyAmICgxIDw8IFBYQTJYWF9USU1FUl9I QVZFX1RNNCkpIHsKICAgICAgICAgc3lzYnVzX2luaXRfaXJxKHNiZCwgJnMtPmlycTQpOwoKLSAg ICAgICAgZm9yIChpID0zRCAwOyBpIDwgOD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NQUwKICNkZWZpbmUgVENHX1RBUkdFVF9DQUxMX0FSR19JNjQgICAgICAg ICBUQ0dfQ0FMTF9BUkdfRVZFTgogI2RlZmluZSBUQ0dfVEFSR0VUX0NBTExfQVJHX0kxMjggICAg ICAgIFRDR19DQUxMX0FSR19FVkVOCi0tPTIwCjIuNDMuMA== --000000000000c6e3b70617c3118c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I have added a patch inlin= e that fixes indentation and formatting for some files as listed in ht= tps://gitlab.com/qemu-project/qemu/-/issues/373.

Thanks,
Tanmay

From 46026574821c46804111eea6607a1b39314b7abe Mon Sep= 17 00:00:00 2001
From: Tanmay Patil <tanmaynpatil105@gmail.com>
Date: Sat, 25 Nov 2023 0= 0:53:54 +0530
Subject: [PATCH] Fixes: Indentation using TABs and improve= formatting
=C2=A0Resolves: https://gitlab.com/qemu-project/qemu/-/issues/373
=
=C2=A0 =C2=A0Files changed:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/arm/boo= t.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/char/omap_uart.c
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 - hw/dma/pxa2xx_dma.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/gpi= o/omap_gpio.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/gpio/zaurus.c
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 - hw/input/tsc2005.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - = hw/input/tsc210x.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/intc/omap_intc.c
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/misc/cbus.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0= - hw/misc/omap_clk.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/misc/omap_l4.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/misc/omap_sdrc.c
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 - hw/misc/omap_tap.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/sd/omap_mmc= .c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/sd/pxa2xx_mmci.c
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 - hw/timer/omap_gptimer.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw= /timer/omap_synctimer.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - hw/timer/pxa2xx_ti= mer.c
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - include/hw/arm/pxa.h
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 - include/hw/arm/sharpsl.h
=C2=A0 =C2=A0 =C2=A0 =C2=A0= - include/hw/arm/soc_dma.h
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - tcg/arm/tcg-ta= rget.h

Signed-off-by: Tanmay Patil <tanmaynpatil105@gmail.com>
---
=C2=A0hw/arm/bo= ot.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 8 +-
=C2=A0hw/ch= ar/omap_uart.c =C2=A0 =C2=A0 =C2=A0 | =C2=A049 +-
=C2=A0hw/dma/pxa2xx_dm= a.c =C2=A0 =C2=A0 =C2=A0 | 198 ++++----
=C2=A0hw/gpio/omap_gpio.c =C2=A0= =C2=A0 =C2=A0 | 243 +++++-----
=C2=A0hw/gpio/zaurus.c =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| =C2=A061 +--
=C2=A0hw/input/tsc2005.c =C2=A0 =C2=A0 = =C2=A0 =C2=A0| 130 ++---
=C2=A0hw/input/tsc210x.c =C2=A0 =C2=A0 =C2=A0 = =C2=A0| 442 +++++++++--------
=C2=A0hw/intc/omap_intc.c =C2=A0 =C2=A0 = =C2=A0 | 261 +++++-----
=C2=A0hw/misc/cbus.c =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0| 202 ++++----
=C2=A0hw/misc/omap_clk.c =C2=A0 =C2=A0 =C2= =A0 =C2=A0| 999 +++++++++++++++++++-------------------
=C2=A0hw/misc/oma= p_l4.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A021 +-
=C2=A0hw/misc/omap_sdrc= .c =C2=A0 =C2=A0 =C2=A0 | 135 +++---
=C2=A0hw/misc/omap_tap.c =C2=A0 =C2= =A0 =C2=A0 =C2=A0| =C2=A028 +-
=C2=A0hw/sd/omap_mmc.c =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| 208 ++++----
=C2=A0hw/sd/pxa2xx_mmci.c =C2=A0 =C2=A0 = =C2=A0 | 149 +++---
=C2=A0hw/timer/omap_gptimer.c =C2=A0 | 126 ++---
= =C2=A0hw/timer/omap_synctimer.c | =C2=A0 7 +-
=C2=A0hw/timer/pxa2xx_time= r.c =C2=A0 | 279 ++++++-----
=C2=A0include/hw/arm/pxa.h =C2=A0 =C2=A0 = =C2=A0| 100 ++--
=C2=A0include/hw/arm/sharpsl.h =C2=A0| =C2=A0 2 +-
= =C2=A0include/hw/arm/soc_dma.h =C2=A0| =C2=A0 4 +-
=C2=A0tcg/arm/tcg-tar= get.h =C2=A0 =C2=A0 =C2=A0| =C2=A0 4 +-
=C2=A022 files changed, 1903 ins= ertions(+), 1753 deletions(-)

diff --git a/hw/arm/boot.c b/hw/arm/bo= ot.c
index 84ea6a807a..d480a7da02 100644
--- a/hw/arm/boot.c
+++ b= /hw/arm/boot.c
@@ -347,13 +347,13 @@ static void set_kernel_args_old(con= st struct arm_boot_info *info,
=C2=A0 =C2=A0 =C2=A0WRITE_WORD(p, info-&g= t;ram_size / 4096);
=C2=A0 =C2=A0 =C2=A0/* ramdisk_size */
=C2=A0 =C2= =A0 =C2=A0WRITE_WORD(p, 0);
-#define FLAG_READONLY 1
-#define FLAG_RD= LOAD 4
-#define FLAG_RDPROMPT 8
+#define FLAG_READONLY 1
+#define = FLAG_RDLOAD =C2=A0 4
+#define FLAG_RDPROMPT 8
=C2=A0 =C2=A0 =C2=A0/* = flags */
=C2=A0 =C2=A0 =C2=A0WRITE_WORD(p, FLAG_READONLY | FLAG_RDLOAD |= FLAG_RDPROMPT);
=C2=A0 =C2=A0 =C2=A0/* rootdev */
- =C2=A0 =C2=A0WRI= TE_WORD(p, (31 << 8) | 0); /* /dev/mtdblock0 */
+ =C2=A0 =C2=A0WRI= TE_WORD(p, (31 << 8) | 0); /* /dev/mtdblock0 */
=C2=A0 =C2=A0 =C2= =A0/* video_num_cols */
=C2=A0 =C2=A0 =C2=A0WRITE_WORD(p, 0);
=C2=A0 = =C2=A0 =C2=A0/* video_num_rows */
diff --git a/hw/char/omap_uart.c b/hw/= char/omap_uart.c
index 6848bddb4e..c2ef4c137e 100644
--- a/hw/char/om= ap_uart.c
+++ b/hw/char/omap_uart.c
@@ -61,7 +61,7 @@ struct omap_uar= t_s *omap_uart_init(hwaddr base,
=C2=A0 =C2=A0 =C2=A0s->fclk =3D fclk= ;
=C2=A0 =C2=A0 =C2=A0s->irq =3D irq;
=C2=A0 =C2=A0 =C2=A0s->se= rial =3D serial_mm_init(get_system_memory(), base, 2, irq,
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 omap_clk_getrate(fclk)/16,
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 omap_clk_getrate(fclk) / 16,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 chr ?: qemu_chr_new(label, "null", NULL),
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 DEVICE_NATIVE_ENDIAN);
=C2=A0 =C2=A0 =C2=A0retu= rn s;
@@ -76,27 +76,27 @@ static uint64_t omap_uart_read(void *opaque, h= waddr addr, unsigned size)
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2= =A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0case 0x20: /* MDR1 */
+ =C2= =A0 =C2=A0case 0x20: =C2=A0/* MDR1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= return s->mdr[0];
- =C2=A0 =C2=A0case 0x24: /* MDR2 */
+ =C2=A0 = =C2=A0case 0x24: =C2=A0/* MDR2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retu= rn s->mdr[1];
- =C2=A0 =C2=A0case 0x40: /* SCR */
+ =C2=A0 =C2=A0c= ase 0x40: =C2=A0/* SCR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->= ;scr;
- =C2=A0 =C2=A0case 0x44: /* SSR */
+ =C2=A0 =C2=A0case 0x44: = =C2=A0/* SSR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x0;
- =C2= =A0 =C2=A0case 0x48: /* EBLR (OMAP2) */
+ =C2=A0 =C2=A0case 0x48: =C2=A0= /* EBLR (OMAP2) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->eblr;<= br>- =C2=A0 =C2=A0case 0x4C: /* OSC_12M_SEL (OMAP1) */
+ =C2=A0 =C2=A0ca= se 0x4C: =C2=A0/* OSC_12M_SEL (OMAP1) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return s->clksel;
- =C2=A0 =C2=A0case 0x50: /* MVR */
+ =C2=A0 = =C2=A0case 0x50: =C2=A0/* MVR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retur= n 0x30;
- =C2=A0 =C2=A0case 0x54: /* SYSC (OMAP2) */
+ =C2=A0 =C2=A0c= ase 0x54: =C2=A0/* SYSC (OMAP2) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret= urn s->syscontrol;
- =C2=A0 =C2=A0case 0x58: /* SYSS (OMAP2) */
+ = =C2=A0 =C2=A0case 0x58: =C2=A0/* SYSS (OMAP2) */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return 1;
- =C2=A0 =C2=A0case 0x5c: /* WER (OMAP2) */
+ = =C2=A0 =C2=A0case 0x5c: =C2=A0/* WER (OMAP2) */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return s->wkup;
- =C2=A0 =C2=A0case 0x60: /* CFPS (OMAP2) *= /
+ =C2=A0 =C2=A0case 0x60: =C2=A0/* CFPS (OMAP2) */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0return s->cfps;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0@@ -115,35 +115,36 @@ static void omap_uart_write(void *opaque, hwaddr ad= dr,
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (addr)= {
- =C2=A0 =C2=A0case 0x20: /* MDR1 */
+ =C2=A0 =C2=A0case 0x20: =C2= =A0/* MDR1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mdr[0] =3D value &= amp; 0x7f;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0ca= se 0x24: /* MDR2 */
+ =C2=A0 =C2=A0case 0x24: =C2=A0/* MDR2 */
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mdr[1] =3D value & 0xff;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case 0x40: /* SCR */+ =C2=A0 =C2=A0case 0x40: =C2=A0/* SCR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->scr =3D value & 0xff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= break;
- =C2=A0 =C2=A0case 0x48: /* EBLR (OMAP2) */
+ =C2=A0 =C2=A0ca= se 0x48: =C2=A0/* EBLR (OMAP2) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&g= t;eblr =3D value & 0xff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;- =C2=A0 =C2=A0case 0x4C: /* OSC_12M_SEL (OMAP1) */
+ =C2=A0 =C2=A0case= 0x4C: =C2=A0/* OSC_12M_SEL (OMAP1) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->clksel =3D value & 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bre= ak;
- =C2=A0 =C2=A0case 0x44: /* SSR */
- =C2=A0 =C2=A0case 0x50: /* = MVR */
- =C2=A0 =C2=A0case 0x58: /* SYSS (OMAP2) */
+ =C2=A0 =C2=A0ca= se 0x44: =C2=A0/* SSR */
+ =C2=A0 =C2=A0case 0x50: =C2=A0/* MVR */
+ = =C2=A0 =C2=A0case 0x58: =C2=A0/* SYSS (OMAP2) */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0OMAP_RO_REG(addr);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;=
- =C2=A0 =C2=A0case 0x54: /* SYSC (OMAP2) */
+ =C2=A0 =C2=A0case 0x5= 4: =C2=A0/* SYSC (OMAP2) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->sysc= ontrol =3D value & 0x1d;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value &= ; 2)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 2) {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_uart_reset(s);
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2= =A0case 0x5c: /* WER (OMAP2) */
+ =C2=A0 =C2=A0case 0x5c: =C2=A0/* WER (= OMAP2) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->wkup =3D value & 0= x7f;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case 0x6= 0: /* CFPS (OMAP2) */
+ =C2=A0 =C2=A0case 0x60: =C2=A0/* CFPS (OMAP2) */=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->cfps =3D value & 0xff;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0 =C2=A0 =C2=A0default:diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c
index 9f62f0b633= ..beed1cd9a5 100644
--- a/hw/dma/pxa2xx_dma.c
+++ b/hw/dma/pxa2xx_dma= .c
@@ -61,98 +61,104 @@ struct PXA2xxDMAState {
=C2=A0 =C2=A0 =C2=A0i= nt running;
=C2=A0};
=C2=A0
-#define DCSR0 0x0000 /* DMA Control /= Status register for Channel 0 */
-#define DCSR31 0x007c /* DMA Control = / Status register for Channel 31 */
-#define DALGN 0x00a0 /* DMA Alignme= nt register */
-#define DPCSR 0x00a4 /* DMA Programmed I/O Control Statu= s register */
-#define DRQSR0 0x00e0 /* DMA DREQ<0> Status registe= r */
-#define DRQSR1 0x00e4 /* DMA DREQ<1> Status register */
-= #define DRQSR2 0x00e8 /* DMA DREQ<2> Status register */
-#define D= INT 0x00f0 /* DMA Interrupt register */
-#define DRCMR0 0x0100 /* Reques= t to Channel Map register 0 */
-#define DRCMR63 0x01fc /* Request to Cha= nnel Map register 63 */
-#define D_CH0 0x0200 /* Channel 0 Descriptor st= art */
-#define DRCMR64 0x1100 /* Request to Channel Map register 64 */<= br>-#define DRCMR74 0x1128 /* Request to Channel Map register 74 */
+#de= fine DCSR0 =C2=A0 0x0000 =C2=A0/* DMA Control / Status register for Channel= 0 */
+#define DCSR31 =C2=A00x007c =C2=A0/* DMA Control / Status registe= r for Channel 31 */
+#define DALGN =C2=A0 0x00a0 =C2=A0/* DMA Alignment = register */
+#define DPCSR =C2=A0 0x00a4 =C2=A0/* DMA Programmed I/O Con= trol Status register */
+#define DRQSR0 =C2=A00x00e0 =C2=A0/* DMA DREQ&l= t;0> Status register */
+#define DRQSR1 =C2=A00x00e4 =C2=A0/* DMA DRE= Q<1> Status register */
+#define DRQSR2 =C2=A00x00e8 =C2=A0/* DMA = DREQ<2> Status register */
+#define DINT =C2=A0 =C2=A00x00f0 =C2= =A0/* DMA Interrupt register */
+#define DRCMR0 =C2=A00x0100 =C2=A0/* Re= quest to Channel Map register 0 */
+#define DRCMR63 0x01fc =C2=A0/* Requ= est to Channel Map register 63 */
+#define D_CH0 =C2=A0 0x0200 =C2=A0/* = Channel 0 Descriptor start */
+#define DRCMR64 0x1100 =C2=A0/* Request t= o Channel Map register 64 */
+#define DRCMR74 0x1128 =C2=A0/* Request to= Channel Map register 74 */
=C2=A0
=C2=A0/* Per-channel register */-#define DDADR 0x00
-#define DSADR 0x01
-#define DTADR 0x02
-#de= fine DCMD 0x03
+#define DDADR 0x00
+#define DSADR 0x01
+#define DT= ADR 0x02
+#define DCMD =C2=A00x03
=C2=A0
=C2=A0/* Bit-field masks = */
-#define DRCMR_CHLNUM 0x1f
-#define DRCMR_MAPVLD (1 << 7)<= br>-#define DDADR_STOP (1 << 0)
-#define DDADR_BREN (1 << = 1)
-#define DCMD_LEN 0x1fff
-#define DCMD_WIDTH(x) (1 << ((((= x) >> 14) & 3) - 1))
-#define DCMD_SIZE(x) (4 << (((x) = >> 16) & 3))
-#define DCMD_FLYBYT (1 << 19)
-#define= DCMD_FLYBYS (1 << 20)
-#define DCMD_ENDIRQEN (1 << 21)-#define DCMD_STARTIRQEN (1 << 22)
-#define DCMD_CMPEN (1 <&= lt; 25)
-#define DCMD_FLOWTRG (1 << 28)
-#define DCMD_FLOWSRC = (1 << 29)
-#define DCMD_INCTRGADDR (1 << 30)
-#define D= CMD_INCSRCADDR (1 << 31)
-#define DCSR_BUSERRINTR (1 << 0)=
-#define DCSR_STARTINTR (1 << 1)
-#define DCSR_ENDINTR (1 &l= t;< 2)
-#define DCSR_STOPINTR (1 << 3)
-#define DCSR_RASINT= R (1 << 4)
-#define DCSR_REQPEND (1 << 8)
-#define DCSR= _EORINT (1 << 9)
-#define DCSR_CMPST (1 << 10)
-#define= DCSR_MASKRUN (1 << 22)
-#define DCSR_RASIRQEN (1 << 23)-#define DCSR_CLRCMPST (1 << 24)
-#define DCSR_SETCMPST (1 <= ;< 25)
-#define DCSR_EORSTOPEN (1 << 26)
-#define DCSR_EORJ= MPEN (1 << 27)
-#define DCSR_EORIRQEN (1 << 28)
-#defin= e DCSR_STOPIRQEN (1 << 29)
-#define DCSR_NODESCFETCH (1 << = 30)
-#define DCSR_RUN (1 << 31)
+#define DRCMR_CHLNUM =C2=A0 = =C2=A0 0x1f
+#define DRCMR_MAPVLD =C2=A0 =C2=A0 (1 << 7)
+#defi= ne DDADR_STOP =C2=A0 =C2=A0 =C2=A0 (1 << 0)
+#define DDADR_BREN = =C2=A0 =C2=A0 =C2=A0 (1 << 1)
+#define DCMD_LEN =C2=A0 =C2=A0 =C2= =A0 =C2=A0 0x1fff
+#define DCMD_WIDTH(x) =C2=A0 =C2=A0(1 << ((((x)= >> 14) & 3) - 1))
+#define DCMD_SIZE(x) =C2=A0 =C2=A0 (4 <= < (((x) >> 16) & 3))
+#define DCMD_FLYBYT =C2=A0 =C2=A0 =C2= =A0(1 << 19)
+#define DCMD_FLYBYS =C2=A0 =C2=A0 =C2=A0(1 << = 20)
+#define DCMD_ENDIRQEN =C2=A0 =C2=A0(1 << 21)
+#define DCMD= _STARTIRQEN =C2=A0(1 << 22)
+#define DCMD_CMPEN =C2=A0 =C2=A0 =C2= =A0 (1 << 25)
+#define DCMD_FLOWTRG =C2=A0 =C2=A0 (1 << 28)<= br>+#define DCMD_FLOWSRC =C2=A0 =C2=A0 (1 << 29)
+#define DCMD_INC= TRGADDR =C2=A0(1 << 30)
+#define DCMD_INCSRCADDR =C2=A0(1 <<= 31)
+#define DCSR_BUSERRINTR =C2=A0(1 << 0)
+#define DCSR_STAR= TINTR =C2=A0 (1 << 1)
+#define DCSR_ENDINTR =C2=A0 =C2=A0 (1 <&= lt; 2)
+#define DCSR_STOPINTR =C2=A0 =C2=A0(1 << 3)
+#define DC= SR_RASINTR =C2=A0 =C2=A0 (1 << 4)
+#define DCSR_REQPEND =C2=A0 =C2= =A0 (1 << 8)
+#define DCSR_EORINT =C2=A0 =C2=A0 =C2=A0(1 << = 9)
+#define DCSR_CMPST =C2=A0 =C2=A0 =C2=A0 (1 << 10)
+#define = DCSR_MASKRUN =C2=A0 =C2=A0 (1 << 22)
+#define DCSR_RASIRQEN =C2=A0= =C2=A0(1 << 23)
+#define DCSR_CLRCMPST =C2=A0 =C2=A0(1 << 2= 4)
+#define DCSR_SETCMPST =C2=A0 =C2=A0(1 << 25)
+#define DCSR_= EORSTOPEN =C2=A0 (1 << 26)
+#define DCSR_EORJMPEN =C2=A0 =C2=A0(1 = << 27)
+#define DCSR_EORIRQEN =C2=A0 =C2=A0(1 << 28)
+#de= fine DCSR_STOPIRQEN =C2=A0 (1 << 29)
+#define DCSR_NODESCFETCH (1 = << 30)
+#define DCSR_RUN =C2=A0 =C2=A0 =C2=A0 =C2=A0 (1 << 3= 1)
=C2=A0
=C2=A0static inline void pxa2xx_dma_update(PXA2xxDMAState *= s, int ch)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0if (ch >=3D 0) {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->chan[ch].state & DCSR_STOPIRQEN) = &&
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s-&= gt;chan[ch].state & DCSR_STOPINTR))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->chan[ch].state & DCSR_STOPINTR)) {=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->stopintr |=3D 1 <= < ch;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->stopin= tr &=3D ~(1 << ch);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->chan[ch].state & DCSR_EO= RIRQEN) &&
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(s->chan[ch].state & DCSR_EORINT))
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->chan[ch].state & DCSR_EORINT))= {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->eorintr |=3D 1 = << ch;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->eo= rintr &=3D ~(1 << ch);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2= =A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->chan[ch].state & DC= SR_RASIRQEN) &&
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(s->chan[ch].state & DCSR_RASINTR))
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->chan[ch].state & DCSR_RASI= NTR)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->rasintr |= =3D 1 << ch;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-= >rasintr &=3D ~(1 << ch);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->chan[ch].state & DCSR= _STARTINTR)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->chan[ch].state & = DCSR_STARTINTR) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->= startintr |=3D 1 << ch;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0else
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->startintr &=3D ~(1 << ch);
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->chan[ch].st= ate & DCSR_ENDINTR)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->chan[ch].= state & DCSR_ENDINTR) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->endintr |=3D 1 << ch;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0els= e
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->endintr &=3D ~(1 << ch);
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2=A0= if (s->stopintr | s->eorintr | s->rasintr | s->startintr | s-&g= t;endintr)
+ =C2=A0 =C2=A0if (s->stopintr | s->eorintr | s->ras= intr | s->startintr | s->endintr) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0qemu_irq_raise(s->irq);
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0}= else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_lower(s->irq);
= + =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0static inline void pxa2xx_dm= a_descriptor_fetch(
@@ -160,8 +166,9 @@ static inline void pxa2xx_dma_de= scriptor_fetch(
=C2=A0{
=C2=A0 =C2=A0 =C2=A0uint32_t desc[4];
=C2= =A0 =C2=A0 =C2=A0hwaddr daddr =3D s->chan[ch].descr & ~0xf;
- =C2= =A0 =C2=A0if ((s->chan[ch].descr & DDADR_BREN) && (s->cha= n[ch].state & DCSR_CMPST))
+ =C2=A0 =C2=A0if ((s->chan[ch].descr = & DDADR_BREN) && (s->chan[ch].state & DCSR_CMPST)) {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0daddr +=3D 32;
+ =C2=A0 =C2=A0}
=C2= =A0
=C2=A0 =C2=A0 =C2=A0cpu_physical_memory_read(daddr, desc, 16);
= =C2=A0 =C2=A0 =C2=A0s->chan[ch].descr =3D desc[DDADR];
@@ -169,16 +17= 6,20 @@ static inline void pxa2xx_dma_descriptor_fetch(
=C2=A0 =C2=A0 = =C2=A0s->chan[ch].dest =3D desc[DTADR];
=C2=A0 =C2=A0 =C2=A0s->cha= n[ch].cmd =3D desc[DCMD];
=C2=A0
- =C2=A0 =C2=A0if (s->chan[ch].cm= d & DCMD_FLOWSRC)
+ =C2=A0 =C2=A0if (s->chan[ch].cmd & DCMD_F= LOWSRC) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->chan[ch].src &=3D = ~3;
- =C2=A0 =C2=A0if (s->chan[ch].cmd & DCMD_FLOWTRG)
+ =C2= =A0 =C2=A0}
+ =C2=A0 =C2=A0if (s->chan[ch].cmd & DCMD_FLOWTRG) {<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->chan[ch].dest &=3D ~3;
+ = =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2=A0if (s->chan[ch].cmd & (DC= MD_CMPEN | DCMD_FLYBYS | DCMD_FLYBYT))
+ =C2=A0 =C2=A0if (s->chan[ch]= .cmd & (DCMD_CMPEN | DCMD_FLYBYS | DCMD_FLYBYT)) {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0printf("%s: unsupported mode in channel %i\n", _= _func__, ch);
+ =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2=A0if (s->cha= n[ch].cmd & DCMD_STARTIRQEN)
+ =C2=A0 =C2=A0if (s->chan[ch].cmd &= amp; DCMD_STARTIRQEN) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->chan[ch]= .state |=3D DCSR_STARTINTR;
+ =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2= =A0static void pxa2xx_dma_run(PXA2xxDMAState *s)
@@ -190,18 +201,20 @@ s= tatic void pxa2xx_dma_run(PXA2xxDMAState *s)
=C2=A0 =C2=A0 =C2=A0uint8_t= buffer[32];
=C2=A0 =C2=A0 =C2=A0PXA2xxDMAChannel *ch;
=C2=A0
- = =C2=A0 =C2=A0if (s->running ++)
+ =C2=A0 =C2=A0if (s->running++) {=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0}
=C2=A0=
=C2=A0 =C2=A0 =C2=A0while (s->running) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->running =3D 1;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (c =3D 0= ; c < s->channels; c ++) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0for (c =3D= 0; c < s->channels; c++) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0ch =3D &s->chan[c];
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0while ((ch->state & DCSR_RUN) && !(c= h->state & DCSR_STOPINTR)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Test for pending requests */
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((ch->cmd & (DCMD_FL= OWSRC | DCMD_FLOWTRG)) && !ch->request)
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((ch->cmd & (DCMD_FLOWSRC |= DCMD_FLOWTRG)) && !ch->request) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0length =3D ch->cmd &= DCMD_LEN;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0size =3D DCMD_SIZE(ch->cmd);
@@ -228,11 +241,13 @@ static void pxa= 2xx_dma_run(PXA2xxDMAState *s)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((ch->cmd & (DCMD_FLOWSRC | DC= MD_FLOWTRG)) &&
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0!ch->request) {<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 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ch->state & DCSR_NODESCFETCH) ||
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(ch->descr & DDADR_STOP) ||
@@ -259,7 +275,7 @@ = static void pxa2xx_dma_run(PXA2xxDMAState *s)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0<= br>- =C2=A0 =C2=A0 =C2=A0 =C2=A0s->running --;
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0s->running--;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
@@= -290,8 +306,9 @@ static uint64_t pxa2xx_dma_read(void *opaque, hwaddr offs= et,
=C2=A0
=C2=A0 =C2=A0 =C2=A0case DCSR0 ... DCSR31:
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0channel =3D offset >> 2;
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (s->chan[channel].request)
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0if (s->chan[channel].request) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0return s->chan[channel].state | DCSR_REQPEND;
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->cha= n[channel].state;
=C2=A0
=C2=A0 =C2=A0 =C2=A0case DINT:
@@ -363,8 = +380,9 @@ static void pxa2xx_dma_write(void *opaque, hwaddr offset,
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 DCSR_STARTINTR | DCSR_BUSERRINTR));
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->chan[channel].state |=3D value & 0xfc800000;
=C2= =A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->chan[channel].state & DCS= R_STOPIRQEN)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->chan[channel].state = & DCSR_STOPIRQEN) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= s->chan[channel].state &=3D ~DCSR_STOPINTR;
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & = DCSR_NODESCFETCH) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* N= o-descriptor-fetch mode */
@@ -382,13 +400,16 @@ static void pxa2xx_dma_= write(void *opaque, hwaddr offset,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Shouldn't matter as ou= r DMA is synchronous. =C2=A0*/
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!(value = & (DCSR_RUN | DCSR_MASKRUN)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!(val= ue & (DCSR_RUN | DCSR_MASKRUN))) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->chan[channel].state |=3D DCSR_STOPINTR;
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value &= amp; DCSR_CLRCMPST)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & DCSR_CL= RCMPST) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->chan[cha= nnel].state &=3D ~DCSR_CMPST;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value= & DCSR_SETCMPST)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (value & DCSR_SETCMPST) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->chan[channel].state |=3D DCSR_CMPST;
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0px= a2xx_dma_update(s, channel);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;@@ -439,19 +460,23 @@ static void pxa2xx_dma_request(void *opaque, int req= _num, int on)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0PXA2xxDMAState *s =3D opaqu= e;
=C2=A0 =C2=A0 =C2=A0int ch;
- =C2=A0 =C2=A0if (req_num < 0 || r= eq_num >=3D PXA2XX_DMA_NUM_REQUESTS)
+ =C2=A0 =C2=A0if (req_num < = 0 || req_num >=3D PXA2XX_DMA_NUM_REQUESTS) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0hw_error("%s: Bad DMA request %i\n", __func__, req_num)= ;
+ =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2=A0if (!(s->req[req_num] = & DRCMR_MAPVLD))
+ =C2=A0 =C2=A0if (!(s->req[req_num] & DRCMR= _MAPVLD)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0= }
=C2=A0 =C2=A0 =C2=A0ch =3D s->req[req_num] & DRCMR_CHLNUM;
= =C2=A0
- =C2=A0 =C2=A0if (!s->chan[ch].request && on)
+ = =C2=A0 =C2=A0if (!s->chan[ch].request && on) {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->chan[ch].state |=3D DCSR_RASINTR;
- =C2=A0 =C2= =A0else
+ =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&= gt;chan[ch].state &=3D ~DCSR_RASINTR;
- =C2=A0 =C2=A0if (s->chan[= ch].request && !on)
+ =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0if (s->= ;chan[ch].request && !on) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-= >chan[ch].state |=3D DCSR_EORINT;
+ =C2=A0 =C2=A0}
=C2=A0
=C2= =A0 =C2=A0 =C2=A0s->chan[ch].request =3D on;
=C2=A0 =C2=A0 =C2=A0if (= on) {
@@ -488,8 +513,9 @@ static void pxa2xx_dma_realize(DeviceState *de= v, Error **errp)
=C2=A0
=C2=A0 =C2=A0 =C2=A0s->chan =3D g_new0(PXA= 2xxDMAChannel, s->channels);
=C2=A0
- =C2=A0 =C2=A0for (i =3D 0; i= < s->channels; i ++)
+ =C2=A0 =C2=A0for (i =3D 0; i < s->ch= annels; i++) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->chan[i].state =3D= DCSR_STOPINTR;
+ =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0DeviceSta= te *pxa27x_dma_init(hwaddr base, qemu_irq irq)
diff --git a/hw/gpio/omap= _gpio.c b/hw/gpio/omap_gpio.c
index a3341d70f1..60e97a0839 100644
---= a/hw/gpio/omap_gpio.c
+++ b/hw/gpio/omap_gpio.c
@@ -57,10 +57,11 @@ = static void omap_gpio_set(void *opaque, int line, int level)
=C2=A0 =C2= =A0 =C2=A0struct omap_gpio_s *s =3D &p->omap1;
=C2=A0 =C2=A0 =C2= =A0uint16_t prev =3D s->inputs;
=C2=A0
- =C2=A0 =C2=A0if (level)+ =C2=A0 =C2=A0if (level) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->in= puts |=3D 1 << line;
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} else = {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->inputs &=3D ~(1 << l= ine);
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (((s->edge= & s->inputs & ~prev) | (~s->edge & ~s->inputs & p= rev)) &
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(1 << line) & s->dir & ~s->mask) {
= @@ -80,25 +81,25 @@ static uint64_t omap_gpio_read(void *opaque, hwaddr add= r,
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (offset= ) {
- =C2=A0 =C2=A0case 0x00: /* DATA_INPUT */
+ =C2=A0 =C2=A0case 0x= 00: =C2=A0/* DATA_INPUT */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s-&g= t;inputs & s->pins;
=C2=A0
- =C2=A0 =C2=A0case 0x04: /* DATA_O= UTPUT */
+ =C2=A0 =C2=A0case 0x04: =C2=A0/* DATA_OUTPUT */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return s->outputs;
=C2=A0
- =C2=A0 =C2=A0c= ase 0x08: /* DIRECTION_CONTROL */
+ =C2=A0 =C2=A0case 0x08: =C2=A0/* DIR= ECTION_CONTROL */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->dir;=C2=A0
- =C2=A0 =C2=A0case 0x0c: /* INTERRUPT_CONTROL */
+ =C2=A0 = =C2=A0case 0x0c: =C2=A0/* INTERRUPT_CONTROL */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return s->edge;
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* INTE= RRUPT_MASK */
+ =C2=A0 =C2=A0case 0x10: =C2=A0/* INTERRUPT_MASK */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->mask;
=C2=A0
- =C2=A0 = =C2=A0case 0x14: /* INTERRUPT_STATUS */
+ =C2=A0 =C2=A0case 0x14: =C2=A0= /* INTERRUPT_STATUS */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->in= ts;
=C2=A0
- =C2=A0 =C2=A0case 0x18: /* PIN_CONTROL (not in OMAP310) = */
+ =C2=A0 =C2=A0case 0x18: =C2=A0/* PIN_CONTROL (not in OMAP310) */=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OMAP_BAD_REG(addr);
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return s->pins;
=C2=A0 =C2=A0 =C2=A0}
@@ -121,47 = +122,50 @@ static void omap_gpio_write(void *opaque, hwaddr addr,
=C2=A0= =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (offset) {
- =C2= =A0 =C2=A0case 0x00: /* DATA_INPUT */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/*= DATA_INPUT */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OMAP_RO_REG(addr);
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case = 0x04: /* DATA_OUTPUT */
+ =C2=A0 =C2=A0case 0x04: =C2=A0/* DATA_OUTPUT *= /
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0diff =3D (s->outputs ^ value) &am= p; ~s->dir;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->outputs =3D value= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0while ((ln =3D ctz32(diff)) !=3D 32)= {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->handler[ln])
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->handler[ln]) {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_set_irq(s-&= gt;handler[ln], (value >> ln) & 1);
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0diff = &=3D ~(1 << ln);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x08: /= * DIRECTION_CONTROL */
+ =C2=A0 =C2=A0case 0x08: =C2=A0/* DIRECTION_CONT= ROL */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0diff =3D s->outputs & (s= ->dir ^ value);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dir =3D value= ;
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0value =3D s->outputs &a= mp; ~s->dir;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0while ((ln =3D ctz32(d= iff)) !=3D 32) {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->ha= ndler[ln])
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->handler[= ln]) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qem= u_set_irq(s->handler[ln], (value >> ln) & 1);
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0diff &=3D ~(1 << ln);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 = =C2=A0case 0x0c: /* INTERRUPT_CONTROL */
+ =C2=A0 =C2=A0case 0x0c: =C2= =A0/* INTERRUPT_CONTROL */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->edge = =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2= =A0 =C2=A0case 0x10: /* INTERRUPT_MASK */
+ =C2=A0 =C2=A0case 0x10: =C2= =A0/* INTERRUPT_MASK */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mask =3D= value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 = =C2=A0case 0x14: /* INTERRUPT_STATUS */
+ =C2=A0 =C2=A0case 0x14: =C2=A0= /* INTERRUPT_STATUS */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->ints &= ;=3D ~value;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!s->ints)
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0if (!s->ints) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0qemu_irq_lower(s->irq);
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2= =A0case 0x18: /* PIN_CONTROL (not in OMAP310 TRM) */
+ =C2=A0 =C2=A0case= 0x18: =C2=A0/* PIN_CONTROL (not in OMAP310 TRM) */
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0OMAP_BAD_REG(addr);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&g= t;pins =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
@@ -233,12= +237,15 @@ static inline void omap2_gpio_module_int_update(struct omap2_gp= io_s *s,
=C2=A0
=C2=A0static void omap2_gpio_module_wake(struct omap2= _gpio_s *s, int line)
=C2=A0{
- =C2=A0 =C2=A0if (!(s->config[0] &a= mp; (1 << 2))) /* ENAWAKEUP */
+ =C2=A0 =C2=A0if (!(s->config= [0] & (1 << 2))) { =C2=A0 /* ENAWAKEUP */
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0return;
- =C2=A0 =C2=A0if (!(s->config[0] & (3 <= < 3))) /* Force Idle */
+ =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0if (!(s-= >config[0] & (3 << 3))) { =C2=A0 /* Force Idle */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
- =C2=A0 =C2=A0if (!(s->wumask &am= p; (1 << line)))
+ =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0if (!(s->wu= mask & (1 << line))) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retur= n;
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0qemu_irq_raise(s-&g= t;wkup);
=C2=A0}
@@ -279,12 +286,14 @@ static void omap2_gpio_set(voi= d *opaque, int line, int level)
=C2=A0
=C2=A0 =C2=A0 =C2=A0line &= =3D 31;
=C2=A0 =C2=A0 =C2=A0if (level) {
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0if (s->dir & (1 << line) & ((~s->inputs & s->= edge[0]) | s->level[1]))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->dir &= amp; (1 << line) & ((~s->inputs & s->edge[0]) | s->l= evel[1])) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_m= odule_int(s, line);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->inputs |=3D 1 << line;
=C2=A0 =C2=A0 =C2=A0= } else {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->dir & (1 << li= ne) & ((s->inputs & s->edge[1]) | s->level[0]))
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0if (s->dir & (1 << line) & ((s->= ;inputs & s->edge[1]) | s->level[0])) {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_int(s, line);
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->inputs &= =3D ~(1 << line);
=C2=A0 =C2=A0 =C2=A0}
=C2=A0}
@@ -312,66 += 321,66 @@ static uint32_t omap2_gpio_module_read(void *opaque, hwaddr addr)=
=C2=A0 =C2=A0 =C2=A0struct omap2_gpio_s *s =3D opaque;
=C2=A0
=C2= =A0 =C2=A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0case 0x00: /* GPIO_REVIS= ION */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* GPIO_REVISION */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return s->revision;
=C2=A0
- =C2=A0 =C2=A0= case 0x10: /* GPIO_SYSCONFIG */
+ =C2=A0 =C2=A0case 0x10: =C2=A0/* GPIO_= SYSCONFIG */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->config[0];=C2=A0
- =C2=A0 =C2=A0case 0x14: /* GPIO_SYSSTATUS */
+ =C2=A0 =C2= =A0case 0x14: =C2=A0/* GPIO_SYSSTATUS */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return 0x01;
=C2=A0
- =C2=A0 =C2=A0case 0x18: /* GPIO_IRQSTATUS1 *= /
+ =C2=A0 =C2=A0case 0x18: =C2=A0/* GPIO_IRQSTATUS1 */
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0return s->ints[0];
=C2=A0
- =C2=A0 =C2=A0case= 0x1c: /* GPIO_IRQENABLE1 */
- =C2=A0 =C2=A0case 0x60: /* GPIO_CLEARIRQE= NABLE1 */
- =C2=A0 =C2=A0case 0x64: /* GPIO_SETIRQENABLE1 */
+ =C2=A0= =C2=A0case 0x1c: =C2=A0/* GPIO_IRQENABLE1 */
+ =C2=A0 =C2=A0case 0x60: = =C2=A0/* GPIO_CLEARIRQENABLE1 */
+ =C2=A0 =C2=A0case 0x64: =C2=A0/* GPIO= _SETIRQENABLE1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->mask[0]= ;
=C2=A0
- =C2=A0 =C2=A0case 0x20: /* GPIO_WAKEUPENABLE */
- =C2= =A0 =C2=A0case 0x80: /* GPIO_CLEARWKUENA */
- =C2=A0 =C2=A0case 0x84: /*= GPIO_SETWKUENA */
+ =C2=A0 =C2=A0case 0x20: =C2=A0/* GPIO_WAKEUPENABLE = */
+ =C2=A0 =C2=A0case 0x80: =C2=A0/* GPIO_CLEARWKUENA */
+ =C2=A0 = =C2=A0case 0x84: =C2=A0/* GPIO_SETWKUENA */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return s->wumask;
=C2=A0
- =C2=A0 =C2=A0case 0x28: /* GPIO_I= RQSTATUS2 */
+ =C2=A0 =C2=A0case 0x28: =C2=A0/* GPIO_IRQSTATUS2 */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->ints[1];
=C2=A0
- =C2= =A0 =C2=A0case 0x2c: /* GPIO_IRQENABLE2 */
- =C2=A0 =C2=A0case 0x70: /* = GPIO_CLEARIRQENABLE2 */
- =C2=A0 =C2=A0case 0x74: /* GPIO_SETIREQNEABLE2= */
+ =C2=A0 =C2=A0case 0x2c: =C2=A0/* GPIO_IRQENABLE2 */
+ =C2=A0 = =C2=A0case 0x70: =C2=A0/* GPIO_CLEARIRQENABLE2 */
+ =C2=A0 =C2=A0case 0x= 74: =C2=A0/* GPIO_SETIREQNEABLE2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= turn s->mask[1];
=C2=A0
- =C2=A0 =C2=A0case 0x30: /* GPIO_CTRL */<= br>+ =C2=A0 =C2=A0case 0x30: =C2=A0/* GPIO_CTRL */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return s->config[1];
=C2=A0
- =C2=A0 =C2=A0case 0x34:= /* GPIO_OE */
+ =C2=A0 =C2=A0case 0x34: =C2=A0/* GPIO_OE */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->dir;
=C2=A0
- =C2=A0 =C2=A0ca= se 0x38: /* GPIO_DATAIN */
+ =C2=A0 =C2=A0case 0x38: =C2=A0/* GPIO_DATAI= N */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->inputs;
=C2=A0- =C2=A0 =C2=A0case 0x3c: /* GPIO_DATAOUT */
- =C2=A0 =C2=A0case 0x90: = /* GPIO_CLEARDATAOUT */
- =C2=A0 =C2=A0case 0x94: /* GPIO_SETDATAOUT */<= br>+ =C2=A0 =C2=A0case 0x3c: =C2=A0/* GPIO_DATAOUT */
+ =C2=A0 =C2=A0cas= e 0x90: =C2=A0/* GPIO_CLEARDATAOUT */
+ =C2=A0 =C2=A0case 0x94: =C2=A0/*= GPIO_SETDATAOUT */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->outpu= ts;
=C2=A0
- =C2=A0 =C2=A0case 0x40: /* GPIO_LEVELDETECT0 */
+ =C2= =A0 =C2=A0case 0x40: =C2=A0/* GPIO_LEVELDETECT0 */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return s->level[0];
=C2=A0
- =C2=A0 =C2=A0case 0x44: = /* GPIO_LEVELDETECT1 */
+ =C2=A0 =C2=A0case 0x44: =C2=A0/* GPIO_LEVELDET= ECT1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->level[1];
=C2= =A0
- =C2=A0 =C2=A0case 0x48: /* GPIO_RISINGDETECT */
+ =C2=A0 =C2=A0= case 0x48: =C2=A0/* GPIO_RISINGDETECT */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return s->edge[0];
=C2=A0
- =C2=A0 =C2=A0case 0x4c: /* GPIO_FAL= LINGDETECT */
+ =C2=A0 =C2=A0case 0x4c: =C2=A0/* GPIO_FALLINGDETECT */=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->edge[1];
=C2=A0
- = =C2=A0 =C2=A0case 0x50: /* GPIO_DEBOUNCENABLE */
+ =C2=A0 =C2=A0case 0x5= 0: =C2=A0/* GPIO_DEBOUNCENABLE */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retu= rn s->debounce;
=C2=A0
- =C2=A0 =C2=A0case 0x54: /* GPIO_DEBOUNCIN= GTIME */
+ =C2=A0 =C2=A0case 0x54: =C2=A0/* GPIO_DEBOUNCINGTIME */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->delay;
=C2=A0 =C2=A0 =C2= =A0}
=C2=A0
@@ -387,55 +396,56 @@ static void omap2_gpio_module_write= (void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2=A0int ln;
=C2=A0
=C2= =A0 =C2=A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0case 0x00: /* GPIO_REVIS= ION */
- =C2=A0 =C2=A0case 0x14: /* GPIO_SYSSTATUS */
- =C2=A0 =C2=A0= case 0x38: /* GPIO_DATAIN */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* GPIO_REV= ISION */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* GPIO_SYSSTATUS */
+ =C2= =A0 =C2=A0case 0x38: =C2=A0/* GPIO_DATAIN */
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0OMAP_RO_REG(addr);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
= =C2=A0
- =C2=A0 =C2=A0case 0x10: /* GPIO_SYSCONFIG */
+ =C2=A0 =C2=A0= case 0x10: =C2=A0/* GPIO_SYSCONFIG */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= if (((value >> 3) & 3) =3D=3D 3) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0qemu_log_mask(LOG_GUEST_ERROR,
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0"%s: Illegal IDLEMODE value: 3\n", __func__);
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0}
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 2)+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 2) {
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_reset(s);
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->config[0] =3D val= ue & 0x1d;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- = =C2=A0 =C2=A0case 0x18: /* GPIO_IRQSTATUS1 */
+ =C2=A0 =C2=A0case 0x18: = =C2=A0/* GPIO_IRQSTATUS1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->= ints[0] & value) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s= ->ints[0] &=3D ~value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0omap2_gpio_module_level_update(s, 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 = =C2=A0case 0x1c: /* GPIO_IRQENABLE1 */
+ =C2=A0 =C2=A0case 0x1c: =C2=A0/= * GPIO_IRQENABLE1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mask[0] =3D= value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_int_update(s= , 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2= =A0case 0x20: /* GPIO_WAKEUPENABLE */
+ =C2=A0 =C2=A0case 0x20: =C2=A0/*= GPIO_WAKEUPENABLE */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->wumask =3D= value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 = =C2=A0case 0x28: /* GPIO_IRQSTATUS2 */
+ =C2=A0 =C2=A0case 0x28: =C2=A0/= * GPIO_IRQSTATUS2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->ints[1]= & value) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->in= ts[1] &=3D ~value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0o= map2_gpio_module_level_update(s, 1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0ca= se 0x2c: /* GPIO_IRQENABLE2 */
+ =C2=A0 =C2=A0case 0x2c: =C2=A0/* GPIO_I= RQENABLE2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mask[1] =3D value;<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_int_update(s, 1);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case = 0x30: /* GPIO_CTRL */
+ =C2=A0 =C2=A0case 0x30: =C2=A0/* GPIO_CTRL */=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->config[1] =3D value & 7;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0= x34: /* GPIO_OE */
+ =C2=A0 =C2=A0case 0x34: =C2=A0/* GPIO_OE */
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0diff =3D s->outputs & (s->dir ^ va= lue);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dir =3D value;
=C2=A0@@ -449,71 +459,71 @@ static void omap2_gpio_module_write(void *opaque, h= waddr addr,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_level_up= date(s, 1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2= =A0 =C2=A0case 0x3c: /* GPIO_DATAOUT */
+ =C2=A0 =C2=A0case 0x3c: =C2=A0= /* GPIO_DATAOUT */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_o= ut_update(s, s->outputs ^ value);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0b= reak;
=C2=A0
- =C2=A0 =C2=A0case 0x40: /* GPIO_LEVELDETECT0 */
+ = =C2=A0 =C2=A0case 0x40: =C2=A0/* GPIO_LEVELDETECT0 */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->level[0] =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0omap2_gpio_module_level_update(s, 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0omap2_gpio_module_level_update(s, 1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x44: /* GPIO_LEVELDETECT1 */=
+ =C2=A0 =C2=A0case 0x44: =C2=A0/* GPIO_LEVELDETECT1 */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->level[1] =3D value;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0omap2_gpio_module_level_update(s, 0);
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0omap2_gpio_module_level_update(s, 1);
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x48: /* GPIO_RISINGDE= TECT */
+ =C2=A0 =C2=A0case 0x48: =C2=A0/* GPIO_RISINGDETECT */
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->edge[0] =3D value;
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x4c: /* GPIO_F= ALLINGDETECT */
+ =C2=A0 =C2=A0case 0x4c: =C2=A0/* GPIO_FALLINGDETECT */=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->edge[1] =3D value;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x50: /*= GPIO_DEBOUNCENABLE */
+ =C2=A0 =C2=A0case 0x50: =C2=A0/* GPIO_DEBOUNCEN= ABLE */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->debounce =3D value;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0= x54: /* GPIO_DEBOUNCINGTIME */
+ =C2=A0 =C2=A0case 0x54: =C2=A0/* GPIO_D= EBOUNCINGTIME */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->delay =3D value= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0c= ase 0x60: /* GPIO_CLEARIRQENABLE1 */
+ =C2=A0 =C2=A0case 0x60: =C2=A0/* = GPIO_CLEARIRQENABLE1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mask[0] = &=3D ~value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_int= _update(s, 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- = =C2=A0 =C2=A0case 0x64: /* GPIO_SETIRQENABLE1 */
+ =C2=A0 =C2=A0case 0x6= 4: =C2=A0/* GPIO_SETIRQENABLE1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&g= t;mask[0] |=3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_modul= e_int_update(s, 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0- =C2=A0 =C2=A0case 0x70: /* GPIO_CLEARIRQENABLE2 */
+ =C2=A0 =C2=A0ca= se 0x70: =C2=A0/* GPIO_CLEARIRQENABLE2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->mask[1] &=3D ~value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0o= map2_gpio_module_int_update(s, 1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bre= ak;
=C2=A0
- =C2=A0 =C2=A0case 0x74: /* GPIO_SETIREQNEABLE2 */
+ = =C2=A0 =C2=A0case 0x74: =C2=A0/* GPIO_SETIREQNEABLE2 */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->mask[1] |=3D value;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0omap2_gpio_module_int_update(s, 1);
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x80: /* GPIO_CLEARWKUENA= */
+ =C2=A0 =C2=A0case 0x80: =C2=A0/* GPIO_CLEARWKUENA */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->wumask &=3D ~value;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x84: /* GPIO_SETW= KUENA */
+ =C2=A0 =C2=A0case 0x84: =C2=A0/* GPIO_SETWKUENA */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->wumask |=3D value;
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x90: /* GPIO_CLEARDA= TAOUT */
+ =C2=A0 =C2=A0case 0x90: =C2=A0/* GPIO_CLEARDATAOUT */
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_out_update(s, s->output= s & value);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- = =C2=A0 =C2=A0case 0x94: /* GPIO_SETDATAOUT */
+ =C2=A0 =C2=A0case 0x94: = =C2=A0/* GPIO_SETDATAOUT */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio= _module_out_update(s, ~s->outputs & value);
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0break;
=C2=A0
@@ -541,39 +551,39 @@ static void omap2_gp= io_module_writep(void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2=A0}
=C2= =A0
=C2=A0 =C2=A0 =C2=A0switch (addr & ~3) {
- =C2=A0 =C2=A0case = 0x00: /* GPIO_REVISION */
- =C2=A0 =C2=A0case 0x14: /* GPIO_SYSSTATUS */=
- =C2=A0 =C2=A0case 0x38: /* GPIO_DATAIN */
+ =C2=A0 =C2=A0case 0x00= : =C2=A0/* GPIO_REVISION */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* GPIO_SYSS= TATUS */
+ =C2=A0 =C2=A0case 0x38: =C2=A0/* GPIO_DATAIN */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0OMAP_RO_REG(addr);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* GPIO_SYSCONFIG */- =C2=A0 =C2=A0case 0x1c: /* GPIO_IRQENABLE1 */
- =C2=A0 =C2=A0case 0x2= 0: /* GPIO_WAKEUPENABLE */
- =C2=A0 =C2=A0case 0x2c: /* GPIO_IRQENABLE2 = */
- =C2=A0 =C2=A0case 0x30: /* GPIO_CTRL */
- =C2=A0 =C2=A0case 0x34= : /* GPIO_OE */
- =C2=A0 =C2=A0case 0x3c: /* GPIO_DATAOUT */
- =C2=A0= =C2=A0case 0x40: /* GPIO_LEVELDETECT0 */
- =C2=A0 =C2=A0case 0x44: /* G= PIO_LEVELDETECT1 */
- =C2=A0 =C2=A0case 0x48: /* GPIO_RISINGDETECT */- =C2=A0 =C2=A0case 0x4c: /* GPIO_FALLINGDETECT */
- =C2=A0 =C2=A0case = 0x50: /* GPIO_DEBOUNCENABLE */
- =C2=A0 =C2=A0case 0x54: /* GPIO_DEBOUNC= INGTIME */
+ =C2=A0 =C2=A0case 0x10: =C2=A0/* GPIO_SYSCONFIG */
+ =C2= =A0 =C2=A0case 0x1c: =C2=A0/* GPIO_IRQENABLE1 */
+ =C2=A0 =C2=A0case 0x2= 0: =C2=A0/* GPIO_WAKEUPENABLE */
+ =C2=A0 =C2=A0case 0x2c: =C2=A0/* GPIO= _IRQENABLE2 */
+ =C2=A0 =C2=A0case 0x30: =C2=A0/* GPIO_CTRL */
+ =C2= =A0 =C2=A0case 0x34: =C2=A0/* GPIO_OE */
+ =C2=A0 =C2=A0case 0x3c: =C2= =A0/* GPIO_DATAOUT */
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* GPIO_LEVELDETEC= T0 */
+ =C2=A0 =C2=A0case 0x44: =C2=A0/* GPIO_LEVELDETECT1 */
+ =C2= =A0 =C2=A0case 0x48: =C2=A0/* GPIO_RISINGDETECT */
+ =C2=A0 =C2=A0case 0= x4c: =C2=A0/* GPIO_FALLINGDETECT */
+ =C2=A0 =C2=A0case 0x50: =C2=A0/* G= PIO_DEBOUNCENABLE */
+ =C2=A0 =C2=A0case 0x54: =C2=A0/* GPIO_DEBOUNCINGT= IME */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cur =3D omap2_gpio_module_read(= opaque, addr & ~3) &
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0~(mask << ((addr & 3) << 3));
=C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Fall through. =C2=A0*/
- =C2=A0= =C2=A0case 0x18: /* GPIO_IRQSTATUS1 */
- =C2=A0 =C2=A0case 0x28: /* GPI= O_IRQSTATUS2 */
- =C2=A0 =C2=A0case 0x60: /* GPIO_CLEARIRQENABLE1 */
= - =C2=A0 =C2=A0case 0x64: /* GPIO_SETIRQENABLE1 */
- =C2=A0 =C2=A0case 0= x70: /* GPIO_CLEARIRQENABLE2 */
- =C2=A0 =C2=A0case 0x74: /* GPIO_SETIRE= QNEABLE2 */
- =C2=A0 =C2=A0case 0x80: /* GPIO_CLEARWKUENA */
- =C2=A0= =C2=A0case 0x84: /* GPIO_SETWKUENA */
- =C2=A0 =C2=A0case 0x90: /* GPIO= _CLEARDATAOUT */
- =C2=A0 =C2=A0case 0x94: /* GPIO_SETDATAOUT */
+ = =C2=A0 =C2=A0case 0x18: =C2=A0/* GPIO_IRQSTATUS1 */
+ =C2=A0 =C2=A0case = 0x28: =C2=A0/* GPIO_IRQSTATUS2 */
+ =C2=A0 =C2=A0case 0x60: =C2=A0/* GPI= O_CLEARIRQENABLE1 */
+ =C2=A0 =C2=A0case 0x64: =C2=A0/* GPIO_SETIRQENABL= E1 */
+ =C2=A0 =C2=A0case 0x70: =C2=A0/* GPIO_CLEARIRQENABLE2 */
+ = =C2=A0 =C2=A0case 0x74: =C2=A0/* GPIO_SETIREQNEABLE2 */
+ =C2=A0 =C2=A0c= ase 0x80: =C2=A0/* GPIO_CLEARWKUENA */
+ =C2=A0 =C2=A0case 0x84: =C2=A0/= * GPIO_SETWKUENA */
+ =C2=A0 =C2=A0case 0x90: =C2=A0/* GPIO_CLEARDATAOUT= */
+ =C2=A0 =C2=A0case 0x94: =C2=A0/* GPIO_SETDATAOUT */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0value <<=3D (addr & 3) << 3;
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpio_module_write(opaque, addr, cur | = value);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
@@ -616,22 +626,22 @= @ static uint64_t omap2_gpif_top_read(void *opaque, hwaddr addr, unsigned s= ize)
=C2=A0 =C2=A0 =C2=A0Omap2GpioState *s =3D opaque;
=C2=A0
=C2= =A0 =C2=A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0case 0x00: /* IPGENERICO= CPSPL_REVISION */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* IPGENERICOCPSPL_REV= ISION */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x18;
=C2=A0
- = =C2=A0 =C2=A0case 0x10: /* IPGENERICOCPSPL_SYSCONFIG */
+ =C2=A0 =C2=A0c= ase 0x10: =C2=A0/* IPGENERICOCPSPL_SYSCONFIG */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return s->autoidle;
=C2=A0
- =C2=A0 =C2=A0case 0x14: /* = IPGENERICOCPSPL_SYSSTATUS */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* IPGENERI= COCPSPL_SYSSTATUS */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x01;
= =C2=A0
- =C2=A0 =C2=A0case 0x18: /* IPGENERICOCPSPL_IRQSTATUS */
+ = =C2=A0 =C2=A0case 0x18: =C2=A0/* IPGENERICOCPSPL_IRQSTATUS */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return 0x00;
=C2=A0
- =C2=A0 =C2=A0case 0x40:= /* IPGENERICOCPSPL_GPO */
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* IPGENERICO= CPSPL_GPO */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->gpo;
=C2= =A0
- =C2=A0 =C2=A0case 0x50: /* IPGENERICOCPSPL_GPI */
+ =C2=A0 =C2= =A0case 0x50: =C2=A0/* IPGENERICOCPSPL_GPI */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return 0x00;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
@@ -645,20 +65= 5,21 @@ static void omap2_gpif_top_write(void *opaque, hwaddr addr,
=C2= =A0 =C2=A0 =C2=A0Omap2GpioState *s =3D opaque;
=C2=A0
=C2=A0 =C2=A0 = =C2=A0switch (addr) {
- =C2=A0 =C2=A0case 0x00: /* IPGENERICOCPSPL_REVIS= ION */
- =C2=A0 =C2=A0case 0x14: /* IPGENERICOCPSPL_SYSSTATUS */
- = =C2=A0 =C2=A0case 0x18: /* IPGENERICOCPSPL_IRQSTATUS */
- =C2=A0 =C2=A0c= ase 0x50: /* IPGENERICOCPSPL_GPI */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* I= PGENERICOCPSPL_REVISION */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* IPGENERICO= CPSPL_SYSSTATUS */
+ =C2=A0 =C2=A0case 0x18: =C2=A0/* IPGENERICOCPSPL_IR= QSTATUS */
+ =C2=A0 =C2=A0case 0x50: =C2=A0/* IPGENERICOCPSPL_GPI */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OMAP_RO_REG(addr);
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* IPGENERIC= OCPSPL_SYSCONFIG */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & (1 <= < 1)) /* SOFTRESET */
+ =C2=A0 =C2=A0case 0x10: =C2=A0/* IPGENERI= COCPSPL_SYSCONFIG */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & (1 <= ;< 1)) { =C2=A0 =C2=A0 =C2=A0 /* SOFTRESET */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0omap2_gpif_reset(DEVICE(s));
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->autoidle =3D valu= e & 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2= =A0 =C2=A0case 0x40: /* IPGENERICOCPSPL_GPO */
+ =C2=A0 =C2=A0case 0x40:= =C2=A0/* IPGENERICOCPSPL_GPO */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->= ;gpo =3D value & 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2= =A0
diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c
index 5884804c58= ..7342440b95 100644
--- a/hw/gpio/zaurus.c
+++ b/hw/gpio/zaurus.c
= @@ -49,19 +49,20 @@ struct ScoopInfo {
=C2=A0 =C2=A0 =C2=A0uint16_t isr;=
=C2=A0};
=C2=A0
-#define SCOOP_MCR 0x00
-#define SCOOP_CDR 0x0= 4
-#define SCOOP_CSR 0x08
-#define SCOOP_CPR 0x0c
-#define SCOOP_C= CR 0x10
-#define SCOOP_IRR_IRM 0x14
-#define SCOOP_IMR 0x18
-#defi= ne SCOOP_ISR 0x1c
-#define SCOOP_GPCR 0x20
-#define SCOOP_GPWR 0x24-#define SCOOP_GPRR 0x28
-
-static inline void scoop_gpio_handler_u= pdate(ScoopInfo *s) {
+#define SCOOP_MCR =C2=A0 =C2=A0 =C2=A0 0x00
+#= define SCOOP_CDR =C2=A0 =C2=A0 =C2=A0 0x04
+#define SCOOP_CSR =C2=A0 =C2= =A0 =C2=A0 0x08
+#define SCOOP_CPR =C2=A0 =C2=A0 =C2=A0 0x0c
+#define= SCOOP_CCR =C2=A0 =C2=A0 =C2=A0 0x10
+#define SCOOP_IRR_IRM =C2=A0 0x14<= br>+#define SCOOP_IMR =C2=A0 =C2=A0 =C2=A0 0x18
+#define SCOOP_ISR =C2= =A0 =C2=A0 =C2=A0 0x1c
+#define SCOOP_GPCR =C2=A0 =C2=A0 =C2=A00x20
+= #define SCOOP_GPWR =C2=A0 =C2=A0 =C2=A00x24
+#define SCOOP_GPRR =C2=A0 = =C2=A0 =C2=A00x28
+
+static inline void scoop_gpio_handler_update(Sco= opInfo *s)
+{
=C2=A0 =C2=A0 =C2=A0uint32_t level, diff;
=C2=A0 =C2= =A0 =C2=A0int bit;
=C2=A0 =C2=A0 =C2=A0level =3D s->gpio_level & = s->gpio_dir;
@@ -125,8 +126,9 @@ static void scoop_write(void *opaque= , hwaddr addr,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0 =C2=A0= =C2=A0case SCOOP_CPR:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->power =3D= value;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 0x80)
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0if (value & 0x80) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->power |=3D 0x8040;
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0 =C2=A0 =C2=A0cas= e SCOOP_CCR:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->ccr =3D value;
@= @ -145,7 +147,7 @@ static void scoop_write(void *opaque, hwaddr addr,
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0scoop_gpio_handler_update(s);
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0 =C2=A0 =C2=A0case SCOOP_GPWR:- =C2=A0 =C2=A0case SCOOP_GPRR: /* GPRR is probably R/O in real HW */
= + =C2=A0 =C2=A0case SCOOP_GPRR: =C2=A0 =C2=A0/* GPRR is probably R/O in rea= l HW */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->gpio_level =3D value &am= p; s->gpio_dir;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0scoop_gpio_handler_= update(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
@@ -166,10 +168,1= 1 @@ static void scoop_gpio_set(void *opaque, int line, int level)
=C2= =A0{
=C2=A0 =C2=A0 =C2=A0ScoopInfo *s =3D (ScoopInfo *) opaque;
=C2= =A0
- =C2=A0 =C2=A0if (level)
+ =C2=A0 =C2=A0if (level) {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->gpio_level |=3D (1 << line);
- = =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0s->gpio_level &=3D ~(1 << line);
+ =C2=A0 =C2=A0}=C2=A0}
=C2=A0
=C2=A0static void scoop_init(Object *obj)
@@ -203,= 7 +206,7 @@ static int scoop_post_load(void *opaque, int version_id)
=C2= =A0 =C2=A0 =C2=A0return 0;
=C2=A0}
=C2=A0
-static bool is_version_= 0 (void *opaque, int version_id)
+static bool is_version_0(void *opaque,= int version_id)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0return version_id =3D=3D= 0;
=C2=A0}
@@ -265,7 +268,7 @@ type_init(scoop_register_types)
= =C2=A0
=C2=A0/* Write the bootloader parameters memory area. =C2=A0*/=C2=A0
-#define MAGIC_CHG(a, b, c, d) ((d << 24) | (c << 16= ) | (b << 8) | a)
+#define MAGIC_CHG(a, b, c, d) =C2=A0 ((d <&l= t; 24) | (c << 16) | (b << 8) | a)
=C2=A0
=C2=A0static st= ruct QEMU_PACKED sl_param_info {
=C2=A0 =C2=A0 =C2=A0uint32_t comadj_key= word;
@@ -286,16 +289,16 @@ static struct QEMU_PACKED sl_param_info {=C2=A0 =C2=A0 =C2=A0uint32_t phad_keyword;
=C2=A0 =C2=A0 =C2=A0int32_t = phadadj;
=C2=A0} zaurus_bootparam =3D {
- =C2=A0 =C2=A0.comadj_keywor= d =3D MAGIC_CHG('C', 'M', 'A', 'D'),
- = =C2=A0 =C2=A0.comadj =3D 125,
- =C2=A0 =C2=A0.uuid_keyword =3D MAGIC_CH= G('U', 'U', 'I', 'D'),
- =C2=A0 =C2=A0.u= uid =3D { -1 },
- =C2=A0 =C2=A0.touch_keyword =3D MAGIC_CHG('T'= , 'U', 'C', 'H'),
- =C2=A0 =C2=A0.touch_xp =3D = -1,
- =C2=A0 =C2=A0.adadj_keyword =3D MAGIC_CHG('B', 'V'= , 'A', 'D'),
- =C2=A0 =C2=A0.adadj =3D -1,
- =C2=A0 = =C2=A0.phad_keyword =3D MAGIC_CHG('P', 'H', 'A', &#= 39;D'),
- =C2=A0 =C2=A0.phadadj =3D 0x01,
+ =C2=A0 =C2=A0.comadj= _keyword =C2=A0 =C2=A0 =3D MAGIC_CHG('C', 'M', 'A',= 'D'),
+ =C2=A0 =C2=A0.comadj =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =3D 125,
+ =C2=A0 =C2=A0.uuid_keyword =C2=A0 =C2=A0 =C2=A0 =3D M= AGIC_CHG('U', 'U', 'I', 'D'),
+ =C2=A0 = =C2=A0.uuid =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D { -1 },+ =C2=A0 =C2=A0.touch_keyword =C2=A0 =C2=A0 =C2=A0=3D MAGIC_CHG('T'= ;, 'U', 'C', 'H'),
+ =C2=A0 =C2=A0.touch_xp =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D -1,
+ =C2=A0 =C2=A0.adadj_keyword = =C2=A0 =C2=A0 =C2=A0=3D MAGIC_CHG('B', 'V', 'A', &#= 39;D'),
+ =C2=A0 =C2=A0.adadj =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0=3D -1,
+ =C2=A0 =C2=A0.phad_keyword =C2=A0 =C2=A0 =C2=A0 =3D = MAGIC_CHG('P', 'H', 'A', 'D'),
+ =C2=A0 = =C2=A0.phadadj =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D 0x01,
=C2=A0= };
=C2=A0
=C2=A0void sl_bootparam_write(hwaddr ptr)
diff --git a/h= w/input/tsc2005.c b/hw/input/tsc2005.c
index 941f163d36..05094ab2b1 1006= 44
--- a/hw/input/tsc2005.c
+++ b/hw/input/tsc2005.c
@@ -28,10 +28= ,10 @@
=C2=A0#include "migration/vmstate.h"
=C2=A0#include = "trace.h"
=C2=A0
-#define TSC_CUT_RESOLUTION(value, p) ((va= lue) >> (16 - (p ? 12 : 10)))
+#define TSC_CUT_RESOLUTION(value, p= ) =C2=A0((value) >> (16 - (p ? 12 : 10)))
=C2=A0
=C2=A0typedef = struct {
- =C2=A0 =C2=A0qemu_irq pint; /* Combination of the nPENIRQ and= DAV signals */
+ =C2=A0 =C2=A0qemu_irq pint; =C2=A0/* Combination of th= e nPENIRQ and DAV signals */
=C2=A0 =C2=A0 =C2=A0QEMUTimer *timer;
= =C2=A0 =C2=A0 =C2=A0uint16_t model;
=C2=A0
@@ -63,7 +63,7 @@ typedef = struct {
=C2=A0} TSC2005State;
=C2=A0
=C2=A0enum {
- =C2=A0 =C2= =A0TSC_MODE_XYZ_SCAN =3D 0x0,
+ =C2=A0 =C2=A0TSC_MODE_XYZ_SCAN =3D 0x0,<= br>=C2=A0 =C2=A0 =C2=A0TSC_MODE_XY_SCAN,
=C2=A0 =C2=A0 =C2=A0TSC_MODE_X,=
=C2=A0 =C2=A0 =C2=A0TSC_MODE_Y,
@@ -82,100 +82,100 @@ enum {
=C2= =A0};
=C2=A0
=C2=A0static const uint16_t mode_regs[16] =3D {
- =C2= =A0 =C2=A00xf000, /* X, Y, Z scan */
- =C2=A0 =C2=A00xc000, /* X, Y scan= */
- =C2=A0 =C2=A00x8000, /* X */
- =C2=A0 =C2=A00x4000, /* Y */
= - =C2=A0 =C2=A00x3000, /* Z */
- =C2=A0 =C2=A00x0800, /* AUX */
- =C2= =A0 =C2=A00x0400, /* TEMP1 */
- =C2=A0 =C2=A00x0200, /* TEMP2 */
- = =C2=A0 =C2=A00x0800, /* AUX scan */
- =C2=A0 =C2=A00x0040, /* X test */<= br>- =C2=A0 =C2=A00x0020, /* Y test */
- =C2=A0 =C2=A00x0080, /* Short-c= ircuit test */
- =C2=A0 =C2=A00x0000, /* Reserved */
- =C2=A0 =C2=A00= x0000, /* X+, X- drivers */
- =C2=A0 =C2=A00x0000, /* Y+, Y- drivers */<= br>- =C2=A0 =C2=A00x0000, /* Y+, X- drivers */
+ =C2=A0 =C2=A00xf000, /*= X, Y, Z scan */
+ =C2=A0 =C2=A00xc000, /* X, Y scan */
+ =C2=A0 =C2= =A00x8000, /* X */
+ =C2=A0 =C2=A00x4000, /* Y */
+ =C2=A0 =C2=A00x30= 00, /* Z */
+ =C2=A0 =C2=A00x0800, /* AUX */
+ =C2=A0 =C2=A00x0400, /= * TEMP1 */
+ =C2=A0 =C2=A00x0200, /* TEMP2 */
+ =C2=A0 =C2=A00x0800, = /* AUX scan */
+ =C2=A0 =C2=A00x0040, /* X test */
+ =C2=A0 =C2=A00x0= 020, /* Y test */
+ =C2=A0 =C2=A00x0080, /* Short-circuit test */
+ = =C2=A0 =C2=A00x0000, /* Reserved */
+ =C2=A0 =C2=A00x0000, /* X+, X- dri= vers */
+ =C2=A0 =C2=A00x0000, /* Y+, Y- drivers */
+ =C2=A0 =C2=A00x= 0000, /* Y+, X- drivers */
=C2=A0};
=C2=A0
-#define X_TRANSFORM(s)= \
+#define X_TRANSFORM(s) =C2=A0 =C2=A0 =C2=A0\
=C2=A0 =C2=A0 =C2= =A0((s->y * s->tr[0] - s->x * s->tr[1]) / s->tr[2] + s->t= r[3])
-#define Y_TRANSFORM(s) \
+#define Y_TRANSFORM(s) =C2=A0 =C2= =A0 =C2=A0\
=C2=A0 =C2=A0 =C2=A0((s->y * s->tr[4] - s->x * s-&g= t;tr[5]) / s->tr[6] + s->tr[7])
-#define Z1_TRANSFORM(s) \
+#= define Z1_TRANSFORM(s) =C2=A0 =C2=A0 \
=C2=A0 =C2=A0 =C2=A0((400 - ((s)-= >x >> 7) + ((s)->pressure << 10)) << 4)
-#define= Z2_TRANSFORM(s) \
+#define Z2_TRANSFORM(s) =C2=A0 =C2=A0 \
=C2=A0 = =C2=A0 =C2=A0((4000 + ((s)->y >> 7) - ((s)->pressure << 1= 0)) << 4)
=C2=A0
-#define AUX_VAL (700 << 4) /* +/- 3 = at 12-bit */
-#define TEMP1_VAL (1264 << 4) /* +/- 5 at 12-bit *= /
-#define TEMP2_VAL (1531 << 4) /* +/- 5 at 12-bit */
+#defi= ne AUX_VAL =C2=A0 =C2=A0 =C2=A0 (700 << 4) =C2=A0/* +/- 3 at 12-bit *= /
+#define TEMP1_VAL =C2=A0 =C2=A0 (1264 << 4) /* +/- 5 at 12-bit = */
+#define TEMP2_VAL =C2=A0 =C2=A0 (1531 << 4) /* +/- 5 at 12-bit= */
=C2=A0
=C2=A0static uint16_t tsc2005_read(TSC2005State *s, int re= g)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0uint16_t ret;
=C2=A0
=C2=A0 =C2= =A0 =C2=A0switch (reg) {
- =C2=A0 =C2=A0case 0x0: /* X */
+ =C2=A0 = =C2=A0case 0x0: /* X */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dav &= ;=3D ~mode_regs[TSC_MODE_X];
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TS= C_CUT_RESOLUTION(X_TRANSFORM(s), s->precision) +
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & 3);
- =C2= =A0 =C2=A0case 0x1: /* Y */
+ =C2=A0 =C2=A0case 0x1: /* Y */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dav &=3D ~mode_regs[TSC_MODE_Y];
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->noise ++;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= s->noise++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT_RESOLUTI= ON(Y_TRANSFORM(s), s->precision) ^
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & 3);
- =C2=A0 =C2=A0case 0= x2: /* Z1 */
+ =C2=A0 =C2=A0case 0x2: /* Z1 */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->dav &=3D 0xdfff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return TSC_CUT_RESOLUTION(Z1_TRANSFORM(s), s->precision) -
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & 3= );
- =C2=A0 =C2=A0case 0x3: /* Z2 */
+ =C2=A0 =C2=A0case 0x3: /* Z2 *= /
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dav &=3D 0xefff;
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT_RESOLUTION(Z2_TRANSFORM(s), s-&g= t;precision) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(s->noise & 3);
=C2=A0
- =C2=A0 =C2=A0case 0x4: /* AUX *= /
+ =C2=A0 =C2=A0case 0x4: /* AUX */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->dav &=3D ~mode_regs[TSC_MODE_AUX];
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return TSC_CUT_RESOLUTION(AUX_VAL, s->precision);
=C2=A0- =C2=A0 =C2=A0case 0x5: /* TEMP1 */
+ =C2=A0 =C2=A0case 0x5: /* TEMP1 = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dav &=3D ~mode_regs[TSC_M= ODE_TEMP1];
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT_RESOLUTION(= TEMP1_VAL, s->precision) -
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(s->noise & 5);
- =C2=A0 =C2=A0case 0x6: /* T= EMP2 */
+ =C2=A0 =C2=A0case 0x6: /* TEMP2 */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->dav &=3D 0xdfff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s= ->dav &=3D ~mode_regs[TSC_MODE_TEMP2];
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return TSC_CUT_RESOLUTION(TEMP2_VAL, s->precision) ^
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & = 3);
=C2=A0
- =C2=A0 =C2=A0case 0x7: /* Status */
+ =C2=A0 =C2=A0ca= se 0x7: /* Status */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D s->dav= | (s->reset << 7) | (s->pdst << 2) | 0x0;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->dav &=3D ~(mode_regs[TSC_MODE_X_TEST] | m= ode_regs[TSC_MODE_Y_TEST] |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mode_regs[TSC_MODE_TS_TEST]= );
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->reset =3D true;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return ret;
=C2=A0
- =C2=A0 =C2=A0case 0x8: = =C2=A0 /* AUX high threshold */
+ =C2=A0 =C2=A0case 0x8: /* AUX high thr= eshold */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->aux_thr[1];
= - =C2=A0 =C2=A0case 0x9: =C2=A0 /* AUX low threshold */
+ =C2=A0 =C2=A0c= ase 0x9: /* AUX low threshold */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retur= n s->aux_thr[0];
=C2=A0
- =C2=A0 =C2=A0case 0xa: =C2=A0 /* TEMP hi= gh threshold */
+ =C2=A0 =C2=A0case 0xa: /* TEMP high threshold */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->temp_thr[1];
- =C2=A0 =C2= =A0case 0xb: =C2=A0 /* TEMP low threshold */
+ =C2=A0 =C2=A0case 0xb: /*= TEMP low threshold */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->te= mp_thr[0];
=C2=A0
- =C2=A0 =C2=A0case 0xc: /* CFR0 */
+ =C2=A0 =C2= =A0case 0xc: /* CFR0 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (s->= pressure << 15) | ((!s->busy) << 14) |
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->nextprecision << 13) = | s->timing[0];
- =C2=A0 =C2=A0case 0xd: /* CFR1 */
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->nextprecision << = 13) | s->timing[0];
+ =C2=A0 =C2=A0case 0xd: /* CFR1 */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return s->timing[1];
- =C2=A0 =C2=A0case 0xe:= /* CFR2 */
+ =C2=A0 =C2=A0case 0xe: /* CFR2 */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return (s->pin_func << 14) | s->filter;
=C2=A0<= br>- =C2=A0 =C2=A0case 0xf: /* Function select status */
+ =C2=A0 =C2=A0= case 0xf: /* Function select status */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return s->function >=3D 0 ? 1 << s->function : 0;
=C2= =A0 =C2=A0 =C2=A0}
=C2=A0
@@ -200,13 +200,14 @@ static void tsc2005_w= rite(TSC2005State *s, int reg, uint16_t data)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->temp_thr[0] =3D data;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= break;
=C2=A0
- =C2=A0 =C2=A0case 0xc: /* CFR0 */
+ =C2=A0 =C2=A0c= ase 0xc: /* CFR0 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->host_mode = =3D (data >> 15) !=3D 0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-&= gt;enabled !=3D !(data & 0x4000)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->enabled =3D !(data & 0x4000);
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trace_tsc2005_sense(s->enabled ? "= ;enabled" : "disabled");
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (s->busy && !s->enabled)
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->busy && !s->enabled) {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer_del(s-&= gt;timer);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->busy =3D s->busy && s-&= gt;enabled;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->nextprecision =3D (data >> 13) & 1;
@@ -216= ,10 +217,10 @@ static void tsc2005_write(TSC2005State *s, int reg, uint16_t= data)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"tsc2005_write: illegal conversion c= lock setting\n");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case 0xd: /* CFR1 */
+ = =C2=A0 =C2=A0case 0xd: /* CFR1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&g= t;timing[1] =3D data & 0xf07;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0brea= k;
- =C2=A0 =C2=A0case 0xe: /* CFR2 */
+ =C2=A0 =C2=A0case 0xe: /* CF= R2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->pin_func =3D (data >>= ; 14) & 3;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->filter =3D data &= amp; 0x3fff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
@@ -258,10 +259= ,12 @@ static void tsc2005_pin_update(TSC2005State *s)
=C2=A0 =C2=A0 =C2= =A0switch (s->nextfunction) {
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_XYZ_S= CAN:
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_XY_SCAN:
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (!s->host_mode && s->dav)
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (!s->host_mode && s->dav) {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->enabled =3D false;
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (!s->pressure)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!s->pressure) {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Fall through */
=C2=A0 =C2=A0 =C2=A0ca= se TSC_MODE_AUX_SCAN:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
@@ -26= 9,8 +272,9 @@ static void tsc2005_pin_update(TSC2005State *s)
=C2=A0 =C2= =A0 =C2=A0case TSC_MODE_X:
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_Y:
=C2= =A0 =C2=A0 =C2=A0case TSC_MODE_Z:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!s-&g= t;pressure)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!s->pressure) {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Fall through */
=C2= =A0 =C2=A0 =C2=A0case TSC_MODE_AUX:
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_TE= MP1:
@@ -278,8 +282,9 @@ static void tsc2005_pin_update(TSC2005State *s)=
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_X_TEST:
=C2=A0 =C2=A0 =C2=A0case T= SC_MODE_Y_TEST:
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_TS_TEST:
- =C2=A0 = =C2=A0 =C2=A0 =C2=A0if (s->dav)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-&g= t;dav) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->enabled = =3D false;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0break;
=C2=A0
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_RESERVED:
@= @ -290,13 +295,14 @@ static void tsc2005_pin_update(TSC2005State *s)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0- =C2=A0 =C2=A0if (!s->enabled || s->busy)
+ =C2=A0 =C2=A0if (!s= ->enabled || s->busy) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;<= br>+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0s->busy =3D true;=C2=A0 =C2=A0 =C2=A0s->precision =3D s->nextprecision;
=C2=A0 = =C2=A0 =C2=A0s->function =3D s->nextfunction;
- =C2=A0 =C2=A0s->= ;pdst =3D !s->pnd0; /* Synchronised on internal clock */
+ =C2=A0 =C2= =A0s->pdst =3D !s->pnd0; /* Synchronised on internal clock */
=C2= =A0 =C2=A0 =C2=A0expires =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) +
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(NANOSECONDS_PER_SECOND >> 7);
=C2= =A0 =C2=A0 =C2=A0timer_mod(s->timer, expires);
@@ -331,7 +337,7 @@ st= atic uint8_t tsc2005_txrx_word(void *opaque, uint8_t value)
=C2=A0 =C2= =A0 =C2=A0TSC2005State *s =3D opaque;
=C2=A0 =C2=A0 =C2=A0uint32_t ret = =3D 0;
=C2=A0
- =C2=A0 =C2=A0switch (s->state ++) {
+ =C2=A0 = =C2=A0switch (s->state++) {
=C2=A0 =C2=A0 =C2=A0case 0:
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0if (value & 0x80) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0/* Command */
@@ -343,8 +349,9 @@ static uint8_t= tsc2005_txrx_word(void *opaque, uint8_t value)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->enabled !=3D !(value & = 1)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->enabled =3D !(value & 1);
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trace_tsc2005_sense(s-&= gt;enabled ? "enabled" : "disabled");
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->busy &= amp;& !s->enabled)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->busy && !s->enabled) {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0timer_del(s->timer);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->busy =3D s->busy &= amp;& s->enabled;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0tsc2005_pin_update(s);
@@ -368,10 +375,11 @@ static uint8_t ts= c2005_txrx_word(void *opaque, uint8_t value)
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0break;
=C2=A0
=C2=A0 =C2=A0 =C2=A0case 1:
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (s->command)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->c= ommand) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D (s->= ;data >> 8) & 0xff;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0else
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->data |=3D value << 8;
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
=C2=A0 =C2=A0= =C2=A0case 2:
@@ -409,8 +417,9 @@ static void tsc2005_timer_tick(void *= opaque)
=C2=A0
=C2=A0 =C2=A0 =C2=A0/* Timer ticked -- a set of conver= sions has been finished. =C2=A0*/
=C2=A0
- =C2=A0 =C2=A0if (!s->bu= sy)
+ =C2=A0 =C2=A0if (!s->busy) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return;
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0s->busy = =3D false;
=C2=A0 =C2=A0 =C2=A0s->dav |=3D mode_regs[s->function];=
@@ -435,8 +444,9 @@ static void tsc2005_touchscreen_event(void *opaque,=
=C2=A0 =C2=A0 =C2=A0 * signaling TS events immediately, but for now we = simulate
=C2=A0 =C2=A0 =C2=A0 * the first conversion delay for sake of c= orrectness.
=C2=A0 =C2=A0 =C2=A0 */
- =C2=A0 =C2=A0if (p !=3D s->p= ressure)
+ =C2=A0 =C2=A0if (p !=3D s->pressure) {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0tsc2005_pin_update(s);
+ =C2=A0 =C2=A0}
=C2=A0}=C2=A0
=C2=A0static int tsc2005_post_load(void *opaque, int version_id= )
diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c
index c4e32c7a= 42..b94e346af1 100644
--- a/hw/input/tsc210x.c
+++ b/hw/input/tsc210x= .c
@@ -33,13 +33,13 @@
=C2=A0#include "migration/vmstate.h"=
=C2=A0#include "qapi/error.h"
=C2=A0
-#define TSC_DATA_= REGISTERS_PAGE 0x0
-#define TSC_CONTROL_REGISTERS_PAGE 0x1
-#define = TSC_AUDIO_REGISTERS_PAGE 0x2
+#define TSC_DATA_REGISTERS_PAGE =C2=A0 =C2= =A0 0x0
+#define TSC_CONTROL_REGISTERS_PAGE =C2=A00x1
+#define TSC_AU= DIO_REGISTERS_PAGE =C2=A0 =C2=A00x2
=C2=A0
=C2=A0#define TSC_VERBOSE<= br>=C2=A0
-#define TSC_CUT_RESOLUTION(value, p) ((value) >> (16 - = resolution[p]))
+#define TSC_CUT_RESOLUTION(value, p) =C2=A0((value) >= ;> (16 - resolution[p]))
=C2=A0
=C2=A0typedef struct {
=C2=A0 = =C2=A0 =C2=A0qemu_irq pint;
@@ -105,60 +105,60 @@ typedef struct {
= =C2=A0
=C2=A0static const int resolution[4] =3D { 12, 8, 10, 12 };
= =C2=A0
-#define TSC_MODE_NO_SCAN 0x0
-#define TSC_MODE_XY_SCAN 0x1-#define TSC_MODE_XYZ_SCAN 0x2
-#define TSC_MODE_X 0x3
-#define TSC= _MODE_Y 0x4
-#define TSC_MODE_Z 0x5
-#define TSC_MODE_BAT1 0x6
= -#define TSC_MODE_BAT2 0x7
-#define TSC_MODE_AUX 0x8
-#define TSC_M= ODE_AUX_SCAN 0x9
-#define TSC_MODE_TEMP1 0xa
-#define TSC_MODE_PORT_= SCAN 0xb
-#define TSC_MODE_TEMP2 0xc
-#define TSC_MODE_XX_DRV 0xd-#define TSC_MODE_YY_DRV 0xe
-#define TSC_MODE_YX_DRV 0xf
+#defin= e TSC_MODE_NO_SCAN =C2=A0 =C2=A00x0
+#define TSC_MODE_XY_SCAN =C2=A0 =C2= =A00x1
+#define TSC_MODE_XYZ_SCAN =C2=A0 0x2
+#define TSC_MODE_X =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00x3
+#define TSC_MODE_Y =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A00x4
+#define TSC_MODE_Z =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A00x5
+#define TSC_MODE_BAT1 =C2=A0 =C2=A0 =C2=A0 0x6
+#define TSC_M= ODE_BAT2 =C2=A0 =C2=A0 =C2=A0 0x7
+#define TSC_MODE_AUX =C2=A0 =C2=A0 = =C2=A0 =C2=A00x8
+#define TSC_MODE_AUX_SCAN =C2=A0 0x9
+#define TSC_M= ODE_TEMP1 =C2=A0 =C2=A0 =C2=A00xa
+#define TSC_MODE_PORT_SCAN =C2=A00xb<= br>+#define TSC_MODE_TEMP2 =C2=A0 =C2=A0 =C2=A00xc
+#define TSC_MODE_XX_= DRV =C2=A0 =C2=A0 0xd
+#define TSC_MODE_YY_DRV =C2=A0 =C2=A0 0xe
+#de= fine TSC_MODE_YX_DRV =C2=A0 =C2=A0 0xf
=C2=A0
=C2=A0static const uint= 16_t mode_regs[16] =3D {
- =C2=A0 =C2=A00x0000, /* No scan */
- =C2= =A0 =C2=A00x0600, /* X, Y scan */
- =C2=A0 =C2=A00x0780, /* X, Y, Z scan= */
- =C2=A0 =C2=A00x0400, /* X */
- =C2=A0 =C2=A00x0200, /* Y */
= - =C2=A0 =C2=A00x0180, /* Z */
- =C2=A0 =C2=A00x0040, /* BAT1 */
- = =C2=A0 =C2=A00x0030, /* BAT2 */
- =C2=A0 =C2=A00x0010, /* AUX */
- = =C2=A0 =C2=A00x0010, /* AUX scan */
- =C2=A0 =C2=A00x0004, /* TEMP1 */- =C2=A0 =C2=A00x0070, /* Port scan */
- =C2=A0 =C2=A00x0002, /* TEMP2= */
- =C2=A0 =C2=A00x0000, /* X+, X- drivers */
- =C2=A0 =C2=A00x0000= , /* Y+, Y- drivers */
- =C2=A0 =C2=A00x0000, /* Y+, X- drivers */
+ = =C2=A0 =C2=A00x0000, /* No scan */
+ =C2=A0 =C2=A00x0600, /* X, Y scan *= /
+ =C2=A0 =C2=A00x0780, /* X, Y, Z scan */
+ =C2=A0 =C2=A00x0400, /*= X */
+ =C2=A0 =C2=A00x0200, /* Y */
+ =C2=A0 =C2=A00x0180, /* Z */+ =C2=A0 =C2=A00x0040, /* BAT1 */
+ =C2=A0 =C2=A00x0030, /* BAT2 */+ =C2=A0 =C2=A00x0010, /* AUX */
+ =C2=A0 =C2=A00x0010, /* AUX scan */<= br>+ =C2=A0 =C2=A00x0004, /* TEMP1 */
+ =C2=A0 =C2=A00x0070, /* Port sca= n */
+ =C2=A0 =C2=A00x0002, /* TEMP2 */
+ =C2=A0 =C2=A00x0000, /* X+,= X- drivers */
+ =C2=A0 =C2=A00x0000, /* Y+, Y- drivers */
+ =C2=A0 = =C2=A00x0000, /* Y+, X- drivers */
=C2=A0};
=C2=A0
-#define X_TRAN= SFORM(s) \
+#define X_TRANSFORM(s) =C2=A0 =C2=A0 =C2=A0\
=C2=A0 =C2= =A0 =C2=A0((s->y * s->tr[0] - s->x * s->tr[1]) / s->tr[2] + = s->tr[3])
-#define Y_TRANSFORM(s) \
+#define Y_TRANSFORM(s) =C2= =A0 =C2=A0 =C2=A0\
=C2=A0 =C2=A0 =C2=A0((s->y * s->tr[4] - s->x= * s->tr[5]) / s->tr[6] + s->tr[7])
-#define Z1_TRANSFORM(s) = \
+#define Z1_TRANSFORM(s) =C2=A0 =C2=A0 \
=C2=A0 =C2=A0 =C2=A0((400 = - ((s)->x >> 7) + ((s)->pressure << 10)) << 4)
-= #define Z2_TRANSFORM(s) \
+#define Z2_TRANSFORM(s) =C2=A0 =C2=A0 \
= =C2=A0 =C2=A0 =C2=A0((4000 + ((s)->y >> 7) - ((s)->pressure <= ;< 10)) << 4)
=C2=A0
-#define BAT1_VAL 0x8660
-#define = BAT2_VAL 0x0000
-#define AUX1_VAL 0x35c0
-#define AUX2_VAL 0xff= ff
-#define TEMP1_VAL 0x8c70
-#define TEMP2_VAL 0xa5b0
+#defin= e BAT1_VAL =C2=A0 =C2=A0 =C2=A00x8660
+#define BAT2_VAL =C2=A0 =C2=A0 = =C2=A00x0000
+#define AUX1_VAL =C2=A0 =C2=A0 =C2=A00x35c0
+#define AU= X2_VAL =C2=A0 =C2=A0 =C2=A00xffff
+#define TEMP1_VAL =C2=A0 =C2=A0 0x8c7= 0
+#define TEMP2_VAL =C2=A0 =C2=A0 0xa5b0
=C2=A0
-#define TSC_POWE= ROFF_DELAY 50
-#define TSC_SOFTSTEP_DELAY 50
+#define TSC_POWEROFF_= DELAY =C2=A0 =C2=A050
+#define TSC_SOFTSTEP_DELAY =C2=A0 =C2=A050
=C2= =A0
=C2=A0static void tsc210x_reset(TSC210xState *s)
=C2=A0{
@@ -2= 24,34 +224,34 @@ typedef struct {
=C2=A0 =C2=A0 =C2=A0int fsref;
=C2= =A0} TSC210xRateInfo;
=C2=A0
-/* =C2=A0{ rate, =C2=A0 dsor, fsref } *= /
+/* =C2=A0{ rate, =C2=A0 dsor, fsref } */
=C2=A0static const TSC210= xRateInfo tsc2102_rates[] =3D {
=C2=A0 =C2=A0 =C2=A0/* Fsref / 6.0 */- =C2=A0 =C2=A0{ 7350, 63, 1 },
- =C2=A0 =C2=A0{ 8000, 63, 0 },
+ = =C2=A0 =C2=A0{ 7350, 63, 1 },
+ =C2=A0 =C2=A0{ 8000, 63, 0 },
=C2=A0 = =C2=A0 =C2=A0/* Fsref / 6.0 */
- =C2=A0 =C2=A0{ 7350, 54, 1 },
- =C2= =A0 =C2=A0{ 8000, 54, 0 },
+ =C2=A0 =C2=A0{ 7350, 54, 1 },
+ =C2=A0 = =C2=A0{ 8000, 54, 0 },
=C2=A0 =C2=A0 =C2=A0/* Fsref / 5.0 */
- =C2=A0= =C2=A0{ 8820, 45, 1 },
- =C2=A0 =C2=A0{ 9600, 45, 0 },
+ =C2=A0 =C2= =A0{ 8820, 45, 1 },
+ =C2=A0 =C2=A0{ 9600, 45, 0 },
=C2=A0 =C2=A0 =C2= =A0/* Fsref / 4.0 */
- =C2=A0 =C2=A0{ 11025, 36, 1 },
- =C2=A0 =C2=A0= { 12000, 36, 0 },
+ =C2=A0 =C2=A0{ 11025, 36, 1 },
+ =C2=A0 =C2=A0{ 1= 2000, 36, 0 },
=C2=A0 =C2=A0 =C2=A0/* Fsref / 3.0 */
- =C2=A0 =C2=A0{= 14700, 27, 1 },
- =C2=A0 =C2=A0{ 16000, 27, 0 },
+ =C2=A0 =C2=A0{ 14= 700, 27, 1 },
+ =C2=A0 =C2=A0{ 16000, 27, 0 },
=C2=A0 =C2=A0 =C2=A0/*= Fsref / 2.0 */
- =C2=A0 =C2=A0{ 22050, 18, 1 },
- =C2=A0 =C2=A0{ 240= 00, 18, 0 },
+ =C2=A0 =C2=A0{ 22050, 18, 1 },
+ =C2=A0 =C2=A0{ 24000,= 18, 0 },
=C2=A0 =C2=A0 =C2=A0/* Fsref / 1.5 */
- =C2=A0 =C2=A0{ 2940= 0, 9, 1 },
- =C2=A0 =C2=A0{ 32000, 9, 0 },
+ =C2=A0 =C2=A0{ 29400, 9,= 1 },
+ =C2=A0 =C2=A0{ 32000, 9, 0 },
=C2=A0 =C2=A0 =C2=A0/* Fsref */=
- =C2=A0 =C2=A0{ 44100, 0, 1 },
- =C2=A0 =C2=A0{ 48000, 0, 0 },
+= =C2=A0 =C2=A0{ 44100, 0, 1 },
+ =C2=A0 =C2=A0{ 48000, 0, 0 },
=C2=A0=
- =C2=A0 =C2=A0{ 0, 0, 0 },
+ =C2=A0 =C2=A0{ 0, 0, 0 },
=C2=A0};=
=C2=A0
=C2=A0static inline void tsc210x_out_flush(TSC210xState *s, i= nt len)
@@ -259,12 +259,14 @@ static inline void tsc210x_out_flush(TSC21= 0xState *s, int len)
=C2=A0 =C2=A0 =C2=A0uint8_t *data =3D s->codec.o= ut.fifo + s->codec.out.start;
=C2=A0 =C2=A0 =C2=A0uint8_t *end =3D da= ta + len;
=C2=A0
- =C2=A0 =C2=A0while (data < end)
+ =C2=A0 =C2= =A0while (data < end) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0data +=3D A= UD_write(s->dac_voice[0], data, end - data) ?: (end - data);
+ =C2=A0= =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0s->codec.out.len -=3D len;
= - =C2=A0 =C2=A0if (s->codec.out.len)
+ =C2=A0 =C2=A0if (s->codec.o= ut.len) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0memmove(s->codec.out.fifo= , end, s->codec.out.len);
+ =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0s-&= gt;codec.out.start =3D 0;
=C2=A0}
=C2=A0
@@ -285,11 +287,12 @@ sta= tic void tsc2102_audio_rate_update(TSC210xState *s)
=C2=A0
=C2=A0 =C2= =A0 =C2=A0s->codec.tx_rate =3D 0;
=C2=A0 =C2=A0 =C2=A0s->codec.rx_= rate =3D 0;
- =C2=A0 =C2=A0if (s->dac_power & (1 << 15)) = /* PWDNC */
+ =C2=A0 =C2=A0if (s->dac_power & (1 << 15)) {= =C2=A0 =C2=A0 /* PWDNC */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
= + =C2=A0 }
=C2=A0
- =C2=A0 =C2=A0for (rate =3D tsc2102_rates; rate-&g= t;rate; rate ++)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (rate->dsor =3D=3D (= s->audio_ctrl1 & 0x3f) && /* DACFS */
+ =C2=A0 =C2=A0for= (rate =3D tsc2102_rates; rate->rate; rate++)
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0if (rate->dsor =3D=3D (s->audio_ctrl1 & 0x3f) && = =C2=A0 =C2=A0/* DACFS */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rate->fsref =3D=3D ((s->= audio_ctrl3 >> 13) & 1))/* REFFS */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0 =C2=A0 =C2=A0if (!rate->rate) {=
@@ -315,10 +318,11 @@ static void tsc2102_audio_output_update(TSC210xSt= ate *s)
=C2=A0 =C2=A0 =C2=A0s->codec.cts =3D 0;
=C2=A0
=C2=A0 = =C2=A0 =C2=A0enable =3D
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(~s-&= gt;dac_power & (1 << 15)) && /* PWDNC */
- =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(~s->dac_power & (1 << 10));= /* DAPWDN */
- =C2=A0 =C2=A0if (!enable || !s->codec.tx_rate)
+= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(~s->dac_power & (1 <&l= t; 15)) && =C2=A0 =C2=A0 /* PWDNC */
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(~s->dac_power & (1 << 10)); =C2=A0 =C2=A0 = =C2=A0 /* DAPWDN */
+ =C2=A0 =C2=A0if (!enable || !s->codec.tx_rate) = {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0}
=C2= =A0
=C2=A0 =C2=A0 =C2=A0/* Force our own sampling rate even in slave DAC= mode */
=C2=A0 =C2=A0 =C2=A0fmt.endianness =3D 0;
@@ -337,28 +341,28= @@ static void tsc2102_audio_output_update(TSC210xState *s)
=C2=A0stati= c uint16_t tsc2102_data_register_read(TSC210xState *s, int reg)
=C2=A0{<= br>=C2=A0 =C2=A0 =C2=A0switch (reg) {
- =C2=A0 =C2=A0case 0x00: /* X */<= br>+ =C2=A0 =C2=A0case 0x00: =C2=A0/* X */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->dav &=3D 0xfbff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retur= n TSC_CUT_RESOLUTION(X_TRANSFORM(s), s->precision) +
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & 3);
= =C2=A0
- =C2=A0 =C2=A0case 0x01: /* Y */
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->noise ++;
+ =C2=A0 =C2=A0case 0x01: =C2=A0/* Y */
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->noise++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&= gt;dav &=3D 0xfdff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT= _RESOLUTION(Y_TRANSFORM(s), s->precision) ^
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & 3);
=C2=A0
-= =C2=A0 =C2=A0case 0x02: /* Z1 */
+ =C2=A0 =C2=A0case 0x02: =C2=A0/* Z1 = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dav &=3D 0xfeff;
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT_RESOLUTION(Z1_TRANSFORM(s), s= ->precision) -
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(s->noise & 3);
=C2=A0
- =C2=A0 =C2=A0case 0x03: /* = Z2 */
+ =C2=A0 =C2=A0case 0x03: =C2=A0/* Z2 */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->dav &=3D 0xff7f;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return TSC_CUT_RESOLUTION(Z2_TRANSFORM(s), s->precision) |
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & 3= );
=C2=A0
- =C2=A0 =C2=A0case 0x04: /* KPData */
+ =C2=A0 =C2=A0ca= se 0x04: =C2=A0/* KPData */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->= ;model & 0xff00) =3D=3D 0x2300) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0if (s->kb.intr && (s->kb.mode & 2)) {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->kb.intr= =3D 0;
@@ -369,34 +373,34 @@ static uint16_t tsc2102_data_register_read= (TSC210xState *s, int reg)
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r= eturn 0xffff;
=C2=A0
- =C2=A0 =C2=A0case 0x05: /* BAT1 */
+ =C2=A0= =C2=A0case 0x05: =C2=A0/* BAT1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&= gt;dav &=3D 0xffbf;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT= _RESOLUTION(BAT1_VAL, s->precision) +
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & 6);
=C2=A0
- =C2=A0= =C2=A0case 0x06: /* BAT2 */
+ =C2=A0 =C2=A0case 0x06: =C2=A0/* BAT2 */<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dav &=3D 0xffdf;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT_RESOLUTION(BAT2_VAL, s->precis= ion);
=C2=A0
- =C2=A0 =C2=A0case 0x07: /* AUX1 */
+ =C2=A0 =C2=A0c= ase 0x07: =C2=A0/* AUX1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dav &= amp;=3D 0xffef;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT_RESOLUT= ION(AUX1_VAL, s->precision);
=C2=A0
- =C2=A0 =C2=A0case 0x08: /* A= UX2 */
+ =C2=A0 =C2=A0case 0x08: =C2=A0/* AUX2 */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->dav &=3D 0xfff7;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return 0xffff;
=C2=A0
- =C2=A0 =C2=A0case 0x09: /* TEMP1 */
= + =C2=A0 =C2=A0case 0x09: =C2=A0/* TEMP1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->dav &=3D 0xfffb;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retur= n TSC_CUT_RESOLUTION(TEMP1_VAL, s->precision) -
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->noise & 5);
=C2=A0- =C2=A0 =C2=A0case 0x0a: /* TEMP2 */
+ =C2=A0 =C2=A0case 0x0a: =C2=A0= /* TEMP2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dav &=3D 0xfffd;=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TSC_CUT_RESOLUTION(TEMP2_VAL, = s->precision) ^
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(s->noise & 3);
=C2=A0
- =C2=A0 =C2=A0case 0x0b: /* = DAC */
+ =C2=A0 =C2=A0case 0x0b: =C2=A0/* DAC */
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0s->dav &=3D 0xfffe;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return 0xffff;
=C2=A0
@@ -413,11 +417,11 @@ static uint16_t tsc210= 2_control_register_read(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0TSC210xState *s, int reg)
=C2=A0{
=C2=A0 =C2=A0 =C2= =A0switch (reg) {
- =C2=A0 =C2=A0case 0x00: /* TSC ADC */
+ =C2=A0 = =C2=A0case 0x00: =C2=A0/* TSC ADC */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r= eturn (s->pressure << 15) | ((!s->busy) << 14) |
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->nextfunction <= ;< 10) | (s->nextprecision << 8) | s->filter;
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->nextfunction <<= ; 10) | (s->nextprecision << 8) | s->filter;
=C2=A0
- =C2= =A0 =C2=A0case 0x01: /* Status / Keypad Control */
+ =C2=A0 =C2=A0case 0= x01: =C2=A0/* Status / Keypad Control */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0if ((s->model & 0xff00) =3D=3D 0x2100)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return (s->pin_func << 14) | ((!s->e= nabled) << 13) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->host_mode << 12) | ((!!s->dav) &= lt;< 11) | s->dav;
@@ -425,29 +429,32 @@ static uint16_t tsc2102_c= ontrol_register_read(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= turn (s->kb.intr << 15) | ((s->kb.scan || !s->kb.down) <&= lt; 14) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0(s->kb.debounce << 11);
=C2=A0
- =C2=A0 =C2=A0= case 0x02: /* DAC Control */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->mod= el & 0xff00) =3D=3D 0x2300)
+ =C2=A0 =C2=A0case 0x02: =C2=A0/* DAC C= ontrol */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->model & 0xff00) = =3D=3D 0x2300) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return = s->dac_power & 0x8000;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0else
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0goto bad_reg;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
- = =C2=A0 =C2=A0case 0x03: /* Reference */
+ =C2=A0 =C2=A0case 0x03: =C2=A0= /* Reference */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->ref;
= =C2=A0
- =C2=A0 =C2=A0case 0x04: /* Reset */
+ =C2=A0 =C2=A0case 0x04= : =C2=A0/* Reset */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0xffff;
= =C2=A0
- =C2=A0 =C2=A0case 0x05: /* Configuration */
+ =C2=A0 =C2=A0c= ase 0x05: =C2=A0/* Configuration */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= turn s->timing;
=C2=A0
- =C2=A0 =C2=A0case 0x06: /* Secondary conf= iguration */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->model & 0xff00)= =3D=3D 0x2100)
+ =C2=A0 =C2=A0case 0x06: =C2=A0/* Secondary configurati= on */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->model & 0xff00) =3D=3D= 0x2100) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto bad_reg;=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret= urn ((!s->dav) << 15) | ((s->kb.mode & 1) << 14) | s-= >pll[2];
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* Keypad Mask */
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->model & 0xff00) =3D=3D 0x2100)+ =C2=A0 =C2=A0case 0x10: =C2=A0/* Keypad Mask */
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0if ((s->model & 0xff00) =3D=3D 0x2100) {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto bad_reg;
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->kb.mask;
=C2= =A0
=C2=A0 =C2=A0 =C2=A0default:
@@ -466,19 +473,19 @@ static uint16_= t tsc2102_audio_register_read(TSC210xState *s, int reg)
=C2=A0 =C2=A0 = =C2=A0uint16_t val;
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (reg) {
- = =C2=A0 =C2=A0case 0x00: /* Audio Control 1 */
+ =C2=A0 =C2=A0case 0x00: = =C2=A0/* Audio Control 1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s-&= gt;audio_ctrl1;
=C2=A0
=C2=A0 =C2=A0 =C2=A0case 0x01:
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return 0xff00;
=C2=A0
- =C2=A0 =C2=A0case 0x0= 2: /* DAC Volume Control */
+ =C2=A0 =C2=A0case 0x02: =C2=A0/* DAC Volum= e Control */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->volume;
= =C2=A0
=C2=A0 =C2=A0 =C2=A0case 0x03:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return 0x8b00;
=C2=A0
- =C2=A0 =C2=A0case 0x04: /* Audio Control 2= */
+ =C2=A0 =C2=A0case 0x04: =C2=A0/* Audio Control 2 */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0l_ch =3D 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r_= ch =3D 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->softstep &&= ; !(s->dac_power & (1 << 10))) {
@@ -490,46 +497,46 @@ stat= ic uint16_t tsc2102_audio_register_read(TSC210xState *s, int reg)
=C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->audio_ctrl2 | (l_ch <= < 3) | (r_ch << 2);
=C2=A0
- =C2=A0 =C2=A0case 0x05: /* Ster= eo DAC Power Control */
+ =C2=A0 =C2=A0case 0x05: =C2=A0/* Stereo DAC Po= wer Control */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x2aa0 | s->d= ac_power |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(((s->dac_power & (1 << 10)) &&
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(qemu_clock_get_ns(Q= EMU_CLOCK_VIRTUAL) >
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 s->powerdown + TSC_POWEROFF_DELAY)) << 6);=C2=A0
- =C2=A0 =C2=A0case 0x06: /* Audio Control 3 */
+ =C2=A0 =C2= =A0case 0x06: =C2=A0/* Audio Control 3 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0val =3D s->audio_ctrl3 | 0x0001;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->audio_ctrl3 &=3D 0xff3f;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return val;
=C2=A0
- =C2=A0 =C2=A0case 0x07: /* LCH_BASS_BOOST_N0 = */
- =C2=A0 =C2=A0case 0x08: /* LCH_BASS_BOOST_N1 */
- =C2=A0 =C2=A0c= ase 0x09: /* LCH_BASS_BOOST_N2 */
- =C2=A0 =C2=A0case 0x0a: /* LCH_BASS_= BOOST_N3 */
- =C2=A0 =C2=A0case 0x0b: /* LCH_BASS_BOOST_N4 */
- =C2= =A0 =C2=A0case 0x0c: /* LCH_BASS_BOOST_N5 */
- =C2=A0 =C2=A0case 0x0d: /= * LCH_BASS_BOOST_D1 */
- =C2=A0 =C2=A0case 0x0e: /* LCH_BASS_BOOST_D2 */=
- =C2=A0 =C2=A0case 0x0f: /* LCH_BASS_BOOST_D4 */
- =C2=A0 =C2=A0cas= e 0x10: /* LCH_BASS_BOOST_D5 */
- =C2=A0 =C2=A0case 0x11: /* RCH_BASS_BO= OST_N0 */
- =C2=A0 =C2=A0case 0x12: /* RCH_BASS_BOOST_N1 */
- =C2=A0 = =C2=A0case 0x13: /* RCH_BASS_BOOST_N2 */
- =C2=A0 =C2=A0case 0x14: /* RC= H_BASS_BOOST_N3 */
- =C2=A0 =C2=A0case 0x15: /* RCH_BASS_BOOST_N4 */
= - =C2=A0 =C2=A0case 0x16: /* RCH_BASS_BOOST_N5 */
- =C2=A0 =C2=A0case 0x= 17: /* RCH_BASS_BOOST_D1 */
- =C2=A0 =C2=A0case 0x18: /* RCH_BASS_BOOST_= D2 */
- =C2=A0 =C2=A0case 0x19: /* RCH_BASS_BOOST_D4 */
- =C2=A0 =C2= =A0case 0x1a: /* RCH_BASS_BOOST_D5 */
+ =C2=A0 =C2=A0case 0x07: =C2=A0/*= LCH_BASS_BOOST_N0 */
+ =C2=A0 =C2=A0case 0x08: =C2=A0/* LCH_BASS_BOOST_= N1 */
+ =C2=A0 =C2=A0case 0x09: =C2=A0/* LCH_BASS_BOOST_N2 */
+ =C2= =A0 =C2=A0case 0x0a: =C2=A0/* LCH_BASS_BOOST_N3 */
+ =C2=A0 =C2=A0case 0= x0b: =C2=A0/* LCH_BASS_BOOST_N4 */
+ =C2=A0 =C2=A0case 0x0c: =C2=A0/* LC= H_BASS_BOOST_N5 */
+ =C2=A0 =C2=A0case 0x0d: =C2=A0/* LCH_BASS_BOOST_D1 = */
+ =C2=A0 =C2=A0case 0x0e: =C2=A0/* LCH_BASS_BOOST_D2 */
+ =C2=A0 = =C2=A0case 0x0f: =C2=A0/* LCH_BASS_BOOST_D4 */
+ =C2=A0 =C2=A0case 0x10:= =C2=A0/* LCH_BASS_BOOST_D5 */
+ =C2=A0 =C2=A0case 0x11: =C2=A0/* RCH_BA= SS_BOOST_N0 */
+ =C2=A0 =C2=A0case 0x12: =C2=A0/* RCH_BASS_BOOST_N1 */+ =C2=A0 =C2=A0case 0x13: =C2=A0/* RCH_BASS_BOOST_N2 */
+ =C2=A0 =C2= =A0case 0x14: =C2=A0/* RCH_BASS_BOOST_N3 */
+ =C2=A0 =C2=A0case 0x15: = =C2=A0/* RCH_BASS_BOOST_N4 */
+ =C2=A0 =C2=A0case 0x16: =C2=A0/* RCH_BAS= S_BOOST_N5 */
+ =C2=A0 =C2=A0case 0x17: =C2=A0/* RCH_BASS_BOOST_D1 */+ =C2=A0 =C2=A0case 0x18: =C2=A0/* RCH_BASS_BOOST_D2 */
+ =C2=A0 =C2=A0= case 0x19: =C2=A0/* RCH_BASS_BOOST_D4 */
+ =C2=A0 =C2=A0case 0x1a: =C2= =A0/* RCH_BASS_BOOST_D5 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s-&g= t;filter_data[reg - 0x07];
=C2=A0
- =C2=A0 =C2=A0case 0x1b: /* PLL Pr= ogrammability 1 */
+ =C2=A0 =C2=A0case 0x1b: =C2=A0/* PLL Programmabilit= y 1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->pll[0];
=C2=A0<= br>- =C2=A0 =C2=A0case 0x1c: /* PLL Programmability 2 */
+ =C2=A0 =C2=A0= case 0x1c: =C2=A0/* PLL Programmability 2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0return s->pll[1];
=C2=A0
- =C2=A0 =C2=A0case 0x1d: /* Audio= Control 4 */
+ =C2=A0 =C2=A0case 0x1d: =C2=A0/* Audio Control 4 */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (!s->softstep) << 14;
= =C2=A0
=C2=A0 =C2=A0 =C2=A0default:
@@ -545,16 +552,16 @@ static void= tsc2102_data_register_write(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0TSC210xState *s, int reg, uint16_t value)
=C2=A0{=C2=A0 =C2=A0 =C2=A0switch (reg) {
- =C2=A0 =C2=A0case 0x00: /* X */- =C2=A0 =C2=A0case 0x01: /* Y */
- =C2=A0 =C2=A0case 0x02: /* Z1 */- =C2=A0 =C2=A0case 0x03: /* Z2 */
- =C2=A0 =C2=A0case 0x05: /* BAT1 */=
- =C2=A0 =C2=A0case 0x06: /* BAT2 */
- =C2=A0 =C2=A0case 0x07: /* AU= X1 */
- =C2=A0 =C2=A0case 0x08: /* AUX2 */
- =C2=A0 =C2=A0case 0x09: = /* TEMP1 */
- =C2=A0 =C2=A0case 0x0a: /* TEMP2 */
+ =C2=A0 =C2=A0case= 0x00: =C2=A0/* X */
+ =C2=A0 =C2=A0case 0x01: =C2=A0/* Y */
+ =C2=A0= =C2=A0case 0x02: =C2=A0/* Z1 */
+ =C2=A0 =C2=A0case 0x03: =C2=A0/* Z2 *= /
+ =C2=A0 =C2=A0case 0x05: =C2=A0/* BAT1 */
+ =C2=A0 =C2=A0case 0x06= : =C2=A0/* BAT2 */
+ =C2=A0 =C2=A0case 0x07: =C2=A0/* AUX1 */
+ =C2= =A0 =C2=A0case 0x08: =C2=A0/* AUX2 */
+ =C2=A0 =C2=A0case 0x09: =C2=A0/*= TEMP1 */
+ =C2=A0 =C2=A0case 0x0a: =C2=A0/* TEMP2 */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
=C2=A0 =C2=A0 =C2=A0default:
@@= -567,18 +574,19 @@ static void tsc2102_control_register_write(
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TSC210xState *s, int= reg, uint16_t value)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0switch (reg) {
-= =C2=A0 =C2=A0case 0x00: /* TSC ADC */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/= * TSC ADC */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->host_mode =3D value= >> 15;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->enabled =3D !(valu= e & 0x4000);
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->busy && = !s->enabled)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->busy && != s->enabled) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer_d= el(s->timer);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->busy =3D s->busy && s->enabled;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->nextfunction =3D (value >> 10) &= 0xf;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->nextprecision =3D (value &= gt;> 8) & 3;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->filter =3D v= alue & 0xff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
= - =C2=A0 =C2=A0case 0x01: /* Status / Keypad Control */
+ =C2=A0 =C2=A0c= ase 0x01: =C2=A0/* Status / Keypad Control */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if ((s->model & 0xff00) =3D=3D 0x2100)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->pin_func =3D value >> 14;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else {
@@ -591,7 +599,7 @@ static void= tsc2102_control_register_write(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case = 0x02: /* DAC Control */
+ =C2=A0 =C2=A0case 0x02: =C2=A0/* DAC Control *= /
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->model & 0xff00) =3D= =3D 0x2300) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dac_= power &=3D 0x7fff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s= ->dac_power |=3D 0x8000 & value;
@@ -599,14 +607,15 @@ static voi= d tsc2102_control_register_write(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0goto bad_reg;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2= =A0
- =C2=A0 =C2=A0case 0x03: /* Reference */
+ =C2=A0 =C2=A0case 0x0= 3: =C2=A0/* Reference */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->ref =3D= value & 0x1f;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0- =C2=A0 =C2=A0case 0x04: /* Reset */
+ =C2=A0 =C2=A0case 0x04: =C2=A0= /* Reset */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value =3D=3D 0xbb00) {=
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->busy)
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->busy) {
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer_del(s->timer);
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0tsc210x_reset(s);
=C2=A0#ifdef TSC_VERBOSE
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
@@ -616,7 +625,7 @@ static void tsc2= 102_control_register_write(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x0= 5: /* Configuration */
+ =C2=A0 =C2=A0case 0x05: =C2=A0/* Configuration = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->timing =3D value & 0x3f;<= br>=C2=A0#ifdef TSC_VERBOSE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value = & ~0x3f)
@@ -625,16 +634,18 @@ static void tsc2102_control_register_= write(
=C2=A0#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2= =A0
- =C2=A0 =C2=A0case 0x06: /* Secondary configuration */
- =C2=A0 = =C2=A0 =C2=A0 =C2=A0if ((s->model & 0xff00) =3D=3D 0x2100)
+ =C2= =A0 =C2=A0case 0x06: =C2=A0/* Secondary configuration */
+ =C2=A0 =C2=A0= =C2=A0 =C2=A0if ((s->model & 0xff00) =3D=3D 0x2100) {
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto bad_reg;
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->kb.mode =3D value &g= t;> 14;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->pll[2] =3D value &= ; 0x3ffff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2= =A0 =C2=A0case 0x10: /* Keypad Mask */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (= (s->model & 0xff00) =3D=3D 0x2100)
+ =C2=A0 =C2=A0case 0x10: =C2= =A0/* Keypad Mask */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((s->model &= 0xff00) =3D=3D 0x2100) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0goto bad_reg;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->kb.mask =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= return;
=C2=A0
@@ -649,7 +660,7 @@ static void tsc2102_audio_register= _write(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TS= C210xState *s, int reg, uint16_t value)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0s= witch (reg) {
- =C2=A0 =C2=A0case 0x00: /* Audio Control 1 */
+ =C2= =A0 =C2=A0case 0x00: =C2=A0/* Audio Control 1 */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->audio_ctrl1 =3D value & 0x0f3f;
=C2=A0#ifdef TSC_= VERBOSE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((value & ~0x0f3f) || (= (value & 7) !=3D ((value >> 3) & 7)))
@@ -668,7 +679,7 @@ = static void tsc2102_audio_register_write(
=C2=A0#endif
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x02: /* DAC V= olume Control */
+ =C2=A0 =C2=A0case 0x02: =C2=A0/* DAC Volume Control *= /
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->volume =3D value;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->volume_change =3D qemu_clock_get_ns(QEMU_C= LOCK_VIRTUAL);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
@@ -681,7 +6= 92,7 @@ static void tsc2102_audio_register_write(
=C2=A0#endif
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x04: = /* Audio Control 2 */
+ =C2=A0 =C2=A0case 0x04: =C2=A0/* Audio Control 2= */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->audio_ctrl2 =3D value & = 0xf7f2;
=C2=A0#ifdef TSC_VERBOSE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if= (value & ~0xf7fd)
@@ -690,9 +701,10 @@ static void tsc2102_audio_re= gister_write(
=C2=A0#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;<= br>=C2=A0
- =C2=A0 =C2=A0case 0x05: /* Stereo DAC Power Control */
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((value & ~s->dac_power) & (1 <= < 10))
+ =C2=A0 =C2=A0case 0x05: =C2=A0/* Stereo DAC Power Control */=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((value & ~s->dac_power) & (= 1 << 10)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->= powerdown =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dac_power = =3D value & 0x9543;
=C2=A0#ifdef TSC_VERBOSE
@@ -704,7 +716,7 @@ = static void tsc2102_audio_register_write(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0tsc2102_audio_output_update(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= return;
=C2=A0
- =C2=A0 =C2=A0case 0x06: /* Audio Control 3 */
+ = =C2=A0 =C2=A0case 0x06: =C2=A0/* Audio Control 3 */
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0s->audio_ctrl3 &=3D 0x00c0;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->audio_ctrl3 |=3D value & 0xf800;
=C2=A0#ifdef TSC= _VERBOSE
@@ -715,30 +727,30 @@ static void tsc2102_audio_register_write(=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tsc2102_audio_output_update(s);
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case = 0x07: /* LCH_BASS_BOOST_N0 */
- =C2=A0 =C2=A0case 0x08: /* LCH_BASS_BOOS= T_N1 */
- =C2=A0 =C2=A0case 0x09: /* LCH_BASS_BOOST_N2 */
- =C2=A0 = =C2=A0case 0x0a: /* LCH_BASS_BOOST_N3 */
- =C2=A0 =C2=A0case 0x0b: /* LC= H_BASS_BOOST_N4 */
- =C2=A0 =C2=A0case 0x0c: /* LCH_BASS_BOOST_N5 */
= - =C2=A0 =C2=A0case 0x0d: /* LCH_BASS_BOOST_D1 */
- =C2=A0 =C2=A0case 0x= 0e: /* LCH_BASS_BOOST_D2 */
- =C2=A0 =C2=A0case 0x0f: /* LCH_BASS_BOOST_= D4 */
- =C2=A0 =C2=A0case 0x10: /* LCH_BASS_BOOST_D5 */
- =C2=A0 =C2= =A0case 0x11: /* RCH_BASS_BOOST_N0 */
- =C2=A0 =C2=A0case 0x12: /* RCH_B= ASS_BOOST_N1 */
- =C2=A0 =C2=A0case 0x13: /* RCH_BASS_BOOST_N2 */
- = =C2=A0 =C2=A0case 0x14: /* RCH_BASS_BOOST_N3 */
- =C2=A0 =C2=A0case 0x15= : /* RCH_BASS_BOOST_N4 */
- =C2=A0 =C2=A0case 0x16: /* RCH_BASS_BOOST_N5= */
- =C2=A0 =C2=A0case 0x17: /* RCH_BASS_BOOST_D1 */
- =C2=A0 =C2=A0= case 0x18: /* RCH_BASS_BOOST_D2 */
- =C2=A0 =C2=A0case 0x19: /* RCH_BASS= _BOOST_D4 */
- =C2=A0 =C2=A0case 0x1a: /* RCH_BASS_BOOST_D5 */
+ =C2= =A0 =C2=A0case 0x07: =C2=A0/* LCH_BASS_BOOST_N0 */
+ =C2=A0 =C2=A0case 0= x08: =C2=A0/* LCH_BASS_BOOST_N1 */
+ =C2=A0 =C2=A0case 0x09: =C2=A0/* LC= H_BASS_BOOST_N2 */
+ =C2=A0 =C2=A0case 0x0a: =C2=A0/* LCH_BASS_BOOST_N3 = */
+ =C2=A0 =C2=A0case 0x0b: =C2=A0/* LCH_BASS_BOOST_N4 */
+ =C2=A0 = =C2=A0case 0x0c: =C2=A0/* LCH_BASS_BOOST_N5 */
+ =C2=A0 =C2=A0case 0x0d:= =C2=A0/* LCH_BASS_BOOST_D1 */
+ =C2=A0 =C2=A0case 0x0e: =C2=A0/* LCH_BA= SS_BOOST_D2 */
+ =C2=A0 =C2=A0case 0x0f: =C2=A0/* LCH_BASS_BOOST_D4 */+ =C2=A0 =C2=A0case 0x10: =C2=A0/* LCH_BASS_BOOST_D5 */
+ =C2=A0 =C2= =A0case 0x11: =C2=A0/* RCH_BASS_BOOST_N0 */
+ =C2=A0 =C2=A0case 0x12: = =C2=A0/* RCH_BASS_BOOST_N1 */
+ =C2=A0 =C2=A0case 0x13: =C2=A0/* RCH_BAS= S_BOOST_N2 */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* RCH_BASS_BOOST_N3 */+ =C2=A0 =C2=A0case 0x15: =C2=A0/* RCH_BASS_BOOST_N4 */
+ =C2=A0 =C2=A0= case 0x16: =C2=A0/* RCH_BASS_BOOST_N5 */
+ =C2=A0 =C2=A0case 0x17: =C2= =A0/* RCH_BASS_BOOST_D1 */
+ =C2=A0 =C2=A0case 0x18: =C2=A0/* RCH_BASS_B= OOST_D2 */
+ =C2=A0 =C2=A0case 0x19: =C2=A0/* RCH_BASS_BOOST_D4 */
+ = =C2=A0 =C2=A0case 0x1a: =C2=A0/* RCH_BASS_BOOST_D5 */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->filter_data[reg - 0x07] =3D value;
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x1b: /* PLL P= rogrammability 1 */
+ =C2=A0 =C2=A0case 0x1b: =C2=A0/* PLL Programmabili= ty 1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->pll[0] =3D value & 0= xfffc;
=C2=A0#ifdef TSC_VERBOSE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if = (value & ~0xfffc)
@@ -747,7 +759,7 @@ static void tsc2102_audio_regi= ster_write(
=C2=A0#endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;=C2=A0
- =C2=A0 =C2=A0case 0x1c: /* PLL Programmability 2 */
+ =C2= =A0 =C2=A0case 0x1c: =C2=A0/* PLL Programmability 2 */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->pll[1] =3D value & 0xfffc;
=C2=A0#ifdef TSC_V= ERBOSE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & ~0xfffc)
@@ = -756,7 +768,7 @@ static void tsc2102_audio_register_write(
=C2=A0#endif<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0ca= se 0x1d: /* Audio Control 4 */
+ =C2=A0 =C2=A0case 0x1d: =C2=A0/* Audio = Control 4 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->softstep =3D !(valu= e & 0x4000);
=C2=A0#ifdef TSC_VERBOSE
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0if (value & ~0x4000)
@@ -789,8 +801,9 @@ static void tsc210x_= pin_update(TSC210xState *s)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pin_state = =3D s->pressure && !s->dav;
=C2=A0 =C2=A0 =C2=A0}
=C2= =A0
- =C2=A0 =C2=A0if (!s->enabled)
+ =C2=A0 =C2=A0if (!s->enab= led) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pin_state =3D false;
+ =C2= =A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (pin_state !=3D s->irq) = {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->irq =3D pin_state;
@@ -800,= 23 +813,26 @@ static void tsc210x_pin_update(TSC210xState *s)
=C2=A0 =C2= =A0 =C2=A0switch (s->nextfunction) {
=C2=A0 =C2=A0 =C2=A0case TSC_MOD= E_XY_SCAN:
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_XYZ_SCAN:
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0if (!s->pressure)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!= s->pressure) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return= ;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0br= eak;
=C2=A0
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_X:
=C2=A0 =C2=A0 =C2= =A0case TSC_MODE_Y:
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_Z:
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0if (!s->pressure)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!= s->pressure) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return= ;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/*= Fall through */
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_BAT1:
=C2=A0 =C2= =A0 =C2=A0case TSC_MODE_BAT2:
=C2=A0 =C2=A0 =C2=A0case TSC_MODE_AUX:
= =C2=A0 =C2=A0 =C2=A0case TSC_MODE_TEMP1:
=C2=A0 =C2=A0 =C2=A0case TSC_MO= DE_TEMP2:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->dav)
+ =C2=A0 =C2=A0= =C2=A0 =C2=A0if (s->dav) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0s->enabled =3D false;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
=C2=A0 =C2=A0 =C2=A0case TS= C_MODE_AUX_SCAN:
@@ -831,8 +847,9 @@ static void tsc210x_pin_update(TSC2= 10xState *s)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0 =C2=A0 = =C2=A0}
=C2=A0
- =C2=A0 =C2=A0if (!s->enabled || s->busy || s-&= gt;dav)
+ =C2=A0 =C2=A0if (!s->enabled || s->busy || s->dav) {<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0}
=C2=A0<= br>=C2=A0 =C2=A0 =C2=A0s->busy =3D true;
=C2=A0 =C2=A0 =C2=A0s->pr= ecision =3D s->nextprecision;
@@ -846,14 +863,16 @@ static uint16_t t= sc210x_read(TSC210xState *s)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0uint16_t ret= =3D 0x0000;
=C2=A0
- =C2=A0 =C2=A0if (!s->command)
+ =C2=A0 = =C2=A0if (!s->command) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(st= derr, "tsc210x_read: SPI underrun!\n");
+ =C2=A0 =C2=A0}
= =C2=A0
=C2=A0 =C2=A0 =C2=A0switch (s->page) {
=C2=A0 =C2=A0 =C2=A0= case TSC_DATA_REGISTERS_PAGE:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D = tsc2102_data_register_read(s, s->offset);
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0if (!s->dav)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!s->dav) {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_raise(s->davint);<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0brea= k;
=C2=A0 =C2=A0 =C2=A0case TSC_CONTROL_REGISTERS_PAGE:
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0ret =3D tsc2102_control_register_read(s, s->offset)= ;
@@ -868,7 +887,7 @@ static uint16_t tsc210x_read(TSC210xState *s)
= =C2=A0 =C2=A0 =C2=A0tsc210x_pin_update(s);
=C2=A0
=C2=A0 =C2=A0 =C2= =A0/* Allow sequential reads. =C2=A0*/
- =C2=A0 =C2=A0s->offset ++;+ =C2=A0 =C2=A0s->offset++;
=C2=A0 =C2=A0 =C2=A0s->state =3D fal= se;
=C2=A0 =C2=A0 =C2=A0return ret;
=C2=A0}
@@ -921,10 +940,12 @@ = uint32_t tsc210x_txrx(void *opaque, uint32_t value, int len)
=C2=A0 =C2= =A0 =C2=A0/* TODO: sequential reads etc - how do we make sure the host does= n't
=C2=A0 =C2=A0 =C2=A0 * unintentionally read out a conversion res= ult from a register while
=C2=A0 =C2=A0 =C2=A0 * transmitting the comman= d word of the next command? =C2=A0*/
- =C2=A0 =C2=A0if (!value || (s->= ;state && s->command))
+ =C2=A0 =C2=A0if (!value || (s->st= ate && s->command)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret = =3D tsc210x_read(s);
- =C2=A0 =C2=A0if (value || (s->state &&= !s->command))
+ =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0if (value || (s->= ;state && !s->command)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0t= sc210x_write(s, value);
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2= =A0return ret;
=C2=A0}
@@ -935,8 +956,9 @@ static void tsc210x_timer_= tick(void *opaque)
=C2=A0
=C2=A0 =C2=A0 =C2=A0/* Timer ticked -- a se= t of conversions has been finished. =C2=A0*/
=C2=A0
- =C2=A0 =C2=A0if= (!s->busy)
+ =C2=A0 =C2=A0if (!s->busy) {
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0= s->busy =3D false;
=C2=A0 =C2=A0 =C2=A0s->dav |=3D mode_regs[s->= ;function];
@@ -961,16 +983,18 @@ static void tsc210x_touchscreen_event(= void *opaque,
=C2=A0 =C2=A0 =C2=A0 * signaling TS events immediately, bu= t for now we simulate
=C2=A0 =C2=A0 =C2=A0 * the first conversion delay = for sake of correctness.
=C2=A0 =C2=A0 =C2=A0 */
- =C2=A0 =C2=A0if (p= !=3D s->pressure)
+ =C2=A0 =C2=A0if (p !=3D s->pressure) {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tsc210x_pin_update(s);
+ =C2=A0 =C2=A0}=C2=A0}
=C2=A0
=C2=A0static void tsc210x_i2s_swallow(TSC210xState *= s)
=C2=A0{
- =C2=A0 =C2=A0if (s->dac_voice[0])
+ =C2=A0 =C2=A0i= f (s->dac_voice[0]) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tsc210x_out_f= lush(s, s->codec.out.len);
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} el= se {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->codec.out.len =3D 0;
+ = =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0static void tsc210x_i2s_set_ra= te(TSC210xState *s, int in, int out)
@@ -1163,32 +1187,6 @@ I2SCodec *ts= c210x_codec(uWireSlave *chip)
=C2=A0void tsc210x_set_transform(uWireSlav= e *chip, const MouseTransformInfo *info)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0= TSC210xState *s =3D (TSC210xState *) chip->opaque;
-#if 0
- =C2=A0= =C2=A0int64_t ltr[8];
-
- =C2=A0 =C2=A0ltr[0] =3D (int64_t) info->= ;a[1] * info->y;
- =C2=A0 =C2=A0ltr[1] =3D (int64_t) info->a[4] * = info->x;
- =C2=A0 =C2=A0ltr[2] =3D (int64_t) info->a[1] * info->= ;a[3] -
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(int64_t) info->a[= 4] * info->a[0];
- =C2=A0 =C2=A0ltr[3] =3D (int64_t) info->a[2] * = info->a[4] -
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(int64_t) inf= o->a[5] * info->a[1];
- =C2=A0 =C2=A0ltr[4] =3D (int64_t) info->= ;a[0] * info->y;
- =C2=A0 =C2=A0ltr[5] =3D (int64_t) info->a[3] * = info->x;
- =C2=A0 =C2=A0ltr[6] =3D (int64_t) info->a[4] * info->= ;a[0] -
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(int64_t) info->a[= 1] * info->a[3];
- =C2=A0 =C2=A0ltr[7] =3D (int64_t) info->a[2] * = info->a[3] -
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(int64_t) inf= o->a[5] * info->a[0];
-
- =C2=A0 =C2=A0/* Avoid integer overflo= w */
- =C2=A0 =C2=A0s->tr[0] =3D ltr[0] >> 11;
- =C2=A0 =C2= =A0s->tr[1] =3D ltr[1] >> 11;
- =C2=A0 =C2=A0s->tr[2] =3D mu= ldiv64(ltr[2], 1, info->a[6]);
- =C2=A0 =C2=A0s->tr[3] =3D muldiv6= 4(ltr[3], 1 << 4, ltr[2]);
- =C2=A0 =C2=A0s->tr[4] =3D ltr[4] &= gt;> 11;
- =C2=A0 =C2=A0s->tr[5] =3D ltr[5] >> 11;
- =C2= =A0 =C2=A0s->tr[6] =3D muldiv64(ltr[6], 1, info->a[6]);
- =C2=A0 = =C2=A0s->tr[7] =3D muldiv64(ltr[7], 1 << 4, ltr[6]);
-#else
= =C2=A0
=C2=A0 =C2=A0 =C2=A0/* This version assumes touchscreen X & Y= axis are parallel or
=C2=A0 =C2=A0 =C2=A0 * perpendicular to LCD's = =C2=A0X & Y axis in some way. =C2=A0*/
@@ -1218,17 +1216,17 @@ void = tsc210x_set_transform(uWireSlave *chip, const MouseTransformInfo *info)
= =C2=A0 =C2=A0 =C2=A0s->tr[4] >>=3D 11;
=C2=A0 =C2=A0 =C2=A0s-&g= t;tr[5] >>=3D 11;
=C2=A0 =C2=A0 =C2=A0s->tr[7] <<=3D 4;-#endif
=C2=A0}
=C2=A0
=C2=A0void tsc210x_key_event(uWireSlave *= chip, int key, int down)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0TSC210xState *s = =3D (TSC210xState *) chip->opaque;
=C2=A0
- =C2=A0 =C2=A0if (down)=
+ =C2=A0 =C2=A0if (down) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->k= b.down |=3D 1 << key;
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} else= {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->kb.down &=3D ~(1 <<= key);
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (down &&= amp; (s->kb.down & ~s->kb.mask) && !s->kb.intr) {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->kb.intr =3D 1;
diff --git a/hw/i= ntc/omap_intc.c b/hw/intc/omap_intc.c
index 435c47600f..4a5b413d0a 10064= 4
--- a/hw/intc/omap_intc.c
+++ b/hw/intc/omap_intc.c
@@ -104,8 +1= 04,8 @@ static inline void omap_inth_update(OMAPIntcState *s, int is_fiq)=C2=A0 =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
-#define INT_FALLING_EDGE 0=
-#define INT_LOW_LEVEL 1
+#define INT_FALLING_EDGE =C2=A0 =C2=A0 = =C2=A0 =C2=A00
+#define INT_LOW_LEVEL =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 1
=C2=A0
=C2=A0static void omap_set_intr(void *opaque, int irq, int = req)
=C2=A0{
@@ -117,9 +117,9 @@ static void omap_set_intr(void *opaq= ue, int irq, int req)
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (req) {
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0rise =3D ~bank->irqs & (1 << n);- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (~bank->sens_edge & (1 << n)= )
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (~bank->sens_edge & (1 <<= n)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rise &=3D ~ba= nk->inputs;
-
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0bank->inputs |=3D (1 << n);
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0if (rise) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0bank->irqs |=3D rise;
@@ -164,66 +164,69 @@ static uint64_t oma= p_inth_read(void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2=A0offset &= =3D 0xff;
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (offset) {
- =C2=A0 = =C2=A0case 0x00: /* ITR */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* ITR */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return bank->irqs;
=C2=A0
- =C2= =A0 =C2=A0case 0x04: /* MIR */
+ =C2=A0 =C2=A0case 0x04: =C2=A0/* MIR */=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return bank->mask;
=C2=A0
- = =C2=A0 =C2=A0case 0x10: /* SIR_IRQ_CODE */
+ =C2=A0 =C2=A0case 0x10: =C2= =A0/* SIR_IRQ_CODE */
=C2=A0 =C2=A0 =C2=A0case 0x14: =C2=A0/* SIR_FIQ_CO= DE */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (bank_no !=3D 0)
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0if (bank_no !=3D 0) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0break;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0line_no =3D s->sir_intr[(offset - 0x10) >> 2];=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank =3D &s->bank[line_no >= > 5];
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0i =3D line_no & 31;
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (((bank->sens_edge >> i) & 1) = =3D=3D INT_FALLING_EDGE)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (((bank->sen= s_edge >> i) & 1) =3D=3D INT_FALLING_EDGE) {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank->irqs &=3D ~(1 << i);
+= =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return l= ine_no;
=C2=A0
- =C2=A0 =C2=A0case 0x18: /* CONTROL_REG */
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0if (bank_no !=3D 0)
+ =C2=A0 =C2=A0case 0x18: = =C2=A0/* CONTROL_REG */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (bank_no !=3D 0)= {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0;
=C2= =A0
- =C2=A0 =C2=A0case 0x1c: /* ILR0 */
- =C2=A0 =C2=A0case 0x20: /*= ILR1 */
- =C2=A0 =C2=A0case 0x24: /* ILR2 */
- =C2=A0 =C2=A0case 0x2= 8: /* ILR3 */
- =C2=A0 =C2=A0case 0x2c: /* ILR4 */
- =C2=A0 =C2=A0cas= e 0x30: /* ILR5 */
- =C2=A0 =C2=A0case 0x34: /* ILR6 */
- =C2=A0 =C2= =A0case 0x38: /* ILR7 */
- =C2=A0 =C2=A0case 0x3c: /* ILR8 */
- =C2= =A0 =C2=A0case 0x40: /* ILR9 */
- =C2=A0 =C2=A0case 0x44: /* ILR10 */- =C2=A0 =C2=A0case 0x48: /* ILR11 */
- =C2=A0 =C2=A0case 0x4c: /* ILR1= 2 */
- =C2=A0 =C2=A0case 0x50: /* ILR13 */
- =C2=A0 =C2=A0case 0x54: = /* ILR14 */
- =C2=A0 =C2=A0case 0x58: /* ILR15 */
- =C2=A0 =C2=A0case= 0x5c: /* ILR16 */
- =C2=A0 =C2=A0case 0x60: /* ILR17 */
- =C2=A0 =C2= =A0case 0x64: /* ILR18 */
- =C2=A0 =C2=A0case 0x68: /* ILR19 */
- =C2= =A0 =C2=A0case 0x6c: /* ILR20 */
- =C2=A0 =C2=A0case 0x70: /* ILR21 */- =C2=A0 =C2=A0case 0x74: /* ILR22 */
- =C2=A0 =C2=A0case 0x78: /* ILR= 23 */
- =C2=A0 =C2=A0case 0x7c: /* ILR24 */
- =C2=A0 =C2=A0case 0x80:= /* ILR25 */
- =C2=A0 =C2=A0case 0x84: /* ILR26 */
- =C2=A0 =C2=A0cas= e 0x88: /* ILR27 */
- =C2=A0 =C2=A0case 0x8c: /* ILR28 */
- =C2=A0 = =C2=A0case 0x90: /* ILR29 */
- =C2=A0 =C2=A0case 0x94: /* ILR30 */
- = =C2=A0 =C2=A0case 0x98: /* ILR31 */
+ =C2=A0 =C2=A0case 0x1c: =C2=A0/* I= LR0 */
+ =C2=A0 =C2=A0case 0x20: =C2=A0/* ILR1 */
+ =C2=A0 =C2=A0case= 0x24: =C2=A0/* ILR2 */
+ =C2=A0 =C2=A0case 0x28: =C2=A0/* ILR3 */
+ = =C2=A0 =C2=A0case 0x2c: =C2=A0/* ILR4 */
+ =C2=A0 =C2=A0case 0x30: =C2= =A0/* ILR5 */
+ =C2=A0 =C2=A0case 0x34: =C2=A0/* ILR6 */
+ =C2=A0 =C2= =A0case 0x38: =C2=A0/* ILR7 */
+ =C2=A0 =C2=A0case 0x3c: =C2=A0/* ILR8 *= /
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* ILR9 */
+ =C2=A0 =C2=A0case 0x44= : =C2=A0/* ILR10 */
+ =C2=A0 =C2=A0case 0x48: =C2=A0/* ILR11 */
+ =C2= =A0 =C2=A0case 0x4c: =C2=A0/* ILR12 */
+ =C2=A0 =C2=A0case 0x50: =C2=A0/= * ILR13 */
+ =C2=A0 =C2=A0case 0x54: =C2=A0/* ILR14 */
+ =C2=A0 =C2= =A0case 0x58: =C2=A0/* ILR15 */
+ =C2=A0 =C2=A0case 0x5c: =C2=A0/* ILR16= */
+ =C2=A0 =C2=A0case 0x60: =C2=A0/* ILR17 */
+ =C2=A0 =C2=A0case 0= x64: =C2=A0/* ILR18 */
+ =C2=A0 =C2=A0case 0x68: =C2=A0/* ILR19 */
+ = =C2=A0 =C2=A0case 0x6c: =C2=A0/* ILR20 */
+ =C2=A0 =C2=A0case 0x70: =C2= =A0/* ILR21 */
+ =C2=A0 =C2=A0case 0x74: =C2=A0/* ILR22 */
+ =C2=A0 = =C2=A0case 0x78: =C2=A0/* ILR23 */
+ =C2=A0 =C2=A0case 0x7c: =C2=A0/* IL= R24 */
+ =C2=A0 =C2=A0case 0x80: =C2=A0/* ILR25 */
+ =C2=A0 =C2=A0cas= e 0x84: =C2=A0/* ILR26 */
+ =C2=A0 =C2=A0case 0x88: =C2=A0/* ILR27 */+ =C2=A0 =C2=A0case 0x8c: =C2=A0/* ILR28 */
+ =C2=A0 =C2=A0case 0x90: = =C2=A0/* ILR29 */
+ =C2=A0 =C2=A0case 0x94: =C2=A0/* ILR30 */
+ =C2= =A0 =C2=A0case 0x98: =C2=A0/* ILR31 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0i =3D (offset - 0x1c) >> 2;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r= eturn (bank->priority[i] << 2) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(((bank->sens_edge >> i) & 1= ) << 1) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0((bank->fiq >> i) & 1);
=C2=A0
- =C2=A0 =C2=A0case= 0x9c: /* ISR */
+ =C2=A0 =C2=A0case 0x9c: =C2=A0/* ISR */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return 0x00000000;
=C2=A0
=C2=A0 =C2=A0 =C2= =A0}
@@ -241,26 +244,27 @@ static void omap_inth_write(void *opaque, hwa= ddr addr,
=C2=A0 =C2=A0 =C2=A0offset &=3D 0xff;
=C2=A0
=C2=A0 = =C2=A0 =C2=A0switch (offset) {
- =C2=A0 =C2=A0case 0x00: /* ITR */
+ = =C2=A0 =C2=A0case 0x00: =C2=A0/* ITR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0/* Important: ignore the clearing if the IRQ is level-triggered and
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 the input bit is 1 */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0bank->irqs &=3D value | (bank->inputs = & bank->sens_edge);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
= =C2=A0
- =C2=A0 =C2=A0case 0x04: /* MIR */
+ =C2=A0 =C2=A0case 0x04: = =C2=A0/* MIR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank->mask =3D valu= e;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_inth_update(s, 0);
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_inth_update(s, 1);
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* SIR_IRQ_CODE= */
- =C2=A0 =C2=A0case 0x14: /* SIR_FIQ_CODE */
+ =C2=A0 =C2=A0case = 0x10: =C2=A0/* SIR_IRQ_CODE */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* SIR_FI= Q_CODE */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OMAP_RO_REG(addr);
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x18: /= * CONTROL_REG */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (bank_no !=3D 0)
+ = =C2=A0 =C2=A0case 0x18: =C2=A0/* CONTROL_REG */
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0if (bank_no !=3D 0) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0break;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (value & 2) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0qemu_set_irq(s->parent_intr[1], 0);
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->new_agr[1] =3D ~0;
@@ -273,38 +277,38 @@ s= tatic void omap_inth_write(void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0- =C2=A0 =C2=A0case 0x1c: /* ILR0 */
- =C2=A0 =C2=A0case 0x20: /* ILR1= */
- =C2=A0 =C2=A0case 0x24: /* ILR2 */
- =C2=A0 =C2=A0case 0x28: /*= ILR3 */
- =C2=A0 =C2=A0case 0x2c: /* ILR4 */
- =C2=A0 =C2=A0case 0x3= 0: /* ILR5 */
- =C2=A0 =C2=A0case 0x34: /* ILR6 */
- =C2=A0 =C2=A0cas= e 0x38: /* ILR7 */
- =C2=A0 =C2=A0case 0x3c: /* ILR8 */
- =C2=A0 =C2= =A0case 0x40: /* ILR9 */
- =C2=A0 =C2=A0case 0x44: /* ILR10 */
- =C2= =A0 =C2=A0case 0x48: /* ILR11 */
- =C2=A0 =C2=A0case 0x4c: /* ILR12 */- =C2=A0 =C2=A0case 0x50: /* ILR13 */
- =C2=A0 =C2=A0case 0x54: /* ILR= 14 */
- =C2=A0 =C2=A0case 0x58: /* ILR15 */
- =C2=A0 =C2=A0case 0x5c:= /* ILR16 */
- =C2=A0 =C2=A0case 0x60: /* ILR17 */
- =C2=A0 =C2=A0cas= e 0x64: /* ILR18 */
- =C2=A0 =C2=A0case 0x68: /* ILR19 */
- =C2=A0 = =C2=A0case 0x6c: /* ILR20 */
- =C2=A0 =C2=A0case 0x70: /* ILR21 */
- = =C2=A0 =C2=A0case 0x74: /* ILR22 */
- =C2=A0 =C2=A0case 0x78: /* ILR23 *= /
- =C2=A0 =C2=A0case 0x7c: /* ILR24 */
- =C2=A0 =C2=A0case 0x80: /* = ILR25 */
- =C2=A0 =C2=A0case 0x84: /* ILR26 */
- =C2=A0 =C2=A0case 0x= 88: /* ILR27 */
- =C2=A0 =C2=A0case 0x8c: /* ILR28 */
- =C2=A0 =C2=A0= case 0x90: /* ILR29 */
- =C2=A0 =C2=A0case 0x94: /* ILR30 */
- =C2=A0= =C2=A0case 0x98: /* ILR31 */
+ =C2=A0 =C2=A0case 0x1c: =C2=A0/* ILR0 */=
+ =C2=A0 =C2=A0case 0x20: =C2=A0/* ILR1 */
+ =C2=A0 =C2=A0case 0x24:= =C2=A0/* ILR2 */
+ =C2=A0 =C2=A0case 0x28: =C2=A0/* ILR3 */
+ =C2=A0= =C2=A0case 0x2c: =C2=A0/* ILR4 */
+ =C2=A0 =C2=A0case 0x30: =C2=A0/* IL= R5 */
+ =C2=A0 =C2=A0case 0x34: =C2=A0/* ILR6 */
+ =C2=A0 =C2=A0case = 0x38: =C2=A0/* ILR7 */
+ =C2=A0 =C2=A0case 0x3c: =C2=A0/* ILR8 */
+ = =C2=A0 =C2=A0case 0x40: =C2=A0/* ILR9 */
+ =C2=A0 =C2=A0case 0x44: =C2= =A0/* ILR10 */
+ =C2=A0 =C2=A0case 0x48: =C2=A0/* ILR11 */
+ =C2=A0 = =C2=A0case 0x4c: =C2=A0/* ILR12 */
+ =C2=A0 =C2=A0case 0x50: =C2=A0/* IL= R13 */
+ =C2=A0 =C2=A0case 0x54: =C2=A0/* ILR14 */
+ =C2=A0 =C2=A0cas= e 0x58: =C2=A0/* ILR15 */
+ =C2=A0 =C2=A0case 0x5c: =C2=A0/* ILR16 */+ =C2=A0 =C2=A0case 0x60: =C2=A0/* ILR17 */
+ =C2=A0 =C2=A0case 0x64: = =C2=A0/* ILR18 */
+ =C2=A0 =C2=A0case 0x68: =C2=A0/* ILR19 */
+ =C2= =A0 =C2=A0case 0x6c: =C2=A0/* ILR20 */
+ =C2=A0 =C2=A0case 0x70: =C2=A0/= * ILR21 */
+ =C2=A0 =C2=A0case 0x74: =C2=A0/* ILR22 */
+ =C2=A0 =C2= =A0case 0x78: =C2=A0/* ILR23 */
+ =C2=A0 =C2=A0case 0x7c: =C2=A0/* ILR24= */
+ =C2=A0 =C2=A0case 0x80: =C2=A0/* ILR25 */
+ =C2=A0 =C2=A0case 0= x84: =C2=A0/* ILR26 */
+ =C2=A0 =C2=A0case 0x88: =C2=A0/* ILR27 */
+ = =C2=A0 =C2=A0case 0x8c: =C2=A0/* ILR28 */
+ =C2=A0 =C2=A0case 0x90: =C2= =A0/* ILR29 */
+ =C2=A0 =C2=A0case 0x94: =C2=A0/* ILR30 */
+ =C2=A0 = =C2=A0case 0x98: =C2=A0/* ILR31 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0i = =3D (offset - 0x1c) >> 2;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank-&= gt;priority[i] =3D (value >> 2) & 0x1f;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0bank->sens_edge &=3D ~(1 << i);
@@ -313,8 +317= ,8 @@ static void omap_inth_write(void *opaque, hwaddr addr,
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0bank->fiq |=3D (value & 1) << i;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case = 0x9c: /* ISR */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < 32; i = ++)
+ =C2=A0 =C2=A0case 0x9c: =C2=A0/* ISR */
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0for (i =3D 0; i < 32; i++)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (value & (1 << i)) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_set_intr(s, 32 * bank_no + i, 1)= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;<= br>@@ -339,7 +343,7 @@ static void omap_inth_reset(DeviceState *dev)
=C2= =A0 =C2=A0 =C2=A0OMAPIntcState *s =3D OMAP_INTC(dev);
=C2=A0 =C2=A0 =C2= =A0int i;
=C2=A0
- =C2=A0 =C2=A0for (i =3D 0; i < s->nbanks; ++= i){
+ =C2=A0 =C2=A0for (i =3D 0; i < s->nbanks; ++i) {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->bank[i].irqs =3D 0x00000000;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->bank[i].mask =3D 0xffffffff;
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0s->bank[i].sens_edge =3D 0x00000000;
@@ -348,8 += 352,9 @@ static void omap_inth_reset(DeviceState *dev)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->bank[i].swi =3D 0x00000000;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0memset(s->bank[i].priority, 0, sizeof(s->bank[i].priorit= y));
=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->level_only)
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->level_only) {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->bank[i].sens_edge =3D 0xffffffff;
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2= =A0 =C2=A0s->new_agr[0] =3D ~0;
@@ -440,58 +445,59 @@ static uint64_t= omap2_inth_read(void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2=A0}
=C2= =A0
=C2=A0 =C2=A0 =C2=A0switch (offset) {
- =C2=A0 =C2=A0case 0x00: /= * INTC_REVISION */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* INTC_REVISION */=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->revision;
=C2=A0
- = =C2=A0 =C2=A0case 0x10: /* INTC_SYSCONFIG */
+ =C2=A0 =C2=A0case 0x10: = =C2=A0/* INTC_SYSCONFIG */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (s-&= gt;autoidle >> 2) & 1;
=C2=A0
- =C2=A0 =C2=A0case 0x14: /* = INTC_SYSSTATUS */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0return 1; /* RESETDO= NE */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* INTC_SYSSTATUS */
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0return 1; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* RESETDONE */
=C2=A0
- = =C2=A0 =C2=A0case 0x40: /* INTC_SIR_IRQ */
+ =C2=A0 =C2=A0case 0x40: =C2= =A0/* INTC_SIR_IRQ */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->sir= _intr[0];
=C2=A0
- =C2=A0 =C2=A0case 0x44: /* INTC_SIR_FIQ */
+ = =C2=A0 =C2=A0case 0x44: =C2=A0/* INTC_SIR_FIQ */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return s->sir_intr[1];
=C2=A0
- =C2=A0 =C2=A0case 0x4= 8: /* INTC_CONTROL */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0return (!s->mask) = << 2; /* GLOBALMASK */
+ =C2=A0 =C2=A0case 0x48: =C2=A0/* INTC= _CONTROL */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0return (!s->mask) << 2= ; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* GLOBALMASK */
=C2=A0
- =C2= =A0 =C2=A0case 0x4c: /* INTC_PROTECTION */
+ =C2=A0 =C2=A0case 0x4c: =C2= =A0/* INTC_PROTECTION */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0;
= =C2=A0
- =C2=A0 =C2=A0case 0x50: /* INTC_IDLE */
+ =C2=A0 =C2=A0case = 0x50: =C2=A0/* INTC_IDLE */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s-&= gt;autoidle & 3;
=C2=A0
=C2=A0 =C2=A0 =C2=A0/* Per-bank registers= */
- =C2=A0 =C2=A0case 0x80: /* INTC_ITR */
+ =C2=A0 =C2=A0case 0x80= : =C2=A0/* INTC_ITR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return bank->= ;inputs;
=C2=A0
- =C2=A0 =C2=A0case 0x84: /* INTC_MIR */
+ =C2=A0 = =C2=A0case 0x84: =C2=A0/* INTC_MIR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= return bank->mask;
=C2=A0
- =C2=A0 =C2=A0case 0x88: /* INTC_MIR_CL= EAR */
- =C2=A0 =C2=A0case 0x8c: /* INTC_MIR_SET */
+ =C2=A0 =C2=A0ca= se 0x88: =C2=A0/* INTC_MIR_CLEAR */
+ =C2=A0 =C2=A0case 0x8c: =C2=A0/* I= NTC_MIR_SET */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0;
=C2=A0
= - =C2=A0 =C2=A0case 0x90: /* INTC_ISR_SET */
+ =C2=A0 =C2=A0case 0x90: = =C2=A0/* INTC_ISR_SET */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return bank-&= gt;swi;
=C2=A0
- =C2=A0 =C2=A0case 0x94: /* INTC_ISR_CLEAR */
+ = =C2=A0 =C2=A0case 0x94: =C2=A0/* INTC_ISR_CLEAR */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return 0;
=C2=A0
- =C2=A0 =C2=A0case 0x98: /* INTC_PENDI= NG_IRQ */
+ =C2=A0 =C2=A0case 0x98: =C2=A0/* INTC_PENDING_IRQ */
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return bank->irqs & ~bank->mask &a= mp; ~bank->fiq;
=C2=A0
- =C2=A0 =C2=A0case 0x9c: /* INTC_PENDING_F= IQ */
+ =C2=A0 =C2=A0case 0x9c: =C2=A0/* INTC_PENDING_FIQ */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return bank->irqs & ~bank->mask & = bank->fiq;
=C2=A0
=C2=A0 =C2=A0 =C2=A0/* Per-line registers */
= - =C2=A0 =C2=A0case 0x100 ... 0x300: /* INTC_ILR */
+ =C2=A0 =C2=A0case = 0x100 ... 0x300: =C2=A0 =C2=A0 =C2=A0 /* INTC_ILR */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0bank_no =3D (offset - 0x100) >> 7;
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0if (bank_no > s->nbanks)
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0if (bank_no > s->nbanks) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0break;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0bank =3D &s->bank[bank_no];
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0line_no =3D (offset & 0x7f) >> 2;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return (bank->priority[line_no] << 2) |@@ -521,7 +527,7 @@ static void omap2_inth_write(void *opaque, hwaddr addr= ,
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (offset)= {
- =C2=A0 =C2=A0case 0x10: /* INTC_SYSCONFIG */
+ =C2=A0 =C2=A0case= 0x10: =C2=A0/* INTC_SYSCONFIG */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&g= t;autoidle &=3D 4;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->autoidle = |=3D (value & 1) << 2;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (v= alue & 2) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0/* SOFTRESET */
@@ -529,21 +535,21 @@ static void omap2_inth_write= (void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x4= 8: /* INTC_CONTROL */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mask =3D (value= & 4) ? 0 : ~0; /* GLOBALMASK */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if = (value & 2) { /* NEWFIQAGR */
+ =C2=A0 =C2=A0case 0x48: =C2=A0/*= INTC_CONTROL */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mask =3D (value &= ; 4) ? 0 : ~0; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 /* GLOBALMASK */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0i= f (value & 2) { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0/* NEWFIQAGR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0qemu_set_irq(s->parent_intr[1], 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->new_agr[1] =3D ~0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0omap_inth_update(s, 1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0}
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 1) { /* NEWIRQ= AGR */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 1) { =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* NEWIRQAGR */
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_set_irq(s->parent_intr= [0], 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->new_agr[0= ] =3D ~0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_inth_upda= te(s, 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x4c: /* INTC_PROTECT= ION */
+ =C2=A0 =C2=A0case 0x4c: =C2=A0/* INTC_PROTECTION */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* TODO: Make a bitmap (or sizeof(char)map) of a= ccess privileges
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * for every register= , see Chapter 3 and 4 for privileged mode. =C2=A0*/
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0if (value & 1)
@@ -551,44 +557,45 @@ static void omap2= _inth_write(void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0__= func__);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0= =C2=A0case 0x50: /* INTC_IDLE */
+ =C2=A0 =C2=A0case 0x50: =C2=A0/* INT= C_IDLE */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->autoidle &=3D ~3;<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->autoidle |=3D value & 3;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
=C2=A0 =C2=A0 =C2=A0= /* Per-bank registers */
- =C2=A0 =C2=A0case 0x84: /* INTC_MIR */
+ = =C2=A0 =C2=A0case 0x84: =C2=A0/* INTC_MIR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0bank->mask =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_i= nth_update(s, 0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_inth_update(s, = 1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2= =A0case 0x88: /* INTC_MIR_CLEAR */
+ =C2=A0 =C2=A0case 0x88: =C2=A0/* IN= TC_MIR_CLEAR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank->mask &=3D= ~value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_inth_update(s, 0);
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_inth_update(s, 1);
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x8c: /* INTC_= MIR_SET */
+ =C2=A0 =C2=A0case 0x8c: =C2=A0/* INTC_MIR_SET */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0bank->mask |=3D value;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x90: /* INTC_ISR= _SET */
+ =C2=A0 =C2=A0case 0x90: =C2=A0/* INTC_ISR_SET */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0bank->irqs |=3D bank->swi |=3D value;
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_inth_update(s, 0);
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0omap_inth_update(s, 1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x94: /* INTC_ISR_CLEAR */
+= =C2=A0 =C2=A0case 0x94: =C2=A0/* INTC_ISR_CLEAR */
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0bank->swi &=3D ~value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0bank->irqs =3D bank->swi & bank->inputs;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0
=C2=A0 =C2=A0 =C2=A0/* Per-lin= e registers */
- =C2=A0 =C2=A0case 0x100 ... 0x300: /* INTC_ILR */
+ = =C2=A0 =C2=A0case 0x100 ... 0x300: =C2=A0 =C2=A0 =C2=A0 /* INTC_ILR */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank_no =3D (offset - 0x100) >> 7;<= br>- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (bank_no > s->nbanks)
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0if (bank_no > s->nbanks) {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank =3D &s->bank[bank_no];
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0line_no =3D (offset & 0x7f) >> 2;<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank->priority[line_no] =3D (value = >> 2) & 0x3f;
@@ -596,13 +603,13 @@ static void omap2_inth_wri= te(void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bank->= ;fiq |=3D (value & 1) << line_no;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x00: /* INTC_REVISION */- =C2=A0 =C2=A0case 0x14: /* INTC_SYSSTATUS */
- =C2=A0 =C2=A0case 0x40= : /* INTC_SIR_IRQ */
- =C2=A0 =C2=A0case 0x44: /* INTC_SIR_FIQ */
- = =C2=A0 =C2=A0case 0x80: /* INTC_ITR */
- =C2=A0 =C2=A0case 0x98: /* INTC= _PENDING_IRQ */
- =C2=A0 =C2=A0case 0x9c: /* INTC_PENDING_FIQ */
+ = =C2=A0 =C2=A0case 0x00: =C2=A0/* INTC_REVISION */
+ =C2=A0 =C2=A0case 0x= 14: =C2=A0/* INTC_SYSSTATUS */
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* INTC_S= IR_IRQ */
+ =C2=A0 =C2=A0case 0x44: =C2=A0/* INTC_SIR_FIQ */
+ =C2=A0= =C2=A0case 0x80: =C2=A0/* INTC_ITR */
+ =C2=A0 =C2=A0case 0x98: =C2=A0/= * INTC_PENDING_IRQ */
+ =C2=A0 =C2=A0case 0x9c: =C2=A0/* INTC_PENDING_FI= Q */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OMAP_RO_REG(addr);
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return;
=C2=A0 =C2=A0 =C2=A0}
diff --git a/hw= /misc/cbus.c b/hw/misc/cbus.c
index 653e8ddcd5..a09232e755 100644
---= a/hw/misc/cbus.c
+++ b/hw/misc/cbus.c
@@ -26,7 +26,7 @@
=C2=A0#in= clude "hw/misc/cbus.h"
=C2=A0#include "sysemu/runstate.h&= quot;
=C2=A0
-//#define DEBUG
+/*#define DEBUG*/
=C2=A0
=C2= =A0typedef struct {
=C2=A0 =C2=A0 =C2=A0void *opaque;
@@ -78,13 +78,1= 5 @@ static void cbus_cycle(CBusPriv *s)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->dir =3D !s->rw;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->val = =3D 0;
=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->rw)
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0if (s->rw) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0cbus_io(s);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
=C2=A0 =C2=A0 =C2=A0case cbus_valu= e:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!s->rw)
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0if (!s->rw) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= cbus_io(s);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->cycle =3D cbus_address;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->bit =3D 8;
@@ -99,13 +101,15 @@ static void cbus_clk(= void *opaque, int line, int level)
=C2=A0 =C2=A0 =C2=A0CBusPriv *s =3D (= CBusPriv *) opaque;
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (!s->sel &&a= mp; level && !s->clk) {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-&g= t;dir)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->val |=3D s->d= at << (s->bit --);
- =C2=A0 =C2=A0 =C2=A0 =C2=A0else
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_set_irq(s->dat_out, (s->va= l >> (s->bit --)) & 1);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-= >dir) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->val |=3D s-&= gt;dat << (s->bit--);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_set_irq(s->dat_out, (s-&= gt;val >> (s->bit--)) & 1);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}<= br>=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->bit < 0)
+ =C2=A0= =C2=A0 =C2=A0 =C2=A0if (s->bit < 0) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0cbus_cycle(s);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
= =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0s->clk =3D level;=
@@ -179,61 +183,61 @@ static void retu_interrupt_update(CBusRetu *s)=C2=A0 =C2=A0 =C2=A0qemu_set_irq(s->irq, s->irqst & ~s->irqen= );
=C2=A0}
=C2=A0
-#define RETU_REG_ASICR 0x00 /* (RO) ASIC ID &a= mp; revision */
-#define RETU_REG_IDR 0x01 /* (T) =C2=A0Interrupt ID */=
-#define RETU_REG_IMR 0x02 /* (RW) Interrupt mask */
-#define RETU_= REG_RTCDSR 0x03 /* (RW) RTC seconds register */
-#define RETU_REG_RTCHM= R 0x04 /* (RO) RTC hours and minutes reg */
-#define RETU_REG_RTCHMAR 0= x05 /* (RW) RTC hours and minutes set reg */
-#define RETU_REG_RTCCALR 0= x06 /* (RW) RTC calibration register */
-#define RETU_REG_ADCR 0x08 /* = (RW) ADC result register */
-#define RETU_REG_ADCSCR 0x09 /* (RW) ADC s= ample control register */
-#define RETU_REG_AFCR 0x0a /* (RW) AFC regis= ter */
-#define RETU_REG_ANTIFR 0x0b /* (RW) AntiF register */
-#def= ine RETU_REG_CALIBR 0x0c /* (RW) CalibR register*/
-#define RETU_REG_CC= R1 0x0d /* (RW) Common control register 1 */
-#define RETU_REG_CCR2 0x= 0e /* (RW) Common control register 2 */
-#define RETU_REG_RCTRL_CLR 0x0f= /* (T) =C2=A0Regulator clear register */
-#define RETU_REG_RCTRL_SET 0x= 10 /* (T) =C2=A0Regulator set register */
-#define RETU_REG_TXCR 0x11 /= * (RW) TxC register */
-#define RETU_REG_STATUS 0x16 /* (RO) Status reg= ister */
-#define RETU_REG_WATCHDOG 0x17 /* (RW) Watchdog register */-#define RETU_REG_AUDTXR 0x18 /* (RW) Audio Codec Tx register */
-#def= ine RETU_REG_AUDPAR 0x19 /* (RW) AudioPA register */
-#define RETU_REG_= AUDRXR1 0x1a /* (RW) Audio receive register 1 */
-#define RETU_REG_AUDRX= R2 0x1b /* (RW) Audio receive register 2 */
-#define RETU_REG_SGR1 0x1c= /* (RW) */
-#define RETU_REG_SCR1 0x1d /* (RW) */
-#define RETU_REG= _SGR2 0x1e /* (RW) */
-#define RETU_REG_SCR2 0x1f /* (RW) */
+#defi= ne RETU_REG_ASICR =C2=A0 =C2=A0 =C2=A00x00 =C2=A0/* (RO) ASIC ID & revi= sion */
+#define RETU_REG_IDR =C2=A0 =C2=A0 =C2=A0 =C2=A00x01 =C2=A0/* (= T) =C2=A0Interrupt ID */
+#define RETU_REG_IMR =C2=A0 =C2=A0 =C2=A0 =C2= =A00x02 =C2=A0/* (RW) Interrupt mask */
+#define RETU_REG_RTCDSR =C2=A0 = =C2=A0 0x03 =C2=A0/* (RW) RTC seconds register */
+#define RETU_REG_RTCH= MR =C2=A0 =C2=A0 0x04 =C2=A0/* (RO) RTC hours and minutes reg */
+#defin= e RETU_REG_RTCHMAR =C2=A0 =C2=A00x05 =C2=A0/* (RW) RTC hours and minutes se= t reg */
+#define RETU_REG_RTCCALR =C2=A0 =C2=A00x06 =C2=A0/* (RW) RTC c= alibration register */
+#define RETU_REG_ADCR =C2=A0 =C2=A0 =C2=A0 0x08 = =C2=A0/* (RW) ADC result register */
+#define RETU_REG_ADCSCR =C2=A0 =C2= =A0 0x09 =C2=A0/* (RW) ADC sample control register */
+#define RETU_REG_= AFCR =C2=A0 =C2=A0 =C2=A0 0x0a =C2=A0/* (RW) AFC register */
+#define RE= TU_REG_ANTIFR =C2=A0 =C2=A0 0x0b =C2=A0/* (RW) AntiF register */
+#defin= e RETU_REG_CALIBR =C2=A0 =C2=A0 0x0c =C2=A0/* (RW) CalibR register*/
+#d= efine RETU_REG_CCR1 =C2=A0 =C2=A0 =C2=A0 0x0d =C2=A0/* (RW) Common control = register 1 */
+#define RETU_REG_CCR2 =C2=A0 =C2=A0 =C2=A0 0x0e =C2=A0/* = (RW) Common control register 2 */
+#define RETU_REG_RCTRL_CLR =C2=A00x0f= =C2=A0/* (T) =C2=A0Regulator clear register */
+#define RETU_REG_RCTRL_= SET =C2=A00x10 =C2=A0/* (T) =C2=A0Regulator set register */
+#define RET= U_REG_TXCR =C2=A0 =C2=A0 =C2=A0 0x11 =C2=A0/* (RW) TxC register */
+#def= ine RETU_REG_STATUS =C2=A0 =C2=A0 0x16 =C2=A0/* (RO) Status register */
= +#define RETU_REG_WATCHDOG =C2=A0 0x17 =C2=A0/* (RW) Watchdog register */+#define RETU_REG_AUDTXR =C2=A0 =C2=A0 0x18 =C2=A0/* (RW) Audio Codec Tx = register */
+#define RETU_REG_AUDPAR =C2=A0 =C2=A0 0x19 =C2=A0/* (RW) Au= dioPA register */
+#define RETU_REG_AUDRXR1 =C2=A0 =C2=A00x1a =C2=A0/* (= RW) Audio receive register 1 */
+#define RETU_REG_AUDRXR2 =C2=A0 =C2=A00= x1b =C2=A0/* (RW) Audio receive register 2 */
+#define RETU_REG_SGR1 =C2= =A0 =C2=A0 =C2=A0 0x1c =C2=A0/* (RW) */
+#define RETU_REG_SCR1 =C2=A0 = =C2=A0 =C2=A0 0x1d =C2=A0/* (RW) */
+#define RETU_REG_SGR2 =C2=A0 =C2=A0= =C2=A0 0x1e =C2=A0/* (RW) */
+#define RETU_REG_SCR2 =C2=A0 =C2=A0 =C2= =A0 0x1f =C2=A0/* (RW) */
=C2=A0
=C2=A0/* Retu Interrupt sources */=C2=A0enum {
- =C2=A0 =C2=A0retu_int_pwr =3D 0, /* Power button */
= - =C2=A0 =C2=A0retu_int_char =3D 1, /* Charger */
- =C2=A0 =C2=A0retu_in= t_rtcs =3D 2, /* Seconds */
- =C2=A0 =C2=A0retu_int_rtcm =3D 3, /* Minut= es */
- =C2=A0 =C2=A0retu_int_rtcd =3D 4, /* Days */
- =C2=A0 =C2=A0r= etu_int_rtca =3D 5, /* Alarm */
- =C2=A0 =C2=A0retu_int_hook =3D 6, /* H= ook */
- =C2=A0 =C2=A0retu_int_head =3D 7, /* Headset */
- =C2=A0 =C2= =A0retu_int_adcs =3D 8, /* ADC sample */
+ =C2=A0 =C2=A0retu_int_pwr =C2= =A0=3D 0, =C2=A0/* Power button */
+ =C2=A0 =C2=A0retu_int_char =3D 1, = =C2=A0/* Charger */
+ =C2=A0 =C2=A0retu_int_rtcs =3D 2, =C2=A0/* Seconds= */
+ =C2=A0 =C2=A0retu_int_rtcm =3D 3, =C2=A0/* Minutes */
+ =C2=A0 = =C2=A0retu_int_rtcd =3D 4, =C2=A0/* Days */
+ =C2=A0 =C2=A0retu_int_rtca= =3D 5, =C2=A0/* Alarm */
+ =C2=A0 =C2=A0retu_int_hook =3D 6, =C2=A0/* H= ook */
+ =C2=A0 =C2=A0retu_int_head =3D 7, =C2=A0/* Headset */
+ =C2= =A0 =C2=A0retu_int_adcs =3D 8, =C2=A0/* ADC sample */
=C2=A0};
=C2=A0=
=C2=A0/* Retu ADC channel wiring */
=C2=A0enum {
- =C2=A0 =C2=A0r= etu_adc_bsi =3D 1, /* BSI */
- =C2=A0 =C2=A0retu_adc_batt_temp =3D 2, /*= Battery temperature */
- =C2=A0 =C2=A0retu_adc_chg_volt =3D 3, /* Charg= er voltage */
- =C2=A0 =C2=A0retu_adc_head_det =3D 4, /* Headset detecti= on */
- =C2=A0 =C2=A0retu_adc_hook_det =3D 5, /* Hook detection */
- = =C2=A0 =C2=A0retu_adc_rf_gp =3D 6, /* RF GP */
- =C2=A0 =C2=A0retu_adc_t= x_det =3D 7, /* Wideband Tx detection */
- =C2=A0 =C2=A0retu_adc_batt_vo= lt =3D 8, /* Battery voltage */
- =C2=A0 =C2=A0retu_adc_sens =3D 10, /* = Light sensor */
- =C2=A0 =C2=A0retu_adc_sens_temp =3D 11, /* Light senso= r temperature */
- =C2=A0 =C2=A0retu_adc_bbatt_volt =3D 12, /* Backup ba= ttery voltage */
- =C2=A0 =C2=A0retu_adc_self_temp =3D 13, /* RETU tempe= rature */
+ =C2=A0 =C2=A0retu_adc_bsi =3D 1, =C2=A0 =C2=A0 =C2=A0 =C2=A0= /* BSI */
+ =C2=A0 =C2=A0retu_adc_batt_temp =3D 2, =C2=A0 /* Battery te= mperature */
+ =C2=A0 =C2=A0retu_adc_chg_volt =3D 3, =C2=A0 =C2=A0/* Cha= rger voltage */
+ =C2=A0 =C2=A0retu_adc_head_det =3D 4, =C2=A0 =C2=A0/* = Headset detection */
+ =C2=A0 =C2=A0retu_adc_hook_det =3D 5, =C2=A0 =C2= =A0/* Hook detection */
+ =C2=A0 =C2=A0retu_adc_rf_gp =3D 6, =C2=A0 =C2= =A0 =C2=A0 /* RF GP */
+ =C2=A0 =C2=A0retu_adc_tx_det =3D 7, =C2=A0 =C2= =A0 =C2=A0/* Wideband Tx detection */
+ =C2=A0 =C2=A0retu_adc_batt_volt = =3D 8, =C2=A0 /* Battery voltage */
+ =C2=A0 =C2=A0retu_adc_sens =3D 10,= =C2=A0 =C2=A0 =C2=A0 /* Light sensor */
+ =C2=A0 =C2=A0retu_adc_sens_te= mp =3D 11, =C2=A0/* Light sensor temperature */
+ =C2=A0 =C2=A0retu_adc_= bbatt_volt =3D 12, /* Backup battery voltage */
+ =C2=A0 =C2=A0retu_adc_= self_temp =3D 13, =C2=A0/* RETU temperature */
=C2=A0};
=C2=A0
=C2= =A0static inline uint16_t retu_read(CBusRetu *s, int reg)
@@ -246,7 +250= ,7 @@ static inline uint16_t retu_read(CBusRetu *s, int reg)
=C2=A0 =C2= =A0 =C2=A0case RETU_REG_ASICR:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return = 0x0215 | (s->is_vilma << 7);
=C2=A0
- =C2=A0 =C2=A0case RETU= _REG_IDR: /* TODO: Or is this ffs(s->irqst)? =C2=A0*/
+ =C2=A0 =C2=A0= case RETU_REG_IDR: =C2=A0/* TODO: Or is this ffs(s->irqst)? =C2=A0*/
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->irqst;
=C2=A0
=C2=A0 = =C2=A0 =C2=A0case RETU_REG_IMR:
@@ -355,8 +359,9 @@ static inline void r= etu_write(CBusRetu *s, int reg, uint16_t val)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0break;
=C2=A0
=C2=A0 =C2=A0 =C2=A0case RETU_REG_WATCHDOG:- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (val =3D=3D 0 && (s->cc[0] &am= p; 2))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (val =3D=3D 0 && (s->c= c[0] & 2)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_sy= stem_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
=C2= =A0 =C2=A0 =C2=A0case RETU_REG_TXCR:
@@ -380,10 +385,11 @@ static void r= etu_io(void *opaque, int rw, int reg, uint16_t *val)
=C2=A0{
=C2=A0 = =C2=A0 =C2=A0CBusRetu *s =3D (CBusRetu *) opaque;
=C2=A0
- =C2=A0 =C2= =A0if (rw)
+ =C2=A0 =C2=A0if (rw) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0*val =3D retu_read(s, reg);
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} e= lse {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retu_write(s, reg, *val);
+ = =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0void *retu_init(qemu_irq irq, = int vilma)
@@ -424,47 +430,12 @@ void retu_key_event(void *retu, int sta= te)
=C2=A0 =C2=A0 =C2=A0s->irqst |=3D 1 << retu_int_pwr;
=C2= =A0 =C2=A0 =C2=A0retu_interrupt_update(s);
=C2=A0
- =C2=A0 =C2=A0if (= state)
+ =C2=A0 =C2=A0if (state) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= s->status &=3D ~(1 << 5);
- =C2=A0 =C2=A0else
+ =C2=A0 = =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->status |=3D 1 <= ;< 5;
-}
-
-#if 0
-static void retu_head_event(void *retu, i= nt state)
-{
- =C2=A0 =C2=A0CBusSlave *slave =3D (CBusSlave *) retu;<= br>- =C2=A0 =C2=A0CBusRetu *s =3D (CBusRetu *) slave->opaque;
-
- = =C2=A0 =C2=A0if ((s->cc[0] & 0x500) =3D=3D 0x500) { /* TODO: Which b= its? */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0/* TODO: reissue the interrupt ever= y 100ms or so. =C2=A0*/
- =C2=A0 =C2=A0 =C2=A0 =C2=A0s->irqst |=3D 1 = << retu_int_head;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0retu_interrupt_upda= te(s);
=C2=A0 =C2=A0 =C2=A0}
-
- =C2=A0 =C2=A0if (state)
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->result[retu_adc_head_det] =3D 50;
- =C2=A0= =C2=A0else
- =C2=A0 =C2=A0 =C2=A0 =C2=A0s->result[retu_adc_head_det]= =3D 123;
-}
-
-static void retu_hook_event(void *retu, int state)=
-{
- =C2=A0 =C2=A0CBusSlave *slave =3D (CBusSlave *) retu;
- =C2= =A0 =C2=A0CBusRetu *s =3D (CBusRetu *) slave->opaque;
-
- =C2=A0 = =C2=A0if ((s->cc[0] & 0x500) =3D=3D 0x500) {
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0/* TODO: reissue the interrupt every 100ms or so. =C2=A0*/
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->irqst |=3D 1 << retu_int_hook;
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0retu_interrupt_update(s);
- =C2=A0 =C2=A0}-
- =C2=A0 =C2=A0if (state)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0s->resul= t[retu_adc_hook_det] =3D 50;
- =C2=A0 =C2=A0else
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->result[retu_adc_hook_det] =3D 123;
=C2=A0}
-#endif=C2=A0
=C2=A0/* Tahvo/Betty */
=C2=A0typedef struct {
@@ -485,20 = +456,20 @@ static void tahvo_interrupt_update(CBusTahvo *s)
=C2=A0 =C2= =A0 =C2=A0qemu_set_irq(s->irq, s->irqst & ~s->irqen);
=C2= =A0}
=C2=A0
-#define TAHVO_REG_ASICR 0x00 /* (RO) ASIC ID & revi= sion */
-#define TAHVO_REG_IDR 0x01 /* (T) =C2=A0Interrupt ID */
-#d= efine TAHVO_REG_IDSR 0x02 /* (RO) Interrupt status */
-#define TAHVO_RE= G_IMR 0x03 /* (RW) Interrupt mask */
-#define TAHVO_REG_CHAPWMR 0x04 /*= (RW) Charger PWM */
-#define TAHVO_REG_LEDPWMR 0x05 /* (RW) LED PWM */<= br>-#define TAHVO_REG_USBR 0x06 /* (RW) USB control */
-#define TAHVO_R= EG_RCR 0x07 /* (RW) Some kind of power management */
-#define TAHVO_REG= _CCR1 0x08 /* (RW) Common control register 1 */
-#define TAHVO_REG_CCR2= 0x09 /* (RW) Common control register 2 */
-#define TAHVO_REG_TESTR1 0x= 0a /* (RW) Test register 1 */
-#define TAHVO_REG_TESTR2 0x0b /* (RW) Tes= t register 2 */
-#define TAHVO_REG_NOPR 0x0c /* (RW) Number of periods = */
-#define TAHVO_REG_FRR 0x0d /* (RO) FR */
+#define TAHVO_REG_ASIC= R =C2=A0 0x00 =C2=A0/* (RO) ASIC ID & revision */
+#define TAHVO_REG= _IDR =C2=A0 =C2=A0 0x01 =C2=A0/* (T) =C2=A0Interrupt ID */
+#define TAHV= O_REG_IDSR =C2=A0 =C2=A00x02 =C2=A0/* (RO) Interrupt status */
+#define = TAHVO_REG_IMR =C2=A0 =C2=A0 0x03 =C2=A0/* (RW) Interrupt mask */
+#defin= e TAHVO_REG_CHAPWMR 0x04 =C2=A0/* (RW) Charger PWM */
+#define TAHVO_REG= _LEDPWMR 0x05 =C2=A0/* (RW) LED PWM */
+#define TAHVO_REG_USBR =C2=A0 = =C2=A00x06 =C2=A0/* (RW) USB control */
+#define TAHVO_REG_RCR =C2=A0 = =C2=A0 0x07 =C2=A0/* (RW) Some kind of power management */
+#define TAHV= O_REG_CCR1 =C2=A0 =C2=A00x08 =C2=A0/* (RW) Common control register 1 */
= +#define TAHVO_REG_CCR2 =C2=A0 =C2=A00x09 =C2=A0/* (RW) Common control regi= ster 2 */
+#define TAHVO_REG_TESTR1 =C2=A00x0a =C2=A0/* (RW) Test regist= er 1 */
+#define TAHVO_REG_TESTR2 =C2=A00x0b =C2=A0/* (RW) Test register= 2 */
+#define TAHVO_REG_NOPR =C2=A0 =C2=A00x0c =C2=A0/* (RW) Number of = periods */
+#define TAHVO_REG_FRR =C2=A0 =C2=A0 0x0d =C2=A0/* (RO) FR */=
=C2=A0
=C2=A0static inline uint16_t tahvo_read(CBusTahvo *s, int reg= )
=C2=A0{
@@ -508,10 +479,10 @@ static inline uint16_t tahvo_read(CBu= sTahvo *s, int reg)
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (reg) {
=C2= =A0 =C2=A0 =C2=A0case TAHVO_REG_ASICR:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0retu= rn 0x0021 | (s->is_betty ? 0x0b00 : 0x0300); /* 22 in N810 */
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0return 0x0021 | (s->is_betty ? 0x0b00 : 0x0300);= =C2=A0/* 22 in N810 */
=C2=A0
=C2=A0 =C2=A0 =C2=A0case TAHVO_REG_IDR= :
- =C2=A0 =C2=A0case TAHVO_REG_IDSR: /* XXX: what does this do? =C2=A0*= /
+ =C2=A0 =C2=A0case TAHVO_REG_IDSR: =C2=A0/* XXX: what does this do? = =C2=A0*/
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->irqst;
=C2=A0=
=C2=A0 =C2=A0 =C2=A0case TAHVO_REG_IMR:
@@ -596,10 +567,11 @@ static= void tahvo_io(void *opaque, int rw, int reg, uint16_t *val)
=C2=A0{
= =C2=A0 =C2=A0 =C2=A0CBusTahvo *s =3D (CBusTahvo *) opaque;
=C2=A0
- = =C2=A0 =C2=A0if (rw)
+ =C2=A0 =C2=A0if (rw) {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0*val =3D tahvo_read(s, reg);
- =C2=A0 =C2=A0else
+ =C2= =A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tahvo_write(s, reg,= *val);
+ =C2=A0 }
=C2=A0}
=C2=A0
=C2=A0void *tahvo_init(qemu_i= rq irq, int betty)
diff --git a/hw/misc/omap_clk.c b/hw/misc/omap_clk.c<= br>index c77ca2fc74..ec2345e9ab 100644
--- a/hw/misc/omap_clk.c
+++ b= /hw/misc/omap_clk.c
@@ -30,174 +30,174 @@ struct clk {
=C2=A0 =C2=A0 = =C2=A0struct clk *parent;
=C2=A0 =C2=A0 =C2=A0struct clk *child1;
=C2= =A0 =C2=A0 =C2=A0struct clk *sibling;
-#define ALWAYS_ENABLED (1 <&l= t; 0)
-#define CLOCK_IN_OMAP310 (1 << 10)
-#define CLOCK_IN_OMA= P730 (1 << 11)
-#define CLOCK_IN_OMAP1510 (1 << 12)
-#def= ine CLOCK_IN_OMAP16XX (1 << 13)
-#define CLOCK_IN_OMAP242X (1 <= < 14)
-#define CLOCK_IN_OMAP243X (1 << 15)
-#define CLOCK_IN= _OMAP343X (1 << 16)
+#define ALWAYS_ENABLED =C2=A0 =C2=A0(1 <&l= t; 0)
+#define CLOCK_IN_OMAP310 =C2=A0(1 << 10)
+#define CLOCK_= IN_OMAP730 =C2=A0(1 << 11)
+#define CLOCK_IN_OMAP1510 (1 << = 12)
+#define CLOCK_IN_OMAP16XX (1 << 13)
+#define CLOCK_IN_OMAP= 242X (1 << 14)
+#define CLOCK_IN_OMAP243X (1 << 15)
+#def= ine CLOCK_IN_OMAP343X (1 << 16)
=C2=A0 =C2=A0 =C2=A0uint32_t flags= ;
=C2=A0 =C2=A0 =C2=A0int id;
=C2=A0
- =C2=A0 =C2=A0int running; = /* Is currently ticking */
- =C2=A0 =C2=A0int enabled; /* Is enabled, r= egardless of its input clk */
- =C2=A0 =C2=A0unsigned long rate; /* Cur= rent rate (if .running) */
- =C2=A0 =C2=A0unsigned int divisor; /* Rate = relative to input (if .enabled) */
- =C2=A0 =C2=A0unsigned int multiplie= r; /* Rate relative to input (if .enabled) */
- =C2=A0 =C2=A0qemu_irq us= ers[16]; /* Who to notify on change */
- =C2=A0 =C2=A0int usecount; /*= Automatically idle when unused */
+ =C2=A0 =C2=A0int running; =C2=A0 = =C2=A0/* Is currently ticking */
+ =C2=A0 =C2=A0int enabled; =C2=A0 =C2= =A0/* Is enabled, regardless of its input clk */
+ =C2=A0 =C2=A0unsigned= long rate; =C2=A0 =C2=A0/* Current rate (if .running) */
+ =C2=A0 =C2= =A0unsigned int divisor; /*g Rate relative to input (if .enabled) */
+ = =C2=A0 =C2=A0unsigned int multiplier; /*g Rate relative to input (if .enabl= ed) */
+ =C2=A0 =C2=A0qemu_irq users[16]; =C2=A0 =C2=A0/* Who to notify = on change */
+ =C2=A0 =C2=A0int usecount; =C2=A0 =C2=A0/* Automatically = idle when unused */
=C2=A0};
=C2=A0
=C2=A0static struct clk xtal_o= sc12m =3D {
- =C2=A0 =C2=A0.name =3D "xtal_osc_12m",
- =C2= =A0 =C2=A0.rate =3D 12000000,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP151= 0 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.name =3D "= ;xtal_osc_12m",
+ =C2=A0 =C2=A0.rate =3D 12000000,
+ =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
= =C2=A0};
=C2=A0
=C2=A0static struct clk xtal_osc32k =3D {
- =C2=A0= =C2=A0.name =3D "xtal_osc_32k",
- =C2=A0 =C2=A0.rate =3D 3276= 8,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLO= CK_IN_OMAP310 |
+ =C2=A0 =C2=A0.name =3D "xtal_osc_32k",
+ = =C2=A0 =C2=A0.rate =3D 32768,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP151= 0 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
=C2=A0};
= =C2=A0
=C2=A0static struct clk ck_ref =3D {
- =C2=A0 =C2=A0.name =3D = "ck_ref",
- =C2=A0 =C2=A0.alias =3D "clkin",
- = =C2=A0 =C2=A0.parent =3D &xtal_osc12m,
- =C2=A0 =C2=A0.flags =3D CLO= CK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
+ =C2=A0 =C2=A0.= name =3D "ck_ref",
+ =C2=A0 =C2=A0.alias =3D "clkin"= ,
+ =C2=A0 =C2=A0.parent =3D &xtal_osc12m,
+ =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ALWAYS_ENABLED,
=C2=A0};
=C2= =A0
=C2=A0/* If a dpll is disabled it becomes a bypass, child clocks don= 't stop */
=C2=A0static struct clk dpll1 =3D {
- =C2=A0 =C2=A0.na= me =3D "dpll1",
- =C2=A0 =C2=A0.parent =3D &ck_ref,
- = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OM= AP310 |
+ =C2=A0 =C2=A0.name =3D "dpll1",
+ =C2=A0 =C2=A0.p= arent =3D &ck_ref,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLO= CK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static struct c= lk dpll2 =3D {
- =C2=A0 =C2=A0.name =3D "dpll2",
- =C2=A0 = =C2=A0.parent =3D &ck_ref,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP31= 0 | ALWAYS_ENABLED,
+ =C2=A0 =C2=A0.name =3D "dpll2",
+ =C2= =A0 =C2=A0.parent =3D &ck_ref,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OM= AP310 | ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static struct clk dp= ll3 =3D {
- =C2=A0 =C2=A0.name =3D "dpll3",
- =C2=A0 =C2=A0= .parent =3D &ck_ref,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | AL= WAYS_ENABLED,
+ =C2=A0 =C2=A0.name =3D "dpll3",
+ =C2=A0 = =C2=A0.parent =3D &ck_ref,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP31= 0 | ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static struct clk dpll4 = =3D {
- =C2=A0 =C2=A0.name =3D "dpll4",
- =C2=A0 =C2=A0.par= ent =3D &ck_ref,
- =C2=A0 =C2=A0.multiplier =3D 4,
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
= + =C2=A0 =C2=A0.name =3D "dpll4",
+ =C2=A0 =C2=A0.parent =3D &= amp;ck_ref,
+ =C2=A0 =C2=A0.multiplier =3D 4,
+ =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
=C2=A0};=C2=A0
=C2=A0static struct clk apll =3D {
- =C2=A0 =C2=A0.name =3D = "apll",
- =C2=A0 =C2=A0.parent =3D &ck_ref,
- =C2=A0 = =C2=A0.multiplier =3D 48,
- =C2=A0 =C2=A0.divisor =3D 12,
- =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,<= br>+ =C2=A0 =C2=A0.name =3D "apll",
+ =C2=A0 =C2=A0.parent =3D= &ck_ref,
+ =C2=A0 =C2=A0.multiplier =3D 48,
+ =C2=A0 =C2=A0.divi= sor =3D 12,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP1= 6XX | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2=A0static struct clk ck= _48m =3D {
- =C2=A0 =C2=A0.name =3D "ck_48m",
- =C2=A0 =C2= =A0.parent =3D &dpll4, /* either dpll4 or apll */
- =C2=A0 =C2=A0.fl= ags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
+ =C2= =A0 =C2=A0.name =3D "ck_48m",
+ =C2=A0 =C2=A0.parent =3D &= dpll4, /*g either dpll4 or apll */
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OM= AP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2= =A0static struct clk ck_dpll1out =3D {
- =C2=A0 =C2=A0.name =3D "ck= _dpll1out",
- =C2=A0 =C2=A0.parent =3D &dpll1,
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.name =3D "ck_dpll1= out",
+ =C2=A0 =C2=A0.parent =3D &dpll1,
+ =C2=A0 =C2=A0.fla= gs =3D CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
=C2=A0static struct clk = sossi_ck =3D {
- =C2=A0 =C2=A0.name =3D "ck_sossi",
- =C2= =A0 =C2=A0.parent =3D &ck_dpll1out,
- =C2=A0 =C2=A0.flags =3D CLOCK_= IN_OMAP16XX,
+ =C2=A0 =C2=A0.name =3D "ck_sossi",
+ =C2=A0 = =C2=A0.parent =3D &ck_dpll1out,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_O= MAP16XX,
=C2=A0};
=C2=A0
=C2=A0static struct clk clkm1 =3D {
- = =C2=A0 =C2=A0.name =3D "clkm1",
- =C2=A0 =C2=A0.alias =3D &quo= t;ck_gen1",
- =C2=A0 =C2=A0.parent =3D &dpll1,
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |+ =C2=A0 =C2=A0.name =3D "clkm1",
+ =C2=A0 =C2=A0.alias =3D &= quot;ck_gen1",
+ =C2=A0 =C2=A0.parent =3D &dpll1,
+ =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ALWAYS_ENABLED,
=C2= =A0};
=C2=A0
=C2=A0static struct clk clkm2 =3D {
- =C2=A0 =C2=A0.n= ame =3D "clkm2",
- =C2=A0 =C2=A0.alias =3D "ck_gen2"= ,
- =C2=A0 =C2=A0.parent =3D &dpll1,
- =C2=A0 =C2=A0.flags =3D CL= OCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
+ =C2=A0 =C2=A0= .name =3D "clkm2",
+ =C2=A0 =C2=A0.alias =3D "ck_gen2&quo= t;,
+ =C2=A0 =C2=A0.parent =3D &dpll1,
+ =C2=A0 =C2=A0.flags =3D = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ALWAYS_ENABLED,
=C2=A0};
=C2=A0=C2=A0static struct clk clkm3 =3D {
- =C2=A0 =C2=A0.name =3D "clkm= 3",
- =C2=A0 =C2=A0.alias =3D "ck_gen3",
- =C2=A0 =C2= =A0.parent =3D &dpll1, /* either dpll1 or ck_ref */
- =C2=A0 =C2=A0.= flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
+ = =C2=A0 =C2=A0.name =3D "clkm3",
+ =C2=A0 =C2=A0.alias =3D &quo= t;ck_gen3",
+ =C2=A0 =C2=A0.parent =3D &dpll1, /*g either dpll1= or ck_ref */
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMA= P16XX | CLOCK_IN_OMAP310 |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static struct clk arm_ck = =3D {
- =C2=A0 =C2=A0.name =3D "arm_ck",
- =C2=A0 =C2=A0.al= ias =3D "mpu_ck",
- =C2=A0 =C2=A0.parent =3D &clkm1,
- = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OM= AP310 |
+ =C2=A0 =C2=A0.name =3D "arm_ck",
+ =C2=A0 =C2=A0.= alias =3D "mpu_ck",
+ =C2=A0 =C2=A0.parent =3D &clkm1,
= + =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_= OMAP310 |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ALWAYS_ENABLED= ,
=C2=A0};
=C2=A0
=C2=A0static struct clk armper_ck =3D {
- =C2= =A0 =C2=A0.name =3D "armper_ck",
- =C2=A0 =C2=A0.alias =3D &qu= ot;mpuper_ck",
- =C2=A0 =C2=A0.parent =3D &clkm1,
- =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,<= br>+ =C2=A0 =C2=A0.name =3D "armper_ck",
+ =C2=A0 =C2=A0.alias= =3D "mpuper_ck",
+ =C2=A0 =C2=A0.parent =3D &clkm1,
+ = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OM= AP310,
=C2=A0};
=C2=A0
=C2=A0static struct clk arm_gpio_ck =3D {- =C2=A0 =C2=A0.name =3D "arm_gpio_ck",
- =C2=A0 =C2=A0.alia= s =3D "mpu_gpio_ck",
- =C2=A0 =C2=A0.parent =3D &clkm1,- =C2=A0 =C2=A0.divisor =3D 1,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1= 510 | CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.name =3D "arm_gpio_ck"= ,
+ =C2=A0 =C2=A0.alias =3D "mpu_gpio_ck",
+ =C2=A0 =C2=A0.= parent =3D &clkm1,
+ =C2=A0 =C2=A0.divisor =3D 1,
+ =C2=A0 =C2=A0= .flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
= =C2=A0static struct clk armxor_ck =3D {
- =C2=A0 =C2=A0.name =3D "a= rmxor_ck",
- =C2=A0 =C2=A0.alias =3D "mpuxor_ck",
- = =C2=A0 =C2=A0.parent =3D &ck_ref,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN= _OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.name = =3D "armxor_ck",
+ =C2=A0 =C2=A0.alias =3D "mpuxor_ck&quo= t;,
+ =C2=A0 =C2=A0.parent =3D &ck_ref,
+ =C2=A0 =C2=A0.flags =3D= CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
=C2=A0};
= =C2=A0
=C2=A0static struct clk armtim_ck =3D {
- =C2=A0 =C2=A0.name = =3D "armtim_ck",
- =C2=A0 =C2=A0.alias =3D "mputim_ck&quo= t;,
- =C2=A0 =C2=A0.parent =3D &ck_ref, /* either CLKIN or DPLL1 */<= br>- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_= IN_OMAP310,
+ =C2=A0 =C2=A0.name =3D "armtim_ck",
+ =C2=A0 = =C2=A0.alias =3D "mputim_ck",
+ =C2=A0 =C2=A0.parent =3D &= ck_ref, /*g either CLKIN or DPLL1 */
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_= OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
= =C2=A0static struct clk armwdt_ck =3D {
- =C2=A0 =C2=A0.name =3D "a= rmwdt_ck",
- =C2=A0 =C2=A0.alias =3D "mpuwd_ck",
- =C2= =A0 =C2=A0.parent =3D &clkm1,
- =C2=A0 =C2=A0.divisor =3D 14,
- = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OM= AP310 |
+ =C2=A0 =C2=A0.name =3D "armwdt_ck",
+ =C2=A0 =C2= =A0.alias =3D "mpuwd_ck",
+ =C2=A0 =C2=A0.parent =3D &clkm= 1,
+ =C2=A0 =C2=A0.divisor =3D 14,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN= _OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0s= tatic struct clk arminth_ck16xx =3D {
- =C2=A0 =C2=A0.name =3D "arm= inth_ck",
- =C2=A0 =C2=A0.parent =3D &arm_ck,
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
+ =C2=A0 =C2=A0.name = =3D "arminth_ck",
+ =C2=A0 =C2=A0.parent =3D &arm_ck,
+= =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
=C2=A0 =C2= =A0 =C2=A0/* Note: On 16xx the frequency can be divided by 2 by programming=
=C2=A0 =C2=A0 =C2=A0 * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
=C2=A0 =C2= =A0 =C2=A0 *
@@ -206,48 +206,48 @@ static struct clk arminth_ck16xx =3D = {
=C2=A0};
=C2=A0
=C2=A0static struct clk dsp_ck =3D {
- =C2=A0= =C2=A0.name =3D "dsp_ck",
- =C2=A0 =C2=A0.parent =3D &clk= m2,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLO= CK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.name =3D "dsp_ck",
+ =C2=A0= =C2=A0.parent =3D &clkm2,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP31= 0 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
=C2=A0s= tatic struct clk dspmmu_ck =3D {
- =C2=A0 =C2=A0.name =3D "dspmmu_c= k",
- =C2=A0 =C2=A0.parent =3D &clkm2,
- =C2=A0 =C2=A0.flags= =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ =C2=A0= =C2=A0.name =3D "dspmmu_ck",
+ =C2=A0 =C2=A0.parent =3D &= clkm2,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | = CLOCK_IN_OMAP16XX |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ALWA= YS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static struct clk dspper_ck =3D = {
- =C2=A0 =C2=A0.name =3D "dspper_ck",
- =C2=A0 =C2=A0.par= ent =3D &clkm2,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_I= N_OMAP1510 | CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.name =3D "dspper_ck= ",
+ =C2=A0 =C2=A0.parent =3D &clkm2,
+ =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX,
=C2=A0};=C2=A0
=C2=A0static struct clk dspxor_ck =3D {
- =C2=A0 =C2=A0.name= =3D "dspxor_ck",
- =C2=A0 =C2=A0.parent =3D &ck_ref,
-= =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OM= AP16XX,
+ =C2=A0 =C2=A0.name =3D "dspxor_ck",
+ =C2=A0 =C2= =A0.parent =3D &ck_ref,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 |= CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
=C2=A0stat= ic struct clk dsptim_ck =3D {
- =C2=A0 =C2=A0.name =3D "dsptim_ck&q= uot;,
- =C2=A0 =C2=A0.parent =3D &ck_ref,
- =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX,
+ =C2=A0 = =C2=A0.name =3D "dsptim_ck",
+ =C2=A0 =C2=A0.parent =3D &c= k_ref,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | = CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
=C2=A0static struct clk tc_ck = =3D {
- =C2=A0 =C2=A0.name =3D "tc_ck",
- =C2=A0 =C2=A0.par= ent =3D &clkm3,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_= IN_OMAP16XX |
+ =C2=A0 =C2=A0.name =3D "tc_ck",
+ =C2=A0 = =C2=A0.parent =3D &clkm3,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP151= 0 | CLOCK_IN_OMAP16XX |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= CLOCK_IN_OMAP730 | CLOCK_IN_OMAP310 |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static struct = clk arminth_ck15xx =3D {
- =C2=A0 =C2=A0.name =3D "arminth_ck"= ,
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2=A0 =C2=A0.flags =3D CL= OCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
+ =C2=A0 =C2=A0.nam= e =3D "arminth_ck",
+ =C2=A0 =C2=A0.parent =3D &tc_ck,
= + =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | ALWAYS_ENA= BLED,
=C2=A0 =C2=A0 =C2=A0/* Note: On 1510 the frequency follows TC_CK=C2=A0 =C2=A0 =C2=A0 *
=C2=A0 =C2=A0 =C2=A0 * 16xx version is in MPU c= locks.
@@ -256,606 +256,606 @@ static struct clk arminth_ck15xx =3D {=C2=A0
=C2=A0static struct clk tipb_ck =3D {
=C2=A0 =C2=A0 =C2=A0/* = No-idle controlled by "tc_ck" */
- =C2=A0 =C2=A0.name =3D &quo= t;tipb_ck",
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
+ = =C2=A0 =C2=A0.name =3D "tipb_ck",
+ =C2=A0 =C2=A0.parent =3D &= amp;tc_ck,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP31= 0 | ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static struct clk l3_ocp= i_ck =3D {
=C2=A0 =C2=A0 =C2=A0/* No-idle controlled by "tc_ck"= ; */
- =C2=A0 =C2=A0.name =3D "l3_ocpi_ck",
- =C2=A0 =C2=A0= .parent =3D &tc_ck,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
= + =C2=A0 =C2=A0.name =3D "l3_ocpi_ck",
+ =C2=A0 =C2=A0.parent = =3D &tc_ck,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
=C2=A0};=
=C2=A0
=C2=A0static struct clk tc1_ck =3D {
- =C2=A0 =C2=A0.name = =3D "tc1_ck",
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2= =A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.name =3D "t= c1_ck",
+ =C2=A0 =C2=A0.parent =3D &tc_ck,
+ =C2=A0 =C2=A0.f= lags =3D CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
=C2=A0static struct cl= k tc2_ck =3D {
- =C2=A0 =C2=A0.name =3D "tc2_ck",
- =C2=A0 = =C2=A0.parent =3D &tc_ck,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16X= X,
+ =C2=A0 =C2=A0.name =3D "tc2_ck",
+ =C2=A0 =C2=A0.paren= t =3D &tc_ck,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
=C2=A0= };
=C2=A0
=C2=A0static struct clk dma_ck =3D {
=C2=A0 =C2=A0 =C2= =A0/* No-idle controlled by "tc_ck" */
- =C2=A0 =C2=A0.name = =3D "dma_ck",
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2= =A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP3= 10 |
+ =C2=A0 =C2=A0.name =3D "dma_ck",
+ =C2=A0 =C2=A0.par= ent =3D &tc_ck,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_= IN_OMAP16XX | CLOCK_IN_OMAP310 |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static struct clk = dma_lcdfree_ck =3D {
- =C2=A0 =C2=A0.name =3D "dma_lcdfree_ck"= ,
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2=A0 =C2=A0.flags =3D CL= OCK_IN_OMAP16XX | ALWAYS_ENABLED,
+ =C2=A0 =C2=A0.name =3D "dma_lcd= free_ck",
+ =C2=A0 =C2=A0.parent =3D &tc_ck,
+ =C2=A0 =C2=A0= .flags =3D CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2= =A0static struct clk api_ck =3D {
- =C2=A0 =C2=A0.name =3D "api_ck&= quot;,
- =C2=A0 =C2=A0.alias =3D "mpui_ck",
- =C2=A0 =C2=A0= .parent =3D &tc_ck,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CL= OCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.name =3D "api_c= k",
+ =C2=A0 =C2=A0.alias =3D "mpui_ck",
+ =C2=A0 =C2= =A0.parent =3D &tc_ck,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 |= CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2=A0stati= c struct clk lb_ck =3D {
- =C2=A0 =C2=A0.name =3D "lb_ck",
= - =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2=A0 =C2=A0.flags =3D CLOCK_I= N_OMAP1510 | CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.name =3D "lb_ck"= ;,
+ =C2=A0 =C2=A0.parent =3D &tc_ck,
+ =C2=A0 =C2=A0.flags =3D C= LOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2=A0static = struct clk lbfree_ck =3D {
- =C2=A0 =C2=A0.name =3D "lbfree_ck"= ;,
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2=A0 =C2=A0.flags =3D C= LOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.name =3D "lbfr= ee_ck",
+ =C2=A0 =C2=A0.parent =3D &tc_ck,
+ =C2=A0 =C2=A0.f= lags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2= =A0static struct clk hsab_ck =3D {
- =C2=A0 =C2=A0.name =3D "hsab_c= k",
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2=A0 =C2=A0.flags= =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.name =3D &quo= t;hsab_ck",
+ =C2=A0 =C2=A0.parent =3D &tc_ck,
+ =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0=C2=A0static struct clk rhea1_ck =3D {
- =C2=A0 =C2=A0.name =3D "= rhea1_ck",
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
+ =C2=A0 =C2=A0.name = =3D "rhea1_ck",
+ =C2=A0 =C2=A0.parent =3D &tc_ck,
+ = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
=C2=A0};
= =C2=A0
=C2=A0static struct clk rhea2_ck =3D {
- =C2=A0 =C2=A0.name = =3D "rhea2_ck",
- =C2=A0 =C2=A0.parent =3D &tc_ck,
- = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
+ =C2=A0 =C2= =A0.name =3D "rhea2_ck",
+ =C2=A0 =C2=A0.parent =3D &tc_ck= ,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
=C2= =A0};
=C2=A0
=C2=A0static struct clk lcd_ck_16xx =3D {
- =C2=A0 = =C2=A0.name =3D "lcd_ck",
- =C2=A0 =C2=A0.parent =3D &clkm= 3,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP730,
+ = =C2=A0 =C2=A0.name =3D "lcd_ck",
+ =C2=A0 =C2=A0.parent =3D &a= mp;clkm3,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP730= ,
=C2=A0};
=C2=A0
=C2=A0static struct clk lcd_ck_1510 =3D {
- = =C2=A0 =C2=A0.name =3D "lcd_ck",
- =C2=A0 =C2=A0.parent =3D &a= mp;clkm3,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310= ,
+ =C2=A0 =C2=A0.name =3D "lcd_ck",
+ =C2=A0 =C2=A0.parent= =3D &clkm3,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_= OMAP310,
=C2=A0};
=C2=A0
=C2=A0static struct clk uart1_1510 =3D {<= br>- =C2=A0 =C2=A0.name =3D "uart1_ck",
+ =C2=A0 =C2=A0.name = =3D "uart1_ck",
=C2=A0 =C2=A0 =C2=A0/* Direct from ULPD, no re= al parent */
- =C2=A0 =C2=A0.parent =3D &armper_ck, /* either armper= _ck or dpll4 */
- =C2=A0 =C2=A0.rate =3D 12000000,
- =C2=A0 =C2=A0.fl= ags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
+ =C2=A0 = =C2=A0.parent =3D &armper_ck, /*g either armper_ck or dpll4 */
+ =C2= =A0 =C2=A0.rate =3D 12000000,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP151= 0 | CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0stati= c struct clk uart1_16xx =3D {
- =C2=A0 =C2=A0.name =3D "uart1_ck&qu= ot;,
+ =C2=A0 =C2=A0.name =3D "uart1_ck",
=C2=A0 =C2=A0 =C2= =A0/* Direct from ULPD, no real parent */
- =C2=A0 =C2=A0.parent =3D &am= p;armper_ck,
- =C2=A0 =C2=A0.rate =3D 48000000,
- =C2=A0 =C2=A0.flags= =3D CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.parent =3D &armper_ck,
+ = =C2=A0 =C2=A0.rate =3D 48000000,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP= 16XX,
=C2=A0};
=C2=A0
=C2=A0static struct clk uart2_ck =3D {
- = =C2=A0 =C2=A0.name =3D "uart2_ck",
+ =C2=A0 =C2=A0.name =3D &q= uot;uart2_ck",
=C2=A0 =C2=A0 =C2=A0/* Direct from ULPD, no real par= ent */
- =C2=A0 =C2=A0.parent =3D &armper_ck, /* either armper_ck or= dpll4 */
- =C2=A0 =C2=A0.rate =3D 12000000,
- =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
+ =C2=A0 = =C2=A0.parent =3D &armper_ck, /*g either armper_ck or dpll4 */
+ =C2= =A0 =C2=A0.rate =3D 12000000,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP151= 0 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310 |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0ALWAYS_ENABLED,
=C2=A0};
=C2=A0
=C2=A0static s= truct clk uart3_1510 =3D {
- =C2=A0 =C2=A0.name =3D "uart3_ck"= ,
+ =C2=A0 =C2=A0.name =3D "uart3_ck",
=C2=A0 =C2=A0 =C2=A0= /* Direct from ULPD, no real parent */
- =C2=A0 =C2=A0.parent =3D &a= rmper_ck, /* either armper_ck or dpll4 */
- =C2=A0 =C2=A0.rate =3D 12000= 000,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | AL= WAYS_ENABLED,
+ =C2=A0 =C2=A0.parent =3D &armper_ck, /*g either armp= er_ck or dpll4 */
+ =C2=A0 =C2=A0.rate =3D 12000000,
+ =C2=A0 =C2=A0.= flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
=C2=A0}= ;
=C2=A0
=C2=A0static struct clk uart3_16xx =3D {
- =C2=A0 =C2=A0.= name =3D "uart3_ck",
+ =C2=A0 =C2=A0.name =3D "uart3_ck&q= uot;,
=C2=A0 =C2=A0 =C2=A0/* Direct from ULPD, no real parent */
- = =C2=A0 =C2=A0.parent =3D &armper_ck,
- =C2=A0 =C2=A0.rate =3D 480000= 00,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.pare= nt =3D &armper_ck,
+ =C2=A0 =C2=A0.rate =3D 48000000,
+ =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
-static struct= clk usb_clk0 =3D { /* 6 MHz output on W4_USB_CLK0 */
- =C2=A0 =C2=A0.na= me =3D "usb_clk0",
- =C2=A0 =C2=A0.alias =3D "usb.clko&qu= ot;,
+static struct clk usb_clk0 =3D { /*g 6 MHz output on W4_USB_CLK0 *= /
+ =C2=A0 =C2=A0.name =3D "usb_clk0",
+ =C2=A0 =C2=A0.alia= s =3D "usb.clko",
=C2=A0 =C2=A0 =C2=A0/* Direct from ULPD, no = parent */
- =C2=A0 =C2=A0.rate =3D 6000000,
- =C2=A0 =C2=A0.flags =3D= CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
+ =C2=A0 =C2= =A0.rate =3D 6000000,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOC= K_IN_OMAP16XX | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2=A0static str= uct clk usb_hhc_ck1510 =3D {
- =C2=A0 =C2=A0.name =3D "usb_hhc_ck&q= uot;,
+ =C2=A0 =C2=A0.name =3D "usb_hhc_ck",
=C2=A0 =C2=A0 = =C2=A0/* Direct from ULPD, no parent */
- =C2=A0 =C2=A0.rate =3D 4800000= 0, /* Actually 2 clocks, 12MHz and 48MHz */
- =C2=A0 =C2=A0.flags =3D CL= OCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.rate =3D 48000000, /= * Actually 2 clocks, 12MHz and 48MHz */
+ =C2=A0 =C2=A0.flags =3D CLOCK_= IN_OMAP1510 | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2=A0static struc= t clk usb_hhc_ck16xx =3D {
- =C2=A0 =C2=A0.name =3D "usb_hhc_ck&quo= t;,
+ =C2=A0 =C2=A0.name =3D "usb_hhc_ck",
=C2=A0 =C2=A0 = =C2=A0/* Direct from ULPD, no parent */
- =C2=A0 =C2=A0.rate =3D 4800000= 0,
+ =C2=A0 =C2=A0.rate =3D 48000000,
=C2=A0 =C2=A0 =C2=A0/* OTG_SYSC= ON_2.OTG_PADEN =3D=3D 0 (not 1510-compatible) */
- =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
= =C2=A0};
=C2=A0
=C2=A0static struct clk usb_w2fc_mclk =3D {
- =C2= =A0 =C2=A0.name =3D "usb_w2fc_mclk",
- =C2=A0 =C2=A0.alias =3D= "usb_w2fc_ck",
- =C2=A0 =C2=A0.parent =3D &ck_48m,
- = =C2=A0 =C2=A0.rate =3D 48000000,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP= 310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.name =3D &q= uot;usb_w2fc_mclk",
+ =C2=A0 =C2=A0.alias =3D "usb_w2fc_ck&quo= t;,
+ =C2=A0 =C2=A0.parent =3D &ck_48m,
+ =C2=A0 =C2=A0.rate =3D = 48000000,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510= | CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
=C2=A0static struct clk mclk= _1510 =3D {
- =C2=A0 =C2=A0.name =3D "mclk",
+ =C2=A0 =C2= =A0.name =3D "mclk",
=C2=A0 =C2=A0 =C2=A0/* Direct from ULPD, = no parent. May be enabled by ext hardware. */
- =C2=A0 =C2=A0.rate =3D 1= 2000000,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510,
+ =C2=A0 =C2=A0= .rate =3D 12000000,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP1510,
=C2= =A0};
=C2=A0
=C2=A0static struct clk bclk_310 =3D {
- =C2=A0 =C2= =A0.name =3D "bt_mclk_out", /* Alias midi_mclk_out? */
- =C2= =A0 =C2=A0.parent =3D &armper_ck,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN= _OMAP310,
+ =C2=A0 =C2=A0.name =3D "bt_mclk_out", /*g Alias mi= di_mclk_out? */
+ =C2=A0 =C2=A0.parent =3D &armper_ck,
+ =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2=A0static st= ruct clk mclk_310 =3D {
- =C2=A0 =C2=A0.name =3D "com_mclk_out"= ;,
- =C2=A0 =C2=A0.parent =3D &armper_ck,
- =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP310,
+ =C2=A0 =C2=A0.name =3D "com_mclk_out",=
+ =C2=A0 =C2=A0.parent =3D &armper_ck,
+ =C2=A0 =C2=A0.flags =3D= CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0
=C2=A0static struct clk mclk_16= xx =3D {
- =C2=A0 =C2=A0.name =3D "mclk",
+ =C2=A0 =C2=A0.n= ame =3D "mclk",
=C2=A0 =C2=A0 =C2=A0/* Direct from ULPD, no pa= rent. May be enabled by ext hardware. */
- =C2=A0 =C2=A0.flags =3D CLOCK= _IN_OMAP16XX,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
=C2=A0};=C2=A0
=C2=A0static struct clk bclk_1510 =3D {
- =C2=A0 =C2=A0.name= =3D "bclk",
+ =C2=A0 =C2=A0.name =3D "bclk",
=C2= =A0 =C2=A0 =C2=A0/* Direct from ULPD, no parent. May be enabled by ext hard= ware. */
- =C2=A0 =C2=A0.rate =3D 12000000,
- =C2=A0 =C2=A0.flags =3D= CLOCK_IN_OMAP1510,
+ =C2=A0 =C2=A0.rate =3D 12000000,
+ =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP1510,
=C2=A0};
=C2=A0
=C2=A0static stru= ct clk bclk_16xx =3D {
- =C2=A0 =C2=A0.name =3D "bclk",
+ = =C2=A0 =C2=A0.name =3D "bclk",
=C2=A0 =C2=A0 =C2=A0/* Direct f= rom ULPD, no parent. May be enabled by ext hardware. */
- =C2=A0 =C2=A0.= flags =3D CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX= ,
=C2=A0};
=C2=A0
=C2=A0static struct clk mmc1_ck =3D {
- =C2= =A0 =C2=A0.name =3D "mmc_ck",
- =C2=A0 =C2=A0.id =3D 1,
+ = =C2=A0 =C2=A0.name =3D "mmc_ck",
+ =C2=A0 =C2=A0.id =C2=A0=3D = 1,
=C2=A0 =C2=A0 =C2=A0/* Functional clock is direct from ULPD, interfac= e clock is ARMPER */
- =C2=A0 =C2=A0.parent =3D &armper_ck, /* eithe= r armper_ck or dpll4 */
- =C2=A0 =C2=A0.rate =3D 48000000,
- =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,<= br>+ =C2=A0 =C2=A0.parent =3D &armper_ck, /*g either armper_ck or dpll4= */
+ =C2=A0 =C2=A0.rate =3D 48000000,
+ =C2=A0 =C2=A0.flags =3D CLOC= K_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP310,
=C2=A0};
=C2=A0=
=C2=A0static struct clk mmc2_ck =3D {
- =C2=A0 =C2=A0.name =3D "= ;mmc_ck",
- =C2=A0 =C2=A0.id =3D 2,
+ =C2=A0 =C2=A0.name =3D &q= uot;mmc_ck",
+ =C2=A0 =C2=A0.id =C2=A0=3D 2,
=C2=A0 =C2=A0 =C2= =A0/* Functional clock is direct from ULPD, interface clock is ARMPER */- =C2=A0 =C2=A0.parent =3D &armper_ck,
- =C2=A0 =C2=A0.rate =3D 480= 00000,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.p= arent =3D &armper_ck,
+ =C2=A0 =C2=A0.rate =3D 48000000,
+ =C2=A0= =C2=A0.flags =3D CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
=C2=A0static = struct clk cam_mclk =3D {
- =C2=A0 =C2=A0.name =3D "cam.mclk",=
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_= IN_OMAP16XX,
- =C2=A0 =C2=A0.rate =3D 12000000,
+ =C2=A0 =C2=A0.name = =3D "cam.mclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | C= LOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.rate =3D 12000000,=
=C2=A0};
=C2=A0
=C2=A0static struct clk cam_exclk =3D {
- =C2= =A0 =C2=A0.name =3D "cam.exclk",
- =C2=A0 =C2=A0.flags =3D CLO= CK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.n= ame =3D "cam.exclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP31= 0 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX,
=C2=A0 =C2=A0 =C2=A0/* Either= 12M from cam.mclk or 48M from dpll4 */
- =C2=A0 =C2=A0.parent =3D &= cam_mclk,
+ =C2=A0 =C2=A0.parent =3D &cam_mclk,
=C2=A0};
=C2= =A0
=C2=A0static struct clk cam_lclk =3D {
- =C2=A0 =C2=A0.name =3D &= quot;cam.lclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_= IN_OMAP1510 | CLOCK_IN_OMAP16XX,
+ =C2=A0 =C2=A0.name =3D "cam.lclk= ",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 |= CLOCK_IN_OMAP16XX,
=C2=A0};
=C2=A0
=C2=A0static struct clk i2c_fc= k =3D {
- =C2=A0 =C2=A0.name =3D "i2c_fck",
- =C2=A0 =C2=A0= .id =3D 1,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP15= 10 | CLOCK_IN_OMAP16XX |
+ =C2=A0 =C2=A0.name =3D "i2c_fck",+ =C2=A0 =C2=A0.id =C2=A0=3D 1,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMA= P310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0ALWAYS_ENABLED,
- =C2=A0 =C2=A0.parent =3D &= armxor_ck,
+ =C2=A0 =C2=A0.parent =3D &armxor_ck,
=C2=A0};
=C2= =A0
=C2=A0static struct clk i2c_ick =3D {
- =C2=A0 =C2=A0.name =3D &q= uot;i2c_ick",
- =C2=A0 =C2=A0.id =3D 1,
- =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
- =C2=A0 =C2=A0.parent =3D &= armper_ck,
+ =C2=A0 =C2=A0.name =3D "i2c_ick",
+ =C2=A0 =C2= =A0.id =C2=A0=3D 1,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP16XX | ALWAYS= _ENABLED,
+ =C2=A0 =C2=A0.parent =3D &armper_ck,
=C2=A0};
=C2= =A0
=C2=A0static struct clk clk32k =3D {
- =C2=A0 =C2=A0.name =3D &qu= ot;clk32-kHz",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_I= N_OMAP1510 | CLOCK_IN_OMAP16XX |
+ =C2=A0 =C2=A0.name =3D "clk32-kH= z",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 = | CLOCK_IN_OMAP16XX |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CL= OCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED,
- =C2=A0 =C2=A0.pa= rent =3D &xtal_osc32k,
+ =C2=A0 =C2=A0.parent =3D &xtal_osc32k,<= br>=C2=A0};
=C2=A0
=C2=A0static struct clk ref_clk =3D {
- =C2=A0 = =C2=A0.name =3D "ref_clk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_= OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED,
- =C2=A0 =C2=A0.rate =3D = 12000000, /* 12 MHz or 13 MHz or 19.2 MHz */
- =C2=A0 =C2=A0/*.parent = =3D sys.xtalin */
+ =C2=A0 =C2=A0.name =3D "ref_clk",
+ =C2= =A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED= ,
+ =C2=A0 =C2=A0.rate =3D 12000000, /*g 12 MHz or 13 MHz or 19.2 MHz */=
+ =C2=A0 =C2=A0/*.parent =3D sys.xtalin */
=C2=A0};
=C2=A0
=C2= =A0static struct clk apll_96m =3D {
- =C2=A0 =C2=A0.name =3D "apll_= 96m",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP24= 3X | ALWAYS_ENABLED,
- =C2=A0 =C2=A0.rate =3D 96000000,
- =C2=A0 =C2= =A0/*.parent =3D ref_clk */
+ =C2=A0 =C2=A0.name =3D "apll_96m"= ;,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALW= AYS_ENABLED,
+ =C2=A0 =C2=A0.rate =3D 96000000,
+ =C2=A0 =C2=A0/*.par= ent =3D ref_clk */
=C2=A0};
=C2=A0
=C2=A0static struct clk apll_54= m =3D {
- =C2=A0 =C2=A0.name =3D "apll_54m",
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED,
- = =C2=A0 =C2=A0.rate =3D 54000000,
- =C2=A0 =C2=A0/*.parent =3D ref_clk */=
+ =C2=A0 =C2=A0.name =3D "apll_54m",
+ =C2=A0 =C2=A0.flags= =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED,
+ =C2=A0 = =C2=A0.rate =3D 54000000,
+ =C2=A0 =C2=A0/*.parent =3D ref_clk */
=C2= =A0};
=C2=A0
=C2=A0static struct clk sys_clk =3D {
- =C2=A0 =C2=A0= .name =3D "sys_clk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP24= 2X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED,
- =C2=A0 =C2=A0.rate =3D 32768,=
- =C2=A0 =C2=A0/*.parent =3D sys.xtalin */
+ =C2=A0 =C2=A0.name =3D = "sys_clk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK= _IN_OMAP243X | ALWAYS_ENABLED,
+ =C2=A0 =C2=A0.rate =3D 32768,
+ =C2= =A0 =C2=A0/*.parent =3D sys.xtalin */
=C2=A0};
=C2=A0
=C2=A0static= struct clk sleep_clk =3D {
- =C2=A0 =C2=A0.name =3D "sleep_clk&quo= t;,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | AL= WAYS_ENABLED,
- =C2=A0 =C2=A0.rate =3D 32768,
- =C2=A0 =C2=A0/*.paren= t =3D sys.xtalin */
+ =C2=A0 =C2=A0.name =3D "sleep_clk",
+= =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENA= BLED,
+ =C2=A0 =C2=A0.rate =3D 32768,
+ =C2=A0 =C2=A0/*.parent =3D sy= s.xtalin */
=C2=A0};
=C2=A0
=C2=A0static struct clk dpll_ck =3D {<= br>- =C2=A0 =C2=A0.name =3D "dpll",
- =C2=A0 =C2=A0.flags =3D = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED,
- =C2=A0 =C2=A0.= parent =3D &ref_clk,
+ =C2=A0 =C2=A0.name =3D "dpll",
+= =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENA= BLED,
+ =C2=A0 =C2=A0.parent =3D &ref_clk,
=C2=A0};
=C2=A0
= =C2=A0static struct clk dpll_x2_ck =3D {
- =C2=A0 =C2=A0.name =3D "= dpll_x2",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OM= AP243X | ALWAYS_ENABLED,
- =C2=A0 =C2=A0.parent =3D &ref_clk,
+ = =C2=A0 =C2=A0.name =3D "dpll_x2",
+ =C2=A0 =C2=A0.flags =3D CL= OCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED,
+ =C2=A0 =C2=A0.pa= rent =3D &ref_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk wdt= 1_sys_clk =3D {
- =C2=A0 =C2=A0.name =3D "wdt1_sys_clk",
- = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENAB= LED,
- =C2=A0 =C2=A0.rate =3D 32768,
- =C2=A0 =C2=A0/*.parent =3D sys= .xtalin */
+ =C2=A0 =C2=A0.name =3D "wdt1_sys_clk",
+ =C2= =A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ALWAYS_ENABLED= ,
+ =C2=A0 =C2=A0.rate =3D 32768,
+ =C2=A0 =C2=A0/*.parent =3D sys.xt= alin */
=C2=A0};
=C2=A0
=C2=A0static struct clk func_96m_clk =3D {=
- =C2=A0 =C2=A0.name =3D "func_96m_clk",
- =C2=A0 =C2=A0.f= lags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.divisor = =3D 1,
- =C2=A0 =C2=A0.parent =3D &apll_96m,
+ =C2=A0 =C2=A0.name= =3D "func_96m_clk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP24= 2X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.divisor =3D 1,
+ =C2=A0 =C2= =A0.parent =3D &apll_96m,
=C2=A0};
=C2=A0
=C2=A0static struct = clk func_48m_clk =3D {
- =C2=A0 =C2=A0.name =3D "func_48m_clk"= ,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- = =C2=A0 =C2=A0.divisor =3D 2,
- =C2=A0 =C2=A0.parent =3D &apll_96m,+ =C2=A0 =C2=A0.name =3D "func_48m_clk",
+ =C2=A0 =C2=A0.fla= gs =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.divisor = =3D 2,
+ =C2=A0 =C2=A0.parent =3D &apll_96m,
=C2=A0};
=C2=A0=C2=A0static struct clk func_12m_clk =3D {
- =C2=A0 =C2=A0.name =3D &q= uot;func_12m_clk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CL= OCK_IN_OMAP243X,
- =C2=A0 =C2=A0.divisor =3D 8,
- =C2=A0 =C2=A0.paren= t =3D &apll_96m,
+ =C2=A0 =C2=A0.name =3D "func_12m_clk",<= br>+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ = =C2=A0 =C2=A0.divisor =3D 8,
+ =C2=A0 =C2=A0.parent =3D &apll_96m,=C2=A0};
=C2=A0
=C2=A0static struct clk func_54m_clk =3D {
- =C2= =A0 =C2=A0.name =3D "func_54m_clk",
- =C2=A0 =C2=A0.flags =3D = CLOCK_IN_OMAP242X,
- =C2=A0 =C2=A0.divisor =3D 1,
- =C2=A0 =C2=A0.par= ent =3D &apll_54m,
+ =C2=A0 =C2=A0.name =3D "func_54m_clk"= ,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X,
+ =C2=A0 =C2=A0.diviso= r =3D 1,
+ =C2=A0 =C2=A0.parent =3D &apll_54m,
=C2=A0};
=C2=A0=
=C2=A0static struct clk sys_clkout =3D {
- =C2=A0 =C2=A0.name =3D &q= uot;clkout",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN= _OMAP243X,
- =C2=A0 =C2=A0.parent =3D &sys_clk,
+ =C2=A0 =C2=A0.n= ame =3D "clkout",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X = | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &sys_clk,
=C2=A0}= ;
=C2=A0
=C2=A0static struct clk sys_clkout2 =3D {
- =C2=A0 =C2=A0= .name =3D "clkout2",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP24= 2X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &sys_clk,
+ = =C2=A0 =C2=A0.name =3D "clkout2",
+ =C2=A0 =C2=A0.flags =3D CL= OCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &sys= _clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk core_clk =3D {
- = =C2=A0 =C2=A0.name =3D "core_clk",
- =C2=A0 =C2=A0.flags =3D C= LOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &dp= ll_x2_ck, /* Switchable between dpll_ck and clk32k */
+ =C2=A0 =C2=A0.na= me =3D "core_clk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X= | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &dpll_x2_ck, /*g Sw= itchable between dpll_ck and clk32k */
=C2=A0};
=C2=A0
=C2=A0stati= c struct clk l3_clk =3D {
- =C2=A0 =C2=A0.name =3D "l3_clk",- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2= =A0 =C2=A0.parent =3D &core_clk,
+ =C2=A0 =C2=A0.name =3D "l3_c= lk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243= X,
+ =C2=A0 =C2=A0.parent =3D &core_clk,
=C2=A0};
=C2=A0
= =C2=A0static struct clk core_l4_iclk =3D {
- =C2=A0 =C2=A0.name =3D &quo= t;core_l4_iclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOC= K_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &l3_clk,
+ =C2=A0 =C2= =A0.name =3D "core_l4_iclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_I= N_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &l3_clk,<= br>=C2=A0};
=C2=A0
=C2=A0static struct clk wu_l4_iclk =3D {
- =C2= =A0 =C2=A0.name =3D "wu_l4_iclk",
- =C2=A0 =C2=A0.flags =3D CL= OCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &l3_= clk,
+ =C2=A0 =C2=A0.name =3D "wu_l4_iclk",
+ =C2=A0 =C2=A0= .flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent= =3D &l3_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk core_l3_= iclk =3D {
- =C2=A0 =C2=A0.name =3D "core_l3_iclk",
- =C2= =A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2= =A0.parent =3D &core_clk,
+ =C2=A0 =C2=A0.name =3D "core_l3_icl= k",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X= ,
+ =C2=A0 =C2=A0.parent =3D &core_clk,
=C2=A0};
=C2=A0
=C2= =A0static struct clk core_l4_usb_clk =3D {
- =C2=A0 =C2=A0.name =3D &quo= t;core_l4_usb_clk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | C= LOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &l3_clk,
+ =C2=A0 = =C2=A0.name =3D "core_l4_usb_clk",
+ =C2=A0 =C2=A0.flags =3D C= LOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &l3= _clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk wu_gpt1_clk =3D {- =C2=A0 =C2=A0.name =3D "wu_gpt1_clk",
- =C2=A0 =C2=A0.flags= =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &= amp;sys_clk,
+ =C2=A0 =C2=A0.name =3D "wu_gpt1_clk",
+ =C2= =A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2= =A0.parent =3D &sys_clk,
=C2=A0};
=C2=A0
=C2=A0static struct c= lk wu_32k_clk =3D {
- =C2=A0 =C2=A0.name =3D "wu_32k_clk",
= - =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2= =A0 =C2=A0.parent =3D &sys_clk,
+ =C2=A0 =C2=A0.name =3D "wu_32= k_clk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP= 243X,
+ =C2=A0 =C2=A0.parent =3D &sys_clk,
=C2=A0};
=C2=A0
= =C2=A0static struct clk uart1_fclk =3D {
- =C2=A0 =C2=A0.name =3D "= uart1_fclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN= _OMAP243X,
- =C2=A0 =C2=A0.parent =3D &func_48m_clk,
+ =C2=A0 =C2= =A0.name =3D "uart1_fclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_= OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &func_48m_c= lk,
=C2=A0};
=C2=A0
=C2=A0static struct clk uart1_iclk =3D {
- = =C2=A0 =C2=A0.name =3D "uart1_iclk",
- =C2=A0 =C2=A0.flags =3D= CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &= core_l4_iclk,
+ =C2=A0 =C2=A0.name =3D "uart1_iclk",
+ =C2= =A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2= =A0.parent =3D &core_l4_iclk,
=C2=A0};
=C2=A0
=C2=A0static str= uct clk uart2_fclk =3D {
- =C2=A0 =C2=A0.name =3D "uart2_fclk"= ,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- = =C2=A0 =C2=A0.parent =3D &func_48m_clk,
+ =C2=A0 =C2=A0.name =3D &qu= ot;uart2_fclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK= _IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &func_48m_clk,
=C2=A0};<= br>=C2=A0
=C2=A0static struct clk uart2_iclk =3D {
- =C2=A0 =C2=A0.na= me =3D "uart2_iclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP24= 2X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &core_l4_iclk,+ =C2=A0 =C2=A0.name =3D "uart2_iclk",
+ =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &a= mp;core_l4_iclk,
=C2=A0};
=C2=A0
=C2=A0static struct clk uart3_fcl= k =3D {
- =C2=A0 =C2=A0.name =3D "uart3_fclk",
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.par= ent =3D &func_48m_clk,
+ =C2=A0 =C2=A0.name =3D "uart3_fclk&quo= t;,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
= + =C2=A0 =C2=A0.parent =3D &func_48m_clk,
=C2=A0};
=C2=A0
=C2= =A0static struct clk uart3_iclk =3D {
- =C2=A0 =C2=A0.name =3D "uar= t3_iclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OM= AP243X,
- =C2=A0 =C2=A0.parent =3D &core_l4_iclk,
+ =C2=A0 =C2=A0= .name =3D "uart3_iclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMA= P242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &core_l4_iclk,=
=C2=A0};
=C2=A0
=C2=A0static struct clk mpu_fclk =3D {
- =C2= =A0 =C2=A0.name =3D "mpu_fclk",
- =C2=A0 =C2=A0.flags =3D CLOC= K_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &core_= clk,
+ =C2=A0 =C2=A0.name =3D "mpu_fclk",
+ =C2=A0 =C2=A0.f= lags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent = =3D &core_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk mpu_icl= k =3D {
- =C2=A0 =C2=A0.name =3D "mpu_iclk",
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.par= ent =3D &core_clk,
+ =C2=A0 =C2=A0.name =3D "mpu_iclk",+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2= =A0 =C2=A0.parent =3D &core_clk,
=C2=A0};
=C2=A0
=C2=A0static = struct clk int_m_fclk =3D {
- =C2=A0 =C2=A0.name =3D "int_m_fclk&qu= ot;,
- =C2=A0 =C2=A0.alias =3D "mpu_intc_fclk",
- =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.= parent =3D &core_clk,
+ =C2=A0 =C2=A0.name =3D "int_m_fclk"= ;,
+ =C2=A0 =C2=A0.alias =3D "mpu_intc_fclk",
+ =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.par= ent =3D &core_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk int= _m_iclk =3D {
- =C2=A0 =C2=A0.name =3D "int_m_iclk",
- =C2= =A0 =C2=A0.alias =3D "mpu_intc_iclk",
- =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &a= mp;core_clk,
+ =C2=A0 =C2=A0.name =3D "int_m_iclk",
+ =C2= =A0 =C2=A0.alias =3D "mpu_intc_iclk",
+ =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &a= mp;core_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk core_gpt2_clk= =3D {
- =C2=A0 =C2=A0.name =3D "core_gpt2_clk",
- =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.= parent =3D &sys_clk,
+ =C2=A0 =C2=A0.name =3D "core_gpt2_clk&qu= ot;,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,+ =C2=A0 =C2=A0.parent =3D &sys_clk,
=C2=A0};
=C2=A0
=C2=A0st= atic struct clk core_gpt3_clk =3D {
- =C2=A0 =C2=A0.name =3D "core_= gpt3_clk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_O= MAP243X,
- =C2=A0 =C2=A0.parent =3D &sys_clk,
+ =C2=A0 =C2=A0.nam= e =3D "core_gpt3_clk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP= 242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &sys_clk,
= =C2=A0};
=C2=A0
=C2=A0static struct clk core_gpt4_clk =3D {
- =C2= =A0 =C2=A0.name =3D "core_gpt4_clk",
- =C2=A0 =C2=A0.flags =3D= CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &= sys_clk,
+ =C2=A0 =C2=A0.name =3D "core_gpt4_clk",
+ =C2=A0= =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0= .parent =3D &sys_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk = core_gpt5_clk =3D {
- =C2=A0 =C2=A0.name =3D "core_gpt5_clk",<= br>- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- = =C2=A0 =C2=A0.parent =3D &sys_clk,
+ =C2=A0 =C2=A0.name =3D "co= re_gpt5_clk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_I= N_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &sys_clk,
=C2=A0};
=C2= =A0
=C2=A0static struct clk core_gpt6_clk =3D {
- =C2=A0 =C2=A0.name = =3D "core_gpt6_clk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP24= 2X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &sys_clk,
+ = =C2=A0 =C2=A0.name =3D "core_gpt6_clk",
+ =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &a= mp;sys_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk core_gpt7_clk = =3D {
- =C2=A0 =C2=A0.name =3D "core_gpt7_clk",
- =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.= parent =3D &sys_clk,
+ =C2=A0 =C2=A0.name =3D "core_gpt7_clk&qu= ot;,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,+ =C2=A0 =C2=A0.parent =3D &sys_clk,
=C2=A0};
=C2=A0
=C2=A0st= atic struct clk core_gpt8_clk =3D {
- =C2=A0 =C2=A0.name =3D "core_= gpt8_clk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_O= MAP243X,
- =C2=A0 =C2=A0.parent =3D &sys_clk,
+ =C2=A0 =C2=A0.nam= e =3D "core_gpt8_clk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP= 242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &sys_clk,
= =C2=A0};
=C2=A0
=C2=A0static struct clk core_gpt9_clk =3D {
- =C2= =A0 =C2=A0.name =3D "core_gpt9_clk",
- =C2=A0 =C2=A0.flags =3D= CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &= sys_clk,
+ =C2=A0 =C2=A0.name =3D "core_gpt9_clk",
+ =C2=A0= =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0= .parent =3D &sys_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk = core_gpt10_clk =3D {
- =C2=A0 =C2=A0.name =3D "core_gpt10_clk"= ,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- = =C2=A0 =C2=A0.parent =3D &sys_clk,
+ =C2=A0 =C2=A0.name =3D "co= re_gpt10_clk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_= IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &sys_clk,
=C2=A0};
=C2= =A0
=C2=A0static struct clk core_gpt11_clk =3D {
- =C2=A0 =C2=A0.name= =3D "core_gpt11_clk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP= 242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &sys_clk,
+ = =C2=A0 =C2=A0.name =3D "core_gpt11_clk",
+ =C2=A0 =C2=A0.flags= =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &= amp;sys_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk core_gpt12_cl= k =3D {
- =C2=A0 =C2=A0.name =3D "core_gpt12_clk",
- =C2=A0= =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0= .parent =3D &sys_clk,
+ =C2=A0 =C2=A0.name =3D "core_gpt12_clk&= quot;,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,<= br>+ =C2=A0 =C2=A0.parent =3D &sys_clk,
=C2=A0};
=C2=A0
=C2=A0= static struct clk mcbsp1_clk =3D {
- =C2=A0 =C2=A0.name =3D "mcbsp1= _cg",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP24= 3X,
- =C2=A0 =C2=A0.divisor =3D 2,
- =C2=A0 =C2=A0.parent =3D &fu= nc_96m_clk,
+ =C2=A0 =C2=A0.name =3D "mcbsp1_cg",
+ =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.= divisor =3D 2,
+ =C2=A0 =C2=A0.parent =3D &func_96m_clk,
=C2=A0};=
=C2=A0
=C2=A0static struct clk mcbsp2_clk =3D {
- =C2=A0 =C2=A0.n= ame =3D "mcbsp2_cg",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP24= 2X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.divisor =3D 2,
- =C2=A0 =C2= =A0.parent =3D &func_96m_clk,
+ =C2=A0 =C2=A0.name =3D "mcbsp2_= cg",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243= X,
+ =C2=A0 =C2=A0.divisor =3D 2,
+ =C2=A0 =C2=A0.parent =3D &fun= c_96m_clk,
=C2=A0};
=C2=A0
=C2=A0static struct clk emul_clk =3D {<= br>- =C2=A0 =C2=A0.name =3D "emul_ck",
- =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &a= mp;func_54m_clk,
+ =C2=A0 =C2=A0.name =3D "emul_ck",
+ =C2= =A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2= =A0.parent =3D &func_54m_clk,
=C2=A0};
=C2=A0
=C2=A0static str= uct clk sdma_fclk =3D {
- =C2=A0 =C2=A0.name =3D "sdma_fclk",<= br>- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- = =C2=A0 =C2=A0.parent =3D &l3_clk,
+ =C2=A0 =C2=A0.name =3D "sdm= a_fclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMA= P243X,
+ =C2=A0 =C2=A0.parent =3D &l3_clk,
=C2=A0};
=C2=A0
= =C2=A0static struct clk sdma_iclk =3D {
- =C2=A0 =C2=A0.name =3D "s= dma_iclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_O= MAP243X,
- =C2=A0 =C2=A0.parent =3D &core_l3_iclk, /* core_l4_iclk f= or the configuration port */
+ =C2=A0 =C2=A0.name =3D "sdma_iclk&qu= ot;,
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,+ =C2=A0 =C2=A0.parent =3D &core_l3_iclk, /* core_l4_iclk for the conf= iguration port */
=C2=A0};
=C2=A0
=C2=A0static struct clk i2c1_fcl= k =3D {
- =C2=A0 =C2=A0.name =3D "i2c1.fclk",
- =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.par= ent =3D &func_12m_clk,
- =C2=A0 =C2=A0.divisor =3D 1,
+ =C2=A0 = =C2=A0.name =3D "i2c1.fclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_I= N_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &func_12m= _clk,
+ =C2=A0 =C2=A0.divisor =3D 1,
=C2=A0};
=C2=A0
=C2=A0stat= ic struct clk i2c1_iclk =3D {
- =C2=A0 =C2=A0.name =3D "i2c1.iclk&q= uot;,
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,- =C2=A0 =C2=A0.parent =3D &core_l4_iclk,
+ =C2=A0 =C2=A0.name =3D= "i2c1.iclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CL= OCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &core_l4_iclk,
=C2=A0= };
=C2=A0
=C2=A0static struct clk i2c2_fclk =3D {
- =C2=A0 =C2=A0.= name =3D "i2c2.fclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP2= 42X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &func_12m_clk,- =C2=A0 =C2=A0.divisor =3D 1,
+ =C2=A0 =C2=A0.name =3D "i2c2.fcl= k",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X= ,
+ =C2=A0 =C2=A0.parent =3D &func_12m_clk,
+ =C2=A0 =C2=A0.divis= or =3D 1,
=C2=A0};
=C2=A0
=C2=A0static struct clk i2c2_iclk =3D {<= br>- =C2=A0 =C2=A0.name =3D "i2c2.iclk",
- =C2=A0 =C2=A0.flags= =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &= amp;core_l4_iclk,
+ =C2=A0 =C2=A0.name =3D "i2c2.iclk",
+ = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 = =C2=A0.parent =3D &core_l4_iclk,
=C2=A0};
=C2=A0
=C2=A0static = struct clk gpio_dbclk[5] =3D {
=C2=A0 =C2=A0 =C2=A0{
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.name =3D "gpio1_dbclk",
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.parent =3D &wu_32k_clk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.= name =3D "gpio1_dbclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= .parent =3D &wu_32k_clk,
=C2=A0 =C2=A0 =C2=A0}, {
- =C2=A0 =C2=A0= =C2=A0 =C2=A0.name =3D "gpio2_dbclk",
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.parent =3D &wu_32k_clk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.= name =3D "gpio2_dbclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= .parent =3D &wu_32k_clk,
=C2=A0 =C2=A0 =C2=A0}, {
- =C2=A0 =C2=A0= =C2=A0 =C2=A0.name =3D "gpio3_dbclk",
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.parent =3D &wu_32k_clk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.= name =3D "gpio3_dbclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= .parent =3D &wu_32k_clk,
=C2=A0 =C2=A0 =C2=A0}, {
- =C2=A0 =C2=A0= =C2=A0 =C2=A0.name =3D "gpio4_dbclk",
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.parent =3D &wu_32k_clk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.= name =3D "gpio4_dbclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= .parent =3D &wu_32k_clk,
=C2=A0 =C2=A0 =C2=A0}, {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0.name =C2=A0 =3D "gpio5_dbclk",
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0.flags =C2=A0=3D CLOCK_IN_OMAP243X,
@@ -864,90 += 864,90 @@ static struct clk gpio_dbclk[5] =3D {
=C2=A0};
=C2=A0
= =C2=A0static struct clk gpio_iclk =3D {
- =C2=A0 =C2=A0.name =3D "g= pio_iclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_O= MAP243X,
- =C2=A0 =C2=A0.parent =3D &wu_l4_iclk,
+ =C2=A0 =C2=A0.= name =3D "gpio_iclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP2= 42X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &wu_l4_iclk,
= =C2=A0};
=C2=A0
=C2=A0static struct clk mmc_fck =3D {
- =C2=A0 =C2= =A0.name =3D "mmc_fclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OM= AP242X,
- =C2=A0 =C2=A0.parent =3D &func_96m_clk,
+ =C2=A0 =C2=A0= .name =3D "mmc_fclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP2= 42X,
+ =C2=A0 =C2=A0.parent =3D &func_96m_clk,
=C2=A0};
=C2=A0=
=C2=A0static struct clk mmc_ick =3D {
- =C2=A0 =C2=A0.name =3D "= ;mmc_iclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X,
- =C2= =A0 =C2=A0.parent =3D &core_l4_iclk,
+ =C2=A0 =C2=A0.name =3D "= mmc_iclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X,
+ =C2=A0= =C2=A0.parent =3D &core_l4_iclk,
=C2=A0};
=C2=A0
=C2=A0static= struct clk spi_fclk[3] =3D {
=C2=A0 =C2=A0 =C2=A0{
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.name =3D "spi1_fclk",
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0.parent =3D &func_48m_clk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.n= ame =3D "spi1_fclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D C= LOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.pare= nt =3D &func_48m_clk,
=C2=A0 =C2=A0 =C2=A0}, {
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.name =3D "spi2_fclk",
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0.parent =3D &func_48m_clk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.n= ame =3D "spi2_fclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D C= LOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.pare= nt =3D &func_48m_clk,
=C2=A0 =C2=A0 =C2=A0}, {
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.name =3D "spi3_fclk",
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 =C2=A0 =C2=A0.parent = =3D &func_48m_clk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.name =3D "spi3= _fclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP243X,<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.parent =3D &func_48m_clk,
=C2=A0 = =C2=A0 =C2=A0},
=C2=A0};
=C2=A0
=C2=A0static struct clk dss_clk[2]= =3D {
=C2=A0 =C2=A0 =C2=A0{
- =C2=A0 =C2=A0 =C2=A0 =C2=A0.name =3D &= quot;dss_clk1",
- =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D CLOCK_IN_OM= AP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 =C2=A0 =C2=A0.parent =3D &am= p;core_clk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.name =3D "dss_clk1",=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OM= AP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.parent =3D &core_clk,
=C2= =A0 =C2=A0 =C2=A0}, {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0.name =3D "dss_c= lk2",
- =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | C= LOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 =C2=A0 =C2=A0.parent =3D &sys_clk,=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.name =3D "dss_clk2",
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.parent =3D &sys_clk,
=C2=A0 =C2=A0 = =C2=A0},
=C2=A0};
=C2=A0
=C2=A0static struct clk dss_54m_clk =3D {=
- =C2=A0 =C2=A0.name =3D "dss_54m_clk",
- =C2=A0 =C2=A0.fl= ags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent = =3D &func_54m_clk,
+ =C2=A0 =C2=A0.name =3D "dss_54m_clk",=
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ = =C2=A0 =C2=A0.parent =3D &func_54m_clk,
=C2=A0};
=C2=A0
=C2=A0= static struct clk dss_l3_iclk =3D {
- =C2=A0 =C2=A0.name =3D "dss_l= 3_iclk",
- =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMA= P243X,
- =C2=A0 =C2=A0.parent =3D &core_l3_iclk,
+ =C2=A0 =C2=A0.= name =3D "dss_l3_iclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMA= P242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0.parent =3D &core_l3_iclk,=
=C2=A0};
=C2=A0
=C2=A0static struct clk dss_l4_iclk =3D {
- = =C2=A0 =C2=A0.name =3D "dss_l4_iclk",
- =C2=A0 =C2=A0.flags = =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0.parent =3D &a= mp;core_l4_iclk,
+ =C2=A0 =C2=A0.name =3D "dss_l4_iclk",
+ = =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 = =C2=A0.parent =3D &core_l4_iclk,
=C2=A0};
=C2=A0
=C2=A0static = struct clk spi_iclk[3] =3D {
=C2=A0 =C2=A0 =C2=A0{
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.name =3D "spi1_iclk",
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0.parent =3D &core_l4_iclk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.n= ame =3D "spi1_iclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D C= LOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.pare= nt =3D &core_l4_iclk,
=C2=A0 =C2=A0 =C2=A0}, {
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.name =3D "spi2_iclk",
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0.parent =3D &core_l4_iclk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.n= ame =3D "spi2_iclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D C= LOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.pare= nt =3D &core_l4_iclk,
=C2=A0 =C2=A0 =C2=A0}, {
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0.name =3D "spi3_iclk",
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0.flags =3D CLOCK_IN_OMAP243X,
- =C2=A0 =C2=A0 =C2=A0 =C2=A0.parent = =3D &core_l4_iclk,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.name =3D "spi3= _iclk",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.flags =3D CLOCK_IN_OMAP243X,<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0.parent =3D &core_l4_iclk,
=C2=A0 = =C2=A0 =C2=A0},
=C2=A0};
=C2=A0
=C2=A0static struct clk omapctrl_c= lk =3D {
- =C2=A0 =C2=A0.name =3D "omapctrl_iclk",
- =C2=A0= =C2=A0.flags =3D CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
+ =C2=A0 =C2=A0= .name =3D "omapctrl_iclk",
+ =C2=A0 =C2=A0.flags =3D CLOCK_IN_= OMAP242X | CLOCK_IN_OMAP243X,
=C2=A0 =C2=A0 =C2=A0/* XXX Should be in WK= UP domain */
- =C2=A0 =C2=A0.parent =3D &core_l4_iclk,
+ =C2=A0 = =C2=A0.parent =3D &core_l4_iclk,
=C2=A0};
=C2=A0
=C2=A0static = struct clk *onchip_clks[] =3D {
@@ -1100,7 +1100,9 @@ void omap_clk_addu= ser(struct clk *clk, qemu_irq user)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0qemu_= irq *i;
=C2=A0
- =C2=A0 =C2=A0for (i =3D clk->users; *i; i ++);+ =C2=A0 =C2=A0for (i =3D clk->users; *i; i++) {
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0;
+ =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0*i =3D user;
=C2= =A0}
=C2=A0
@@ -1108,21 +1110,23 @@ struct clk *omap_findclk(struct o= map_mpu_state_s *mpu, const char *name)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0s= truct clk *i;
=C2=A0
- =C2=A0 =C2=A0for (i =3D mpu->clks; i->na= me; i ++)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!strcmp(i->name, name) || = (i->alias && !strcmp(i->alias, name)))
+ =C2=A0 =C2=A0for = (i =3D mpu->clks; i->name; i++)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!= strcmp(i->name, name) || (i->alias && !strcmp(i->alias, na= me))) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return i;
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0hw_error("%s: %s n= ot found\n", __func__, name);
=C2=A0}
=C2=A0
=C2=A0void omap_= clk_get(struct clk *clk)
=C2=A0{
- =C2=A0 =C2=A0clk->usecount ++;<= br>+ =C2=A0 =C2=A0clk->usecount++;
=C2=A0}
=C2=A0
=C2=A0void om= ap_clk_put(struct clk *clk)
=C2=A0{
- =C2=A0 =C2=A0if (!(clk->usec= ount --))
+ =C2=A0 =C2=A0if (!(clk->usecount--)) {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0hw_error("%s: %s is not in use\n", __func__, = clk->name);
+ =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0static voi= d omap_clk_update(struct clk *clk)
@@ -1131,19 +1135,22 @@ static void o= map_clk_update(struct clk *clk)
=C2=A0 =C2=A0 =C2=A0qemu_irq *user;
= =C2=A0 =C2=A0 =C2=A0struct clk *i;
=C2=A0
- =C2=A0 =C2=A0if (clk->= parent)
+ =C2=A0 =C2=A0if (clk->parent) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0parent =3D clk->parent->running;
- =C2=A0 =C2=A0else
= + =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0parent =3D 1;<= br>+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0running =3D parent &am= p;& (clk->enabled ||
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((clk->flags & ALWAYS_ENABLED) &am= p;& clk->usecount));
=C2=A0 =C2=A0 =C2=A0if (clk->running !=3D= running) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0clk->running =3D runnin= g;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (user =3D clk->users; *user; user= ++)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0for (user =3D clk->users; *user; us= er++) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_set_irq(*us= er, running);
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D clk->child1; i;= i =3D i->sibling)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0for (i =3D clk->child1; i; i =3D i->sibling) {
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_clk_update(i);
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
@@ -= 1155,8 +1162,9 @@ static void omap_clk_rate_update_full(struct clk *clk, un= signed long int rate,
=C2=A0
=C2=A0 =C2=A0 =C2=A0clk->rate =3D mul= div64(rate, mult, div);
=C2=A0 =C2=A0 =C2=A0if (clk->running)
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0for (user =3D clk->users; *user; user ++)
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0for (user =3D clk->users; *user; user++) {<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_raise(*user);+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0for (i =3D clk->= child1; i; i =3D i->sibling)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_c= lk_rate_update_full(i, rate,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0div * i->divisor, mult *= i->multiplier);
@@ -1180,7 +1188,9 @@ void omap_clk_reparent(struct = clk *clk, struct clk *parent)
=C2=A0 =C2=A0 =C2=A0struct clk **p;
=C2= =A0
=C2=A0 =C2=A0 =C2=A0if (clk->parent) {
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0for (p =3D &clk->parent->child1; *p !=3D clk; p =3D &(*= p)->sibling);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0for (p =3D &clk->pa= rent->child1; *p !=3D clk; p =3D &(*p)->sibling) {
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*p =3D clk->sibling;
=C2=A0 =C2=A0 = =C2=A0}
=C2=A0
@@ -1202,10 +1212,11 @@ void omap_clk_onoff(struct clk= *clk, int on)
=C2=A0
=C2=A0void omap_clk_canidle(struct clk *clk, in= t can)
=C2=A0{
- =C2=A0 =C2=A0if (can)
+ =C2=A0 =C2=A0if (can) {=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_clk_put(clk);
- =C2=A0 =C2=A0el= se
+ =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_clk= _get(clk);
+ =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0void omap_clk_= setrate(struct clk *clk, int divide, int multiply)
@@ -1226,27 +1237,29 = @@ void omap_clk_init(struct omap_mpu_state_s *mpu)
=C2=A0 =C2=A0 =C2=A0= int count;
=C2=A0 =C2=A0 =C2=A0int flag;
=C2=A0
- =C2=A0 =C2=A0if = (cpu_is_omap310(mpu))
+ =C2=A0 =C2=A0if (cpu_is_omap310(mpu)) {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0flag =3D CLOCK_IN_OMAP310;
- =C2=A0 =C2= =A0else if (cpu_is_omap1510(mpu))
+ =C2=A0 =C2=A0} else if (cpu_is_omap1= 510(mpu)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0flag =3D CLOCK_IN_OMAP1510= ;
- =C2=A0 =C2=A0else if (cpu_is_omap2410(mpu) || cpu_is_omap2420(mpu))<= br>+ =C2=A0 =C2=A0} else if (cpu_is_omap2410(mpu) || cpu_is_omap2420(mpu)) = {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0flag =3D CLOCK_IN_OMAP242X;
- =C2= =A0 =C2=A0else if (cpu_is_omap2430(mpu))
+ =C2=A0 =C2=A0} else if (cpu_i= s_omap2430(mpu)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0flag =3D CLOCK_IN_O= MAP243X;
- =C2=A0 =C2=A0else if (cpu_is_omap3430(mpu))
+ =C2=A0 =C2= =A0} else if (cpu_is_omap3430(mpu)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= flag =3D CLOCK_IN_OMAP243X;
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} else= {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0}
=C2= =A0
- =C2=A0 =C2=A0for (i =3D onchip_clks, count =3D 0; *i; i ++)
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((*i)->flags & flag)
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0count ++;
+ =C2=A0 =C2=A0for (i =3D onchi= p_clks, count =3D 0; *i; i++)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((*i)->= flags & flag) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0count++;<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0mpu->clks =3D g= _new0(struct clk, count + 1);
- =C2=A0 =C2=A0for (i =3D onchip_clks, j = =3D mpu->clks; *i; i ++)
+ =C2=A0 =C2=A0for (i =3D onchip_clks, j =3D= mpu->clks; *i; i++)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((*i)->f= lags & flag) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0memcp= y(j, *i, sizeof(struct clk));
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0for (k =3D mpu->clks; k < j; k ++)
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0for (k =3D mpu->clks; k < j; k++)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (j->parent &&= !strcmp(j->parent->name, k->name)) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0j->parent =3D k;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0j->sibling =3D k->child1;
@@ -1258,9 +1271,9 @@ void omap_clk_i= nit(struct omap_mpu_state_s *mpu)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0j->divisor =3D j->divisor ?: 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0j->multiplier =3D j->multiplier ?: 1;
- =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0j ++;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0j++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
- =C2=A0 =C2=A0= for (j =3D mpu->clks; count --; j ++) {
+ =C2=A0 =C2=A0for (j =3D mpu= ->clks; count--; j++) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_clk_up= date(j);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_clk_rate_update(j);
= =C2=A0 =C2=A0 =C2=A0}
diff --git a/hw/misc/omap_l4.c b/hw/misc/omap_l4.c=
index b7875489da..e0f5cea921 100644
--- a/hw/misc/omap_l4.c
+++ b= /hw/misc/omap_l4.c
@@ -61,13 +61,13 @@ static uint64_t omap_l4ta_read(vo= id *opaque, hwaddr addr, unsigned size)
=C2=A0 =C2=A0 =C2=A0}
=C2=A0<= br>=C2=A0 =C2=A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0case 0x00: /* COMP= ONENT */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* COMPONENT */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return s->component;
=C2=A0
- =C2=A0 =C2= =A0case 0x20: /* AGENT_CONTROL */
+ =C2=A0 =C2=A0case 0x20: =C2=A0/* AGE= NT_CONTROL */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->control;=C2=A0
- =C2=A0 =C2=A0case 0x28: /* AGENT_STATUS */
+ =C2=A0 =C2=A0c= ase 0x28: =C2=A0/* AGENT_STATUS */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret= urn s->status;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
@@ -86,15 +86,16 @@= static void omap_l4ta_write(void *opaque, hwaddr addr,
=C2=A0 =C2=A0 = =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0= case 0x00: /* COMPONENT */
- =C2=A0 =C2=A0case 0x28: /* AGENT_STATUS */<= br>+ =C2=A0 =C2=A0case 0x00: =C2=A0/* COMPONENT */
+ =C2=A0 =C2=A0case 0= x28: =C2=A0/* AGENT_STATUS */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OMAP_RO_= REG(addr);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2= =A0 =C2=A0case 0x20: /* AGENT_CONTROL */
+ =C2=A0 =C2=A0case 0x20: =C2= =A0/* AGENT_CONTROL */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->control = =3D value & 0x01000700;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value &= 1) /* OCP_RESET */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->= ;status &=3D ~1; /* REQ_TIMEOUT */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0i= f (value & 1) { =C2=A0 =C2=A0 =C2=A0 =C2=A0/* OCP_RESET */
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->status &=3D ~1; =C2=A0 =C2=A0 = =C2=A0 =C2=A0/* REQ_TIMEOUT */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
=C2=A0 =C2=A0 =C2=A0default:=
@@ -117,7 +118,7 @@ struct omap_target_agent_s *omap_l4ta_get(struct om= ap_l4_s *bus,
=C2=A0 =C2=A0 =C2=A0struct omap_target_agent_s *ta =3D NUL= L;
=C2=A0 =C2=A0 =C2=A0const struct omap_l4_agent_info_s *info =3D NULL;=
=C2=A0
- =C2=A0 =C2=A0for (i =3D 0; i < bus->ta_num; i ++)
= + =C2=A0 =C2=A0for (i =3D 0; i < bus->ta_num; i++)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0if (agents[i].ta =3D=3D cs) {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0ta =3D &bus->ta[i];
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0info =3D &agents[i];
@@ -134,7 +135,7= @@ struct omap_target_agent_s *omap_l4ta_get(struct omap_l4_s *bus,
=C2= =A0
=C2=A0 =C2=A0 =C2=A0ta->component =3D ('Q' << 24) |= ('E' << 16) | ('M' << 8) | ('U' <&l= t; 0);
=C2=A0 =C2=A0 =C2=A0ta->status =3D 0x00000000;
- =C2=A0 =C2= =A0ta->control =3D 0x00000200; /* XXX 01000200 for L4TAO */
+ =C2=A0 = =C2=A0ta->control =3D 0x00000200; /* XXX 01000200 for L4TAO */
=C2=A0=
=C2=A0 =C2=A0 =C2=A0memory_region_init_io(&ta->iomem, NULL, &= ;omap_l4ta_ops, ta, "omap.l4ta",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_l= 4_region_size(ta, info->ta_region));
diff --git a/hw/misc/omap_sdrc.c= b/hw/misc/omap_sdrc.c
index 6aa1b3ef7f..21d3ca8683 100644
--- a/hw/m= isc/omap_sdrc.c
+++ b/hw/misc/omap_sdrc.c
@@ -40,44 +40,44 @@ static = uint64_t omap_sdrc_read(void *opaque, hwaddr addr, unsigned size)
=C2=A0= =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (addr) {
- =C2= =A0 =C2=A0case 0x00: /* SDRC_REVISION */
+ =C2=A0 =C2=A0case 0x00: =C2= =A0/* SDRC_REVISION */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x20;=C2=A0
- =C2=A0 =C2=A0case 0x10: /* SDRC_SYSCONFIG */
+ =C2=A0 =C2= =A0case 0x10: =C2=A0/* SDRC_SYSCONFIG */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return s->config;
=C2=A0
- =C2=A0 =C2=A0case 0x14: /* SDRC_SYSS= TATUS */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0return 1; /* RESETDONE */
= -
- =C2=A0 =C2=A0case 0x40: /* SDRC_CS_CFG */
- =C2=A0 =C2=A0case 0x4= 4: /* SDRC_SHARING */
- =C2=A0 =C2=A0case 0x48: /* SDRC_ERR_ADDR */
-= =C2=A0 =C2=A0case 0x4c: /* SDRC_ERR_TYPE */
- =C2=A0 =C2=A0case 0x60: /= * SDRC_DLLA_SCTRL */
- =C2=A0 =C2=A0case 0x64: /* SDRC_DLLA_STATUS */- =C2=A0 =C2=A0case 0x68: /* SDRC_DLLB_CTRL */
- =C2=A0 =C2=A0case 0x6c= : /* SDRC_DLLB_STATUS */
- =C2=A0 =C2=A0case 0x70: /* SDRC_POWER */
-= =C2=A0 =C2=A0case 0x80: /* SDRC_MCFG_0 */
- =C2=A0 =C2=A0case 0x84: /* = SDRC_MR_0 */
- =C2=A0 =C2=A0case 0x88: /* SDRC_EMR1_0 */
- =C2=A0 =C2= =A0case 0x8c: /* SDRC_EMR2_0 */
- =C2=A0 =C2=A0case 0x90: /* SDRC_EMR3_0= */
- =C2=A0 =C2=A0case 0x94: /* SDRC_DCDL1_CTRL */
- =C2=A0 =C2=A0ca= se 0x98: /* SDRC_DCDL2_CTRL */
- =C2=A0 =C2=A0case 0x9c: /* SDRC_ACTIM_C= TRLA_0 */
- =C2=A0 =C2=A0case 0xa0: /* SDRC_ACTIM_CTRLB_0 */
- =C2=A0= =C2=A0case 0xa4: /* SDRC_RFR_CTRL_0 */
- =C2=A0 =C2=A0case 0xa8: /* SDR= C_MANUAL_0 */
- =C2=A0 =C2=A0case 0xb0: /* SDRC_MCFG_1 */
- =C2=A0 = =C2=A0case 0xb4: /* SDRC_MR_1 */
- =C2=A0 =C2=A0case 0xb8: /* SDRC_EMR1_= 1 */
- =C2=A0 =C2=A0case 0xbc: /* SDRC_EMR2_1 */
- =C2=A0 =C2=A0case = 0xc0: /* SDRC_EMR3_1 */
- =C2=A0 =C2=A0case 0xc4: /* SDRC_ACTIM_CTRLA_1 = */
- =C2=A0 =C2=A0case 0xc8: /* SDRC_ACTIM_CTRLB_1 */
- =C2=A0 =C2=A0= case 0xd4: /* SDRC_RFR_CTRL_1 */
- =C2=A0 =C2=A0case 0xd8: /* SDRC_MANUA= L_1 */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* SDRC_SYSSTATUS */
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0return 1; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* RESETDO= NE */
+
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* SDRC_CS_CFG */
+ =C2=A0= =C2=A0case 0x44: =C2=A0/* SDRC_SHARING */
+ =C2=A0 =C2=A0case 0x48: =C2= =A0/* SDRC_ERR_ADDR */
+ =C2=A0 =C2=A0case 0x4c: =C2=A0/* SDRC_ERR_TYPE = */
+ =C2=A0 =C2=A0case 0x60: =C2=A0/* SDRC_DLLA_SCTRL */
+ =C2=A0 =C2= =A0case 0x64: =C2=A0/* SDRC_DLLA_STATUS */
+ =C2=A0 =C2=A0case 0x68: =C2= =A0/* SDRC_DLLB_CTRL */
+ =C2=A0 =C2=A0case 0x6c: =C2=A0/* SDRC_DLLB_STA= TUS */
+ =C2=A0 =C2=A0case 0x70: =C2=A0/* SDRC_POWER */
+ =C2=A0 =C2= =A0case 0x80: =C2=A0/* SDRC_MCFG_0 */
+ =C2=A0 =C2=A0case 0x84: =C2=A0/*= SDRC_MR_0 */
+ =C2=A0 =C2=A0case 0x88: =C2=A0/* SDRC_EMR1_0 */
+ =C2= =A0 =C2=A0case 0x8c: =C2=A0/* SDRC_EMR2_0 */
+ =C2=A0 =C2=A0case 0x90: = =C2=A0/* SDRC_EMR3_0 */
+ =C2=A0 =C2=A0case 0x94: =C2=A0/* SDRC_DCDL1_CT= RL */
+ =C2=A0 =C2=A0case 0x98: =C2=A0/* SDRC_DCDL2_CTRL */
+ =C2=A0 = =C2=A0case 0x9c: =C2=A0/* SDRC_ACTIM_CTRLA_0 */
+ =C2=A0 =C2=A0case 0xa0= : =C2=A0/* SDRC_ACTIM_CTRLB_0 */
+ =C2=A0 =C2=A0case 0xa4: =C2=A0/* SDRC= _RFR_CTRL_0 */
+ =C2=A0 =C2=A0case 0xa8: =C2=A0/* SDRC_MANUAL_0 */
+ = =C2=A0 =C2=A0case 0xb0: =C2=A0/* SDRC_MCFG_1 */
+ =C2=A0 =C2=A0case 0xb4= : =C2=A0/* SDRC_MR_1 */
+ =C2=A0 =C2=A0case 0xb8: =C2=A0/* SDRC_EMR1_1 *= /
+ =C2=A0 =C2=A0case 0xbc: =C2=A0/* SDRC_EMR2_1 */
+ =C2=A0 =C2=A0ca= se 0xc0: =C2=A0/* SDRC_EMR3_1 */
+ =C2=A0 =C2=A0case 0xc4: =C2=A0/* SDRC= _ACTIM_CTRLA_1 */
+ =C2=A0 =C2=A0case 0xc8: =C2=A0/* SDRC_ACTIM_CTRLB_1 = */
+ =C2=A0 =C2=A0case 0xd4: =C2=A0/* SDRC_RFR_CTRL_1 */
+ =C2=A0 =C2= =A0case 0xd8: =C2=A0/* SDRC_MANUAL_1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return 0x00;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
@@ -96,49 +96,50 @@ s= tatic void omap_sdrc_write(void *opaque, hwaddr addr,
=C2=A0 =C2=A0 =C2= =A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0cas= e 0x00: /* SDRC_REVISION */
- =C2=A0 =C2=A0case 0x14: /* SDRC_SYSSTATUS = */
- =C2=A0 =C2=A0case 0x48: /* SDRC_ERR_ADDR */
- =C2=A0 =C2=A0case = 0x64: /* SDRC_DLLA_STATUS */
- =C2=A0 =C2=A0case 0x6c: /* SDRC_DLLB_STAT= US */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* SDRC_REVISION */
+ =C2=A0 = =C2=A0case 0x14: =C2=A0/* SDRC_SYSSTATUS */
+ =C2=A0 =C2=A0case 0x48: = =C2=A0/* SDRC_ERR_ADDR */
+ =C2=A0 =C2=A0case 0x64: =C2=A0/* SDRC_DLLA_S= TATUS */
+ =C2=A0 =C2=A0case 0x6c: =C2=A0/* SDRC_DLLB_STATUS */
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OMAP_RO_REG(addr);
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return;
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* SDRC_SYSCONF= IG */
+ =C2=A0 =C2=A0case 0x10: =C2=A0/* SDRC_SYSCONFIG */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0if ((value >> 3) !=3D 0x2)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "%s: bad SDRAM idle = mode %i\n",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0__func__, (unsigned)value >> 3);
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0if (value & 2)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (val= ue & 2) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_sdrc_= reset(s);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->config =3D value & 0x18;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x40: /* SDRC_CS_CFG */
- =C2= =A0 =C2=A0case 0x44: /* SDRC_SHARING */
- =C2=A0 =C2=A0case 0x4c: /* SDR= C_ERR_TYPE */
- =C2=A0 =C2=A0case 0x60: /* SDRC_DLLA_SCTRL */
- =C2= =A0 =C2=A0case 0x68: /* SDRC_DLLB_CTRL */
- =C2=A0 =C2=A0case 0x70: /* S= DRC_POWER */
- =C2=A0 =C2=A0case 0x80: /* SDRC_MCFG_0 */
- =C2=A0 =C2= =A0case 0x84: /* SDRC_MR_0 */
- =C2=A0 =C2=A0case 0x88: /* SDRC_EMR1_0 *= /
- =C2=A0 =C2=A0case 0x8c: /* SDRC_EMR2_0 */
- =C2=A0 =C2=A0case 0x9= 0: /* SDRC_EMR3_0 */
- =C2=A0 =C2=A0case 0x94: /* SDRC_DCDL1_CTRL */
= - =C2=A0 =C2=A0case 0x98: /* SDRC_DCDL2_CTRL */
- =C2=A0 =C2=A0case 0x9c= : /* SDRC_ACTIM_CTRLA_0 */
- =C2=A0 =C2=A0case 0xa0: /* SDRC_ACTIM_CTRLB= _0 */
- =C2=A0 =C2=A0case 0xa4: /* SDRC_RFR_CTRL_0 */
- =C2=A0 =C2=A0= case 0xa8: /* SDRC_MANUAL_0 */
- =C2=A0 =C2=A0case 0xb0: /* SDRC_MCFG_1 = */
- =C2=A0 =C2=A0case 0xb4: /* SDRC_MR_1 */
- =C2=A0 =C2=A0case 0xb8= : /* SDRC_EMR1_1 */
- =C2=A0 =C2=A0case 0xbc: /* SDRC_EMR2_1 */
- =C2= =A0 =C2=A0case 0xc0: /* SDRC_EMR3_1 */
- =C2=A0 =C2=A0case 0xc4: /* SDRC= _ACTIM_CTRLA_1 */
- =C2=A0 =C2=A0case 0xc8: /* SDRC_ACTIM_CTRLB_1 */
= - =C2=A0 =C2=A0case 0xd4: /* SDRC_RFR_CTRL_1 */
- =C2=A0 =C2=A0case 0xd8= : /* SDRC_MANUAL_1 */
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* SDRC_CS_CFG */<= br>+ =C2=A0 =C2=A0case 0x44: =C2=A0/* SDRC_SHARING */
+ =C2=A0 =C2=A0cas= e 0x4c: =C2=A0/* SDRC_ERR_TYPE */
+ =C2=A0 =C2=A0case 0x60: =C2=A0/* SDR= C_DLLA_SCTRL */
+ =C2=A0 =C2=A0case 0x68: =C2=A0/* SDRC_DLLB_CTRL */
= + =C2=A0 =C2=A0case 0x70: =C2=A0/* SDRC_POWER */
+ =C2=A0 =C2=A0case 0x8= 0: =C2=A0/* SDRC_MCFG_0 */
+ =C2=A0 =C2=A0case 0x84: =C2=A0/* SDRC_MR_0 = */
+ =C2=A0 =C2=A0case 0x88: =C2=A0/* SDRC_EMR1_0 */
+ =C2=A0 =C2=A0c= ase 0x8c: =C2=A0/* SDRC_EMR2_0 */
+ =C2=A0 =C2=A0case 0x90: =C2=A0/* SDR= C_EMR3_0 */
+ =C2=A0 =C2=A0case 0x94: =C2=A0/* SDRC_DCDL1_CTRL */
+ = =C2=A0 =C2=A0case 0x98: =C2=A0/* SDRC_DCDL2_CTRL */
+ =C2=A0 =C2=A0case = 0x9c: =C2=A0/* SDRC_ACTIM_CTRLA_0 */
+ =C2=A0 =C2=A0case 0xa0: =C2=A0/* = SDRC_ACTIM_CTRLB_0 */
+ =C2=A0 =C2=A0case 0xa4: =C2=A0/* SDRC_RFR_CTRL_0= */
+ =C2=A0 =C2=A0case 0xa8: =C2=A0/* SDRC_MANUAL_0 */
+ =C2=A0 =C2= =A0case 0xb0: =C2=A0/* SDRC_MCFG_1 */
+ =C2=A0 =C2=A0case 0xb4: =C2=A0/*= SDRC_MR_1 */
+ =C2=A0 =C2=A0case 0xb8: =C2=A0/* SDRC_EMR1_1 */
+ =C2= =A0 =C2=A0case 0xbc: =C2=A0/* SDRC_EMR2_1 */
+ =C2=A0 =C2=A0case 0xc0: = =C2=A0/* SDRC_EMR3_1 */
+ =C2=A0 =C2=A0case 0xc4: =C2=A0/* SDRC_ACTIM_CT= RLA_1 */
+ =C2=A0 =C2=A0case 0xc8: =C2=A0/* SDRC_ACTIM_CTRLB_1 */
+ = =C2=A0 =C2=A0case 0xd4: =C2=A0/* SDRC_RFR_CTRL_1 */
+ =C2=A0 =C2=A0case = 0xd8: =C2=A0/* SDRC_MANUAL_1 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;=
=C2=A0
=C2=A0 =C2=A0 =C2=A0default:
diff --git a/hw/misc/omap_tap= .c b/hw/misc/omap_tap.c
index 4d7fb7d85f..daa15696ee 100644
--- a/hw/= misc/omap_tap.c
+++ b/hw/misc/omap_tap.c
@@ -32,25 +32,25 @@ static u= int64_t omap_tap_read(void *opaque, hwaddr addr, unsigned size)
=C2=A0 = =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (addr) {
- =C2=A0= =C2=A0case 0x204: /* IDCODE_reg */
+ =C2=A0 =C2=A0case 0x204: /* IDCODE= _reg */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (s->mpu_model) {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case omap2420:
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0case omap2422:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case omap2= 423:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x5b5d902f; /* ES= 2.2 */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x5b5d902f; = =C2=A0/* ES 2.2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case omap2430:
-= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x5b68a02f; /* ES 2.2 */+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x5b68a02f; =C2=A0/* ES= 2.2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case omap3430:
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x1b7ae02f; /* ES 2 */
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x1b7ae02f; =C2=A0/* ES 2 */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0default:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0hw_error("%s: Bad mpu model\n", __func__);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2=A0case 0x208= : /* PRODUCTION_ID_reg for OMAP2 */
- =C2=A0 =C2=A0case 0x210: /* PRODUC= TION_ID_reg for OMAP3 */
+ =C2=A0 =C2=A0case 0x208: /* PRODUCTION_ID_reg= for OMAP2 */
+ =C2=A0 =C2=A0case 0x210: /* PRODUCTION_ID_reg for OMAP3 = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (s->mpu_model) {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case omap2420:
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return 0x000254f0; /* POP ESHS2.1.1 in N91/93/95, ES2 in N= 800 */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x000254f0; =C2= =A0/* POP ESHS2.1.1 in N91/93/95, ES2 in N800 */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0case omap2422:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return 0x000400f0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case omap2423= :
@@ -68,22 +68,22 @@ static uint64_t omap_tap_read(void *opaque, hwaddr= addr, unsigned size)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case omap2420:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case omap2422:
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0case omap2423:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r= eturn 0xcafeb5d9; /* ES 2.2 */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return 0xcafeb5d9; =C2=A0/* ES 2.2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0case omap2430:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0xca= feb68a; /* ES 2.2 */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0= xcafeb68a; =C2=A0/* ES 2.2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case oma= p3430:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0xcafeb7ae; /* = ES 2 */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0xcafeb7ae; = =C2=A0/* ES 2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0default:
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0hw_error("%s: Bad mpu model\n= ", __func__);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
- = =C2=A0 =C2=A0case 0x218: /* DIE_ID_reg */
+ =C2=A0 =C2=A0case 0x218: /* = DIE_ID_reg */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return ('Q' <= < 24) | ('E' << 16) | ('M' << 8) | ('U&#= 39; << 0);
- =C2=A0 =C2=A0case 0x21c: /* DIE_ID_reg */
+ =C2=A0= =C2=A0case 0x21c: /* DIE_ID_reg */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= turn 0x54 << 24;
- =C2=A0 =C2=A0case 0x220: /* DIE_ID_reg */
+ = =C2=A0 =C2=A0case 0x220: /* DIE_ID_reg */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return ('Q' << 24) | ('E' << 16) | ('= M' << 8) | ('U' << 0);
- =C2=A0 =C2=A0case 0x224= : /* DIE_ID_reg */
+ =C2=A0 =C2=A0case 0x224: /* DIE_ID_reg */
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0return ('Q' << 24) | ('E'= << 16) | ('M' << 8) | ('U' << 0);
=C2= =A0 =C2=A0 =C2=A0}
=C2=A0
diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_= mmc.c
index edd3cf2a1e..848e42f076 100644
--- a/hw/sd/omap_mmc.c
+= ++ b/hw/sd/omap_mmc.c
@@ -104,11 +104,11 @@ static void omap_mmc_fifolev= el_update(struct omap_mmc_s *host)
=C2=A0}
=C2=A0
=C2=A0typedef en= um {
- =C2=A0 =C2=A0sd_nore =3D 0, /* no response */
- =C2=A0 =C2=A0s= d_r1, /* normal response command */
- =C2=A0 =C2=A0sd_r2, /* CID, CSD = registers */
- =C2=A0 =C2=A0sd_r3, /* OCR register */
- =C2=A0 =C2= =A0sd_r6 =3D 6, /* Published RCA response */
+ =C2=A0 =C2=A0sd_nore =3D= 0, =C2=A0/* no response */
+ =C2=A0 =C2=A0sd_r1, =C2=A0 =C2=A0 =C2=A0 = =C2=A0/* normal response command */
+ =C2=A0 =C2=A0sd_r2, =C2=A0 =C2=A0 = =C2=A0 =C2=A0/* CID, CSD registers */
+ =C2=A0 =C2=A0sd_r3, =C2=A0 =C2= =A0 =C2=A0 =C2=A0/* OCR register */
+ =C2=A0 =C2=A0sd_r6 =3D 6, =C2=A0 = =C2=A0/* Published RCA response */
=C2=A0 =C2=A0 =C2=A0sd_r1b =3D -1,=C2=A0} sd_rsp_type_t;
=C2=A0
@@ -125,8 +125,9 @@ static void omap_m= mc_command(struct omap_mmc_s *host, int cmd, int dir,
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2= =A0if (resptype =3D=3D sd_r1 && busy)
+ =C2=A0 =C2=A0if (resptyp= e =3D=3D sd_r1 && busy) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0resp= type =3D sd_r1b;
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (t= ype =3D=3D sd_adtc) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo_st= art =3D 0;
@@ -164,8 +165,9 @@ static void omap_mmc_command(struct omap_= mmc_s *host, int cmd, int dir,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0LOCK_UNLOCK_FAILED | COM_CRC_ERROR | ILLEGAL_COMMAND |=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CARD_ECC_= FAILED | CC_ERROR | SD_ERROR |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0CID_CSD_OVERWRITE;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if = (host->sdio & (1 << 13))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (h= ost->sdio & (1 << 13)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0mask |=3D AKE_SEQ_ERROR;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rspstatus =3D ldl_be_p(response);
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
@@ -185,10 +187,11 @@ st= atic void omap_mmc_command(struct omap_mmc_s *host, int cmd, int dir,
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rsplen =3D 4;
=C2=A0
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0rspstatus =3D ldl_be_p(response);
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (rspstatus & 0x80000000)
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0if (rspstatus & 0x80000000) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0host->status &=3D 0xe000;
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0else
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0host->status |=3D 0x1000;
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
=C2= =A0 =C2=A0 =C2=A0case sd_r6:
@@ -202,35 +205,39 @@ static void omap_mmc_= command(struct omap_mmc_s *host, int cmd, int dir,
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0rspstatus =3D (response[2] << 8) | (response[3] <<= 0);
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2=A0if (rspstatus &am= p; mask)
+ =C2=A0 =C2=A0if (rspstatus & mask) {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0host->status |=3D 0x4000;
- =C2=A0 =C2=A0else
+ = =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->status = &=3D 0xb000;
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (r= splen)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (rsplen =3D 0; rsplen < 8; rs= plen ++)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0for (rsplen =3D 0; rsplen < 8; = rsplen++)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->rsp[~= rsplen & 7] =3D response[(rsplen << 1) | 1] |
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(response[(rs= plen << 1) | 0] << 8);
=C2=A0
- =C2=A0 =C2=A0if (timeout)=
+ =C2=A0 =C2=A0if (timeout) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host= ->status |=3D 0x0080;
- =C2=A0 =C2=A0else if (cmd =3D=3D 12)
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0host->status |=3D 0x0005; /* Makes it more real = */
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} else if (cmd =3D=3D 12) {
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0host->status |=3D 0x0005; /* Makes it more = real */
+ =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0hos= t->status |=3D 0x0001;
+ =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2= =A0static void omap_mmc_transfer(struct omap_mmc_s *host)
=C2=A0{
=C2= =A0 =C2=A0 =C2=A0uint8_t value;
=C2=A0
- =C2=A0 =C2=A0if (!host->t= ransfer)
+ =C2=A0 =C2=A0if (!host->transfer) {
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return;
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2= =A0while (1) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (host->ddir) {- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (host->fifo_len > host= ->af_level)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (host->f= ifo_len > host->af_level) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0break;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0value =3D= sd_read_byte(host->card);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0host->fifo[(host->fifo_start + host->fifo_len) & 31] =3D= value;
@@ -238,29 +245,30 @@ static void omap_mmc_transfer(struct omap_= mmc_s *host)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0value =3D sd_read_byte(host->card);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo[(host->fifo_start + host= ->fifo_len) & 31] |=3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0value << 8;
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->blen_counter -= -;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->ble= n_counter--;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0=
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo_len ++;
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo_len++;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0} else {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0if (!host->fifo_len)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0if (!host->fifo_len) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0break;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<= br>=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0value =3D host= ->fifo[host->fifo_start] & 0xff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0sd_write_byte(host->card, value);
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (-- host->blen_counter) {
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0value =3D host->= fifo[host->fifo_start] >> 8;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0sd_write_byte(host->card, value);
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->blen_counter -= -;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->ble= n_counter--;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0=
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo_start ++;
-= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo_len --;
+ =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo_start++;
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo_len--;
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0host->fifo_start &=3D 31;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if= (host->blen_counter =3D=3D 0) {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0host->nblk_counter --;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0host->nblk_counter--;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0host->blen_counter =3D host->blen;
=C2=A0
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (host->nblk_counter =3D=3D 0) {
= @@ -331,82 +339,82 @@ static uint64_t omap_mmc_read(void *opaque, hwaddr of= fset, unsigned size)
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 = =C2=A0switch (offset) {
- =C2=A0 =C2=A0case 0x00: /* MMC_CMD */
+ =C2= =A0 =C2=A0case 0x00: =C2=A0/* MMC_CMD */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return s->last_cmd;
=C2=A0
- =C2=A0 =C2=A0case 0x04: /* MMC_ARG= L */
+ =C2=A0 =C2=A0case 0x04: =C2=A0/* MMC_ARGL */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return s->arg & 0x0000ffff;
=C2=A0
- =C2=A0 = =C2=A0case 0x08: /* MMC_ARGH */
+ =C2=A0 =C2=A0case 0x08: =C2=A0/* MMC_A= RGH */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->arg >> 16;=C2=A0
- =C2=A0 =C2=A0case 0x0c: /* MMC_CON */
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0return (s->dw << 15) | (s->mode << 12) | (s->= ;enable << 11) |
+ =C2=A0 =C2=A0case 0x0c: =C2=A0/* MMC_CON */+ =C2=A0 =C2=A0 =C2=A0 =C2=A0return (s->dw << 15) | (s->mode &= lt;< 12) | (s->enable << 11) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->be << 10) | s->clkdiv;=C2=A0
- =C2=A0 =C2=A0case 0x10: /* MMC_STAT */
+ =C2=A0 =C2=A0case = 0x10: =C2=A0/* MMC_STAT */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s-&g= t;status;
=C2=A0
- =C2=A0 =C2=A0case 0x14: /* MMC_IE */
+ =C2=A0 = =C2=A0case 0x14: =C2=A0/* MMC_IE */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= turn s->mask;
=C2=A0
- =C2=A0 =C2=A0case 0x18: /* MMC_CTO */
+ = =C2=A0 =C2=A0case 0x18: =C2=A0/* MMC_CTO */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return s->cto;
=C2=A0
- =C2=A0 =C2=A0case 0x1c: /* MMC_DTO *= /
+ =C2=A0 =C2=A0case 0x1c: =C2=A0/* MMC_DTO */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return s->dto;
=C2=A0
- =C2=A0 =C2=A0case 0x20: /* MM= C_DATA */
+ =C2=A0 =C2=A0case 0x20: =C2=A0/* MMC_DATA */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0/* TODO: support 8-bit access */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0i =3D s->fifo[s->fifo_start];
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0if (s->fifo_len =3D=3D 0) {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0printf("MMC: FIFO underrun\n");
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return i;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0}
- =C2=A0 =C2=A0 =C2=A0 =C2=A0s->fifo_start ++;
= - =C2=A0 =C2=A0 =C2=A0 =C2=A0s->fifo_len --;
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->fifo_start++;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0s->fifo_len--;=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->fifo_start &=3D 31;
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_mmc_transfer(s);
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0omap_mmc_fifolevel_update(s);
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0omap_mmc_interrupts_update(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return i;
=C2=A0
- =C2=A0 =C2=A0case 0x24: /* MMC_BLEN */
+ =C2= =A0 =C2=A0case 0x24: =C2=A0/* MMC_BLEN */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return s->blen_counter;
=C2=A0
- =C2=A0 =C2=A0case 0x28: /* = MMC_NBLK */
+ =C2=A0 =C2=A0case 0x28: =C2=A0/* MMC_NBLK */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0return s->nblk_counter;
=C2=A0
- =C2=A0 = =C2=A0case 0x2c: /* MMC_BUF */
+ =C2=A0 =C2=A0case 0x2c: =C2=A0/* MMC_BU= F */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (s->rx_dma << 15)= | (s->af_level << 8) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(s->tx_dma << 7) | s->ae_level;
=C2=A0
- =C2=A0= =C2=A0case 0x30: /* MMC_SPI */
+ =C2=A0 =C2=A0case 0x30: =C2=A0/* MMC_S= PI */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x0000;
- =C2=A0 =C2= =A0case 0x34: /* MMC_SDIO */
+ =C2=A0 =C2=A0case 0x34: =C2=A0/* MMC_SDIO= */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (s->cdet_wakeup <<= 2) | (s->cdet_enable) | s->sdio;
- =C2=A0 =C2=A0case 0x38: /* MMC= _SYST */
+ =C2=A0 =C2=A0case 0x38: =C2=A0/* MMC_SYST */
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0return 0x0000;
=C2=A0
- =C2=A0 =C2=A0case 0x3c: = /* MMC_REV */
+ =C2=A0 =C2=A0case 0x3c: =C2=A0/* MMC_REV */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->rev;
=C2=A0
- =C2=A0 =C2=A0ca= se 0x40: /* MMC_RSP0 */
- =C2=A0 =C2=A0case 0x44: /* MMC_RSP1 */
- = =C2=A0 =C2=A0case 0x48: /* MMC_RSP2 */
- =C2=A0 =C2=A0case 0x4c: /* MMC_= RSP3 */
- =C2=A0 =C2=A0case 0x50: /* MMC_RSP4 */
- =C2=A0 =C2=A0case = 0x54: /* MMC_RSP5 */
- =C2=A0 =C2=A0case 0x58: /* MMC_RSP6 */
- =C2= =A0 =C2=A0case 0x5c: /* MMC_RSP7 */
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* M= MC_RSP0 */
+ =C2=A0 =C2=A0case 0x44: =C2=A0/* MMC_RSP1 */
+ =C2=A0 = =C2=A0case 0x48: =C2=A0/* MMC_RSP2 */
+ =C2=A0 =C2=A0case 0x4c: =C2=A0/*= MMC_RSP3 */
+ =C2=A0 =C2=A0case 0x50: =C2=A0/* MMC_RSP4 */
+ =C2=A0 = =C2=A0case 0x54: =C2=A0/* MMC_RSP5 */
+ =C2=A0 =C2=A0case 0x58: =C2=A0/*= MMC_RSP6 */
+ =C2=A0 =C2=A0case 0x5c: =C2=A0/* MMC_RSP7 */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->rsp[(offset - 0x40) >> 2];=C2=A0
=C2=A0 =C2=A0 =C2=A0/* OMAP2-specific */
- =C2=A0 =C2=A0case = 0x60: /* MMC_IOSR */
- =C2=A0 =C2=A0case 0x64: /* MMC_SYSC */
+ =C2= =A0 =C2=A0case 0x60: =C2=A0/* MMC_IOSR */
+ =C2=A0 =C2=A0case 0x64: =C2= =A0/* MMC_SYSC */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0;
- =C2= =A0 =C2=A0case 0x68: /* MMC_SYSS */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0return = 1; /* RSTD */
+ =C2=A0 =C2=A0case 0x68: =C2=A0/* MMC_SYSS */
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0return 1; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* = RSTD */
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0OMAP_BAD_= REG(offset);
@@ -425,13 +433,15 @@ static void omap_mmc_write(void *opaq= ue, hwaddr offset,
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2= =A0switch (offset) {
- =C2=A0 =C2=A0case 0x00: /* MMC_CMD */
- =C2=A0= =C2=A0 =C2=A0 =C2=A0if (!s->enable)
+ =C2=A0 =C2=A0case 0x00: =C2=A0= /* MMC_CMD */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!s->enable) {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->last_cmd = =3D value;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < 8; i ++)+ =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < 8; i++) {
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->rsp[i] =3D 0x0000;
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_mmc_command= (s, value & 63, (value >> 15) & 1,
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(sd_cmd_type_t) ((value >> 1= 2) & 3),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(value >> 11) & 1,
@@ -440,17 +450,17 @@ static void omap_m= mc_write(void *opaque, hwaddr offset,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= omap_mmc_update(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0- =C2=A0 =C2=A0case 0x04: /* MMC_ARGL */
+ =C2=A0 =C2=A0case 0x04: =C2= =A0/* MMC_ARGL */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->arg &=3D 0= xffff0000;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->arg |=3D 0x0000ffff &= amp; value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2= =A0 =C2=A0case 0x08: /* MMC_ARGH */
+ =C2=A0 =C2=A0case 0x08: =C2=A0/* M= MC_ARGH */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->arg &=3D 0x0000ff= ff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->arg |=3D value << 16;<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0cas= e 0x0c: /* MMC_CON */
+ =C2=A0 =C2=A0case 0x0c: =C2=A0/* MMC_CON */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->dw =3D (value >> 15) & 1;=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->mode =3D (value >> 12) &a= mp; 3;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->enable =3D (value >>= ; 11) & 1;
@@ -464,101 +474,109 @@ static void omap_mmc_write(void *= opaque, hwaddr offset,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0q= emu_log_mask(LOG_UNIMP,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"omap_mmc_wr: Big End= ian not implemented\n");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->dw !=3D 0 && s->lines < = 4)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->dw !=3D 0 && s->lin= es < 4) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0printf(&quo= t;4-bit SD bus enabled\n");
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!s->= ;enable)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= if (!s->enable) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oma= p_mmc_pseudo_reset(s);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* MMC_ST= AT */
+ =C2=A0 =C2=A0case 0x10: =C2=A0/* MMC_STAT */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->status &=3D ~value;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0omap_mmc_interrupts_update(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x14: /* MMC_IE */
+ =C2= =A0 =C2=A0case 0x14: =C2=A0/* MMC_IE */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->mask =3D value & 0x7fff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= omap_mmc_interrupts_update(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<= br>=C2=A0
- =C2=A0 =C2=A0case 0x18: /* MMC_CTO */
+ =C2=A0 =C2=A0case= 0x18: =C2=A0/* MMC_CTO */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->cto = =3D value & 0xff;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->cto > 0x= fd && s->rev <=3D 1)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-&g= t;cto > 0xfd && s->rev <=3D 1) {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0printf("MMC: CTO of 0xff and 0xfe cannot be= used!\n");
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x1c: /* MMC_DTO */+ =C2=A0 =C2=A0case 0x1c: =C2=A0/* MMC_DTO */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->dto =3D value & 0xffff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x20: /* MMC_DATA */
+ =C2= =A0 =C2=A0case 0x20: =C2=A0/* MMC_DATA */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0/* TODO: support 8-bit access */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (= s->fifo_len =3D=3D 32)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->fifo_le= n =3D=3D 32) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->= fifo[(s->fifo_start + s->fifo_len) & 31] =3D value;
- =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->fifo_len ++;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&g= t;fifo_len++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_mmc_transfer(s);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_mmc_fifolevel_update(s);
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_mmc_interrupts_update(s);
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x24: /* MMC_BL= EN */
+ =C2=A0 =C2=A0case 0x24: =C2=A0/* MMC_BLEN */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->blen =3D (value & 0x07ff) + 1;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->blen_counter =3D s->blen;
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x28: /* MMC_N= BLK */
+ =C2=A0 =C2=A0case 0x28: =C2=A0/* MMC_NBLK */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->nblk =3D (value & 0x07ff) + 1;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->nblk_counter =3D s->nblk;
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0s->blen_counter =3D s->blen;
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x2c: /* MMC_BU= F */
+ =C2=A0 =C2=A0case 0x2c: =C2=A0/* MMC_BUF */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->rx_dma =3D (value >> 15) & 1;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->af_level =3D (value >> 8) & 0x1f= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tx_dma =3D (value >> 7) = & 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->ae_level =3D value &= ; 0x1f;
=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->rx_dma)
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->rx_dma) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->status &=3D 0xfbff;
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (s->tx_dma)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0if (s->tx_dma) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->status &=3D 0xf7ff;
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_mmc_fifolevel_update(s);=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_mmc_interrupts_update(s);
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
=C2=A0 =C2=A0 =C2=A0/* S= PI, SDIO and TEST modes unimplemented */
- =C2=A0 =C2=A0case 0x30: /* MM= C_SPI (OMAP1 only) */
+ =C2=A0 =C2=A0case 0x30: =C2=A0/* MMC_SPI (OMAP1 = only) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case= 0x34: /* MMC_SDIO */
+ =C2=A0 =C2=A0case 0x34: =C2=A0/* MMC_SDIO */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->sdio =3D value & (s->rev >= ;=3D 2 ? 0xfbf3 : 0x2020);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->cdet_= wakeup =3D (value >> 9) & 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->cdet_enable =3D (value >> 2) & 1;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case 0x38: /* MMC_SYST */
+ = =C2=A0 =C2=A0case 0x38: =C2=A0/* MMC_SYST */
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x3c: /* MMC_REV */
- =C2= =A0 =C2=A0case 0x40: /* MMC_RSP0 */
- =C2=A0 =C2=A0case 0x44: /* MMC_RSP= 1 */
- =C2=A0 =C2=A0case 0x48: /* MMC_RSP2 */
- =C2=A0 =C2=A0case 0x4= c: /* MMC_RSP3 */
- =C2=A0 =C2=A0case 0x50: /* MMC_RSP4 */
- =C2=A0 = =C2=A0case 0x54: /* MMC_RSP5 */
- =C2=A0 =C2=A0case 0x58: /* MMC_RSP6 */=
- =C2=A0 =C2=A0case 0x5c: /* MMC_RSP7 */
+ =C2=A0 =C2=A0case 0x3c: = =C2=A0/* MMC_REV */
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* MMC_RSP0 */
+ = =C2=A0 =C2=A0case 0x44: =C2=A0/* MMC_RSP1 */
+ =C2=A0 =C2=A0case 0x48: = =C2=A0/* MMC_RSP2 */
+ =C2=A0 =C2=A0case 0x4c: =C2=A0/* MMC_RSP3 */
+= =C2=A0 =C2=A0case 0x50: =C2=A0/* MMC_RSP4 */
+ =C2=A0 =C2=A0case 0x54: = =C2=A0/* MMC_RSP5 */
+ =C2=A0 =C2=A0case 0x58: =C2=A0/* MMC_RSP6 */
+= =C2=A0 =C2=A0case 0x5c: =C2=A0/* MMC_RSP7 */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0OMAP_RO_REG(offset);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<= br>=C2=A0
=C2=A0 =C2=A0 =C2=A0/* OMAP2-specific */
- =C2=A0 =C2=A0cas= e 0x60: /* MMC_IOSR */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 0xf)=
+ =C2=A0 =C2=A0case 0x60: =C2=A0/* MMC_IOSR */
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (value & 0xf) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0printf("MMC: SDIO bits used!\n");
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2= =A0case 0x64: /* MMC_SYSC */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value &= ; (1 << 2)) /* SRTS */
+ =C2=A0 =C2=A0case 0x64: =C2=A0/* MMC_= SYSC */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & (1 << 2)) { = =C2=A0 =C2=A0 =C2=A0 /* SRTS */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0omap_mmc_reset(s);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case 0x68: /* MMC_SYSS = */
+ =C2=A0 =C2=A0case 0x68: =C2=A0/* MMC_SYSS */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0OMAP_RO_REG(offset);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= break;
=C2=A0
@@ -601,7 +619,7 @@ struct omap_mmc_s *omap_mmc_init(hw= addr base,
=C2=A0 =C2=A0 =C2=A0s->irq =3D irq;
=C2=A0 =C2=A0 =C2= =A0s->dma =3D dma;
=C2=A0 =C2=A0 =C2=A0s->clk =3D clk;
- =C2=A0= =C2=A0s->lines =3D 1; /* TODO: needs to be settable per-board */
+ = =C2=A0 =C2=A0s->lines =3D 1; /* TODO: needs to be settable per-board */<= br>=C2=A0 =C2=A0 =C2=A0s->rev =3D 1;
=C2=A0
=C2=A0 =C2=A0 =C2=A0me= mory_region_init_io(&s->iomem, NULL, &omap_mmc_ops, s, "oma= p.mmc", 0x800);
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmc= i.c
index 82529708c8..4fd17da95b 100644
--- a/hw/sd/pxa2xx_mmci.c
= +++ b/hw/sd/pxa2xx_mmci.c
@@ -113,55 +113,55 @@ static const VMStateDesc= ription vmstate_pxa2xx_mmci =3D {
=C2=A0 =C2=A0 =C2=A0}
=C2=A0};
= =C2=A0
-#define MMC_STRPCL 0x00 /* MMC Clock Start/Stop register */
-= #define MMC_STAT 0x04 /* MMC Status register */
-#define MMC_CLKRT 0x08 = /* MMC Clock Rate register */
-#define MMC_SPI 0x0c /* MMC SPI Mode reg= ister */
-#define MMC_CMDAT 0x10 /* MMC Command/Data register */
-#de= fine MMC_RESTO 0x14 /* MMC Response Time-Out register */
-#define MMC_RD= TO 0x18 /* MMC Read Time-Out register */
-#define MMC_BLKLEN 0x1c /* MMC= Block Length register */
-#define MMC_NUMBLK 0x20 /* MMC Number of Bloc= ks register */
-#define MMC_PRTBUF 0x24 /* MMC Buffer Partly Full regist= er */
-#define MMC_I_MASK 0x28 /* MMC Interrupt Mask register */
-#de= fine MMC_I_REG 0x2c /* MMC Interrupt Request register */
-#define MMC_CM= D 0x30 /* MMC Command register */
-#define MMC_ARGH 0x34 /* MMC Argumen= t High register */
-#define MMC_ARGL 0x38 /* MMC Argument Low register *= /
-#define MMC_RES 0x3c /* MMC Response FIFO */
-#define MMC_RXFIFO = 0x40 /* MMC Receive FIFO */
-#define MMC_TXFIFO 0x44 /* MMC Transmit FIF= O */
-#define MMC_RDWAIT 0x48 /* MMC RD_WAIT register */
-#define MMC= _BLKS_REM 0x4c /* MMC Blocks Remaining register */
+#define MMC_STRPCL = =C2=A0 =C2=A00x00 =C2=A0/* MMC Clock Start/Stop register */
+#define MMC= _STAT =C2=A0 =C2=A0 =C2=A00x04 =C2=A0/* MMC Status register */
+#define = MMC_CLKRT =C2=A0 =C2=A0 0x08 =C2=A0/* MMC Clock Rate register */
+#defin= e MMC_SPI =C2=A0 =C2=A0 =C2=A0 0x0c =C2=A0/* MMC SPI Mode register */
+#= define MMC_CMDAT =C2=A0 =C2=A0 0x10 =C2=A0/* MMC Command/Data register */+#define MMC_RESTO =C2=A0 =C2=A0 0x14 =C2=A0/* MMC Response Time-Out regi= ster */
+#define MMC_RDTO =C2=A0 =C2=A0 =C2=A00x18 =C2=A0/* MMC Read Tim= e-Out register */
+#define MMC_BLKLEN =C2=A0 =C2=A00x1c =C2=A0/* MMC Blo= ck Length register */
+#define MMC_NUMBLK =C2=A0 =C2=A00x20 =C2=A0/* MMC= Number of Blocks register */
+#define MMC_PRTBUF =C2=A0 =C2=A00x24 =C2= =A0/* MMC Buffer Partly Full register */
+#define MMC_I_MASK =C2=A0 =C2= =A00x28 =C2=A0/* MMC Interrupt Mask register */
+#define MMC_I_REG =C2= =A0 =C2=A0 0x2c =C2=A0/* MMC Interrupt Request register */
+#define MMC_= CMD =C2=A0 =C2=A0 =C2=A0 0x30 =C2=A0/* MMC Command register */
+#define = MMC_ARGH =C2=A0 =C2=A0 =C2=A00x34 =C2=A0/* MMC Argument High register */+#define MMC_ARGL =C2=A0 =C2=A0 =C2=A00x38 =C2=A0/* MMC Argument Low regis= ter */
+#define MMC_RES =C2=A0 =C2=A0 =C2=A0 0x3c =C2=A0/* MMC Response = FIFO */
+#define MMC_RXFIFO =C2=A0 =C2=A00x40 =C2=A0/* MMC Receive FIFO = */
+#define MMC_TXFIFO =C2=A0 =C2=A00x44 =C2=A0/* MMC Transmit FIFO */+#define MMC_RDWAIT =C2=A0 =C2=A00x48 =C2=A0/* MMC RD_WAIT register */+#define MMC_BLKS_REM =C2=A00x4c =C2=A0/* MMC Blocks Remaining register */=
=C2=A0
=C2=A0/* Bitfield masks */
-#define STRPCL_STOP_CLK (1 <= ;< 0)
-#define STRPCL_STRT_CLK (1 << 1)
-#define STAT_TOUT_R= ES (1 << 1)
-#define STAT_CLK_EN (1 << 8)
-#define STAT_D= ATA_DONE (1 << 11)
-#define STAT_PRG_DONE (1 << 12)
-#def= ine STAT_END_CMDRES (1 << 13)
-#define SPI_SPI_MODE (1 << 0)=
-#define CMDAT_RES_TYPE (3 << 0)
-#define CMDAT_DATA_EN (1 <= ;< 2)
-#define CMDAT_WR_RD (1 << 3)
-#define CMDAT_DMA_EN (1= << 7)
-#define CMDAT_STOP_TRAN (1 << 10)
-#define INT_DA= TA_DONE (1 << 0)
-#define INT_PRG_DONE (1 << 1)
-#define = INT_END_CMD (1 << 2)
-#define INT_STOP_CMD (1 << 3)
-#def= ine INT_CLK_OFF (1 << 4)
-#define INT_RXFIFO_REQ (1 << 5)-#define INT_TXFIFO_REQ (1 << 6)
-#define INT_TINT (1 << 7)=
-#define INT_DAT_ERR (1 << 8)
-#define INT_RES_ERR (1 <<= 9)
-#define INT_RD_STALLED (1 << 10)
-#define INT_SDIO_INT (1 = << 11)
-#define INT_SDIO_SACK (1 << 12)
-#define PRTBUF_P= RT_BUF (1 << 0)
+#define STRPCL_STOP_CLK (1 << 0)
+#defin= e STRPCL_STRT_CLK (1 << 1)
+#define STAT_TOUT_RES =C2=A0 (1 <&l= t; 1)
+#define STAT_CLK_EN =C2=A0 =C2=A0 (1 << 8)
+#define STAT= _DATA_DONE =C2=A0(1 << 11)
+#define STAT_PRG_DONE =C2=A0 (1 <&l= t; 12)
+#define STAT_END_CMDRES (1 << 13)
+#define SPI_SPI_MODE= =C2=A0 =C2=A0(1 << 0)
+#define CMDAT_RES_TYPE =C2=A0(3 << 0= )
+#define CMDAT_DATA_EN =C2=A0 (1 << 2)
+#define CMDAT_WR_RD = =C2=A0 =C2=A0 (1 << 3)
+#define CMDAT_DMA_EN =C2=A0 =C2=A0(1 <&= lt; 7)
+#define CMDAT_STOP_TRAN (1 << 10)
+#define INT_DATA_DON= E =C2=A0 (1 << 0)
+#define INT_PRG_DONE =C2=A0 =C2=A0(1 << 1= )
+#define INT_END_CMD =C2=A0 =C2=A0 (1 << 2)
+#define INT_STOP= _CMD =C2=A0 =C2=A0(1 << 3)
+#define INT_CLK_OFF =C2=A0 =C2=A0 (1 &= lt;< 4)
+#define INT_RXFIFO_REQ =C2=A0(1 << 5)
+#define INT_= TXFIFO_REQ =C2=A0(1 << 6)
+#define INT_TINT =C2=A0 =C2=A0 =C2=A0 = =C2=A0(1 << 7)
+#define INT_DAT_ERR =C2=A0 =C2=A0 (1 << 8)+#define INT_RES_ERR =C2=A0 =C2=A0 (1 << 9)
+#define INT_RD_STAL= LED =C2=A0(1 << 10)
+#define INT_SDIO_INT =C2=A0 =C2=A0(1 <<= 11)
+#define INT_SDIO_SACK =C2=A0 (1 << 12)
+#define PRTBUF_PR= T_BUF =C2=A0(1 << 0)
=C2=A0
=C2=A0/* Route internal interrupt l= ines to the global IC and DMA */
=C2=A0static void pxa2xx_mmci_int_updat= e(PXA2xxMMCIState *s)
@@ -179,23 +179,25 @@ static void pxa2xx_mmci_int_= update(PXA2xxMMCIState *s)
=C2=A0
=C2=A0static void pxa2xx_mmci_fifo_= update(PXA2xxMMCIState *s)
=C2=A0{
- =C2=A0 =C2=A0if (!s->active)<= br>+ =C2=A0 =C2=A0if (!s->active) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return;
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (s->c= mdat & CMDAT_WR_RD) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0while (s->= ;bytesleft && s->tx_len) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0sdbus_write_byte(&s->sdbus, s->tx_fifo[s->tx_sta= rt++]);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tx_start &= amp;=3D 0x1f;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tx_len --= ;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->bytesleft --;
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tx_len--;
+ =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0s->bytesleft--;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->bytesleft)
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0if (s->bytesleft) {
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->intreq |=3D INT_TXFIFO_REQ;
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0} else
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0while (s->bytesleft && s->rx_len < 32) {
-= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->rx_fifo[(s->rx_start + (= s->rx_len ++)) & 0x1f] =3D
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0s->rx_fifo[(s->rx_start + (s->rx_len++)) & 0x1f] =3D
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sdbus_read_by= te(&s->sdbus);
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->b= ytesleft --;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->bytesleft-= -;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->intreq |=3D INT= _RXFIFO_REQ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
@@ -226,44= +228,50 @@ static void pxa2xx_mmci_wakequeues(PXA2xxMMCIState *s)
=C2= =A0
=C2=A0 =C2=A0 =C2=A0request.cmd =3D s->cmd;
=C2=A0 =C2=A0 =C2= =A0request.arg =3D s->arg;
- =C2=A0 =C2=A0request.crc =3D 0; /* FIXME= */
+ =C2=A0 =C2=A0request.crc =3D 0; =C2=A0/* FIXME */
=C2=A0
=C2= =A0 =C2=A0 =C2=A0rsplen =3D sdbus_do_command(&s->sdbus, &request= , response);
=C2=A0 =C2=A0 =C2=A0s->intreq |=3D INT_END_CMD;
=C2= =A0
=C2=A0 =C2=A0 =C2=A0memset(s->resp_fifo, 0, sizeof(s->resp_fif= o));
=C2=A0 =C2=A0 =C2=A0switch (s->cmdat & CMDAT_RES_TYPE) {
= -#define PXAMMCI_RESP(wd, value0, value1) \
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->resp_fifo[(wd) + 0] |=3D (value0); \
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->resp_fifo[(wd) + 1] |=3D (value1) << 8;
- =C2=A0 =C2=A0ca= se 0: /* No response */
+#define PXAMMCI_RESP(wd, value0, value1) =C2=A0= =C2=A0\
+ =C2=A0 =C2=A0do { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0\
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0s->resp_fifo[(wd) + 0] =3D (= value0); =C2=A0\
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0s->resp_fifo[(wd) + 1] = =3D (value1); =C2=A0\
+ =C2=A0 =C2=A0} while (0)
+ =C2=A0 =C2=A0case = 0: /* No response */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto complete;=C2=A0
- =C2=A0 =C2=A0case 1: /* R1, R4, R5 or R6 */
- =C2=A0 =C2=A0= =C2=A0 =C2=A0if (rsplen < 4)
+ =C2=A0 =C2=A0case 1: /* R1, R4, R5 or= R6 */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (rsplen < 4) {
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto timeout;
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto complete;
=C2=A0- =C2=A0 =C2=A0case 2: /* R2 */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (rsple= n < 16)
+ =C2=A0 =C2=A0case 2: /* R2 */
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0if (rsplen < 16) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0goto timeout;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0goto complete;
=C2=A0
- =C2=A0 =C2=A0case 3: /* R3 */- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (rsplen < 4)
+ =C2=A0 =C2=A0case 3: = /* R3 */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (rsplen < 4) {
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto timeout;
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto complete;
=C2=A0=C2=A0 =C2=A0 =C2=A0complete:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D = 0; rsplen > 0; i ++, rsplen -=3D 2) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0fo= r (i =3D 0; rsplen > 0; i++, rsplen -=3D 2) {
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0PXAMMCI_RESP(i, response[i * 2], response[i * 2 = + 1]);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->status |=3D STAT_END_CMDRES;
=C2=A0
- =C2=A0 =C2=A0 = =C2=A0 =C2=A0if (!(s->cmdat & CMDAT_DATA_EN))
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (!(s->cmdat & CMDAT_DATA_EN)) {
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0s->active =3D 0;
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0else
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0s->bytesleft =3D s->numblk * s->blklen= ;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0s->resp_len =3D 0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;=
@@ -333,7 +341,7 @@ static uint64_t pxa2xx_mmci_read(void *opaque, hwad= dr offset, unsigned size)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0while (size-= - && s->rx_len) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0ret |=3D s->rx_fifo[s->rx_start++] << (size << 3);<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->rx_start &=3D = 0x1f;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->rx_len --;
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->rx_len--;
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->intreq &am= p;=3D ~INT_RXFIFO_REQ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_mmci_fif= o_update(s);
@@ -399,8 +407,9 @@ static void pxa2xx_mmci_write(void *opa= que,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!(value & CMDAT_STOP_TRAN= )) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->status &= =3D STAT_CLK_EN;
=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if= (s->status & STAT_CLK_EN)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0if (s->status & STAT_CLK_EN) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_mmci_wakequeues(s);
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<= br>=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_mmci_int_update(s);@@ -451,7 +460,7 @@ static void pxa2xx_mmci_write(void *opaque,
=C2=A0=
=C2=A0 =C2=A0 =C2=A0case MMC_TXFIFO:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0while (size-- && s->tx_len < 0x20)
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->tx_fifo[(s->tx_start + (s->tx_len ++)) = & 0x1f] =3D
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tx_fifo= [(s->tx_start + (s->tx_len++)) & 0x1f] =3D
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(value >> = (size << 3)) & 0xff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->i= ntreq &=3D ~INT_TXFIFO_REQ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx= _mmci_fifo_update(s);
diff --git a/hw/timer/omap_gptimer.c b/hw/timer/om= ap_gptimer.c
index 34e6af7aff..078ce294eb 100644
--- a/hw/timer/omap_= gptimer.c
+++ b/hw/timer/omap_gptimer.c
@@ -69,27 +69,29 @@ struct om= ap_gp_timer_s {
=C2=A0 =C2=A0 =C2=A0uint32_t match_val;
=C2=A0 =C2=A0= =C2=A0int capt_num;
=C2=A0
- =C2=A0 =C2=A0uint16_t writeh; /* LSB */=
- =C2=A0 =C2=A0uint16_t readh; /* MSB */
+ =C2=A0 =C2=A0uint16_t wri= teh; =C2=A0/* LSB */
+ =C2=A0 =C2=A0uint16_t readh; =C2=A0 /* MSB */
= =C2=A0};
=C2=A0
-#define GPT_TCAR_IT (1 << 2)
-#define GPT_O= VF_IT (1 << 1)
-#define GPT_MAT_IT (1 << 0)
+#define GPT_= TCAR_IT (1 << 2)
+#define GPT_OVF_IT =C2=A0(1 << 1)
+#def= ine GPT_MAT_IT =C2=A0(1 << 0)
=C2=A0
=C2=A0static inline void o= map_gp_timer_intr(struct omap_gp_timer_s *timer, int it)
=C2=A0{
=C2= =A0 =C2=A0 =C2=A0if (timer->it_ena & it) {
- =C2=A0 =C2=A0 =C2=A0= =C2=A0if (!timer->status)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!timer-&g= t;status) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_rai= se(timer->irq);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0timer->status |=3D it;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0/* Or are the status bits set even when masked?
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 * i.e. is masking applied before or after the s= tatus register? =C2=A0*/
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
- =C2=A0 =C2= =A0if (timer->wu_ena & it)
+ =C2=A0 =C2=A0if (timer->wu_ena &a= mp; it) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_pulse(timer->wku= p);
+ =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0static inline void om= ap_gp_timer_out(struct omap_gp_timer_s *timer, int level)
@@ -108,10 +11= 0,11 @@ static inline uint32_t omap_gp_timer_read(struct omap_gp_timer_s *t= imer)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0distance =3D qemu_clock_get_ns(Q= EMU_CLOCK_VIRTUAL) - timer->time;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0d= istance =3D muldiv64(distance, timer->rate, timer->ticks_per_sec);=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (distance >=3D 0xffffffff - t= imer->val)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (distance >=3D 0xffffff= ff - timer->val) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= turn 0xffffffff;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= turn timer->val + distance;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 = =C2=A0 =C2=A0} else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return timer->v= al;
=C2=A0}
@@ -148,13 +151,14 @@ static inline void omap_gp_timer_up= date(struct omap_gp_timer_s *timer)
=C2=A0
=C2=A0static inline void o= map_gp_timer_trigger(struct omap_gp_timer_s *timer)
=C2=A0{
- =C2=A0 = =C2=A0if (timer->pt)
+ =C2=A0 =C2=A0if (timer->pt) {
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0/* TODO in overflow-and-match mode if the first eve= nt to
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * occur is the match, don't= toggle. =C2=A0*/
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_timer_out(ti= mer, !timer->out_val);
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} else {=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* TODO inverted pulse on timer->o= ut_val =3D=3D 1? =C2=A0*/
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_pul= se(timer->out);
+ =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0static= void omap_gp_timer_tick(void *opaque)
@@ -181,8 +185,9 @@ static void o= map_gp_timer_match(void *opaque)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0struct o= map_gp_timer_s *timer =3D opaque;
=C2=A0
- =C2=A0 =C2=A0if (timer->= ;trigger =3D=3D gpt_trigger_both)
+ =C2=A0 =C2=A0if (timer->trigger = =3D=3D gpt_trigger_both) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_tim= er_trigger(timer);
+ =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0oma= p_gp_timer_intr(timer, GPT_MAT_IT);
=C2=A0}
@@ -212,8 +217,9 @@ stati= c void omap_gp_timer_input(void *opaque, int line, int on)
=C2=A0 =C2=A0= =C2=A0if (s->inout && trigger && s->capt_num < 2)= {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->capture_val[s->capt_num] = =3D omap_gp_timer_read(s);
=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-= >capt2 =3D=3D s->capt_num ++)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-&= gt;capt2 =3D=3D s->capt_num++) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0omap_gp_timer_intr(s, GPT_TCAR_IT);
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0}
=C2=A0 =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
@@ -265,26 +271,26= @@ static uint32_t omap_gp_timer_readw(void *opaque, hwaddr addr)
=C2= =A0 =C2=A0 =C2=A0struct omap_gp_timer_s *s =3D opaque;
=C2=A0
=C2=A0 = =C2=A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0case 0x00: /* TIDR */
+ = =C2=A0 =C2=A0case 0x00: =C2=A0/* TIDR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0return 0x21;
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* TIOCP_CFG */
+= =C2=A0 =C2=A0case 0x10: =C2=A0/* TIOCP_CFG */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return s->config;
=C2=A0
- =C2=A0 =C2=A0case 0x14: /* TI= STAT */
+ =C2=A0 =C2=A0case 0x14: =C2=A0/* TISTAT */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0/* ??? When's this bit reset? */
- =C2=A0 =C2=A0= =C2=A0 =C2=A0return 1; /* RESETDONE */
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0return 1; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* RESETDONE */
=C2=A0- =C2=A0 =C2=A0case 0x18: /* TISR */
+ =C2=A0 =C2=A0case 0x18: =C2=A0/= * TISR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->status;
=C2= =A0
- =C2=A0 =C2=A0case 0x1c: /* TIER */
+ =C2=A0 =C2=A0case 0x1c: = =C2=A0/* TIER */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->it_ena;<= br>=C2=A0
- =C2=A0 =C2=A0case 0x20: /* TWER */
+ =C2=A0 =C2=A0case 0x= 20: =C2=A0/* TWER */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->wu_e= na;
=C2=A0
- =C2=A0 =C2=A0case 0x24: /* TCLR */
+ =C2=A0 =C2=A0cas= e 0x24: =C2=A0/* TCLR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (s->= ;inout << 14) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(s->capt2 << 13) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->pt << 12) |
@@ -297,28 +303,= 28 @@ static uint32_t omap_gp_timer_readw(void *opaque, hwaddr addr)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s->ar <&l= t; 1) |
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s= ->st << 0);
=C2=A0
- =C2=A0 =C2=A0case 0x28: /* TCRR */
+= =C2=A0 =C2=A0case 0x28: =C2=A0/* TCRR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0return omap_gp_timer_read(s);
=C2=A0
- =C2=A0 =C2=A0case 0x2c: = /* TLDR */
+ =C2=A0 =C2=A0case 0x2c: =C2=A0/* TLDR */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0return s->load_val;
=C2=A0
- =C2=A0 =C2=A0case= 0x30: /* TTGR */
+ =C2=A0 =C2=A0case 0x30: =C2=A0/* TTGR */
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0xffffffff;
=C2=A0
- =C2=A0 =C2=A0c= ase 0x34: /* TWPS */
- =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x00000000; /* = No posted writes pending. =C2=A0*/
+ =C2=A0 =C2=A0case 0x34: =C2=A0/* TW= PS */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x00000000; =C2=A0/* No posted= writes pending. =C2=A0*/
=C2=A0
- =C2=A0 =C2=A0case 0x38: /* TMAR */=
+ =C2=A0 =C2=A0case 0x38: =C2=A0/* TMAR */
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return s->match_val;
=C2=A0
- =C2=A0 =C2=A0case 0x3c: /*= TCAR1 */
+ =C2=A0 =C2=A0case 0x3c: =C2=A0/* TCAR1 */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0return s->capture_val[0];
=C2=A0
- =C2=A0 =C2= =A0case 0x40: /* TSICR */
+ =C2=A0 =C2=A0case 0x40: =C2=A0/* TSICR */=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->posted << 2;
=C2= =A0
- =C2=A0 =C2=A0case 0x44: /* TCAR2 */
+ =C2=A0 =C2=A0case 0x44: = =C2=A0/* TCAR2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->capture= _val[1];
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
@@ -345,47 +351,54 @@ static= void omap_gp_timer_write(void *opaque, hwaddr addr, uint32_t value)
=C2= =A0 =C2=A0 =C2=A0struct omap_gp_timer_s *s =3D opaque;
=C2=A0
=C2=A0 = =C2=A0 =C2=A0switch (addr) {
- =C2=A0 =C2=A0case 0x00: /* TIDR */
- = =C2=A0 =C2=A0case 0x14: /* TISTAT */
- =C2=A0 =C2=A0case 0x34: /* TWPS *= /
- =C2=A0 =C2=A0case 0x3c: /* TCAR1 */
- =C2=A0 =C2=A0case 0x44: /* = TCAR2 */
+ =C2=A0 =C2=A0case 0x00: =C2=A0/* TIDR */
+ =C2=A0 =C2=A0ca= se 0x14: =C2=A0/* TISTAT */
+ =C2=A0 =C2=A0case 0x34: =C2=A0/* TWPS */+ =C2=A0 =C2=A0case 0x3c: =C2=A0/* TCAR1 */
+ =C2=A0 =C2=A0case 0x44: = =C2=A0/* TCAR2 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OMAP_RO_REG(addr);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case= 0x10: /* TIOCP_CFG */
+ =C2=A0 =C2=A0case 0x10: =C2=A0/* TIOCP_CFG */=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->config =3D value & 0x33d;
= - =C2=A0 =C2=A0 =C2=A0 =C2=A0if (((value >> 3) & 3) =3D=3D 3) = /* IDLEMODE */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (((value >> 3) &= ; 3) =3D=3D 3) { =C2=A0 =C2=A0 =C2=A0/* IDLEMODE */
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "%s: illegal IDLEMODE valu= e in TIOCP_CFG\n",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0__func__);
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0if (value & 2) /* SOFTRESET */
+ =C2=A0= =C2=A0 =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 2) = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* SOFTRESET */
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_timer_reset(s);
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x18: /* TISR *= /
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & GPT_TCAR_IT)
+ =C2=A0 = =C2=A0case 0x18: =C2=A0/* TISR */
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value= & GPT_TCAR_IT) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-= >capt_num =3D 0;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->status &&= amp; !(s->status &=3D ~value))
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0qemu_irq_lower(s->irq);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+= =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s->status) {
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0s->status &=3D ~value;
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0if (!s->status) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_lower(s->irq);
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x1c: /*= TIER */
+ =C2=A0 =C2=A0case 0x1c: =C2=A0/* TIER */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->it_ena =3D value & 7;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x20: /* TWER */
+ = =C2=A0 =C2=A0case 0x20: =C2=A0/* TWER */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0s->wu_ena =3D value & 7;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bre= ak;
=C2=A0
- =C2=A0 =C2=A0case 0x24: /* TCLR */
+ =C2=A0 =C2=A0cas= e 0x24: =C2=A0/* TCLR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_timer= _sync(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->inout =3D (value >&= gt; 14) & 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->capt2 =3D (valu= e >> 13) & 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->pt =3D (= value >> 12) & 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->trig= ger =3D (value >> 10) & 3;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0i= f (s->capture =3D=3D gpt_capture_none &&
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((value &= gt;> 8) & 3) !=3D gpt_capture_none)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((value >> 8)= & 3) !=3D gpt_capture_none) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0s->capt_num =3D 0;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->capture =3D (value >> 8) & 3= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->scpwm =3D (value >> 7) &= amp; 1;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->ce =3D (value >> 6= ) & 1;
@@ -399,39 +412,41 @@ static void omap_gp_timer_write(void *o= paque, hwaddr addr, uint32_t value)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if= (!s->inout && s->capture !=3D gpt_capture_none)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "%s: GP timer= pin must be an input "
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"for thi= s capture mode\n", __func__);
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-&g= t;trigger =3D=3D gpt_trigger_none)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (s-&g= t;trigger =3D=3D gpt_trigger_none) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0omap_gp_timer_out(s, s->scpwm);
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* TODO: make sure this doesn&= #39;t overflow 32-bits */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->ticks_= per_sec =3D NANOSECONDS_PER_SECOND << (s->pre ? s->ptv + 1 : 0)= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_timer_update(s);
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x28: /*= TCRR */
+ =C2=A0 =C2=A0case 0x28: =C2=A0/* TCRR */
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->time =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->val =3D value;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0omap_gp_timer_update(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0break;
=C2=A0
- =C2=A0 =C2=A0case 0x2c: /* TLDR */
+ =C2=A0 = =C2=A0case 0x2c: =C2=A0/* TLDR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s-&g= t;load_val =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0=
- =C2=A0 =C2=A0case 0x30: /* TTGR */
+ =C2=A0 =C2=A0case 0x30: =C2= =A0/* TTGR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->time =3D qemu_cloc= k_get_ns(QEMU_CLOCK_VIRTUAL);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->va= l =3D s->load_val;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_timer_up= date(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0
- =C2=A0 = =C2=A0case 0x38: /* TMAR */
+ =C2=A0 =C2=A0case 0x38: =C2=A0/* TMAR */=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_timer_sync(s);
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0s->match_val =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0omap_gp_timer_update(s);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bre= ak;
=C2=A0
- =C2=A0 =C2=A0case 0x40: /* TSICR */
+ =C2=A0 =C2=A0ca= se 0x40: =C2=A0/* TSICR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->poste= d =3D (value >> 2) & 1;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value= & 2) /* How much exactly are we supposed to reset? */
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0if (value & 2) { /* How much exactly are we supposed t= o reset? */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_time= r_reset(s);
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0break;
=C2=A0
=C2=A0 =C2=A0 =C2=A0default:
@@ -443,10 +4= 58,11 @@ static void omap_gp_timer_writeh(void *opaque, hwaddr addr, uint32= _t value)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0struct omap_gp_timer_s *s =3D o= paque;
=C2=A0
- =C2=A0 =C2=A0if (addr & 2)
+ =C2=A0 =C2=A0if (= addr & 2) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0omap_gp_timer_write(op= aque, addr, (value << 16) | s->writeh);
- =C2=A0 =C2=A0else
= + =C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->writeh = =3D (uint16_t) value;
+ =C2=A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0sta= tic uint64_t omap_gp_timer_readfn(void *opaque, hwaddr addr,
diff --git = a/hw/timer/omap_synctimer.c b/hw/timer/omap_synctimer.c
index d93a9344ed= ..645170c015 100644
--- a/hw/timer/omap_synctimer.c
+++ b/hw/timer/om= ap_synctimer.c
@@ -27,7 +27,8 @@ struct omap_synctimer_s {
=C2=A0};=C2=A0
=C2=A0/* 32-kHz Sync Timer of the OMAP2 */
-static uint32_t = omap_synctimer_read(struct omap_synctimer_s *s) {
+static uint32_t omap_= synctimer_read(struct omap_synctimer_s *s)
+{
=C2=A0 =C2=A0 =C2=A0ret= urn muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), 0x8000,
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NANOSECON= DS_PER_SECOND);
=C2=A0}
@@ -42,10 +43,10 @@ static uint32_t omap_sync= timer_readw(void *opaque, hwaddr addr)
=C2=A0 =C2=A0 =C2=A0struct omap_s= ynctimer_s *s =3D opaque;
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (addr) {<= br>- =C2=A0 =C2=A0case 0x00: /* 32KSYNCNT_REV */
+ =C2=A0 =C2=A0case 0x0= 0: =C2=A0/* 32KSYNCNT_REV */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0x= 21;
=C2=A0
- =C2=A0 =C2=A0case 0x10: /* CR */
+ =C2=A0 =C2=A0case = 0x10: =C2=A0/* CR */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return omap_synct= imer_read(s) - s->val;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0
diff --git = a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c
index 6479ab1a8b..04= 0668631e 100644
--- a/hw/timer/pxa2xx_timer.c
+++ b/hw/timer/pxa2xx_t= imer.c
@@ -20,42 +20,42 @@
=C2=A0#include "qom/object.h"=C2=A0#include "sysemu/watchdog.h"
=C2=A0
-#define OSMR0 0= x00
-#define OSMR1 0x04
-#define OSMR2 0x08
-#define OSMR3 0x0c-#define OSMR4 0x80
-#define OSMR5 0x84
-#define OSMR6 0x88
-#def= ine OSMR7 0x8c
-#define OSMR8 0x90
-#define OSMR9 0x94
-#define OS= MR10 0x98
-#define OSMR11 0x9c
-#define OSCR 0x10 /* OS Timer Count *= /
-#define OSCR4 0x40
-#define OSCR5 0x44
-#define OSCR6 0x48
-= #define OSCR7 0x4c
-#define OSCR8 0x50
-#define OSCR9 0x54
-#defin= e OSCR10 0x58
-#define OSCR11 0x5c
-#define OSSR 0x14 /* Timer status= register */
-#define OWER 0x18
-#define OIER 0x1c /* Interrupt enabl= e register =C2=A03-0 to E3-E0 */
-#define OMCR4 0xc0 /* OS Match Control= registers */
-#define OMCR5 0xc4
-#define OMCR6 0xc8
-#define OMC= R7 0xcc
-#define OMCR8 0xd0
-#define OMCR9 0xd4
-#define OMCR10 0x= d8
-#define OMCR11 0xdc
-#define OSNR 0x20
-
-#define PXA25X_FR= EQ 3686400 /* 3.6864 MHz */
-#define PXA27X_FREQ 3250000 /* 3.25 MHz */<= br>+#define OSMR0 =C2=A0 0x00
+#define OSMR1 =C2=A0 0x04
+#define OSM= R2 =C2=A0 0x08
+#define OSMR3 =C2=A0 0x0c
+#define OSMR4 =C2=A0 0x80<= br>+#define OSMR5 =C2=A0 0x84
+#define OSMR6 =C2=A0 0x88
+#define OSM= R7 =C2=A0 0x8c
+#define OSMR8 =C2=A0 0x90
+#define OSMR9 =C2=A0 0x94<= br>+#define OSMR10 =C2=A00x98
+#define OSMR11 =C2=A00x9c
+#define OSC= R =C2=A0 =C2=A00x10 =C2=A0/* OS Timer Count */
+#define OSCR4 =C2=A0 0x4= 0
+#define OSCR5 =C2=A0 0x44
+#define OSCR6 =C2=A0 0x48
+#define O= SCR7 =C2=A0 0x4c
+#define OSCR8 =C2=A0 0x50
+#define OSCR9 =C2=A0 0x5= 4
+#define OSCR10 =C2=A00x58
+#define OSCR11 =C2=A00x5c
+#define O= SSR =C2=A0 =C2=A00x14 =C2=A0/* Timer status register */
+#define OWER = =C2=A0 =C2=A00x18
+#define OIER =C2=A0 =C2=A00x1c =C2=A0/* Interrupt ena= ble register =C2=A03-0 to E3-E0 */
+#define OMCR4 =C2=A0 0xc0 =C2=A0/* O= S Match Control registers */
+#define OMCR5 =C2=A0 0xc4
+#define OMCR= 6 =C2=A0 0xc8
+#define OMCR7 =C2=A0 0xcc
+#define OMCR8 =C2=A0 0xd0+#define OMCR9 =C2=A0 0xd4
+#define OMCR10 =C2=A00xd8
+#define OMCR= 11 =C2=A00xdc
+#define OSNR =C2=A0 =C2=A00x20
+
+#define PXA25X_FR= EQ 3686400 /* 3.6864 MHz */
+#define PXA27X_FREQ 3250000 /* 3.25 MHz */<= br>=C2=A0
=C2=A0static int pxa2xx_timer4_freq[8] =3D {
=C2=A0 =C2=A0 = =C2=A0[0] =3D 0,
@@ -108,7 +108,7 @@ struct PXA2xxTimerInfo {
=C2=A0 = =C2=A0 =C2=A0PXA2xxTimer4 tm4[8];
=C2=A0};
=C2=A0
-#define PXA2XX_= TIMER_HAVE_TM4 0
+#define PXA2XX_TIMER_HAVE_TM4 0
=C2=A0
=C2=A0sta= tic inline int pxa2xx_timer_has_tm4(PXA2xxTimerInfo *s)
=C2=A0{
@@ -1= 25,7 +125,7 @@ static void pxa2xx_timer_update(void *opaque, uint64_t now_q= emu)
=C2=A0 =C2=A0 =C2=A0now_vm =3D s->clock +
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0muldiv64(now_qemu - s->lastload, s->fr= eq, NANOSECONDS_PER_SECOND);
=C2=A0
- =C2=A0 =C2=A0for (i =3D 0; i &l= t; 4; i ++) {
+ =C2=A0 =C2=A0for (i =3D 0; i < 4; i++) {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0new_qemu =3D now_qemu + muldiv64((uint32_t) (s-&= gt;timer[i].value - now_vm),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NANOSECONDS_PER_SECOND, s-&= gt;freq);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer_mod(s->timer[i].qti= mer, new_qemu);
@@ -141,10 +141,11 @@ static void pxa2xx_timer_update4(v= oid *opaque, uint64_t now_qemu, int n)
=C2=A0 =C2=A0 =C2=A0int counter;<= br>=C2=A0
=C2=A0 =C2=A0 =C2=A0assert(n < ARRAY_SIZE(counters));
- = =C2=A0 =C2=A0if (s->tm4[n].control & (1 << 7))
+ =C2=A0 =C2= =A0if (s->tm4[n].control & (1 << 7)) {
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0counter =3D n;
- =C2=A0 =C2=A0else
+ =C2=A0 =C2=A0} els= e {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0counter =3D counters[n];
+ =C2= =A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (!s->tm4[counter].freq) = {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer_del(s->tm4[n].tm.qtimer);@@ -167,52 +168,71 @@ static uint64_t pxa2xx_timer_read(void *opaque, hwa= ddr offset,
=C2=A0 =C2=A0 =C2=A0int tm =3D 0;
=C2=A0
=C2=A0 =C2=A0= =C2=A0switch (offset) {
- =C2=A0 =C2=A0case OSMR3: =C2=A0tm ++;
+ = =C2=A0 =C2=A0case OSMR3:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSMR2:= =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR2:
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2= =A0 =C2=A0case OSMR1: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR1:
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall = through */
=C2=A0 =C2=A0 =C2=A0case OSMR0:
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return s->timer[tm].value;
- =C2=A0 =C2=A0case OSMR11: tm += +;
+ =C2=A0 =C2=A0case OSMR11:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case= OSMR10: tm ++;
+ =C2=A0 =C2=A0case OSMR10:
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- = =C2=A0 =C2=A0case OSMR9: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR9:
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fa= ll through */
- =C2=A0 =C2=A0case OSMR8: =C2=A0tm ++;
+ =C2=A0 =C2=A0= case OSMR8:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSMR7: =C2=A0tm ++;<= br>+ =C2=A0 =C2=A0case OSMR7:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OS= MR6: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR6:
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- = =C2=A0 =C2=A0case OSMR5: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR5:
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fa= ll through */
=C2=A0 =C2=A0 =C2=A0case OSMR4:
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0if (!pxa2xx_timer_has_tm4(s))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!px= a2xx_timer_has_tm4(s)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0goto badreg;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return s->tm4[tm].tm.value;
=C2=A0 =C2=A0 =C2=A0case OSC= R:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->clock + muldiv64(qemu_= clock_get_ns(QEMU_CLOCK_VIRTUAL) -
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->lastload, s-&g= t;freq, NANOSECONDS_PER_SECOND);
- =C2=A0 =C2=A0case OSCR11: tm ++;
+= =C2=A0 =C2=A0case OSCR11:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSCR10= : tm ++;
+ =C2=A0 =C2=A0case OSCR10:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm+= +;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2= =A0case OSCR9: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSCR9:
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through= */
- =C2=A0 =C2=A0case OSCR8: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSCR8= :
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0/* fall through */
- =C2=A0 =C2=A0case OSCR7: =C2=A0tm ++;
+ =C2= =A0 =C2=A0case OSCR7:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSCR6: = =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSCR6:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 = =C2=A0case OSCR5: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSCR5:
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall thro= ugh */
=C2=A0 =C2=A0 =C2=A0case OSCR4:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0i= f (!pxa2xx_timer_has_tm4(s))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!pxa2xx_ti= mer_has_tm4(s)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto b= adreg;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0if ((tm =3D=3D 9 - 4 || tm =3D=3D 11 - 4) && (s->tm= 4[tm].control & (1 << 9))) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0if (s->tm4[tm - 1].freq)
@@ -224,35 +244,44 @@ stati= c uint64_t pxa2xx_timer_read(void *opaque, hwaddr offset,
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->snapshot =3D s->tm= 4[tm - 1].clock;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0if (!s->tm4[tm].freq)
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0if (!s->tm4[tm].freq) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return s->tm4[tm].clock;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->tm4[tm].clock +
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0muldiv64(qemu_clock_get_ns(QEMU_CL= OCK_VIRTUAL) -
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 s->tm4[tm].lastload, s->tm4[tm].freq,
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 NANOS= ECONDS_PER_SECOND);
=C2=A0 =C2=A0 =C2=A0case OIER:
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return s->irq_enabled;
- =C2=A0 =C2=A0case OSSR: /* = Status register */
+ =C2=A0 =C2=A0case OSSR: =C2=A0/* Status register */=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->events;
=C2=A0 =C2=A0= =C2=A0case OWER:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->reset3;=
- =C2=A0 =C2=A0case OMCR11: tm ++;
+ =C2=A0 =C2=A0case OMCR11:
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fa= ll through */
- =C2=A0 =C2=A0case OMCR10: tm ++;
+ =C2=A0 =C2=A0case = OMCR10:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OMCR9: =C2=A0tm ++;
= + =C2=A0 =C2=A0case OMCR9:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OMCR8:= =C2=A0tm ++;
+ =C2=A0 =C2=A0case OMCR8:
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2= =A0 =C2=A0case OMCR7: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OMCR7:
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall = through */
- =C2=A0 =C2=A0case OMCR6: =C2=A0tm ++;
+ =C2=A0 =C2=A0cas= e OMCR6:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OMCR5: =C2=A0tm ++;
= + =C2=A0 =C2=A0case OMCR5:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
=C2=A0 =C2=A0 =C2=A0case O= MCR4:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!pxa2xx_timer_has_tm4(s))
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!pxa2xx_timer_has_tm4(s)) {
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto badreg;
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return s->tm4[tm].control;<= br>=C2=A0 =C2=A0 =C2=A0case OSNR:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retu= rn s->snapshot;
@@ -277,33 +306,44 @@ static void pxa2xx_timer_write(= void *opaque, hwaddr offset,
=C2=A0 =C2=A0 =C2=A0PXA2xxTimerInfo *s =3D = (PXA2xxTimerInfo *) opaque;
=C2=A0
=C2=A0 =C2=A0 =C2=A0switch (offset= ) {
- =C2=A0 =C2=A0case OSMR3: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR3= :
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0/* fall through */
- =C2=A0 =C2=A0case OSMR2: =C2=A0tm ++;
+ =C2= =A0 =C2=A0case OSMR2:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSMR1: = =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR1:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
=C2=A0 =C2= =A0 =C2=A0case OSMR0:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->timer[tm].= value =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_timer_update(s= , qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0break;
- =C2=A0 =C2=A0case OSMR11: tm ++;
+ =C2=A0 =C2=A0case O= SMR11:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSMR10: tm ++;
+ =C2=A0= =C2=A0case OSMR10:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSMR9: =C2=A0= tm ++;
+ =C2=A0 =C2=A0case OSMR9:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0c= ase OSMR8: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR8:
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */<= br>- =C2=A0 =C2=A0case OSMR7: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSMR7:+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/*= fall through */
- =C2=A0 =C2=A0case OSMR6: =C2=A0tm ++;
+ =C2=A0 =C2= =A0case OSMR6:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSMR5: =C2=A0tm = ++;
+ =C2=A0 =C2=A0case OSMR5:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
=C2=A0 =C2=A0 =C2= =A0case OSMR4:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!pxa2xx_timer_has_tm4(s)= )
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!pxa2xx_timer_has_tm4(s)) {
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto badreg;
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tm4[tm].tm.value = =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_timer_update4(s, qem= u_clock_get_ns(QEMU_CLOCK_VIRTUAL), tm);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0break;
@@ -313,23 +353,31 @@ static void pxa2xx_timer_write(void *opa= que, hwaddr offset,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->clock =3D va= lue;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_timer_update(s, s->last= load);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case O= SCR11: tm ++;
+ =C2=A0 =C2=A0case OSCR11:
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2= =A0 =C2=A0case OSCR10: tm ++;
+ =C2=A0 =C2=A0case OSCR10:
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall thro= ugh */
- =C2=A0 =C2=A0case OSCR9: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OS= CR9:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSCR8: =C2=A0tm ++;
+ = =C2=A0 =C2=A0case OSCR8:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OSCR7:= =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSCR7:
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2= =A0 =C2=A0case OSCR6: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OSCR6:
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall = through */
- =C2=A0 =C2=A0case OSCR5: =C2=A0tm ++;
+ =C2=A0 =C2=A0cas= e OSCR5:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0/* fall through */
=C2=A0 =C2=A0 =C2=A0case OSCR4:
- =C2=A0= =C2=A0 =C2=A0 =C2=A0if (!pxa2xx_timer_has_tm4(s))
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (!pxa2xx_timer_has_tm4(s)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0goto badreg;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tm4[tm].oldclock =3D s->tm4[tm].clo= ck;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tm4[tm].lastload =3D qemu_cl= ock_get_ns(QEMU_CLOCK_VIRTUAL);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->= tm4[tm].clock =3D value;
@@ -338,27 +386,33 @@ static void pxa2xx_timer_= write(void *opaque, hwaddr offset,
=C2=A0 =C2=A0 =C2=A0case OIER:
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->irq_enabled =3D value & 0xfff;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case OSSR: /* St= atus register */
+ =C2=A0 =C2=A0case OSSR: =C2=A0/* Status register */=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0value &=3D s->events;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0s->events &=3D ~value;
- =C2=A0 =C2=A0= =C2=A0 =C2=A0for (i =3D 0; i < 4; i ++, value >>=3D 1)
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 1)
+ =C2=A0 =C2=A0= =C2=A0 =C2=A0for (i =3D 0; i < 4; i++, value >>=3D 1)
+ =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (value & 1) {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_lower(s->timer[= i].irq);
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (pxa2xx_timer_has_tm4(s) &&= amp; !(s->events & 0xff0) && value)
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (pxa2xx_timer_= has_tm4(s) && !(s->events & 0xff0) && value) {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_lower(s->irq4);=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bre= ak;
- =C2=A0 =C2=A0case OWER: /* XXX: Reset on OSMR3 match? */
+ =C2= =A0 =C2=A0case OWER: =C2=A0/* XXX: Reset on OSMR3 match? */
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0s->reset3 =3D value;
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0break;
- =C2=A0 =C2=A0case OMCR7: =C2=A0tm ++;
+ =C2=A0 =C2= =A0case OMCR7:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case OMCR6: =C2=A0tm = ++;
+ =C2=A0 =C2=A0case OMCR6:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 =C2=A0case= OMCR5: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OMCR5:
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
= =C2=A0 =C2=A0 =C2=A0case OMCR4:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!pxa2xx= _timer_has_tm4(s))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!pxa2xx_timer_has_tm= 4(s)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto badreg;
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->t= m4[tm].control =3D value & 0x0ff;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= /* XXX Stop if running (shouldn't happen) */
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0if ((value & (1 << 7)) || tm =3D=3D 0)
@@ -368,15= +422,20 @@ static void pxa2xx_timer_write(void *opaque, hwaddr offset,
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_timer_update4(s, qem= u_clock_get_ns(QEMU_CLOCK_VIRTUAL), tm);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
- =C2=A0 =C2=A0case OMC= R11: tm ++;
+ =C2=A0 =C2=A0case OMCR11:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */
- =C2=A0 = =C2=A0case OMCR10: tm ++;
+ =C2=A0 =C2=A0case OMCR10:
+ =C2=A0 =C2=A0= =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* fall through */=
- =C2=A0 =C2=A0case OMCR9: =C2=A0tm ++;
+ =C2=A0 =C2=A0case OMCR9:+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm++;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/= * fall through */
- =C2=A0 =C2=A0case OMCR8: =C2=A0tm +=3D 4;
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0if (!pxa2xx_timer_has_tm4(s))
+ =C2=A0 =C2=A0cas= e OMCR8:
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0tm +=3D 4;
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (!pxa2xx_timer_has_tm4(s)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0goto badreg;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tm4[tm].control =3D value & 0x3ff;=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* XXX Stop if running (shouldn't= happen) */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((value & (1 <&l= t; 7)) || !(tm & 1))
@@ -428,12 +487,15 @@ static void pxa2xx_timer_= tick4(void *opaque)
=C2=A0 =C2=A0 =C2=A0PXA2xxTimerInfo *i =3D (PXA2xxTi= merInfo *) t->tm.info;
=C2=A0
=C2= =A0 =C2=A0 =C2=A0pxa2xx_timer_tick(&t->tm);
- =C2=A0 =C2=A0if (t-= >control & (1 << 3))
+ =C2=A0 =C2=A0if (t->control &= (1 << 3)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0t->clock =3D 0;<= br>- =C2=A0 =C2=A0if (t->control & (1 << 6))
+ =C2=A0 =C2= =A0}
+ =C2=A0 =C2=A0if (t->control & (1 << 6)) {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_timer_update4(i, qemu_clock_get_ns(QEMU_C= LOCK_VIRTUAL), t->tm.num - 4);
- =C2=A0 =C2=A0if (i->events & = 0xff0)
+ =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0if (i->events & 0xff0) = {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_irq_raise(i->irq4);
+ =C2= =A0 =C2=A0}
=C2=A0}
=C2=A0
=C2=A0static int pxa25x_timer_post_load= (void *opaque, int version_id)
@@ -446,8 +508,9 @@ static int pxa25x_tim= er_post_load(void *opaque, int version_id)
=C2=A0 =C2=A0 =C2=A0pxa2xx_ti= mer_update(s, now);
=C2=A0
=C2=A0 =C2=A0 =C2=A0if (pxa2xx_timer_has_t= m4(s))
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < 8; i ++)
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < 8; i++) {
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pxa2xx_timer_update4(s, now, i);
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0 =C2=A0return 0;
=C2= =A0}
@@ -474,7 +537,7 @@ static void pxa2xx_timer_realize(DeviceState *d= ev, Error **errp)
=C2=A0 =C2=A0 =C2=A0SysBusDevice *sbd =3D SYS_BUS_DEVI= CE(dev);
=C2=A0 =C2=A0 =C2=A0int i;
=C2=A0
- =C2=A0 =C2=A0for (i = =3D 0; i < 4; i ++) {
+ =C2=A0 =C2=A0for (i =3D 0; i < 4; i++) {=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->timer[i].value =3D 0;
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0sysbus_init_irq(sbd, &s->timer[i].irq);=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->timer[i].info =3D s;
@@ -486,7= +549,7 @@ static void pxa2xx_timer_realize(DeviceState *dev, Error **errp)=
=C2=A0 =C2=A0 =C2=A0if (s->flags & (1 << PXA2XX_TIMER_HAVE= _TM4)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sysbus_init_irq(sbd, &s-&= gt;irq4);
=C2=A0
- =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < 8;= i ++) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < 8; i++) {
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tm4[i].tm.value =3D 0= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->tm4[i].tm.info =3D s;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0s->tm4[i].tm.num =3D i + 4;
diff --git a/include/hw/= arm/pxa.h b/include/hw/arm/pxa.h
index 4c6caee113..9c6d434a4b 100644
= --- a/include/hw/arm/pxa.h
+++ b/include/hw/arm/pxa.h
@@ -16,57 +16,5= 7 @@
=C2=A0#include "qom/object.h"
=C2=A0
=C2=A0/* Inter= rupt numbers */
-# define PXA2XX_PIC_SSP3 0
-# define PXA2XX_PIC_USBH= 2 2
-# define PXA2XX_PIC_USBH1 3
-# define PXA2XX_PIC_KEYPAD 4
-# = define PXA2XX_PIC_PWRI2C 6
-# define PXA25X_PIC_HWUART 7
-# define PX= A27X_PIC_OST_4_11 7
-# define PXA2XX_PIC_GPIO_0 8
-# define PXA2XX_PI= C_GPIO_1 9
-# define PXA2XX_PIC_GPIO_X 10
-# define PXA2XX_PIC_I2S 1= 3
-# define PXA26X_PIC_ASSP 15
-# define PXA25X_PIC_NSSP 16
-# def= ine PXA27X_PIC_SSP2 16
-# define PXA2XX_PIC_LCD 17
-# define PXA2XX_= PIC_I2C 18
-# define PXA2XX_PIC_ICP 19
-# define PXA2XX_PIC_STUART = 20
-# define PXA2XX_PIC_BTUART 21
-# define PXA2XX_PIC_FFUART 22
-= # define PXA2XX_PIC_MMC 23
-# define PXA2XX_PIC_SSP 24
-# define PX= A2XX_PIC_DMA 25
-# define PXA2XX_PIC_OST_0 26
-# define PXA2XX_PIC_R= TC1HZ 30
-# define PXA2XX_PIC_RTCALARM 31
+# define PXA2XX_PIC_SSP3 = =C2=A0 =C2=A0 =C2=A0 =C2=A00
+# define PXA2XX_PIC_USBH2 =C2=A0 =C2=A0 = =C2=A0 2
+# define PXA2XX_PIC_USBH1 =C2=A0 =C2=A0 =C2=A0 3
+# define = PXA2XX_PIC_KEYPAD =C2=A0 =C2=A0 =C2=A04
+# define PXA2XX_PIC_PWRI2C =C2= =A0 =C2=A0 =C2=A06
+# define PXA25X_PIC_HWUART =C2=A0 =C2=A0 =C2=A07
= +# define PXA27X_PIC_OST_4_11 =C2=A0 =C2=A07
+# define PXA2XX_PIC_GPIO_0= =C2=A0 =C2=A0 =C2=A08
+# define PXA2XX_PIC_GPIO_1 =C2=A0 =C2=A0 =C2=A09=
+# define PXA2XX_PIC_GPIO_X =C2=A0 =C2=A0 =C2=A010
+# define PXA2XX_= PIC_I2S =C2=A0 =C2=A0 =C2=A0 =C2=A0 13
+# define PXA26X_PIC_ASSP =C2=A0 = =C2=A0 =C2=A0 =C2=A015
+# define PXA25X_PIC_NSSP =C2=A0 =C2=A0 =C2=A0 = =C2=A016
+# define PXA27X_PIC_SSP2 =C2=A0 =C2=A0 =C2=A0 =C2=A016
+# d= efine PXA2XX_PIC_LCD =C2=A0 =C2=A0 =C2=A0 =C2=A0 17
+# define PXA2XX_PIC= _I2C =C2=A0 =C2=A0 =C2=A0 =C2=A0 18
+# define PXA2XX_PIC_ICP =C2=A0 =C2= =A0 =C2=A0 =C2=A0 19
+# define PXA2XX_PIC_STUART =C2=A0 =C2=A0 =C2=A020<= br>+# define PXA2XX_PIC_BTUART =C2=A0 =C2=A0 =C2=A021
+# define PXA2XX_P= IC_FFUART =C2=A0 =C2=A0 =C2=A022
+# define PXA2XX_PIC_MMC =C2=A0 =C2=A0 = =C2=A0 =C2=A0 23
+# define PXA2XX_PIC_SSP =C2=A0 =C2=A0 =C2=A0 =C2=A0 24=
+# define PXA2XX_PIC_DMA =C2=A0 =C2=A0 =C2=A0 =C2=A0 25
+# define PX= A2XX_PIC_OST_0 =C2=A0 =C2=A0 =C2=A0 26
+# define PXA2XX_PIC_RTC1HZ =C2= =A0 =C2=A0 =C2=A030
+# define PXA2XX_PIC_RTCALARM =C2=A0 =C2=A031
=C2= =A0
=C2=A0/* DMA requests */
-# define PXA2XX_RX_RQ_I2S 2
-# defin= e PXA2XX_TX_RQ_I2S 3
-# define PXA2XX_RX_RQ_BTUART 4
-# define PXA2XX= _TX_RQ_BTUART 5
-# define PXA2XX_RX_RQ_FFUART 6
-# define PXA2XX_TX_R= Q_FFUART 7
-# define PXA2XX_RX_RQ_SSP1 13
-# define PXA2XX_TX_RQ_SSP1= 14
-# define PXA2XX_RX_RQ_SSP2 15
-# define PXA2XX_TX_RQ_SSP2 16
= -# define PXA2XX_RX_RQ_ICP 17
-# define PXA2XX_TX_RQ_ICP 18
-# define= PXA2XX_RX_RQ_STUART 19
-# define PXA2XX_TX_RQ_STUART 20
-# define PX= A2XX_RX_RQ_MMCI 21
-# define PXA2XX_TX_RQ_MMCI 22
-# define PXA2XX_US= B_RQ(x) ((x) + 24)
-# define PXA2XX_RX_RQ_SSP3 66
-# define PXA2XX_TX= _RQ_SSP3 67
-
-# define PXA2XX_SDRAM_BASE 0xa0000000
-# define PXA= 2XX_INTERNAL_BASE 0x5c000000
-# define PXA2XX_INTERNAL_SIZE 0x40000
+= # define PXA2XX_RX_RQ_I2S =C2=A0 =C2=A0 =C2=A0 2
+# define PXA2XX_TX_RQ_= I2S =C2=A0 =C2=A0 =C2=A0 3
+# define PXA2XX_RX_RQ_BTUART =C2=A0 =C2=A04<= br>+# define PXA2XX_TX_RQ_BTUART =C2=A0 =C2=A05
+# define PXA2XX_RX_RQ_F= FUART =C2=A0 =C2=A06
+# define PXA2XX_TX_RQ_FFUART =C2=A0 =C2=A07
+# = define PXA2XX_RX_RQ_SSP1 =C2=A0 =C2=A0 =C2=A013
+# define PXA2XX_TX_RQ_S= SP1 =C2=A0 =C2=A0 =C2=A014
+# define PXA2XX_RX_RQ_SSP2 =C2=A0 =C2=A0 =C2= =A015
+# define PXA2XX_TX_RQ_SSP2 =C2=A0 =C2=A0 =C2=A016
+# define PX= A2XX_RX_RQ_ICP =C2=A0 =C2=A0 =C2=A0 17
+# define PXA2XX_TX_RQ_ICP =C2=A0= =C2=A0 =C2=A0 18
+# define PXA2XX_RX_RQ_STUART =C2=A0 =C2=A019
+# de= fine PXA2XX_TX_RQ_STUART =C2=A0 =C2=A020
+# define PXA2XX_RX_RQ_MMCI =C2= =A0 =C2=A0 =C2=A021
+# define PXA2XX_TX_RQ_MMCI =C2=A0 =C2=A0 =C2=A022+# define PXA2XX_USB_RQ(x) =C2=A0 =C2=A0 =C2=A0 ((x) + 24)
+# define P= XA2XX_RX_RQ_SSP3 =C2=A0 =C2=A0 =C2=A066
+# define PXA2XX_TX_RQ_SSP3 =C2= =A0 =C2=A0 =C2=A067
+
+# define PXA2XX_SDRAM_BASE =C2=A0 =C2=A0 =C2= =A00xa0000000
+# define PXA2XX_INTERNAL_BASE =C2=A0 0x5c000000
+# def= ine PXA2XX_INTERNAL_SIZE =C2=A0 0x40000
=C2=A0
=C2=A0/* pxa2xx_pic.c = */
=C2=A0DeviceState *pxa2xx_pic_init(hwaddr base, ARMCPU *cpu);
@@ -= 189,7 +189,7 @@ struct PXA2xxI2SState {
=C2=A0 =C2=A0 =C2=A0uint32_t fif= o[16];
=C2=A0};
=C2=A0
-# define PA_FMT "0x%08lx"
+= # define PA_FMT =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &qu= ot;0x%08lx"
=C2=A0
=C2=A0PXA2xxState *pxa270_init(unsigned int s= dram_size, const char *revision);
=C2=A0PXA2xxState *pxa255_init(unsigne= d int sdram_size);
diff --git a/include/hw/arm/sharpsl.h b/include/hw/ar= m/sharpsl.h
index e986b28c52..7e5e7ca60b 100644
--- a/include/hw/arm/= sharpsl.h
+++ b/include/hw/arm/sharpsl.h
@@ -11,7 +11,7 @@
=C2=A0<= br>=C2=A0/* zaurus.c */
=C2=A0
-#define SL_PXA_PARAM_BASE 0xa0000a00<= br>+#define SL_PXA_PARAM_BASE =C2=A0 =C2=A0 =C2=A0 0xa0000a00
=C2=A0void= sl_bootparam_write(hwaddr ptr);
=C2=A0
=C2=A0#endif
diff --git a/= include/hw/arm/soc_dma.h b/include/hw/arm/soc_dma.h
index e93a7499a8..bc= db91425a 100644
--- a/include/hw/arm/soc_dma.h
+++ b/include/hw/arm/s= oc_dma.h
@@ -54,7 +54,7 @@ struct soc_dma_ch_s {
=C2=A0 =C2=A0 =C2=A0= int bytes;
=C2=A0 =C2=A0 =C2=A0/* Initialised by the DMA module, call so= c_dma_ch_update after writing. =C2=A0*/
=C2=A0 =C2=A0 =C2=A0enum soc_dma= _access_type type[2];
- =C2=A0 =C2=A0hwaddr vaddr[2]; /* Updated by .tra= nsfer_fn(). =C2=A0*/
+ =C2=A0 =C2=A0hwaddr vaddr[2]; =C2=A0 =C2=A0/* Upd= ated by .transfer_fn(). =C2=A0*/
=C2=A0 =C2=A0 =C2=A0/* Private */
= =C2=A0 =C2=A0 =C2=A0void *paddr[2];
=C2=A0 =C2=A0 =C2=A0soc_dma_io_t io_= fn[2];
@@ -70,7 +70,7 @@ struct soc_dma_ch_s {
=C2=A0struct soc_dma_s= {
=C2=A0 =C2=A0 =C2=A0/* Following fields are set by the SoC DMA module= and can be used
=C2=A0 =C2=A0 =C2=A0 * by anybody. =C2=A0*/
- =C2=A0= =C2=A0uint64_t drqbmp; /* Is zeroed by soc_dma_reset() */
+ =C2=A0 =C2= =A0uint64_t drqbmp; =C2=A0 =C2=A0/* Is zeroed by soc_dma_reset() */
=C2= =A0 =C2=A0 =C2=A0qemu_irq *drq;
=C2=A0 =C2=A0 =C2=A0void *opaque;
=C2= =A0 =C2=A0 =C2=A0int64_t freq;
diff --git a/tcg/arm/tcg-target.h b/tcg/a= rm/tcg-target.h
index a43875cb09..9a07372fd9 100644
--- a/tcg/arm/tcg= -target.h
+++ b/tcg/arm/tcg-target.h
@@ -86,8 +86,8 @@ extern bool us= e_neon_instructions;
=C2=A0#endif
=C2=A0
=C2=A0/* used for functio= n call generation */
-#define TCG_TARGET_STACK_ALIGN 8
-#define TCG_= TARGET_CALL_STACK_OFFSET 0
+#define TCG_TARGET_STACK_ALIGN =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A08
+#define TCG_TARGET_CALL_STACK_OFFSET =C2=A0 =C2= =A00
=C2=A0#define TCG_TARGET_CALL_ARG_I32 =C2=A0 =C2=A0 =C2=A0 =C2=A0 T= CG_CALL_ARG_NORMAL
=C2=A0#define TCG_TARGET_CALL_ARG_I64 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 TCG_CALL_ARG_EVEN
=C2=A0#define TCG_TARGET_CALL_ARG_I128 = =C2=A0 =C2=A0 =C2=A0 =C2=A0TCG_CALL_ARG_EVEN
--
2.43.0


--000000000000c6e3b70617c3118c--