Compare commits
261 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
392f9ed92b | ||
|
|
e710f5aa53 | ||
|
|
88f5852a32 | ||
|
|
19f98598df | ||
|
|
6d59c16bf4 | ||
|
|
07b667905f | ||
|
|
c0a79ebd56 | ||
|
|
e9c170c27a | ||
|
|
addd0c81fb | ||
|
|
bce73f3d6b | ||
|
|
a534dc9c5e | ||
|
|
3138f77699 | ||
|
|
da4a3a4140 | ||
|
|
49f31dfe1a | ||
|
|
ce35059c6d | ||
|
|
cd0b96841a | ||
|
|
091fa99a70 | ||
|
|
69fa7a1a8a | ||
|
|
779c0a5a92 | ||
|
|
343771e034 | ||
|
|
a4bd958d4b | ||
|
|
cf511e03f5 | ||
|
|
d4bacc28aa | ||
|
|
f7e3f15521 | ||
|
|
b1a75b2c48 | ||
|
|
3fd5815625 | ||
|
|
6d7472f1ad | ||
|
|
96110fc5ff | ||
|
|
ea8462c7b4 | ||
|
|
4cf99ad8cb | ||
|
|
66883f977b | ||
|
|
19970a1715 | ||
|
|
e8a8f8551c | ||
|
|
a2d947e2db | ||
|
|
a1fc166d68 | ||
|
|
225f678346 | ||
|
|
5a9d002acb | ||
|
|
2fa980927d | ||
|
|
484b5a5590 | ||
|
|
c98e61b987 | ||
|
|
5e8c72d62c | ||
|
|
9aad387d75 | ||
|
|
18a5b39f16 | ||
|
|
c7b5f90aee | ||
|
|
8a36016cf4 | ||
|
|
e21ed21c71 | ||
|
|
be1b17531b | ||
|
|
457f2e144d | ||
|
|
a12f2ebed9 | ||
|
|
5d8e7bfbb8 | ||
|
|
34ee0286b3 | ||
|
|
b2a8982985 |
||
|
|
b097bdfdb8 |
||
|
|
bc18d38de9 |
||
|
|
f0203391bb |
||
|
|
1b52baea41 |
||
|
|
8674faa8b3 | ||
|
|
d74561968e | ||
|
|
a8d556a2a2 | ||
|
|
5a4ec30b00 |
||
|
|
e52e046f39 | ||
|
|
86c9ca66e9 | ||
|
|
6ac86401fd |
||
|
|
9bc6989237 | ||
|
|
77d3ddee28 |
||
|
|
e5601459ec | ||
|
|
45c77d097d |
||
|
|
0d1c1c3080 |
||
|
|
c3e8a1971c |
||
|
|
656f847bd0 |
||
|
|
592db7ea88 |
||
|
|
2b3d7eb2de | ||
|
|
4fbbd76abd |
||
|
|
7347fc93b8 | ||
|
|
8aa9f3c1ca |
||
|
|
9ee899f8f6 |
||
|
|
3609aa8ae8 |
||
|
|
0c4937f9e4 |
||
|
|
913381ea2f |
||
|
|
56e41c8ead |
||
|
|
3121da6e92 |
||
|
|
ceb1d8b986 |
||
|
|
8aa2e127b0 | ||
|
|
2281e33030 |
||
|
|
efb9b4ab73 |
||
|
|
66fc65905c |
||
|
|
7bfc5e0a0b |
||
|
|
2847e41dec | ||
|
|
18863658b0 | ||
|
|
53c5f0e530 |
||
|
|
7452c29bbb |
||
|
|
96b8cd25d5 | ||
|
|
8788e9beca | ||
|
|
5038283914 | ||
|
|
99efb173c5 | ||
|
|
2705a5abcc | ||
|
|
7750898d22 | ||
|
|
c56823b3f8 | ||
|
|
36af63d636 |
||
|
|
ab387cba42 | ||
|
|
bbb8ad2185 | ||
|
|
e141e07521 | ||
|
|
4caa5d4352 | ||
|
|
5826936f37 | ||
|
|
d54a013326 | ||
|
|
5c244a715c | ||
|
|
143f2f1410 | ||
|
|
bbc0bbcd2e |
||
|
|
82aeae7d94 | ||
|
|
e7783e7e1c | ||
|
|
71d09c9a1d | ||
|
|
926904aee3 | ||
|
|
45a13388a0 | ||
|
|
0f58080e74 | ||
|
|
0fc194c42c | ||
|
|
b1cc6d82ff | ||
|
|
473a8aafe6 | ||
|
|
87c80209cc | ||
|
|
0fc317f3bd | ||
|
|
f607ba7581 | ||
|
|
151d4019f7 | ||
|
|
5a10a74844 | ||
|
|
f6a90065d9 | ||
|
|
01bd226ddb | ||
|
|
d9b24fa3d2 | ||
|
|
3a24c75425 | ||
|
|
2ae6784ba7 | ||
|
|
e55efd6b2f | ||
|
|
33fa022f32 | ||
|
|
95234a2661 | ||
|
|
c274f6a4ee | ||
|
|
059f3ba4f2 | ||
|
|
27910d55be | ||
|
|
0d298e70b5 | ||
|
|
23c0c7b625 | ||
|
|
031975ac6f | ||
|
|
50f0a3682d | ||
|
|
635afafc7b |
||
|
|
39a8ad911d | ||
|
|
9faa0a329f | ||
|
|
f526cdc715 | ||
|
|
3bef8a1760 |
||
|
|
6ccfea9eca |
||
|
|
127beecb11 |
||
|
|
51cc9d3a62 |
||
|
|
807bacdbd3 |
||
|
|
c50701879a |
||
|
|
c6f9dc8803 |
||
|
|
5ec032cfa0 | ||
|
|
4723878682 | ||
|
|
f3af3aa6ab | ||
|
|
d7febc550b | ||
|
|
f17b62cb59 |
||
|
|
1ebe0dd256 | ||
|
|
b1c4f44bae |
||
|
|
dea0f108e2 |
||
|
|
7343689b34 |
||
|
|
687d20f6e8 | ||
|
|
1af46037fb | ||
|
|
052e62cec7 | ||
|
|
c9cb169d5e | ||
|
|
a94d1056ee | ||
|
|
0426af398e |
||
|
|
bf4104477e |
||
|
|
ac63c81fef | ||
|
|
9ea83b4034 |
||
|
|
aeed1b0b0d |
||
|
|
481fd57c00 |
||
|
|
db967e16ae | ||
|
|
985188b446 |
||
|
|
349bbc6126 |
||
|
|
088f35853b | ||
|
|
659cba17dc |
||
|
|
930c3373a2 |
||
|
|
bb91673878 |
||
|
|
e404002dcb |
||
|
|
e371f88c37 |
||
|
|
4edac0b8be |
||
|
|
bf70f2b607 |
||
|
|
5dd124110c | ||
|
|
0ccf8741f6 |
||
|
|
c3e1a8474b | ||
|
|
9ec8353f72 | ||
|
|
2a6c422405 |
||
|
|
a15aa7f1f8 |
||
|
|
c3b0254aa8 |
||
|
|
7a92c28cfe |
||
|
|
37fd2efdfa |
||
|
|
d6c10be787 |
||
|
|
181fb4b726 | ||
|
|
aaead6e756 | ||
|
|
f222561204 | ||
|
|
3e369019cc | ||
|
|
9747cecd42 | ||
|
|
ff6ae77804 | ||
|
|
7cceef9fc8 |
||
|
|
c493f8d453 |
||
|
|
a7ee398569 |
||
|
|
5f3a25bb12 |
||
|
|
68e84c56ee |
||
|
|
fd135da1f4 | ||
|
|
fb9c6479b1 |
||
|
|
77fc3c609d |
||
|
|
1f3a1fc075 | ||
|
|
8b93f92022 |
||
|
|
8630265198 |
||
|
|
83209239d1 |
||
|
|
279f39904e |
||
|
|
8803f4784b |
||
|
|
92873c44ba |
||
|
|
9c1607982a |
||
|
|
7d6e2552b7 |
||
|
|
276205a018 |
||
|
|
feae0be2a7 |
||
|
|
a8b40b2ec1 |
||
|
|
6e3f46319c |
||
|
|
ce55d365ba | ||
|
|
42d382586b | ||
|
|
fa3b85b25c | ||
|
|
5c3e312120 | ||
|
|
280956f686 |
||
|
|
8d319f1cc8 | ||
|
|
4f7721a7a3 | ||
|
|
8abaa9101d |
||
|
|
0ec9f4d319 |
||
|
|
64e9c49481 | ||
|
|
823336e6f0 | ||
|
|
3a398481db | ||
|
|
8a0bdfe4ec | ||
|
|
d509340556 | ||
|
|
a4a909da35 | ||
|
|
ea29e15179 | ||
|
|
7cc4b3157b |
||
|
|
600b8a52ba | ||
|
|
570585ecda | ||
|
|
d666622eac | ||
|
|
fb22a071cc |
||
|
|
af313c9728 | ||
|
|
d1b9c24e94 |
||
|
|
12d6dcc62b |
||
|
|
8dcb1eca9c | ||
|
|
c015ddfa3a | ||
|
|
748ac1b79c | ||
|
|
d2a389eae3 |
||
|
|
e8e939e08e |
||
|
|
a990c4e11c |
||
|
|
7ff201a48b |
||
|
|
7f079ede7b |
||
|
|
7079600beb |
||
|
|
583289fed5 |
||
|
|
6ff5dec3b8 |
||
|
|
165bdf837b | ||
|
|
c207367127 |
||
|
|
20dbc319c3 |
||
|
|
a48c15e5eb |
||
|
|
378d5c554c |
||
|
|
34439c7842 |
||
|
|
e371c522a9 |
||
|
|
21a841fa40 |
||
|
|
b7b49982b4 |
||
|
|
2758d24adf |
2181 changed files with 23281 additions and 25143 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -3,5 +3,8 @@ clog
|
|||
*.bz2
|
||||
*.rpm
|
||||
*.orig
|
||||
*.sign
|
||||
kernel-[234].*/
|
||||
perf-man-*.tar.gz
|
||||
kernel-tools/
|
||||
kernel-headers/
|
||||
|
|
|
|||
|
|
@ -6,27 +6,27 @@ Subject: [PATCH 1/3] Make get_cert_list() not complain about cert lists that
|
|||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
certs/load_uefi.c | 37 ++++++++++++++++++++++---------------
|
||||
security/integrity/platform_certs/load_uefi.c | 37 ++++++++++++++++++++++---------------
|
||||
1 file changed, 22 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
|
||||
index 3d884598601..9ef34c44fd1 100644
|
||||
--- a/certs/load_uefi.c
|
||||
+++ b/certs/load_uefi.c
|
||||
@@ -35,8 +35,8 @@ static __init bool uefi_check_ignore_db(void)
|
||||
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
|
||||
index 81b19c52832b..e188f3ecbce3 100644
|
||||
--- a/security/integrity/platform_certs/load_uefi.c
|
||||
+++ b/security/integrity/platform_certs/load_uefi.c
|
||||
@@ -38,8 +38,8 @@ static __init bool uefi_check_ignore_db(void)
|
||||
/*
|
||||
* Get a certificate list blob from the named EFI variable.
|
||||
*/
|
||||
-static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
- unsigned long *size)
|
||||
+static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
+ unsigned long *size, void **cert_list)
|
||||
+ unsigned long *size , void **cert_list)
|
||||
{
|
||||
efi_status_t status;
|
||||
unsigned long lsize = 4;
|
||||
@@ -44,26 +44,33 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
@@ -47,24 +47,31 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
void *db;
|
||||
|
||||
|
||||
status = efi.get_variable(name, guid, NULL, &lsize, &tmpdb);
|
||||
+ if (status == EFI_NOT_FOUND) {
|
||||
+ *size = 0;
|
||||
|
|
@ -39,14 +39,12 @@ index 3d884598601..9ef34c44fd1 100644
|
|||
- return NULL;
|
||||
+ return efi_status_to_err(status);
|
||||
}
|
||||
|
||||
|
||||
db = kmalloc(lsize, GFP_KERNEL);
|
||||
if (!db) {
|
||||
pr_err("Couldn't allocate memory for uefi cert list\n");
|
||||
if (!db)
|
||||
- return NULL;
|
||||
+ return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
status = efi.get_variable(name, guid, NULL, &lsize, db);
|
||||
if (status != EFI_SUCCESS) {
|
||||
kfree(db);
|
||||
|
|
@ -54,15 +52,15 @@ index 3d884598601..9ef34c44fd1 100644
|
|||
- return NULL;
|
||||
+ return efi_status_to_err(status);
|
||||
}
|
||||
|
||||
|
||||
*size = lsize;
|
||||
- return db;
|
||||
+ *cert_list = db;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -152,10 +159,10 @@ static int __init load_uefi_certs(void)
|
||||
@@ -153,10 +160,10 @@ static int __init load_uefi_certs(void)
|
||||
* an error if we can't get them.
|
||||
*/
|
||||
if (!uefi_check_ignore_db()) {
|
||||
|
|
@ -74,36 +72,33 @@ index 3d884598601..9ef34c44fd1 100644
|
|||
- } else {
|
||||
+ } else if (dbsize != 0) {
|
||||
rc = parse_efi_signature_list("UEFI:db",
|
||||
db, dbsize, get_handler_for_db);
|
||||
db, dbsize, get_handler_for_db);
|
||||
if (rc)
|
||||
@@ -164,10 +171,10 @@ static int __init load_uefi_certs(void)
|
||||
@@ -166,10 +173,10 @@ static int __init load_uefi_certs(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
|
||||
- if (!mok) {
|
||||
+ rc = get_cert_list(L"MokListRT", &mok_var, &moksize, &mok);
|
||||
+ if (rc < 0) {
|
||||
pr_info("MODSIGN: Couldn't get UEFI MokListRT\n");
|
||||
pr_info("Couldn't get UEFI MokListRT\n");
|
||||
- } else {
|
||||
+ } else if (moksize != 0) {
|
||||
rc = parse_efi_signature_list("UEFI:MokListRT",
|
||||
mok, moksize, get_handler_for_db);
|
||||
if (rc)
|
||||
@@ -175,10 +182,10 @@ static int __init load_uefi_certs(void)
|
||||
@@ -177,10 +184,10 @@ static int __init load_uefi_certs(void)
|
||||
kfree(mok);
|
||||
}
|
||||
|
||||
|
||||
- dbx = get_cert_list(L"dbx", &secure_var, &dbxsize);
|
||||
- if (!dbx) {
|
||||
+ rc = get_cert_list(L"dbx", &secure_var, &dbxsize, &dbx);
|
||||
+ if (rc < 0) {
|
||||
pr_info("MODSIGN: Couldn't get UEFI dbx list\n");
|
||||
pr_info("Couldn't get UEFI dbx list\n");
|
||||
- } else {
|
||||
+ } else if (dbxsize != 0) {
|
||||
rc = parse_efi_signature_list("UEFI:dbx",
|
||||
dbx, dbxsize,
|
||||
get_handler_for_dbx);
|
||||
--
|
||||
2.15.0
|
||||
|
||||
|
|
|
|||
105
0001-brcmfmac-add-subtype-check-for-event-handling-in-dat.patch
Normal file
105
0001-brcmfmac-add-subtype-check-for-event-handling-in-dat.patch
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
From a4176ec356c73a46c07c181c6d04039fafa34a9f Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 14 Feb 2019 13:43:48 +0100
|
||||
Subject: [PATCH] brcmfmac: add subtype check for event handling in data path
|
||||
|
||||
For USB there is no separate channel being used to pass events
|
||||
from firmware to the host driver and as such are passed over the
|
||||
data path. In order to detect mock event messages an additional
|
||||
check is needed on event subtype. This check is added conditionally
|
||||
using unlikely() keyword.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++--
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/fweh.h | 16 ++++++++++++----
|
||||
.../broadcom/brcm80211/brcmfmac/msgbuf.c | 2 +-
|
||||
3 files changed, 16 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
index e772c0845638..a368ba6e7344 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -519,7 +519,8 @@ void brcmf_rx_frame(struct device *dev, struct sk_buff *skb, bool handle_event)
|
||||
} else {
|
||||
/* Process special event packets */
|
||||
if (handle_event)
|
||||
- brcmf_fweh_process_skb(ifp->drvr, skb);
|
||||
+ brcmf_fweh_process_skb(ifp->drvr, skb,
|
||||
+ BCMILCP_SUBTYPE_VENDOR_LONG);
|
||||
|
||||
brcmf_netif_rx(ifp, skb);
|
||||
}
|
||||
@@ -536,7 +537,7 @@ void brcmf_rx_event(struct device *dev, struct sk_buff *skb)
|
||||
if (brcmf_rx_hdrpull(drvr, skb, &ifp))
|
||||
return;
|
||||
|
||||
- brcmf_fweh_process_skb(ifp->drvr, skb);
|
||||
+ brcmf_fweh_process_skb(ifp->drvr, skb, 0);
|
||||
brcmu_pkt_buf_free_skb(skb);
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h
|
||||
index 31f3e8e83a21..7027243db17e 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h
|
||||
@@ -211,7 +211,7 @@ enum brcmf_fweh_event_code {
|
||||
*/
|
||||
#define BRCM_OUI "\x00\x10\x18"
|
||||
#define BCMILCP_BCM_SUBTYPE_EVENT 1
|
||||
-
|
||||
+#define BCMILCP_SUBTYPE_VENDOR_LONG 32769
|
||||
|
||||
/**
|
||||
* struct brcm_ethhdr - broadcom specific ether header.
|
||||
@@ -334,10 +334,10 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr,
|
||||
void brcmf_fweh_p2pdev_setup(struct brcmf_if *ifp, bool ongoing);
|
||||
|
||||
static inline void brcmf_fweh_process_skb(struct brcmf_pub *drvr,
|
||||
- struct sk_buff *skb)
|
||||
+ struct sk_buff *skb, u16 stype)
|
||||
{
|
||||
struct brcmf_event *event_packet;
|
||||
- u16 usr_stype;
|
||||
+ u16 subtype, usr_stype;
|
||||
|
||||
/* only process events when protocol matches */
|
||||
if (skb->protocol != cpu_to_be16(ETH_P_LINK_CTL))
|
||||
@@ -346,8 +346,16 @@ static inline void brcmf_fweh_process_skb(struct brcmf_pub *drvr,
|
||||
if ((skb->len + ETH_HLEN) < sizeof(*event_packet))
|
||||
return;
|
||||
|
||||
- /* check for BRCM oui match */
|
||||
event_packet = (struct brcmf_event *)skb_mac_header(skb);
|
||||
+
|
||||
+ /* check subtype if needed */
|
||||
+ if (unlikely(stype)) {
|
||||
+ subtype = get_unaligned_be16(&event_packet->hdr.subtype);
|
||||
+ if (subtype != stype)
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* check for BRCM oui match */
|
||||
if (memcmp(BRCM_OUI, &event_packet->hdr.oui[0],
|
||||
sizeof(event_packet->hdr.oui)))
|
||||
return;
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
|
||||
index 4e8397a0cbc8..ee922b052561 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
|
||||
@@ -1116,7 +1116,7 @@ static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf)
|
||||
|
||||
skb->protocol = eth_type_trans(skb, ifp->ndev);
|
||||
|
||||
- brcmf_fweh_process_skb(ifp->drvr, skb);
|
||||
+ brcmf_fweh_process_skb(ifp->drvr, skb, 0);
|
||||
|
||||
exit:
|
||||
brcmu_pkt_buf_free_skb(skb);
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From 1b5e2423164b3670e8bc9174e4762d297990deff Mon Sep 17 00:00:00 2001
|
||||
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Thu, 14 Feb 2019 13:43:47 +0100
|
||||
Subject: [PATCH] brcmfmac: assure SSID length from firmware is limited
|
||||
|
||||
The SSID length as received from firmware should not exceed
|
||||
IEEE80211_MAX_SSID_LEN as that would result in heap overflow.
|
||||
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
index b5e291ed9496..012275fc3bf7 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -3507,6 +3507,8 @@ brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e,
|
||||
}
|
||||
|
||||
netinfo = brcmf_get_netinfo_array(pfn_result);
|
||||
+ if (netinfo->SSID_len > IEEE80211_MAX_SSID_LEN)
|
||||
+ netinfo->SSID_len = IEEE80211_MAX_SSID_LEN;
|
||||
memcpy(cfg->wowl.nd->ssid.ssid, netinfo->SSID, netinfo->SSID_len);
|
||||
cfg->wowl.nd->ssid.ssid_len = netinfo->SSID_len;
|
||||
cfg->wowl.nd->n_channels = 1;
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 15f77c4ade3364106a3a397f0a8d6fce9d6a6326 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Fri, 11 Jan 2019 16:08:20 +1000
|
||||
Subject: [PATCH] drm/nouveau: register backlight on pascal and newer
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nouveau_backlight.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
|
||||
index 5f5be6368aed..c7a94c94dbf3 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
|
||||
@@ -253,6 +253,8 @@ nouveau_backlight_init(struct drm_connector *connector)
|
||||
case NV_DEVICE_INFO_V0_FERMI:
|
||||
case NV_DEVICE_INFO_V0_KEPLER:
|
||||
case NV_DEVICE_INFO_V0_MAXWELL:
|
||||
+ case NV_DEVICE_INFO_V0_PASCAL:
|
||||
+ case NV_DEVICE_INFO_V0_VOLTA:
|
||||
ret = nv50_backlight_init(nv_encoder, &props, &ops);
|
||||
break;
|
||||
default:
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
From 219a3e8676f3132d27b530c7d2d6bcab89536b57 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Mon, 21 Jan 2019 17:59:28 +0800
|
||||
Subject: [PATCH] integrity, KEYS: add a reference to platform keyring
|
||||
|
||||
commit 9dc92c45177a ("integrity: Define a trusted platform keyring")
|
||||
introduced a .platform keyring for storing preboot keys, used for
|
||||
verifying kernel image signatures. Currently only IMA-appraisal is able
|
||||
to use the keyring to verify kernel images that have their signature
|
||||
stored in xattr.
|
||||
|
||||
This patch exposes the .platform keyring, making it accessible for
|
||||
verifying PE signed kernel images as well.
|
||||
|
||||
Suggested-by: Mimi Zohar <zohar@linux.ibm.com>
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
Cc: David Howells <dhowells@redhat.com>
|
||||
[zohar@linux.ibm.com: fixed checkpatch errors, squashed with patch fix]
|
||||
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
|
||||
---
|
||||
certs/system_keyring.c | 10 ++++++++++
|
||||
include/keys/system_keyring.h | 8 ++++++++
|
||||
security/integrity/digsig.c | 3 +++
|
||||
3 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/certs/system_keyring.c b/certs/system_keyring.c
|
||||
index 81728717523d..da055e901df4 100644
|
||||
--- a/certs/system_keyring.c
|
||||
+++ b/certs/system_keyring.c
|
||||
@@ -24,6 +24,9 @@ static struct key *builtin_trusted_keys;
|
||||
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||
static struct key *secondary_trusted_keys;
|
||||
#endif
|
||||
+#ifdef CONFIG_INTEGRITY_PLATFORM_KEYRING
|
||||
+static struct key *platform_trusted_keys;
|
||||
+#endif
|
||||
|
||||
extern __initconst const u8 system_certificate_list[];
|
||||
extern __initconst const unsigned long system_certificate_list_size;
|
||||
@@ -266,3 +269,10 @@ int verify_pkcs7_signature(const void *data, size_t len,
|
||||
EXPORT_SYMBOL_GPL(verify_pkcs7_signature);
|
||||
|
||||
#endif /* CONFIG_SYSTEM_DATA_VERIFICATION */
|
||||
+
|
||||
+#ifdef CONFIG_INTEGRITY_PLATFORM_KEYRING
|
||||
+void __init set_platform_trusted_keys(struct key *keyring)
|
||||
+{
|
||||
+ platform_trusted_keys = keyring;
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h
|
||||
index 359c2f936004..42a93eda331c 100644
|
||||
--- a/include/keys/system_keyring.h
|
||||
+++ b/include/keys/system_keyring.h
|
||||
@@ -61,5 +61,13 @@ static inline struct key *get_ima_blacklist_keyring(void)
|
||||
}
|
||||
#endif /* CONFIG_IMA_BLACKLIST_KEYRING */
|
||||
|
||||
+#if defined(CONFIG_INTEGRITY_PLATFORM_KEYRING) && \
|
||||
+ defined(CONFIG_SYSTEM_TRUSTED_KEYRING)
|
||||
+extern void __init set_platform_trusted_keys(struct key *keyring);
|
||||
+#else
|
||||
+static inline void set_platform_trusted_keys(struct key *keyring)
|
||||
+{
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#endif /* _KEYS_SYSTEM_KEYRING_H */
|
||||
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
|
||||
index f45d6edecf99..e19c2eb72c51 100644
|
||||
--- a/security/integrity/digsig.c
|
||||
+++ b/security/integrity/digsig.c
|
||||
@@ -87,6 +87,9 @@ static int __integrity_init_keyring(const unsigned int id, key_perm_t perm,
|
||||
pr_info("Can't allocate %s keyring (%d)\n",
|
||||
keyring_name[id], err);
|
||||
keyring[id] = NULL;
|
||||
+ } else {
|
||||
+ if (id == INTEGRITY_KEYRING_PLATFORM)
|
||||
+ set_platform_trusted_keys(keyring[id]);
|
||||
}
|
||||
|
||||
return err;
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
From 278311e417be60f7caef6fcb12bda4da2711ceff Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Mon, 21 Jan 2019 17:59:29 +0800
|
||||
Subject: [PATCH] kexec, KEYS: Make use of platform keyring for signature
|
||||
verify
|
||||
|
||||
This patch allows the kexec_file_load syscall to verify the PE signed
|
||||
kernel image signature based on the preboot keys stored in the .platform
|
||||
keyring, as fall back, if the signature verification failed due to not
|
||||
finding the public key in the secondary or builtin keyrings.
|
||||
|
||||
This commit adds a VERIFY_USE_PLATFORM_KEYRING similar to previous
|
||||
VERIFY_USE_SECONDARY_KEYRING indicating that verify_pkcs7_signature
|
||||
should verify the signature using platform keyring. Also, decrease
|
||||
the error message log level when verification failed with -ENOKEY,
|
||||
so that if called tried multiple time with different keyring it
|
||||
won't generate extra noises.
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
Cc: David Howells <dhowells@redhat.com>
|
||||
Acked-by: Dave Young <dyoung@redhat.com> (for kexec_file_load part)
|
||||
[zohar@linux.ibm.com: tweaked the first paragraph of the patch description,
|
||||
and fixed checkpatch warning.]
|
||||
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
|
||||
---
|
||||
arch/x86/kernel/kexec-bzimage64.c | 14 +++++++++++---
|
||||
certs/system_keyring.c | 13 ++++++++++++-
|
||||
include/linux/verification.h | 1 +
|
||||
3 files changed, 24 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c
|
||||
index 278cd07228dd..e1215a600064 100644
|
||||
--- a/arch/x86/kernel/kexec-bzimage64.c
|
||||
+++ b/arch/x86/kernel/kexec-bzimage64.c
|
||||
@@ -531,9 +531,17 @@ static int bzImage64_cleanup(void *loader_data)
|
||||
#ifdef CONFIG_KEXEC_BZIMAGE_VERIFY_SIG
|
||||
static int bzImage64_verify_sig(const char *kernel, unsigned long kernel_len)
|
||||
{
|
||||
- return verify_pefile_signature(kernel, kernel_len,
|
||||
- VERIFY_USE_SECONDARY_KEYRING,
|
||||
- VERIFYING_KEXEC_PE_SIGNATURE);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = verify_pefile_signature(kernel, kernel_len,
|
||||
+ VERIFY_USE_SECONDARY_KEYRING,
|
||||
+ VERIFYING_KEXEC_PE_SIGNATURE);
|
||||
+ if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) {
|
||||
+ ret = verify_pefile_signature(kernel, kernel_len,
|
||||
+ VERIFY_USE_PLATFORM_KEYRING,
|
||||
+ VERIFYING_KEXEC_PE_SIGNATURE);
|
||||
+ }
|
||||
+ return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
diff --git a/certs/system_keyring.c b/certs/system_keyring.c
|
||||
index da055e901df4..c05c29ae4d5d 100644
|
||||
--- a/certs/system_keyring.c
|
||||
+++ b/certs/system_keyring.c
|
||||
@@ -240,11 +240,22 @@ int verify_pkcs7_signature(const void *data, size_t len,
|
||||
#else
|
||||
trusted_keys = builtin_trusted_keys;
|
||||
#endif
|
||||
+ } else if (trusted_keys == VERIFY_USE_PLATFORM_KEYRING) {
|
||||
+#ifdef CONFIG_INTEGRITY_PLATFORM_KEYRING
|
||||
+ trusted_keys = platform_trusted_keys;
|
||||
+#else
|
||||
+ trusted_keys = NULL;
|
||||
+#endif
|
||||
+ if (!trusted_keys) {
|
||||
+ ret = -ENOKEY;
|
||||
+ pr_devel("PKCS#7 platform keyring is not available\n");
|
||||
+ goto error;
|
||||
+ }
|
||||
}
|
||||
ret = pkcs7_validate_trust(pkcs7, trusted_keys);
|
||||
if (ret < 0) {
|
||||
if (ret == -ENOKEY)
|
||||
- pr_err("PKCS#7 signature not signed with a trusted key\n");
|
||||
+ pr_devel("PKCS#7 signature not signed with a trusted key\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
diff --git a/include/linux/verification.h b/include/linux/verification.h
|
||||
index cfa4730d607a..018fb5f13d44 100644
|
||||
--- a/include/linux/verification.h
|
||||
+++ b/include/linux/verification.h
|
||||
@@ -17,6 +17,7 @@
|
||||
* should be used.
|
||||
*/
|
||||
#define VERIFY_USE_SECONDARY_KEYRING ((struct key *)1UL)
|
||||
+#define VERIFY_USE_PLATFORM_KEYRING ((struct key *)2UL)
|
||||
|
||||
/*
|
||||
* The use to which an asymmetric key is being put.
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
From ad8cfb9c42ef83ecf4079bc7d77e6557648e952b Mon Sep 17 00:00:00 2001
|
||||
From: Ira Weiny <ira.weiny@intel.com>
|
||||
Date: Sun, 10 Feb 2019 14:34:24 -0800
|
||||
Subject: [PATCH] mm/gup: Remove the 'write' parameter from
|
||||
gup_fast_permitted()
|
||||
|
||||
The 'write' parameter is unused in gup_fast_permitted() so remove it.
|
||||
|
||||
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
|
||||
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
|
||||
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
Cc: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: Borislav Petkov <bp@alien8.de>
|
||||
Cc: Dan Williams <dan.j.williams@intel.com>
|
||||
Cc: Dave Hansen <dave.hansen@intel.com>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Peter Zijlstra <peterz@infradead.org>
|
||||
Cc: linux-mm@kvack.org
|
||||
Link: http://lkml.kernel.org/r/20190210223424.13934-1-ira.weiny@intel.com
|
||||
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
||||
---
|
||||
arch/x86/include/asm/pgtable_64.h | 3 +--
|
||||
mm/gup.c | 6 +++---
|
||||
2 files changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
|
||||
index 9c85b54bf03c..0bb566315621 100644
|
||||
--- a/arch/x86/include/asm/pgtable_64.h
|
||||
+++ b/arch/x86/include/asm/pgtable_64.h
|
||||
@@ -259,8 +259,7 @@ extern void init_extra_mapping_uc(unsigned long phys, unsigned long size);
|
||||
extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);
|
||||
|
||||
#define gup_fast_permitted gup_fast_permitted
|
||||
-static inline bool gup_fast_permitted(unsigned long start, int nr_pages,
|
||||
- int write)
|
||||
+static inline bool gup_fast_permitted(unsigned long start, int nr_pages)
|
||||
{
|
||||
unsigned long len, end;
|
||||
|
||||
diff --git a/mm/gup.c b/mm/gup.c
|
||||
index 05acd7e2eb22..b63e88eca31b 100644
|
||||
--- a/mm/gup.c
|
||||
+++ b/mm/gup.c
|
||||
@@ -1786,7 +1786,7 @@ static void gup_pgd_range(unsigned long addr, unsigned long end,
|
||||
* Check if it's allowed to use __get_user_pages_fast() for the range, or
|
||||
* we need to fall back to the slow version:
|
||||
*/
|
||||
-bool gup_fast_permitted(unsigned long start, int nr_pages, int write)
|
||||
+bool gup_fast_permitted(unsigned long start, int nr_pages)
|
||||
{
|
||||
unsigned long len, end;
|
||||
|
||||
@@ -1828,7 +1828,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
|
||||
* block IPIs that come from THPs splitting.
|
||||
*/
|
||||
|
||||
- if (gup_fast_permitted(start, nr_pages, write)) {
|
||||
+ if (gup_fast_permitted(start, nr_pages)) {
|
||||
local_irq_save(flags);
|
||||
gup_pgd_range(start, end, write, pages, &nr);
|
||||
local_irq_restore(flags);
|
||||
@@ -1870,7 +1870,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
|
||||
if (unlikely(!access_ok((void __user *)start, len)))
|
||||
return -EFAULT;
|
||||
|
||||
- if (gup_fast_permitted(start, nr_pages, write)) {
|
||||
+ if (gup_fast_permitted(start, nr_pages)) {
|
||||
local_irq_disable();
|
||||
gup_pgd_range(addr, end, write, pages, &nr);
|
||||
local_irq_enable();
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
From 714fe15daa07e7691c9731c88de71aa57f84b6c2 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 3 Jan 2018 11:13:54 +0100
|
||||
Subject: [PATCH] platform/x86: dell-laptop: Filter out spurious keyboard
|
||||
backlight change events
|
||||
|
||||
On some Dell XPS models WMI events of type 0x0000 reporting a keycode of
|
||||
0xe00c get reported when the brightness of the LCD panel changes.
|
||||
|
||||
This leads to us reporting false-positive kbd_led change events to
|
||||
userspace which in turn leads to the kbd backlight OSD showing when it
|
||||
should not.
|
||||
|
||||
We already read the current keyboard backlight brightness value when
|
||||
reporting events because the led_classdev_notify_brightness_hw_changed
|
||||
API requires this. Compare this value to the last known value and filter
|
||||
out duplicate events, fixing this.
|
||||
|
||||
Note the fixed issue is esp. a problem on XPS models with an ambient light
|
||||
sensor and automatic brightness adjustments turned on, this causes the kbd
|
||||
backlight OSD to show all the time there.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514969
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/platform/x86/dell-laptop.c | 24 ++++++++++++++++++++++--
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
|
||||
index cd4725e7e0b5..2ef3297a9efc 100644
|
||||
--- a/drivers/platform/x86/dell-laptop.c
|
||||
+++ b/drivers/platform/x86/dell-laptop.c
|
||||
@@ -1133,6 +1133,7 @@ static u8 kbd_previous_mode_bit;
|
||||
|
||||
static bool kbd_led_present;
|
||||
static DEFINE_MUTEX(kbd_led_mutex);
|
||||
+static enum led_brightness kbd_led_level;
|
||||
|
||||
/*
|
||||
* NOTE: there are three ways to set the keyboard backlight level.
|
||||
@@ -1947,6 +1948,7 @@ static enum led_brightness kbd_led_level_get(struct led_classdev *led_cdev)
|
||||
static int kbd_led_level_set(struct led_classdev *led_cdev,
|
||||
enum led_brightness value)
|
||||
{
|
||||
+ enum led_brightness new_value = value;
|
||||
struct kbd_state state;
|
||||
struct kbd_state new_state;
|
||||
u16 num;
|
||||
@@ -1976,6 +1978,9 @@ static int kbd_led_level_set(struct led_classdev *led_cdev,
|
||||
}
|
||||
|
||||
out:
|
||||
+ if (ret == 0)
|
||||
+ kbd_led_level = new_value;
|
||||
+
|
||||
mutex_unlock(&kbd_led_mutex);
|
||||
return ret;
|
||||
}
|
||||
@@ -2003,6 +2008,9 @@ static int __init kbd_led_init(struct device *dev)
|
||||
if (kbd_led.max_brightness)
|
||||
kbd_led.max_brightness--;
|
||||
}
|
||||
+
|
||||
+ kbd_led_level = kbd_led_level_get(NULL);
|
||||
+
|
||||
ret = led_classdev_register(dev, &kbd_led);
|
||||
if (ret)
|
||||
kbd_led_present = false;
|
||||
@@ -2027,13 +2035,25 @@ static void kbd_led_exit(void)
|
||||
static int dell_laptop_notifier_call(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
+ bool changed = false;
|
||||
+ enum led_brightness new_kbd_led_level;
|
||||
+
|
||||
switch (action) {
|
||||
case DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED:
|
||||
if (!kbd_led_present)
|
||||
break;
|
||||
|
||||
- led_classdev_notify_brightness_hw_changed(&kbd_led,
|
||||
- kbd_led_level_get(&kbd_led));
|
||||
+ mutex_lock(&kbd_led_mutex);
|
||||
+ new_kbd_led_level = kbd_led_level_get(&kbd_led);
|
||||
+ if (kbd_led_level != new_kbd_led_level) {
|
||||
+ kbd_led_level = new_kbd_led_level;
|
||||
+ changed = true;
|
||||
+ }
|
||||
+ mutex_unlock(&kbd_led_mutex);
|
||||
+
|
||||
+ if (changed)
|
||||
+ led_classdev_notify_brightness_hw_changed(&kbd_led,
|
||||
+ kbd_led_level);
|
||||
break;
|
||||
}
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
365
0001-platform-x86-ideapad-laptop-Remove-no_hw_rfkill_list.patch
Normal file
365
0001-platform-x86-ideapad-laptop-Remove-no_hw_rfkill_list.patch
Normal file
|
|
@ -0,0 +1,365 @@
|
|||
From de5d850913e9d5fb272f386fb36ef5f5776afb0c Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Mon, 29 Apr 2019 15:11:26 +0200
|
||||
Subject: [PATCH] platform/x86: ideapad-laptop: Remove no_hw_rfkill_list
|
||||
|
||||
When the ideapad-laptop driver was first written it was written for laptops
|
||||
which had a hardware rfkill switch. So when the first ideapad laptops
|
||||
showed up without a hw rfkill switch and it turned out that in this case
|
||||
the ideapad firmware interface would always report the wifi being hardware-
|
||||
blocked, a DMI id list of models which lack a hw rfkill switch was started
|
||||
(by yours truly). Things were done this way to avoid regressing existing
|
||||
models with a hw rfkill switch. In hindsight this was a mistake.
|
||||
|
||||
Lenovo releases a lot of ideapad models every year and even the latest
|
||||
models still use the "VPC2004" ACPI interface the ideapad-laptop driver
|
||||
binds to. Having a hw rfkill switch is quite rare on modern hardware, so
|
||||
all these new models need to be added to the no_hw_rfkill_list, leading
|
||||
to a never ending game of whack a mole.
|
||||
|
||||
Worse the failure mode when not present on the list, is very bad. In this
|
||||
case the ideapad-laptop driver will report the wifi as being hw-blocked,
|
||||
at which points NetworkManager does not even try to use it and the user
|
||||
ends up with non working wifi.
|
||||
|
||||
This leads to various Linux fora on the internet being filled with
|
||||
wifi not working on ideapad laptops stories, which does not make Linux
|
||||
look good.
|
||||
|
||||
The failure mode when we flip the default to assuming that a hw rfkill
|
||||
switch is not present OTOH is quite benign. When we properly report the
|
||||
wifi as being hw-blocked on ideapads which do have the hw-switch; and it
|
||||
is in the wifi-off position, then at least when using NetworkManager +
|
||||
GNOME3 the user will get a "wifi disabled in hardware" message when trying
|
||||
to connect to the wifi from the UI. If OTOH we assume there is no hardware
|
||||
rfkill switch, then the user will get an empty list for the list of
|
||||
available networks. Although the empty list vs the "wifi disabled in
|
||||
hardware" message is a regression, it is a very minor regression and it
|
||||
can easily be fixed on a model by model basis by filling the new
|
||||
hw_rfkill_list this commit introduces.
|
||||
|
||||
Therefor this commit removes the ever growing no_hw_rfkill_list, flipping
|
||||
the default to assuming there is no hw rfkill switch and adding a new
|
||||
hw_rfkill_list. Thereby fixing the wifi not working on all the current
|
||||
ideapad and yoga models which are not on the list yet and also fixing it
|
||||
for all future ideapad and yoga models using the "VPC2004" ACPI interface.
|
||||
|
||||
Note once this patch has been accepted upstream. I plan to write a blog
|
||||
post asking for users of ideapads and yoga's with a hw rfkill switch to
|
||||
step forward, so that we can populate the new hw_rfkill_list with the few
|
||||
older yoga and ideapad models which actually have a hw rfkill switch.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1703338
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/platform/x86/ideapad-laptop.c | 321 ++------------------------
|
||||
1 file changed, 15 insertions(+), 306 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
|
||||
index c53ae86b59c7..2d94536dea88 100644
|
||||
--- a/drivers/platform/x86/ideapad-laptop.c
|
||||
+++ b/drivers/platform/x86/ideapad-laptop.c
|
||||
@@ -980,277 +980,21 @@ static void ideapad_wmi_notify(u32 value, void *context)
|
||||
#endif
|
||||
|
||||
/*
|
||||
- * Some ideapads don't have a hardware rfkill switch, reading VPCCMD_R_RF
|
||||
- * always results in 0 on these models, causing ideapad_laptop to wrongly
|
||||
- * report all radios as hardware-blocked.
|
||||
+ * Some ideapads have a hardware rfkill switch, but most do not have one.
|
||||
+ * Reading VPCCMD_R_RF always results in 0 on models without a hardware rfkill,
|
||||
+ * switch causing ideapad_laptop to wrongly report all radios as hw-blocked.
|
||||
+ * There used to be a long list of DMI ids for models without a hw rfkill
|
||||
+ * switch here, but that resulted in playing whack a mole.
|
||||
+ * More importantly wrongly reporting the wifi radio as hw-blocked, results in
|
||||
+ * non working wifi. Whereas not reporting it hw-blocked, when it actually is
|
||||
+ * hw-blocked results in an empty SSID list, which is a much more benign
|
||||
+ * failure mode.
|
||||
+ * So the default now is the much safer option of assuming there is no
|
||||
+ * hardware rfkill switch. This default also actually matches most hardware,
|
||||
+ * since having a hw rfkill switch is quite rare on modern hardware, so this
|
||||
+ * also leads to a much shorter list.
|
||||
*/
|
||||
-static const struct dmi_system_id no_hw_rfkill_list[] = {
|
||||
- {
|
||||
- .ident = "Lenovo RESCUER R720-15IKBN",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo R720-15IKBN"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo G40-30",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo G40-30"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo G50-30",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo G50-30"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo V310-14IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-14IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo V310-14ISK",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-14ISK"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo V310-15IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo V310-15ISK",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15ISK"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo V510-15IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V510-15IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad 300-15IBR",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300-15IBR"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad 300-15IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300-15IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad 300S-11IBR",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300S-11BR"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad 310-15ABR",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15ABR"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad 310-15IAP",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IAP"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad 310-15IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad 310-15ISK",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15ISK"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad Y700-14ISK",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-14ISK"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad Y700-15ACZ",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-15ACZ"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad Y700-15ISK",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-15ISK"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad Y700 Touch-15ISK",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700 Touch-15ISK"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad Y700-17ISK",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-17ISK"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo ideapad MIIX 720-12IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "MIIX 720-12IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Legion Y520-15IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y520-15IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Y520-15IKBM",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y520-15IKBM"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Legion Y530-15ICH",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion Y530-15ICH"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Legion Y720-15IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y720-15IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Legion Y720-15IKBN",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y720-15IKBN"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Y720-15IKBM",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y720-15IKBM"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Yoga 2 11 / 13 / Pro",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Yoga 2 11 / 13 / Pro",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_BOARD_NAME, "Yoga2"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Yoga 2 13",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Yoga 2 13"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Yoga 3 1170 / 1470",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 3"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Yoga 3 Pro 1370",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 3"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Yoga 700",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 700"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Yoga 900",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 900"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Yoga 900",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_BOARD_NAME, "VIUU4"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo YOGA 910-13IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 910-13IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo YOGA 920-13IKB",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920-13IKB"),
|
||||
- },
|
||||
- },
|
||||
- {
|
||||
- .ident = "Lenovo Zhaoyang E42-80",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "ZHAOYANG E42-80"),
|
||||
- },
|
||||
- },
|
||||
+static const struct dmi_system_id hw_rfkill_list[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -1311,7 +1020,7 @@ static int ideapad_acpi_add(struct platform_device *pdev)
|
||||
priv->cfg = cfg;
|
||||
priv->adev = adev;
|
||||
priv->platform_device = pdev;
|
||||
- priv->has_hw_rfkill_switch = !dmi_check_system(no_hw_rfkill_list);
|
||||
+ priv->has_hw_rfkill_switch = dmi_check_system(hw_rfkill_list);
|
||||
|
||||
ret = ideapad_sysfs_init(priv);
|
||||
if (ret)
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
From 85721e6bfc5da3c8f7971c4acb1a0ad16fb2c16a Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
Date: Thu, 1 Feb 2018 13:29:38 +1100
|
||||
Subject: [PATCH] tools/lib/subcmd/pager.c: do not alias select() params
|
||||
|
||||
Use a separate fd set for select()-s exception fds param to fix the
|
||||
following gcc warning:
|
||||
|
||||
pager.c:36:12: error: passing argument 2 to restrict-qualified
|
||||
parameter aliases with argument 4 [-Werror=restrict]
|
||||
select(1, &in, NULL, &in, NULL);
|
||||
^~~ ~~~
|
||||
|
||||
Link: http://lkml.kernel.org/r/20180101105626.7168-1-sergey.senozhatsky@gmail.com
|
||||
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
|
||||
---
|
||||
tools/lib/subcmd/pager.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/lib/subcmd/pager.c b/tools/lib/subcmd/pager.c
|
||||
index 5ba754d17952..9997a8805a82 100644
|
||||
--- a/tools/lib/subcmd/pager.c
|
||||
+++ b/tools/lib/subcmd/pager.c
|
||||
@@ -30,10 +30,13 @@ static void pager_preexec(void)
|
||||
* have real input
|
||||
*/
|
||||
fd_set in;
|
||||
+ fd_set exception;
|
||||
|
||||
FD_ZERO(&in);
|
||||
+ FD_ZERO(&exception);
|
||||
FD_SET(0, &in);
|
||||
- select(1, &in, NULL, &in, NULL);
|
||||
+ FD_SET(0, &exception);
|
||||
+ select(1, &in, NULL, &exception, NULL);
|
||||
|
||||
setenv("LESS", "FRSX", 0);
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
663
0001-virt-vbox-Implement-passing-requestor-info-to-the-ho.patch
Normal file
663
0001-virt-vbox-Implement-passing-requestor-info-to-the-ho.patch
Normal file
|
|
@ -0,0 +1,663 @@
|
|||
From 58b89b03f14fde3b5eda78b9137109b7a860a607 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 19 Mar 2019 14:05:31 +0100
|
||||
Subject: [PATCH] virt: vbox: Implement passing requestor info to the host for
|
||||
VirtualBox 6.0.x
|
||||
|
||||
VirtualBox 6.0.x has a new feature where the guest kernel driver passes
|
||||
info about the origin of the request (e.g. userspace or kernelspace) to
|
||||
the hypervisor.
|
||||
|
||||
If we do not pass this information then when running the 6.0.x userspace
|
||||
guest-additions tools on a 6.0.x host, some requests will get denied
|
||||
with a VERR_VERSION_MISMATCH error, breaking vboxservice.service and
|
||||
the mounting of shared folders marked to be auto-mounted.
|
||||
|
||||
This commit implements passing the requestor info to the host, fixing this.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/virt/vboxguest/vboxguest_core.c | 106 ++++++++++++++-------
|
||||
drivers/virt/vboxguest/vboxguest_core.h | 15 +--
|
||||
drivers/virt/vboxguest/vboxguest_linux.c | 26 ++++-
|
||||
drivers/virt/vboxguest/vboxguest_utils.c | 32 ++++---
|
||||
drivers/virt/vboxguest/vboxguest_version.h | 9 +-
|
||||
drivers/virt/vboxguest/vmmdev.h | 8 +-
|
||||
include/linux/vbox_utils.h | 12 ++-
|
||||
include/uapi/linux/vbox_vmmdev_types.h | 31 ++++++
|
||||
8 files changed, 168 insertions(+), 71 deletions(-)
|
||||
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
index 1475ed5ffcde..2ec5b34ffed7 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.c
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
@@ -27,6 +27,10 @@
|
||||
|
||||
#define GUEST_MAPPINGS_TRIES 5
|
||||
|
||||
+#define VBG_KERNEL_REQUEST \
|
||||
+ (VMMDEV_REQUESTOR_KERNEL | VMMDEV_REQUESTOR_USR_DRV | \
|
||||
+ VMMDEV_REQUESTOR_CON_DONT_KNOW | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN)
|
||||
+
|
||||
/**
|
||||
* Reserves memory in which the VMM can relocate any guest mappings
|
||||
* that are floating around.
|
||||
@@ -48,7 +52,8 @@ static void vbg_guest_mappings_init(struct vbg_dev *gdev)
|
||||
int i, rc;
|
||||
|
||||
/* Query the required space. */
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_GET_HYPERVISOR_INFO);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_GET_HYPERVISOR_INFO,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req)
|
||||
return;
|
||||
|
||||
@@ -135,7 +140,8 @@ static void vbg_guest_mappings_exit(struct vbg_dev *gdev)
|
||||
* Tell the host that we're going to free the memory we reserved for
|
||||
* it, the free it up. (Leak the memory if anything goes wrong here.)
|
||||
*/
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_HYPERVISOR_INFO);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_HYPERVISOR_INFO,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req)
|
||||
return;
|
||||
|
||||
@@ -172,8 +178,10 @@ static int vbg_report_guest_info(struct vbg_dev *gdev)
|
||||
struct vmmdev_guest_info2 *req2 = NULL;
|
||||
int rc, ret = -ENOMEM;
|
||||
|
||||
- req1 = vbg_req_alloc(sizeof(*req1), VMMDEVREQ_REPORT_GUEST_INFO);
|
||||
- req2 = vbg_req_alloc(sizeof(*req2), VMMDEVREQ_REPORT_GUEST_INFO2);
|
||||
+ req1 = vbg_req_alloc(sizeof(*req1), VMMDEVREQ_REPORT_GUEST_INFO,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
+ req2 = vbg_req_alloc(sizeof(*req2), VMMDEVREQ_REPORT_GUEST_INFO2,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req1 || !req2)
|
||||
goto out_free;
|
||||
|
||||
@@ -187,8 +195,8 @@ static int vbg_report_guest_info(struct vbg_dev *gdev)
|
||||
req2->additions_minor = VBG_VERSION_MINOR;
|
||||
req2->additions_build = VBG_VERSION_BUILD;
|
||||
req2->additions_revision = VBG_SVN_REV;
|
||||
- /* (no features defined yet) */
|
||||
- req2->additions_features = 0;
|
||||
+ req2->additions_features =
|
||||
+ VMMDEV_GUEST_INFO2_ADDITIONS_FEATURES_REQUESTOR_INFO;
|
||||
strlcpy(req2->name, VBG_VERSION_STRING,
|
||||
sizeof(req2->name));
|
||||
|
||||
@@ -230,7 +238,8 @@ static int vbg_report_driver_status(struct vbg_dev *gdev, bool active)
|
||||
struct vmmdev_guest_status *req;
|
||||
int rc;
|
||||
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_REPORT_GUEST_STATUS);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_REPORT_GUEST_STATUS,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -423,7 +432,8 @@ static int vbg_heartbeat_host_config(struct vbg_dev *gdev, bool enabled)
|
||||
struct vmmdev_heartbeat *req;
|
||||
int rc;
|
||||
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_HEARTBEAT_CONFIGURE);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_HEARTBEAT_CONFIGURE,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -457,7 +467,8 @@ static int vbg_heartbeat_init(struct vbg_dev *gdev)
|
||||
|
||||
gdev->guest_heartbeat_req = vbg_req_alloc(
|
||||
sizeof(*gdev->guest_heartbeat_req),
|
||||
- VMMDEVREQ_GUEST_HEARTBEAT);
|
||||
+ VMMDEVREQ_GUEST_HEARTBEAT,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!gdev->guest_heartbeat_req)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -528,7 +539,8 @@ static int vbg_reset_host_event_filter(struct vbg_dev *gdev,
|
||||
struct vmmdev_mask *req;
|
||||
int rc;
|
||||
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_CTL_GUEST_FILTER_MASK);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_CTL_GUEST_FILTER_MASK,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -567,8 +579,14 @@ static int vbg_set_session_event_filter(struct vbg_dev *gdev,
|
||||
u32 changed, previous;
|
||||
int rc, ret = 0;
|
||||
|
||||
- /* Allocate a request buffer before taking the spinlock */
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_CTL_GUEST_FILTER_MASK);
|
||||
+ /*
|
||||
+ * Allocate a request buffer before taking the spinlock, when
|
||||
+ * the session is being terminated the requestor is the kernel,
|
||||
+ * as we're cleaning up.
|
||||
+ */
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_CTL_GUEST_FILTER_MASK,
|
||||
+ session_termination ? VBG_KERNEL_REQUEST :
|
||||
+ session->requestor);
|
||||
if (!req) {
|
||||
if (!session_termination)
|
||||
return -ENOMEM;
|
||||
@@ -627,7 +645,8 @@ static int vbg_reset_host_capabilities(struct vbg_dev *gdev)
|
||||
struct vmmdev_mask *req;
|
||||
int rc;
|
||||
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_GUEST_CAPABILITIES);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_GUEST_CAPABILITIES,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -662,8 +681,14 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
|
||||
u32 changed, previous;
|
||||
int rc, ret = 0;
|
||||
|
||||
- /* Allocate a request buffer before taking the spinlock */
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_GUEST_CAPABILITIES);
|
||||
+ /*
|
||||
+ * Allocate a request buffer before taking the spinlock, when
|
||||
+ * the session is being terminated the requestor is the kernel,
|
||||
+ * as we're cleaning up.
|
||||
+ */
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_GUEST_CAPABILITIES,
|
||||
+ session_termination ? VBG_KERNEL_REQUEST :
|
||||
+ session->requestor);
|
||||
if (!req) {
|
||||
if (!session_termination)
|
||||
return -ENOMEM;
|
||||
@@ -722,7 +747,8 @@ static int vbg_query_host_version(struct vbg_dev *gdev)
|
||||
struct vmmdev_host_version *req;
|
||||
int rc, ret;
|
||||
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_GET_HOST_VERSION);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_GET_HOST_VERSION,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -783,19 +809,24 @@ int vbg_core_init(struct vbg_dev *gdev, u32 fixed_events)
|
||||
|
||||
gdev->mem_balloon.get_req =
|
||||
vbg_req_alloc(sizeof(*gdev->mem_balloon.get_req),
|
||||
- VMMDEVREQ_GET_MEMBALLOON_CHANGE_REQ);
|
||||
+ VMMDEVREQ_GET_MEMBALLOON_CHANGE_REQ,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
gdev->mem_balloon.change_req =
|
||||
vbg_req_alloc(sizeof(*gdev->mem_balloon.change_req),
|
||||
- VMMDEVREQ_CHANGE_MEMBALLOON);
|
||||
+ VMMDEVREQ_CHANGE_MEMBALLOON,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
gdev->cancel_req =
|
||||
vbg_req_alloc(sizeof(*(gdev->cancel_req)),
|
||||
- VMMDEVREQ_HGCM_CANCEL2);
|
||||
+ VMMDEVREQ_HGCM_CANCEL2,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
gdev->ack_events_req =
|
||||
vbg_req_alloc(sizeof(*gdev->ack_events_req),
|
||||
- VMMDEVREQ_ACKNOWLEDGE_EVENTS);
|
||||
+ VMMDEVREQ_ACKNOWLEDGE_EVENTS,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
gdev->mouse_status_req =
|
||||
vbg_req_alloc(sizeof(*gdev->mouse_status_req),
|
||||
- VMMDEVREQ_GET_MOUSE_STATUS);
|
||||
+ VMMDEVREQ_GET_MOUSE_STATUS,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
|
||||
if (!gdev->mem_balloon.get_req || !gdev->mem_balloon.change_req ||
|
||||
!gdev->cancel_req || !gdev->ack_events_req ||
|
||||
@@ -892,9 +923,9 @@ void vbg_core_exit(struct vbg_dev *gdev)
|
||||
* vboxguest_linux.c calls this when userspace opens the char-device.
|
||||
* Return: A pointer to the new session or an ERR_PTR on error.
|
||||
* @gdev: The Guest extension device.
|
||||
- * @user: Set if this is a session for the vboxuser device.
|
||||
+ * @requestor: VMMDEV_REQUESTOR_* flags
|
||||
*/
|
||||
-struct vbg_session *vbg_core_open_session(struct vbg_dev *gdev, bool user)
|
||||
+struct vbg_session *vbg_core_open_session(struct vbg_dev *gdev, u32 requestor)
|
||||
{
|
||||
struct vbg_session *session;
|
||||
|
||||
@@ -903,7 +934,7 @@ struct vbg_session *vbg_core_open_session(struct vbg_dev *gdev, bool user)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
session->gdev = gdev;
|
||||
- session->user_session = user;
|
||||
+ session->requestor = requestor;
|
||||
|
||||
return session;
|
||||
}
|
||||
@@ -924,7 +955,9 @@ void vbg_core_close_session(struct vbg_session *session)
|
||||
if (!session->hgcm_client_ids[i])
|
||||
continue;
|
||||
|
||||
- vbg_hgcm_disconnect(gdev, session->hgcm_client_ids[i], &rc);
|
||||
+ /* requestor is kernel here, as we're cleaning up. */
|
||||
+ vbg_hgcm_disconnect(gdev, VBG_KERNEL_REQUEST,
|
||||
+ session->hgcm_client_ids[i], &rc);
|
||||
}
|
||||
|
||||
kfree(session);
|
||||
@@ -1152,7 +1185,8 @@ static int vbg_req_allowed(struct vbg_dev *gdev, struct vbg_session *session,
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
- if (trusted_apps_only && session->user_session) {
|
||||
+ if (trusted_apps_only &&
|
||||
+ (session->requestor & VMMDEV_REQUESTOR_USER_DEVICE)) {
|
||||
vbg_err("Denying userspace vmm call type %#08x through vboxuser device node\n",
|
||||
req->request_type);
|
||||
return -EPERM;
|
||||
@@ -1209,8 +1243,8 @@ static int vbg_ioctl_hgcm_connect(struct vbg_dev *gdev,
|
||||
if (i >= ARRAY_SIZE(session->hgcm_client_ids))
|
||||
return -EMFILE;
|
||||
|
||||
- ret = vbg_hgcm_connect(gdev, &conn->u.in.loc, &client_id,
|
||||
- &conn->hdr.rc);
|
||||
+ ret = vbg_hgcm_connect(gdev, session->requestor, &conn->u.in.loc,
|
||||
+ &client_id, &conn->hdr.rc);
|
||||
|
||||
mutex_lock(&gdev->session_mutex);
|
||||
if (ret == 0 && conn->hdr.rc >= 0) {
|
||||
@@ -1251,7 +1285,8 @@ static int vbg_ioctl_hgcm_disconnect(struct vbg_dev *gdev,
|
||||
if (i >= ARRAY_SIZE(session->hgcm_client_ids))
|
||||
return -EINVAL;
|
||||
|
||||
- ret = vbg_hgcm_disconnect(gdev, client_id, &disconn->hdr.rc);
|
||||
+ ret = vbg_hgcm_disconnect(gdev, session->requestor, client_id,
|
||||
+ &disconn->hdr.rc);
|
||||
|
||||
mutex_lock(&gdev->session_mutex);
|
||||
if (ret == 0 && disconn->hdr.rc >= 0)
|
||||
@@ -1313,12 +1348,12 @@ static int vbg_ioctl_hgcm_call(struct vbg_dev *gdev,
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_COMPAT) && f32bit)
|
||||
- ret = vbg_hgcm_call32(gdev, client_id,
|
||||
+ ret = vbg_hgcm_call32(gdev, session->requestor, client_id,
|
||||
call->function, call->timeout_ms,
|
||||
VBG_IOCTL_HGCM_CALL_PARMS32(call),
|
||||
call->parm_count, &call->hdr.rc);
|
||||
else
|
||||
- ret = vbg_hgcm_call(gdev, client_id,
|
||||
+ ret = vbg_hgcm_call(gdev, session->requestor, client_id,
|
||||
call->function, call->timeout_ms,
|
||||
VBG_IOCTL_HGCM_CALL_PARMS(call),
|
||||
call->parm_count, &call->hdr.rc);
|
||||
@@ -1408,6 +1443,7 @@ static int vbg_ioctl_check_balloon(struct vbg_dev *gdev,
|
||||
}
|
||||
|
||||
static int vbg_ioctl_write_core_dump(struct vbg_dev *gdev,
|
||||
+ struct vbg_session *session,
|
||||
struct vbg_ioctl_write_coredump *dump)
|
||||
{
|
||||
struct vmmdev_write_core_dump *req;
|
||||
@@ -1415,7 +1451,8 @@ static int vbg_ioctl_write_core_dump(struct vbg_dev *gdev,
|
||||
if (vbg_ioctl_chk(&dump->hdr, sizeof(dump->u.in), 0))
|
||||
return -EINVAL;
|
||||
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_WRITE_COREDUMP);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_WRITE_COREDUMP,
|
||||
+ session->requestor);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1476,7 +1513,7 @@ int vbg_core_ioctl(struct vbg_session *session, unsigned int req, void *data)
|
||||
case VBG_IOCTL_CHECK_BALLOON:
|
||||
return vbg_ioctl_check_balloon(gdev, data);
|
||||
case VBG_IOCTL_WRITE_CORE_DUMP:
|
||||
- return vbg_ioctl_write_core_dump(gdev, data);
|
||||
+ return vbg_ioctl_write_core_dump(gdev, session, data);
|
||||
}
|
||||
|
||||
/* Variable sized requests. */
|
||||
@@ -1508,7 +1545,8 @@ int vbg_core_set_mouse_status(struct vbg_dev *gdev, u32 features)
|
||||
struct vmmdev_mouse_status *req;
|
||||
int rc;
|
||||
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_MOUSE_STATUS);
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_MOUSE_STATUS,
|
||||
+ VBG_KERNEL_REQUEST);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.h b/drivers/virt/vboxguest/vboxguest_core.h
|
||||
index 7ad9ec45bfa9..4188c12b839f 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.h
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.h
|
||||
@@ -154,15 +154,15 @@ struct vbg_session {
|
||||
* host. Protected by vbg_gdev.session_mutex.
|
||||
*/
|
||||
u32 guest_caps;
|
||||
- /** Does this session belong to a root process or a user one? */
|
||||
- bool user_session;
|
||||
+ /** VMMDEV_REQUESTOR_* flags */
|
||||
+ u32 requestor;
|
||||
/** Set on CANCEL_ALL_WAITEVENTS, protected by vbg_devevent_spinlock. */
|
||||
bool cancel_waiters;
|
||||
};
|
||||
|
||||
int vbg_core_init(struct vbg_dev *gdev, u32 fixed_events);
|
||||
void vbg_core_exit(struct vbg_dev *gdev);
|
||||
-struct vbg_session *vbg_core_open_session(struct vbg_dev *gdev, bool user);
|
||||
+struct vbg_session *vbg_core_open_session(struct vbg_dev *gdev, u32 requestor);
|
||||
void vbg_core_close_session(struct vbg_session *session);
|
||||
int vbg_core_ioctl(struct vbg_session *session, unsigned int req, void *data);
|
||||
int vbg_core_set_mouse_status(struct vbg_dev *gdev, u32 features);
|
||||
@@ -172,12 +172,13 @@ irqreturn_t vbg_core_isr(int irq, void *dev_id);
|
||||
void vbg_linux_mouse_event(struct vbg_dev *gdev);
|
||||
|
||||
/* Private (non exported) functions form vboxguest_utils.c */
|
||||
-void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type);
|
||||
+void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type,
|
||||
+ u32 requestor);
|
||||
void vbg_req_free(void *req, size_t len);
|
||||
int vbg_req_perform(struct vbg_dev *gdev, void *req);
|
||||
int vbg_hgcm_call32(
|
||||
- struct vbg_dev *gdev, u32 client_id, u32 function, u32 timeout_ms,
|
||||
- struct vmmdev_hgcm_function_parameter32 *parm32, u32 parm_count,
|
||||
- int *vbox_status);
|
||||
+ struct vbg_dev *gdev, u32 requestor, u32 client_id, u32 function,
|
||||
+ u32 timeout_ms, struct vmmdev_hgcm_function_parameter32 *parm32,
|
||||
+ u32 parm_count, int *vbox_status);
|
||||
|
||||
#endif
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_linux.c b/drivers/virt/vboxguest/vboxguest_linux.c
|
||||
index 6e2a9619192d..6e8c0f1c1056 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_linux.c
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_linux.c
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2006-2016 Oracle Corporation
|
||||
*/
|
||||
|
||||
+#include <linux/cred.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/miscdevice.h>
|
||||
@@ -28,6 +29,23 @@ static DEFINE_MUTEX(vbg_gdev_mutex);
|
||||
/** Global vbg_gdev pointer used by vbg_get/put_gdev. */
|
||||
static struct vbg_dev *vbg_gdev;
|
||||
|
||||
+static u32 vbg_misc_device_requestor(struct inode *inode)
|
||||
+{
|
||||
+ u32 requestor = VMMDEV_REQUESTOR_USERMODE |
|
||||
+ VMMDEV_REQUESTOR_CON_DONT_KNOW |
|
||||
+ VMMDEV_REQUESTOR_TRUST_NOT_GIVEN;
|
||||
+
|
||||
+ if (from_kuid(current_user_ns(), current->cred->uid) == 0)
|
||||
+ requestor |= VMMDEV_REQUESTOR_USR_ROOT;
|
||||
+ else
|
||||
+ requestor |= VMMDEV_REQUESTOR_USR_USER;
|
||||
+
|
||||
+ if (in_egroup_p(inode->i_gid))
|
||||
+ requestor |= VMMDEV_REQUESTOR_GRP_VBOX;
|
||||
+
|
||||
+ return requestor;
|
||||
+}
|
||||
+
|
||||
static int vbg_misc_device_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct vbg_session *session;
|
||||
@@ -36,7 +54,7 @@ static int vbg_misc_device_open(struct inode *inode, struct file *filp)
|
||||
/* misc_open sets filp->private_data to our misc device */
|
||||
gdev = container_of(filp->private_data, struct vbg_dev, misc_device);
|
||||
|
||||
- session = vbg_core_open_session(gdev, false);
|
||||
+ session = vbg_core_open_session(gdev, vbg_misc_device_requestor(inode));
|
||||
if (IS_ERR(session))
|
||||
return PTR_ERR(session);
|
||||
|
||||
@@ -53,7 +71,8 @@ static int vbg_misc_device_user_open(struct inode *inode, struct file *filp)
|
||||
gdev = container_of(filp->private_data, struct vbg_dev,
|
||||
misc_device_user);
|
||||
|
||||
- session = vbg_core_open_session(gdev, false);
|
||||
+ session = vbg_core_open_session(gdev, vbg_misc_device_requestor(inode) |
|
||||
+ VMMDEV_REQUESTOR_USER_DEVICE);
|
||||
if (IS_ERR(session))
|
||||
return PTR_ERR(session);
|
||||
|
||||
@@ -115,7 +134,8 @@ static long vbg_misc_device_ioctl(struct file *filp, unsigned int req,
|
||||
req == VBG_IOCTL_VMMDEV_REQUEST_BIG;
|
||||
|
||||
if (is_vmmdev_req)
|
||||
- buf = vbg_req_alloc(size, VBG_IOCTL_HDR_TYPE_DEFAULT);
|
||||
+ buf = vbg_req_alloc(size, VBG_IOCTL_HDR_TYPE_DEFAULT,
|
||||
+ session->requestor);
|
||||
else
|
||||
buf = kmalloc(size, GFP_KERNEL);
|
||||
if (!buf)
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_utils.c b/drivers/virt/vboxguest/vboxguest_utils.c
|
||||
index bf4474214b4d..75fd140b02ff 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_utils.c
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_utils.c
|
||||
@@ -62,7 +62,8 @@ VBG_LOG(vbg_err, pr_err);
|
||||
VBG_LOG(vbg_debug, pr_debug);
|
||||
#endif
|
||||
|
||||
-void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type)
|
||||
+void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type,
|
||||
+ u32 requestor)
|
||||
{
|
||||
struct vmmdev_request_header *req;
|
||||
int order = get_order(PAGE_ALIGN(len));
|
||||
@@ -78,7 +79,7 @@ void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type)
|
||||
req->request_type = req_type;
|
||||
req->rc = VERR_GENERAL_FAILURE;
|
||||
req->reserved1 = 0;
|
||||
- req->reserved2 = 0;
|
||||
+ req->requestor = requestor;
|
||||
|
||||
return req;
|
||||
}
|
||||
@@ -119,7 +120,7 @@ static bool hgcm_req_done(struct vbg_dev *gdev,
|
||||
return done;
|
||||
}
|
||||
|
||||
-int vbg_hgcm_connect(struct vbg_dev *gdev,
|
||||
+int vbg_hgcm_connect(struct vbg_dev *gdev, u32 requestor,
|
||||
struct vmmdev_hgcm_service_location *loc,
|
||||
u32 *client_id, int *vbox_status)
|
||||
{
|
||||
@@ -127,7 +128,7 @@ int vbg_hgcm_connect(struct vbg_dev *gdev,
|
||||
int rc;
|
||||
|
||||
hgcm_connect = vbg_req_alloc(sizeof(*hgcm_connect),
|
||||
- VMMDEVREQ_HGCM_CONNECT);
|
||||
+ VMMDEVREQ_HGCM_CONNECT, requestor);
|
||||
if (!hgcm_connect)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -153,13 +154,15 @@ int vbg_hgcm_connect(struct vbg_dev *gdev,
|
||||
}
|
||||
EXPORT_SYMBOL(vbg_hgcm_connect);
|
||||
|
||||
-int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status)
|
||||
+int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 requestor,
|
||||
+ u32 client_id, int *vbox_status)
|
||||
{
|
||||
struct vmmdev_hgcm_disconnect *hgcm_disconnect = NULL;
|
||||
int rc;
|
||||
|
||||
hgcm_disconnect = vbg_req_alloc(sizeof(*hgcm_disconnect),
|
||||
- VMMDEVREQ_HGCM_DISCONNECT);
|
||||
+ VMMDEVREQ_HGCM_DISCONNECT,
|
||||
+ requestor);
|
||||
if (!hgcm_disconnect)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -593,9 +596,10 @@ static int hgcm_call_copy_back_result(
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function,
|
||||
- u32 timeout_ms, struct vmmdev_hgcm_function_parameter *parms,
|
||||
- u32 parm_count, int *vbox_status)
|
||||
+int vbg_hgcm_call(struct vbg_dev *gdev, u32 requestor, u32 client_id,
|
||||
+ u32 function, u32 timeout_ms,
|
||||
+ struct vmmdev_hgcm_function_parameter *parms, u32 parm_count,
|
||||
+ int *vbox_status)
|
||||
{
|
||||
struct vmmdev_hgcm_call *call;
|
||||
void **bounce_bufs = NULL;
|
||||
@@ -615,7 +619,7 @@ int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function,
|
||||
goto free_bounce_bufs;
|
||||
}
|
||||
|
||||
- call = vbg_req_alloc(size, VMMDEVREQ_HGCM_CALL);
|
||||
+ call = vbg_req_alloc(size, VMMDEVREQ_HGCM_CALL, requestor);
|
||||
if (!call) {
|
||||
ret = -ENOMEM;
|
||||
goto free_bounce_bufs;
|
||||
@@ -647,9 +651,9 @@ EXPORT_SYMBOL(vbg_hgcm_call);
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
int vbg_hgcm_call32(
|
||||
- struct vbg_dev *gdev, u32 client_id, u32 function, u32 timeout_ms,
|
||||
- struct vmmdev_hgcm_function_parameter32 *parm32, u32 parm_count,
|
||||
- int *vbox_status)
|
||||
+ struct vbg_dev *gdev, u32 requestor, u32 client_id, u32 function,
|
||||
+ u32 timeout_ms, struct vmmdev_hgcm_function_parameter32 *parm32,
|
||||
+ u32 parm_count, int *vbox_status)
|
||||
{
|
||||
struct vmmdev_hgcm_function_parameter *parm64 = NULL;
|
||||
u32 i, size;
|
||||
@@ -689,7 +693,7 @@ int vbg_hgcm_call32(
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
- ret = vbg_hgcm_call(gdev, client_id, function, timeout_ms,
|
||||
+ ret = vbg_hgcm_call(gdev, requestor, client_id, function, timeout_ms,
|
||||
parm64, parm_count, vbox_status);
|
||||
if (ret < 0)
|
||||
goto out_free;
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_version.h b/drivers/virt/vboxguest/vboxguest_version.h
|
||||
index 77f0c8f8a231..84834dad38d5 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_version.h
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_version.h
|
||||
@@ -9,11 +9,10 @@
|
||||
#ifndef __VBOX_VERSION_H__
|
||||
#define __VBOX_VERSION_H__
|
||||
|
||||
-/* Last synced October 4th 2017 */
|
||||
-#define VBG_VERSION_MAJOR 5
|
||||
-#define VBG_VERSION_MINOR 2
|
||||
+#define VBG_VERSION_MAJOR 6
|
||||
+#define VBG_VERSION_MINOR 0
|
||||
#define VBG_VERSION_BUILD 0
|
||||
-#define VBG_SVN_REV 68940
|
||||
-#define VBG_VERSION_STRING "5.2.0"
|
||||
+#define VBG_SVN_REV 127566
|
||||
+#define VBG_VERSION_STRING "6.0.0"
|
||||
|
||||
#endif
|
||||
diff --git a/drivers/virt/vboxguest/vmmdev.h b/drivers/virt/vboxguest/vmmdev.h
|
||||
index 5e2ae978935d..6337b8d75d96 100644
|
||||
--- a/drivers/virt/vboxguest/vmmdev.h
|
||||
+++ b/drivers/virt/vboxguest/vmmdev.h
|
||||
@@ -98,8 +98,8 @@ struct vmmdev_request_header {
|
||||
s32 rc;
|
||||
/** Reserved field no.1. MBZ. */
|
||||
u32 reserved1;
|
||||
- /** Reserved field no.2. MBZ. */
|
||||
- u32 reserved2;
|
||||
+ /** IN: Requestor information (VMMDEV_REQUESTOR_*) */
|
||||
+ u32 requestor;
|
||||
};
|
||||
VMMDEV_ASSERT_SIZE(vmmdev_request_header, 24);
|
||||
|
||||
@@ -247,6 +247,8 @@ struct vmmdev_guest_info {
|
||||
};
|
||||
VMMDEV_ASSERT_SIZE(vmmdev_guest_info, 24 + 8);
|
||||
|
||||
+#define VMMDEV_GUEST_INFO2_ADDITIONS_FEATURES_REQUESTOR_INFO BIT(0)
|
||||
+
|
||||
/** struct vmmdev_guestinfo2 - Guest information report, version 2. */
|
||||
struct vmmdev_guest_info2 {
|
||||
/** Header. */
|
||||
@@ -259,7 +261,7 @@ struct vmmdev_guest_info2 {
|
||||
u32 additions_build;
|
||||
/** SVN revision. */
|
||||
u32 additions_revision;
|
||||
- /** Feature mask, currently unused. */
|
||||
+ /** Feature mask. */
|
||||
u32 additions_features;
|
||||
/**
|
||||
* The intentional meaning of this field was:
|
||||
diff --git a/include/linux/vbox_utils.h b/include/linux/vbox_utils.h
|
||||
index a240ed2a0372..ff56c443180c 100644
|
||||
--- a/include/linux/vbox_utils.h
|
||||
+++ b/include/linux/vbox_utils.h
|
||||
@@ -24,15 +24,17 @@ __printf(1, 2) void vbg_debug(const char *fmt, ...);
|
||||
#define vbg_debug pr_debug
|
||||
#endif
|
||||
|
||||
-int vbg_hgcm_connect(struct vbg_dev *gdev,
|
||||
+int vbg_hgcm_connect(struct vbg_dev *gdev, u32 requestor,
|
||||
struct vmmdev_hgcm_service_location *loc,
|
||||
u32 *client_id, int *vbox_status);
|
||||
|
||||
-int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status);
|
||||
+int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 requestor,
|
||||
+ u32 client_id, int *vbox_status);
|
||||
|
||||
-int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function,
|
||||
- u32 timeout_ms, struct vmmdev_hgcm_function_parameter *parms,
|
||||
- u32 parm_count, int *vbox_status);
|
||||
+int vbg_hgcm_call(struct vbg_dev *gdev, u32 requestor, u32 client_id,
|
||||
+ u32 function, u32 timeout_ms,
|
||||
+ struct vmmdev_hgcm_function_parameter *parms, u32 parm_count,
|
||||
+ int *vbox_status);
|
||||
|
||||
/**
|
||||
* Convert a VirtualBox status code to a standard Linux kernel return value.
|
||||
diff --git a/include/uapi/linux/vbox_vmmdev_types.h b/include/uapi/linux/vbox_vmmdev_types.h
|
||||
index 0e68024f36c7..8c535c2594ad 100644
|
||||
--- a/include/uapi/linux/vbox_vmmdev_types.h
|
||||
+++ b/include/uapi/linux/vbox_vmmdev_types.h
|
||||
@@ -102,6 +102,37 @@ enum vmmdev_request_type {
|
||||
#define VMMDEVREQ_HGCM_CALL VMMDEVREQ_HGCM_CALL32
|
||||
#endif
|
||||
|
||||
+/* vmmdev_request_header.requestor defines */
|
||||
+
|
||||
+/* Requestor user not given. */
|
||||
+#define VMMDEV_REQUESTOR_USR_NOT_GIVEN 0x00000000
|
||||
+/* The kernel driver (VBoxGuest) is the requestor. */
|
||||
+#define VMMDEV_REQUESTOR_USR_DRV 0x00000001
|
||||
+/* Some other kernel driver is the requestor. */
|
||||
+#define VMMDEV_REQUESTOR_USR_DRV_OTHER 0x00000002
|
||||
+/* The root or a admin user is the requestor. */
|
||||
+#define VMMDEV_REQUESTOR_USR_ROOT 0x00000003
|
||||
+/* Regular joe user is making the request. */
|
||||
+#define VMMDEV_REQUESTOR_USR_USER 0x00000006
|
||||
+/* User classification mask. */
|
||||
+#define VMMDEV_REQUESTOR_USR_MASK 0x00000007
|
||||
+/* Kernel mode request. */
|
||||
+#define VMMDEV_REQUESTOR_KERNEL 0x00000000
|
||||
+/* User mode request. */
|
||||
+#define VMMDEV_REQUESTOR_USERMODE 0x00000008
|
||||
+/* Don't know the physical console association of the requestor. */
|
||||
+#define VMMDEV_REQUESTOR_CON_DONT_KNOW 0x00000000
|
||||
+/* Console classification mask. */
|
||||
+#define VMMDEV_REQUESTOR_CON_MASK 0x00000040
|
||||
+/* Requestor is member of special VirtualBox user group. */
|
||||
+#define VMMDEV_REQUESTOR_GRP_VBOX 0x00000080
|
||||
+/* Requestor trust level: Unspecified */
|
||||
+#define VMMDEV_REQUESTOR_TRUST_NOT_GIVEN 0x00000000
|
||||
+/* Requestor trust level mask */
|
||||
+#define VMMDEV_REQUESTOR_TRUST_MASK 0x00007000
|
||||
+/* Requestor is using the less trusted user device node (/dev/vboxuser) */
|
||||
+#define VMMDEV_REQUESTOR_USER_DEVICE 0x00008000
|
||||
+
|
||||
/** HGCM service location types. */
|
||||
enum vmmdev_hgcm_service_location_type {
|
||||
VMMDEV_HGCM_LOC_INVALID = 0,
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
|
@ -6,13 +6,13 @@ Subject: [PATCH 3/3] Make get_cert_list() use efi_status_to_str() to print
|
|||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
certs/load_uefi.c | 6 ++++--
|
||||
security/integrity/platform_certs/load_uefi.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
|
||||
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
|
||||
index 9ef34c44fd1..13a2826715d 100644
|
||||
--- a/certs/load_uefi.c
|
||||
+++ b/certs/load_uefi.c
|
||||
--- a/security/integrity/platform_certs/load_uefi.c
|
||||
+++ b/security/integrity/platform_certs/load_uefi.c
|
||||
@@ -51,7 +51,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
From dbdda4277cf0422a9ccb7ea98d0263c3cdbecdf6 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Salter <msalter@redhat.com>
|
||||
Date: Tue, 8 May 2018 21:54:39 -0400
|
||||
Subject: [PATCH] ACPI / irq: Workaround firmware issue on X-Gene based
|
||||
m400
|
||||
|
||||
The ACPI firmware on the xgene-based m400 platorms erroneously
|
||||
describes its UART interrupt as ACPI_PRODUCER rather than
|
||||
ACPI_CONSUMER. This leads to the UART driver being unable to
|
||||
find its interrupt and the kernel unable find a console.
|
||||
Work around this by avoiding the producer/consumer check
|
||||
for X-Gene UARTs.
|
||||
|
||||
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
---
|
||||
drivers/acpi/irq.c | 17 +++++++++++++++--
|
||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c
|
||||
index 7c352cba0528..028c1a564cff 100644
|
||||
--- a/drivers/acpi/irq.c
|
||||
+++ b/drivers/acpi/irq.c
|
||||
@@ -129,6 +129,7 @@ struct acpi_irq_parse_one_ctx {
|
||||
unsigned int index;
|
||||
unsigned long *res_flags;
|
||||
struct irq_fwspec *fwspec;
|
||||
+ bool skip_producer_check;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -200,7 +201,8 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares,
|
||||
return AE_CTRL_TERMINATE;
|
||||
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
|
||||
eirq = &ares->data.extended_irq;
|
||||
- if (eirq->producer_consumer == ACPI_PRODUCER)
|
||||
+ if (!ctx->skip_producer_check &&
|
||||
+ eirq->producer_consumer == ACPI_PRODUCER)
|
||||
return AE_OK;
|
||||
if (ctx->index >= eirq->interrupt_count) {
|
||||
ctx->index -= eirq->interrupt_count;
|
||||
@@ -235,8 +237,19 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares,
|
||||
static int acpi_irq_parse_one(acpi_handle handle, unsigned int index,
|
||||
struct irq_fwspec *fwspec, unsigned long *flags)
|
||||
{
|
||||
- struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec };
|
||||
+ struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec, false };
|
||||
|
||||
+ /*
|
||||
+ * Firmware on arm64-based HPE m400 platform incorrectly marks
|
||||
+ * its UART interrupt as ACPI_PRODUCER rather than ACPI_CONSUMER.
|
||||
+ * Don't do the producer/consumer check for that device.
|
||||
+ */
|
||||
+ if (IS_ENABLED(CONFIG_ARM64)) {
|
||||
+ struct acpi_device *adev = acpi_bus_get_acpi_device(handle);
|
||||
+
|
||||
+ if (adev && !strcmp(acpi_device_hid(adev), "APMC0D08"))
|
||||
+ ctx.skip_producer_check = true;
|
||||
+ }
|
||||
acpi_walk_resources(handle, METHOD_NAME__CRS, acpi_irq_parse_one_cb, &ctx);
|
||||
return ctx.rc;
|
||||
}
|
||||
--
|
||||
2.17.0
|
||||
|
||||
39
ACPI-scan-Fix-regression-related-to-X-Gene-UARTs.patch
Normal file
39
ACPI-scan-Fix-regression-related-to-X-Gene-UARTs.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
From 1e494dc5f3140005ff1f17bc06c0c16d6d50d580 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Salter <msalter@redhat.com>
|
||||
Date: Thu, 19 Apr 2018 23:29:47 -0400
|
||||
Subject: [PATCH] ACPI / scan: Fix regression related to X-Gene UARTs
|
||||
|
||||
Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
|
||||
devices") caused a regression with some X-Gene based platforms (Mustang
|
||||
and M400) with invalid DSDT. The DSDT makes it appear that the UART
|
||||
device is also a slave device attached to itself. With the above commit
|
||||
the UART won't be enumerated by ACPI scan (slave serial devices shouldn't
|
||||
be). So check for X-Gene UART device and skip slace device check on it.
|
||||
|
||||
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
---
|
||||
drivers/acpi/scan.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||
index e1b6231cfa1c..542dafac4306 100644
|
||||
--- a/drivers/acpi/scan.c
|
||||
+++ b/drivers/acpi/scan.c
|
||||
@@ -1567,6 +1567,14 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
|
||||
if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
|
||||
return false;
|
||||
|
||||
+ /*
|
||||
+ * Firmware on some arm64 X-Gene platforms will make the UART
|
||||
+ * device appear as both a UART and a slave of that UART. Just
|
||||
+ * bail out here for X-Gene UARTs.
|
||||
+ */
|
||||
+ if (!strcmp(acpi_device_hid(device), "APMC0D08"))
|
||||
+ return false;
|
||||
+
|
||||
INIT_LIST_HEAD(&resource_list);
|
||||
acpi_dev_get_resources(device, &resource_list,
|
||||
acpi_check_serial_bus_slave,
|
||||
--
|
||||
2.17.1
|
||||
|
||||
1130
ARM-dts-bcm283x-Several-DTS-improvements.patch
Normal file
1130
ARM-dts-bcm283x-Several-DTS-improvements.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,180 +0,0 @@
|
|||
From: "J. Bruce Fields" <bfields@redhat.com>
|
||||
Date: 2017-04-14 15:04:40
|
||||
Subject: [PATCH] nfsd: check for oversized NFSv2/v3 arguments
|
||||
|
||||
A client can append random data to the end of an NFSv2 or NFSv3 RPC call
|
||||
without our complaining; we'll just stop parsing at the end of the
|
||||
expected data and ignore the rest.
|
||||
|
||||
Encoded arguments and replies are stored together in an array of pages,
|
||||
and if a call is too large it could leave inadequate space for the
|
||||
reply. This is normally OK because NFS RPC's typically have either
|
||||
short arguments and long replies (like READ) or long arguments and short
|
||||
replies (like WRITE). But a client that sends an incorrectly long reply
|
||||
can violate those assumptions. This was observed to cause crashes.
|
||||
|
||||
So, insist that the argument not be any longer than we expect.
|
||||
|
||||
Also, several operations increment rq_next_page in the decode routine
|
||||
before checking the argument size, which can leave rq_next_page pointing
|
||||
well past the end of the page array, causing trouble later in
|
||||
svc_free_pages.
|
||||
|
||||
As followup we may also want to rewrite the encoding routines to check
|
||||
more carefully that they aren't running off the end of the page array.
|
||||
|
||||
Reported-by: Tuomas Haanpää <thaan@synopsys.com>
|
||||
Reported-by: Ari Kauppi <ari@synopsys.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
|
||||
---
|
||||
fs/nfsd/nfs3xdr.c | 23 +++++++++++++++++------
|
||||
fs/nfsd/nfsxdr.c | 13 ++++++++++---
|
||||
include/linux/sunrpc/svc.h | 3 +--
|
||||
3 files changed, 28 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
|
||||
index dba2ff8eaa68..be66bcadfaea 100644
|
||||
--- a/fs/nfsd/nfs3xdr.c
|
||||
+++ b/fs/nfsd/nfs3xdr.c
|
||||
@@ -334,8 +334,11 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
if (!p)
|
||||
return 0;
|
||||
p = xdr_decode_hyper(p, &args->offset);
|
||||
-
|
||||
args->count = ntohl(*p++);
|
||||
+
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = min(args->count, max_blocksize);
|
||||
|
||||
/* set up the kvec */
|
||||
@@ -349,7 +352,7 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
v++;
|
||||
}
|
||||
args->vlen = v;
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -536,9 +539,11 @@ nfs3svc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
p = decode_fh(p, &args->fh);
|
||||
if (!p)
|
||||
return 0;
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -564,10 +569,14 @@ nfs3svc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->verf = p; p += 2;
|
||||
args->dircount = ~0;
|
||||
args->count = ntohl(*p++);
|
||||
+
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
args->count = min_t(u32, args->count, PAGE_SIZE);
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -585,6 +594,9 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->dircount = ntohl(*p++);
|
||||
args->count = ntohl(*p++);
|
||||
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = args->count = min(args->count, max_blocksize);
|
||||
while (len > 0) {
|
||||
struct page *p = *(rqstp->rq_next_page++);
|
||||
@@ -592,8 +604,7 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->buffer = page_address(p);
|
||||
len -= PAGE_SIZE;
|
||||
}
|
||||
-
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
|
||||
index 41b468a6a90f..79268369f7b3 100644
|
||||
--- a/fs/nfsd/nfsxdr.c
|
||||
+++ b/fs/nfsd/nfsxdr.c
|
||||
@@ -257,6 +257,9 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
len = args->count = ntohl(*p++);
|
||||
p++; /* totalcount - unused */
|
||||
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = min_t(unsigned int, len, NFSSVC_MAXBLKSIZE_V2);
|
||||
|
||||
/* set up somewhere to store response.
|
||||
@@ -272,7 +275,7 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
v++;
|
||||
}
|
||||
args->vlen = v;
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -360,9 +363,11 @@ nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readli
|
||||
p = decode_fh(p, &args->fh);
|
||||
if (!p)
|
||||
return 0;
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -400,9 +405,11 @@ nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->cookie = ntohl(*p++);
|
||||
args->count = ntohl(*p++);
|
||||
args->count = min_t(u32, args->count, PAGE_SIZE);
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
|
||||
index e770abeed32d..6ef19cf658b4 100644
|
||||
--- a/include/linux/sunrpc/svc.h
|
||||
+++ b/include/linux/sunrpc/svc.h
|
||||
@@ -336,8 +336,7 @@ xdr_argsize_check(struct svc_rqst *rqstp, __be32 *p)
|
||||
{
|
||||
char *cp = (char *)p;
|
||||
struct kvec *vec = &rqstp->rq_arg.head[0];
|
||||
- return cp >= (char*)vec->iov_base
|
||||
- && cp <= (char*)vec->iov_base + vec->iov_len;
|
||||
+ return cp == (char *)vec->iov_base + vec->iov_len;
|
||||
}
|
||||
|
||||
static inline int
|
||||
--
|
||||
2.9.3
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
||||
167
CVE-2019-3459-and-CVE-2019-3460.patch
Normal file
167
CVE-2019-3459-and-CVE-2019-3460.patch
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
From 20614b74e481f0c9f94032ae99f110d4647b65a6 Mon Sep 17 00:00:00 2001
|
||||
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Date: Thu, 10 Jan 2019 07:28:33 +0100
|
||||
Subject: [PATCH 1/2] Bluetooth: check message types in l2cap_get_conf_opt
|
||||
|
||||
l2cap_get_conf_opt can handle a "default" message type, but it needs to
|
||||
be verified that it really is the correct type (CONF_EFS or CONF_RFC)
|
||||
before passing it back to the caller. To do this we need to check the
|
||||
return value of this call now and handle the error correctly up the
|
||||
stack.
|
||||
|
||||
Based on a patch from Ran Menscher.
|
||||
|
||||
Reported-by: Ran Menscher <ran.menscher@karambasecurity.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
net/bluetooth/l2cap_core.c | 25 +++++++++++++++++++------
|
||||
1 file changed, 19 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
|
||||
index d17a4736e47c..a0ce6e8e5ef7 100644
|
||||
--- a/net/bluetooth/l2cap_core.c
|
||||
+++ b/net/bluetooth/l2cap_core.c
|
||||
@@ -2979,6 +2979,10 @@ static inline int l2cap_get_conf_opt(void **ptr, int *type, int *olen,
|
||||
break;
|
||||
|
||||
default:
|
||||
+ /* Only CONF_EFS and CONF_RFC are allowed here */
|
||||
+ if ((opt->type != L2CAP_CONF_EFS) &&
|
||||
+ (opt->type != L2CAP_CONF_RFC))
|
||||
+ return -EPROTO;
|
||||
*val = (unsigned long) opt->val;
|
||||
break;
|
||||
}
|
||||
@@ -3323,7 +3327,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
|
||||
void *endptr = data + data_size;
|
||||
void *req = chan->conf_req;
|
||||
int len = chan->conf_len;
|
||||
- int type, hint, olen;
|
||||
+ int type, hint, olen, err;
|
||||
unsigned long val;
|
||||
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
|
||||
struct l2cap_conf_efs efs;
|
||||
@@ -3335,7 +3339,10 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
|
||||
BT_DBG("chan %p", chan);
|
||||
|
||||
while (len >= L2CAP_CONF_OPT_SIZE) {
|
||||
- len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
|
||||
+ err = l2cap_get_conf_opt(&req, &type, &olen, &val);
|
||||
+ if (err < 0)
|
||||
+ return err;
|
||||
+ len -= err;
|
||||
|
||||
hint = type & L2CAP_CONF_HINT;
|
||||
type &= L2CAP_CONF_MASK;
|
||||
@@ -3538,7 +3545,7 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
|
||||
struct l2cap_conf_req *req = data;
|
||||
void *ptr = req->data;
|
||||
void *endptr = data + size;
|
||||
- int type, olen;
|
||||
+ int type, olen, err;
|
||||
unsigned long val;
|
||||
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
|
||||
struct l2cap_conf_efs efs;
|
||||
@@ -3546,7 +3553,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
|
||||
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
|
||||
|
||||
while (len >= L2CAP_CONF_OPT_SIZE) {
|
||||
- len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
|
||||
+ err = l2cap_get_conf_opt(&rsp, &type, &olen, &val);
|
||||
+ if (err < 0)
|
||||
+ return err;
|
||||
+ len -= err;
|
||||
|
||||
switch (type) {
|
||||
case L2CAP_CONF_MTU:
|
||||
@@ -3706,7 +3716,7 @@ void __l2cap_connect_rsp_defer(struct l2cap_chan *chan)
|
||||
|
||||
static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len)
|
||||
{
|
||||
- int type, olen;
|
||||
+ int type, olen, err;
|
||||
unsigned long val;
|
||||
/* Use sane default values in case a misbehaving remote device
|
||||
* did not send an RFC or extended window size option.
|
||||
@@ -3726,7 +3736,10 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len)
|
||||
return;
|
||||
|
||||
while (len >= L2CAP_CONF_OPT_SIZE) {
|
||||
- len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
|
||||
+ err = l2cap_get_conf_opt(&rsp, &type, &olen, &val);
|
||||
+ if (err < 0)
|
||||
+ return;
|
||||
+ len -= err;
|
||||
|
||||
switch (type) {
|
||||
case L2CAP_CONF_RFC:
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From 50cd5314f5ffa264906f4986f414750d648c4ece Mon Sep 17 00:00:00 2001
|
||||
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Date: Thu, 10 Jan 2019 07:29:17 +0100
|
||||
Subject: [PATCH 2/2] Bluetooth: check the buffer size for some messages before
|
||||
parsing
|
||||
|
||||
The L2CAP_CONF_EFS and L2CAP_CONF_RFC messages can be sent from
|
||||
userspace so their structure sizes need to be checked before parsing
|
||||
them.
|
||||
|
||||
Based on a patch from Ran Menscher.
|
||||
|
||||
Reported-by: Ran Menscher <ran.menscher@karambasecurity.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
net/bluetooth/l2cap_core.c | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
|
||||
index a0ce6e8e5ef7..d8d3cbdc0d29 100644
|
||||
--- a/net/bluetooth/l2cap_core.c
|
||||
+++ b/net/bluetooth/l2cap_core.c
|
||||
@@ -3360,7 +3360,8 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_RFC:
|
||||
- if (olen == sizeof(rfc))
|
||||
+ if ((olen == sizeof(rfc)) &&
|
||||
+ (endptr - ptr >= L2CAP_CONF_OPT_SIZE + sizeof(rfc)))
|
||||
memcpy(&rfc, (void *) val, olen);
|
||||
break;
|
||||
|
||||
@@ -3370,7 +3371,8 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_EFS:
|
||||
- if (olen == sizeof(efs)) {
|
||||
+ if ((olen == sizeof(efs)) &&
|
||||
+ (endptr - ptr >= L2CAP_CONF_OPT_SIZE + sizeof(efs))) {
|
||||
remote_efs = 1;
|
||||
memcpy(&efs, (void *) val, olen);
|
||||
}
|
||||
@@ -3575,7 +3577,8 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_RFC:
|
||||
- if (olen == sizeof(rfc))
|
||||
+ if ((olen == sizeof(rfc)) &&
|
||||
+ (endptr - ptr >= L2CAP_CONF_OPT_SIZE + sizeof(rfc)))
|
||||
memcpy(&rfc, (void *)val, olen);
|
||||
|
||||
if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state) &&
|
||||
@@ -3595,7 +3598,8 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_EFS:
|
||||
- if (olen == sizeof(efs)) {
|
||||
+ if ((olen == sizeof(efs)) &&
|
||||
+ (endptr - ptr >= L2CAP_CONF_OPT_SIZE + sizeof(efs))) {
|
||||
memcpy(&efs, (void *)val, olen);
|
||||
|
||||
if (chan->local_stype != L2CAP_SERV_NOTRAFIC &&
|
||||
--
|
||||
2.20.1
|
||||
|
||||
42
CVE-2019-3701.patch
Normal file
42
CVE-2019-3701.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
From linux-netdev Thu Jan 03 12:26:34 2019
|
||||
From: Oliver Hartkopp <socketcan () hartkopp ! net>
|
||||
Date: Thu, 03 Jan 2019 12:26:34 +0000
|
||||
To: linux-netdev
|
||||
Subject: [PATCH] can: gw: ensure DLC boundaries after CAN frame modification
|
||||
Message-Id: <20190103122634.2530-1-socketcan () hartkopp ! net>
|
||||
X-MARC-Message: https://marc.info/?l=linux-netdev&m=154651842302479
|
||||
|
||||
The CAN frame modification rules allow bitwise logical operations which can
|
||||
be also applied to the can_dlc field. Ensure the manipulation result to
|
||||
maintain the can_dlc boundaries so that the CAN drivers do not accidently
|
||||
write arbitrary content beyond the data registers in the CAN controllers
|
||||
I/O mem when processing can-gw manipulated outgoing frames. When passing these
|
||||
frames to user space this issue did not have any effect to the kernel or any
|
||||
leaked data as we always strictly copy sizeof(struct can_frame) bytes.
|
||||
|
||||
Reported-by: Muyu Yu <ieatmuttonchuan@gmail.com>
|
||||
Reported-by: Marcus Meissner <meissner@suse.de>
|
||||
Tested-by: Muyu Yu <ieatmuttonchuan@gmail.com>
|
||||
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
|
||||
Cc: linux-stable <stable@vger.kernel.org> # >= v3.2
|
||||
---
|
||||
net/can/gw.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/net/can/gw.c b/net/can/gw.c
|
||||
index faa3da88a127..9000d9b8a133 100644
|
||||
--- a/net/can/gw.c
|
||||
+++ b/net/can/gw.c
|
||||
@@ -418,6 +418,10 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
|
||||
|
||||
/* check for checksum updates when the CAN frame has been modified */
|
||||
if (modidx) {
|
||||
+ /* ensure DLC boundaries after the different mods */
|
||||
+ if (cf->can_dlc > 8)
|
||||
+ cf->can_dlc = 8;
|
||||
+
|
||||
if (gwj->mod.csumfunc.crc8)
|
||||
(*gwj->mod.csumfunc.crc8)(cf, &gwj->mod.csum.crc8);
|
||||
|
||||
--
|
||||
2.19.2
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
From fb2ac204a70da565de9ef9a9d6d69a40c2d59727 Mon Sep 17 00:00:00 2001
|
||||
From: David Howells <dhowells@redhat.com>
|
||||
Date: Fri, 5 May 2017 08:21:56 +0100
|
||||
Subject: [PATCH] KEYS: Allow unrestricted boot-time addition of keys to
|
||||
secondary keyring
|
||||
|
||||
Allow keys to be added to the system secondary certificates keyring during
|
||||
kernel initialisation in an unrestricted fashion. Such keys are implicitly
|
||||
trusted and don't have their trust chains checked on link.
|
||||
|
||||
This allows keys in the UEFI database to be added in secure boot mode for
|
||||
the purposes of module signing.
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
certs/internal.h | 18 ++++++++++++++++++
|
||||
certs/system_keyring.c | 33 +++++++++++++++++++++++++++++++++
|
||||
2 files changed, 51 insertions(+)
|
||||
create mode 100644 certs/internal.h
|
||||
|
||||
diff --git a/certs/internal.h b/certs/internal.h
|
||||
new file mode 100644
|
||||
index 0000000..5dcbefb
|
||||
--- /dev/null
|
||||
+++ b/certs/internal.h
|
||||
@@ -0,0 +1,18 @@
|
||||
+/* Internal definitions
|
||||
+ *
|
||||
+ * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
|
||||
+ * Written by David Howells (dhowells@redhat.com)
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public Licence
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the Licence, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * system_keyring.c
|
||||
+ */
|
||||
+#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||
+extern void __init add_trusted_secondary_key(const char *source,
|
||||
+ const void *data, size_t len);
|
||||
+#endif
|
||||
diff --git a/certs/system_keyring.c b/certs/system_keyring.c
|
||||
index 6251d1b..5ac8ba6 100644
|
||||
--- a/certs/system_keyring.c
|
||||
+++ b/certs/system_keyring.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <keys/asymmetric-type.h>
|
||||
#include <keys/system_keyring.h>
|
||||
#include <crypto/pkcs7.h>
|
||||
+#include "internal.h"
|
||||
|
||||
static struct key *builtin_trusted_keys;
|
||||
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||
@@ -265,3 +266,35 @@ int verify_pkcs7_signature(const void *data, size_t len,
|
||||
EXPORT_SYMBOL_GPL(verify_pkcs7_signature);
|
||||
|
||||
#endif /* CONFIG_SYSTEM_DATA_VERIFICATION */
|
||||
+
|
||||
+#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||
+/**
|
||||
+ * add_trusted_secondary_key - Add to secondary keyring with no validation
|
||||
+ * @source: Source of key
|
||||
+ * @data: The blob holding the key
|
||||
+ * @len: The length of the data blob
|
||||
+ *
|
||||
+ * Add a key to the secondary keyring without checking its trust chain. This
|
||||
+ * is available only during kernel initialisation.
|
||||
+ */
|
||||
+void __init add_trusted_secondary_key(const char *source,
|
||||
+ const void *data, size_t len)
|
||||
+{
|
||||
+ key_ref_t key;
|
||||
+
|
||||
+ key = key_create_or_update(make_key_ref(secondary_trusted_keys, 1),
|
||||
+ "asymmetric",
|
||||
+ NULL, data, len,
|
||||
+ (KEY_POS_ALL & ~KEY_POS_SETATTR) |
|
||||
+ KEY_USR_VIEW,
|
||||
+ KEY_ALLOC_NOT_IN_QUOTA |
|
||||
+ KEY_ALLOC_BYPASS_RESTRICTION);
|
||||
+
|
||||
+ if (IS_ERR(key))
|
||||
+ pr_err("Problem loading %s X.509 certificate (%ld)\n",
|
||||
+ source, PTR_ERR(key));
|
||||
+ else
|
||||
+ pr_notice("Loaded %s cert '%s' linked to secondary sys keyring\n",
|
||||
+ source, key_ref_to_ptr(key)->description);
|
||||
+}
|
||||
+#endif /* CONFIG_SECONDARY_TRUSTED_KEYRING */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
54
KEYS-Make-use-of-platform-keyring-for-module-signature.patch
Normal file
54
KEYS-Make-use-of-platform-keyring-for-module-signature.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
From 70cecc97a4fc1667472224558a50dd7b6c42c789 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Holmes <robeholmes@gmail.com>
|
||||
Date: Tue, 23 Apr 2019 07:39:29 +0000
|
||||
Subject: [PATCH] KEYS: Make use of platform keyring for module signature
|
||||
verify
|
||||
|
||||
This patch completes commit 278311e417be ("kexec, KEYS: Make use of
|
||||
platform keyring for signature verify") which, while adding the
|
||||
platform keyring for bzImage verification, neglected to also add
|
||||
this keyring for module verification.
|
||||
|
||||
As such, kernel modules signed with keys from the MokList variable
|
||||
were not successfully verified.
|
||||
|
||||
Signed-off-by: Robert Holmes <robeholmes@gmail.com>
|
||||
---
|
||||
kernel/module_signing.c | 16 ++++++++++++----
|
||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
|
||||
index 6b9a926fd86b..cf94220e9154 100644
|
||||
--- a/kernel/module_signing.c
|
||||
+++ b/kernel/module_signing.c
|
||||
@@ -49,6 +49,7 @@ int mod_verify_sig(const void *mod, struct load_info *info)
|
||||
{
|
||||
struct module_signature ms;
|
||||
size_t sig_len, modlen = info->len;
|
||||
+ int ret;
|
||||
|
||||
pr_devel("==>%s(,%zu)\n", __func__, modlen);
|
||||
|
||||
@@ -82,8 +83,15 @@ int mod_verify_sig(const void *mod, struct load_info *info)
|
||||
return -EBADMSG;
|
||||
}
|
||||
|
||||
- return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
|
||||
- VERIFY_USE_SECONDARY_KEYRING,
|
||||
- VERIFYING_MODULE_SIGNATURE,
|
||||
- NULL, NULL);
|
||||
+ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
|
||||
+ VERIFY_USE_SECONDARY_KEYRING,
|
||||
+ VERIFYING_MODULE_SIGNATURE,
|
||||
+ NULL, NULL);
|
||||
+ if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) {
|
||||
+ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
|
||||
+ VERIFY_USE_PLATFORM_KEYRING,
|
||||
+ VERIFYING_MODULE_SIGNATURE,
|
||||
+ NULL, NULL);
|
||||
+ }
|
||||
+ return ret;
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
|
@ -1,130 +0,0 @@
|
|||
From 7289bfaee2a42bdb56eecab0625907c045d080ba Mon Sep 17 00:00:00 2001
|
||||
From: Eric Biggers <ebiggers@google.com>
|
||||
Date: Wed, 27 Sep 2017 12:50:41 -0700
|
||||
Subject: [PATCH] KEYS: don't let add_key() update an uninstantiated key
|
||||
|
||||
Currently, add_key() will, when passed a key that already exists, call
|
||||
the key's ->update() method. But this is heavily broken in the case
|
||||
where the key is uninstantiated because it doesn't call
|
||||
__key_instantiate_and_link(). Consequently, it doesn't do most of the
|
||||
things that are supposed to happen when the key is instantiated, such as
|
||||
setting KEY_FLAG_INSTANTIATED, clearing KEY_FLAG_USER_CONSTRUCT and
|
||||
awakening tasks waiting on it, and incrementing key->user->nikeys.
|
||||
|
||||
It also never takes key_construction_mutex, which means that
|
||||
->instantiate() can run concurrently with ->update() on the same key.
|
||||
In the case of the "user" and "logon" key types this causes a memory
|
||||
leak, at best. Maybe even worse, the ->update() methods of the
|
||||
"encrypted" and "trusted" key types actually just dereference a NULL
|
||||
pointer when passed an uninstantiated key.
|
||||
|
||||
Therefore, change find_key_to_update() to return NULL if the found key
|
||||
is uninstantiated, so that add_key() replaces the key rather than
|
||||
instantiating it. This seems to be better than fixing __key_update() to
|
||||
call __key_instantiate_and_link(), since given all the bugs noted above
|
||||
as well as that the existing behavior was undocumented and
|
||||
keyctl_instantiate() is supposed to be used instead, I doubt anyone was
|
||||
relying on the existing behavior.
|
||||
|
||||
This patch only affects *uninstantiated* keys. For now we still allow a
|
||||
negatively instantiated key to be updated (thereby positively
|
||||
instantiating it), although that's broken too (the next patch fixes it)
|
||||
and I'm not sure that anyone actually uses that functionality either.
|
||||
|
||||
Here is a simple reproducer for the bug using the "encrypted" key type
|
||||
(requires CONFIG_ENCRYPTED_KEYS=y), though as noted above the bug
|
||||
pertained to more than just the "encrypted" key type:
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <keyutils.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ringid = keyctl_join_session_keyring(NULL);
|
||||
|
||||
if (fork()) {
|
||||
for (;;) {
|
||||
const char payload[] = "update user:foo 32";
|
||||
|
||||
usleep(rand() % 10000);
|
||||
add_key("encrypted", "desc", payload, sizeof(payload), ringid);
|
||||
keyctl_clear(ringid);
|
||||
}
|
||||
} else {
|
||||
for (;;)
|
||||
request_key("encrypted", "desc", "callout_info", ringid);
|
||||
}
|
||||
}
|
||||
|
||||
It causes:
|
||||
|
||||
BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
|
||||
IP: encrypted_update+0xb0/0x170
|
||||
PGD 7a178067 P4D 7a178067 PUD 77269067 PMD 0
|
||||
PREEMPT SMP
|
||||
CPU: 0 PID: 340 Comm: reproduce Tainted: G D 4.14.0-rc1-00025-g428490e38b2e #796
|
||||
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
|
||||
task: ffff8a467a39a340 task.stack: ffffb15c40770000
|
||||
RIP: 0010:encrypted_update+0xb0/0x170
|
||||
RSP: 0018:ffffb15c40773de8 EFLAGS: 00010246
|
||||
RAX: 0000000000000000 RBX: ffff8a467a275b00 RCX: 0000000000000000
|
||||
RDX: 0000000000000005 RSI: ffff8a467a275b14 RDI: ffffffffb742f303
|
||||
RBP: ffffb15c40773e20 R08: 0000000000000000 R09: ffff8a467a275b17
|
||||
R10: 0000000000000020 R11: 0000000000000000 R12: 0000000000000000
|
||||
R13: 0000000000000000 R14: ffff8a4677057180 R15: ffff8a467a275b0f
|
||||
FS: 00007f5d7fb08700(0000) GS:ffff8a467f200000(0000) knlGS:0000000000000000
|
||||
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|
||||
CR2: 0000000000000018 CR3: 0000000077262005 CR4: 00000000001606f0
|
||||
Call Trace:
|
||||
key_create_or_update+0x2bc/0x460
|
||||
SyS_add_key+0x10c/0x1d0
|
||||
entry_SYSCALL_64_fastpath+0x1f/0xbe
|
||||
RIP: 0033:0x7f5d7f211259
|
||||
RSP: 002b:00007ffed03904c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8
|
||||
RAX: ffffffffffffffda RBX: 000000003b2a7955 RCX: 00007f5d7f211259
|
||||
RDX: 00000000004009e4 RSI: 00000000004009ff RDI: 0000000000400a04
|
||||
RBP: 0000000068db8bad R08: 000000003b2a7955 R09: 0000000000000004
|
||||
R10: 000000000000001a R11: 0000000000000246 R12: 0000000000400868
|
||||
R13: 00007ffed03905d0 R14: 0000000000000000 R15: 0000000000000000
|
||||
Code: 77 28 e8 64 34 1f 00 45 31 c0 31 c9 48 8d 55 c8 48 89 df 48 8d 75 d0 e8 ff f9 ff ff 85 c0 41 89 c4 0f 88 84 00 00 00 4c 8b 7d c8 <49> 8b 75 18 4c 89 ff e8 24 f8 ff ff 85 c0 41 89 c4 78 6d 49 8b
|
||||
RIP: encrypted_update+0xb0/0x170 RSP: ffffb15c40773de8
|
||||
CR2: 0000000000000018
|
||||
|
||||
Cc: <stable@vger.kernel.org> [v2.6.12+]
|
||||
Signed-off-by: Eric Biggers <ebiggers@google.com>
|
||||
---
|
||||
security/keys/keyring.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/security/keys/keyring.c b/security/keys/keyring.c
|
||||
index 4fa82a8a9c0e..129a4175760b 100644
|
||||
--- a/security/keys/keyring.c
|
||||
+++ b/security/keys/keyring.c
|
||||
@@ -1056,8 +1056,8 @@ EXPORT_SYMBOL(keyring_restrict);
|
||||
* caller must also hold a lock on the keyring semaphore.
|
||||
*
|
||||
* Returns a pointer to the found key with usage count incremented if
|
||||
- * successful and returns NULL if not found. Revoked and invalidated keys are
|
||||
- * skipped over.
|
||||
+ * successful and returns NULL if not found. Revoked, invalidated, and
|
||||
+ * uninstantiated keys are skipped over. (But negative keys are not!)
|
||||
*
|
||||
* If successful, the possession indicator is propagated from the keyring ref
|
||||
* to the returned key reference.
|
||||
@@ -1084,8 +1084,10 @@ key_ref_t find_key_to_update(key_ref_t keyring_ref,
|
||||
|
||||
found:
|
||||
key = keyring_ptr_to_key(object);
|
||||
- if (key->flags & ((1 << KEY_FLAG_INVALIDATED) |
|
||||
- (1 << KEY_FLAG_REVOKED))) {
|
||||
+ if ((key->flags & ((1 << KEY_FLAG_INVALIDATED) |
|
||||
+ (1 << KEY_FLAG_REVOKED) |
|
||||
+ (1 << KEY_FLAG_INSTANTIATED))) !=
|
||||
+ (1 << KEY_FLAG_INSTANTIATED)) {
|
||||
kleave(" = NULL [x]");
|
||||
return NULL;
|
||||
}
|
||||
--
|
||||
2.13.6
|
||||
|
||||
|
|
@ -1,175 +0,0 @@
|
|||
From patchwork Thu Feb 8 13:43:35 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [1/4] clk: bcm2835: Fix ana->maskX definitions
|
||||
From: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
X-Patchwork-Id: 10207161
|
||||
Message-Id: <20180208134338.24590-1-boris.brezillon@bootlin.com>
|
||||
To: Florian Fainelli <f.fainelli@gmail.com>, Ray Jui <rjui@broadcom.com>,
|
||||
Scott Branden <sbranden@broadcom.com>,
|
||||
bcm-kernel-feedback-list@broadcom.com,
|
||||
Stephen Warren <swarren@wwwdotorg.org>,
|
||||
Lee Jones <lee@kernel.org>, Eric Anholt <eric@anholt.net>,
|
||||
linux-rpi-kernel@lists.infradead.org,
|
||||
Mike Turquette <mturquette@baylibre.com>,
|
||||
Stephen Boyd <sboyd@codeaurora.org>, linux-clk@vger.kernel.org
|
||||
Cc: Boris Brezillon <boris.brezillon@bootlin.com>, stable@vger.kernel.org
|
||||
Date: Thu, 8 Feb 2018 14:43:35 +0100
|
||||
|
||||
ana->maskX values are already '~'-ed in bcm2835_pll_set_rate(). Remove
|
||||
the '~' in the definition to fix ANA setup.
|
||||
|
||||
Note that this commit fixes a long standing bug preventing one from
|
||||
using an HDMI display if it's plugged after the FW has booted Linux.
|
||||
This is because PLLH is used by the HDMI encoder to generate the pixel
|
||||
clock.
|
||||
|
||||
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
|
||||
index 44301a3d9963..2108a274185a 100644
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -449,17 +449,17 @@ struct bcm2835_pll_ana_bits {
|
||||
static const struct bcm2835_pll_ana_bits bcm2835_ana_default = {
|
||||
.mask0 = 0,
|
||||
.set0 = 0,
|
||||
- .mask1 = (u32)~(A2W_PLL_KI_MASK | A2W_PLL_KP_MASK),
|
||||
+ .mask1 = A2W_PLL_KI_MASK | A2W_PLL_KP_MASK,
|
||||
.set1 = (2 << A2W_PLL_KI_SHIFT) | (8 << A2W_PLL_KP_SHIFT),
|
||||
- .mask3 = (u32)~A2W_PLL_KA_MASK,
|
||||
+ .mask3 = A2W_PLL_KA_MASK,
|
||||
.set3 = (2 << A2W_PLL_KA_SHIFT),
|
||||
.fb_prediv_mask = BIT(14),
|
||||
};
|
||||
|
||||
static const struct bcm2835_pll_ana_bits bcm2835_ana_pllh = {
|
||||
- .mask0 = (u32)~(A2W_PLLH_KA_MASK | A2W_PLLH_KI_LOW_MASK),
|
||||
+ .mask0 = A2W_PLLH_KA_MASK | A2W_PLLH_KI_LOW_MASK,
|
||||
.set0 = (2 << A2W_PLLH_KA_SHIFT) | (2 << A2W_PLLH_KI_LOW_SHIFT),
|
||||
- .mask1 = (u32)~(A2W_PLLH_KI_HIGH_MASK | A2W_PLLH_KP_MASK),
|
||||
+ .mask1 = A2W_PLLH_KI_HIGH_MASK | A2W_PLLH_KP_MASK,
|
||||
.set1 = (6 << A2W_PLLH_KP_SHIFT),
|
||||
.mask3 = 0,
|
||||
.set3 = 0,
|
||||
From patchwork Thu Feb 8 13:43:36 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [2/4] clk: bcm2835: Protect sections updating shared registers
|
||||
From: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
X-Patchwork-Id: 10207155
|
||||
Message-Id: <20180208134338.24590-2-boris.brezillon@bootlin.com>
|
||||
To: Florian Fainelli <f.fainelli@gmail.com>, Ray Jui <rjui@broadcom.com>,
|
||||
Scott Branden <sbranden@broadcom.com>,
|
||||
bcm-kernel-feedback-list@broadcom.com,
|
||||
Stephen Warren <swarren@wwwdotorg.org>,
|
||||
Lee Jones <lee@kernel.org>, Eric Anholt <eric@anholt.net>,
|
||||
linux-rpi-kernel@lists.infradead.org,
|
||||
Mike Turquette <mturquette@baylibre.com>,
|
||||
Stephen Boyd <sboyd@codeaurora.org>, linux-clk@vger.kernel.org
|
||||
Cc: Boris Brezillon <boris.brezillon@bootlin.com>, stable@vger.kernel.org
|
||||
Date: Thu, 8 Feb 2018 14:43:36 +0100
|
||||
|
||||
CM_PLLx and A2W_XOSC_CTRL registers are accessed by different clock
|
||||
handlers and must be accessed with ->regs_lock held.
|
||||
Update the sections where this protection is missing.
|
||||
|
||||
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
|
||||
index 2108a274185a..a07f6451694a 100644
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -623,8 +623,10 @@ static int bcm2835_pll_on(struct clk_hw *hw)
|
||||
~A2W_PLL_CTRL_PWRDN);
|
||||
|
||||
/* Take the PLL out of reset. */
|
||||
+ spin_lock(&cprman->regs_lock);
|
||||
cprman_write(cprman, data->cm_ctrl_reg,
|
||||
cprman_read(cprman, data->cm_ctrl_reg) & ~CM_PLL_ANARST);
|
||||
+ spin_unlock(&cprman->regs_lock);
|
||||
|
||||
/* Wait for the PLL to lock. */
|
||||
timeout = ktime_add_ns(ktime_get(), LOCK_TIMEOUT_NS);
|
||||
@@ -701,9 +703,11 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw,
|
||||
}
|
||||
|
||||
/* Unmask the reference clock from the oscillator. */
|
||||
+ spin_lock(&cprman->regs_lock);
|
||||
cprman_write(cprman, A2W_XOSC_CTRL,
|
||||
cprman_read(cprman, A2W_XOSC_CTRL) |
|
||||
data->reference_enable_mask);
|
||||
+ spin_unlock(&cprman->regs_lock);
|
||||
|
||||
if (do_ana_setup_first)
|
||||
bcm2835_pll_write_ana(cprman, data->ana_reg_base, ana);
|
||||
From patchwork Thu Feb 8 13:43:37 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [3/4] clk: bcm2835: De-assert/assert PLL reset signal when appropriate
|
||||
From: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
X-Patchwork-Id: 10207157
|
||||
Message-Id: <20180208134338.24590-3-boris.brezillon@bootlin.com>
|
||||
To: Florian Fainelli <f.fainelli@gmail.com>, Ray Jui <rjui@broadcom.com>,
|
||||
Scott Branden <sbranden@broadcom.com>,
|
||||
bcm-kernel-feedback-list@broadcom.com,
|
||||
Stephen Warren <swarren@wwwdotorg.org>,
|
||||
Lee Jones <lee@kernel.org>, Eric Anholt <eric@anholt.net>,
|
||||
linux-rpi-kernel@lists.infradead.org,
|
||||
Mike Turquette <mturquette@baylibre.com>,
|
||||
Stephen Boyd <sboyd@codeaurora.org>, linux-clk@vger.kernel.org
|
||||
Cc: Boris Brezillon <boris.brezillon@bootlin.com>, stable@vger.kernel.org
|
||||
Date: Thu, 8 Feb 2018 14:43:37 +0100
|
||||
|
||||
In order to enable a PLL, not only the PLL has to be powered up and
|
||||
locked, but you also have to de-assert the reset signal. The last part
|
||||
was missing. Add it so PLLs that were not enabled by the FW/bootloader
|
||||
can be enabled from Linux.
|
||||
|
||||
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
|
||||
index a07f6451694a..6c5d4a8e426c 100644
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -602,6 +602,9 @@ static void bcm2835_pll_off(struct clk_hw *hw)
|
||||
const struct bcm2835_pll_data *data = pll->data;
|
||||
|
||||
spin_lock(&cprman->regs_lock);
|
||||
+ cprman_write(cprman, data->a2w_ctrl_reg,
|
||||
+ cprman_read(cprman, data->a2w_ctrl_reg) &
|
||||
+ ~A2W_PLL_CTRL_PRST_DISABLE);
|
||||
cprman_write(cprman, data->cm_ctrl_reg,
|
||||
cprman_read(cprman, data->cm_ctrl_reg) |
|
||||
CM_PLL_ANARST);
|
||||
@@ -640,6 +643,10 @@ static int bcm2835_pll_on(struct clk_hw *hw)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
+ cprman_write(cprman, data->a2w_ctrl_reg,
|
||||
+ cprman_read(cprman, data->a2w_ctrl_reg) |
|
||||
+ A2W_PLL_CTRL_PRST_DISABLE);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From 7a2e67bfa5316e267e782477ec880e2464fd682a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Sun, 11 Feb 2018 21:28:41 +0000
|
||||
Subject: [PATCH] crypto: sunxi-ss: Add MODULE_ALIAS to sun4i-ss
|
||||
|
||||
The MODULE_ALIAS is required to enable the sun4i-ss driver to load
|
||||
automatically when built at a module. Tested on a Cubietruck.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
drivers/crypto/sunxi-ss/sun4i-ss-core.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
|
||||
index 1547cbe13dc2..a81d89b3b7d8 100644
|
||||
--- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c
|
||||
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c
|
||||
@@ -451,6 +451,7 @@ static struct platform_driver sun4i_ss_driver = {
|
||||
|
||||
module_platform_driver(sun4i_ss_driver);
|
||||
|
||||
+MODULE_ALIAS("platform:sun4i-ss");
|
||||
MODULE_DESCRIPTION("Allwinner Security System cryptographic accelerator");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Corentin LABBE <clabbe.montjoie@gmail.com>");
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From patchwork Thu Jan 18 12:34:18 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: ARM: dts: imx6qdl-udoo: Disable usbh1 to avoid kernel hang
|
||||
From: Fabio Estevam <fabio.estevam@nxp.com>
|
||||
X-Patchwork-Id: 10173115
|
||||
Message-Id: <1516278858-15464-1-git-send-email-fabio.estevam@nxp.com>
|
||||
To: <shawnguo@kernel.org>
|
||||
Cc: maggu2810@gmail.com, peter.chen@nxp.com, mail@maciej.szmigiero.name,
|
||||
Fabio Estevam <fabio.estevam@nxp.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Thu, 18 Jan 2018 10:34:18 -0200
|
||||
|
||||
Currently the kernel hangs when USB Host1 is enabled due to the lack of
|
||||
support for controlling the USB hub clock and GPIO reset line.
|
||||
|
||||
Peter Chen has made several attempts to fix this problem, but his series
|
||||
has not been applied yet, so better disable USB host1 for now to avoid
|
||||
the kernel hang.
|
||||
|
||||
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||
Acked-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
|
||||
Tested-by: Markus Rathgeb <maggu2810@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/imx6qdl-udoo.dtsi | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
index 4161b7d..1f0b9f6 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
@@ -274,7 +274,8 @@
|
||||
pinctrl-0 = <&pinctrl_usbh>;
|
||||
vbus-supply = <®_usb_h1_vbus>;
|
||||
clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
- status = "okay";
|
||||
+ /* currently USB support causes a kernel hang. Disable it for now */
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
&usdhc3 {
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
From bb3e08008c0e48fd4f51a0f0957eecae61a24d69 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Tue, 1 Nov 2016 09:35:30 +0000
|
||||
Subject: [PATCH] Revert "mmc: omap_hsmmc: Use dma_request_chan() for
|
||||
requesting DMA channel"
|
||||
|
||||
This reverts commit 81eef6ca92014845d40e3f1310e42b7010303acc.
|
||||
---
|
||||
drivers/mmc/host/omap_hsmmc.c | 50 ++++++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 40 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
|
||||
index 24ebc9a..3563321 100644
|
||||
--- a/drivers/mmc/host/omap_hsmmc.c
|
||||
+++ b/drivers/mmc/host/omap_hsmmc.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_device.h>
|
||||
+#include <linux/omap-dmaengine.h>
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/core.h>
|
||||
#include <linux/mmc/mmc.h>
|
||||
@@ -1992,6 +1993,8 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
||||
struct resource *res;
|
||||
int ret, irq;
|
||||
const struct of_device_id *match;
|
||||
+ dma_cap_mask_t mask;
|
||||
+ unsigned tx_req, rx_req;
|
||||
const struct omap_mmc_of_data *data;
|
||||
void __iomem *base;
|
||||
|
||||
@@ -2121,17 +2124,44 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
||||
|
||||
omap_hsmmc_conf_bus_power(host);
|
||||
|
||||
- host->rx_chan = dma_request_chan(&pdev->dev, "rx");
|
||||
- if (IS_ERR(host->rx_chan)) {
|
||||
- dev_err(mmc_dev(host->mmc), "RX DMA channel request failed\n");
|
||||
- ret = PTR_ERR(host->rx_chan);
|
||||
+ if (!pdev->dev.of_node) {
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
|
||||
+ if (!res) {
|
||||
+ dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
|
||||
+ ret = -ENXIO;
|
||||
+ goto err_irq;
|
||||
+ }
|
||||
+ tx_req = res->start;
|
||||
+
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
|
||||
+ if (!res) {
|
||||
+ dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
|
||||
+ ret = -ENXIO;
|
||||
+ goto err_irq;
|
||||
+ }
|
||||
+ rx_req = res->start;
|
||||
+ }
|
||||
+
|
||||
+ dma_cap_zero(mask);
|
||||
+ dma_cap_set(DMA_SLAVE, mask);
|
||||
+
|
||||
+ host->rx_chan =
|
||||
+ dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
|
||||
+ &rx_req, &pdev->dev, "rx");
|
||||
+
|
||||
+ if (!host->rx_chan) {
|
||||
+ dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel\n");
|
||||
+ ret = -ENXIO;
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
- host->tx_chan = dma_request_chan(&pdev->dev, "tx");
|
||||
- if (IS_ERR(host->tx_chan)) {
|
||||
- dev_err(mmc_dev(host->mmc), "TX DMA channel request failed\n");
|
||||
- ret = PTR_ERR(host->tx_chan);
|
||||
+ host->tx_chan =
|
||||
+ dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
|
||||
+ &tx_req, &pdev->dev, "tx");
|
||||
+
|
||||
+ if (!host->tx_chan) {
|
||||
+ dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel\n");
|
||||
+ ret = -ENXIO;
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
@@ -2189,9 +2219,9 @@ err_slot_name:
|
||||
mmc_remove_host(mmc);
|
||||
err_irq:
|
||||
device_init_wakeup(&pdev->dev, false);
|
||||
- if (!IS_ERR_OR_NULL(host->tx_chan))
|
||||
+ if (host->tx_chan)
|
||||
dma_release_channel(host->tx_chan);
|
||||
- if (!IS_ERR_OR_NULL(host->rx_chan))
|
||||
+ if (host->rx_chan)
|
||||
dma_release_channel(host->rx_chan);
|
||||
pm_runtime_dont_use_autosuspend(host->dev);
|
||||
pm_runtime_put_sync(host->dev);
|
||||
--
|
||||
2.9.3
|
||||
|
||||
57
arm-sdhci-esdhc-imx-fixes.patch
Normal file
57
arm-sdhci-esdhc-imx-fixes.patch
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
From patchwork Thu Jun 28 08:13:30 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [2/3] mmc: sdhci: add quirk to prevent higher speed modes
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
X-Patchwork-Id: 10493273
|
||||
Message-Id: <20180628081331.13051-3-stefan@agner.ch>
|
||||
To: adrian.hunter@intel.com, ulf.hansson@linaro.org
|
||||
Cc: fabio.estevam@nxp.com, haibo.chen@nxp.com, aisheng.dong@nxp.com,
|
||||
michael@amarulasolutions.com, rmk+kernel@armlinux.org.uk,
|
||||
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 28 Jun 2018 10:13:30 +0200
|
||||
|
||||
Some hosts are capable of running higher speed modes but do not
|
||||
have the board support for it. Introduce a quirk which prevents
|
||||
the stack from using modes running at 100MHz or faster.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
drivers/mmc/host/sdhci.c | 8 ++++++++
|
||||
drivers/mmc/host/sdhci.h | 2 ++
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
|
||||
index 1c828e0e9905..8ac257dfaab3 100644
|
||||
--- a/drivers/mmc/host/sdhci.c
|
||||
+++ b/drivers/mmc/host/sdhci.c
|
||||
@@ -3749,6 +3749,14 @@ int sdhci_setup_host(struct sdhci_host *host)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (host->quirks2 & SDHCI_QUIRK2_NO_UHS_HS200_HS400) {
|
||||
+ host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
|
||||
+ SDHCI_SUPPORT_DDR50);
|
||||
+
|
||||
+ mmc->caps2 &= ~(MMC_CAP2_HSX00_1_8V | MMC_CAP2_HSX00_1_2V |
|
||||
+ MMC_CAP2_HS400_ES);
|
||||
+ }
|
||||
+
|
||||
if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V) {
|
||||
host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
|
||||
SDHCI_SUPPORT_DDR50);
|
||||
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
|
||||
index 23966f887da6..cb2433d6d61f 100644
|
||||
--- a/drivers/mmc/host/sdhci.h
|
||||
+++ b/drivers/mmc/host/sdhci.h
|
||||
@@ -450,6 +450,8 @@ struct sdhci_host {
|
||||
* block count.
|
||||
*/
|
||||
#define SDHCI_QUIRK2_USE_32BIT_BLK_CNT (1<<18)
|
||||
+/* Do not support any higher speeds (>50MHz) */
|
||||
+#define SDHCI_QUIRK2_NO_UHS_HS200_HS400 (1<<19)
|
||||
|
||||
int irq; /* Device IRQ */
|
||||
void __iomem *ioaddr; /* Mapped address */
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From 90e388ca5d8bbee022f9ed5fc24137b31579fa6e Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 22 Nov 2017 15:52:36 +0000
|
||||
Subject: [PATCH] Revert "arm64: allwinner: a64: pine64: Use dcdc1 regulator
|
||||
for mmc0"
|
||||
|
||||
This reverts commit 3f241bfa60bdc9c4fde63fa6664a8ce00fd668c6.
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
index d06e34b5d192..caf8b6fbe5e3 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
@@ -61,6 +61,13 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
+
|
||||
+ reg_vcc3v3: vcc3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
@@ -84,7 +91,7 @@
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
- vmmc-supply = <®_dcdc1>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
disable-wp;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
163
arm64-rock960-add-onboard-wifi-bt.patch
Normal file
163
arm64-rock960-add-onboard-wifi-bt.patch
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
From c72235c288c8cc55d33e257e05d3017c2daf1603 Mon Sep 17 00:00:00 2001
|
||||
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
Date: Fri, 15 Feb 2019 10:26:48 +0530
|
||||
Subject: arm64: dts: rockchip: Add on-board WiFi/BT support for Rock960 boards
|
||||
|
||||
Add on-board WiFi/BT support for Rock960 boards such as Rock960 based
|
||||
on AP6356S and Ficus based on AP6354 wireless modules.
|
||||
|
||||
Firmwares for the respective boards are available here:
|
||||
|
||||
http://people.linaro.org/~manivannan.sadhasivam/rock960_wifi/
|
||||
http://people.linaro.org/~manivannan.sadhasivam/ficus_wifi/
|
||||
|
||||
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 95 +++++++++++++++++++++++-
|
||||
1 file changed, 94 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
index fecb133b0ed2..e40e66e33a5e 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
@@ -9,6 +9,15 @@
|
||||
#include "rk3399-opp.dtsi"
|
||||
|
||||
/ {
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rk808 1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_enable_h>;
|
||||
+ reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
vcc1v8_s0: vcc1v8-s0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc1v8_s0";
|
||||
@@ -370,6 +379,20 @@
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
+ bt {
|
||||
+ bt_enable_h: bt-enable-h {
|
||||
+ rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_host_wake_l: bt-host-wake-l {
|
||||
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_wake_l: bt-wake-l {
|
||||
+ rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
sdmmc {
|
||||
sdmmc_bus1: sdmmc-bus1 {
|
||||
rockchip,pins =
|
||||
@@ -395,6 +418,26 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ sdio0 {
|
||||
+ sdio0_bus4: sdio0-bus4 {
|
||||
+ rockchip,pins =
|
||||
+ <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>,
|
||||
+ <2 21 RK_FUNC_1 &pcfg_pull_up_20ma>,
|
||||
+ <2 22 RK_FUNC_1 &pcfg_pull_up_20ma>,
|
||||
+ <2 23 RK_FUNC_1 &pcfg_pull_up_20ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdio0_cmd: sdio0-cmd {
|
||||
+ rockchip,pins =
|
||||
+ <2 24 RK_FUNC_1 &pcfg_pull_up_20ma>;
|
||||
+ };
|
||||
+
|
||||
+ sdio0_clk: sdio0-clk {
|
||||
+ rockchip,pins =
|
||||
+ <2 25 RK_FUNC_1 &pcfg_pull_none_20ma>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
pmic {
|
||||
pmic_int_l: pmic-int-l {
|
||||
rockchip,pins =
|
||||
@@ -411,6 +454,19 @@
|
||||
<1 14 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sdio-pwrseq {
|
||||
+ wifi_enable_h: wifi-enable-h {
|
||||
+ rockchip,pins =
|
||||
+ <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wifi {
|
||||
+ wifi_host_wake_l: wifi-host-wake-l {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
@@ -421,6 +477,32 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&sdio0 {
|
||||
+ bus-width = <4>;
|
||||
+ clock-frequency = <50000000>;
|
||||
+ cap-sdio-irq;
|
||||
+ cap-sd-highspeed;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcmf: wifi@1 {
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ reg = <1>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
+ interrupt-names = "host-wake";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_host_wake_l>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
mmc-hs400-1_8v;
|
||||
@@ -447,8 +529,19 @@
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&uart0_xfer &uart0_cts>;
|
||||
+ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
|
||||
status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "brcm,bcm43438-bt";
|
||||
+ clocks = <&rk808 1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
|
||||
+ host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
+ shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
43
arm64-rock960-enable-hdmi-audio.patch
Normal file
43
arm64-rock960-enable-hdmi-audio.patch
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
From 803346a8efc9062da732c9d3e0b8e7079096f1ad Mon Sep 17 00:00:00 2001
|
||||
From: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
Date: Tue, 29 Jan 2019 08:33:24 -0300
|
||||
Subject: arm64: dts: rockchip: Enable HDMI audio devices on rk3399-rock960
|
||||
|
||||
This commit enable the hdmi-sound and i2s2 devices needed to have
|
||||
audio over HDMI on both rock960 and the related ficus board.
|
||||
|
||||
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
index 56abbb08c133..fecb133b0ed2 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
@@ -94,6 +94,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdmi_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
clock-frequency = <400000>;
|
||||
i2c-scl-rising-time-ns = <168>;
|
||||
@@ -336,6 +340,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&i2s2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&io_domains {
|
||||
bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
|
||||
audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
35
arm64-rock960-enable-tsadc.patch
Normal file
35
arm64-rock960-enable-tsadc.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
From 02260a619efe574d0f6c2a4420b8b76c6802294e Mon Sep 17 00:00:00 2001
|
||||
From: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
Date: Fri, 15 Feb 2019 12:25:39 -0300
|
||||
Subject: arm64: dts: rockchip: Enable tsadc device on rock960
|
||||
|
||||
Enable the thermal sensor. This device also provides
|
||||
temperature shutdown protection. The shutdown value is
|
||||
set at 110C, as tested by the vendor.
|
||||
|
||||
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
index e40e66e33a5e..2927db4dda9d 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
|
||||
@@ -527,6 +527,13 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ rockchip,hw-tshut-polarity = <1>;
|
||||
+ rockchip,hw-tshut-temp = <110000>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
124
asus-fx503-keyb.patch
Normal file
124
asus-fx503-keyb.patch
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
From c1dfbd7a588e43be466d12c3636f5670aef04847 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 23 Nov 2018 13:31:00 +0100
|
||||
Subject: [PATCH 1/2] HID: asus: Add event handler to catch unmapped Asus
|
||||
Vendor UsagePage codes
|
||||
|
||||
Various Asus devices generate HID events using the Asus Vendor specific
|
||||
UsagePage 0xff31 and hid-asus will map these in its input_mapping for all
|
||||
devices to which it binds (independent of any quirks).
|
||||
|
||||
Add an event callback which check for unmapped (because sofar unknown)
|
||||
usages within the Asus Vendor UsagePage and log a warning for these.
|
||||
|
||||
The purpose of this patch is to help debugging / find such unmapped codes
|
||||
and add them to the asus_input_mapping() function.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/hid/hid-asus.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
|
||||
index a1fa2fc8c9b5..61fb5a43c1cb 100644
|
||||
--- a/drivers/hid/hid-asus.c
|
||||
+++ b/drivers/hid/hid-asus.c
|
||||
@@ -241,6 +241,18 @@ static int asus_report_input(struct asus_drvdata *drvdat, u8 *data, int size)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static int asus_event(struct hid_device *hdev, struct hid_field *field,
|
||||
+ struct hid_usage *usage, __s32 value)
|
||||
+{
|
||||
+ if ((usage->hid & HID_USAGE_PAGE) == 0xff310000 &&
|
||||
+ (usage->hid & HID_USAGE) != 0x00 && !usage->type) {
|
||||
+ hid_warn(hdev, "Unmapped Asus vendor usagepage code 0x%02x\n",
|
||||
+ usage->hid & HID_USAGE);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int asus_raw_event(struct hid_device *hdev,
|
||||
struct hid_report *report, u8 *data, int size)
|
||||
{
|
||||
@@ -832,6 +844,7 @@ static struct hid_driver asus_driver = {
|
||||
#ifdef CONFIG_PM
|
||||
.reset_resume = asus_reset_resume,
|
||||
#endif
|
||||
+ .event = asus_event,
|
||||
.raw_event = asus_raw_event
|
||||
};
|
||||
module_hid_driver(asus_driver);
|
||||
--
|
||||
2.19.2
|
||||
|
||||
From 53cb4c986eaedd2cfa161932b36d80c70d947e9e Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 23 Nov 2018 13:44:27 +0100
|
||||
Subject: [PATCH 2/2] HID: asus: Add support for the ASUS FX503VD laptop
|
||||
|
||||
The ASUS FX503VD laptop uses an USB keyboard with several hotkeys
|
||||
which use the Asus Vendor specific UsagePage.
|
||||
|
||||
This uses two usage-codes within the page which have not been seen
|
||||
before, 0x7c for its mic-mute hotkey and 0x99 for Fn+F5 which has
|
||||
a "fan" symbol as hotkey symbol on the keyb. we map this to KEY_PROG4
|
||||
(PROG1-PROG3 are already used).
|
||||
|
||||
This commit adds the mappings for the 2 new usage codes and the USB-ids
|
||||
for this keyboard to the hid-asus driver.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/hid/hid-asus.c | 7 +++++++
|
||||
drivers/hid/hid-ids.h | 1 +
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
|
||||
index 61fb5a43c1cb..ab8bd40a77ed 100644
|
||||
--- a/drivers/hid/hid-asus.c
|
||||
+++ b/drivers/hid/hid-asus.c
|
||||
@@ -522,6 +522,7 @@ static int asus_input_mapping(struct hid_device *hdev,
|
||||
case 0x20: asus_map_key_clear(KEY_BRIGHTNESSUP); break;
|
||||
case 0x35: asus_map_key_clear(KEY_DISPLAY_OFF); break;
|
||||
case 0x6c: asus_map_key_clear(KEY_SLEEP); break;
|
||||
+ case 0x7c: asus_map_key_clear(KEY_MICMUTE); break;
|
||||
case 0x82: asus_map_key_clear(KEY_CAMERA); break;
|
||||
case 0x88: asus_map_key_clear(KEY_RFKILL); break;
|
||||
case 0xb5: asus_map_key_clear(KEY_CALC); break;
|
||||
@@ -540,6 +541,9 @@ static int asus_input_mapping(struct hid_device *hdev,
|
||||
/* Fn+Space Power4Gear Hybrid */
|
||||
case 0x5c: asus_map_key_clear(KEY_PROG3); break;
|
||||
|
||||
+ /* Fn+F5 "fan" symbol on FX503VD */
|
||||
+ case 0x99: asus_map_key_clear(KEY_PROG4); break;
|
||||
+
|
||||
default:
|
||||
/* ASUS lazily declares 256 usages, ignore the rest,
|
||||
* as some make the keyboard appear as a pointer device. */
|
||||
@@ -817,6 +821,9 @@ static const struct hid_device_id asus_devices[] = {
|
||||
USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2), QUIRK_USE_KBD_BACKLIGHT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
|
||||
USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3), QUIRK_G752_KEYBOARD },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
|
||||
+ USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD),
|
||||
+ QUIRK_USE_KBD_BACKLIGHT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
|
||||
USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD),
|
||||
QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index ed35c9a9a110..4206428c0ba2 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -190,6 +190,7 @@
|
||||
#define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1 0x1854
|
||||
#define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2 0x1837
|
||||
#define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3 0x1822
|
||||
+#define USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD 0x1869
|
||||
|
||||
#define USB_VENDOR_ID_ATEN 0x0557
|
||||
#define USB_DEVICE_ID_ATEN_UC100KM 0x2004
|
||||
--
|
||||
2.19.2
|
||||
|
||||
340
bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
Normal file
340
bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
Normal file
|
|
@ -0,0 +1,340 @@
|
|||
From 050af591beda9f84693d92b2c38416ea31630608 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 10 Jan 2019 03:15:33 +0000
|
||||
Subject: [PATCH] bcm2835: cpufreq: add CPU frequency control driver
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi.dtsi | 7 ++
|
||||
arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 7 ++
|
||||
arch/arm/boot/dts/bcm2837.dtsi | 58 +++++++++
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 2 +-
|
||||
drivers/clk/bcm/Kconfig | 8 ++
|
||||
drivers/clk/bcm/Makefile | 1 +
|
||||
drivers/clk/bcm/clk-raspberrypi.c | 138 +++++++++++++++++++++
|
||||
7 files changed, 220 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/clk/bcm/clk-raspberrypi.c
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
index 29f970f864dc..6d0f43957af4 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
@@ -35,6 +35,13 @@
|
||||
reg = <0x7e00b840 0x3c>;
|
||||
interrupts = <0 2>;
|
||||
};
|
||||
+
|
||||
+ arm_clk: arm_clk {
|
||||
+ compatible = "raspberrypi,bcm2835-cpu";
|
||||
+ clocks = <&clocks BCM2835_CLOCK_VPU>;
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-output-names = "arm";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
|
||||
index 42bb09044cc7..3333c080696c 100644
|
||||
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
|
||||
@@ -106,3 +106,10 @@
|
||||
pinctrl-0 = <&uart1_gpio14>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&cpu0_opp_table {
|
||||
+ opp@1400000000 {
|
||||
+ opp-hz = /bits/ 64 <1400000000>;
|
||||
+ clock-latency-ns = <355000>;
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi
|
||||
index beb6c502dadc..1590d94b618e 100644
|
||||
--- a/arch/arm/boot/dts/bcm2837.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2837.dtsi
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "bcm283x.dtsi"
|
||||
+#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2837";
|
||||
@@ -44,6 +45,10 @@
|
||||
reg = <0>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000d8>;
|
||||
+ clocks = <&arm_clk>;
|
||||
+ clock-names = "cpu";
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@@ -52,6 +57,10 @@
|
||||
reg = <1>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e0>;
|
||||
+ clocks = <&arm_clk>;
|
||||
+ clock-names = "cpu";
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu2: cpu@2 {
|
||||
@@ -60,6 +69,10 @@
|
||||
reg = <2>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000e8>;
|
||||
+ clocks = <&arm_clk>;
|
||||
+ clock-names = "cpu";
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu3: cpu@3 {
|
||||
@@ -68,6 +81,31 @@
|
||||
reg = <3>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0x0 0x000000f0>;
|
||||
+ clocks = <&arm_clk>;
|
||||
+ clock-names = "cpu";
|
||||
+ operating-points-v2 = <&cpu0_opp_table>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cpu0_opp_table: opp_table0 {
|
||||
+ compatible = "operating-points-v2";
|
||||
+ opp-shared;
|
||||
+
|
||||
+ opp@600000000 {
|
||||
+ opp-hz = /bits/ 64 <600000000>;
|
||||
+ clock-latency-ns = <355000>;
|
||||
+ opp-suspend;
|
||||
+ };
|
||||
+
|
||||
+ opp@900000000 {
|
||||
+ opp-hz = /bits/ 64 <900000000>;
|
||||
+ clock-latency-ns = <355000>;
|
||||
+ };
|
||||
+
|
||||
+ opp@1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ clock-latency-ns = <355000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -84,6 +122,26 @@
|
||||
|
||||
&cpu_thermal {
|
||||
coefficients = <(-538) 412000>;
|
||||
+
|
||||
+ trips {
|
||||
+ cpu_alert0: cpu-alert0 {
|
||||
+ temperature = <70000>;
|
||||
+ hysteresis = <0>;
|
||||
+ type = "passive";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ trip = <&cpu_alert0>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+
|
||||
+ map1 {
|
||||
+ trip = <&cpu_crit>;
|
||||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
/* enable thermal sensor with the correct compatible property set */
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 31b29646b14c..2def0684d198 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -38,7 +38,7 @@
|
||||
thermal-sensors = <&thermal>;
|
||||
|
||||
trips {
|
||||
- cpu-crit {
|
||||
+ cpu_crit: cpu-crit {
|
||||
temperature = <80000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
diff --git a/drivers/clk/bcm/Kconfig b/drivers/clk/bcm/Kconfig
|
||||
index 4c4bd85f707c..e40bd19da22b 100644
|
||||
--- a/drivers/clk/bcm/Kconfig
|
||||
+++ b/drivers/clk/bcm/Kconfig
|
||||
@@ -63,3 +63,11 @@ config CLK_BCM_SR
|
||||
default ARCH_BCM_IPROC
|
||||
help
|
||||
Enable common clock framework support for the Broadcom Stingray SoC
|
||||
+
|
||||
+config CLK_RASPBERRYPI_CPU
|
||||
+ bool "Raspberry Pi CPU clock driver"
|
||||
+ depends on ARCH_BCM2835 || (COMPILE_TEST && OF)
|
||||
+ depends on RASPBERRYPI_FIRMWARE=y
|
||||
+ help
|
||||
+ This enables support for the RPi CPU clock which can be adjusted
|
||||
+ via the RPi firmware.
|
||||
diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile
|
||||
index 002661d39128..a028b0a90b6e 100644
|
||||
--- a/drivers/clk/bcm/Makefile
|
||||
+++ b/drivers/clk/bcm/Makefile
|
||||
@@ -8,6 +8,7 @@ obj-$(CONFIG_COMMON_CLK_IPROC) += clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-a
|
||||
obj-$(CONFIG_ARCH_BCM2835) += clk-bcm2835.o
|
||||
obj-$(CONFIG_ARCH_BCM2835) += clk-bcm2835-aux.o
|
||||
obj-$(CONFIG_ARCH_BCM_53573) += clk-bcm53573-ilp.o
|
||||
+obj-$(CONFIG_CLK_RASPBERRYPI_CPU) += clk-raspberrypi.o
|
||||
obj-$(CONFIG_CLK_BCM_CYGNUS) += clk-cygnus.o
|
||||
obj-$(CONFIG_CLK_BCM_HR2) += clk-hr2.o
|
||||
obj-$(CONFIG_CLK_BCM_NSP) += clk-nsp.o
|
||||
diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
|
||||
new file mode 100644
|
||||
index 000000000000..046efc822a59
|
||||
--- /dev/null
|
||||
+++ b/drivers/clk/bcm/clk-raspberrypi.c
|
||||
@@ -0,0 +1,138 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Raspberry Pi CPU clock driver
|
||||
+ *
|
||||
+ * Copyright (C) 2018 Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/clk-provider.h>
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
+
|
||||
+#define VCMSG_ID_ARM_CLOCK 0x000000003 /* Clock/Voltage ID's */
|
||||
+
|
||||
+struct rpi_cpu_clkgen {
|
||||
+ struct clk_hw hw;
|
||||
+ struct rpi_firmware *fw;
|
||||
+};
|
||||
+
|
||||
+/* tag part of the message */
|
||||
+struct prop {
|
||||
+ u32 id; /* the ID of the clock/voltage to get or set */
|
||||
+ u32 val; /* the value (e.g. rate (in Hz)) to set */
|
||||
+} __packed;
|
||||
+
|
||||
+static int rpi_cpu_clock_property(struct rpi_firmware *fw, u32 tag, u32 *val)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct prop msg = {
|
||||
+ .id = VCMSG_ID_ARM_CLOCK,
|
||||
+ .val = *val,
|
||||
+ };
|
||||
+
|
||||
+ ret = rpi_firmware_property(fw, tag, &msg, sizeof(msg));
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ *val = msg.val;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static unsigned long rpi_cpu_get_rate(struct clk_hw *hw,
|
||||
+ unsigned long parent_rate)
|
||||
+{
|
||||
+ struct rpi_cpu_clkgen *cpu = container_of(hw, struct rpi_cpu_clkgen, hw);
|
||||
+ u32 rate = 0;
|
||||
+
|
||||
+ rpi_cpu_clock_property(cpu->fw, RPI_FIRMWARE_GET_CLOCK_RATE, &rate);
|
||||
+
|
||||
+ return rate;
|
||||
+}
|
||||
+
|
||||
+static long rpi_cpu_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
+ unsigned long *parent_rate)
|
||||
+{
|
||||
+ return rate;
|
||||
+}
|
||||
+
|
||||
+static int rpi_cpu_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
+ unsigned long parent_rate)
|
||||
+{
|
||||
+ struct rpi_cpu_clkgen *cpu = container_of(hw, struct rpi_cpu_clkgen, hw);
|
||||
+ u32 new_rate = rate;
|
||||
+
|
||||
+ return rpi_cpu_clock_property(cpu->fw, RPI_FIRMWARE_SET_CLOCK_RATE,
|
||||
+ &new_rate);
|
||||
+}
|
||||
+
|
||||
+static const struct clk_ops rpi_cpu_ops = {
|
||||
+ .recalc_rate = rpi_cpu_get_rate,
|
||||
+ .round_rate = rpi_cpu_round_rate,
|
||||
+ .set_rate = rpi_cpu_set_rate,
|
||||
+};
|
||||
+
|
||||
+static int rpi_cpu_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct device_node *fw_node;
|
||||
+ struct rpi_cpu_clkgen *cpu;
|
||||
+ struct clk_init_data *init;
|
||||
+ int ret;
|
||||
+
|
||||
+ cpu = devm_kzalloc(dev, sizeof(*cpu), GFP_KERNEL);
|
||||
+ if (!cpu)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ init = devm_kzalloc(dev, sizeof(*init), GFP_KERNEL);
|
||||
+ if (!init)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ fw_node = of_find_compatible_node(NULL, NULL,
|
||||
+ "raspberrypi,bcm2835-firmware");
|
||||
+ if (!fw_node) {
|
||||
+ dev_err(dev, "Missing firmware node\n");
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+
|
||||
+ cpu->fw = rpi_firmware_get(fw_node);
|
||||
+ of_node_put(fw_node);
|
||||
+ if (!cpu->fw)
|
||||
+ return -EPROBE_DEFER;
|
||||
+
|
||||
+ init->name = dev->of_node->name;
|
||||
+ init->ops = &rpi_cpu_ops;
|
||||
+
|
||||
+ cpu->hw.init = init;
|
||||
+ ret = devm_clk_hw_register(dev, &cpu->hw);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get,
|
||||
+ &cpu->hw);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id rpi_cpu_of_match[] = {
|
||||
+ { .compatible = "raspberrypi,bcm2835-cpu", },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, rpi_cpu_of_match);
|
||||
+
|
||||
+static struct platform_driver rpi_cpu_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "raspberrypi-cpu",
|
||||
+ .of_match_table = rpi_cpu_of_match,
|
||||
+ },
|
||||
+ .probe = rpi_cpu_probe,
|
||||
+};
|
||||
+builtin_platform_driver(rpi_cpu_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Stefan Wahren <stefan.wahren@i2se.com>");
|
||||
+MODULE_DESCRIPTION("Raspberry Pi CPU clock driver");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
From patchwork Mon Feb 12 20:11:36 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: hwrng: bcm2835: Handle deferred clock properly
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10214385
|
||||
Message-Id: <1518466296-30161-1-git-send-email-stefan.wahren@i2se.com>
|
||||
To: Herbert Xu <herbert@gondor.apana.org.au>, Matt Mackall <mpm@selenic.com>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Florian Fainelli <f.fainelli@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
|
||||
Scott Branden <sbranden@broadcom.com>, Jon Mason <jonmason@broadcom.com>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
|
||||
Eric Anholt <eric@anholt.net>,
|
||||
bcm-kernel-feedback-list@broadcom.com, linux-crypto@vger.kernel.org,
|
||||
Ray Jui <rjui@broadcom.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Mon, 12 Feb 2018 21:11:36 +0100
|
||||
|
||||
In case the probe of the clock is deferred, we would assume it is
|
||||
optional. This is wrong, so defer the probe of this driver until
|
||||
the clock is available.
|
||||
|
||||
Fixes: 791af4f4907a ("hwrng: bcm2835 - Manage an optional clock")
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/char/hw_random/bcm2835-rng.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
|
||||
index 7a84cec..6767d96 100644
|
||||
--- a/drivers/char/hw_random/bcm2835-rng.c
|
||||
+++ b/drivers/char/hw_random/bcm2835-rng.c
|
||||
@@ -163,6 +163,8 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
|
||||
|
||||
/* Clock is optional on most platforms */
|
||||
priv->clk = devm_clk_get(dev, NULL);
|
||||
+ if (IS_ERR(priv->clk) && PTR_ERR(priv->clk) == -EPROBE_DEFER)
|
||||
+ return -EPROBE_DEFER;
|
||||
|
||||
priv->rng.name = pdev->name;
|
||||
priv->rng.init = bcm2835_rng_init;
|
||||
776
bcm2835-mmc-Several-fixes-for-bcm2835-driver.patch
Normal file
776
bcm2835-mmc-Several-fixes-for-bcm2835-driver.patch
Normal file
|
|
@ -0,0 +1,776 @@
|
|||
From patchwork Sun Nov 11 20:23:55 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10677861
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3920A14BD
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:26:49 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BB86296F9
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:26:49 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 201BB296FF; Sun, 11 Nov 2018 20:26:49 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CB68B296F9
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:26:48 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=Tt5EgaFovmpaVblg1vCoUL5KFNHfoZnIbMjvuoDpH+A=; b=YkFJNA/0JeWm1W0agi1fs65bw4
|
||||
MuaP5Xd9dNXoiUTsnX7DaDk+CMixGON/AQSwqrRmPptbNpeKcoQ2xx08c2EyKnpDYGfzQ/HhclUjO
|
||||
ZNhvf7TNzQknjeJ00NlJBnp1PwS4Mj9YZsHHTzC8GdMwzQ1IsBTh7F+j4sDJfF78FjjC14+nCgrjS
|
||||
RiFJhoPq/9ddurP5XoM0scxQ6AziagQA3OPOalJK16OvXnyjBnZoFATKWhJ4ZbShRh6nlQoynEgIj
|
||||
5WWVXJYzjquyUo2NV0tTq2QO/LSzrYscljqgOp7Fuu2YJeAa2QMRbFddcqempXwT0DDHLnFEvJ9kM
|
||||
9VcVHbzw==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwJh-0005jD-Dj; Sun, 11 Nov 2018 20:26:45 +0000
|
||||
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHw-0002cc-12; Sun, 11 Nov 2018 20:24:56 +0000
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
|
||||
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
|
||||
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
|
||||
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
|
||||
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
|
||||
bh=9cNmmn25bR2zeN1vbgdjE8/Y0JXpSDhSkPM5GZxTcOo=; b=mF/YFu0vAFm8Cr1Ty9Lek+w6Y
|
||||
8FRR01cy8fLjmnnNz+SVBTeEx6C/eTg7Q8SLdeJR6ql3cIeepC0WkIWJnFUCdWJ7fDkL5686pgjS7
|
||||
2+4K5o5D1t8yank/9kA464gHTrwO0u4FUse+XWEoSPiET3SmZXXsHAQkBgfzIh2gyckpB0wir7K6h
|
||||
tY5UPKoEDSbOa7uFKvARA6LA+0p+LS3mrZMFPQedoC0Uir/fMY8YYdY2Pc+vMi2nPXQ9LJ0fQ1dSe
|
||||
wqYoeLdrTYjWL2XRMPohx95JxWvxfmgEhxXIFm6RFJvO9WItczYLy90wYmLHBvv9vyVUTo+nsLmvK
|
||||
/EjccIV6w==;
|
||||
Received: from mout.kundenserver.de ([212.227.126.130])
|
||||
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHt-0001en-8D; Sun, 11 Nov 2018 20:24:54 +0000
|
||||
Received: from localhost.localdomain ([37.4.249.153]) by
|
||||
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
|
||||
id 1Mw9oq-1fWAVX1zBk-00s3Fm; Sun, 11 Nov 2018 21:24:31 +0100
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Ulf Hansson <ulf.hansson@linaro.org>
|
||||
Subject: [PATCH V2 3/7] mmc: bcm2835: Release DMA channel on driver unload
|
||||
Date: Sun, 11 Nov 2018 21:23:55 +0100
|
||||
Message-Id: <1541967839-2847-4-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Provags-ID: V03:K1:vlovEOP4OCkjuj6JaOkYwfmgG3Bal1ftfBxnk4DH9YyAICNcm4/
|
||||
BpDpxF7lig5Fm91zl9duBF8Z2zsadWWX/cwUNHvjuCQzK6hM1miYmPrje9c2so98xLmVH42
|
||||
HbkSAtFcHSGlfkxFrEQpCHQq6PbLfHsRrCjnzfeVe04uliFFd5uM+615obhLT+kxiXePpJc
|
||||
itTAXDImHIb6ZbKx/ZkrA==
|
||||
X-UI-Out-Filterresults: notjunk:1;V01:K0:SzTlMsQfrIw=:CfsWr+obS+SWBvm2OG7mgE
|
||||
HaKV29VvbZWHeGysa26FcFnpU/aMj/f1Gy1jD4K8dNbWm7JFhBgARL7w82/dLGaTZym+NfdIf
|
||||
JejZEUwNxdLoJ2pl9V/bfXHUF+NpmE29dvPnKgjRwO9sNfSPkcGWIwbAQm/ZpwBet+X3duzf4
|
||||
3adSNuB6XHBEOognFdCt37nQs+pw397+jTcb4ATjYcbgok5ftyg9PBBRivJdBXxY3nZeZagWL
|
||||
CQgDJv3jE8CEh1BPz/+UOxgAiV4Qmm6pirXi4NJ75cuHyWmhJBlWTNLxv2ocWyMD5c/korqqf
|
||||
D61K0VeaRoL1EfiZ2pzJ9T/Do4lOYybMUWDQmeEMVN8pS9hv14rn98GqoOKydOW3jpPa7pZeu
|
||||
5sc8I2WO6wSk/VOaNclHgKHyeS+zmGMMRMweDF1bkrMKIh+rdxd+zGN54JEEI+/AWWJ5p4nNw
|
||||
0ob2FknCr0jsNWv7JUc3tQkjTxSnXD0gG/bdvnl9BQUPGwz683hyzdM6Gk31NuSk7JU/NOnzr
|
||||
M3s6ysweEdzDS+wPOU9UBk5GcSxcGdlqvBN600TVgpUtaC9dwjVMk3qEot2fSp17KAUsrUaGz
|
||||
YZz7fpiyWVZzj7dgOGvQ+SgjTs/8s4rj++ONlTl2OUtmp9eDw+/bsmML5z4nvQ0oLxKIDKRML
|
||||
RMzjm6bjLc9KE6PagbagQbLHzPLziYIEkpEZmThm3Mm5oyTsh0l+ZD2hVE5yDtWVcz4wnNwbV
|
||||
J1DxWtcAdy8X6WtYT27Eh7LxL2C8YyVtMRL3whClSs0RyGv3s3oe+qwqKa0rjtQDSAjosT651
|
||||
gj54/sr39E84c9qNWL2IQmKZJs8rw==
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20181111_152453_636383_8A225C26
|
||||
X-CRM114-Status: GOOD ( 10.02 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Phil Elwell <phil@raspberrypi.org>,
|
||||
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
|
||||
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
We need to release the slave DMA channel during driver unload.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
drivers/mmc/host/bcm2835.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
|
||||
index a251be2..45724ef 100644
|
||||
--- a/drivers/mmc/host/bcm2835.c
|
||||
+++ b/drivers/mmc/host/bcm2835.c
|
||||
@@ -1457,6 +1457,9 @@ static int bcm2835_remove(struct platform_device *pdev)
|
||||
cancel_work_sync(&host->dma_work);
|
||||
cancel_delayed_work_sync(&host->timeout_work);
|
||||
|
||||
+ if (host->dma_chan_rxtx)
|
||||
+ dma_release_channel(host->dma_chan_rxtx);
|
||||
+
|
||||
mmc_free_host(host->mmc);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
|
||||
From patchwork Sun Nov 11 20:23:56 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10677851
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E68D14BD
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:23 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90CA42969C
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:23 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 8516B296F9; Sun, 11 Nov 2018 20:25:23 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A73F2969C
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:23 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=w/Gzy1FdXFoZZY/Bdgo4ocm33xnvBLknyOEQrYDJjx8=; b=AnOOH/JlAJanb/zGv8Tbhr5LUU
|
||||
zhx/OjHDpTA+1ZN4gwSeeDWVgEHvlQ5b700sWdpjiUYxzkXMAtqOBCK20C8Cz7VIX9OtfFjhm43QL
|
||||
Xn2eIdUXsmnEjJ4vN+c2GJ200/15T1/0eGCESCALXHcN5dVIfQTEXzzhuCLfDTra0py+5hc8tXRiZ
|
||||
VeEkvMwNwmyYOMh7qoN4/GtOx96Y+Swupzns5QIJnWRuyu4kcFPTRiRQI7vOLJb6ahc53c/VWEGn5
|
||||
CQKE7XPssSzcb8TnIRBhX5ChXO5V5J7hV8I6Mo467mbYpK1W7LtEkplA2JhZKcRJ3PkFXIya3Plqp
|
||||
gLf70yzQ==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwIE-0003TU-1P; Sun, 11 Nov 2018 20:25:14 +0000
|
||||
Received: from casper.infradead.org ([2001:8b0:10b:1236::1])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHv-0002cV-24; Sun, 11 Nov 2018 20:24:55 +0000
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date:
|
||||
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
|
||||
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
|
||||
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
|
||||
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
|
||||
bh=zHxxLEQsiHEhh7PVXEVNqUUxYM7wDjcAIJtcwJyNRQo=; b=DOPYo4t1y5vxpvZmFdW6hMyoZ
|
||||
pBOQEji74bYHR5OwkWKuoDPpZlQiQRU21mZwp08MZHufSo0j5CcZapSY9kRCb5KszFqO98vRCYDCW
|
||||
XP8SZxnfZV1eZ8OEGp82f8cQzrGl2FOpjKZNP1KX+0w2ibjMqcqZHppwTME1L96PAqzdexyzWJdGd
|
||||
ofA4EK/v+6FQohG4RSPQX465ZGIiui3r/C1O0WKGVim2eK+cE1wVK88X+rhHk1BoNRP/5MOpaX/v3
|
||||
O51RexHgFZ+0YlkVQTCb/Zfgd93BZb5XL/ewyaDlkmVuqCpSWOgj5jgrSkad88yRtx9A29PIbzWdB
|
||||
JahBPzjOA==;
|
||||
Received: from mout.kundenserver.de ([212.227.126.187])
|
||||
by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHr-000149-RY; Sun, 11 Nov 2018 20:24:53 +0000
|
||||
Received: from localhost.localdomain ([37.4.249.153]) by
|
||||
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
|
||||
id 1MvsyF-1fX0UR1Q9v-00ssSz; Sun, 11 Nov 2018 21:24:32 +0100
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Ulf Hansson <ulf.hansson@linaro.org>
|
||||
Subject: [PATCH V2 4/7] mmc: bcm2835: Avoid possible races on data requests
|
||||
Date: Sun, 11 Nov 2018 21:23:56 +0100
|
||||
Message-Id: <1541967839-2847-5-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Provags-ID: V03:K1:ZLc6V0DmkpQIP44hYwa3HseRh7CvRoA9oKdzKs8yIsk8165B4Wj
|
||||
xh/v/qDrvpHbc6Mo7+ESlJoA7iV2QBpKIYXkV+l+LxP1hUGn0iO44fmLP2qBvLJtZvx/Ojh
|
||||
06wOufM/u9ZWw0FVd6z87NbwhQC+r0Hdx+GWumlgWYq9lppFAMYe+6pIqLKFwesssADK3OS
|
||||
0MJwlz/he/7bB9DxhEcnw==
|
||||
X-UI-Out-Filterresults: notjunk:1;V01:K0:lLFqbCq1JEc=:4dOYlMJrif5X850MHJ4IKv
|
||||
SsggGIkb+7xoay8mJWO2ixu2r0n0ZJp/p5GCqVWB8a8GEJ5AXj04izOlxindxB0yxAXLfOtEY
|
||||
+MADRnLwkXLIyvJ52YOhbudb4v+KVS8LnZmdnl+7dYi8ILPPI8K1YyOA0Atm0Sc1zKCyzyrb+
|
||||
HXYtIBmpCCeoXAn6iF9KtPShMQN90JkCkhQDCTtvuHKB4+XasgiJQqwLvDbMhUTfAiHKRbT6A
|
||||
Ret67MCTcoBZMJ8Lv5IVe96pGyj6/IftFJwD456d201u/qlGUEcsrQlXoVDZyYQINncWlmCe9
|
||||
nhfpQF8UozqPck8kat7pUYNcoUck660Ob7tS+eW6IQxtgNKjjkiaYgE0VlcnBWXS46anJouuq
|
||||
rFWawTXHFsLU6SVpIIVC5wCmDIOpgnWg2E5Dg6O3JtD4JPpSw9V3hM8L34Ii6DfWsvPAlJ46O
|
||||
kCFiB/zfxUDXTLqed/nM9eufpPmQGlkRVnwoBNh18c7patPv1MzAU94KuN0ciq4QgoPk400rI
|
||||
5AOu/Eb9ck9CqDcZnI9x3PGjBoRgf0O/cvmqP67kgt1u17W9OEGaqHaEkXh+xLTDICpauVWMp
|
||||
kOXBFyQ2SWK4jxt/C1uNgcghWG4r8UDxx9LFHZA0Ut2oGO2bW8qkpXlRBI11lvMuK3P+jSSXu
|
||||
8ZdD0IA/lvl6PXMOo1Zs7F+mho7h8yoB6XvVBOO8Mh8VonIPfeFZAQOrF/WP5SI3te/r5jk8v
|
||||
wI7Eoz+v7SK4TMhwvTrIv+Q6zGYykDWUFqpehDe/ZhMpdl/XnD0H+Z9jGWgv6Wyi6Rmwc2JEJ
|
||||
6Xq84VFzxbb0yps5VJcK6at8C/JGA==
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20181111_202451_956461_704341B1
|
||||
X-CRM114-Status: GOOD ( 11.96 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Phil Elwell <phil@raspberrypi.org>,
|
||||
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
|
||||
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
There are two accesses on the data requests which are not protected by
|
||||
the mutex. So fix this accordingly.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
drivers/mmc/host/bcm2835.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
|
||||
index 45724ef..1c60798 100644
|
||||
--- a/drivers/mmc/host/bcm2835.c
|
||||
+++ b/drivers/mmc/host/bcm2835.c
|
||||
@@ -1064,10 +1064,12 @@ static void bcm2835_dma_complete_work(struct work_struct *work)
|
||||
{
|
||||
struct bcm2835_host *host =
|
||||
container_of(work, struct bcm2835_host, dma_work);
|
||||
- struct mmc_data *data = host->data;
|
||||
+ struct mmc_data *data;
|
||||
|
||||
mutex_lock(&host->mutex);
|
||||
|
||||
+ data = host->data;
|
||||
+
|
||||
if (host->dma_chan) {
|
||||
dma_unmap_sg(host->dma_chan->device->dev,
|
||||
data->sg, data->sg_len,
|
||||
@@ -1192,9 +1194,6 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||
return;
|
||||
}
|
||||
|
||||
- if (host->use_dma && mrq->data && (mrq->data->blocks > PIO_THRESHOLD))
|
||||
- bcm2835_prepare_dma(host, mrq->data);
|
||||
-
|
||||
mutex_lock(&host->mutex);
|
||||
|
||||
WARN_ON(host->mrq);
|
||||
@@ -1218,6 +1217,9 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (host->use_dma && mrq->data && (mrq->data->blocks > PIO_THRESHOLD))
|
||||
+ bcm2835_prepare_dma(host, mrq->data);
|
||||
+
|
||||
host->use_sbc = !!mrq->sbc && host->mrq->data &&
|
||||
(host->mrq->data->flags & MMC_DATA_READ);
|
||||
if (host->use_sbc) {
|
||||
|
||||
From patchwork Sun Nov 11 20:23:57 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10677855
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B72A114BD
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:55 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8FBF2969C
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:55 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 9BA4C296F9; Sun, 11 Nov 2018 20:25:55 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3E5132969C
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:55 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=MrabV/LatQSzA8nWJUbmpw6Z66+qt6yLE3DwaiTeQME=; b=C6Tp4s3/ByUA6gEAyLZXReuA6C
|
||||
id+fWgoxsQzr2ckrLAgv48ru1ay5ieY89k0dCyY21EmJ+7DdHsVtlf8AU/pp7zc2v8WXZVjGc0Wre
|
||||
YFPO0X47D1Ph+jrOAJ4EldEXPIk7KudaNJMF85Kayhvj4ehjIH10qF4pNR/GnBs5K4TVn0fqm5wkL
|
||||
qXh8X60lZ8wzc/1kwor55UBVg6KsCr9RWAKxqVzvsq18LS5kgCLj32wFbWPdHWqEYYdMktOZnA+TZ
|
||||
3yAKeFvxhZStgwUorKa3+KsbHzV7DRegF+0oVmQTR7IDEwQ7bsAjkCLS8MlMcgIBJbaIm70mraboJ
|
||||
vf7ML3xg==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwIk-0004lM-CU; Sun, 11 Nov 2018 20:25:46 +0000
|
||||
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHv-0002cW-I3; Sun, 11 Nov 2018 20:24:55 +0000
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
|
||||
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
|
||||
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
|
||||
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
|
||||
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
|
||||
bh=Mk5UAGVXcnL2nHBZi5EjPPjTnNXOrWMlTyZHVyM9yOc=; b=b2656ew26XY6iOFE1AUGP51qB
|
||||
FsWiQqitmJrrBacXDcwxx4b77oSYgvwb2wnBa7LE5GPdb48OBeCpb++0pRdU6LH1mLGY75l+SJkTE
|
||||
fuEGG9nI+c7ylMsmuHzyIug+IcRMttr9Rv+lguVfxj+05E3Mug1Yjde0yV4DeeaDQcrcBW+cDxPD+
|
||||
zBUTdh155DbVSr//DRSSJT3w5iirXL6DmNZX9aH6RIz8prxs5PBfYuAKmZD3JkHHBosP2MuOzyfCN
|
||||
UW3Jmr2T/p8nGj4c5ZgHVcwtYTZ8zbEVSNSshLyLCmRvAvbWw9R7i04nOAZFMDwJ+nJrAOzc4JEyR
|
||||
Bd0redZPw==;
|
||||
Received: from mout.kundenserver.de ([212.227.126.133])
|
||||
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHs-0001ej-CS; Sun, 11 Nov 2018 20:24:53 +0000
|
||||
Received: from localhost.localdomain ([37.4.249.153]) by
|
||||
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
|
||||
id 1MMY9X-1g6LF00fdn-00JXiP; Sun, 11 Nov 2018 21:24:33 +0100
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Ulf Hansson <ulf.hansson@linaro.org>
|
||||
Subject: [PATCH V2 5/7] mmc: bcm2835: Terminate timeout work synchronously
|
||||
Date: Sun, 11 Nov 2018 21:23:57 +0100
|
||||
Message-Id: <1541967839-2847-6-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Provags-ID: V03:K1:qNd5m8hilSIHpAhx5FhJUiaXDU7SU8xPGLPlkrJoWXv/UllNu+f
|
||||
Z6MfgrWvjWpqxWfwowcV/8ImoMmyMh4JRxG2YbMxQXqKPs3IgT+uHUy/D8FHMMViil6gbjf
|
||||
tQPTiuVKuzVualYbGsrj61hk9tmirGv3Idxmj6a5LmZWyqtBs+N/8+IESPXYZMMNePlqxh4
|
||||
Dqnr1Ar9jhW2oYDHZeh4A==
|
||||
X-UI-Out-Filterresults: notjunk:1;V01:K0:lvp7zKY2iuQ=:cBGp0NsOhdh4ZLCUkdL5pd
|
||||
uZpSd0EXrWC/HNHCOrfgI5jErdtk8h8bAwHGFF9C12HB/cUTzhg8wPJL9Xy0yp40Hs6nh6qll
|
||||
nIxKPiI2SHgGyMJojMc+SCNU4d0lbz36f5Eh2YngDbtaLgefteqUbZpEuWXdA5NHOoMAYj5GA
|
||||
U7askfAl7jnbS6fpM/9Fr50J+y5g2WFb7g6Fb60eEWTi7qouSNuq/IsrOBhrOT1tgwZD3Tjxc
|
||||
eCiIOvl8/12erXTfgm0ld79P12beE0yt8px7lBlfmStsDN2xbDUTVH8H9zhn34lSWULZ/oYvB
|
||||
3B/areZj3M0dZCZCRghHQ+/H9RLNAbWOai7+H5GS3Uf9RqKrw9aaFmoTuSEbdma2a3I5N+/W0
|
||||
Wm+CxBBaV9fdVveQggOChcuux8o+VuyD1rEAE+25VrkUbsKntB+EVRkUUbnCG84nOx3JxnQ9q
|
||||
aUnhYzwvOZecim21D5c60r/iU304m4B7jNCzfLmW1LWjLRyqJOaR7iwZQq7D+wBFKHiJLLsSj
|
||||
ecNx1ABuG5R7WWdp1fC717kyGF0LrB6D4Z6t+Sv8jJhpQaEXVvti+oeKsNkydEekDki5paUFn
|
||||
d1V91g9p1g4VRyPDDin4g5ZjvBEG5MxJbL84GTRzesrCj0QthiZp6Il75PHRbXdgXXPg7RdzA
|
||||
lnIcwMWrcb7sBYl9phazVWbZu4I2V+FSEMbvxVQ/Bc0K1p3pQ22LpI99JhQ178HMQvbPD6bJC
|
||||
4ZIfHltA0+uOLgTG5XlOf8q+ra/Qfb1BzFhSsTv0nxcqcl1nqMFKGcG1mxVGJxSQhj7SyZkDC
|
||||
ZNz0RUD94sGnsvkbhrtAMV7E/sbeQ==
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20181111_152452_685437_9729AF90
|
||||
X-CRM114-Status: GOOD ( 11.39 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Phil Elwell <phil@raspberrypi.org>,
|
||||
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
|
||||
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
It's better to make sure that the timeout work is really terminated
|
||||
before calling mmc_request_done.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
drivers/mmc/host/bcm2835.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
|
||||
index 1c60798..2c7589f 100644
|
||||
--- a/drivers/mmc/host/bcm2835.c
|
||||
+++ b/drivers/mmc/host/bcm2835.c
|
||||
@@ -608,7 +608,7 @@ static void bcm2835_finish_request(struct bcm2835_host *host)
|
||||
struct dma_chan *terminate_chan = NULL;
|
||||
struct mmc_request *mrq;
|
||||
|
||||
- cancel_delayed_work(&host->timeout_work);
|
||||
+ cancel_delayed_work_sync(&host->timeout_work);
|
||||
|
||||
mrq = host->mrq;
|
||||
|
||||
|
||||
From patchwork Sun Nov 11 20:23:58 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10677853
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8F61139B
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:31 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABACE2969C
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:31 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 9FBC6296F9; Sun, 11 Nov 2018 20:25:31 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A58B2969C
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:25:31 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=hLouXFNypHlFaQAINMwgzkBeirVP1RY0gAHWHAnuLpo=; b=rmTlZsugtWGOssKkbRRBUkkaMC
|
||||
1KnpesZRiXcQ3pdco/0rDLTQmYxTCEUjV4xsBFaLiaoMeezFdRRBXGZeSPhk38338Y976XJ4cVMz2
|
||||
XEbMflV3FhK8eHtirh7evoVdHR93K8s2TnFG5umUjZP9CNK6jB1uaKvNeOQt7ysjNFYI/o6mSAWQ8
|
||||
96SikljKpBqFYT7sfjGMWWxEneZVIcw0uQMa+gaOxVIiXtG4BrxHOs3Fw9RjRuZ5eKEU1p3gCQVbu
|
||||
XbZW1eUFOHav2KoX7nPYCjHgWhH6YwMTgEBBAnxobbfRHrCEpD9qTd5jujkCLDGdlUfcIs0x0gwMY
|
||||
NVzKWO6w==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwIR-0004Ov-6u; Sun, 11 Nov 2018 20:25:27 +0000
|
||||
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHv-0002cX-I3; Sun, 11 Nov 2018 20:24:55 +0000
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
|
||||
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
|
||||
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
|
||||
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
|
||||
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
|
||||
bh=EGvrhwUaJ7ExcJvbLK8/AQ0rd/CXDt+a3em7ick8oO0=; b=hfLWj/nwTsxPLUALv1QKEYerW
|
||||
kjTYzuw+nLWWi3Jmk4P9vRYMn7+DaGgrbi72/tY2ByngSSImu0PrCS8lm9Ptuq6yXd6tYsNVfzM2v
|
||||
rmYwqdSBQg1JTzAY2Z9nFvV3PB1XFF36Lt1oFlkORRtQJSII2YZBaRJeyhjLpTqzBUwi4KgcWj56K
|
||||
R6ymka+uGJPQ+KHwaOaS67glzE2ADOBMchS7gZu6WtPJEtwU5d7FMyWWPFV7PM4wKFS5Mkk59+9ee
|
||||
hj7e7Zi/7YhnCEfVfZf7C6h6ejiW9YdnMadgdZttuh9DdLGUYVyGszdcNAwmEbpJUSvqM0MxYOBG7
|
||||
/ZftqWKLA==;
|
||||
Received: from mout.kundenserver.de ([212.227.126.130])
|
||||
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHs-0001em-CO; Sun, 11 Nov 2018 20:24:53 +0000
|
||||
Received: from localhost.localdomain ([37.4.249.153]) by
|
||||
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
|
||||
id 1MvsyF-1fX0UQ3835-00ssSz; Sun, 11 Nov 2018 21:24:33 +0100
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Ulf Hansson <ulf.hansson@linaro.org>
|
||||
Subject: [PATCH V2 6/7] mmc: bcm2835: Refactor dma_map_sg handling
|
||||
Date: Sun, 11 Nov 2018 21:23:58 +0100
|
||||
Message-Id: <1541967839-2847-7-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Provags-ID: V03:K1:Sla5WKzJYGbilks4eIirHiMlx29aYsbN7KwNBzyZekQFCAy53V8
|
||||
1SG4Lh3Be8yGw2tWhcGIWU4+p6Ui+o/TdYr+msz83Y0Sz252M6RAloy6wfmI9j/ONOhpARN
|
||||
+Df5870IhZ0IcFsZwP4UNPyitLHHEtB7F0h3fH1ljMmy4qfxVgId5TqXkESoEci3lMhK7jI
|
||||
tJt2agPN6ETkDIC1k0S1Q==
|
||||
X-UI-Out-Filterresults: notjunk:1;V01:K0:SUFly36V7h8=:Vbqq6FwnjjUoAgvV8E+dwd
|
||||
bvly0MobT7aTFxA6S7rJV76JrzK5Re4JsOiUl+7WNjHC+DT2hjNquy1oxd711UcXEAOqmPFAy
|
||||
OJDhIHqS7UAkipQ25kMVV+BUFSDtsYwZhfhJUWMjETSgSOajgeWoTywu70K5P4OAAASvrVwUb
|
||||
5TED1Vlj0n4fcrmLZdSEpborCiHk3YNdLhHxo7AG1BES3nZGoIOGVdoJ46ueOSmNZlp0owl9C
|
||||
M6Ojk98PRUoV+3jn1od8MDRUazJRG187IGTG+1VZESWHn7IZveLNLhDzy9+pchAhovgwQnFhL
|
||||
7cEt1VIJEk2QWc/pp3PrNUoQCHOI5lull8+TfBIrkPFQShcmEsXvtJ6xW70m7LKvLB1hQyGue
|
||||
51kaIx86/7KW5bKnONR8GsPRhAaPWpNwJGk0sl8QgnahjcjoSc5V1pcb41Zxsikmxh/zy3bUA
|
||||
93kQOzW2tjR1yw/Ppz+A2pvnad6QRY2pxB6+t2MJdrZTc4LZGCE7kTqYpoV40uPFTb9VNxhJK
|
||||
fhNmDEgLBtlKz7usJIQXHfrsvC/0r0Efs194mqEs0U8S5C/ip+SYxzdNqy7950R3erQQJ4ABy
|
||||
87xgLsDdOxe4m9f0ncvU1pd6Ys03Hw9vN4IKH11GptHYaTkZeCF5YTS6I+rIjI+6s8cB5AUV+
|
||||
ZdjGUkrqxgkOsWgD1WRTl0+ejxE6GWxX+gsLRlzis74GhO5+V2G/x5/A9oPGp5YsT9ZzqWRb4
|
||||
qP502rMnCPihAEgYTtgKeezNgBny3yQT+LvwXEj4gaeiyNOn/d7082ZRkf0TNexaK77RI3zqH
|
||||
C4R9zEnu6vgo7DndG6z+zIAO1Ihxg==
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20181111_152452_682340_CD00EDF2
|
||||
X-CRM114-Status: GOOD ( 12.64 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Phil Elwell <phil@raspberrypi.org>,
|
||||
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
|
||||
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
There are two variables len within bcm2835_prepare_dma. So rename the result
|
||||
of dma_map_sg to sg_len. While we are at this add a bail out to simplify the
|
||||
following change.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
drivers/mmc/host/bcm2835.c | 16 +++++++---------
|
||||
1 file changed, 7 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
|
||||
index 2c7589f..c42bdaa 100644
|
||||
--- a/drivers/mmc/host/bcm2835.c
|
||||
+++ b/drivers/mmc/host/bcm2835.c
|
||||
@@ -464,7 +464,7 @@ static void bcm2835_transfer_pio(struct bcm2835_host *host)
|
||||
static
|
||||
void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
|
||||
{
|
||||
- int len, dir_data, dir_slave;
|
||||
+ int sg_len, dir_data, dir_slave;
|
||||
struct dma_async_tx_descriptor *desc = NULL;
|
||||
struct dma_chan *dma_chan;
|
||||
|
||||
@@ -510,15 +510,13 @@ void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
|
||||
&host->dma_cfg_rx :
|
||||
&host->dma_cfg_tx);
|
||||
|
||||
- len = dma_map_sg(dma_chan->device->dev, data->sg, data->sg_len,
|
||||
- dir_data);
|
||||
+ sg_len = dma_map_sg(dma_chan->device->dev, data->sg, data->sg_len,
|
||||
+ dir_data);
|
||||
+ if (!sg_len)
|
||||
+ return;
|
||||
|
||||
- if (len > 0) {
|
||||
- desc = dmaengine_prep_slave_sg(dma_chan, data->sg,
|
||||
- len, dir_slave,
|
||||
- DMA_PREP_INTERRUPT |
|
||||
- DMA_CTRL_ACK);
|
||||
- }
|
||||
+ desc = dmaengine_prep_slave_sg(dma_chan, data->sg, sg_len, dir_slave,
|
||||
+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
|
||||
|
||||
if (desc) {
|
||||
desc->callback = bcm2835_dma_complete;
|
||||
|
||||
From patchwork Sun Nov 11 20:23:59 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10677863
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D4A8139B
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:27:08 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EABA296EB
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:27:08 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 1FAB5296FF; Sun, 11 Nov 2018 20:27:08 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C63FC296EB
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Sun, 11 Nov 2018 20:27:07 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=w0gGu0RhdppnbHj+KC4eiYbqQi5jIFFj1vOCHvG7izk=; b=tSzVsJXA7bK2/gIIVp574/SFNR
|
||||
BgvzhxZLA/OEkfPjbtzn6g7PhFHNYCY2tQT1NfP01NxDvDzgZB5TEcCqtrdjkJY0i0hpHS4Ex0SKr
|
||||
oIYr7vZFZc3vcWcO/KC3Kmo+a6lT7nBNDddf/cXDJPS/+jOqm/QCf5ho2YvSATxAnxwgnSi60ZaUO
|
||||
pr/6gai+PjYKpQFZOL6myQ0sWfTTlc1l2KdBGjXV/FLp6EVuwbVOO3xUNJ1ZRnY8Ku/4Hq7tVTYWO
|
||||
oO45AJ1T+qe7lz9G/rfVbqXsnK8JZyhgubhZJXPRWAvoOGj1HIYGAwyOM4bKBfJn6LnKp6+bosthz
|
||||
AN9aGK6g==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwK1-00061u-1u; Sun, 11 Nov 2018 20:27:05 +0000
|
||||
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHw-0002d9-OE; Sun, 11 Nov 2018 20:24:56 +0000
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
|
||||
Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type:
|
||||
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
|
||||
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
|
||||
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
|
||||
bh=6Y3NNECHfTEnbE17TZ4lEpf9LD6uJsc6TH5WZfUfuzk=; b=HvhoptR8U2ubhwrWMzaTVnGQy
|
||||
II2zx46KApZRWsxtYONLMA5cwNuCa0IlO7pyZ2xzkmkvg3l9zY9tw0FIFvHHLhMUBT2QfLdXX47QA
|
||||
4IwFzcW0ZPkm1/jCaDHb+fjCb+4AHHBAae4C6MrN7+a6ykIfhqgPkEfTtZGdhAnxrTbMDTMhgqs3I
|
||||
bSMEifAlxhV0ZMu8SNVAZNB1lgRsdsdgdcBY/t248mQgHc6o2D2ibCGnSYHMy8xjLjNIN2UHatXZf
|
||||
O+ebwk3ljy5b6FcEOHgg0bOh3eTwjGlbh9jR06jAx95wa7gOJG7bJO2mLb1Q0TEg4O/jdMmSzmKZf
|
||||
bnQ+8cx4A==;
|
||||
Received: from mout.kundenserver.de ([212.227.126.135])
|
||||
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gLwHt-0001eo-Ny; Sun, 11 Nov 2018 20:24:54 +0000
|
||||
Received: from localhost.localdomain ([37.4.249.153]) by
|
||||
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
|
||||
id 1Mw9oq-1fWB8w1OlA-00s3Fm; Sun, 11 Nov 2018 21:24:34 +0100
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
To: Eric Anholt <eric@anholt.net>, Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Ulf Hansson <ulf.hansson@linaro.org>
|
||||
Subject: [PATCH V2 7/7] mmc: bcm2835: Properly handle dmaengine_prep_slave_sg
|
||||
Date: Sun, 11 Nov 2018 21:23:59 +0100
|
||||
Message-Id: <1541967839-2847-8-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
References: <1541967839-2847-1-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Provags-ID: V03:K1:YHuOF9ODbnoju/fZ6GEvx8dgsERlCPgAFKTWXLdnneRYXz5Rrwv
|
||||
HmNp+EMMG4LCQ6yrw9geiQ8UMaSlKRlOogmYpjlT6+acj6AvpUhfV/V/QTZoIqWymmOLu00
|
||||
ilWzNp6sUh0G36dYFqNQx/xxoevvSshDkQfngYwW4IylOJ5Ijw4q7mUNQJel0aDdT6VxcCF
|
||||
vNXPaH6x5aju6BnVQQTZw==
|
||||
X-UI-Out-Filterresults: notjunk:1;V01:K0:F8RnfZXOXFg=:/o9BXYY1XlPda36fnQR3pw
|
||||
exiC7Lebj6iLmcKcGV1N+gYxVKa++UCwnlYE52iQ3aEq2FFOYc9MIGfKSXztp6aQJLMEcJ+Nl
|
||||
Y6IvfEO9Wre/kOJHLSbnLgi5rdaSTR4mjKUA8jP7+hgmHvgkSbKeQPPA9NbLPN9j2p/jPQt6j
|
||||
wWducLkOGSbZ5YW28XqMqKiEgyxjt72W7Ulgwt1l9fzu67fxmhDdc3UWHpofqHuJQ3dTz7iyH
|
||||
kgg+rS8NAKZBCtm6dFRPHs5TFa1D75bGQE9WbGv828i+/KNpsIoAbBRLLRmeGAoFn+KRil/PA
|
||||
2NEyeFtr8QO/DsyVQUofQeZgtDmWXquT6il4a9R21nFM8UVN72Lt47MR7dQIKfjtCewO1XhKp
|
||||
aCAhoeqoKuI++NlYUmTAzwHyR1AzSqbz3qFLL669z219gmvjFFlmzCiNNQuixrhw3CvbXxywa
|
||||
F8FFVxEdPJRjt5v5xsfEQ9kWNm/UneKmSuw+sOIM6NjTYMbCxUA8s/SReuQtco4vZ5fMk2a0E
|
||||
H6WbLHlCpPoxm6106p29jhQ1MkQBcRRc/Gnr283sXcshS2idax1s/BXgEYWoqn1IXoSipmSRS
|
||||
uO7fLBnuonw9uYoUm30LeVzea9BSFsXSJQUAXYoj0FC51hOHYQG6yaC1EoGnL13niwbOV1w3V
|
||||
t7MsLAFqvse4jRXAQ2daRMVsoFeXyREOFlyM2u0kJ7SlglZ7O0HJNvOHJsOTEJBUDsCQQskjd
|
||||
UPyZ9p8NHWMKpnE18BgSypX/UwcNIarGvkM8pe6BN+IN6YbM+3leikxVVZ7pD64qCCITVHvjt
|
||||
SkzE3mpbb2hZZ/3vD8VryvQAJ4A0Q==
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20181111_152453_987059_DF242521
|
||||
X-CRM114-Status: GOOD ( 10.37 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Phil Elwell <phil@raspberrypi.org>,
|
||||
linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
|
||||
Michal Suchanek <msuchanek@suse.de>, linux-arm-kernel@lists.infradead.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
In case dmaengine_prep_slave_sg fails we need to call dma_unmap_sg.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Acked-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/mmc/host/bcm2835.c | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
|
||||
index c42bdaa..82e4b08 100644
|
||||
--- a/drivers/mmc/host/bcm2835.c
|
||||
+++ b/drivers/mmc/host/bcm2835.c
|
||||
@@ -518,13 +518,16 @@ void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
|
||||
desc = dmaengine_prep_slave_sg(dma_chan, data->sg, sg_len, dir_slave,
|
||||
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
|
||||
|
||||
- if (desc) {
|
||||
- desc->callback = bcm2835_dma_complete;
|
||||
- desc->callback_param = host;
|
||||
- host->dma_desc = desc;
|
||||
- host->dma_chan = dma_chan;
|
||||
- host->dma_dir = dir_data;
|
||||
+ if (!desc) {
|
||||
+ dma_unmap_sg(dma_chan->device->dev, data->sg, sg_len, dir_data);
|
||||
+ return;
|
||||
}
|
||||
+
|
||||
+ desc->callback = bcm2835_dma_complete;
|
||||
+ desc->callback_param = host;
|
||||
+ host->dma_desc = desc;
|
||||
+ host->dma_chan = dma_chan;
|
||||
+ host->dma_dir = dir_data;
|
||||
}
|
||||
|
||||
static void bcm2835_start_dma(struct bcm2835_host *host)
|
||||
1761
bcm2835-vc04_services-Improve-driver-load-unload.patch
Normal file
1761
bcm2835-vc04_services-Improve-driver-load-unload.patch
Normal file
File diff suppressed because it is too large
Load diff
630
bcm2836-Improve-VCHIQ-cache-line-size-handling.patch
Normal file
630
bcm2836-Improve-VCHIQ-cache-line-size-handling.patch
Normal file
|
|
@ -0,0 +1,630 @@
|
|||
From patchwork Mon Sep 17 08:22:22 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Phil Elwell <phil@raspberrypi.org>
|
||||
X-Patchwork-Id: 10602175
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25D5E1508
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:24:30 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16B1D26256
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:24:30 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 0AA1627F86; Mon, 17 Sep 2018 08:24:30 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8457326256
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:24:29 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help:
|
||||
List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To:
|
||||
Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:
|
||||
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
|
||||
List-Owner; bh=hI/rkOHYLw6EFdgFyOZP5dMv2/ZTgGadMbPyZJmLpTc=; b=eZHlangjy/aXd9
|
||||
xXj4Z+LS7RpoPK1fkoc37gkSBmRem5J0cSGe991FI/y452vB6mqT7ufhiTvGIeEmWU8A6cLGRABQP
|
||||
fF4tvI39ztdvL2mHtLdNC9JRvYtw4haVuS5/LpkOoRCb5+ASym0RhvhxRCNVHAQLkg63aHTmHxU/P
|
||||
uxSfy8T9cJwM8xXEQf8t6o88URzbsLQpXak2x6RRD5gdMWl2qIRCGuM8aLcVRVWdW2X8Zgom/L8Md
|
||||
DAqYno1/RLlowIplhQvoSfTgoT+If2IZF3aYXp7neKn/ztdpZ+Usk8z3R4LyQvpG/NS8/LNRDkOez
|
||||
MJhH2HBomJzgPwW4yiyw==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1opO-0005xT-Iz; Mon, 17 Sep 2018 08:24:18 +0000
|
||||
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1ooJ-0005Wn-90
|
||||
for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Sep 2018 08:23:11 +0000
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
|
||||
Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type:
|
||||
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
|
||||
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
|
||||
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
|
||||
bh=709kHRsgmnXd9YV1xoNMc1/aV4Xi/GYEdBYatqJnxII=; b=3Fh7sAF30uEjFVIokmsPp9aFa
|
||||
dnvHs47JPnGnrZ6drQ65LjwPaLp7mZWUnnLRsx8NCIJXbG8ja4rz7ubFLekczmXpMp7kx+vp4GLX+
|
||||
MQZ6Fkd8khgYkVyWVZJwvZXyjMJCLU40cSfPH+rwj2aE4Bsjkrm3gyYqTucdIaWGrmIKEddpvvUoj
|
||||
gijSvNPe4wZ6F3B/OxGyQwY68rQ8e16MWFdQvF+m8r6hAzk1PjQfgh1U22DXRea5oDFVVfV8uFGPF
|
||||
Mt87EyYei0srCrhHGpb1PeHXO4n7UkdGrKHItd7RQfQn9B29yw6yQMSMaEo9zTbpf7a9OgKbJ/jMB
|
||||
jVfQIRXhg==;
|
||||
Received: from mx07-00252a01.pphosted.com ([62.209.51.214])
|
||||
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1ooA-0001aP-0d
|
||||
for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 08:23:06 +0000
|
||||
Received: from pps.filterd (m0102628.ppops.net [127.0.0.1])
|
||||
by mx07-00252a01.pphosted.com (8.16.0.23/8.16.0.23) with SMTP id
|
||||
w8H8MU0C024133
|
||||
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:43 +0100
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org;
|
||||
h=from : to :
|
||||
subject : date : message-id : in-reply-to : references; s=pp;
|
||||
bh=709kHRsgmnXd9YV1xoNMc1/aV4Xi/GYEdBYatqJnxII=;
|
||||
b=Xy9adKj2YJ9erCG8FVPBExmDtGihy6MDZ/iSf4J3SdOeXy+Tqf4iDg6DBLJrc17+DYOk
|
||||
G7CpjQSLgraxnF1YGiBjgk7pOimnv39woGoyX6fVY97L4t3lDbf4qdMx5siW/3Wfb4BU
|
||||
jZE1OTowh/4aV9sVCdmLLieaS2SnQWrTI5QW6RGOSZzrSdNfSsEi7T0w0PH8jfIpleHP
|
||||
2o/WRY6P/3U12dgkEOk4dEejQTGAopzYJl9ZJkUZoFXMMimrgxn/J86Eh/Cd7hs4AOrb
|
||||
xFl1QVFffBgVvD4oE094vl/C9gV0F3HHfRc5pTHAvAbXOzLJYQMHkX9c/zXfJ3J/Xgha kQ==
|
||||
Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com
|
||||
[209.85.221.72])
|
||||
by mx07-00252a01.pphosted.com with ESMTP id 2mgw8f0va0-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK)
|
||||
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:43 +0100
|
||||
Received: by mail-wr1-f72.google.com with SMTP id g36-v6so22631044wrd.9
|
||||
for <linux-arm-kernel@lists.infradead.org>;
|
||||
Mon, 17 Sep 2018 01:22:43 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=raspberrypi.org; s=google;
|
||||
h=from:to:subject:date:message-id:in-reply-to:references;
|
||||
bh=709kHRsgmnXd9YV1xoNMc1/aV4Xi/GYEdBYatqJnxII=;
|
||||
b=N6MpqvnqTnIPagi/9P59zuTXf0ho+gbFCEE6jfQYmzcdvGoA5THdZKUVyUyOX+BS5t
|
||||
eodxpyGpb7CZ4wOo/o6Gg/rml2t1OQ3McKMh2t8zP26ITR+L61GLqWseLJt4831yEDE0
|
||||
UE9392fae7t3SnVjq5ojbSmGWMRNPc0RYHT3A08TP+lUsupeI0yuw3+oY1DDFKYdC31E
|
||||
FZfnvjUPjwkGYJo6GVCeyMQIhoWxGMmUkqPOq28WK9woffToeS69koX6AVl7azJ7qAWX
|
||||
xuaAHTyYyjDl3Of9y5GaqPjjoQQd1tY4nz9aW6mLh5QsEx834C3Jg9va8kLQ3Y0gCpAD
|
||||
nVSw==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
|
||||
:references;
|
||||
bh=709kHRsgmnXd9YV1xoNMc1/aV4Xi/GYEdBYatqJnxII=;
|
||||
b=UJHCKLVGminvg0HfeF13uwKYBy5wKpeLZSvZL+F/oep/12zVz6wR9ufer+HQRCOsNc
|
||||
siZjpaTDiMgdv9cYcAmrrkxWWpRQzIqAbvhxk73vxddpr0ymwbHKkm6ycri21KEnHCEu
|
||||
Cm9LpGslmcXtDXM2p83EQx73T9M4SM8Qsa9Zly+qHI8BKHKRm/H52GMXGRgPVtmbzs15
|
||||
jPb8LBJJiOuBCjjVdWAX3hCjkNOprR4NSGQRNvXjVn+UEjwMVdLdbZpqng33DHOtt27Z
|
||||
peJhxLbEg0NXj6QAPEpzUL2L6brBxJga2F3oJsn7i/lCqKn3ndxvvcRMRHF7QXcEMw/K
|
||||
H2Vw==
|
||||
X-Gm-Message-State: APzg51BHcGp99CKU3y/yJll0mWOB/Vkm9WUEqJHCnHDNn8NqTqSE+qpp
|
||||
BgRFpPPLsY2z+3zNd1Bo9dcXQ2dwAO3db9d5vWJQOeZIn3UJUznPvSNKIqrOJWogsHoKeiWPzzP
|
||||
ZSwJFaNOx3FkEva8I1tFQde3LPWn6d+1zM3c=
|
||||
X-Received: by 2002:a5d:4512:: with SMTP id
|
||||
s18-v6mr18187206wrq.82.1537172562500;
|
||||
Mon, 17 Sep 2018 01:22:42 -0700 (PDT)
|
||||
X-Google-Smtp-Source:
|
||||
ANB0VdaiFK6VovMmRM+tnynuIhV35l0Bwr9uiQksEgfZzBhqOIqpV+djM4jUW5g+o6bqN2HLKChxyA==
|
||||
X-Received: by 2002:a5d:4512:: with SMTP id
|
||||
s18-v6mr18187191wrq.82.1537172562269;
|
||||
Mon, 17 Sep 2018 01:22:42 -0700 (PDT)
|
||||
Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:14e2:e2a0:5538:c448])
|
||||
by smtp.gmail.com with ESMTPSA id
|
||||
198-v6sm7938315wmm.0.2018.09.17.01.22.40
|
||||
(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
|
||||
Mon, 17 Sep 2018 01:22:41 -0700 (PDT)
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
To: Rob Herring <robh+dt@kernel.org>, Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
|
||||
Phil Elwell <phil@raspberrypi.org>, devicetree@vger.kernel.org,
|
||||
linux-rpi-kernel@lists.infradead.org,
|
||||
Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
|
||||
linux-arm-kernel@lists.infradead.org,
|
||||
bcm-kernel-feedback-list@broadcom.com, devel@driverdev.osuosl.org
|
||||
Subject: [PATCH v3 2/4] dt-bindings: soc: Document "brcm,bcm2836-vchiq"
|
||||
Date: Mon, 17 Sep 2018 09:22:22 +0100
|
||||
Message-Id: <1537172544-104852-3-git-send-email-phil@raspberrypi.org>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
|
||||
References: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
|
||||
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, ,
|
||||
definitions=2018-09-17_04:, , signatures=0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20180917_042302_769007_3F16157B
|
||||
X-CRM114-Status: GOOD ( 17.25 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
"brcm,bcm2836-vchiq" should be used on BCM2836 and BCM2837 to ensure
|
||||
correct operation.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Reviewed-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
|
||||
index 8dd7b3a..f331316 100644
|
||||
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
|
||||
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
|
||||
@@ -2,7 +2,8 @@ Broadcom VCHIQ firmware services
|
||||
|
||||
Required properties:
|
||||
|
||||
-- compatible: Should be "brcm,bcm2835-vchiq"
|
||||
+- compatible: Should be "brcm,bcm2835-vchiq" on BCM2835, otherwise
|
||||
+ "brcm,bcm2836-vchiq".
|
||||
- reg: Physical base address and length of the doorbell register pair
|
||||
- interrupts: The interrupt number
|
||||
See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
|
||||
|
||||
From patchwork Mon Sep 17 08:22:23 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Phil Elwell <phil@raspberrypi.org>
|
||||
X-Patchwork-Id: 10602173
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D23951508
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:23:48 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0A5E2624C
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:23:48 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id B494527861; Mon, 17 Sep 2018 08:23:48 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1D12F2624C
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:23:48 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help:
|
||||
List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To:
|
||||
Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:
|
||||
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
|
||||
List-Owner; bh=Dwk4nV4syz12H5Joro54dzb4xRRZnm1pVXSS97zokG4=; b=u5ArKClp9m4rAw
|
||||
X79KW+OdEYkjnJvDRiwHiXrIROhy9KqfwhQncB4G5DZxtVfKFiVHnbqXHk8f+WwX2BxPbMEDIZOoc
|
||||
d/sIjVXlkW2RQBS8mgxjJc/92fmYqW9/xgsXF7mDz2uJxYTeH8ilqLG3yTIoPiLE5V/m/0kWlWp3q
|
||||
/KS6alhirFx2v2lPNAF1/anBJRHtfMp2mLjK5fepthSwL2KNN9T+GIoluCeXKH4ikWTtZcT5t+2lt
|
||||
XvOmzLVgOMhD2/Auupmh1bFAMoyLpk2N90IK/Vn5aR+SqwRV4VRriyUdSQbJw2lwXyeAnwHe8ioGW
|
||||
qBY1kd4d9lahXdnwvbzw==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1ooi-0005gd-Sz; Mon, 17 Sep 2018 08:23:37 +0000
|
||||
Received: from merlin.infradead.org ([2001:8b0:10b:1231::1])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1ooH-0005Wn-28
|
||||
for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Sep 2018 08:23:09 +0000
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date:
|
||||
Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type:
|
||||
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
|
||||
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
|
||||
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
|
||||
bh=ibdA85hf8c1CV6AjnoansL0OLKCQv7xqz6Dd4T0WwYE=; b=kq+r4aiTxCfQb9ANr0fYzAHvh
|
||||
lwPy2MDuD58jFZXIeBlNCsd16UJwPv79X/C3PeK3VurkqtA220rndJ9rlFyuIpW9bLx3VbvMEV66i
|
||||
5rlJCpBanJtL6W4bcOStoNBRts5IAjzWQJTP9xh8kRTZDj94HG4Ud3Y0F4wp5tuZQin9aAmRGN8Ri
|
||||
nmxwqj4K2AedWncDcfJnbYUO+pj83RlLIV83Vc/wjwafr/HmLSJKxO2tbFMlyK8w+GzokVKDQX8Yl
|
||||
VgzPvvpGFN/PEjHxbxhUwTUXoN9OX3veCrdZfeuLeb936VjAEY2dO4qe4n7V+8suIGWPYczcUYmuC
|
||||
QroUCrfeA==;
|
||||
Received: from mx08-00252a01.pphosted.com ([91.207.212.211])
|
||||
by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1ooA-0001aR-1H
|
||||
for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 08:23:06 +0000
|
||||
Received: from pps.filterd (m0102629.ppops.net [127.0.0.1])
|
||||
by mx08-00252a01.pphosted.com (8.16.0.23/8.16.0.23) with SMTP id
|
||||
w8H8MTQR002592
|
||||
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:44 +0100
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org;
|
||||
h=from : to :
|
||||
subject : date : message-id : in-reply-to : references; s=pp;
|
||||
bh=ibdA85hf8c1CV6AjnoansL0OLKCQv7xqz6Dd4T0WwYE=;
|
||||
b=GtNw2X7QyIdzLVw/dWm9pE7hxGpCS4f3A39/M126HfBvf3b/h8TyqiZ5r1xXNu1o9Wd3
|
||||
a2PR3ZAYL9vJWqRw6GR+hqIrLbBPmuIUnKjv8ZSuL5nSma4EaGZ4SA/pkRVoZxtzYHra
|
||||
rerPDiIpuY/ZJzkrl5gRela6dKKMafJ9WjDHfRBe3MvraBmSmcjNbl1pwZrD9SxlL/QW
|
||||
kekUM8ISQzaZK1yS9nEOJT4jgoDgQjg67qTdqfASV0IxT+hhlwHX/oj97E2XJuVGMchY
|
||||
B2tw7aEpcV+/B3prEEpXPg8I4gulq4au2IOL1G+ZjuMFtB3mnxuhJZTvOTlVOORC1tbY Nw==
|
||||
Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com
|
||||
[209.85.221.71])
|
||||
by mx08-00252a01.pphosted.com with ESMTP id 2mgxu78uf3-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK)
|
||||
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:44 +0100
|
||||
Received: by mail-wr1-f71.google.com with SMTP id u12-v6so22608270wrc.1
|
||||
for <linux-arm-kernel@lists.infradead.org>;
|
||||
Mon, 17 Sep 2018 01:22:44 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=raspberrypi.org; s=google;
|
||||
h=from:to:subject:date:message-id:in-reply-to:references;
|
||||
bh=ibdA85hf8c1CV6AjnoansL0OLKCQv7xqz6Dd4T0WwYE=;
|
||||
b=Ewr6H6F8danbpfF2j56EFM3zyem/V1DjZTwpShb9UOMB0mer0DV08yzmFnZxhT+OOS
|
||||
iqoecQdIpCRdwPKRDBo1CPy9uJQSgSactKa+YAxnGQ3bAn8TvBe1SxqnObHXRrr9Wdex
|
||||
vzH2VGHbyGIW4tRzrTTiy4+lWlzyzezOWUWOdGfvLyt+3olku3ExUQ1UtyJQFXgOIE1R
|
||||
gXVZBPyr7+K/To7iaDyFtqE0HKSZ1zXT2JB5RwTSe7gbppZL/cMQbodQuEeCtTJN2Mk3
|
||||
zfn2WL7jhFw2HMZBcR9hYfm37jh9HUSDndHoMuuAtumDBy6dr9jC/ixxOwJOJIpCgaN+
|
||||
QVgA==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
|
||||
:references;
|
||||
bh=ibdA85hf8c1CV6AjnoansL0OLKCQv7xqz6Dd4T0WwYE=;
|
||||
b=hylNUUSKnRzE949ctU309ZwJfktn+WfvEgLQRIDt5xeqAZoZdx14jr9qf4/8FwGgK1
|
||||
KNXH04/CM9pCLsnsLTBwXsZUKGObYp+zPhwGqPG2Sn4w6GRZLnZfSxqJFtToDvnicem+
|
||||
+WjrwVDTrfO2GxBk7Wd5YepQQner7x41sdIXZwztEYG9PiRaBQu6XTUq/RqreaF4Ep3E
|
||||
n7LHVlGVhd8ddG/cRHR5UmyZS/QMzp39y7R8HoA8pT69lIysf8wjq3n4j+ZILtxBhbz0
|
||||
WC5ke8PdnUvBNBkrS0WiqyW+YFkzjGy9rgJsW1/fW8S5YE98OwM9R1e/8skJk7yeXuj4
|
||||
+XzQ==
|
||||
X-Gm-Message-State: APzg51CndvGPCiDwRG1VW95iu6AVszC736A5IE7L/fnOGMl2pWRj7/Fm
|
||||
1a3HQ+l8htKBn3H5iyJlVsCKEev/tJDKXQKvW0QAq7QzJOvGY65OOWI9FtwM61BlqiwUbZVyRo7
|
||||
8qx9VkB7JEDmE/hFbCckOPQoLp3jICDMdKbU=
|
||||
X-Received: by 2002:adf:d110:: with SMTP id
|
||||
a16-v6mr18039010wri.17.1537172563663;
|
||||
Mon, 17 Sep 2018 01:22:43 -0700 (PDT)
|
||||
X-Google-Smtp-Source:
|
||||
ANB0VdZFtXkQhEgNJzup0M4370Voxs3V0q2pn+S3MhlOPzoOK4M7r4b5z74IaruMtYvv09TFVUAizg==
|
||||
X-Received: by 2002:adf:d110:: with SMTP id
|
||||
a16-v6mr18038988wri.17.1537172563384;
|
||||
Mon, 17 Sep 2018 01:22:43 -0700 (PDT)
|
||||
Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:14e2:e2a0:5538:c448])
|
||||
by smtp.gmail.com with ESMTPSA id
|
||||
198-v6sm7938315wmm.0.2018.09.17.01.22.42
|
||||
(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
|
||||
Mon, 17 Sep 2018 01:22:42 -0700 (PDT)
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
To: Rob Herring <robh+dt@kernel.org>, Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
|
||||
Phil Elwell <phil@raspberrypi.org>, devicetree@vger.kernel.org,
|
||||
linux-rpi-kernel@lists.infradead.org,
|
||||
Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
|
||||
linux-arm-kernel@lists.infradead.org,
|
||||
bcm-kernel-feedback-list@broadcom.com, devel@driverdev.osuosl.org
|
||||
Subject: [PATCH v3 3/4] ARM: dts: bcm283x: Correct vchiq compatible string
|
||||
Date: Mon, 17 Sep 2018 09:22:23 +0100
|
||||
Message-Id: <1537172544-104852-4-git-send-email-phil@raspberrypi.org>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
|
||||
References: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
|
||||
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, ,
|
||||
definitions=2018-09-17_04:, , signatures=0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20180917_042302_770260_E7C4CFD2
|
||||
X-CRM114-Status: GOOD ( 22.09 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
To allow VCHIQ to determine the correct cache line size, use the new
|
||||
"brcm,bcm2836-vchiq" compatible string on BCM2836 and BCM2837.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +-
|
||||
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 2 +-
|
||||
arch/arm/boot/dts/bcm2836-rpi.dtsi | 6 ++++++
|
||||
arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 2 +-
|
||||
arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 2 +-
|
||||
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 2 +-
|
||||
6 files changed, 11 insertions(+), 5 deletions(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm2836-rpi.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
index cb2d6d7..215d8cc 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
@@ -30,7 +30,7 @@
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
|
||||
- mailbox@7e00b840 {
|
||||
+ vchiq: mailbox@7e00b840 {
|
||||
compatible = "brcm,bcm2835-vchiq";
|
||||
reg = <0x7e00b840 0xf>;
|
||||
interrupts = <0 2>;
|
||||
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
index 2fef70a..ac4408b 100644
|
||||
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
#include "bcm2836.dtsi"
|
||||
-#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm2836-rpi.dtsi"
|
||||
#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
#include "bcm283x-rpi-usb-host.dtsi"
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2836-rpi.dtsi b/arch/arm/boot/dts/bcm2836-rpi.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..c4c858b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm2836-rpi.dtsi
|
||||
@@ -0,0 +1,6 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+#include "bcm2835-rpi.dtsi"
|
||||
+
|
||||
+&vchiq {
|
||||
+ compatible = "brcm,bcm2836-vchiq", "brcm,bcm2835-vchiq";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
|
||||
index 4adb85e..eca36e3 100644
|
||||
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
#include "bcm2837.dtsi"
|
||||
-#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm2836-rpi.dtsi"
|
||||
#include "bcm283x-rpi-lan7515.dtsi"
|
||||
#include "bcm283x-rpi-usb-host.dtsi"
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
index c318bcb..a0ba0f6 100644
|
||||
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
#include "bcm2837.dtsi"
|
||||
-#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm2836-rpi.dtsi"
|
||||
#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
#include "bcm283x-rpi-usb-host.dtsi"
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
|
||||
index 7b7ab6a..4a89a18 100644
|
||||
--- a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
#include "bcm2837.dtsi"
|
||||
-#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm2836-rpi.dtsi"
|
||||
|
||||
/ {
|
||||
memory {
|
||||
|
||||
From patchwork Mon Sep 17 08:22:24 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Phil Elwell <phil@raspberrypi.org>
|
||||
X-Patchwork-Id: 10602203
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BB93161F
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:42:23 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A55A29656
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:42:23 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 6DE622965F; Mon, 17 Sep 2018 08:42:23 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5FB1B2965B
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Mon, 17 Sep 2018 08:42:22 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help:
|
||||
List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To:
|
||||
Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:
|
||||
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
|
||||
List-Owner; bh=GuNa2jLaGytz4ltfeP+rSU0xZrseSNcWWmSj86ZTl7w=; b=i1naZIjCR6DgCG
|
||||
1T5cmZMM6Dkok0WN1avKEjHIKv18FXg4nMVuJeEEzdq5Dx4du3mbMHBWS9oC+QHZy9bTpHQRgiS0G
|
||||
Q6fvfZ7PYJUVWOzEgbkdyOL0OMiOVsYTJsMXoeii0MFMvmzFpelJ2KgEqJ/Ly+PRHPmHQ3WP9s7N5
|
||||
xE4orUgiIcIHSbMkCm42twuXZMgaMgQktA+jlnAaslK7PJtzMC1PHx2uCTbZdIVNTJFqkwgjqxmSW
|
||||
RH4f8jSTGWYwOlv5CgspS2YU753VETDvD0LTGDSrn737lsC94uI99f6ciaMZaUcS4SuRzuvjSvKPA
|
||||
pZ2TrSAmQre1Rp/jVeOw==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1p6f-00060f-0R; Mon, 17 Sep 2018 08:42:09 +0000
|
||||
Received: from casper.infradead.org ([2001:8b0:10b:1236::1])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1p6b-0005u0-RH
|
||||
for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Sep 2018 08:42:05 +0000
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date:
|
||||
Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type:
|
||||
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
|
||||
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
|
||||
List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
|
||||
bh=QMjgiTHZdBCZgWe6tYJjcntUGfqPQLNuRPhn6Dczv+g=; b=UJ3cMzmNQRhXaXlxWFwla6An2
|
||||
CWzMn1wzzr/CyRZ2G8YLZdvUEGpVRlTqAtk/xGbT7xO80oWONflxUNqlNTxj4v3QZkEMtsr5eg0bD
|
||||
bnEnzF3OS0dexb5Aro0bZajhgrMlaIaa5FBVndBgK1KeW4vEiE4D10APgXJMZ4gzO5PvO3pba7J0g
|
||||
XNDk7JzB7D/dSQXmKkb+EuUwalT2v/YJzFtIc+T3vR4/wvxhXFZmJL2dmzQMduHoVJtsIFvC1HfzF
|
||||
5GnY5y85CTU2Fx2s4JNOHe2vAGXI9lnUPf2szvyFhGQIVH7QC9y4zOsbG0iP36VEcuhbGnA3I5K7S
|
||||
8Kc2knjrQ==;
|
||||
Received: from mx07-00252a01.pphosted.com ([62.209.51.214])
|
||||
by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1g1oo4-0004nO-7f
|
||||
for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 08:22:58 +0000
|
||||
Received: from pps.filterd (m0102628.ppops.net [127.0.0.1])
|
||||
by mx07-00252a01.pphosted.com (8.16.0.23/8.16.0.23) with SMTP id
|
||||
w8H8MUCZ024134
|
||||
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:45 +0100
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org;
|
||||
h=from : to :
|
||||
subject : date : message-id : in-reply-to : references; s=pp;
|
||||
bh=QMjgiTHZdBCZgWe6tYJjcntUGfqPQLNuRPhn6Dczv+g=;
|
||||
b=kZDNcIT02Qz8gHVo/pKHHsMKpNIeLNzW7d/g6n+A4XN0KAnqNvf2mO96pMHKNygRT76b
|
||||
cq81PbSI1ssh2L6Bd86zcSWNDq3UuoZl93qtK6YY8fqevti7XVKKtwh4qQ561BL8oE6W
|
||||
gorwuXGsxEpeer6/+1/r0Ookzhz4EiQkGcd/l3IP+T4XkHJgX6tZ/GTSRbDXzuxZ7WxL
|
||||
7Kh+zMjHW5FAV2xmyYnFEVvI5DFnD34QM4lLrw/v6fLDp1ZvcLH2psBo8wv9fd01ZnMp
|
||||
3gVnEu8QX+NWIq+9qJ6o8MajSNhGWU4WmTD2fiqfmxFBnCTWp5Y2ZfphwVsflhlnThtE Jw==
|
||||
Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com
|
||||
[209.85.221.70])
|
||||
by mx07-00252a01.pphosted.com with ESMTP id 2mgw8f0vac-1
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK)
|
||||
for <linux-arm-kernel@lists.infradead.org>; Mon, 17 Sep 2018 09:22:45 +0100
|
||||
Received: by mail-wr1-f70.google.com with SMTP id j22-v6so22020561wre.7
|
||||
for <linux-arm-kernel@lists.infradead.org>;
|
||||
Mon, 17 Sep 2018 01:22:45 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=raspberrypi.org; s=google;
|
||||
h=from:to:subject:date:message-id:in-reply-to:references;
|
||||
bh=QMjgiTHZdBCZgWe6tYJjcntUGfqPQLNuRPhn6Dczv+g=;
|
||||
b=elxMUa+c3RtqQfnv+0aAH+u3stbGHUflCzNxSDLQUfmD/iHnq9vSqSRX+7+TLNBhXc
|
||||
iPDm6AigQoDgevY1qgR0cUf1kufwlFKka3QyyWdEH/eEZHs6b3W+U9NtjyUReMMOZh3Q
|
||||
gFrMrgzwIryQOKgcBg41hFqqv6lUEqVuTx3oC0n7U66JoJ1TRjY8muSPp8KWfB+Tsbtv
|
||||
XVDBeKa5HGzRKlxSI3/RSvmivz+7aUQW6wNy0+gZd3+COdPiyiRhbtT2Xwx98JZY12HT
|
||||
WlWqHTLkcG6jAKJP2dnqgvYGZ/eennHF34Tn37xHLjy4cahYo/ngTwQgPprJIaoIPcL+
|
||||
X/Dg==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
|
||||
:references;
|
||||
bh=QMjgiTHZdBCZgWe6tYJjcntUGfqPQLNuRPhn6Dczv+g=;
|
||||
b=fVU6VgVpx/HstvLa9bPQVfHGZqO1SgQW8pSfbPxol5HYqweh3jT/ykuYXG8BAGW6Ig
|
||||
Mdhu3RzBV4wPReCMEgte6BWd94TWyWKxGq6l6xrOi3LXbUMPtIqox3kv3PfLLVxk3SMv
|
||||
sHWyp/kAkue+K5Ye6FnfgpJzJmCaJAvJ1UQpLPzF+5KG7GFYmuwAe65l68b8xBldLvz+
|
||||
CvnQ71gdsZIZ7CUzPRBN9OZhlZJWZXMPb3LdD6Q482+/PVWLFANU1O5l2/h50Y/dV+a1
|
||||
YalREMpfnz+tsZcpGEfzdxCpboHeDv/G6q+VotAhcrihrAMNK9BJZ16gTRMcwcYgPQWw
|
||||
qRSg==
|
||||
X-Gm-Message-State: APzg51DXrb2imPBCoJ+q/BYRCyqhMqStk08VprXg9IQ1KTzmptp77XVd
|
||||
R/mMPJ35LsOos7CoFmh/yWMJEB3GLYTLSiMzQFz8+7GxMs7H9M8ocW2aOTth0aTDS70XXH/nioS
|
||||
kW34F6tKDeWUp44rQD8ZgUpyJVb2hPfBbovQ=
|
||||
X-Received: by 2002:adf:d20a:: with SMTP id
|
||||
g10-v6mr18280267wri.66.1537172564529;
|
||||
Mon, 17 Sep 2018 01:22:44 -0700 (PDT)
|
||||
X-Google-Smtp-Source:
|
||||
ANB0VdY6Rp3hgeCMs9pw3a4a2+uvxxamVoyGcr3pIn6rx5kgmM+Aufcx5tRocSXQJqw45FaPg01X8g==
|
||||
X-Received: by 2002:adf:d20a:: with SMTP id
|
||||
g10-v6mr18280254wri.66.1537172564348;
|
||||
Mon, 17 Sep 2018 01:22:44 -0700 (PDT)
|
||||
Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:14e2:e2a0:5538:c448])
|
||||
by smtp.gmail.com with ESMTPSA id
|
||||
198-v6sm7938315wmm.0.2018.09.17.01.22.43
|
||||
(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
|
||||
Mon, 17 Sep 2018 01:22:43 -0700 (PDT)
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
To: Rob Herring <robh+dt@kernel.org>, Stefan Wahren <stefan.wahren@i2se.com>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
|
||||
Phil Elwell <phil@raspberrypi.org>, devicetree@vger.kernel.org,
|
||||
linux-rpi-kernel@lists.infradead.org,
|
||||
Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>,
|
||||
linux-arm-kernel@lists.infradead.org,
|
||||
bcm-kernel-feedback-list@broadcom.com, devel@driverdev.osuosl.org
|
||||
Subject: [PATCH v3 4/4] ARM: dts: bcm283x: Correct mailbox register sizes
|
||||
Date: Mon, 17 Sep 2018 09:22:24 +0100
|
||||
Message-Id: <1537172544-104852-5-git-send-email-phil@raspberrypi.org>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
|
||||
References: <1537172544-104852-1-git-send-email-phil@raspberrypi.org>
|
||||
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, ,
|
||||
definitions=2018-09-17_04:, , signatures=0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20180917_092256_305871_71340799
|
||||
X-CRM114-Status: GOOD ( 19.05 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
The size field in a Device Tree "reg" property is encoded in bytes, not
|
||||
words.
|
||||
|
||||
Fixes: 614fa22119d6 ("ARM: dts: bcm2835: Add VCHIQ node to the Raspberry Pi boards. (v3)")
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
index 215d8cc..29f970f 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
vchiq: mailbox@7e00b840 {
|
||||
compatible = "brcm,bcm2835-vchiq";
|
||||
- reg = <0x7e00b840 0xf>;
|
||||
+ reg = <0x7e00b840 0x3c>;
|
||||
interrupts = <0 2>;
|
||||
};
|
||||
};
|
||||
511
bcm2837-dts-add-Raspberry-Pi-3-A.patch
Normal file
511
bcm2837-dts-add-Raspberry-Pi-3-A.patch
Normal file
|
|
@ -0,0 +1,511 @@
|
|||
From patchwork Tue Dec 4 18:58:17 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10712425
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C411313BF
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:34 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B721A2BD01
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:34 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id AB2B72BD2D; Tue, 4 Dec 2018 18:59:34 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 606D42BD01
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:34 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=6UbJBC0963I46fYE5zRy11baMmDB1ESW2gFQ5gI2wwE=; b=CDOM7grk/CTzf0ntrBtWfB3O6y
|
||||
33/BKjt6ihWsFz/ta8zAMEiFFs9BmnVKDymMGblsIWTjWTb3WfPF5GwSBSCi/ii/uO8sUxys6FtBW
|
||||
f9zzCKZG3yfWmznLUUEThlA5REEOKuV1+/jdk4w0WiNfGNKMMnKROAkmrJEVke4Zhd+8OuKmVOjmv
|
||||
Yn9zREWqYpUJtSut4b9OExhtJWtFrvnoLaj5u84K/gpnp+dVcv7cL+cWOgmYqmImUOwQHnk9GQMKQ
|
||||
uHHaWTRK96TNqgtk1pgwLdy3JTMNNm4x/rQX8eFTsXiAw27c+bUOqBDCCZZRq8uSJfbovVgPN+xvp
|
||||
8s4Q2LjA==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gUFup-0007EB-Le; Tue, 04 Dec 2018 18:59:27 +0000
|
||||
Received: from mout.kundenserver.de ([212.227.126.187])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gUFuc-000738-NV; Tue, 04 Dec 2018 18:59:16 +0000
|
||||
Received: from localhost.localdomain ([37.4.249.153]) by
|
||||
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
|
||||
id 1MsJXG-1hMU9U03Ja-00tiwe; Tue, 04 Dec 2018 19:58:54 +0100
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
To: Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>,
|
||||
Florian Fainelli <f.fainelli@gmail.com>, Ray Jui <rjui@broadcom.com>,
|
||||
Scott Branden <sbranden@broadcom.com>, Eric Anholt <eric@anholt.net>,
|
||||
Arnd Bergmann <arnd@arndb.de>
|
||||
Subject: [PATCH V3 1/3] dt-bindings: bcm: Add Raspberry Pi 3 A+
|
||||
Date: Tue, 4 Dec 2018 19:58:17 +0100
|
||||
Message-Id: <1543949899-13380-2-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1543949899-13380-1-git-send-email-stefan.wahren@i2se.com>
|
||||
References: <1543949899-13380-1-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Provags-ID: V03:K1:zWjXUKGvRea+gMs+XnPtEqUFEt6coBWKiACMzuwYlKcCFu4r+lA
|
||||
iGx8uqFwUZeMlCRPt/ppyLb1sQzbMcCRqQQR6UhJtkdMZQIQAFlshUesPMbcUk9m4B2o+hV
|
||||
5MKPHtv0JgCoRiG1RHH5O6WhMVUlI/r6QHru1GtJpJnirkWBUM6ybU5if6JNxdc6Q1K+k+j
|
||||
Ely8Z1ImjRPnmySejSWMw==
|
||||
X-UI-Out-Filterresults: notjunk:1;V03:K0:npbkbCpjqTA=:aJ8W+r4VeSzddafgbOrFVV
|
||||
nq1xnYu1eZIBQfLjIYRbrv1nth1fKohmS61nN/+Td+n/k4e3TRa9AMLnwYp0rzFwoilG/0fJD
|
||||
oTRRftY0BKKXSdeoahKljHbUtCjqt7aSxHPbRC66juNlKlbYP2X2e1SpPMu6/KBzwqhTKxY6x
|
||||
vn18J++hPOkeyN548oSNhQLFkiKcL2ZTruhlba0dPZdsTllcVtNOLXod4cSszY72zZAPxmMd1
|
||||
vTwMs6i4VpYzu9JpSNysbkfLLuTcAum5kspFgEP1B6GlS5REBPQDfGl7M7v9RZcqRTpUoNVp7
|
||||
HQKJU3cBmWUQ8aHADyi0lBlon4zvZ/mrvmjqRSmdj7cYl2dsP8Xjhe5JIVy2zaIxW6lQrD2J3
|
||||
yP7h9YRbnloK4MsJleaDAkziQunrTMEc/O1gz46DJ9hU5Id6SpH2au7iq4QfldG+ioPWhoESx
|
||||
sjQd7tnniz2Z5cMtgdHfXZz4xu9FROiPq0uij1NijVZZU2bXfaKLhYJtoeDOGMWtIMUT1CKyo
|
||||
Iut2P58bwL0cAIYKyaSF7ak4Vy/MX3fkVymockjeTXHr0ep0s90YqlYxk4CYvxeRt2aPm8qRo
|
||||
zbUkVxCooJAKjhOm6IA2jxyuSKb6i8EciUi0vv7/XmUpazJ5hMznDAeNXVJmEt9asUCitqNq5
|
||||
MglMo4dFq61jUNDbeqU/zN/nXYX8fGVIEDDpgETB0dbSqhG1mANxVPs6Zb0Sd8OMEOct0k0dy
|
||||
PKEvU6Ol/K0o1Ufh5Fp2zyiflab/1djdSoPvlBFOVEx2D4n3gV6zfv9sKlE=
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20181204_105915_063796_DFDC7865
|
||||
X-CRM114-Status: GOOD ( 12.62 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>, devicetree@vger.kernel.org,
|
||||
bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
This adds the root properties for the Raspberry Pi 3 A+ .
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
Reviewed-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
index 0dcc3ea..245328f 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
@@ -30,6 +30,10 @@ Raspberry Pi 2 Model B
|
||||
Required root node properties:
|
||||
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
|
||||
|
||||
+Raspberry Pi 3 Model A+
|
||||
+Required root node properties:
|
||||
+compatible = "raspberrypi,3-model-a-plus", "brcm,bcm2837";
|
||||
+
|
||||
Raspberry Pi 3 Model B
|
||||
Required root node properties:
|
||||
compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
|
||||
|
||||
From patchwork Tue Dec 4 18:58:18 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10712423
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A15061731
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:21 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 924D82BD01
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:21 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 83F5B2BD2D; Tue, 4 Dec 2018 18:59:21 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A1EB2BD01
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:21 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=USNsthoN3FFEFx7U+2NkiWI+CturV+888pKSb0RNCqA=; b=JYnUBDrCnTGKB2TAy2JjiZd2Ra
|
||||
7AIas3zU/1y8q3AUyA90EFhuWPBAgj9XUbNlVZT/pYLLuI9jMywztAmG5bhh4aERhKkZXtVrijKX/
|
||||
ZnnEUmTQ9oGvuhDAxtjOS1TzHp5EI2iy/R9iLdiUYXCEOdlkcYdPIO3+PTb6AlQhWo42QCKG0xWcl
|
||||
pATIUVoDrXEf0jXEYsAiwd/wG3ukFNJ3lfvIfgNA+JPs3Ngu7quNxiYXJ2D1JvR8XkmfwRG1K0hZh
|
||||
7DT1bNn/DjqE6gArdDbTN7Zsg/0hZ/vtFrtguHfISa/W9rfkCCC5p6dzWGnOiTbHJhXWSEwrBTKkx
|
||||
Ts1HiMfQ==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gUFuf-00074u-E0; Tue, 04 Dec 2018 18:59:17 +0000
|
||||
Received: from mout.kundenserver.de ([212.227.126.135])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gUFuc-000737-AF; Tue, 04 Dec 2018 18:59:16 +0000
|
||||
Received: from localhost.localdomain ([37.4.249.153]) by
|
||||
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
|
||||
id 1MTfgb-1gvyxH1xQz-00TyQt; Tue, 04 Dec 2018 19:58:54 +0100
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
To: Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>,
|
||||
Florian Fainelli <f.fainelli@gmail.com>, Ray Jui <rjui@broadcom.com>,
|
||||
Scott Branden <sbranden@broadcom.com>, Eric Anholt <eric@anholt.net>,
|
||||
Arnd Bergmann <arnd@arndb.de>
|
||||
Subject: [PATCH V3 2/3] ARM: dts: add Raspberry Pi 3 A+
|
||||
Date: Tue, 4 Dec 2018 19:58:18 +0100
|
||||
Message-Id: <1543949899-13380-3-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1543949899-13380-1-git-send-email-stefan.wahren@i2se.com>
|
||||
References: <1543949899-13380-1-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Provags-ID: V03:K1:3DMMDYjsCTx6IxBf2WC2ooKMnJiVzq9RVmh0csGsajg6lyIrJhZ
|
||||
1Bxu2ZSF3G0pHYpWlUkunk+gbYzjwXHLe7l8Qt331s0uI7iQlNoKYnDPTnSttqFWy6REewG
|
||||
TGQ/wBenT40TkCKYB4Jzxzm/sBnOCRuCRNOESZRNHpPgNmq54dplz7pgEsWcSC+rJNqDZ57
|
||||
hZVdKs0sW1HDASHCi5bwQ==
|
||||
X-UI-Out-Filterresults: notjunk:1;V03:K0:xL1UKc14icc=:ywcRqmyL4hAvJKGdv9SW2+
|
||||
nB4fjCvnj/X2wxnBW6IGj37m5w0vogpA8hZ8T6OzOMSxYREPfeTGl0fgSVwKdAAfQTilDe5XN
|
||||
wVJ+fvkM/SVIA7FUaeR+eechsklUZrJKVpjZMrIYH7GLwVl6OVF7VFhlvxC3o1DUlYE3m4GKL
|
||||
DrhSdB9wcKUO+KrQc67I4PhdhKePc2EaA1/fDGNkQFkCVlXsw1vdrfla5T/tetBlHQq+qCPcl
|
||||
vuLv5NeXx2KtC0zqEdEKZn7KqcA//KMtDQCWmXnc9jvjqx17DF5Iji1xQe4vXA196P9ZcF1U0
|
||||
vpv6mSI3SPtCJEn48zHMTIt6tVRJ6Ao0HmZEkFDyRW3c8sgK4OFLnLUjSx4YoSHB9RKnC+Psz
|
||||
5QZLWBT81RHxqPiLa49EXhaHkyDXtiinriofvqJqogtl+X0J9Rmn7wczjqYRaQzp1iBTrpXNT
|
||||
sC/ZLyTJ25ZAAMrotIK1UgL9S4CFgdwDk0AKcVUycNoVsWeIrCC743fQazerXkOFNeuBW9t55
|
||||
G5gQD5pmEvQkOjb+cExnODkM9L7eOIrrJzsap98bS0Bsu7inAsXOIObRVJWtKpEwXQ5PUo3gt
|
||||
Ku6C8Xgr5A2ydsc9LegxF5JXOM9UPx9+eN3hHsH3aW5+eW80KDN6INGwBoJnvwPHDdlK2PRH/
|
||||
nEOKWJBTLqRcf39DMKyzTJirlz/jNbWra0qisP3AYgQv2lF0jM5hs64oQ2nDzHbFAKljBdf+0
|
||||
wMfkYx1QgW1uF+G+3OEXmrPRKSqUFihd4VBKZ0WYsMkKX+VEO9T1n75KUNU=
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20181204_105914_660350_5C19EA39
|
||||
X-CRM114-Status: GOOD ( 18.48 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>, devicetree@vger.kernel.org,
|
||||
bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
The Raspberry Pi 3 A+ is similar to the Pi 3 B+ but has only 512 MB RAM,
|
||||
1 USB 2.0 port and no Ethernet.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 107 +++++++++++++++++++++++++++++
|
||||
2 files changed, 108 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index b0e966d..15bbd0d 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -79,6 +79,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
bcm2835-rpi-a-plus.dtb \
|
||||
bcm2835-rpi-cm1-io1.dtb \
|
||||
bcm2836-rpi-2-b.dtb \
|
||||
+ bcm2837-rpi-3-a-plus.dtb \
|
||||
bcm2837-rpi-3-b.dtb \
|
||||
bcm2837-rpi-3-b-plus.dtb \
|
||||
bcm2837-rpi-cm3-io3.dtb \
|
||||
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
|
||||
new file mode 100644
|
||||
index 0000000..b2df7cf
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
|
||||
@@ -0,0 +1,107 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/dts-v1/;
|
||||
+#include "bcm2837.dtsi"
|
||||
+#include "bcm2836-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-usb-host.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "raspberrypi,3-model-a-plus", "brcm,bcm2837";
|
||||
+ model = "Raspberry Pi 3 Model A+";
|
||||
+
|
||||
+ chosen {
|
||||
+ /* 8250 auxiliary UART instead of pl011 */
|
||||
+ stdout-path = "serial1:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ act {
|
||||
+ gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ pwr {
|
||||
+ label = "PWR";
|
||||
+ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&firmware {
|
||||
+ expgpio: gpio {
|
||||
+ compatible = "raspberrypi,firmware-gpio";
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ gpio-line-names = "BT_ON",
|
||||
+ "WL_ON",
|
||||
+ "STATUS_LED",
|
||||
+ "",
|
||||
+ "",
|
||||
+ "CAM_GPIO0",
|
||||
+ "CAM_GPIO1",
|
||||
+ "";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
|
||||
+};
|
||||
+
|
||||
+&pwm {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* SDHCI is used to control the SDIO for wireless */
|
||||
+&sdhci {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_gpio34>;
|
||||
+ status = "okay";
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+
|
||||
+ brcmf: wifi@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* SDHOST is used to drive the SD card */
|
||||
+&sdhost {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdhost_gpio48>;
|
||||
+ status = "okay";
|
||||
+ bus-width = <4>;
|
||||
+};
|
||||
+
|
||||
+/* uart0 communicates with the BT module */
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32 &gpclk2_gpio43>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "brcm,bcm43438-bt";
|
||||
+ max-speed = <2000000>;
|
||||
+ shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* uart1 is mapped to the pin header */
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_gpio14>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
|
||||
From patchwork Tue Dec 4 18:58:19 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10712427
|
||||
Return-Path:
|
||||
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
|
||||
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
|
||||
[172.30.200.125])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AAB7E13BF
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:55 +0000 (UTC)
|
||||
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A9D42BD01
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:55 +0000 (UTC)
|
||||
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
|
||||
id 8D6682BD2D; Tue, 4 Dec 2018 18:59:55 +0000 (UTC)
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
|
||||
pdx-wl-mail.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED,
|
||||
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1
|
||||
Received: from bombadil.infradead.org (bombadil.infradead.org
|
||||
[198.137.202.133])
|
||||
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1D36E2BD01
|
||||
for <patchwork-linux-arm@patchwork.kernel.org>;
|
||||
Tue, 4 Dec 2018 18:59:55 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
|
||||
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
|
||||
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
|
||||
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
|
||||
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
|
||||
:Resent-Message-ID:List-Owner;
|
||||
bh=d6AyqRs+tRK/fschmfAdF+Ujjrm/vJZBIeGWaRWEq4w=; b=Y7xekwSen1413+ksdWargCdgIt
|
||||
9btgKKpQU7qjXIbtt/Y7DcOeRQJHpM3nx63Ft8BbjQMcMV/97DgweLj7gbaoi51D0OIxZ9sd431pP
|
||||
fFjpfTK9cN0Q85qtcssVISpnt7a6Fm+ixe+/Xt3IRSzchcPxqfipK6qDmUSpZGKrU101cJYG08VkV
|
||||
vY6Oa7w/hyeU0b8rULaIj5c069BzO/vGkkULiXCteGEn6y4juTjmXa/Nsoj2RKYUjdhOMXWxEwU6C
|
||||
MM7JTAxqPtcIX1ale070qdvGn5XJOuN+DYx03At0mj8aaCBr11NKTtB7PyutmcIPnRwGQwz1gW7go
|
||||
daDlwlnA==;
|
||||
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
|
||||
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gUFvA-0007cK-M8; Tue, 04 Dec 2018 18:59:48 +0000
|
||||
Received: from mout.kundenserver.de ([212.227.126.130])
|
||||
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
|
||||
id 1gUFud-00073L-OI; Tue, 04 Dec 2018 18:59:17 +0000
|
||||
Received: from localhost.localdomain ([37.4.249.153]) by
|
||||
mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis)
|
||||
id 1MFJfN-1gjyQ33mR7-00FlVP; Tue, 04 Dec 2018 19:58:55 +0100
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
To: Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>,
|
||||
Florian Fainelli <f.fainelli@gmail.com>, Ray Jui <rjui@broadcom.com>,
|
||||
Scott Branden <sbranden@broadcom.com>, Eric Anholt <eric@anholt.net>,
|
||||
Arnd Bergmann <arnd@arndb.de>
|
||||
Subject: [PATCH V3 3/3] arm64: dts: broadcom: Add reference to RPi 3 A+
|
||||
Date: Tue, 4 Dec 2018 19:58:19 +0100
|
||||
Message-Id: <1543949899-13380-4-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Mailer: git-send-email 2.7.4
|
||||
In-Reply-To: <1543949899-13380-1-git-send-email-stefan.wahren@i2se.com>
|
||||
References: <1543949899-13380-1-git-send-email-stefan.wahren@i2se.com>
|
||||
X-Provags-ID: V03:K1:FFp5Wh7ZWhwN+0GnOIK4svX/EnE/lyWXYX5Q6pGbgpyE8/BWhkC
|
||||
HIozYn/aF1wiPHTyJBUFfAX8Bprfc2VwnJzzw9ujHYvH3l0PaQMDjk5EKXbX3EWjmbQumbE
|
||||
uyxkSsnoyLyfEVpoKKGGBgHPfzsATZGmLQj7UEyc5JvQ63IO0mdwywnOuI6LouMSJgs26MV
|
||||
+JgfGn5pKNrVStX597aIg==
|
||||
X-UI-Out-Filterresults: notjunk:1;V03:K0:arW5q/kpEak=:fNkvQgi7CQng+s4ZxkqrAl
|
||||
Shfn4kUf6kIfer4UddefIfpoKpAvezKz/iNNcd8IyBLFrA++7Igw03sj4to2x9/kBAlIbVINV
|
||||
JnAhVKciAu2qdP8xqMbmGrnJGAbkK10jhSsT6ufbHWHJmtxpizWgzDEtqJqbr2nzW0q8WL2dA
|
||||
YT1kdC3TCVS9IEJKxyAi26mf/pxvvoheQAygv0WBdtTAsdN6h2JMB7v6CPtGjL8CNOc/OemQK
|
||||
3fY/E6rQzoT5vc6F4NGVDje+vTBtMcFX/UhkKkKOnxuzyVpUdWITkeFaumc6q3miLeqpaKzm0
|
||||
gnnb7Tg9xKNdmPM/Ng049Qgy9bVJ3dVXaWyq2QleJAAUrhwVvN6zE8ogokYxzYR2pdrHs19gJ
|
||||
AhPNAX/QaP1VreCRGzo8D6ZEUJEkyK7mLOOyikqWFCT3kUtsKlmPaUGscn6rckZVU2OlfjijC
|
||||
GeEfaGcIEPyc3THhrPF5vbLos5lydlZkvNYUygQ5aTJXELDvt//cC9k+Kad/kOP8I7qa1TCcS
|
||||
M5brT1MnDj9qCja12qrxpkjF6Sih/5y2SfQFHLt7YFTX/YkvceXtUq4c9W6rLxHEnZKXm4ryY
|
||||
3cuJDYE3oOS4y/WMEhgazm795HJ8heBOv6T1tQPYlQkkKYNH8HKfeVgXBLbgHJLdc9r5AnjyH
|
||||
fOMjzqx2WqGT7S9I/oYGpTw7NQjHx45WexYKfhHfsjwSN3P4KgwtpAnl2vE++IIWQGiv+JR5L
|
||||
xIzts9r8uBaSUO1QR5qJG0cWqG+/FFdstWp3TsP2SeC0YMgeXSz1im5Ho/4=
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20181204_105916_085499_9EF7BF58
|
||||
X-CRM114-Status: GOOD ( 16.18 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.21
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>, devicetree@vger.kernel.org,
|
||||
bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
This adds a reference to the dts of the Raspberry Pi 3 A+,
|
||||
so we don't need to maintain the content in arm64.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm64/boot/dts/broadcom/Makefile | 3 ++-
|
||||
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dts | 2 ++
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
|
||||
index 667ca98..d1d31cc 100644
|
||||
--- a/arch/arm64/boot/dts/broadcom/Makefile
|
||||
+++ b/arch/arm64/boot/dts/broadcom/Makefile
|
||||
@@ -1,5 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
-dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb \
|
||||
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-a-plus.dtb \
|
||||
+ bcm2837-rpi-3-b.dtb \
|
||||
bcm2837-rpi-3-b-plus.dtb \
|
||||
bcm2837-rpi-cm3-io3.dtb
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dts
|
||||
new file mode 100644
|
||||
index 0000000..f0ec56a
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dts
|
||||
@@ -0,0 +1,2 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+#include "arm/bcm2837-rpi-3-a-plus.dts"
|
||||
45
bcm2837-fix-eth-leds.patch
Normal file
45
bcm2837-fix-eth-leds.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
From 6ef5bd6cfd5da9fe67aea031fd0a66ff77d64ad6 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Sat, 1 Sep 2018 20:16:22 +0200
|
||||
Subject: ARM: dts: bcm283x-rpi-lan7515: Enable Ethernet LEDs
|
||||
|
||||
Since the LAN7515 on Raspberry Pi 3B+ doesn't have an EEPROM and the OTP
|
||||
is empty, we need to enable the Ethernet LEDs via Device Tree.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
|
||||
index 9403da0990d0..70bece63f9a7 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
|
||||
@@ -1,4 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
+#include <dt-bindings/net/microchip-lan78xx.h>
|
||||
+
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = ðernet;
|
||||
@@ -21,6 +23,18 @@
|
||||
ethernet: ethernet@1 {
|
||||
compatible = "usb424,7800";
|
||||
reg = <1>;
|
||||
+
|
||||
+ mdio {
|
||||
+ #address-cells = <0x1>;
|
||||
+ #size-cells = <0x0>;
|
||||
+ eth_phy: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ microchip,led-modes = <
|
||||
+ LAN78XX_LINK_1000_ACTIVITY
|
||||
+ LAN78XX_LINK_10_100_ACTIVITY
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
};
|
||||
};
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
From patchwork Fri Feb 16 10:55:33 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [V3, 1/2,
|
||||
RESEND] dt-bindings: bcm283x: Fix register ranges of bcm2835-i2s
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10224429
|
||||
Message-Id: <1518778534-3328-2-git-send-email-stefan.wahren@i2se.com>
|
||||
To: Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>,
|
||||
Eric Anholt <eric@anholt.net>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>, devicetree@vger.kernel.org,
|
||||
alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
|
||||
Mark Brown <broonie@kernel.org>, linux-rpi-kernel@lists.infradead.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Fri, 16 Feb 2018 11:55:33 +0100
|
||||
|
||||
Since 517e7a1537a ("ASoC: bcm2835: move to use the clock framework")
|
||||
the bcm2835-i2s requires a clock as DT property. Unfortunately
|
||||
the necessary DT change has never been applied. While we are at it
|
||||
also fix the first PCM register range to cover the PCM_GRAY register.
|
||||
|
||||
This patch only fixes the affected dt-bindings.
|
||||
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
Reviewed-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++--
|
||||
Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt | 9 ++++-----
|
||||
2 files changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
|
||||
index baf9b34..b6a8cc0 100644
|
||||
--- a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
|
||||
+++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
|
||||
@@ -74,8 +74,8 @@ Example:
|
||||
|
||||
bcm2835_i2s: i2s@7e203000 {
|
||||
compatible = "brcm,bcm2835-i2s";
|
||||
- reg = < 0x7e203000 0x20>,
|
||||
- < 0x7e101098 0x02>;
|
||||
+ reg = < 0x7e203000 0x24>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_PCM>;
|
||||
|
||||
dmas = <&dma 2>,
|
||||
<&dma 3>;
|
||||
diff --git a/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt b/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt
|
||||
index 65783de..7bb0362 100644
|
||||
--- a/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt
|
||||
+++ b/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
Required properties:
|
||||
- compatible: "brcm,bcm2835-i2s"
|
||||
-- reg: A list of base address and size entries:
|
||||
- * The first entry should cover the PCM registers
|
||||
- * The second entry should cover the PCM clock registers
|
||||
+- reg: Should contain PCM registers location and length.
|
||||
+- clocks: the (PCM) clock to use
|
||||
- dmas: List of DMA controller phandle and DMA request line ordered pairs.
|
||||
- dma-names: Identifier string for each DMA request line in the dmas property.
|
||||
These strings correspond 1:1 with the ordered pairs in dmas.
|
||||
@@ -16,8 +15,8 @@ Example:
|
||||
|
||||
bcm2835_i2s: i2s@7e203000 {
|
||||
compatible = "brcm,bcm2835-i2s";
|
||||
- reg = <0x7e203000 0x20>,
|
||||
- <0x7e101098 0x02>;
|
||||
+ reg = <0x7e203000 0x24>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_PCM>;
|
||||
|
||||
dmas = <&dma 2>,
|
||||
<&dma 3>;
|
||||
From patchwork Fri Feb 16 10:55:34 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [V3,2/2,RESEND] ARM: dts: bcm283x: Fix probing of bcm2835-i2s
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 10224427
|
||||
Message-Id: <1518778534-3328-3-git-send-email-stefan.wahren@i2se.com>
|
||||
To: Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>,
|
||||
Eric Anholt <eric@anholt.net>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>, devicetree@vger.kernel.org,
|
||||
alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
|
||||
Mark Brown <broonie@kernel.org>, linux-rpi-kernel@lists.infradead.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Fri, 16 Feb 2018 11:55:34 +0100
|
||||
|
||||
Since 517e7a1537a ("ASoC: bcm2835: move to use the clock framework")
|
||||
the bcm2835-i2s requires a clock as DT property. Unfortunately
|
||||
the necessary DT change has never been applied. While we are at it
|
||||
also fix the first PCM register range to cover the PCM_GRAY register.
|
||||
|
||||
Fixes: 517e7a1537a ("ASoC: bcm2835: move to use the clock framework")
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
Tested-by: Matthias Reichl <hias@horus.com>
|
||||
---
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 013431e..e08203c 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -396,8 +396,8 @@
|
||||
|
||||
i2s: i2s@7e203000 {
|
||||
compatible = "brcm,bcm2835-i2s";
|
||||
- reg = <0x7e203000 0x20>,
|
||||
- <0x7e101098 0x02>;
|
||||
+ reg = <0x7e203000 0x24>;
|
||||
+ clocks = <&clocks BCM2835_CLOCK_PCM>;
|
||||
|
||||
dmas = <&dma 2>,
|
||||
<&dma 3>;
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
From patchwork Thu Aug 3 15:52:08 2017
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v3] dma-mapping: skip USB devices when configuring DMA during probe
|
||||
From: Johan Hovold <johan@kernel.org>
|
||||
X-Patchwork-Id: 9879371
|
||||
Message-Id: <20170803155208.22165-1-johan@kernel.org>
|
||||
To: Christoph Hellwig <hch@lst.de>,
|
||||
Marek Szyprowski <m.szyprowski@samsung.com>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>,
|
||||
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Alan Stern <stern@rowland.harvard.edu>, Johan Hovold <johan@kernel.org>,
|
||||
stable <stable@vger.kernel.org>, Robin Murphy <robin.murphy@arm.com>,
|
||||
Sricharan R <sricharan@codeaurora.org>,
|
||||
Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Thu, 3 Aug 2017 17:52:08 +0200
|
||||
|
||||
USB devices use the DMA mask and offset of the controller, which have
|
||||
already been setup when a device is probed. Note that modifying the
|
||||
DMA mask of a USB device would change the mask for the controller (and
|
||||
all devices on the bus) as the mask is literally shared.
|
||||
|
||||
Since commit 2bf698671205 ("USB: of: fix root-hub device-tree node
|
||||
handling"), of_dma_configure() would be called also for root hubs, which
|
||||
use the device node of the controller. A separate, long-standing bug
|
||||
that makes of_dma_configure() generate a 30-bit DMA mask from the RPI3's
|
||||
"dma-ranges" would thus set a broken mask also for the controller. This
|
||||
in turn prevents USB devices from enumerating when control transfers
|
||||
fail:
|
||||
|
||||
dwc2 3f980000.usb: Cannot do DMA to address 0x000000003a166a00
|
||||
|
||||
Note that the aforementioned DMA-mask bug was benign for the HCD itself
|
||||
as the dwc2 driver overwrites the mask previously set by
|
||||
of_dma_configure() for the platform device in its probe callback. The
|
||||
mask would only later get corrupted when the root-hub child device was
|
||||
probed.
|
||||
|
||||
Fix this, and similar future problems, by adding a flag to struct device
|
||||
which prevents driver core from calling dma_configure() during probe and
|
||||
making sure it is set for USB devices.
|
||||
|
||||
Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices")
|
||||
Cc: stable <stable@vger.kernel.org> # 4.12
|
||||
Cc: Robin Murphy <robin.murphy@arm.com>
|
||||
Cc: Sricharan R <sricharan@codeaurora.org>
|
||||
Cc: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
|
||||
Signed-off-by: Johan Hovold <johan@kernel.org>
|
||||
---
|
||||
|
||||
v3
|
||||
- add flag to struct device to prevent DMA configuration during probe instead
|
||||
of checking for the USB bus type, which is not available when USB is built
|
||||
as a module as noted by Alan
|
||||
- drop moderated rpi list from CC
|
||||
|
||||
v2
|
||||
- amend commit message and point out that the long-standing 30-bit DMA-mask
|
||||
bug was benign to the dwc2 HCD itself (Robin)
|
||||
- add and use a new dev_is_usb() helper (Robin)
|
||||
|
||||
|
||||
drivers/base/dma-mapping.c | 6 ++++++
|
||||
drivers/usb/core/usb.c | 1 +
|
||||
include/linux/device.h | 3 +++
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c
|
||||
index b555ff9dd8fc..f9f703be0ad1 100644
|
||||
--- a/drivers/base/dma-mapping.c
|
||||
+++ b/drivers/base/dma-mapping.c
|
||||
@@ -345,6 +345,9 @@ int dma_configure(struct device *dev)
|
||||
enum dev_dma_attr attr;
|
||||
int ret = 0;
|
||||
|
||||
+ if (dev->skip_dma_configure)
|
||||
+ return 0;
|
||||
+
|
||||
if (dev_is_pci(dev)) {
|
||||
bridge = pci_get_host_bridge_device(to_pci_dev(dev));
|
||||
dma_dev = bridge;
|
||||
@@ -369,6 +372,9 @@ int dma_configure(struct device *dev)
|
||||
|
||||
void dma_deconfigure(struct device *dev)
|
||||
{
|
||||
+ if (dev->skip_dma_configure)
|
||||
+ return;
|
||||
+
|
||||
of_dma_deconfigure(dev);
|
||||
acpi_dma_deconfigure(dev);
|
||||
}
|
||||
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
|
||||
index 17681d5638ac..2a85d905b539 100644
|
||||
--- a/drivers/usb/core/usb.c
|
||||
+++ b/drivers/usb/core/usb.c
|
||||
@@ -588,6 +588,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
|
||||
* Note: calling dma_set_mask() on a USB device would set the
|
||||
* mask for the entire HCD, so don't do that.
|
||||
*/
|
||||
+ dev->dev.skip_dma_configure = true;
|
||||
dev->dev.dma_mask = bus->sysdev->dma_mask;
|
||||
dev->dev.dma_pfn_offset = bus->sysdev->dma_pfn_offset;
|
||||
set_dev_node(&dev->dev, dev_to_node(bus->sysdev));
|
||||
diff --git a/include/linux/device.h b/include/linux/device.h
|
||||
index 723cd54b94da..022cf258068b 100644
|
||||
--- a/include/linux/device.h
|
||||
+++ b/include/linux/device.h
|
||||
@@ -877,6 +877,8 @@ struct dev_links_info {
|
||||
* @offline: Set after successful invocation of bus type's .offline().
|
||||
* @of_node_reused: Set if the device-tree node is shared with an ancestor
|
||||
* device.
|
||||
+ * @skip_dma_configure: Set if driver core should not configure DMA for this
|
||||
+ * device during probe.
|
||||
*
|
||||
* At the lowest level, every device in a Linux system is represented by an
|
||||
* instance of struct device. The device structure contains the information
|
||||
@@ -965,6 +967,7 @@ struct device {
|
||||
bool offline_disabled:1;
|
||||
bool offline:1;
|
||||
bool of_node_reused:1;
|
||||
+ bool skip_dma_configure:1;
|
||||
};
|
||||
|
||||
static inline struct device *kobj_to_dev(struct kobject *kobj)
|
||||
|
|
@ -1,638 +0,0 @@
|
|||
From patchwork Tue Feb 20 12:19:31 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v5,1/5] ARM: bcm2835: sync firmware properties with downstream
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
X-Patchwork-Id: 10229963
|
||||
Message-Id: <e7d1f1d0789f11d37957a8998bee23d035115aeb.1519128054.git.baruch@tkos.co.il>
|
||||
To: Linus Walleij <linus.walleij@linaro.org>,
|
||||
Dave Stevenson <dave.stevenson@raspberrypi.org>,
|
||||
Eric Anholt <eric@anholt.net>, Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Cc: devicetree@vger.kernel.org, Baruch Siach <baruch@tkos.co.il>,
|
||||
linux-gpio@vger.kernel.org, Michael Zoran <mzoran@crowfest.net>,
|
||||
Rob Herring <robh+dt@kernel.org>, linux-rpi-kernel@lists.infradead.org,
|
||||
Frank Rowand <frowand.list@gmail.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 20 Feb 2018 14:19:31 +0200
|
||||
|
||||
Add latest firmware property tags from the latest Raspberry Pi downstream
|
||||
kernel. This is needed for the GPIO tags, so we can control the GPIO
|
||||
multiplexor lines.
|
||||
|
||||
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
v4: No change
|
||||
|
||||
v3: Add Stefan's ack
|
||||
|
||||
v2: No change
|
||||
---
|
||||
include/soc/bcm2835/raspberrypi-firmware.h | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
index cb979ad90401..50df5b28d2c9 100644
|
||||
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
@@ -63,6 +63,7 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_GET_MIN_VOLTAGE = 0x00030008,
|
||||
RPI_FIRMWARE_GET_TURBO = 0x00030009,
|
||||
RPI_FIRMWARE_GET_MAX_TEMPERATURE = 0x0003000a,
|
||||
+ RPI_FIRMWARE_GET_STC = 0x0003000b,
|
||||
RPI_FIRMWARE_ALLOCATE_MEMORY = 0x0003000c,
|
||||
RPI_FIRMWARE_LOCK_MEMORY = 0x0003000d,
|
||||
RPI_FIRMWARE_UNLOCK_MEMORY = 0x0003000e,
|
||||
@@ -72,12 +73,22 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_SET_ENABLE_QPU = 0x00030012,
|
||||
RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014,
|
||||
RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020,
|
||||
+ RPI_FIRMWARE_GET_CUSTOMER_OTP = 0x00030021,
|
||||
RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030,
|
||||
RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001,
|
||||
RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002,
|
||||
RPI_FIRMWARE_SET_VOLTAGE = 0x00038003,
|
||||
RPI_FIRMWARE_SET_TURBO = 0x00038009,
|
||||
+ RPI_FIRMWARE_SET_CUSTOMER_OTP = 0x00038021,
|
||||
RPI_FIRMWARE_SET_DOMAIN_STATE = 0x00038030,
|
||||
+ RPI_FIRMWARE_GET_GPIO_STATE = 0x00030041,
|
||||
+ RPI_FIRMWARE_SET_GPIO_STATE = 0x00038041,
|
||||
+ RPI_FIRMWARE_SET_SDHOST_CLOCK = 0x00038042,
|
||||
+ RPI_FIRMWARE_GET_GPIO_CONFIG = 0x00030043,
|
||||
+ RPI_FIRMWARE_SET_GPIO_CONFIG = 0x00038043,
|
||||
+ RPI_FIRMWARE_GET_PERIPH_REG = 0x00030045,
|
||||
+ RPI_FIRMWARE_SET_PERIPH_REG = 0x00038045,
|
||||
+
|
||||
|
||||
/* Dispmanx TAGS */
|
||||
RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001,
|
||||
@@ -91,6 +102,8 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_FRAMEBUFFER_GET_VIRTUAL_OFFSET = 0x00040009,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_GET_OVERSCAN = 0x0004000a,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_GET_PALETTE = 0x0004000b,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_GET_TOUCHBUF = 0x0004000f,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_GET_GPIOVIRTBUF = 0x00040010,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_RELEASE = 0x00048001,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_PHYSICAL_WIDTH_HEIGHT = 0x00044003,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_WIDTH_HEIGHT = 0x00044004,
|
||||
@@ -100,6 +113,7 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_OFFSET = 0x00044009,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_OVERSCAN = 0x0004400a,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_TEST_PALETTE = 0x0004400b,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_TEST_VSYNC = 0x0004400e,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_PHYSICAL_WIDTH_HEIGHT = 0x00048003,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_WIDTH_HEIGHT = 0x00048004,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_DEPTH = 0x00048005,
|
||||
@@ -108,6 +122,10 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_OFFSET = 0x00048009,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a,
|
||||
RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF = 0x0004801f,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_SET_GPIOVIRTBUF = 0x00048020,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_SET_VSYNC = 0x0004800e,
|
||||
+ RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f,
|
||||
|
||||
RPI_FIRMWARE_VCHIQ_INIT = 0x00048010,
|
||||
|
||||
From patchwork Tue Feb 20 12:19:32 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v5,2/5] dt-bindings: gpio: add raspberry pi GPIO expander binding
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
X-Patchwork-Id: 10229965
|
||||
Message-Id: <f400b48cbcd8a138c39d4e8f63d6c1f569090dcc.1519128054.git.baruch@tkos.co.il>
|
||||
To: Linus Walleij <linus.walleij@linaro.org>,
|
||||
Dave Stevenson <dave.stevenson@raspberrypi.org>,
|
||||
Eric Anholt <eric@anholt.net>, Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Cc: devicetree@vger.kernel.org, Baruch Siach <baruch@tkos.co.il>,
|
||||
linux-gpio@vger.kernel.org, Michael Zoran <mzoran@crowfest.net>,
|
||||
Rob Herring <robh+dt@kernel.org>, linux-rpi-kernel@lists.infradead.org,
|
||||
Frank Rowand <frowand.list@gmail.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 20 Feb 2018 14:19:32 +0200
|
||||
|
||||
The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware over
|
||||
I2C. The firmware mailbox interface allows the ARM core to control the
|
||||
GPIO lines.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
Reviewed-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
v5:
|
||||
* Remove the 'firmware' property
|
||||
* Note that the gpio node is a child of the firmware node
|
||||
|
||||
v4:
|
||||
* Move the example gpio node under the firmware node
|
||||
* Rename gpio node name to plain 'gpio'
|
||||
|
||||
v3:
|
||||
* Rename node name.
|
||||
|
||||
v2:
|
||||
* Rename compatible string to raspberrypi,firmware-gpio
|
||||
---
|
||||
.../bindings/gpio/raspberrypi,firmware-gpio.txt | 30 ++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt b/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt
|
||||
new file mode 100644
|
||||
index 000000000000..ce97265e23ba
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt
|
||||
@@ -0,0 +1,30 @@
|
||||
+Raspberry Pi GPIO expander
|
||||
+
|
||||
+The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware. The
|
||||
+firmware exposes a mailbox interface that allows the ARM core to control the
|
||||
+GPIO lines on the expander.
|
||||
+
|
||||
+The Raspberry Pi GPIO expander node must be a child node of the Raspberry Pi
|
||||
+firmware node.
|
||||
+
|
||||
+Required properties:
|
||||
+
|
||||
+- compatible : Should be "raspberrypi,firmware-gpio"
|
||||
+- gpio-controller : Marks the device node as a gpio controller
|
||||
+- #gpio-cells : Should be two. The first cell is the pin number, and
|
||||
+ the second cell is used to specify the gpio polarity:
|
||||
+ 0 = active high
|
||||
+ 1 = active low
|
||||
+
|
||||
+Example:
|
||||
+
|
||||
+firmware: firmware-rpi {
|
||||
+ compatible = "raspberrypi,bcm2835-firmware";
|
||||
+ mboxes = <&mailbox>;
|
||||
+
|
||||
+ expgpio: gpio {
|
||||
+ compatible = "raspberrypi,firmware-gpio";
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ };
|
||||
+};
|
||||
From patchwork Tue Feb 20 12:19:33 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v5,
|
||||
3/5] gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox
|
||||
service
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
X-Patchwork-Id: 10229967
|
||||
Message-Id: <8c34f287ee72b340fa9d693aa0e304b25541c74c.1519128054.git.baruch@tkos.co.il>
|
||||
To: Linus Walleij <linus.walleij@linaro.org>,
|
||||
Dave Stevenson <dave.stevenson@raspberrypi.org>,
|
||||
Eric Anholt <eric@anholt.net>, Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Cc: devicetree@vger.kernel.org, Baruch Siach <baruch@tkos.co.il>,
|
||||
linux-gpio@vger.kernel.org, Michael Zoran <mzoran@crowfest.net>,
|
||||
Rob Herring <robh+dt@kernel.org>, linux-rpi-kernel@lists.infradead.org,
|
||||
Frank Rowand <frowand.list@gmail.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 20 Feb 2018 14:19:33 +0200
|
||||
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
Pi3 and Compute Module 3 have a GPIO expander that the
|
||||
VPU communicates with.
|
||||
There is a mailbox service that now allows control of this
|
||||
expander, so add a kernel driver that can make use of it.
|
||||
|
||||
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
v5:
|
||||
* Use the parent node to find the firmware
|
||||
|
||||
v4:
|
||||
* Don't set the .owner driver field
|
||||
* Add Stefan's review tag
|
||||
|
||||
v3:
|
||||
* Tweak Kconfig driver prompt
|
||||
* Make GPIO_RASPBERRYPI_EXP tristate
|
||||
* Make COMPILE_TEST independent of RASPBERRYPI_FIRMWARE
|
||||
* Remove redundant DMA header
|
||||
* Use less code lines for dev_err()
|
||||
* Check rpi_exp_gpio_get_polarity() return value
|
||||
* Remove redundant platform_set_drvdata() call
|
||||
|
||||
v2:
|
||||
* Rename driver to gpio-raspberrypi-exp
|
||||
* Populate the gpiochip parent device pointer
|
||||
* Use macro for the mailbox base GPIO number
|
||||
* Drop linux/gpio.h and GPIOF_DIR_*
|
||||
* Check and print firmware error value
|
||||
* Use devm_gpiochip_add_data(); drop .remove
|
||||
* A few more minor tweaks
|
||||
---
|
||||
drivers/gpio/Kconfig | 9 ++
|
||||
drivers/gpio/Makefile | 1 +
|
||||
drivers/gpio/gpio-raspberrypi-exp.c | 252 ++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 262 insertions(+)
|
||||
create mode 100644 drivers/gpio/gpio-raspberrypi-exp.c
|
||||
|
||||
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
|
||||
index 8dbb2280538d..fd0562a37f68 100644
|
||||
--- a/drivers/gpio/Kconfig
|
||||
+++ b/drivers/gpio/Kconfig
|
||||
@@ -122,6 +122,15 @@ config GPIO_ATH79
|
||||
Select this option to enable GPIO driver for
|
||||
Atheros AR71XX/AR724X/AR913X SoC devices.
|
||||
|
||||
+config GPIO_RASPBERRYPI_EXP
|
||||
+ tristate "Raspberry Pi 3 GPIO Expander"
|
||||
+ default RASPBERRYPI_FIRMWARE
|
||||
+ depends on OF_GPIO
|
||||
+ depends on (ARCH_BCM2835 && RASPBERRYPI_FIRMWARE) || COMPILE_TEST
|
||||
+ help
|
||||
+ Turn on GPIO support for the expander on Raspberry Pi 3 boards, using
|
||||
+ the firmware mailbox to communicate with VideoCore on BCM283x chips.
|
||||
+
|
||||
config GPIO_BCM_KONA
|
||||
bool "Broadcom Kona GPIO"
|
||||
depends on OF_GPIO && (ARCH_BCM_MOBILE || COMPILE_TEST)
|
||||
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
|
||||
index cccb0d40846c..76dc0a02bd56 100644
|
||||
--- a/drivers/gpio/Makefile
|
||||
+++ b/drivers/gpio/Makefile
|
||||
@@ -32,6 +32,7 @@ obj-$(CONFIG_GPIO_AMDPT) += gpio-amdpt.o
|
||||
obj-$(CONFIG_GPIO_ARIZONA) += gpio-arizona.o
|
||||
obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o
|
||||
obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o
|
||||
+obj-$(CONFIG_GPIO_RASPBERRYPI_EXP) += gpio-raspberrypi-exp.o
|
||||
obj-$(CONFIG_GPIO_BCM_KONA) += gpio-bcm-kona.o
|
||||
obj-$(CONFIG_GPIO_BD9571MWV) += gpio-bd9571mwv.o
|
||||
obj-$(CONFIG_GPIO_BRCMSTB) += gpio-brcmstb.o
|
||||
diff --git a/drivers/gpio/gpio-raspberrypi-exp.c b/drivers/gpio/gpio-raspberrypi-exp.c
|
||||
new file mode 100644
|
||||
index 000000000000..d6d36d537e37
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpio/gpio-raspberrypi-exp.c
|
||||
@@ -0,0 +1,252 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Raspberry Pi 3 expander GPIO driver
|
||||
+ *
|
||||
+ * Uses the firmware mailbox service to communicate with the
|
||||
+ * GPIO expander on the VPU.
|
||||
+ *
|
||||
+ * Copyright (C) 2017 Raspberry Pi Trading Ltd.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/gpio/driver.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
+
|
||||
+#define MODULE_NAME "raspberrypi-exp-gpio"
|
||||
+#define NUM_GPIO 8
|
||||
+
|
||||
+#define RPI_EXP_GPIO_BASE 128
|
||||
+
|
||||
+#define RPI_EXP_GPIO_DIR_IN 0
|
||||
+#define RPI_EXP_GPIO_DIR_OUT 1
|
||||
+
|
||||
+struct rpi_exp_gpio {
|
||||
+ struct gpio_chip gc;
|
||||
+ struct rpi_firmware *fw;
|
||||
+};
|
||||
+
|
||||
+/* VC4 firmware mailbox interface data structures */
|
||||
+
|
||||
+struct gpio_set_config {
|
||||
+ u32 gpio;
|
||||
+ u32 direction;
|
||||
+ u32 polarity;
|
||||
+ u32 term_en;
|
||||
+ u32 term_pull_up;
|
||||
+ u32 state;
|
||||
+};
|
||||
+
|
||||
+struct gpio_get_config {
|
||||
+ u32 gpio;
|
||||
+ u32 direction;
|
||||
+ u32 polarity;
|
||||
+ u32 term_en;
|
||||
+ u32 term_pull_up;
|
||||
+};
|
||||
+
|
||||
+struct gpio_get_set_state {
|
||||
+ u32 gpio;
|
||||
+ u32 state;
|
||||
+};
|
||||
+
|
||||
+static int rpi_exp_gpio_get_polarity(struct gpio_chip *gc, unsigned int off)
|
||||
+{
|
||||
+ struct rpi_exp_gpio *gpio;
|
||||
+ struct gpio_get_config get;
|
||||
+ int ret;
|
||||
+
|
||||
+ gpio = gpiochip_get_data(gc);
|
||||
+
|
||||
+ get.gpio = off + RPI_EXP_GPIO_BASE; /* GPIO to update */
|
||||
+
|
||||
+ ret = rpi_firmware_property(gpio->fw, RPI_FIRMWARE_GET_GPIO_CONFIG,
|
||||
+ &get, sizeof(get));
|
||||
+ if (ret || get.gpio != 0) {
|
||||
+ dev_err(gc->parent, "Failed to get GPIO %u config (%d %x)\n",
|
||||
+ off, ret, get.gpio);
|
||||
+ return ret ? ret : -EIO;
|
||||
+ }
|
||||
+ return get.polarity;
|
||||
+}
|
||||
+
|
||||
+static int rpi_exp_gpio_dir_in(struct gpio_chip *gc, unsigned int off)
|
||||
+{
|
||||
+ struct rpi_exp_gpio *gpio;
|
||||
+ struct gpio_set_config set_in;
|
||||
+ int ret;
|
||||
+
|
||||
+ gpio = gpiochip_get_data(gc);
|
||||
+
|
||||
+ set_in.gpio = off + RPI_EXP_GPIO_BASE; /* GPIO to update */
|
||||
+ set_in.direction = RPI_EXP_GPIO_DIR_IN;
|
||||
+ set_in.term_en = 0; /* termination disabled */
|
||||
+ set_in.term_pull_up = 0; /* n/a as termination disabled */
|
||||
+ set_in.state = 0; /* n/a as configured as an input */
|
||||
+
|
||||
+ ret = rpi_exp_gpio_get_polarity(gc, off);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ set_in.polarity = ret; /* Retain existing setting */
|
||||
+
|
||||
+ ret = rpi_firmware_property(gpio->fw, RPI_FIRMWARE_SET_GPIO_CONFIG,
|
||||
+ &set_in, sizeof(set_in));
|
||||
+ if (ret || set_in.gpio != 0) {
|
||||
+ dev_err(gc->parent, "Failed to set GPIO %u to input (%d %x)\n",
|
||||
+ off, ret, set_in.gpio);
|
||||
+ return ret ? ret : -EIO;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int rpi_exp_gpio_dir_out(struct gpio_chip *gc, unsigned int off, int val)
|
||||
+{
|
||||
+ struct rpi_exp_gpio *gpio;
|
||||
+ struct gpio_set_config set_out;
|
||||
+ int ret;
|
||||
+
|
||||
+ gpio = gpiochip_get_data(gc);
|
||||
+
|
||||
+ set_out.gpio = off + RPI_EXP_GPIO_BASE; /* GPIO to update */
|
||||
+ set_out.direction = RPI_EXP_GPIO_DIR_OUT;
|
||||
+ set_out.term_en = 0; /* n/a as an output */
|
||||
+ set_out.term_pull_up = 0; /* n/a as termination disabled */
|
||||
+ set_out.state = val; /* Output state */
|
||||
+
|
||||
+ ret = rpi_exp_gpio_get_polarity(gc, off);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ set_out.polarity = ret; /* Retain existing setting */
|
||||
+
|
||||
+ ret = rpi_firmware_property(gpio->fw, RPI_FIRMWARE_SET_GPIO_CONFIG,
|
||||
+ &set_out, sizeof(set_out));
|
||||
+ if (ret || set_out.gpio != 0) {
|
||||
+ dev_err(gc->parent, "Failed to set GPIO %u to output (%d %x)\n",
|
||||
+ off, ret, set_out.gpio);
|
||||
+ return ret ? ret : -EIO;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int rpi_exp_gpio_get_direction(struct gpio_chip *gc, unsigned int off)
|
||||
+{
|
||||
+ struct rpi_exp_gpio *gpio;
|
||||
+ struct gpio_get_config get;
|
||||
+ int ret;
|
||||
+
|
||||
+ gpio = gpiochip_get_data(gc);
|
||||
+
|
||||
+ get.gpio = off + RPI_EXP_GPIO_BASE; /* GPIO to update */
|
||||
+
|
||||
+ ret = rpi_firmware_property(gpio->fw, RPI_FIRMWARE_GET_GPIO_CONFIG,
|
||||
+ &get, sizeof(get));
|
||||
+ if (ret || get.gpio != 0) {
|
||||
+ dev_err(gc->parent,
|
||||
+ "Failed to get GPIO %u config (%d %x)\n", off, ret,
|
||||
+ get.gpio);
|
||||
+ return ret ? ret : -EIO;
|
||||
+ }
|
||||
+ return !get.direction;
|
||||
+}
|
||||
+
|
||||
+static int rpi_exp_gpio_get(struct gpio_chip *gc, unsigned int off)
|
||||
+{
|
||||
+ struct rpi_exp_gpio *gpio;
|
||||
+ struct gpio_get_set_state get;
|
||||
+ int ret;
|
||||
+
|
||||
+ gpio = gpiochip_get_data(gc);
|
||||
+
|
||||
+ get.gpio = off + RPI_EXP_GPIO_BASE; /* GPIO to update */
|
||||
+ get.state = 0; /* storage for returned value */
|
||||
+
|
||||
+ ret = rpi_firmware_property(gpio->fw, RPI_FIRMWARE_GET_GPIO_STATE,
|
||||
+ &get, sizeof(get));
|
||||
+ if (ret || get.gpio != 0) {
|
||||
+ dev_err(gc->parent,
|
||||
+ "Failed to get GPIO %u state (%d %x)\n", off, ret,
|
||||
+ get.gpio);
|
||||
+ return ret ? ret : -EIO;
|
||||
+ }
|
||||
+ return !!get.state;
|
||||
+}
|
||||
+
|
||||
+static void rpi_exp_gpio_set(struct gpio_chip *gc, unsigned int off, int val)
|
||||
+{
|
||||
+ struct rpi_exp_gpio *gpio;
|
||||
+ struct gpio_get_set_state set;
|
||||
+ int ret;
|
||||
+
|
||||
+ gpio = gpiochip_get_data(gc);
|
||||
+
|
||||
+ set.gpio = off + RPI_EXP_GPIO_BASE; /* GPIO to update */
|
||||
+ set.state = val; /* Output state */
|
||||
+
|
||||
+ ret = rpi_firmware_property(gpio->fw, RPI_FIRMWARE_SET_GPIO_STATE,
|
||||
+ &set, sizeof(set));
|
||||
+ if (ret || set.gpio != 0)
|
||||
+ dev_err(gc->parent,
|
||||
+ "Failed to set GPIO %u state (%d %x)\n", off, ret,
|
||||
+ set.gpio);
|
||||
+}
|
||||
+
|
||||
+static int rpi_exp_gpio_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct device_node *np = dev->of_node;
|
||||
+ struct device_node *fw_node;
|
||||
+ struct rpi_firmware *fw;
|
||||
+ struct rpi_exp_gpio *rpi_gpio;
|
||||
+
|
||||
+ fw_node = of_get_parent(np);
|
||||
+ if (!fw_node) {
|
||||
+ dev_err(dev, "Missing firmware node\n");
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+
|
||||
+ fw = rpi_firmware_get(fw_node);
|
||||
+ if (!fw)
|
||||
+ return -EPROBE_DEFER;
|
||||
+
|
||||
+ rpi_gpio = devm_kzalloc(dev, sizeof(*rpi_gpio), GFP_KERNEL);
|
||||
+ if (!rpi_gpio)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ rpi_gpio->fw = fw;
|
||||
+ rpi_gpio->gc.parent = dev;
|
||||
+ rpi_gpio->gc.label = MODULE_NAME;
|
||||
+ rpi_gpio->gc.owner = THIS_MODULE;
|
||||
+ rpi_gpio->gc.of_node = np;
|
||||
+ rpi_gpio->gc.base = -1;
|
||||
+ rpi_gpio->gc.ngpio = NUM_GPIO;
|
||||
+
|
||||
+ rpi_gpio->gc.direction_input = rpi_exp_gpio_dir_in;
|
||||
+ rpi_gpio->gc.direction_output = rpi_exp_gpio_dir_out;
|
||||
+ rpi_gpio->gc.get_direction = rpi_exp_gpio_get_direction;
|
||||
+ rpi_gpio->gc.get = rpi_exp_gpio_get;
|
||||
+ rpi_gpio->gc.set = rpi_exp_gpio_set;
|
||||
+ rpi_gpio->gc.can_sleep = true;
|
||||
+
|
||||
+ return devm_gpiochip_add_data(dev, &rpi_gpio->gc, rpi_gpio);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id rpi_exp_gpio_ids[] = {
|
||||
+ { .compatible = "raspberrypi,firmware-gpio" },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, rpi_exp_gpio_ids);
|
||||
+
|
||||
+static struct platform_driver rpi_exp_gpio_driver = {
|
||||
+ .driver = {
|
||||
+ .name = MODULE_NAME,
|
||||
+ .of_match_table = of_match_ptr(rpi_exp_gpio_ids),
|
||||
+ },
|
||||
+ .probe = rpi_exp_gpio_probe,
|
||||
+};
|
||||
+module_platform_driver(rpi_exp_gpio_driver);
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Dave Stevenson <dave.stevenson@raspberrypi.org>");
|
||||
+MODULE_DESCRIPTION("Raspberry Pi 3 expander GPIO driver");
|
||||
+MODULE_ALIAS("platform:rpi-exp-gpio");
|
||||
From patchwork Tue Feb 20 12:19:34 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v5,4/5] ARM: dts: bcm2835: make the firmware node into a bus
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
X-Patchwork-Id: 10229961
|
||||
Message-Id: <43f9082a6835df6d7bcd3e16d79db687c52826d2.1519128054.git.baruch@tkos.co.il>
|
||||
To: Linus Walleij <linus.walleij@linaro.org>,
|
||||
Dave Stevenson <dave.stevenson@raspberrypi.org>,
|
||||
Eric Anholt <eric@anholt.net>, Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Cc: devicetree@vger.kernel.org, Baruch Siach <baruch@tkos.co.il>,
|
||||
linux-gpio@vger.kernel.org, Michael Zoran <mzoran@crowfest.net>,
|
||||
Rob Herring <robh+dt@kernel.org>, linux-rpi-kernel@lists.infradead.org,
|
||||
Frank Rowand <frowand.list@gmail.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 20 Feb 2018 14:19:34 +0200
|
||||
|
||||
This allows adding devices for which the firmware exposes control interface
|
||||
via the mailbox. An example of such device is the GPIO expander.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
v4: New patch in this series
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
index e36c392a2b8f..0198bd46ef7c 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
@@ -18,7 +18,9 @@
|
||||
|
||||
soc {
|
||||
firmware: firmware {
|
||||
- compatible = "raspberrypi,bcm2835-firmware";
|
||||
+ compatible = "raspberrypi,bcm2835-firmware", "simple-bus";
|
||||
+ #address-cells = <0>;
|
||||
+ #size-cells = <0>;
|
||||
mboxes = <&mailbox>;
|
||||
};
|
||||
|
||||
From patchwork Tue Feb 20 12:19:35 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v5,5/5] ARM: dts: bcm2837-rpi-3-b: add GPIO expander
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
X-Patchwork-Id: 10229995
|
||||
Message-Id: <a6d59692dc4847e0b1639a26542e28c95ad5240f.1519128054.git.baruch@tkos.co.il>
|
||||
To: Linus Walleij <linus.walleij@linaro.org>,
|
||||
Dave Stevenson <dave.stevenson@raspberrypi.org>,
|
||||
Eric Anholt <eric@anholt.net>, Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Cc: devicetree@vger.kernel.org, Baruch Siach <baruch@tkos.co.il>,
|
||||
linux-gpio@vger.kernel.org, Michael Zoran <mzoran@crowfest.net>,
|
||||
Rob Herring <robh+dt@kernel.org>, linux-rpi-kernel@lists.infradead.org,
|
||||
Frank Rowand <frowand.list@gmail.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Tue, 20 Feb 2018 14:19:35 +0200
|
||||
|
||||
Add a description of the RPi3 GPIO expander that the VC4 firmware controls.
|
||||
|
||||
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
v5:
|
||||
* Drop the 'firmware' property
|
||||
|
||||
v4:
|
||||
* Move the gpio node under the firmware node
|
||||
* Rename the gpio node to plain 'gpio'
|
||||
* Add Stefan's ack
|
||||
|
||||
v3:
|
||||
* List GPIO names one per line.
|
||||
|
||||
v2:
|
||||
* Move GPIO expander node out of the soc container
|
||||
* Rename compatible string
|
||||
* Add gpio-line-names property
|
||||
---
|
||||
arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
index 3e4ed7c5b0b3..0b31d995a066 100644
|
||||
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
@@ -25,6 +25,23 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&firmware {
|
||||
+ expgpio: gpio {
|
||||
+ compatible = "raspberrypi,firmware-gpio";
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ gpio-line-names = "BT_ON",
|
||||
+ "WL_ON",
|
||||
+ "STATUS_LED",
|
||||
+ "LAN_RUN",
|
||||
+ "HPD_N",
|
||||
+ "CAM_GPIO0",
|
||||
+ "CAM_GPIO1",
|
||||
+ "PWR_LOW_N";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
/* uart0 communicates with the BT module */
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
43
brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch
Normal file
43
brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
From 554da3868eb1d7174710c18b4ddd6ff01f6d612c Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 23 Nov 2018 10:11:48 +0100
|
||||
Subject: brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe
|
||||
|
||||
ARM systems with UEFI may have both devicetree (of) and DMI data in this
|
||||
case we end up setting brcmf_mp_device.board_type twice.
|
||||
|
||||
In this case we should prefer the devicetree data, because:
|
||||
1) The devicerree data is more reliable
|
||||
2) Some ARM systems (e.g. the Raspberry Pi 3 models) support both UEFI and
|
||||
classic uboot booting, the devicetree data is always there, so using it
|
||||
makes sure we ask for the same nvram file independent of how we booted.
|
||||
|
||||
This commit moves the brcmf_dmi_probe call to before the brcmf_of_probe
|
||||
call, so that the latter can override the value of the first if both are
|
||||
set.
|
||||
|
||||
Fixes: bd1e82bb420a ("brcmfmac: Set board_type from DMI on x86 based ...")
|
||||
Cc: Peter Robinson <pbrobinson@gmail.com>
|
||||
Tested-and-reported-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
index e738112ed87c..1f1e95a15a17 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -449,8 +449,8 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev,
|
||||
}
|
||||
if (!found) {
|
||||
/* No platform data for this device, try OF and DMI data */
|
||||
- brcmf_of_probe(dev, bus_type, settings);
|
||||
brcmf_dmi_probe(settings, chip, chiprev);
|
||||
+ brcmf_of_probe(dev, bus_type, settings);
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
1028
brcmfmac-Remove-firmware-loading-code-duplication.patch
Normal file
1028
brcmfmac-Remove-firmware-loading-code-duplication.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -11,6 +11,8 @@ SCRIPT="$(readlink -f $0)"
|
|||
OUTPUT_DIR="$PWD"
|
||||
SCRIPT_DIR="$(dirname $SCRIPT)"
|
||||
|
||||
LANG=en_US.UTF-8
|
||||
|
||||
# to handle this script being a symlink
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ x86_64-debug=generic:generic-x86:generic-x86-x86_64:debug:debug-x86:debug-x86-x8
|
|||
# i686
|
||||
i686=generic:generic-x86:generic-x86-i686
|
||||
i686-debug=generic:generic-x86:generic-x86-i686:debug:debug-x86
|
||||
i686-PAE=generic:generic-x86:generic-x86-i686PAE
|
||||
i686-PAEdebug=generic:generic-x86:generic-x86-i686PAE:debug:debug-x86
|
||||
|
||||
# ppc64
|
||||
ppc64=generic:generic-powerpc:generic-powerpc-powerpc64
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
CONFIG_ARM64_PTDUMP=y
|
||||
1
configs/fedora/debug/CONFIG_ARM_PTDUMP_DEBUGFS
Normal file
1
configs/fedora/debug/CONFIG_ARM_PTDUMP_DEBUGFS
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ARM_PTDUMP_DEBUGFS=y
|
||||
|
|
@ -1 +0,0 @@
|
|||
CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
|
||||
|
|
@ -1 +0,0 @@
|
|||
CONFIG_DEBUG_REFCOUNT=y
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_RWSEMS
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_RWSEMS
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_RWSEMS=y
|
||||
|
|
@ -1 +0,0 @@
|
|||
CONFIG_DEBUG_SLAB=y
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_WW_MUTEX_SLOWPATH
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_WW_MUTEX_SLOWPATH
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
|
||||
1
configs/fedora/debug/CONFIG_IOMMU_DEBUGFS
Normal file
1
configs/fedora/debug/CONFIG_IOMMU_DEBUGFS
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_IOMMU_DEBUGFS=y
|
||||
1
configs/fedora/debug/CONFIG_XFS_WARN
Normal file
1
configs/fedora/debug/CONFIG_XFS_WARN
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_XFS_WARN=y
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_DMADEVICES_DEBUG is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_8723AU_AP_MODE is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_8723AU_BT_COEXIST is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_AB3100_CORE is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_AB3100_OTP is not set
|
||||
1
configs/fedora/generic/CONFIG_ACPI_TAD
Normal file
1
configs/fedora/generic/CONFIG_ACPI_TAD
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ACPI_TAD=m
|
||||
1
configs/fedora/generic/CONFIG_AD5272
Normal file
1
configs/fedora/generic/CONFIG_AD5272
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AD5272=m
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_AD5686 is not set
|
||||
1
configs/fedora/generic/CONFIG_AD5686_SPI
Normal file
1
configs/fedora/generic/CONFIG_AD5686_SPI
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD5686_SPI is not set
|
||||
1
configs/fedora/generic/CONFIG_AD5696_I2C
Normal file
1
configs/fedora/generic/CONFIG_AD5696_I2C
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD5696_I2C is not set
|
||||
1
configs/fedora/generic/CONFIG_AD5758
Normal file
1
configs/fedora/generic/CONFIG_AD5758
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD5758 is not set
|
||||
1
configs/fedora/generic/CONFIG_AD7124
Normal file
1
configs/fedora/generic/CONFIG_AD7124
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AD7124=m
|
||||
1
configs/fedora/generic/CONFIG_AD7949
Normal file
1
configs/fedora/generic/CONFIG_AD7949
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AD7949=m
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_ADE7753 is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_ADE7754 is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_ADE7758 is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_ADE7759 is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_ADIS16060 is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_ADM8211 is not set
|
||||
1
configs/fedora/generic/CONFIG_ADXL372_I2C
Normal file
1
configs/fedora/generic/CONFIG_ADXL372_I2C
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ADXL372_I2C=m
|
||||
1
configs/fedora/generic/CONFIG_ADXL372_SPI
Normal file
1
configs/fedora/generic/CONFIG_ADXL372_SPI
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ADXL372_SPI=m
|
||||
1
configs/fedora/generic/CONFIG_AFS_DEBUG
Normal file
1
configs/fedora/generic/CONFIG_AFS_DEBUG
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AFS_DEBUG=y
|
||||
1
configs/fedora/generic/CONFIG_AFS_DEBUG_CURSOR
Normal file
1
configs/fedora/generic/CONFIG_AFS_DEBUG_CURSOR
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AFS_DEBUG_CURSOR is not set
|
||||
|
|
@ -1 +1 @@
|
|||
# CONFIG_AFS_FS is not set
|
||||
CONFIG_AFS_FS=m
|
||||
|
|
|
|||
1
configs/fedora/generic/CONFIG_AFS_FSCACHE
Normal file
1
configs/fedora/generic/CONFIG_AFS_FSCACHE
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AFS_FSCACHE=y
|
||||
|
|
@ -1 +1 @@
|
|||
# CONFIG_AF_KCM is not set
|
||||
CONFIG_AF_KCM=m
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
# CONFIG_AF_RXRPC is not set
|
||||
CONFIG_AF_RXRPC=m
|
||||
|
|
|
|||
1
configs/fedora/generic/CONFIG_AF_RXRPC_DEBUG
Normal file
1
configs/fedora/generic/CONFIG_AF_RXRPC_DEBUG
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AF_RXRPC_DEBUG=y
|
||||
1
configs/fedora/generic/CONFIG_AF_RXRPC_INJECT_LOSS
Normal file
1
configs/fedora/generic/CONFIG_AF_RXRPC_INJECT_LOSS
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AF_RXRPC_INJECT_LOSS is not set
|
||||
1
configs/fedora/generic/CONFIG_AF_RXRPC_IPV6
Normal file
1
configs/fedora/generic/CONFIG_AF_RXRPC_IPV6
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_AF_RXRPC_IPV6=y
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_AIRO is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
# CONFIG_AIRO_CS is not set
|
||||
1
configs/fedora/generic/CONFIG_ALTERA_PR_IP_CORE
Normal file
1
configs/fedora/generic/CONFIG_ALTERA_PR_IP_CORE
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ALTERA_PR_IP_CORE=m
|
||||
1
configs/fedora/generic/CONFIG_ALTERA_PR_IP_CORE_PLAT
Normal file
1
configs/fedora/generic/CONFIG_ALTERA_PR_IP_CORE_PLAT
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ALTERA_PR_IP_CORE_PLAT=m
|
||||
1
configs/fedora/generic/CONFIG_AMD_IOMMU_DEBUGFS
Normal file
1
configs/fedora/generic/CONFIG_AMD_IOMMU_DEBUGFS
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AMD_IOMMU_DEBUGFS is not set
|
||||
|
|
@ -1 +0,0 @@
|
|||
CONFIG_APM_POWER=m
|
||||
1
configs/fedora/generic/CONFIG_ARCH_DAVINCI
Normal file
1
configs/fedora/generic/CONFIG_ARCH_DAVINCI
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ARCH_DAVINCI is not set
|
||||
1
configs/fedora/generic/CONFIG_ARCH_DOVE
Normal file
1
configs/fedora/generic/CONFIG_ARCH_DOVE
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ARCH_DOVE is not set
|
||||
1
configs/fedora/generic/CONFIG_ARCH_EBSA110
Normal file
1
configs/fedora/generic/CONFIG_ARCH_EBSA110
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ARCH_EBSA110 is not set
|
||||
1
configs/fedora/generic/CONFIG_ARCH_EP93XX
Normal file
1
configs/fedora/generic/CONFIG_ARCH_EP93XX
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ARCH_EP93XX is not set
|
||||
1
configs/fedora/generic/CONFIG_ARCH_FOOTBRIDGE
Normal file
1
configs/fedora/generic/CONFIG_ARCH_FOOTBRIDGE
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ARCH_FOOTBRIDGE is not set
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue